{"version":3,"sources":["webpack:///./node_modules/@arcgis/core/rest/support/DirectionsFeatureSet.js","webpack:///./node_modules/@arcgis/core/rest/support/NAMessage.js","webpack:///./node_modules/@arcgis/core/rest/route.js","webpack:///./node_modules/@arcgis/core/tasks/RouteTask.js","webpack:///./node_modules/@arcgis/core/core/queryUtils.js","webpack:///./node_modules/@arcgis/core/rest/support/networkEnums.js","webpack:///./node_modules/@arcgis/core/rest/support/TravelMode.js","webpack:///./node_modules/@arcgis/core/rest/support/NetworkServiceDescription.js","webpack:///./node_modules/@arcgis/core/rest/support/RouteResult.js","webpack:///./node_modules/@arcgis/core/rest/support/RouteResultsContainer.js","webpack:///./node_modules/@arcgis/core/rest/networkService.js"],"names":["u","e","super","this","extent","features","geometryType","routeId","routeName","totalDriveTime","totalLength","totalTime","o","forEach","_decompressFeatureGeometry","summary","envelope","spatialReference","s","fromJSON","map","a","geometry","strings","events","r","x","point","y","z","hasZ","attributes","ETA","arriveTimeUTC","t","get","_mergePolylinesToSinglePath","_decompressGeometry","compressedGeometry","p","n","i","m","l","c","g","h","f","d","match","parseInt","indexOf","length","push","paths","hasM","concat","type","json","read","source","prototype","readOnly","value","0","1","2","3","50","100","101","200","String","write","accumulateAttributes","name","attributeParameterValues","directionsTimeAttribute","impedanceAttribute","outSpatialReference","getter","wkid","pointBarriers","polylineBarriers","polygonBarriers","restrictionAttributes","stops","travelMode","async","B","then","slice","path","Promise","resolve","dontCheck","query","toQueryParams","endsWith","url","Array","isArray","_options","toJSON","Object","keys","join","JSON","stringify","esriCentimeters","esriDecimalDegrees","esriDecimeters","esriFeet","esriInches","esriKilometers","esriMeters","esriMiles","esriMillimeters","esriNauticalMiles","esriPoints","esriYards","esriNAUCentimeters","esriNAUDecimalDegrees","esriNAUDecimeters","esriNAUFeet","esriNAUInches","esriNAUKilometers","esriNAUMeters","esriNAUMiles","esriNAUMillimeters","esriNAUNauticalMiles","esriNAUPoints","esriNAUYards","esriDOTComplete","esriDOTCompleteNoEvents","esriDOTInstructionsOnly","esriDOTStandard","esriDOTSummaryOnly","esriNAOutputLineNone","esriNAOutputLineStraight","esriNAOutputLineTrueShape","esriNAOutputLineTrueShapeWithMeasure","esriNAOutputPolygonNone","esriNAOutputPolygonSimplified","esriNAOutputPolygonDetailed","esriNFSBAllowBacktrack","esriNFSBAtDeadEndsOnly","esriNFSBNoBacktrack","esriNFSBAtDeadEndsAndIntersections","esriNATravelDirectionFromFacility","esriNATravelDirectionToFacility","esriNATimeOfDayNotUsed","esriNATimeOfDayUseAsStartTime","esriNATimeOfDayUseAsEndTime","AUTOMOBILE","TRUCK","WALK","OTHER","description","distanceAttributeName","id","impedanceAttributeName","restrictionAttributeNames","simplificationTolerance","simplificationToleranceUnits","timeAttributeName","useHierarchy","uturnAtJunctions","Number","Boolean","currentVersion","defaultTravelMode","directionsLanguage","directionsSupportedLanguages","impedance","networkDataset","supportedTravelModes","directions","route","barriers","messages","routeResults","aliasOf","console","log","routes","data","v","T","Name","RouteName","splice","token","itemId","replace","owningSystemUrl","test","serviceName","M","w","results","N","paramName","parse","TravelMode","error"],"mappings":"kHAAA,oLAI0qB,IAAIA,EAAE,cAAc,aAAE,YAAYC,GAAGC,MAAMD,GAAGE,KAAKC,OAAO,KAAKD,KAAKE,SAAS,KAAKF,KAAKG,aAAa,WAAWH,KAAKI,QAAQ,KAAKJ,KAAKK,UAAU,KAAKL,KAAKM,eAAe,KAAKN,KAAKO,YAAY,KAAKP,KAAKQ,UAAU,KAAK,aAAaV,EAAEW,IAAIX,GAAG,IAAIY,QAASZ,IAAIE,KAAKW,2BAA2Bb,EAAEW,EAAEG,QAAQC,SAASC,oBAAqB,MAAMC,EAAE,OAAEC,SAASP,EAAEK,kBAAkB,OAAOhB,EAAEmB,IAAKnB,IAAI,MAAMW,EAAE,OAAEO,SAASlB,GAAGoB,EAAEpB,EAAEqB,UAAUrB,EAAEqB,SAASL,iBAAiB,OAAOL,EAAEU,WAAWD,IAAI,eAAET,EAAEU,UAAUL,iBAAiBC,G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D,MAAM,kBAAkB,eAAegG,EAAE,eAAE,CAAC7I,EAAE,OAAOsJ,YAAYvJ,GAAGZ,GAAGW,EAAE,eAAE8I,GAAG,0BAA0BW,QAAQ,qBAAEzJ,EAAE+I,GAAGW,EAAE,GAAG,IAAI3K,EAAE,KAAK,GAAG,MAAM0K,GAAG,OAAO9J,EAAE8J,EAAEZ,OAAO,OAAOjJ,EAAED,EAAEgK,UAAU/J,EAAEW,OAAO,CAAC,MAAMnD,EAAEqM,EAAEZ,KAAKc,QAAQ,IAAI,MAAM/K,KAAKxB,EAAE,CAAC,IAAIwM,EAAE,GAAG,yBAAyBhL,EAAEiL,WAAW,GAAG,OAAOD,EAAEhL,EAAEsC,QAAQ0I,EAAEpM,SAAS,IAAI,MAAM0B,WAAW9B,KAAKwB,EAAEsC,MAAM1D,SAAS,GAAGJ,EAAE,CAAC,MAAMwB,EAAEkF,KAAKgG,MAAM1M,EAAE2M,YAAYL,EAAElJ,KAAK5B,QAAQ,sBAAsBA,EAAEiL,YAAY9K,EAAEH,EAAEsC,QAAQ,MAAM,CAACiH,qBAAqBuB,EAAE5B,kBAAkB/I,GAAG4D,eAAe,EAAEtD,EAAEtB,EAAE+B,GAAG,IAAI,MAAMlB,EAAE,eAAE,CAACsB,EAAE,OAAOiJ,MAAMpL,GAAG+B,GAAGH,EAAE,eAAEN,GAAG,wBAAwBwJ,MAAMV,qBAAqBvI,EAAEkI,kBAAkB3K,UAAU,qBAAEwC,EAAEf,GAAG,MAAM,CAACuJ,qBAAqBvI,EAAEkI,kBAAkB3K,GAAG,MAAMwC,GAAG,MAAM,IAAI,OAAE,sCAAsC,uDAAuD,CAACqK,MAAMrK","file":"js/chunk-9f2904a0.45ff00b4.js","sourcesContent":["/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.20/esri/copyright.txt for details.\n*/\nimport{_ as e}from\"../../chunks/tslib.es6.js\";import\"../../geometry.js\";import t from\"../../Graphic.js\";import{unwrap as r}from\"../../core/maybe.js\";import{property as o}from\"../../core/accessorSupport/decorators/property.js\";import\"../../core/has.js\";import\"../../core/accessorSupport/ensureType.js\";import\"../../core/Logger.js\";import{reader as s}from\"../../core/accessorSupport/decorators/reader.js\";import{subclass as a}from\"../../core/accessorSupport/decorators/subclass.js\";import p from\"./FeatureSet.js\";import n from\"../../geometry/SpatialReference.js\";import i from\"../../geometry/Point.js\";import m from\"../../geometry/Polyline.js\";import l from\"../../geometry/Extent.js\";let u=class extends p{constructor(e){super(e),this.extent=null,this.features=null,this.geometryType=\"polyline\",this.routeId=null,this.routeName=null,this.totalDriveTime=null,this.totalLength=null,this.totalTime=null}readFeatures(e,o){(e||[]).forEach((e=>{this._decompressFeatureGeometry(e,o.summary.envelope.spatialReference)}));const s=n.fromJSON(o.spatialReference);return e.map((e=>{const o=t.fromJSON(e),a=e.geometry&&e.geometry.spatialReference;return o.geometry&&!a&&(r(o.geometry).spatialReference=s),o.strings=e.strings,o.events=(e.events||[]).map((r=>{const o=new t({geometry:new i({x:r.point.x,y:r.point.y,z:r.point.z,hasZ:void 0!==r.point.z,spatialReference:e.geometry&&e.geometry.spatialReference}),attributes:{ETA:r.ETA,arriveTimeUTC:r.arriveTimeUTC}});return o.strings=r.strings,o})),o}))}get mergedGeometry(){if(!this.features)return null;const e=this.features.map((({geometry:e})=>r(e))),t=this.get(\"extent.spatialReference\");return this._mergePolylinesToSinglePath(e,t)}get strings(){return this.features.map((({strings:e})=>e))}_decompressFeatureGeometry(e,t){e.geometry=this._decompressGeometry(e.compressedGeometry,t)}_decompressGeometry(e,t){let r=0,o=0,s=0,a=0;const p=[];let n,i,m,l,u,c,y,g,h=0,f=0,d=0;if(u=e.match(/((\\+|\\-)[^\\+\\-\\|]+|\\|)/g),u||(u=[]),0===parseInt(u[h],32)){h=2;const e=parseInt(u[h],32);h++,c=parseInt(u[h],32),h++,1&e&&(f=u.indexOf(\"|\")+1,y=parseInt(u[f],32),f++),2&e&&(d=u.indexOf(\"|\",f)+1,g=parseInt(u[d],32),d++)}else c=parseInt(u[h],32),h++;for(;h0,hasM:d>0,spatialReference:t}}_mergePolylinesToSinglePath(e,t){let r=[];(e||[]).forEach((e=>{e.paths.forEach((e=>{r=r.concat(e)}))}));const o=[];let s=[0,0];return r.forEach((e=>{e[0]===s[0]&&e[1]===s[1]||(o.push(e),s=e)})),new m({paths:[o]},t)}};e([o({type:l,json:{read:{source:\"summary.envelope\"}}})],u.prototype,\"extent\",void 0),e([o()],u.prototype,\"features\",void 0),e([s(\"features\")],u.prototype,\"readFeatures\",null),e([o()],u.prototype,\"geometryType\",void 0),e([o({readOnly:!0})],u.prototype,\"mergedGeometry\",null),e([o()],u.prototype,\"routeId\",void 0),e([o()],u.prototype,\"routeName\",void 0),e([o({value:null,readOnly:!0})],u.prototype,\"strings\",null),e([o({json:{read:{source:\"summary.totalDriveTime\"}}})],u.prototype,\"totalDriveTime\",void 0),e([o({json:{read:{source:\"summary.totalLength\"}}})],u.prototype,\"totalLength\",void 0),e([o({json:{read:{source:\"summary.totalTime\"}}})],u.prototype,\"totalTime\",void 0),u=e([a(\"esri.rest.support.DirectionsFeatureSet\")],u);var c=u;export default c;\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.20/esri/copyright.txt for details.\n*/\nimport{_ as r}from\"../../chunks/tslib.es6.js\";import{JSONMap as o}from\"../../core/jsonMap.js\";import{property as s}from\"../../core/accessorSupport/decorators/property.js\";import\"../../core/has.js\";import\"../../core/accessorSupport/ensureType.js\";import\"../../core/Logger.js\";import{subclass as e}from\"../../core/accessorSupport/decorators/subclass.js\";import t from\"./GPMessage.js\";const p=new o({0:\"informative\",1:\"process-definition\",2:\"process-start\",3:\"process-stop\",50:\"warning\",100:\"error\",101:\"empty\",200:\"abort\"});let c=class extends t{constructor(r){super(r),this.type=null}};r([s({type:String,json:{read:p.read,write:p.write}})],c.prototype,\"type\",void 0),c=r([e(\"esri.rest.support.NAMessage\")],c);var i=c;export default i;\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.20/esri/copyright.txt for details.\n*/\nimport e from\"../request.js\";import{createQueryParamsHelper as r}from\"../core/queryUtils.js\";import{normalizeCentralMeridian as t}from\"../geometry/support/normalizeUtils.js\";import{collectGeometries as s,isInputGeometryZAware as o,fetchServiceDescription as i,dropZValuesOffInputGeometry as a,handleSolveResponse as n}from\"./networkService.js\";import{parseUrl as u}from\"./utils.js\";const p=r({accumulateAttributes:{name:\"accumulateAttributeNames\"},attributeParameterValues:!0,directionsTimeAttribute:{name:\"directionsTimeAttributeName\"},impedanceAttribute:{name:\"impedanceAttributeName\"},outSpatialReference:{name:\"outSR\",getter:e=>e.outSpatialReference.wkid},pointBarriers:{name:\"barriers\"},polylineBarriers:!0,polygonBarriers:!0,restrictionAttributes:{name:\"restrictionAttributeNames\"},stops:!0,travelMode:!0});async function m(r,m,l){const c=[],f=[],y={},B={},h=u(r);return m.stops&&m.stops.features&&s(m.stops.features,f,\"stops.features\",y),m.pointBarriers&&m.pointBarriers.features&&s(m.pointBarriers.features,f,\"pointBarriers.features\",y),m.polylineBarriers&&m.polylineBarriers.features&&s(m.polylineBarriers.features,f,\"polylineBarriers.features\",y),m.polygonBarriers&&m.polygonBarriers.features&&s(m.polygonBarriers.features,f,\"polygonBarriers.features\",y),t(f).then((e=>{for(const r in y){const t=y[r];c.push(r),B[r]=e.slice(t[0],t[1])}return o(B,c)?i(h.path):Promise.resolve({dontCheck:!0})})).then((r=>{(\"dontCheck\"in r?r.dontCheck:r.hasZ)||a(B,c);for(const e in B)B[e].forEach(((r,t)=>{m.get(e)[t].geometry=r}));const t={...l,query:{...h.query,...p.toQueryParams(m),f:\"json\"}},{path:s}=h,o=\"/solve\",i=s.endsWith(o)?s:s+o;return e(i,t)})).then((e=>n(e)))}export{m as solve};\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.20/esri/copyright.txt for details.\n*/\nimport{_ as r}from\"../chunks/tslib.es6.js\";import\"../core/accessorSupport/decorators/property.js\";import\"../core/has.js\";import\"../core/accessorSupport/ensureType.js\";import\"../core/Logger.js\";import{subclass as s}from\"../core/accessorSupport/decorators/subclass.js\";import{solve as o}from\"../rest/route.js\";import e from\"./Task.js\";let t=class extends e{constructor(r){super(r)}solve(r,s){return o(this.url,r,s)}};t=r([s(\"esri.tasks.RouteTask\")],t);var p=t;export default p;\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.20/esri/copyright.txt for details.\n*/\nconst t=t=>{if(!Array.isArray(t))return!1;const[e]=t;return\"number\"==typeof e||\"string\"==typeof e};class e{constructor(t={}){this._options=t}toQueryParams(e){if(!e)return null;const o=e.toJSON(),n={};return Object.keys(o).forEach((e=>{const r=this._options[e];if(r){const s=\"boolean\"!=typeof r&&r.name?r.name:e,i=\"boolean\"!=typeof r&&r.getter?r.getter(o):o[e];null!=i&&(n[s]=t(i)?i.join(\",\"):\"object\"==typeof i?JSON.stringify(i):i)}else n[e]=o[e]}),this),n}}function o(t){return new e(t)}export{o as createQueryParamsHelper};\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.20/esri/copyright.txt for details.\n*/\nimport{strict as e}from\"../../core/jsonMap.js\";const i=e()({esriCentimeters:\"centimeters\",esriDecimalDegrees:\"decimal-degrees\",esriDecimeters:\"decimeters\",esriFeet:\"feet\",esriInches:\"inches\",esriKilometers:\"kilometers\",esriMeters:\"meters\",esriMiles:\"miles\",esriMillimeters:\"millimeters\",esriNauticalMiles:\"nautical-miles\",esriPoints:\"points\",esriYards:\"yards\"}),s=e()({esriNAUCentimeters:\"centimeters\",esriNAUDecimalDegrees:\"decimal-degrees\",esriNAUDecimeters:\"decimeters\",esriNAUFeet:\"feet\",esriNAUInches:\"inches\",esriNAUKilometers:\"kilometers\",esriNAUMeters:\"meters\",esriNAUMiles:\"miles\",esriNAUMillimeters:\"millimeters\",esriNAUNauticalMiles:\"nautical-miles\",esriNAUPoints:\"points\",esriNAUYards:\"yards\"}),r=e()({esriDOTComplete:\"complete\",esriDOTCompleteNoEvents:\"complete-no-events\",esriDOTInstructionsOnly:\"instructions-only\",esriDOTStandard:\"standard\",esriDOTSummaryOnly:\"summary-only\"}),t=e()({esriNAOutputLineNone:\"none\",esriNAOutputLineStraight:\"straight\",esriNAOutputLineTrueShape:\"true-shape\",esriNAOutputLineTrueShapeWithMeasure:\"true-shape-with-measure\"}),a=e()({esriNAOutputPolygonNone:\"none\",esriNAOutputPolygonSimplified:\"simplified\",esriNAOutputPolygonDetailed:\"detailed\"}),n=e()({esriNFSBAllowBacktrack:\"allow-backtrack\",esriNFSBAtDeadEndsOnly:\"at-dead-ends-only\",esriNFSBNoBacktrack:\"no-backtrack\",esriNFSBAtDeadEndsAndIntersections:\"at-dead-ends-and-intersections\"}),l=e()({esriNATravelDirectionFromFacility:\"from-facility\",esriNATravelDirectionToFacility:\"to-facility\"}),o=e()({esriNATimeOfDayNotUsed:\"not-used\",esriNATimeOfDayUseAsStartTime:\"start\",esriNATimeOfDayUseAsEndTime:\"end\"}),m=e()({AUTOMOBILE:\"automobile\",TRUCK:\"truck\",WALK:\"walk\",OTHER:\"other\"});export{s as directionsLengthUnitJsonMap,r as directionsOutputTypeJsonMap,i as lengthUnitJsonMap,t as outputLineJsonMap,a as outputPolygonJsonMap,n as restrictUTurnJsonMap,o as timeOfDayUsageJsonMap,l as travelDirectionJsonMap,m as travelModeTypeJsonMap};\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.20/esri/copyright.txt for details.\n*/\nimport{_ as t}from\"../../chunks/tslib.es6.js\";import{JSONSupport as e}from\"../../core/JSONSupport.js\";import{clone as i}from\"../../core/lang.js\";import{property as r}from\"../../core/accessorSupport/decorators/property.js\";import\"../../core/accessorSupport/ensureType.js\";import\"../../core/has.js\";import\"../../core/Logger.js\";import{enumeration as o}from\"../../core/accessorSupport/decorators/enumeration.js\";import{subclass as s}from\"../../core/accessorSupport/decorators/subclass.js\";import{lengthUnitJsonMap as n,travelModeTypeJsonMap as p,restrictUTurnJsonMap as a}from\"./networkEnums.js\";var u;let c=u=class extends e{constructor(t){super(t),this.attributeParameterValues=null,this.description=null,this.distanceAttributeName=null,this.id=null,this.impedanceAttributeName=null,this.name=null,this.restrictionAttributeNames=null,this.simplificationTolerance=null,this.simplificationToleranceUnits=null,this.timeAttributeName=null,this.type=null,this.useHierarchy=null,this.uturnAtJunctions=null}clone(){return new u(i({attributeParameterValues:this.attributeParameterValues,description:this.description,distanceAttributeName:this.distanceAttributeName,id:this.id,impedanceAttributeName:this.impedanceAttributeName,name:this.name,restrictionAttributeNames:this.restrictionAttributeNames,simplificationTolerance:this.simplificationTolerance,simplificationToleranceUnits:this.simplificationToleranceUnits,timeAttributeName:this.timeAttributeName,type:this.type,useHierarchy:this.useHierarchy,uturnAtJunctions:this.uturnAtJunctions}))}};t([r({type:[Object],json:{write:!0}})],c.prototype,\"attributeParameterValues\",void 0),t([r({type:String,json:{write:!0}})],c.prototype,\"description\",void 0),t([r({type:String,json:{write:!0}})],c.prototype,\"distanceAttributeName\",void 0),t([r({type:String,json:{write:!0}})],c.prototype,\"id\",void 0),t([r({type:String,json:{write:!0}})],c.prototype,\"impedanceAttributeName\",void 0),t([r({type:String,json:{write:!0}})],c.prototype,\"name\",void 0),t([r({type:[String],json:{write:!0}})],c.prototype,\"restrictionAttributeNames\",void 0),t([r({type:Number,json:{write:!0}})],c.prototype,\"simplificationTolerance\",void 0),t([o(n)],c.prototype,\"simplificationToleranceUnits\",void 0),t([r({type:String,json:{write:!0}})],c.prototype,\"timeAttributeName\",void 0),t([o(p)],c.prototype,\"type\",void 0),t([r({type:Boolean,json:{write:!0}})],c.prototype,\"useHierarchy\",void 0),t([o(a)],c.prototype,\"uturnAtJunctions\",void 0),c=u=t([s(\"esri.rest.support.TravelMode\")],c);var m=c;export default m;\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.20/esri/copyright.txt for details.\n*/\nimport{_ as o}from\"../../chunks/tslib.es6.js\";import{JSONSupport as e}from\"../../core/JSONSupport.js\";import{property as t}from\"../../core/accessorSupport/decorators/property.js\";import\"../../core/has.js\";import\"../../core/accessorSupport/ensureType.js\";import\"../../core/Logger.js\";import{subclass as r}from\"../../core/accessorSupport/decorators/subclass.js\";import s from\"./TravelMode.js\";let p=class extends e{constructor(o){super(o),this.currentVersion=null,this.defaultTravelMode=null,this.directionsLanguage=null,this.directionsSupportedLanguages=null,this.directionsTimeAttribute=null,this.hasZ=null,this.impedance=null,this.networkDataset=null,this.supportedTravelModes=null}};o([t()],p.prototype,\"currentVersion\",void 0),o([t()],p.prototype,\"defaultTravelMode\",void 0),o([t()],p.prototype,\"directionsLanguage\",void 0),o([t()],p.prototype,\"directionsSupportedLanguages\",void 0),o([t()],p.prototype,\"directionsTimeAttribute\",void 0),o([t()],p.prototype,\"hasZ\",void 0),o([t()],p.prototype,\"impedance\",void 0),o([t()],p.prototype,\"networkDataset\",void 0),o([t({type:[s]})],p.prototype,\"supportedTravelModes\",void 0),p=o([r(\"esri.rest.support.NetworkServiceDescription\")],p);var i=p;export default i;\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.20/esri/copyright.txt for details.\n*/\nimport{_ as o}from\"../../chunks/tslib.es6.js\";import r from\"../../Graphic.js\";import{JSONSupport as t}from\"../../core/JSONSupport.js\";import{property as e}from\"../../core/accessorSupport/decorators/property.js\";import\"../../core/has.js\";import\"../../core/accessorSupport/ensureType.js\";import\"../../core/Logger.js\";import{subclass as s}from\"../../core/accessorSupport/decorators/subclass.js\";import p from\"./DirectionsFeatureSet.js\";let i=class extends t{constructor(o){super(o),this.directions=null,this.route=null,this.routeName=null,this.stops=null}};o([e({type:p,json:{write:!0}})],i.prototype,\"directions\",void 0),o([e({type:r,json:{write:!0}})],i.prototype,\"route\",void 0),o([e({type:String,json:{write:!0}})],i.prototype,\"routeName\",void 0),o([e({type:[r],json:{write:!0}})],i.prototype,\"stops\",void 0),i=o([s(\"esri.rest.support.RouteResult\")],i);var c=i;export default c;\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.20/esri/copyright.txt for details.\n*/\nimport{_ as r}from\"../../chunks/tslib.es6.js\";import o from\"../../Graphic.js\";import{JSONSupport as e}from\"../../core/JSONSupport.js\";import{property as s}from\"../../core/accessorSupport/decorators/property.js\";import\"../../core/has.js\";import\"../../core/accessorSupport/ensureType.js\";import\"../../core/Logger.js\";import{reader as t}from\"../../core/accessorSupport/decorators/reader.js\";import{subclass as p}from\"../../core/accessorSupport/decorators/subclass.js\";import i from\"./FeatureSet.js\";import a from\"./NAMessage.js\";import l from\"./RouteResult.js\";function n(r){return r&&i.fromJSON(r).features.map((r=>r))}let u=class extends e{constructor(r){super(r),this.barriers=null,this.messages=null,this.pointBarriers=null,this.polylineBarriers=null,this.polygonBarriers=null,this.routeResults=null}readPointBarriers(r,o){return n(o.barriers||o.pointBarriers)}readPolylineBarriers(r){return n(r)}readPolygonBarriers(r){return n(r)}};r([s({aliasOf:\"pointBarriers\"})],u.prototype,\"barriers\",void 0),r([s({type:[a]})],u.prototype,\"messages\",void 0),r([s({type:[o]})],u.prototype,\"pointBarriers\",void 0),r([t(\"pointBarriers\",[\"barriers\",\"pointBarriers\"])],u.prototype,\"readPointBarriers\",null),r([s({type:[o]})],u.prototype,\"polylineBarriers\",void 0),r([t(\"polylineBarriers\")],u.prototype,\"readPolylineBarriers\",null),r([s({type:[o]})],u.prototype,\"polygonBarriers\",void 0),r([t(\"polygonBarriers\")],u.prototype,\"readPolygonBarriers\",null),r([s({type:[l]})],u.prototype,\"routeResults\",void 0),u=r([p(\"esri.rest.support.RouteResultsContainer\")],u);var y=u;export default y;\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.20/esri/copyright.txt for details.\n*/\nimport e from\"../request.js\";import r from\"../core/Error.js\";import{isSome as t}from\"../core/maybe.js\";import{getDeepValue as o}from\"../core/object.js\";import{removeTrailingSlash as s}from\"../core/urlUtils.js\";import{asValidOptions as a,parseUrl as l}from\"./utils.js\";import n from\"./support/NetworkServiceDescription.js\";import i from\"./support/RouteResultsContainer.js\";function u(e,r,t,o){o[t]=[r.length,r.length+e.length],e.forEach((e=>{r.push(e.geometry)}))}function p(e,r){for(let t=0;t{r.push(v=e.routeName),t[v]={directions:e}})),s.forEach((e=>{-1===r.indexOf(v=e.attributes.Name)&&(r.push(v),t[v]={}),e.geometry&&(e.geometry.spatialReference=T),t[v].route=e})),l.forEach((e=>{m=e.attributes,-1===r.indexOf(v=m.RouteName||c)&&(r.push(v),t[v]={}),v!==c&&(h=!1),e.geometry&&(e.geometry.spatialReference=T),null==t[v].stops&&(t[v].stops=[]),t[v].stops.push(e)})),l.length>0&&!0===h&&(t[r[0]].stops=t[c].stops,delete t[c],r.splice(r.indexOf(c),1));const g=r.map((e=>(t[e].routeName=e===c?null:e,t[e])));return i.fromJSON({routeResults:g,pointBarriers:u,polygonBarriers:p,polylineBarriers:f,messages:d})}function d(e,r){for(let o=0;o=10.4?m(t,o,s):v(t,s),{defaultTravelMode:p,supportedTravelModes:f}=await u;return i.defaultTravelMode=p,i.supportedTravelModes=f,n.fromJSON(i)}async function v(r,t){var n,i;const u=a({f:\"json\"},t),{data:p}=await e(r.replace(/\\/rest\\/.*$/i,\"/info\"),u);if(!p||!p.owningSystemUrl)return{supportedTravelModes:[],defaultTravelMode:null};const{owningSystemUrl:f}=p,d=s(f)+\"/sharing/rest/portals/self\",{data:c}=await e(d,u),v=o(\"helperServices.routingUtilities.url\",c);if(!v)return{supportedTravelModes:[],defaultTravelMode:null};const m=l(f),h=/\\/solve$/i.test(m.path)?\"Route\":/\\/solveclosestfacility$/i.test(m.path)?\"ClosestFacility\":\"ServiceAreas\",T=a({f:\"json\",serviceName:h},t),g=s(v)+\"/GetTravelModes/execute\",M=await e(g,T),w=[];let y=null;if(null!=M&&null!=(n=M.data)&&null!=(i=n.results)&&i.length){const e=M.data.results;for(const r of e){var N;if(\"supportedTravelModes\"===r.paramName){if(null!=(N=r.value)&&N.features)for(const{attributes:e}of r.value.features)if(e){const r=JSON.parse(e.TravelMode);w.push(r)}}else\"defaultTravelMode\"===r.paramName&&(y=r.value)}}return{supportedTravelModes:w,defaultTravelMode:y}}async function m(t,o,l){try{const r=a({f:\"json\",token:o},l),n=s(t)+\"/retrieveTravelModes\",{data:{supportedTravelModes:i,defaultTravelMode:u}}=await e(n,r);return{supportedTravelModes:i,defaultTravelMode:u}}catch(n){throw new r(\"network-service:retrieveTravelModes\",\"Could not get to the NAServer's retrieveTravelModes.\",{error:n})}}export{u as collectGeometries,p as dropZValuesOffInputGeometry,c as fetchServiceDescription,f as handleSolveResponse,d as isInputGeometryZAware};\n"],"sourceRoot":""}