{"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/core/queryUtils.js","webpack:///./node_modules/@arcgis/core/rest/support/ClosestFacilitySolveResult.js","webpack:///./node_modules/@arcgis/core/rest/closestFacility.js","webpack:///./node_modules/@arcgis/core/tasks/ClosestFacilityTask.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","Array","isArray","_options","toJSON","Object","keys","name","getter","join","JSON","stringify","directions","facilities","incidents","messages","pointBarriers","polylineBarriers","polygonBarriers","routes","barriers","j","accumulateAttributes","attributeParameterValues","directionsTimeAttribute","impedanceAttribute","outSpatialReference","wkid","restrictionAttributes","returnPointBarriers","returnRoutes","travelMode","async","B","then","slice","path","Promise","resolve","dontCheck","query","toQueryParams","data","url","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","route","stops","routeResults","aliasOf","console","log","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,UAAUr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AEpL,EAAEsC,QAAQ8I,EAAExM,SAAS,IAAI,MAAM0B,WAAW9B,KAAKwB,EAAEsC,MAAM1D,SAAS,GAAGJ,EAAE,CAAC,MAAMwB,EAAE0D,KAAK4H,MAAM9M,EAAE+M,YAAYL,EAAEtJ,KAAK5B,QAAQ,sBAAsBA,EAAEqL,YAAYlL,EAAEH,EAAEsC,QAAQ,MAAM,CAACyH,qBAAqBmB,EAAExB,kBAAkBvJ,GAAG6E,eAAe,EAAEvE,EAAEtB,EAAE+B,GAAG,IAAI,MAAMlB,EAAE,eAAE,CAACsB,EAAE,OAAOqJ,MAAMxL,GAAG+B,GAAGH,EAAE,eAAEN,GAAG,wBAAwBiF,MAAMqE,qBAAqB/I,EAAE0I,kBAAkBnL,UAAU,qBAAEwC,EAAEf,GAAG,MAAM,CAAC+J,qBAAqB/I,EAAE0I,kBAAkBnL,GAAG,MAAMwC,GAAG,MAAM,IAAI,OAAE,sCAAsC,uDAAuD,CAACyK,MAAMzK","file":"js/chunk-9f03d140.297527d6.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*/\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{_ as r}from\"../../chunks/tslib.es6.js\";import\"../../geometry.js\";import e from\"../../Graphic.js\";import{JSONSupport as o}from\"../../core/JSONSupport.js\";import{isSome as t}from\"../../core/maybe.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 i}from\"../../core/accessorSupport/decorators/reader.js\";import{subclass as p}from\"../../core/accessorSupport/decorators/subclass.js\";import a from\"../../geometry/SpatialReference.js\";import n from\"./DirectionsFeatureSet.js\";import l from\"./FeatureSet.js\";import m from\"./NAMessage.js\";import u from\"../../geometry/Point.js\";import y from\"../../geometry/Polyline.js\";import c from\"../../geometry/Polygon.js\";function d(r){return r.features.map((o=>{const s=a.fromJSON(r.spatialReference),i=e.fromJSON(o);return t(i.geometry)&&(i.geometry.spatialReference=s),i}))}function f(r){return l.fromJSON(r).features.map((r=>r.geometry))}let g=class extends o{constructor(r){super(r),this.directions=null,this.facilities=null,this.incidents=null,this.messages=null,this.pointBarriers=null,this.polylineBarriers=null,this.polygonBarriers=null,this.routes=null}readFacilities(r){return f(r)}readIncidents(r){return f(r)}readPointBarriers(r,e){return f(e.barriers)}readPolylineBarriers(r){return f(r)}readPolygonBarriers(r){return f(r)}readRoutes(r){return d(r)}};r([s({type:[n]})],g.prototype,\"directions\",void 0),r([s({type:[u]})],g.prototype,\"facilities\",void 0),r([i(\"facilities\")],g.prototype,\"readFacilities\",null),r([s({type:[u]})],g.prototype,\"incidents\",void 0),r([i(\"incidents\")],g.prototype,\"readIncidents\",null),r([s({type:[m]})],g.prototype,\"messages\",void 0),r([s({type:[u]})],g.prototype,\"pointBarriers\",void 0),r([i(\"pointBarriers\",[\"barriers\"])],g.prototype,\"readPointBarriers\",null),r([s({type:[y]})],g.prototype,\"polylineBarriers\",void 0),r([i(\"polylineBarriers\")],g.prototype,\"readPolylineBarriers\",null),r([s({type:[c]})],g.prototype,\"polygonBarriers\",void 0),r([i(\"polygonBarriers\")],g.prototype,\"readPolygonBarriers\",null),r([s({type:[e]})],g.prototype,\"routes\",void 0),r([i(\"routes\")],g.prototype,\"readRoutes\",null),g=r([p(\"esri.rest.support.ClosestFacilitySolveResult\")],g);var j=g;export default j;\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 i,isInputGeometryZAware as s,fetchServiceDescription as a,dropZValuesOffInputGeometry as o}from\"./networkService.js\";import{parseUrl as n}from\"./utils.js\";import u from\"./support/ClosestFacilitySolveResult.js\";const l=r({accumulateAttributes:{name:\"accumulateAttributeNames\"},attributeParameterValues:!0,directionsTimeAttribute:{name:\"directionsTimeAttributeName\"},impedanceAttribute:{name:\"impedanceAttributeName\"},facilities:!0,incidents:!0,outSpatialReference:{name:\"outSR\",getter:e=>e.outSpatialReference.wkid},pointBarriers:{name:\"barriers\"},polylineBarriers:!0,polygonBarriers:!0,restrictionAttributes:{name:\"restrictionAttributeNames\"},returnPointBarriers:{name:\"returnBarriers\"},returnRoutes:{name:\"returnCFRoutes\"},travelMode:!0});async function c(r,c,m){const f=[],p=[],y={},B={},d=n(r);return c.incidents&&c.incidents.features&&i(c.incidents.features,p,\"incidents.features\",y),c.facilities&&c.facilities.features&&i(c.facilities.features,p,\"facilities.features\",y),c.pointBarriers&&c.pointBarriers.features&&i(c.pointBarriers.features,p,\"pointBarriers.features\",y),c.polylineBarriers&&c.polylineBarriers.features&&i(c.polylineBarriers.features,p,\"polylineBarriers.features\",y),c.polygonBarriers&&c.polygonBarriers.features&&i(c.polygonBarriers.features,p,\"polygonBarriers.features\",y),t(p).then((e=>{for(const r in y){const t=y[r];f.push(r),B[r]=e.slice(t[0],t[1])}return s(B,f)?a(d.path):Promise.resolve({dontCheck:!0})})).then((r=>{(\"dontCheck\"in r?r.dontCheck:r.hasZ)||o(B,f);for(const e in B)B[e].forEach(((r,t)=>{c.get(e)[t].geometry=r}));let t={query:{...d.query,f:\"json\",...l.toQueryParams(c)}};return m&&(t={...m,...t}),e(`${d.path}/solveClosestFacility`,t)})).then((e=>u.fromJSON(e.data)))}export{c 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{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 o}from\"../core/accessorSupport/decorators/subclass.js\";import{solve as t}from\"../rest/closestFacility.js\";import e from\"./Task.js\";let c=class extends e{constructor(r){super(r),this.url=null}solve(r,s){return t(this.url,r,s)}};r([s()],c.prototype,\"url\",void 0),c=r([o(\"esri.tasks.ClosestFacilityTask\")],c);var p=c;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*/\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":""}