// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See http://js.arcgis.com/3.23/esri/copyright.txt for details.
//>>built
define("esri/tasks/ClosestFacilitySolveResult","dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/has ../kernel ../graphic ../SpatialReference ./DirectionsFeatureSet ./NAMessage".split(" "),function(b,g,c,h,k,l,m,n,p){b=b(null,{declaredClass:"esri.tasks.ClosestFacilitySolveResult",constructor:function(a){a.directions&&(this.directions=[],c.forEach(a.directions,function(a,b){var e=[],d=[],f=[];c.forEach(a.features,function(a,b){d[b]=a.compressedGeometry;e[b]=a.strings;f[b]=a.events});a.strings=
e;a.events=f;this.directions[b]=new n(a,d)},this));a.routes&&(this.routes=this._graphicsFromJson(a.routes));a.facilities&&(this.facilities=this._graphicsFromJson(a.facilities));a.incidents&&(this.incidents=this._graphicsFromJson(a.incidents));a.barriers&&(this.pointBarriers=this._graphicsFromJson(a.barriers));a.polylineBarriers&&(this.polylineBarriers=this._graphicsFromJson(a.polylineBarriers));a.polygonBarriers&&(this.polygonBarriers=this._graphicsFromJson(a.polygonBarriers));a.messages&&(this.messages=
c.map(a.messages,function(a,b){return new p(a)}))},routes:null,facilities:null,incidents:null,pointBarriers:null,polylineBarriers:null,polygonBarriers:null,directions:null,messages:null,_graphicsFromJson:function(a){var b=new m(a.spatialReference);return c.map(a.features,function(a,c){var d=new l(a);d.geometry.setSpatialReference(b);return d})}});h("extend-esri")&&g.setObject("tasks.ClosestFacilitySolveResult",b,k);return b});