{"version":3,"sources":["webpack:///./source/application/office-and-advisor-search-page-handler/office-and-advisor-search-page-handler.module.js","webpack:///./source/application/office-and-advisor-search-page-handler/office-and-advisor-search-page-handler.component.js","webpack:///./source/layouts/AIRTA/layout.js"],"names":["angular","module","OfficeAndAdvisorSearch","component","searchPageHandlerComponent","name","templateUrl","controller","NgMap","$rootScope","$mdDialog","$timeout","CommonConstants","notificationService","this","ngMap","markers","popupMarkers","constants","initialized","window","location","hash","arrHash","split","searchText","decodeURI","substr","indexOf","view","length","localStorage","getItem","selectedItem","JSON","parse","removeItem","openModal","initMap","$event","listElement","item","copy","itemType","type","id","vm","getMap","then","map","clearMarkers","contentString","getContentString","position","google","maps","LatLng","lat","lng","office","destination","marker","createMarker","infoWindow","createInfoWindow","addClickEventToMarker","setCenter","event","addListenerOnce","trigger","Marker","icon","InfoWindow","content","maxWidth","$scope","addListener","open","arr","i","setMap","element","show","clickOutsideToClose","controllerAs","onShowing","hide","hitsList","resultListByMap","showInfo","message","initMapViewMap","items","mapBounds","LatLngBounds","push","extend","fitBounds","getCenter","href","transclude","dependencies"],"mappings":"kKAAA,KACA,I,EAAA,SACA,G,EAAA,S,2BACA,MAEA,I,EAEeA,QAAQC,OAFH,6BAEuB,CAAC,QAASC,YAAyBC,UAAU,6BAA8BC,8BAA4BC,K,8TCPlJ,IAGaD,EAA6B,CACzCE,YAAa,oCACbC,WAAU,WACT,WAAYC,EAAOC,EAAYC,EAAWC,EAAUC,EAAiBC,I,4FAAqB,SAEzFC,KAAKC,MAAQP,EACbM,KAAKL,WAAaA,EAClBK,KAAKJ,UAAYA,EACjBI,KAAKH,SAAWA,EAChBG,KAAKE,QAAU,GACfF,KAAKG,aAAe,GACpBH,KAAKI,UAAYN,EACjBE,KAAKD,oBAAsBA,E,UAVnB,uG,EAAA,G,EAAA,iCAaC,WACT,IAAKC,KAAKK,YAAa,CAEtB,GADAL,KAAKK,aAAc,EACfC,OAAOC,SAASC,KAAM,CACzB,IACIC,EADOH,OAAOC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V,EAAKtE,MAAMgC,SAASC,MAAK,SAACC,GAEzBK,OAAOC,KAAKY,MAAME,QAAQpB,EAAK,kBAzI1B,8BAgJRnC,KAAKJ,UAAU4E,SAhJP,yCAuJU/C,GAClBzB,KAAKyE,SAAWhD,EAAOiD,gBACvB1E,KAAKD,oBAAoB4E,SAAS,CACjCC,QAAS,eAGV5E,KAAKe,KAAO,MACZf,KAAK6E,mBA9JG,uCAiKQ,WACZC,EAAQ5F,QAAQ0C,KAAK5B,KAAKyE,UAC1BzC,EAAKhC,KACTA,KAAKC,MAAMgC,OAAO,qBAAqBC,MAAK,SAACC,GAC5CH,EAAGI,aAAaJ,EAAG9B,SACnB8B,EAAG9B,QAAU,GAEb,IADA,IAAI6E,EAAY,IAAIzE,OAAOkC,OAAOC,KAAKuC,aAC9Bf,EAAI,EAAGA,EAAIa,EAAM9D,OAAQiD,IAAK,CACtC,IAAItC,EAAOmD,EAAMb,GACbtB,EAAMhB,EAAKgB,IACXC,EAAMjB,EAAKiB,IAEXL,EAAW,IAAIjC,OAAOkC,OAAOC,KAAKC,OAAOC,EAAKC,GAC9CG,EAASf,EAAGgB,aAAab,EAAKI,GAClCP,EAAG9B,QAAQ+E,KAAKlC,GAChBf,EAAGmB,sBAAsBJ,EAAQ,KAAMZ,EAAKQ,EAAKC,EAAK,EAAMjB,GAC5DoD,EAAUG,OAAO3C,GAElBjC,OAAOkC,OAAOC,KAAKY,MAAME,QAAQpB,EAAK,UACtCA,EAAIgD,UAAUJ,GACd5C,EAAIiB,UAAU2B,EAAUK,kBArLjB,mCA0LR9E,OAAOC,SAAS8E,KAAO,qB,2BA1Lf,KA6LVC,YAAY,EACZhB,aAAc,Q,8KCnMf,OACA,I,EAAA,G,EAAA,O,2BACA,MACA,MACA,OAEA,I,EAEepF,UAAQC,OAFH,YAEuBmB,OAAOiF,cAAchG,K","file":"layouts/AIRTA/layout.bundle.js","sourcesContent":["import 'angular';\nimport { searchPageHandlerComponent } from './office-and-advisor-search-page-handler.component';\nimport OfficeAndAdvisorSearch from '../../application/office-and-advisor-search/office-and-advisor-search.module';\nimport 'ngmap';\n\nconst MODULE_NAME = 'searchPageHandlerComponent';\n\nexport default angular.module(MODULE_NAME, ['ngMap', OfficeAndAdvisorSearch]).component('searchPageHandlerComponent', searchPageHandlerComponent).name;\n\n\n","const MAX_ZOOM = 16;\nconst MIN_ZOOM = 5;\n\nexport const searchPageHandlerComponent = {\n\ttemplateUrl: 'search-page-handler-template.html',\n\tcontroller: class searchPageHandlerComponent {\n\t\tconstructor(NgMap, $rootScope, $mdDialog, $timeout, CommonConstants, notificationService) {\n\t\t\t'ngInject';\n\t\t\tthis.ngMap = NgMap;\n\t\t\tthis.$rootScope = $rootScope;\n\t\t\tthis.$mdDialog = $mdDialog;\n\t\t\tthis.$timeout = $timeout;\n\t\t\tthis.markers = [];\n\t\t\tthis.popupMarkers = [];\n\t\t\tthis.constants = CommonConstants;\n\t\t\tthis.notificationService = notificationService;\n\t\t}\n\n\t\t$onInit() {\n\t\t\tif (!this.initialized) {\n\t\t\t\tthis.initialized = true;\n\t\t\t\tif (window.location.hash) {\n\t\t\t\t\tlet hash = window.location.hash;\n\t\t\t\t\tlet arrHash = hash.split('/');\n\t\t\t\t\tthis.searchText = decodeURI(arrHash[1].substr(arrHash[1].indexOf('=') + 1));\n\t\t\t\t\tthis.view = arrHash.length > 2 ? arrHash[2].substr(arrHash[2].indexOf('=') + 1) : 'list';\n\t\t\t\t} else {\n\t\t\t\t\tthis.view = 'list';\n\t\t\t\t}\n\t\t\t\tif (window.localStorage.getItem('selectedItem')) {\n\t\t\t\t\tthis.selectedItem = JSON.parse(window.localStorage.getItem('selectedItem'));\n\t\t\t\t\twindow.localStorage.removeItem('selectedItem');\n\t\t\t\t\tthis.$timeout(() => {\n\t\t\t\t\t\tthis.openModal(this.selectedItem);\n\t\t\t\t\t\t// popup map!!\n\t\t\t\t\t\tthis.initMap();\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tselectFromList($event) {\n\t\t\tthis.selectedItem = $event.listElement;\n\t\t\tthis.openModal(this.selectedItem);\n\t\t\t// popup map!!\n\t\t\tthis.initMap();\n\t\t}\n\n\t\t/** popup map */\n\n\t\tinitMap() {\n\t\t\tlet item = angular.copy(this.selectedItem);\n\t\t\tlet itemType = item.type;\n\t\t\tlet id = '';\n\t\t\tif (itemType == 'office') {\n\t\t\t\tid = 'oc-result-office-map';\n\t\t\t} else if (itemType == 'person') {\n\t\t\t\tid = 'oc-result-consultant-map';\n\t\t\t}\n\t\t\tlet vm = this;\n\t\t\tthis.ngMap.getMap(id).then((map) => {\n\t\t\t\tvm.clearMarkers(vm.popupMarkers);\n\t\t\t\tvm.popupMarkers = [];\n\t\t\t\tlet contentString = vm.getContentString(item);\n\t\t\t\tlet position = itemType == 'office' ?\n\t\t\t\t\tnew window.google.maps.LatLng(item.lat, item.lng) :\n\t\t\t\t\tnew window.google.maps.LatLng(item.office.lat, item.office.lng);\n\t\t\t\tvm.$rootScope.destination = itemType == 'office' ?\n\t\t\t\t\titem.lat + ', ' + item.lng :\n\t\t\t\t\titem.office.lat + ', ' + item.office.lng;\n\t\t\t\tlet marker = this.createMarker(map, position);\n\t\t\t\tvm.popupMarkers = [marker];\n\t\t\t\tlet infoWindow = vm.createInfoWindow(contentString);\n\t\t\t\tvm.addClickEventToMarker(marker, infoWindow, map);\n\t\t\t\tmap.setCenter(position);\n\t\t\t\tvm.$timeout(() => {\n\t\t\t\t\twindow.google.maps.event.addListenerOnce(map, 'idle', function () {\n\t\t\t\t\t\twindow.google.maps.event.trigger(map, 'resize');\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\n\t\tgetContentString(item) {\n\t\t\treturn '
' + item.name + '
';\n\t\t}\n\n\t\tcreateMarker(map, position) {\n\t\t\treturn new window.google.maps.Marker({\n\t\t\t\tposition: position,\n\t\t\t\tmap: map,\n\t\t\t\ticon: '/static/assets/img/pin.svg'\n\t\t\t});\n\t\t}\n\n\t\tcreateInfoWindow(contentString) {\n\t\t\treturn new window.google.maps.InfoWindow({\n\t\t\t\tcontent: contentString,\n\t\t\t\tmaxWidth: 400\n\t\t\t});\n\t\t}\n\n\t\taddClickEventToMarker(marker, infoWindow, map, lat, lng, $scope, item) {\n\t\t\tmarker.addListener('click', function () {\n\t\t\t\tif ($scope && item) {\n\t\t\t\t\t$scope.$timeout(() => {\n\t\t\t\t\t\t$scope.selectedItem = item;\n\t\t\t\t\t\t$scope.openModal($scope.selectedItem);\n\t\t\t\t\t\t$scope.initMap();\n\t\t\t\t\t}, 300);\n\t\t\t\t}\n\t\t\t\tif (infoWindow && map) {\n\t\t\t\t\tinfoWindow.open(map, marker);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tsetDirection(type) {\n\t\t\tif (type == 'office') {\n\t\t\t\twindow.open('https://www.google.com/maps/dir/?api=1&destination=' + this.selectedItem.lat + ',' + this.selectedItem.lng, '_blank');\n\t\t\t} else {\n\t\t\t\twindow.open('https://www.google.com/maps/dir/?api=1&destination=' + this.selectedItem.office.lat + ',' + this.selectedItem.office.lng, '_blank');\n\t\t\t}\n\t\t}\n\n\t\tclearMarkers(arr) {\n\t\t\tif (arr.length) {\n\t\t\t\tfor (let i = 0; i < arr.length; i++) {\n\t\t\t\t\tarr[i].setMap(null);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\topenModal(element) {\n\t\t\tthis.$mdDialog.show({\n\t\t\t\ttemplateUrl: element.type == 'person' ? 'oc-result-consultant-popup.html' : 'oc-result-office-popup.html',\n\t\t\t\tclickOutsideToClose: true,\n\t\t\t\tcontroller:()=>this,\n\t\t\t\tcontrollerAs: '$ctrl',\n\t\t\t\tonShowing: () => {\n\t\t\t\t\tthis.ngMap.getMap().then((map) => {\n\t\t\t\t\t\t// console.log(map);\n\t\t\t\t\t\tgoogle.maps.event.trigger(map, 'resize');\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tclose() {\n\t\t\tthis.$mdDialog.hide();\n\t\t}\n\n\t\t/**\n\t\t * Térképes nézet\n\t\t */\n\n\t\tsuccessSearchByMap($event) {\n\t\t\tthis.hitsList = $event.resultListByMap;\n\t\t\tthis.notificationService.showInfo({\n\t\t\t\tmessage: 'noOcResult'\n\t\t\t});\n\n\t\t\tthis.view = 'map';\n\t\t\tthis.initMapViewMap();\n\t\t}\n\n\t\tinitMapViewMap() {\n\t\t\tlet items = angular.copy(this.hitsList);\n\t\t\tlet vm = this;\n\t\t\tthis.ngMap.getMap('office-search-map').then((map) => {\n\t\t\t\tvm.clearMarkers(vm.markers);\n\t\t\t\tvm.markers = [];\n\t\t\t\tlet mapBounds = new window.google.maps.LatLngBounds();\n\t\t\t\tfor (let i = 0; i < items.length; i++) {\n\t\t\t\t\tlet item = items[i];\n\t\t\t\t\tlet lat = item.lat;\n\t\t\t\t\tlet lng = item.lng;\n\t\t\t\t\t// let contentString = vm.getContentString(item);\n\t\t\t\t\tlet position = new window.google.maps.LatLng(lat, lng);\n\t\t\t\t\tlet marker = vm.createMarker(map, position);\n\t\t\t\t\tvm.markers.push(marker);\n\t\t\t\t\tvm.addClickEventToMarker(marker, null, map, lat, lng, this, item);\n\t\t\t\t\tmapBounds.extend(position);\n\t\t\t\t}\n\t\t\t\twindow.google.maps.event.trigger(map, 'resize');\n\t\t\t\tmap.fitBounds(mapBounds);\n\t\t\t\tmap.setCenter(mapBounds.getCenter());\n\t\t\t});\n\t\t}\n\n\t\tbackToList() {\n\t\t\twindow.location.href = '/iroda-kereso';\n\t\t}\n\t},\n\ttransclude: true,\n\tcontrollerAs: 'irta'\n};\n","import './layout.pcss';\nimport angular from 'angular';\nimport 'angular-i18n/angular-locale_hu-hu';\nimport '../../common/common';\nimport '../../application/office-and-advisor-search-page-handler/office-and-advisor-search-page-handler.module';\n\nconst MODULE_NAME = 'AIRTA-app';\n\nexport default angular.module(MODULE_NAME, window.dependencies).name;\n\n\n"],"sourceRoot":""}