function myCallbackFunction(n){var i=n.url,r,t;if(n.url.indexOf("proxy.ashx?")>-1&&(i=n.url.split("proxy.ashx?")[1]),$sys.globals3.myUrlSendProxy)for(r=$sys.globals3.myUrlSendProxy.split(","),t=0;t<r.length;t++)i.indexOf(r[t])>-1&&(n.url=i.indexOf("?")>-1?n.url+"&guid="+guid():n.url+"?guid="+guid());return n}function guid(){function n(){return Math.floor((1+Math.random())*65536).toString(16).substring(1)}return n()+n()+"-"+n()+"-"+n()+"-"+n()+"-"+n()+n()+n()}var $esri={},start,App;require(["esri/toolbars/draw","esri/urlUtils","esri/SpatialReference","esri/geometry/Extent","esri/arcgis/utils","esri/map","esri/layers/GraphicsLayer","esri/layers/ImageParameters","esri/layers/ArcGISTiledMapServiceLayer","esri/layers/ArcGISDynamicMapServiceLayer","esri/request","esri/dijit/Scalebar","esri/toolbars/edit","esri/dijit/OverviewMap","esri/symbols/TextSymbol","esri/symbols/Font","esri/Color","esri/graphic","esri/dijit/LayerSwipe","esri/config","esri/geometry/Point","esri/geometry/Polyline","esri/geometry/Polygon","esri/InfoTemplate","esri/symbols/PictureMarkerSymbol","esri/symbols/SimpleLineSymbol","esri/symbols/SimpleFillSymbol","esri/symbols/SimpleMarkerSymbol","esri/tasks/QueryTask","esri/tasks/query","esri/tasks/BufferParameters","esri/tasks/GeometryService","esri/dijit/Legend","esri/tasks/IdentifyTask","esri/tasks/IdentifyParameters","esri/tasks/FindTask","esri/tasks/FindParameters","esri/dijit/OverviewMap","esri/geometry/Circle","esri/geometry/geometryEngine","esri/dijit/Print","esri/tasks/PrintTemplate","esri/tasks/Geoprocessor","esri/tasks/LegendLayer","esri/layers/FeatureLayer","esri/geometry/ScreenPoint","esri/dijit/editing/Editor","esri/dijit/editing/TemplatePicker","esri/dijit/ColorPicker","esri/undoManager","esri/dijit/editing/Add","esri/dijit/editing/Update","esri/dijit/editing/Delete","esri/dijit/AttributeInspector","esri/OperationBase","dojo/_base/declare","esri/Credential","esri/IdentityManager","esri/layers/TiledMapServiceLayer","esri/layers/TileInfo","esri/layers/WMTSLayer","esri/layers/WMTSLayerInfo","esri/layers/WMSLayer","esri/layers/WMSLayerInfo","esri/layers/MapImageLayer","esri/layers/MapImage","esri/layers/CSVLayer","esri/renderers/SimpleRenderer","esri/InfoTemplate","dojo/dom-construct","dijit/form/Button","esri/layers/FeatureEditResult","esri/dijit/Measurement","esri/units","dojo/domReady!"],function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w,b,k,d,g,nt,tt,it,rt,ut,ft,et,ot,st,ht,ct,lt,at,vt,yt,pt,wt,bt,kt,dt,gt,ni,ti,ii,ri,ui,fi,ei,oi,si,hi,ci,li,ai,vi,yi,pi,wi,bi,ki,di,gi,nr,tr,ir,rr,ur,it,fr,er,or,sr,hr){$esri.Draw=n;$esri.urlUtils=t;$esri.SpatialReference=i;$esri.Extent=r;$esri.arcgisUtils=u;$esri.Map=f;$esri.GraphicsLayer=e;$esri.ImageParameters=o;$esri.ArcGISTiledMapServiceLayer=s;$esri.ArcGISDynamicMapServiceLayer=h;$esri.esriRequest=c;$esri.Scalebar=l;$esri.Edit=a;$esri.Overview=v;$esri.TextSymbol=y;$esri.Font=p;$esri.Color=w;$esri.Graphic=b;$esri.LayerSwipe=k;$esri.esriConfig=d;$esri.Point=g;$esri.Polyline=nt;$esri.Polygon=tt;$esri.InfoTemplate=it;$esri.PictureMarkerSymbol=rt;$esri.SimpleLineSymbol=ut;$esri.SimpleFillSymbol=ft;$esri.SimpleMarkerSymbol=et;$esri.QueryTask=ot;$esri.Query=st;$esri.BufferParameters=ht;$esri.GeometryService=ct;$esri.Legend=lt;$esri.IdentifyTask=at;$esri.IdentifyParameters=vt;$esri.FindTask=yt;$esri.FindParameters=pt;$esri.OverviewMap=wt;$esri.Circle=bt;$esri.GeometryEngine=kt;$esri.Print=dt;$esri.PrintTemplate=gt;$esri.Geoprocessor=ni;$esri.LegendLayer=ti;$esri.FeatureLayer=ii;$esri.ScreenPoint=ri;$esri.Editor=ui;$esri.TemplatePicker=fi;$esri.ColorPicker=ei;$esri.UndoManager=oi;$esri.Add=si;$esri.Update=hi;$esri.Delete=ci;$esri.AttributeInspector=li;$esri.declare=vi;$esri.credential=yi;$esri.IdentityManager=pi;$esri.TiledMapServiceLayer=wi;$esri.TileInfo=bi;$esri.WMTSLayer=ki;$esri.WMTSLayerInfo=di;$esri.WMSLayer=gi;$esri.WMSLayerInfo=nr;$esri.MapImageLayer=tr;$esri.MapImage=ir;$esri.CSVLayer=rr;$esri.SimpleRenderer=ur;$esri.InfoTemplate=it;$esri.domConstruct=fr;$esri.Button=er;$esri.FeatureEditResult=or;start=0;$esri.Measurement=sr;$esri.Units=hr;$esri.esriRequest.setRequestPreCallback(myCallbackFunction);angular.element(document).scope().$root.$emit("mapready")});start=0,function(){var n=angular.module("app",["kendo.directives"])}(App||(App={})),function(n){var t;(function(t){var i=function(){function n(n,t){this.$scope=n;this.$http=t;this.init=function(){};this.init()}return n}();t.AdvancedToolboxCtrl=i;i.$inject=["$scope","$http"];angular.module("app").controller("advancedToolboxCtrl",n.Controller.AdvancedToolboxCtrl)})(t=n.Controller||(n.Controller={}))}(App||(App={})),function(n){var t;(function(t){var i=function(){function n(n,t){var i=this;this.$scope=n;this.$http=t;this.init=function(){i.$scope.isGsv=!1;i.$scope.showBookmarks=i.showBookmarks;i.$scope.clear=i.clear;i.$scope.fullExtent=i.fullExtent;i.$scope.changeToolExternalSystem=i.changeToolExternalSystem;i.$scope.changeToolOfek=i.changeToolOfek;i.$scope.changeToolGsv=i.changeToolGsv;i.$scope.geoLocate=i.geoLocate;i.$scope.showLegend=i.showLegend};this.changeToolGsv=function(){AnalyticsSetEvent("תפריט משני","google street view");$sys.tools.changeToolGsv()};this.changeToolOfek=function(){AnalyticsSetEvent("תפריט משני","צילום אלכסוני");$sys.tools.changeToolOfek()};this.changeToolExternalSystem=function(){AnalyticsSetEvent("תפריט משני","external system");$sys.tools.changeToolExternalSystem()};this.fullExtent=function(){$sys.gis3.zoomToCity()};this.clear=function(){$sys.functions3.clearAllGraphics();$sys.callsCrmc.distory()};this.showBookmarks=function(){AnalyticsSetEvent("תפריט משני","bookmarks");$sys.winBookmarks.show()};this.geoLocate=function(){$sys.gis3.geoLocate()};this.showLegend=function(){$sys.winLegend.show()};this.init()}return n}();t.ButtonsLeftCtrl=i;i.$inject=["$scope","$http"];angular.module("app").controller("buttonsLeftCtrl",n.Controller.ButtonsLeftCtrl)})(t=n.Controller||(n.Controller={}))}(App||(App={})),function(n){var t;(function(t){var i=function(){function n(n,t){var i=this;this.$scope=n;this.$http=t;this.init=function(){i.$scope.zoomIn=i.zoomIn;i.$scope.zoomOut=i.zoomOut;i.$scope.zoomPrev=i.zoomPrev;i.$scope.zoomNext=i.zoomNext};this.zoomIn=function(){$sys.globals3.myMap1.setExtent($sys.globals3.myMap1.extent.expand(.5))};this.zoomOut=function(){$sys.globals3.myMap1.setExtent($sys.globals3.myMap1.extent.expand(2))};this.zoomPrev=function(){if(!($sys.globals3.myZoomCurrentIndex<=0)){$sys.globals3.myZoomMode=-1;$sys.globals3.myZoomCurrentIndex--;var n=$sys.globals3.myZooms[$sys.globals3.myZoomCurrentIndex];$sys.globals3.myMap1.setExtent(n);$("#btnZoomPrev").blur()}};this.zoomNext=function(){var t=$sys.globals3.myZooms.length,n;$sys.globals3.myZoomCurrentIndex>=t-1||($sys.globals3.myZoomMode=1,$sys.globals3.myZoomCurrentIndex++,n=$sys.globals3.myZooms[$sys.globals3.myZoomCurrentIndex],$sys.globals3.myMap1.setExtent(n),$("#btnZoomNext").blur())};this.init()}return n}();t.ButtonsZoomCtrl=i;i.$inject=["$scope","$http"];angular.module("app").controller("buttonsZoomCtrl",n.Controller.ButtonsZoomCtrl)})(t=n.Controller||(n.Controller={}))}(App||(App={})),function(n){var t;(function(t){var i=function(){function n(n,t){var i=this;this.$scope=n;this.$http=t;this.init=function(){i.$scope.closeEdit=i.closeEdit;i.$scope.closeTaba=i.closeTaba;i.$scope.closeApplyEdit=i.closeApplyEdit;i.$scope.closeControlValves=i.closeControlValves;QS.loading!=1&&$sys.init.showLoadingScreen();i.$scope.$root.$on("mapready",function(){var n=400,t=350;$sys.firstGlobal.isMobileScreen&&(n=300,t=300);$("#dialog-form").dialog({closeOnEscape:!1,open:function(n,t){$(".ui-dialog-titlebar-close",t.dialog|t).hide()},autoOpen:!1,height:n,width:t,modal:!0,buttons:{"התחבר":i.login}});$("#dialog-form").find("form").on("submit",function(n){n.preventDefault();i.login()});i.$http.get(urls.home.isLogedIn).then(function(n){n.data.value?i.getMap():$("#dialog-form").dialog("open")})})};this.closeEdit=function(){if($("#myDivEditLayer").css("display")=="block"){$sys.tools.resetToolsAndCloseWindows();return}$sys.tools.resetToolsAndCloseWindows();$("#myDivEditLayer").css("display","block");$sys.divEditLayer.show()};this.closeApplyEdit=function(){if($("#myDivApplyEdits").css("display")=="block"){$sys.tools.resetToolsAndCloseWindows();return}$sys.tools.resetToolsAndCloseWindows();$("#myDivApplyEdits").css("display","block");$sys.divApplyEdit.show()};this.closeControlValves=function(){if($("#outerDivControlValves").css("display")=="block"){$sys.tools.resetToolsAndCloseWindows();return}$sys.tools.resetToolsAndCloseWindows();$("#outerDivControlValves").css("display","block");$sys.WaterLines.openTool()};this.closeTaba=function(){if($("#myDivTaba").css("display")=="block"){$sys.tools.resetToolsAndCloseWindows();return}$sys.tools.resetToolsAndCloseWindows();$("#divTaba").css("display","block");$sys.divTaba.show()};this.login=function(){if($("#name").val()!=null&&$("#name").val()!=""&&$("#password").val()!=null&&$("#password").val()!=""){var n={UserName:$("#name").val(),Password:$("#password").val()};i.$http.post(urls.home.login,{login:n}).then(function(n){if(n.data.value){var t=$("#name").val();i.$scope.userName=t;$("#error").val("");i.getMap();$("#dialog-form").dialog("close")}else ALERTERROR("שגיאה בפרטי המשתמש")})}};this.getMap=function(){i.$http.get(urls.data.getMap).then(function(n){var r=window.location.href.substr(window.location.href.lastIndexOf("/")+1),u,s,f,h,e,o,t,c,l;if(r.indexOf("?")>-1&&(r=r.substring(0,r.indexOf("?"))),r!=LSGET("cityCode","-1"))try{localStorage.clear();LSSET("cityCode",r)}catch(a){console.log("Error.message = "+a.message)}if($sys.globals3.muniNameHeb=n.data.value.name,$sys.globals3.isBackgroundAS=n.data.value.arcGisServer,$sys.globals3.myOrthoYears=[],$sys.globals3.baseMapNames=[],$sys.globals3.baseMapNamesHeb=[],$sys.globals3.orthoNamesHeb=[],$sys.globals3.site=n.data.value.site,$sys.globals3.myLng="heb",$sys.globals3.myLocation="internet",$sys.globals3.report=n.data.value.report,$sys.globals3.myXmin=n.data.value.xmin,$sys.globals3.myYmin=n.data.value.ymin,$sys.globals3.myXmax=n.data.value.xmax,$sys.globals3.myYmax=n.data.value.ymax,$sys.globals3.mySrWkid=2039,$sys.globals3.myUrlIView2MapHebTemplate=n.data.value.baseMapUrl,$sys.globals3.myUrlPrint=n.data.value.printUrl,$sys.globals3.obliquePhotographyUrl=n.data.value.obliquePhotographyUrl,$sys.globals3.spatialReferenceId=n.data.value.spatialReferenceId,$sys.globals3.externalSystem=n.data.value.externalSystem,$sys.globals3.externalSpatialReferenceId=n.data.value.externalSpatialReferenceId,$sys.globals3.myUrlAttachments=n.data.value.urlAttachments,$sys.globals3.myUrlGeometryService=n.data.value.geometryServiceUrl,$sys.globals3.myProxyUrl=n.data.value.proxyUrl,$sys.globals3.isProxy=n.data.value.isProxy,$sys.globals3.myUrlSendProxy=n.data.value.urlSendProxy,$sys.globals3.isFillOpacity=n.data.value.isFillOpacity,$sys.globals3.myLinks=n.data.value.links,$sys.globals3.dwgService=n.data.value.dwgService,$sys.globals3.valvesLayerService=n.data.value.valvesLayerService,$sys.globals3.valvesToolBase=n.data.value.valvesToolBase,$sys.globals3.isBackgroundAS){for(u=n.data.value.orthoYears.split(","),t=0;t<u.length;t++)$sys.globals3.myOrthoYears[t]=u[t].trim();for(s=$sys.globals3.myOrthoYears[$sys.globals3.myOrthoYears.length-1],$sys.globals3.myOrthoYear=s,f=n.data.value.orthoNamesHeb==null||n.data.value.orthoNamesHeb==""?n.data.value.orthoYears.split(","):n.data.value.orthoNamesHeb.split(","),t=0;t<f.length;t++)$sys.globals3.orthoNamesHeb[t]=f[t].trim();for(n.data.value.orthoNamesHeb==null||n.data.value.orthoNamesHeb==""?$sys.globals3.myOrthoYears[$sys.globals3.myOrthoYears.length-1]:h=$sys.globals3.orthoNamesHeb[$sys.globals3.orthoNamesHeb.length-1],$sys.globals3.orthoNameHeb=h,e=n.data.value.baseMapNames.split(","),t=0;t<e.length;t++)$sys.globals3.baseMapNames[t]=e[t];for(o=n.data.value.baseMapNamesHeb.split(","),t=0;t<o.length;t++)$sys.globals3.baseMapNamesHeb[t]=o[t];c=$sys.globals3.baseMapNames[$sys.globals3.baseMapNames.length-1];$sys.globals3.baseMapName=c;l=$sys.globals3.baseMapNamesHeb[$sys.globals3.baseMapNamesHeb.length-1];$sys.globals3.baseMapNameHeb=l}$sys.globals3.defaultLayer=n.data.value.defaultLayer.split(",");$sys.globals3.emailLog=n.data.value.emailLog;$sys.globals3.myUrlIView2RekaHeb=n.data.value.hybridUrl;$sys.globals3.myOrthoTemplate=n.data.value.orthoUrl;$sys.globals3.myUrlIView2=n.data.value.layerUrl1;$sys.globals3.myUrlIViewRest1=n.data.value.layerUrl2;$sys.globals3.myUrlIViewRest2=n.data.value.layerUrl3;$sys.globals3.myUrlIViewRest3=n.data.value.layerUrl4;$sys.globals3.myUrlIViewRest4=n.data.value.layerUrl5;console.log($sys.globals3.myUrlIViewRest4);$sys.globals3.myUrlIViewRest5=n.data.value.wmsUrl2;$sys.globals3.myUrlIViewRest6=n.data.value.wmsUrl3;$sys.globals3.myUrlIViewRest7=n.data.value.wmsUrl4;$sys.globals3.myUrlIViewRest8=n.data.value.wmsUrl5;$sys.globals3.tabaUrl=n.data.value.tabaUrl;$sys.globals3.editLayerUrl=n.data.value.editLayerUrl;$sys.globals3.myDynamicOpacity=.9;$sys.functions3.loadPrototypes();$sys.globals3.editLayers=n.data.value.editLayers;$sys.globals3.addressTable={k_rechov:n.data.value.populationRegistry.strCode,t_rechov:"STR_NAME",city_code:n.data.value.populationRegistry.cityCode,ms_bayit:n.data.value.populationRegistry.bldNum,knisa:"ENTRY_LETR"};$sys.globals3.dtmToolsTable={BLDG_Layer:n.data.value.dtmTools.buildingsDescriptionCode,UNIQ_ID:n.data.value.dtmTools.uniqIdField,BLDG_HT:n.data.value.dtmTools.buildingsHeightField};$sys.globals3.tabaCode=n.data.value.tabaCode;$sys.globals3.PopulationRegistryLayerId=n.data.value.populationRegistry.layerId;$sys.globals3.myVersion=n.data.value.versionNum;i.loadDictionary();i.getLayers()})};this.getBackgroundMapGS=function(){i.$http.get(urls.data.getBackgroundMapGS).then(function(n){$sys.globals3.GsMeta.image=[];$sys.globals3.GsMeta.hybrid="";$sys.globals3.GsMeta.map=[];for(var t=0;t<n.data.value.length;t++)switch(n.data.value[t].backgroundType){case"image":$sys.globals3.GsMeta.image.push(n.data.value[t]);$sys.globals3.myOrthoYears.push(n.data.value[t].name);$sys.globals3.orthoNamesHeb.push(n.data.value[t].name);break;case"hybrid":$sys.globals3.GsMeta.hybrid=n.data.value[t];$sys.globals3.myUrlIView2RekaHeb=n.data.value[t].name;break;case"overview":$sys.globals3.GsMeta.overview=n.data.value[t];break;default:$sys.globals3.GsMeta.map.push(n.data.value[t]);$sys.globals3.baseMapNames.push(n.data.value[t].name);$sys.globals3.baseMapNamesHeb.push(n.data.value[t].hebrewName);$sys.globals3.baseMapName=$sys.globals3.baseMapNames[$sys.globals3.baseMapNames-1];$sys.globals3.baseMapNameHeb=$sys.globals3.baseMapNamesHeb[$sys.globals3.baseMapNamesHeb-1]}i.loadDescriptions()})};this.getLayers=function(){i.$http.get(urls.data.getJson).then(function(n){i.loadLods();$sys.firstGlobal.isMobileScreen||i.loadFastInfo();i.loadMessages();$sys.globals3.isBackgroundAS?i.loadDescriptions():i.getBackgroundMapGS();$sys.firstGlobal.isMobileScreen||i.loadDtm();i.loadSearch();$sys.globals3.myMetadata=n.data.value;$sys.firstGlobal.isMobileScreen||QS.crmc==undefined||(i.loadCallsCrmc(),i.loadFocusCrmc());$sys.firstGlobal.isMobileScreen||i.loadExternalFocusingSystems()})};this.loadDictionary=function(){try{i.$http.get(urls.data.getDictionary).then(function(n){$sys.globals3.myDictionary=JSON.parse(n.data.value)},function(n){$sys.init.requestFailed(n)})}catch(n){$sys.functions3.catchErr("",n)}};this.loadDescriptions=function(){try{i.$http.get(urls.data.getDescription).then(function(n){$sys.init.requestSucceeded(n.data.value)},function(n){$sys.init.requestFailed(n)})}catch(n){$sys.functions3.catchErr("",n)}};this.loadFastInfo=function(){try{i.$http.get(urls.data.getFastInfo).then(function(n){$sys.globals3.fastInfo=n.data.value},function(){})}catch(n){$sys.functions3.catchErr("",n)}};this.loadMessages=function(){try{i.$http.get(urls.data.getMessage).then(function(n){$sys.globals3.messages=n.data.value},function(){})}catch(n){$sys.functions3.catchErr("",n)}};this.loadDtm=function(){$sys.dtm.loadDtm()};this.loadSearch=function(){try{i.$http.get(urls.data.getSearchs).then(function(n){$sys.globals3.searchs=n.data.value},function(){})}catch(n){$sys.functions3.catchErr("",n)}};this.loadCallsCrmc=function(){try{i.$http.get(urls.data.getCallsCrmc+"?SessionId="+QS.crmc).then(function(n){$sys.globals3.callsCrmc=n.data.value},function(){})}catch(n){$sys.functions3.catchErr("",n)}};this.loadFocusCrmc=function(){try{i.$http.get(urls.data.getFocus).then(function(n){$sys.globals3.focusCrmc=n.data.value},function(){})}catch(n){$sys.functions3.catchErr("",n)}};this.loadLods=function(){try{i.$http.get(urls.data.getDynamicLods).then(function(n){n!=null&&($sys.globals3.dynamicLods=n.data.value)},function(){})}catch(n){$sys.functions3.catchErr("",n)}};this.loadExternalFocusingSystems=function(){try{i.$http.get(urls.data.getExternalFocusingSystems).then(function(n){$sys.globals3.getExternalFocusingSystems=n.data.value},function(){})}catch(n){$sys.functions3.catchErr("",n)}};this.init()}return n}();t.MapView=i;i.$inject=["$scope","$http"];angular.module("app").controller("mapViewCtrl",n.Controller.MapView)})(t=n.Controller||(n.Controller={}))}(App||(App={})),function(n){var t;(function(t){var i=function(){function n(n,t){var i=this;this.$scope=n;this.$http=t;this.init=function(){var t,n,r;i.$scope.flag=!1;i.$scope.sumPopulation=0;t=$("#smsList").val();n=sessionStorage.getItem("selectedReport");t||(t=0);n=="6"?i.$scope.result=sessionStorage.getItem("siata"):(r={val:n,data:JSON.parse(sessionStorage.getItem("mySelection")),msg:t},i.$http({method:"POST",url:urls.data.populationReport,data:r}).then(function(t){if(t){if(i.$scope.result=t.data.value,n=="1")$.each(i.$scope.result,function(n,t){i.$scope.sumPopulation+=t.length});else n=="4"?(i.$scope.sumSelected=i.$scope.result.between0And5+i.$scope.result.between6And12+i.$scope.result.between13And17+i.$scope.result.between18And21+i.$scope.result.between22And40+i.$scope.result.between41And60+i.$scope.result.between61And120,i.$scope.sum=i.$scope.result.quantityBetween0And5+i.$scope.result.quantityBetween6And12+i.$scope.result.quantityBetween13And17+i.$scope.result.quantityBetween18And21+i.$scope.result.quantityBetween22And40+i.$scope.result.quantityBetween41And60+i.$scope.result.quantityBetween61And120):n=="3"&&($.each(i.$scope.result,function(n,t){i.$scope.sumPopulation+=t.count}),console.log(i.$scope.result));$("#imgPopulationLoader2").css("display","none");i.$scope.flag=!0}else ALERTERROR("error in Population Report"),$("#imgPopulationLoader2").css("display","none")}))};this.init()}return n}();t.ReportCtrl=i;i.$inject=["$scope","$http"];angular.module("app").controller("reportCtrl",n.Controller.ReportCtrl)})(t=n.Controller||(n.Controller={}))}(App||(App={})),function(n){var t;(function(t){var i=function(){function n(n,t){var i=this;this.$scope=n;this.$http=t;this.init=function(){i.$scope.showSettings=i.showSettings};this.showSettings=function(){$sys.settings.start()};this.init()}return n}();t.SettingsCtrl=i;i.$inject=["$scope","$http"];angular.module("app").controller("settingsCtrl",n.Controller.SettingsCtrl)})(t=n.Controller||(n.Controller={}))}(App||(App={})),function(n){var t;(function(t){var i=function(){function n(n,t){var i=this;this.$scope=n;this.$http=t;this.init=function(){i.closeWindow();i.$scope.symbolType="";i.$scope.outline=!1;i.$scope.isBackground=!1;i.$scope.freeText=!1;i.$scope.symbol={angle:0,color:"#000000",font:{decoration:"ללא",size:13.33,style:"רגיל",weight:"רגיל"},outlineStyle:{color:"#000000",style:"מלא",width:1.33},size:16,style:"מלא",text:"",width:1.33};i.$scope.styleLine=i.styleLineHeb;i.$scope.styleText=i.styleTextHeb;i.$scope.weightText=i.weightTextHeb;i.$scope.decorationText=i.decorationTextHeb;i.$scope.freeDraw=i.freeDraw;i.$scope.showAdvSearch=i.showAdvSearch;i.$scope.showAdvancedTools=i.showAdvancedTools;i.$scope.showDivLocate=i.showDivLocate;i.$scope.showDivToc=i.showDivToc;i.$scope.addFreeText=i.addFreeText;i.$scope.changeToolPaint=i.changeToolPaint;i.$scope.showSelect=i.showSelect;i.$scope.showBackground=i.showBackground;i.$scope.showDivMore=i.showDivMore;i.$scope.showIdentify=i.showIdentify;i.$scope.showPrint=i.showPrint;i.$scope.showMeasure=i.showMeasure;i.$scope.showExternalLook=i.showExternalLook;i.$scope.changeToolOfek=i.changeToolOfek;i.$scope.changeToolExternalFocusingSystems1=i.changeToolExternalFocusingSystems1;i.$scope.changeToolExternalFocusingSystems2=i.changeToolExternalFocusingSystems2;i.$scope.changeToolExternalFocusingSystems3=i.changeToolExternalFocusingSystems3;i.$scope.changeToolExternalFocusingSystems4=i.changeToolExternalFocusingSystems4;i.$scope.changeToolExternalSystem=i.changeToolExternalSystem;i.$scope.changeToolGsv=i.changeToolGsv;i.$scope.$watch("symbol",i.setSymbol,!0);i.$scope.changeGsvCss=i.changeGsvCss;i.$scope.changeOfekCss=i.changeOfekCss;i.$scope.changeExternalFocusingSystems1Css=i.changeExternalFocusingSystems1Css;i.$scope.changeExternalFocusingSystems2Css=i.changeExternalFocusingSystems2Css;i.$scope.changeExternalFocusingSystems3Css=i.changeExternalFocusingSystems3Css;i.$scope.changeExternalFocusingSystems4Css=i.changeExternalFocusingSystems4Css;i.$scope.changeExternalSystemCss=i.changeExternalSystemCss;i.$scope.changeExternalLookCss=i.changeExternalLookCss;i.$scope.changePrintCss=i.changePrintCss;i.$scope.changeSelectCss=i.changeSelectCss;i.$scope.changeMeasureCss=i.changeMeasureCss;i.$scope.changeBackgroundCss=i.changeBackgroundCss;i.$scope.changeAdvancedToolsCss=i.changeAdvancedToolsCss;i.$scope.changeIdentifyCss=i.changeIdentifyCss;i.$scope.changeFreeDrawCss=i.changeFreeDrawCss;i.$scope.changeMoreCss=i.changeMoreCss;i.$scope.clearSearch=i.clearSearch;i.$scope.$root.$on("closeUpperMenus",function(){i.closeWindow()});i.$scope.changeTocCss=i.changeTocCss;i.$scope.showDivFastInfo=i.showDivFastInfo;i.$scope.showDivPanelToc=i.showDivPanelToc};this.clickExternalLook=!1;this.clickAdvancedTools=!1;this.clickSelect=!1;this.clickPrint=!1;this.clickMeasure=!1;this.clickMore=!1;this.clickBackground=!1;this.clickToc=!1;this.clickIdentify=!1;this.styleFillHeb=["קוים עולים","רשת","רשת אלכסונית","קוים יורדים","קוים אופקיים","ריק","מלא","קוים אנכיים"];this.stylePointHeb=["עיגול","פלוס","יהלום","ריבוע","היקס"];this.styleLineHeb=["קו","קו נקודה","קו נקודה נקודה","נקודה","ארוך","ארוך נקודה","קצר","קצר נקודה","קצר נקודה נקודה","נקודות צפופות","מלא"];this.styleTextHeb=["רגיל","נטוי","אובליק"];this.weightTextHeb=["רגיל","מודגש"];this.decorationTextHeb=["קו תחתון","קו באמצע","ללא"];this.closeWindow=function(){i.clickAdvancedTools=!1;i.clickSelect=!1;i.clickPrint=!1;i.clickMeasure=!1;i.clickMore=!1;i.clickBackground=!1;i.clickExternalLook=!1;i.clickIdentify=!1;i.clickToc=!1;i.$scope.imgGsvsrc="./Content/site/images/TestIcons/street view.png";i.$scope.imgOfeksrc="./Content/site/images/TestIcons/camera.png";i.$scope.imgExternalFocusingSystems1src="./Content/site/images/TestIcons/camera.png";i.$scope.imgExternalFocusingSystems2src="./Content/site/images/TestIcons/camera.png";i.$scope.imgExternalFocusingSystems3src="./Content/site/images/TestIcons/camera.png";i.$scope.imgExternalFocusingSystems4src="./Content/site/images/TestIcons/camera.png";i.$scope.imgExternalSystemsrc="./Content/site/images/TestIcons/focus blue@1.5x.svg";i.$scope.imgPrintsrc="./Content/site/images/TestIcons/printBlue@1.5x.svg";i.$scope.imgSelectsrc="./Content/site/images/TestIcons/select tool copy@1.5x.svg";i.$scope.imgMeasuresrc="./Content/site/images/TestIcons/measure tool blue@1.5x.svg";i.$scope.imgBackgroundsrc="./Content/site/images/TestIcons/map@1.5x.svg";i.$scope.imgAdvancedToolsrc="./Content/site/images/TestIcons/pro tools blue@1.5x.svg";i.$scope.imgExternalLooksrc="./Content/site/images/TestIcons/focus blue@1.5x.svg";i.$scope.imgTocsrc="./Content/site/images/TestIcons/layers@1.5x.svg";i.$scope.imgIdentifysrc="./Content/site/images/TestIcons/nav info copy@1.5x.svg";i.$scope.imgFreeDrawsrc="./Content/site/images/TestIcons/paint tool.png";i.$scope.imgMoresrc="./Content/site/images/TestIcons/paint tool.png";i.$scope.moreClass="select-control";i.$scope.identifyClass="select-control";i.$scope.gsvClass="advanceOval";i.$scope.gsvSpan="advancedSpan";i.$scope.ofekSpan="advancedSpan";i.$scope.externalFocusingSystems1Span="advancedSpan";i.$scope.externalFocusingSystems2Span="advancedSpan";i.$scope.externalFocusingSystems3Span="advancedSpan";i.$scope.externalFocusingSystems4Span="advancedSpan";i.$scope.ofekClass="advanceOval";i.$scope.externalFocusingSystems1Class="advanceOval";i.$scope.externalFocusingSystems2Class="advanceOval";i.$scope.externalFocusingSystems3Class="advanceOval";i.$scope.externalFocusingSystems4Class="advanceOval";i.$scope.externalSystemSpan="advancedSpan";i.$scope.externalSystemClass="advanceOval";i.$scope.externalLookClass="advancedTool-control";i.$scope.advancedToolClass="advancedTool-control";i.$scope.printClass="print-control";i.$scope.selectClass="select-control";i.$scope.measureClass="measure-control";i.$scope.backgroundClass="background-control";i.$scope.tocClass="toc-control";i.$scope.freeDrawClass="advanceOval";i.$scope.freeDrawSpan="advancedSpan"};this.clearSearch=function(){$("#txtFreeSearch").val("");$sys.globals3.myFreeSearchResultExist="0"};this.setSymbol=function(n){n.outlineStyle.width||(n.outlineStyle.width=1.33);$sys.tools.updateSymbol(n)};this.showAdvSearch=function(){$sys.winSelectByAttributes.show()};this.showAdvancedTools=function(){$sys.divAdvancedTools.show();i.clickAdvancedTools?(i.clickAdvancedTools=!1,i.changeAdvancedToolsCss(!1)):(i.clickAdvancedTools=!0,i.changeAdvancedToolsCss(!0))};this.showDivMore=function(){$("#myDivMore").css("display")=="block"?$("#myDivMore").css("display","none"):($sys.tools.resetToolsAndCloseWindows(),$("#myDivMore").css("display","block"));i.clickMore?(i.clickMore=!1,i.changeMoreCss(!1)):(i.clickMore=!0,i.changeMoreCss(!0))};this.showDivLocate=function(n,t){$sys.divLocate.show(n,t)};this.showDivToc=function(){$sys.divToc.show(!0);i.clickToc?(i.clickToc=!1,i.changeTocCss(!1)):(i.clickToc=!0,i.changeTocCss(!0),$("#panelToc").css("display","block"),$("#tocFastInfoArrow").css("margin-left","-160px"),$("#myDivFastInfo").css("display","none"))};this.freeDraw=function(){$sys.divDrawTools.show()};this.changeToolGsv=function(){$sys.tools.changeToolGsv()};this.changeToolOfek=function(){$sys.tools.changeToolOfek()};this.changeToolExternalFocusingSystems1=function(){$sys.tools.changeToolExternalFocusingSystems1()};this.changeToolExternalFocusingSystems2=function(){$sys.tools.changeToolExternalFocusingSystems2()};this.changeToolExternalFocusingSystems3=function(){$sys.tools.changeToolExternalFocusingSystems3()};this.changeToolExternalFocusingSystems4=function(){$sys.tools.changeToolExternalFocusingSystems4()};this.changeToolExternalSystem=function(){$sys.tools.changeToolExternalSystem()};this.changeToolPaint=function(n,t){i.$scope.symbol||(i.$scope.symbol={angle:0,color:"#ff00ff",font:{decoration:"ללא",size:13.33,style:"רגיל",weight:"רגיל"},outlineStyle:{color:"#37ff00",style:"מלא",width:1.33},size:16,style:"מלא",text:"",width:1.33});$("#divFreeDraw").css("display","block");i.$scope.symbolType=t;switch(t){case"point":$sys.globals3.wasPoint=!0;i.$scope.styleList=i.stylePointHeb;i.$scope.symbol||(i.$scope.symbol.color="#FFFFFF",i.$scope.symbol.outlineStyle.width=1.33);i.$scope.symbol.style="עיגול";$sys.tools.updateAddPoint();break;case"line":i.$scope.styleList=i.styleLineHeb;default:i.$scope.styleList=i.styleFillHeb;$sys.globals3.wasPoint?(i.$scope.symbol.style=$sys.globals3.mySymbol?$sys.globals3.mySymbol.style:"SOLID",$sys.globals3.wasPoint=!1):$sys.globals3.mySymbol=angular.copy(i.$scope.symbol)}$sys.globals3.myTool="paint"+n.toLowerCase();$sys.globals3.myDrawToolbar.activate($esri.Draw[n.toUpperCase().replace(/ /g,"_")]);$sys.globals3.myMap1.setMapCursor("url(./Content/site/images/Cursors/x.red.cur),auto")};this.addFreeText=function(){$("#divFreeDraw").css("display","block");i.$scope.symbol={angle:0,color:"#000000",font:{decoration:"ללא",size:13.33,style:"רגיל",weight:"רגיל"},outlineStyle:{color:"#000000",style:"מלא",width:1.33},size:16,style:"מלא",text:"",width:1.33};i.$scope.symbolType="text";$sys.tools.changeToolText()};this.showSelect=function(){$sys.divSelectByLocation.show();i.clickSelect?(i.clickSelect=!1,i.changeSelectCss(!1)):(i.clickSelect=!0,i.changeSelectCss(!0))};this.showMeasure=function(){$sys.divMeasure.show();i.clickMeasure?(i.clickMeasure=!1,i.changeMeasureCss(!1)):(i.clickMeasure=!0,i.changeMeasureCss(!0))};this.showIdentify=function(){AnalyticsSetEvent("תפריט ראשי","כלי זיהוי");$sys.tools.resetToolsAndCloseWindows();$sys.tools.changeToolIdentifyPlusForm();i.clickIdentify?(i.clickIdentify=!1,i.changeIdentifyCss(!1)):(i.clickIdentify=!0,i.changeIdentifyCss(!0))};this.showPrint=function(){$sys.divPrintAndShare.show()};this.showBackground=function(){$sys.divBackground.show(!0);$sys.settings!==undefined&&$sys.settings.start();i.clickBackground?(i.clickBackground=!1,i.changeBackgroundCss(!1)):(i.clickBackground=!0,i.changeBackgroundCss(!0))};this.showExternalLook=function(){$("#myDivExternalLook").css("display")=="block"?$("#myDivExternalLook").css("display","none"):($sys.tools.resetToolsAndCloseWindows(),$("#myDivExternalLook").css("display","block"));i.clickExternalLook?(i.clickExternalLook=!1,i.changeExternalLookCss(!1)):(i.clickExternalLook=!0,i.changeExternalLookCss(!0))};this.changeIdentifyCss=function(n){n?(i.$scope.identifyClass="select-control-active",i.$scope.imgIdentifysrc="./Content/site/images/TestIcons/nav info white@1.5x.svg"):i.clickIdentify||(i.$scope.identifyClass="select-control",i.$scope.imgIdentifysrc="./Content/site/images/TestIcons/nav info copy@1.5x.svg")};this.changeSelectCss=function(n){n?(i.$scope.selectClass="select-control-active",i.$scope.imgSelectsrc="./Content/site/images/TestIcons/select tool white@1.5x.svg"):i.clickSelect||(i.$scope.selectClass="select-control",i.$scope.imgSelectsrc="./Content/site/images/TestIcons/select tool copy@1.5x.svg")};this.changePrintCss=function(n){n?(i.$scope.printClass="print-control-active",i.$scope.imgPrintsrc="./Content/site/images/TestIcons/printHover@1.5x.svg"):i.clickPrint||(i.$scope.printClass="print-control",i.$scope.imgPrintsrc="./Content/site/images/TestIcons/printBlue@1.5x.svg")};this.changeMoreCss=function(n){n?(i.$scope.moreClass="measure-control-active",i.$scope.imgMoresrc="./Content/site/images/TestIcons/measure tool white@1.5x.svg"):i.clickMore||(i.$scope.moreClass="measure-control",i.$scope.imgMoresrc="./Content/site/images/TestIcons/measure tool blue@1.5x.svg")};this.changeMeasureCss=function(n){n?(i.$scope.measureClass="measure-control-active",i.$scope.imgMeasuresrc="./Content/site/images/TestIcons/measure tool white@1.5x.svg"):i.clickMeasure||(i.$scope.measureClass="measure-control",i.$scope.imgMeasuresrc="./Content/site/images/TestIcons/measure tool blue@1.5x.svg")};this.changeBackgroundCss=function(n){n?(i.$scope.backgroundClass="background-control-active",i.$scope.imgBackgroundsrc="./Content/site/images/TestIcons/map white@1.5x.svg"):i.clickBackground||(i.$scope.backgroundClass="background-control",i.$scope.imgBackgroundsrc="./Content/site/images/TestIcons/map@1.5x.svg")};this.changeAdvancedToolsCss=function(n){n?(i.$scope.advancedToolClass="select-control-active",i.$scope.imgAdvancedToolsrc="./Content/site/images/TestIcons/pro tools white@1.5x.svg"):i.clickAdvancedTools||(i.$scope.advancedToolClass="select-control",i.$scope.imgAdvancedToolsrc="./Content/site/images/TestIcons/pro tools blue@1.5x.svg")};this.changeExternalLookCss=function(n){n?(i.$scope.externalLookClass="select-control-active",i.$scope.imgExternalLooksrc="./Content/site/images/TestIcons/focus white.png"):i.clickExternalLook||(i.$scope.externalLookClass="select-control",i.$scope.imgExternalLooksrc="./Content/site/images/TestIcons/focus blue@1.5x.svg")};this.changeOfekCss=function(n){n?(i.$scope.ofekClass="advanceOvalHover",i.$scope.imgOfeksrc="./Content/site/images/TestIcons/camera hover.png",i.$scope.ofekSpan="advancedSpanHover"):(i.$scope.ofekClass="advanceOval",i.$scope.imgOfeksrc="./Content/site/images/TestIcons/camera.png",i.$scope.ofekSpan="advancedSpan")};this.changeExternalFocusingSystems1Css=function(n){n?(i.$scope.externalFocusingSystems1Class="advanceOvalHover",i.$scope.imgExternalFocusingSystems1src="./Content/site/images/TestIcons/camera hover.png",i.$scope.externalFocusingSystems1Span="advancedSpanHover"):(i.$scope.externalFocusingSystems1Class="advanceOval",i.$scope.imgExternalFocusingSystems1src="./Content/site/images/TestIcons/camera.png",i.$scope.externalFocusingSystems1Span="advancedSpan")};this.changeExternalFocusingSystems2Css=function(n){n?(i.$scope.externalFocusingSystems2Class="advanceOvalHover",i.$scope.imgExternalFocusingSystems2src="./Content/site/images/TestIcons/camera hover.png",i.$scope.externalFocusingSystems2Span="advancedSpanHover"):(i.$scope.externalFocusingSystems2Class="advanceOval",i.$scope.imgExternalFocusingSystems2src="./Content/site/images/TestIcons/camera.png",i.$scope.externalFocusingSystems2Span="advancedSpan")};this.changeExternalFocusingSystems3Css=function(n){n?(i.$scope.externalFocusingSystems3Class="advanceOvalHover",i.$scope.imgExternalFocusingSystems3src="./Content/site/images/TestIcons/camera hover.png",i.$scope.externalFocusingSystems3Span="advancedSpanHover"):(i.$scope.externalFocusingSystems3Class="advanceOval",i.$scope.imgExternalFocusingSystems3src="./Content/site/images/TestIcons/camera.png",i.$scope.externalFocusingSystems3Span="advancedSpan")};this.changeExternalFocusingSystems4Css=function(n){n?(i.$scope.externalFocusingSystems4Class="advanceOvalHover",i.$scope.imgExternalFocusingSystems4src="./Content/site/images/TestIcons/camera hover.png",i.$scope.externalFocusingSystems4Span="advancedSpanHover"):(i.$scope.externalFocusingSystems4Class="advanceOval",i.$scope.imgExternalFocusingSystems4src="./Content/site/images/TestIcons/camera.png",i.$scope.externalFocusingSystems4Span="advancedSpan")};this.changeExternalSystemCss=function(n){n?(i.$scope.externalSystemClass="advanceOvalHover",i.$scope.imgExternalSystemsrc="./Content/site/images/TestIcons/focus blue@1.5x.svg",i.$scope.externalSystemSpan="advancedSpanHover"):(i.$scope.externalSystemClass="advanceOval",i.$scope.imgExternalSystemrc="./Content/site/images/TestIcons/focus blue@1.5x.svg",i.$scope.externalSystemSpan="advancedSpan")};this.changeGsvCss=function(n){n?(i.$scope.gsvClass="advanceOvalHover",i.$scope.imgGsvsrc="./Content/site/images/TestIcons/street view hover.png",i.$scope.gsvSpan="advancedSpanHover"):(i.$scope.gsvClass="advanceOval",i.$scope.imgGsvsrc="./Content/site/images/TestIcons/street view.png",i.$scope.gsvSpan="advancedSpan")};this.changeFreeDrawCss=function(n){n?(i.$scope.freeDrawClass="advanceOvalHover",i.$scope.freeDrawSpan="advancedSpanHover",i.$scope.imgFreeDrawsrc="./Content/site/images/TestIcons/paint tool hover@1.5x.svg"):i.clickMeasure||(i.$scope.freeDrawClass="advanceOval",i.$scope.freeDrawSpan="advancedSpan",i.$scope.imgFreeDrawsrc="./Content/site/images/TestIcons/paint tool.png")};this.changeTocCss=function(n){n?(i.$scope.tocClass="toc-control-active",i.$scope.imgTocsrc="./Content/site/images/TestIcons/layers white@1.5x.svg"):i.clickToc||(i.$scope.tocClass="toc-control",i.$scope.imgTocsrc="./Content/site/images/TestIcons/layers@1.5x.svg")};this.showDivFastInfo=function(){$sys.divFastInfo.show();$("#myDivFastInfo").css("display","block");$("#tocFastInfoArrow").css("margin-left","160px");$("#panelToc").css("display","none")};this.showDivPanelToc=function(){$("#panelToc").css("display","block");$("#tocFastInfoArrow").css("margin-left","-160px");$("#myDivFastInfo").css("display","none")};this.init()}return n}();t.ToolboxCtrl=i;i.$inject=["$scope","$http"];angular.module("app").controller("toolboxCtrl",n.Controller.ToolboxCtrl)})(t=n.Controller||(n.Controller={}))}(App||(App={}))