(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-205d323f"],{2698:function(e,t,i){"use strict";function r(e){return e&&"getAtOrigin"in e&&"originOf"in e}i.d(t,"a",(function(){return r}))},"5b29":function(e,t,i){"use strict";i.d(t,"a",(function(){return j}));var r=i("a4ee"),a=(i("e06a"),i("b2b2")),o=i("59b2"),s=(i("b50f"),i("c120"),i("cea0"),i("afcf")),l=i("d386"),n=i("8d60");let u=class extends n["a"]{};Object(r["a"])([Object(o["b"])()],u.prototype,"events",void 0),Object(r["a"])([Object(o["b"])()],u.prototype,"strings",void 0),u=Object(r["a"])([Object(l["a"])("esri.rest.support.DirectionsFeature")],u);const p=u;var c=i("2edc"),b=i("3af1"),d=i("5996"),m=i("521c"),y=i("4ae5");let O=class extends c["default"]{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,t){var i;if(!e)return[];const r=null!=(i=t.summary.envelope.spatialReference)?i:t.spatialReference,a=r&&d["a"].fromJSON(r);return e.map(e=>{var t,i;const r=this._decompressGeometry(e.compressedGeometry),o=new m["a"]({...r,spatialReference:a}),s=null!=(t=null==(i=e.events)?void 0:i.map(e=>{const{arriveTimeUTC:t,ETA:i,point:{x:r,y:o,z:s},strings:l}=e;return new p({geometry:new y["a"]({x:r,y:o,z:s,hasZ:void 0!==s,spatialReference:a}),attributes:{ETA:i,arriveTimeUTC:t},strings:l})}))?t:[];return new p({attributes:e.attributes,events:s,geometry:o,strings:e.strings})})}get mergedGeometry(){if(!this.features)return null;const e=this.features.map(({geometry:e})=>Object(a["t"])(e)),t=this.get("extent.spatialReference");return this._mergePolylinesToSinglePath(e,t)}get strings(){return this.features.map(({strings:e})=>e)}_decompressGeometry(e){let t=0,i=0,r=0,a=0;const o=[];let s,l,n,u,p,c,b,d,m=0,y=0,O=0;if(p=e.match(/((\+|\-)[^\+\-\|]+|\|)/g),p||(p=[]),0===parseInt(p[m],32)){m=2;const e=parseInt(p[m],32);m++,c=parseInt(p[m],32),m++,1&e&&(y=p.indexOf("|")+1,b=parseInt(p[y],32),y++),2&e&&(O=p.indexOf("|",y)+1,d=parseInt(p[O],32),O++)}else c=parseInt(p[m],32),m++;for(;m
0,hasM:O>0}}_mergePolylinesToSinglePath(e,t){if(0===e.length)return new m["a"]({spatialReference:t});const i=[];for(const s of e)for(const e of s.paths)i.push(...e);const r=[];i.forEach((e,t)=>{0!==t&&e[0]===i[t-1][0]&&e[1]===i[t-1][1]||r.push(e)});const{hasM:a,hasZ:o}=e[0];return new m["a"]({hasM:a,hasZ:o,paths:[r],spatialReference:t})}};Object(r["a"])([Object(o["b"])({type:b["a"],json:{read:{source:"summary.envelope"}}})],O.prototype,"extent",void 0),Object(r["a"])([Object(o["b"])()],O.prototype,"features",void 0),Object(r["a"])([Object(s["a"])("features")],O.prototype,"readFeatures",null),Object(r["a"])([Object(o["b"])()],O.prototype,"geometryType",void 0),Object(r["a"])([Object(o["b"])({readOnly:!0})],O.prototype,"mergedGeometry",null),Object(r["a"])([Object(o["b"])()],O.prototype,"routeId",void 0),Object(r["a"])([Object(o["b"])()],O.prototype,"routeName",void 0),Object(r["a"])([Object(o["b"])({value:null,readOnly:!0})],O.prototype,"strings",null),Object(r["a"])([Object(o["b"])({json:{read:{source:"summary.totalDriveTime"}}})],O.prototype,"totalDriveTime",void 0),Object(r["a"])([Object(o["b"])({json:{read:{source:"summary.totalLength"}}})],O.prototype,"totalLength",void 0),Object(r["a"])([Object(o["b"])({json:{read:{source:"summary.totalTime"}}})],O.prototype,"totalTime",void 0),O=Object(r["a"])([Object(l["a"])("esri.rest.support.DirectionsFeatureSet")],O);const j=O},"748f":function(e,t,i){"use strict";i.d(t,"a",(function(){return b}));var r,a=i("a4ee"),o=i("6a0ed"),s=i("7ffa"),l=i("59b2"),n=(i("cea0"),i("448d")),u=i("d386"),p=i("ff81");let c=r=class extends o["a"]{constructor(e){super(e),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 r(Object(s["a"])({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}))}};Object(a["a"])([Object(l["b"])({type:[Object],json:{write:!0}})],c.prototype,"attributeParameterValues",void 0),Object(a["a"])([Object(l["b"])({type:String,json:{write:!0}})],c.prototype,"description",void 0),Object(a["a"])([Object(l["b"])({type:String,json:{write:!0}})],c.prototype,"distanceAttributeName",void 0),Object(a["a"])([Object(l["b"])({type:String,json:{write:!0}})],c.prototype,"id",void 0),Object(a["a"])([Object(l["b"])({type:String,json:{write:!0}})],c.prototype,"impedanceAttributeName",void 0),Object(a["a"])([Object(l["b"])({type:String,json:{write:!0}})],c.prototype,"name",void 0),Object(a["a"])([Object(l["b"])({type:[String],json:{write:!0}})],c.prototype,"restrictionAttributeNames",void 0),Object(a["a"])([Object(l["b"])({type:Number,json:{write:{allowNull:!0}}})],c.prototype,"simplificationTolerance",void 0),Object(a["a"])([Object(n["a"])(p["i"])],c.prototype,"simplificationToleranceUnits",void 0),Object(a["a"])([Object(l["b"])({type:String,json:{write:!0}})],c.prototype,"timeAttributeName",void 0),Object(a["a"])([Object(n["a"])(p["o"])],c.prototype,"type",void 0),Object(a["a"])([Object(l["b"])({type:Boolean,json:{write:!0}})],c.prototype,"useHierarchy",void 0),Object(a["a"])([Object(n["a"])(p["l"])],c.prototype,"uturnAtJunctions",void 0),c=r=Object(a["a"])([Object(u["a"])("esri.rest.support.TravelMode")],c);const b=c},7945:function(e,t,i){"use strict";i.d(t,"a",(function(){return p}));var r=i("a4ee"),a=i("fa8a"),o=i("6a0ed"),s=i("59b2"),l=(i("b50f"),i("c120"),i("cea0"),i("d386"));const n=new a["a"]({esriJobMessageTypeInformative:"informative",esriJobMessageTypeProcessDefinition:"process-definition",esriJobMessageTypeProcessStart:"process-start",esriJobMessageTypeProcessStop:"process-stop",esriJobMessageTypeWarning:"warning",esriJobMessageTypeError:"error",esriJobMessageTypeEmpty:"empty",esriJobMessageTypeAbort:"abort"});let u=class extends o["a"]{constructor(e){super(e),this.description=null,this.type=null}};Object(r["a"])([Object(s["b"])({type:String,json:{write:!0}})],u.prototype,"description",void 0),Object(r["a"])([Object(s["b"])({type:String,json:{read:n.read,write:n.write}})],u.prototype,"type",void 0),u=Object(r["a"])([Object(l["a"])("esri.rest.support.GPMessage")],u);const p=u},"95a2":function(e,t,i){"use strict";i.d(t,"a",(function(){return p}));var r=i("a4ee"),a=i("fa8a"),o=i("59b2"),s=(i("b50f"),i("c120"),i("cea0"),i("d386")),l=i("7945");const n=new a["a"]({0:"informative",1:"process-definition",2:"process-start",3:"process-stop",50:"warning",100:"error",101:"empty",200:"abort"});let u=class extends l["a"]{constructor(e){super(e),this.type=null}};Object(r["a"])([Object(o["b"])({type:String,json:{read:n.read,write:n.write}})],u.prototype,"type",void 0),u=Object(r["a"])([Object(s["a"])("esri.rest.support.NAMessage")],u);const p=u},9887:function(e,t,i){"use strict";i.d(t,"a",(function(){return N}));var r=i("2eab"),a=i("b2b2"),o=i("a3a2"),s=i("a8d5"),l=i("c279"),n=i("bb72"),u=i("a4ee"),p=i("8d60"),c=i("6a0ed"),b=i("59b2"),d=(i("b50f"),i("c120"),i("cea0"),i("afcf")),m=i("d386"),y=i("2edc"),O=i("95a2"),j=i("5b29");let f=class extends c["a"]{constructor(e){super(e),this.directionLines=null,this.directionPoints=null,this.directions=null,this.route=null,this.routeName=null,this.stops=null}};Object(u["a"])([Object(b["b"])({type:y["default"],json:{write:!0}})],f.prototype,"directionLines",void 0),Object(u["a"])([Object(b["b"])({type:y["default"],json:{write:!0}})],f.prototype,"directionPoints",void 0),Object(u["a"])([Object(b["b"])({type:j["a"],json:{write:!0}})],f.prototype,"directions",void 0),Object(u["a"])([Object(b["b"])({type:p["a"],json:{write:!0}})],f.prototype,"route",void 0),Object(u["a"])([Object(b["b"])({type:String,json:{write:!0}})],f.prototype,"routeName",void 0),Object(u["a"])([Object(b["b"])({type:[p["a"]],json:{write:!0}})],f.prototype,"stops",void 0),f=Object(u["a"])([Object(m["a"])("esri.rest.support.RouteResult")],f);const h=f;function v(e){return e&&y["default"].fromJSON(e).features.map(e=>e)}let T=class extends c["a"]{constructor(e){super(e),this.messages=null,this.pointBarriers=null,this.polylineBarriers=null,this.polygonBarriers=null,this.routeResults=null}readPointBarriers(e,t){return v(t.barriers)}readPolylineBarriers(e){return v(e)}readPolygonBarriers(e){return v(e)}};Object(u["a"])([Object(b["b"])({type:[O["a"]]})],T.prototype,"messages",void 0),Object(u["a"])([Object(b["b"])({type:[p["a"]]})],T.prototype,"pointBarriers",void 0),Object(u["a"])([Object(d["a"])("pointBarriers",["barriers"])],T.prototype,"readPointBarriers",null),Object(u["a"])([Object(b["b"])({type:[p["a"]]})],T.prototype,"polylineBarriers",void 0),Object(u["a"])([Object(d["a"])("polylineBarriers")],T.prototype,"readPolylineBarriers",null),Object(u["a"])([Object(b["b"])({type:[p["a"]]})],T.prototype,"polygonBarriers",void 0),Object(u["a"])([Object(d["a"])("polygonBarriers")],T.prototype,"readPolygonBarriers",null),Object(u["a"])([Object(b["b"])({type:[h]})],T.prototype,"routeResults",void 0),T=Object(u["a"])([Object(m["a"])("esri.rest.support.RouteSolveResult")],T);const g=T,S=Object(o["a"])({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});function w(e){return"esri.rest.support.FeatureSet"===(null==e?void 0:e.declaredClass)}async function N(e,t,i){const a=[],o=[],u={},p={},c=Object(n["c"])(e),{path:b}=c;w(t.stops)&&Object(l["a"])(t.stops.features,o,"stops.features",u),w(t.pointBarriers)&&Object(l["a"])(t.pointBarriers.features,o,"pointBarriers.features",u),w(t.polylineBarriers)&&Object(l["a"])(t.polylineBarriers.features,o,"polylineBarriers.features",u),w(t.polygonBarriers)&&Object(l["a"])(t.polygonBarriers.features,o,"polygonBarriers.features",u);const d=await Object(s["a"])(o);for(const r in u){const e=u[r];a.push(r),p[r]=d.slice(e[0],e[1])}if(Object(l["d"])(p,a)){let e=null;try{e=await Object(l["c"])(b,t.apiKey,i)}catch{}e&&!e.hasZ&&Object(l["b"])(p,a)}for(const r in p)p[r].forEach((e,i)=>{t.get(r)[i].geometry=e});const m={...i,query:{...c.query,...S.toQueryParams(t),f:"json"}},y=b.endsWith("/solve")?b:b+"/solve",{data:O}=await Object(r["default"])(y,m);return I(O)}function I(e){var t,i,r,o,s;const l=new Map,{directionLines:n,directionPoints:u,directions:p,routes:c,stops:b,barriers:d,polygonBarriers:m,polylineBarriers:y,messages:O}=e,j=null!=(t=null!=(i=null!=(r=null!=(o=null==c?void 0:c.spatialReference)?o:null==b?void 0:b.spatialReference)?r:null==d?void 0:d.spatialReference)?i:null==m?void 0:m.spatialReference)?t:null==y?void 0:y.spatialReference;null==c||c.features.forEach(e=>{const t=e.attributes.Name,i=e.attributes.ObjectID;l.has(t)?(l.get(t).route=e,l.get(t).routeId=i):l.set(t,{route:e,routeId:i,routeName:t}),Object(a["k"])(e.geometry)&&(e.geometry.spatialReference=j)}),null==p||p.forEach(e=>{const t=e.routeName;l.has(t)?l.get(t).directions=e:l.set(t,{routeName:t,directions:e})}),null==b||b.features.forEach(e=>{var t;const i=null!=(t=e.attributes.RouteName)?t:null;l.has(i)?l.get(i).stops?l.get(i).stops.push(e):l.get(i).stops=[e]:l.set(i,{stops:[e],routeName:i}),Object(a["k"])(e.geometry)&&(e.geometry.spatialReference=j)});const f=null==(s=null==b?void 0:b.features.every(e=>null==e.attributes.RouteName))||s;if((null==b?void 0:b.features.length)>0&&f){const e=Array.from(l.keys())[0];l.get(e).stops=l.get(null).stops,l.delete(null)}null==n||n.features.forEach(e=>{var t;const i=e.attributes.RouteID,r=null==(t=Array.from(l.values()).find(e=>e.routeId===i))?void 0:t.routeName;if(r)if(l.has(r))if(l.get(r).directionLines)l.get(r).directionLines.features.push(e);else{const{fieldAliases:t,geometryType:i,spatialReference:a}=n;l.get(r).directionLines={features:[e],fieldAliases:t,geometryType:i,spatialReference:a}}else{const{fieldAliases:t,geometryType:i,spatialReference:a}=n;l.set(r,{routeName:r,directionLines:{features:[e],fieldAliases:t,geometryType:i,spatialReference:a}})}}),null==u||u.features.forEach(e=>{var t;const i=e.attributes.RouteID,r=null==(t=Array.from(l.values()).find(e=>e.routeId===i))?void 0:t.routeName;if(r)if(l.has(r))if(l.get(r).directionPoints)l.get(r).directionPoints.features.push(e);else{const{fieldAliases:t,geometryType:i,spatialReference:a}=u;l.get(r).directionPoints={features:[e],fieldAliases:t,geometryType:i,spatialReference:a}}else{const{fieldAliases:t,geometryType:i,spatialReference:a}=u;l.set(r,{routeName:r,directionPoints:{features:[e],fieldAliases:t,geometryType:i,spatialReference:a}})}});const h=Array.from(l.values());return g.fromJSON({routeResults:h,barriers:d,polygonBarriers:m,polylineBarriers:y,messages:O})}},a3a2:function(e,t,i){"use strict";i.d(t,"a",(function(){return o}));const r=e=>{if(!Array.isArray(e))return!1;const[t]=e;return"number"==typeof t||"string"==typeof t};class a{constructor(e={}){this._options=e}toQueryParams(e){if(!e)return null;const t=e.toJSON(),i={};return Object.keys(t).forEach(e=>{const a=this._options[e];if(a){const o="boolean"!=typeof a&&a.name?a.name:e,s="boolean"!=typeof a&&a.getter?a.getter(t):t[e];null!=s&&(i[o]=r(s)?s.join(","):"object"==typeof s?JSON.stringify(s):s)}else i[e]=t[e]},this),i}}function o(e){return new a(e)}},b285:function(e,t,i){"use strict";i.r(t),i.d(t,"default",(function(){return Ge}));var r=i("a4ee"),a=i("1325"),o=(i("e06a"),i("8d60")),s=i("4856"),l=(i("b423"),i("261a"),i("b48d"),i("478c"),i("667b"),i("ff57"),i("da00"),i("f976")),n=i("2c4f"),u=i("ce50"),p=i("9096"),c=i("e92d"),b=i("b2b2"),d=i("e694"),m=i("9d1d"),y=i("477c"),O=i("8048"),j=i("e041"),f=i("59b2"),h=(i("b50f"),i("c120"),i("cea0")),v=i("afcf"),T=i("d386"),g=i("09db"),S=i("ca81"),w=i("3af1"),N=i("8188"),I=i("7f83"),C=i("a6a3"),D=i("997b"),A=i("b911"),F=i("0db5"),B=i("5a62"),k=i("54b4"),E=i("1fd7"),x=i("6a0ed"),P=i("db52"),M=i("4dc9"),J=i("0d76");let L=class extends x["a"]{constructor(){super(...arguments),this.directionLines=new P["a"]({color:[0,122,194],width:6}),this.directionPoints=new M["a"]({color:[255,255,255],size:6,outline:{color:[0,122,194],width:2}}),this.pointBarriers=new M["a"]({style:"x",size:10,outline:{color:[255,0,0],width:3}}),this.polygonBarriers=new J["a"]({color:[255,170,0,.6],outline:{width:7.5,color:[255,0,0,.6]}}),this.polylineBarriers=new P["a"]({width:7.5,color:[255,85,0,.7]}),this.routeInfo=new P["a"]({width:8,color:[20,89,127]}),this.firstStop=new M["a"]({color:[0,255,0],size:20,outline:{color:[255,255,255],width:4}}),this.middleStop=new M["a"]({color:[51,51,51],size:12,outline:{color:[0,122,194],width:3}}),this.lastStop=new M["a"]({color:[255,0,0],size:20,outline:{color:[255,255,255],width:4}}),this.invalidStop=new M["a"]({color:[255,0,0],size:12,outline:{color:[255,255,255],width:3}}),this.waypointStop=new M["a"]({color:[255,255,255],size:12,outline:{color:[0,122,194],width:3}}),this.breakStop=new M["a"]({color:[255,255,255],size:12,outline:{color:[0,122,194],width:3}})}};Object(r["a"])([Object(f["b"])({nonNullable:!0,types:E["e"]})],L.prototype,"directionLines",void 0),Object(r["a"])([Object(f["b"])({nonNullable:!0,types:E["e"]})],L.prototype,"directionPoints",void 0),Object(r["a"])([Object(f["b"])({nonNullable:!0,types:E["e"]})],L.prototype,"pointBarriers",void 0),Object(r["a"])([Object(f["b"])({nonNullable:!0,types:E["e"]})],L.prototype,"polygonBarriers",void 0),Object(r["a"])([Object(f["b"])({nonNullable:!0,types:E["e"]})],L.prototype,"polylineBarriers",void 0),Object(r["a"])([Object(f["b"])({nonNullable:!0,types:E["e"]})],L.prototype,"routeInfo",void 0),Object(r["a"])([Object(f["b"])({nonNullable:!0,types:E["e"]})],L.prototype,"firstStop",void 0),Object(r["a"])([Object(f["b"])({nonNullable:!0,types:E["e"]})],L.prototype,"middleStop",void 0),Object(r["a"])([Object(f["b"])({nonNullable:!0,types:E["e"]})],L.prototype,"lastStop",void 0),Object(r["a"])([Object(f["b"])({nonNullable:!0,types:E["e"]})],L.prototype,"invalidStop",void 0),Object(r["a"])([Object(f["b"])({nonNullable:!0,types:E["e"]})],L.prototype,"waypointStop",void 0),Object(r["a"])([Object(f["b"])({nonNullable:!0,types:E["e"]})],L.prototype,"breakStop",void 0),L=Object(r["a"])([Object(T["a"])("esri.layers.support.DefaultSymbols")],L);const U=L;var _,W=i("0224"),R=i("a7e1"),V=i("c279"),q=i("9887"),G=i("521c"),K=i("ff81"),z=i("6174");let Z=_=class extends x["a"]{constructor(e){super(e),this.directionLineType=null,this.directionPointId=null,this.distance=null,this.duration=null,this.fromLevel=null,this.geometry=null,this.objectId=null,this.popupTemplate=null,this.symbol=null,this.toLevel=null}static fromPortalJSON(e){var t,i;return new _({directionLineType:K["c"].fromJSON(e.attributes.DirectionLineType),directionPointId:e.attributes.DirectionPointID,distance:e.attributes.Meters,duration:e.attributes.Minutes,fromLevel:null!=(t=e.attributes.FromLevel)?t:null,geometry:G["a"].fromJSON(e.geometry),objectId:e.attributes.__OBJECTID,popupTemplate:Object(b["k"])(e.popupInfo)?s["a"].fromJSON(e.popupInfo):null,symbol:Object(b["k"])(e.symbol)?Object(z["a"])(e.symbol):null,toLevel:null!=(i=e.attributes.ToLevel)?i:null})}toPortalJSON(){const e={geometry:Object(b["k"])(this.geometry)?this.geometry.toJSON():null,attributes:{__OBJECTID:Object(b["t"])(this.objectId),DirectionLineType:Object(b["k"])(this.directionLineType)?K["c"].toJSON(this.directionLineType):null,DirectionPointID:Object(b["t"])(this.directionPointId),Meters:Object(b["t"])(this.distance),Minutes:Object(b["t"])(this.duration)},symbol:Object(b["k"])(this.symbol)?this.symbol.toJSON():null,popupInfo:Object(b["k"])(this.popupTemplate)?this.popupTemplate.toJSON():null};return Object(b["k"])(this.fromLevel)&&(e.attributes.FromLevel=this.fromLevel),Object(b["k"])(this.toLevel)&&(e.attributes.ToLevel=this.toLevel),e}};Z.fields=[{name:"__OBJECTID",alias:"OBJECTID",type:"esriFieldTypeOID",editable:!1,nullable:!1,domain:null},{name:"DirectionLineType",alias:"Line Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriDirectionsLineType",codedValues:[{name:"Unknown",code:0},{name:"Segment",code:1},{name:"Maneuver Segment",code:2},{name:"Restriction violation",code:3},{name:"Scale cost barrier crossing",code:4},{name:"Heavy Traffic",code:5},{name:"Slow Traffic",code:6},{name:"Moderate Traffic",code:7}]}},{name:"DirectionPointID",alias:"Direction Point ID",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!1},{name:"FromLevel",alias:"Start from 3D Level",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!1},{name:"Meters",alias:"Length in Meters",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"Minutes",alias:"Duration in Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"ToLevel",alias:"End at 3D Level",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!1}],Z.popupInfo={title:"Direction Lines",fieldInfos:[{fieldName:"DirectionLineType",label:"Line Type",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"Meters",label:"Length in Meters",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Minutes",label:"Duration in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"DirectionPointID",label:"Direction Point ID",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"FromLevel",label:"Start from 3D Level",isEditable:!1,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ToLevel",label:"End at 3D Level",isEditable:!1,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},Object(r["a"])([Object(f["b"])({type:K["c"].apiValues,json:{read:{source:"attributes.DirectionLineType",reader:K["c"].read}}})],Z.prototype,"directionLineType",void 0),Object(r["a"])([Object(f["b"])({json:{read:{source:"attributes.DirectionPointID"}}})],Z.prototype,"directionPointId",void 0),Object(r["a"])([Object(f["b"])({json:{read:{source:"attributes.Meters"}}})],Z.prototype,"distance",void 0),Object(r["a"])([Object(f["b"])({json:{read:{source:"attributes.Minutes"}}})],Z.prototype,"duration",void 0),Object(r["a"])([Object(f["b"])({json:{read:{source:"attributes.FromLevel"}}})],Z.prototype,"fromLevel",void 0),Object(r["a"])([Object(f["b"])({type:G["a"]})],Z.prototype,"geometry",void 0),Object(r["a"])([Object(f["b"])({json:{read:{source:"attributes.ObjectID"}}})],Z.prototype,"objectId",void 0),Object(r["a"])([Object(f["b"])({type:s["a"],json:{read:!1}})],Z.prototype,"popupTemplate",void 0),Object(r["a"])([Object(f["b"])({types:E["e"],json:{read:!1}})],Z.prototype,"symbol",void 0),Object(r["a"])([Object(f["b"])({json:{read:{source:"attributes.ToLevel"}}})],Z.prototype,"toLevel",void 0),Z=_=Object(r["a"])([Object(T["a"])("esri.rest.support.DirectionLine")],Z);const H=Z;var Y,X=i("4ae5");let Q=Y=class extends x["a"]{constructor(e){super(e),this.alternateName=null,this.arrivalTime=null,this.arrivalTimeOffset=null,this.azimuth=null,this.branchName=null,this.directionPointType=null,this.displayText=null,this.exitName=null,this.geometry=null,this.intersectingName=null,this.level=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.sequence=null,this.shortVoiceInstruction=null,this.stopId=null,this.symbol=null,this.towardName=null,this.voiceInstruction=null}readArrivalTime(e,t){return Object(b["k"])(t.attributes.ArrivalTime)?new Date(t.attributes.ArrivalTime):null}static fromPortalJSON(e){var t,i,r,a,o,l,n,u,p,c,d,m,y;return new Y({alternateName:null!=(t=e.attributes.AlternateName)?t:null,arrivalTime:Object(b["k"])(e.attributes.ArrivalTime)?new Date(e.attributes.ArrivalTime):null,arrivalTimeOffset:null!=(i=e.attributes.ArrivalUTCOffset)?i:null,azimuth:null!=(r=e.attributes.Azimuth)?r:null,branchName:null!=(a=e.attributes.BranchName)?a:null,directionPointType:K["d"].fromJSON(e.attributes.DirectionPointType),displayText:null!=(o=e.attributes.DisplayText)?o:null,exitName:null!=(l=e.attributes.ExitName)?l:null,geometry:X["a"].fromJSON(e.geometry),intersectingName:null!=(n=e.attributes.IntersectingName)?n:null,level:null!=(u=e.attributes.Level)?u:null,name:null!=(p=e.attributes.Name)?p:null,objectId:e.attributes.__OBJECTID,popupTemplate:Object(b["k"])(e.popupInfo)?s["a"].fromJSON(e.popupInfo):null,sequence:e.attributes.Sequence,shortVoiceInstruction:null!=(c=e.attributes.ShortVoiceInstruction)?c:null,stopId:null!=(d=e.attributes.StopID)?d:null,symbol:Object(b["k"])(e.symbol)?Object(z["a"])(e.symbol):null,towardName:null!=(m=e.attributes.TowardName)?m:null,voiceInstruction:null!=(y=e.attributes.VoiceInstruction)?y:null})}toPortalJSON(){const e={geometry:Object(b["k"])(this.geometry)?this.geometry.toJSON():null,attributes:{__OBJECTID:Object(b["t"])(this.objectId),DirectionPointType:Object(b["k"])(this.directionPointType)?K["d"].toJSON(this.directionPointType):null,Sequence:Object(b["t"])(this.sequence),StopID:this.stopId},symbol:Object(b["k"])(this.symbol)?this.symbol.toJSON():null,popupInfo:Object(b["k"])(this.popupTemplate)?this.popupTemplate.toJSON():null};return Object(b["k"])(this.alternateName)&&(e.attributes.AlternateName=this.alternateName),Object(b["k"])(this.arrivalTime)&&(e.attributes.ArrivalTime=this.arrivalTime.getTime()),Object(b["k"])(this.arrivalTimeOffset)&&(e.attributes.ArrivalUTCOffset=this.arrivalTimeOffset),Object(b["k"])(this.azimuth)&&(e.attributes.Azimuth=this.azimuth),Object(b["k"])(this.branchName)&&(e.attributes.BranchName=this.branchName),Object(b["k"])(this.displayText)&&(e.attributes.DisplayText=this.displayText),Object(b["k"])(this.exitName)&&(e.attributes.ExitName=this.exitName),Object(b["k"])(this.intersectingName)&&(e.attributes.IntersectingName=this.intersectingName),Object(b["k"])(this.level)&&(e.attributes.Level=this.level),Object(b["k"])(this.name)&&(e.attributes.Name=this.name),Object(b["k"])(this.shortVoiceInstruction)&&(e.attributes.ShortVoiceInstruction=this.shortVoiceInstruction),Object(b["k"])(this.towardName)&&(e.attributes.TowardName=this.towardName),Object(b["k"])(this.voiceInstruction)&&(e.attributes.VoiceInstruction=this.voiceInstruction),e}};Q.fields=[{name:"__OBJECTID",alias:"OBJECTID",type:"esriFieldTypeOID",editable:!1,nullable:!1,domain:null},{name:"AlternateName",alias:"Alternative Feature Name",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"ArrivalTime",alias:"Maneuver Starts at",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!0},{name:"ArrivalUTCOffset",alias:"Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"Azimuth",alias:"Azimuth",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"BranchName",alias:"Signpost Branch Name",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"DirectionPointType",alias:"Directions Item Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriDirectionPointType",codedValues:[{name:"Unknown",code:0},{name:"",code:1},{name:"Arrive at stop",code:50},{name:"Depart at stop",code:51},{name:"Go straight",code:52},{name:"Take ferry",code:100},{name:"Take off ferry",code:101},{name:"Keep center at fork",code:102},{name:"Take roundabout",code:103},{name:"Make U-Turn",code:104},{name:"Pass the door",code:150},{name:"Take stairs",code:151},{name:"",code:152},{name:"Take escalator",code:153},{name:"Take pedestrian ramp",code:154},{name:"Keep left at fork",code:200},{name:"Ramp left",code:201},{name:"Take left-handed roundabout",code:202},{name:"Make left-handed U-Turn",code:203},{name:"Bear left",code:204},{name:"Turn left",code:205},{name:"Make sharp left",code:206},{name:"Turn left, followed by turn left",code:207},{name:"Turn left, followed by turn right",code:208},{name:"Keep right at fork",code:300},{name:"Ramp right",code:301},{name:"Take right-handed roundabout",code:302},{name:"Make right-handed U-Turn",code:303},{name:"Bear right",code:304},{name:"Turn right",code:305},{name:"Make sharp right",code:306},{name:"Turn right, followed by turn left",code:307},{name:"Turn right, followed by turn right",code:308},{name:"Indicates up direction of elevator",code:400},{name:"Indicates up direction of escalator",code:401},{name:"Take up-stairs",code:402},{name:"Indicates down direction of elevator",code:500},{name:"Indicates down direction of escalator",code:501},{name:"Take down-stairs",code:502},{name:"General event",code:1e3},{name:"Landmark",code:1001},{name:"Time zone change",code:1002},{name:"Heavy traffic segment",code:1003},{name:"Scale cost barrier crossing",code:1004},{name:"Administrative Border crossing",code:1005},{name:"Restriction violation",code:1006}]}},{name:"DisplayText",alias:"Text to Display",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"ExitName",alias:"Highway Exit Name",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"IntersectingName",alias:"Intersecting Feature Name",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"Level",alias:"3D Logical Level",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"Name",alias:"Primary Feature Name",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"Sequence",alias:"Sequence",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"ShortVoiceInstruction",alias:"Voice Instruction",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"StopID",alias:"Stop ID",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"TowardName",alias:"Signpost Toward Name",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"VoiceInstruction",alias:"Voice Full Instruction",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null}],Q.popupInfo={title:"{DisplayText}",fieldInfos:[{fieldName:"DirectionPointType",label:"Directions Item Type",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"DisplayText",label:"Text to Display",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"Sequence",label:"Sequence",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"StopID",label:"Stop ID",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ArrivalTime",label:"Maneuver Starts at",isEditable:!0,tooltip:"",visible:!0,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"ArrivalUTCOffset",label:"Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Azimuth",label:"Azimuth",isEditable:!1,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Name",label:"Primary Feature Name",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"AlternateName",label:"Alternative Feature Name",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"ExitName",label:"Highway Exit Name",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"IntersectingName",label:"Intersecting Feature Name",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"BranchName",label:"Signpost Branch Name",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"TowardName",label:"Signpost Toward Name",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"ShortVoiceInstruction",label:"Voice Instruction",isEditable:!1,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"VoiceInstruction",label:"Voice Full Instruction",isEditable:!1,tooltip:"",visible:!1,stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},Object(r["a"])([Object(f["b"])({json:{read:!1}})],Q.prototype,"alternateName",void 0),Object(r["a"])([Object(f["b"])()],Q.prototype,"arrivalTime",void 0),Object(r["a"])([Object(v["a"])("arrivalTime",["attributes.ArrivalTime"])],Q.prototype,"readArrivalTime",null),Object(r["a"])([Object(f["b"])({json:{read:{source:"attributes.ArrivalUTCOffset"}}})],Q.prototype,"arrivalTimeOffset",void 0),Object(r["a"])([Object(f["b"])({json:{read:{source:"attributes.Azimuth"}}})],Q.prototype,"azimuth",void 0),Object(r["a"])([Object(f["b"])({json:{read:{source:"attributes.BranchName"}}})],Q.prototype,"branchName",void 0),Object(r["a"])([Object(f["b"])({type:K["d"].apiValues,json:{read:{source:"attributes.DirectionPointType",reader:K["d"].read}}})],Q.prototype,"directionPointType",void 0),Object(r["a"])([Object(f["b"])({json:{read:{source:"attributes.DisplayText"}}})],Q.prototype,"displayText",void 0),Object(r["a"])([Object(f["b"])({json:{read:{source:"attributes.ExitName"}}})],Q.prototype,"exitName",void 0),Object(r["a"])([Object(f["b"])({type:X["a"]})],Q.prototype,"geometry",void 0),Object(r["a"])([Object(f["b"])({json:{read:!1}})],Q.prototype,"intersectingName",void 0),Object(r["a"])([Object(f["b"])({json:{read:!1}})],Q.prototype,"level",void 0),Object(r["a"])([Object(f["b"])({json:{read:{source:"attributes.Name"}}})],Q.prototype,"name",void 0),Object(r["a"])([Object(f["b"])({json:{read:{source:"attributes.ObjectID"}}})],Q.prototype,"objectId",void 0),Object(r["a"])([Object(f["b"])({type:s["a"],json:{read:!1}})],Q.prototype,"popupTemplate",void 0),Object(r["a"])([Object(f["b"])({json:{read:{source:"attributes.Sequence"}}})],Q.prototype,"sequence",void 0),Object(r["a"])([Object(f["b"])({json:{read:!1}})],Q.prototype,"shortVoiceInstruction",void 0),Object(r["a"])([Object(f["b"])({json:{read:{source:"attributes.StopID"}}})],Q.prototype,"stopId",void 0),Object(r["a"])([Object(f["b"])({types:E["e"],json:{read:!1}})],Q.prototype,"symbol",void 0),Object(r["a"])([Object(f["b"])({json:{read:{source:"attributes.TowardName"}}})],Q.prototype,"towardName",void 0),Object(r["a"])([Object(f["b"])({json:{read:!1}})],Q.prototype,"voiceInstruction",void 0),Q=Y=Object(r["a"])([Object(T["a"])("esri.rest.support.DirectionPoint")],Q);const $=Q;var ee,te=i("7ffa");function ie(e,t){if(Object(b["j"])(e))return null;const i={},r=new RegExp("^"+t,"i");for(const a in e)e.hasOwnProperty(a)&&r.test(a)&&(i[a.substring(t.length)]=e[a]);return i}function re(e,t){return Object(b["j"])(e)||Object(b["j"])(t)?null:Math.round((e-t)/6e4)}let ae=ee=class extends x["a"]{constructor(e){super(e),this.addedCost=null,this.barrierType=null,this.costs=null,this.curbApproach=null,this.fullEdge=null,this.geometry=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.sideOfEdge=null,this.sourceId=null,this.sourceOid=null,this.status=null,this.symbol=null}readCosts(e,t){return ie(t.attributes,"Attr_")}writeCosts(e,t){if(!Object(b["j"])(e)){t.attributes||(t.attributes={});for(const i in e)t.attributes["Attr_"+i]=e[i]}}static fromPortalJSON(e){var t,i;return new ee({addedCost:null!=(t=e.attributes.AddedCost)?t:null,barrierType:Object(b["k"])(e.attributes.BarrierType)?K["a"].fromJSON(e.attributes.BarrierType):null,costs:Object(b["k"])(e.attributes.Costs)?JSON.parse(e.attributes.Costs):null,curbApproach:Object(b["k"])(e.attributes.CurbApproach)?K["b"].fromJSON(e.attributes.CurbApproach):null,fullEdge:Object(b["k"])(e.attributes.FullEdge)?K["h"].fromJSON(e.attributes.FullEdge):null,geometry:X["a"].fromJSON(e.geometry),name:null!=(i=e.attributes.Name)?i:null,objectId:e.attributes.__OBJECTID,popupTemplate:Object(b["k"])(e.popupInfo)?s["a"].fromJSON(e.popupInfo):null,status:Object(b["k"])(e.attributes.Status)?K["n"].fromJSON(e.attributes.Status):null,symbol:Object(b["k"])(e.symbol)?Object(z["a"])(e.symbol):null})}clone(){return new ee(Object(te["a"])({addedCost:this.addedCost,barrierType:this.barrierType,costs:this.costs,curbApproach:this.curbApproach,fullEdge:this.fullEdge,geometry:this.geometry,name:this.name,objectId:this.objectId,popupTemplate:this.popupTemplate,sideOfEdge:this.sideOfEdge,sourceId:this.sourceId,sourceOid:this.sourceOid,status:this.status,symbol:this.symbol}))}toPortalJSON(){return{geometry:Object(b["k"])(this.geometry)?this.geometry.toJSON():null,attributes:{__OBJECTID:Object(b["t"])(this.objectId),AddedCost:this.addedCost,BarrierType:Object(b["k"])(this.barrierType)?K["a"].toJSON(this.barrierType):null,Costs:Object(b["k"])(this.costs)?JSON.stringify(this.costs):null,CurbApproach:Object(b["k"])(this.curbApproach)?K["b"].toJSON(this.curbApproach):null,FullEdge:Object(b["k"])(this.fullEdge)?K["h"].toJSON(this.fullEdge):null,Name:this.name,Status:Object(b["k"])(this.status)?K["n"].toJSON(this.status):null},symbol:Object(b["k"])(this.symbol)?this.symbol.toJSON():null,popupInfo:Object(b["k"])(this.popupTemplate)?this.popupTemplate.toJSON():null}}};ae.fields=[{name:"__OBJECTID",alias:"OBJECTID",type:"esriFieldTypeOID",editable:!1,nullable:!1,domain:null},{name:"AddedCost",alias:"Added Cost",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0,domain:null},{name:"BarrierType",alias:"Barrier Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNABarrierType",codedValues:[{name:"Restriction",code:0},{name:"Scaled Cost",code:1},{name:"Added Cost",code:2}]}},{name:"Costs",alias:"Costs",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"CurbApproach",alias:"Curb Approach",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!1,domain:{type:"codedValue",name:"esriNACurbApproachType",codedValues:[{name:"Either side",code:0},{name:"From the right",code:1},{name:"From the left",code:2},{name:"Depart in the same direction",code:3}]}},{name:"FullEdge",alias:"Full Edge",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNAIntYesNo",codedValues:[{name:"No",code:0},{name:"Yes",code:1}]}},{name:"Name",alias:"Name",type:"esriFieldTypeString",length:255,editable:!0,nullable:!0,visible:!0},{name:"Status",alias:"Status",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNAObjectStatus",codedValues:[{name:"OK",code:0},{name:"Not Located on Network",code:1},{name:"Network Unbuilt",code:2},{name:"Prohibited Street",code:3},{name:"Invalid Field Values",code:4},{name:"Cannot Reach",code:5},{name:"Time Window Violation",code:6}]}}],ae.popupInfo={title:"Point Barriers",fieldInfos:[{fieldName:"Name",label:"Name",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"BarrierType",label:"Barrier Type",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"AddedCost",label:"Added Cost",isEditable:!0,tooltip:"",visible:!0,format:{places:3,digitSeparator:!0},stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},Object(r["a"])([Object(f["b"])({json:{read:!1}})],ae.prototype,"addedCost",void 0),Object(r["a"])([Object(f["b"])({type:K["a"].apiValues,json:{name:"attributes.BarrierType",read:{reader:K["a"].read},write:{writer:K["a"].write}}})],ae.prototype,"barrierType",void 0),Object(r["a"])([Object(f["b"])()],ae.prototype,"costs",void 0),Object(r["a"])([Object(v["a"])("costs",["attributes"])],ae.prototype,"readCosts",null),Object(r["a"])([Object(g["a"])("costs")],ae.prototype,"writeCosts",null),Object(r["a"])([Object(f["b"])({type:K["b"].apiValues,json:{read:{source:"attributes.CurbApproach",reader:K["b"].read}}})],ae.prototype,"curbApproach",void 0),Object(r["a"])([Object(f["b"])({type:K["h"].apiValues,json:{name:"attributes.FullEdge",read:{reader:K["h"].read},write:{writer:K["h"].write}}})],ae.prototype,"fullEdge",void 0),Object(r["a"])([Object(f["b"])({type:X["a"],json:{write:!0}})],ae.prototype,"geometry",void 0),Object(r["a"])([Object(f["b"])({json:{name:"attributes.Name",write:!0}})],ae.prototype,"name",void 0),Object(r["a"])([Object(f["b"])({json:{name:"attributes.ObjectID",write:!0}})],ae.prototype,"objectId",void 0),Object(r["a"])([Object(f["b"])({type:s["a"],json:{read:!1}})],ae.prototype,"popupTemplate",void 0),Object(r["a"])([Object(f["b"])({type:K["m"].apiValues,json:{read:{source:"attributes.SideOfEdge",reader:K["m"].read}}})],ae.prototype,"sideOfEdge",void 0),Object(r["a"])([Object(f["b"])({json:{read:{source:"attributes.SourceID"}}})],ae.prototype,"sourceId",void 0),Object(r["a"])([Object(f["b"])({json:{read:{source:"attributes.SourceOID"}}})],ae.prototype,"sourceOid",void 0),Object(r["a"])([Object(f["b"])({type:K["n"].apiValues,json:{read:{source:"attributes.Status",reader:K["n"].read}}})],ae.prototype,"status",void 0),Object(r["a"])([Object(f["b"])({types:E["e"],json:{read:!1}})],ae.prototype,"symbol",void 0),ae=ee=Object(r["a"])([Object(T["a"])("esri.rest.support.PointBarrier")],ae);const oe=ae;var se,le=i("1219");let ne=se=class extends x["a"]{constructor(e){super(e),this.barrierType=null,this.costs=null,this.geometry=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.scaleFactor=null,this.symbol=null}readCosts(e,t){return ie(t.attributes,"Attr_")}writeCosts(e,t){if(!Object(b["j"])(e)){t.attributes||(t.attributes={});for(const i in e)t.attributes["Attr_"+i]=e[i]}}static fromPortalJSON(e){var t,i;return new se({barrierType:Object(b["k"])(e.attributes.BarrierType)?K["a"].fromJSON(e.attributes.BarrierType):null,costs:Object(b["k"])(e.attributes.Costs)?JSON.parse(e.attributes.Costs):null,geometry:le["a"].fromJSON(e.geometry),name:null!=(t=e.attributes.Name)?t:null,objectId:e.attributes.__OBJECTID,popupTemplate:Object(b["k"])(e.popupInfo)?s["a"].fromJSON(e.popupInfo):null,scaleFactor:null!=(i=e.attributes.ScaleFactor)?i:null,symbol:Object(b["k"])(e.symbol)?Object(z["a"])(e.symbol):null})}clone(){return new se(Object(te["a"])({barrierType:this.barrierType,costs:this.costs,geometry:this.geometry,name:this.name,objectId:this.objectId,popupTemplate:this.popupTemplate,scaleFactor:this.scaleFactor,symbol:this.symbol}))}toPortalJSON(){var e,t;return{geometry:Object(b["k"])(this.geometry)?this.geometry.toJSON():null,attributes:{__OBJECTID:Object(b["t"])(this.objectId),BarrierType:Object(b["k"])(this.barrierType)?K["a"].toJSON(this.barrierType):null,Costs:Object(b["k"])(this.costs)?JSON.stringify(this.costs):null,Name:null!=(e=this.name)?e:null,ScaleFactor:null!=(t=this.scaleFactor)?t:null},symbol:Object(b["k"])(this.symbol)?this.symbol.toJSON():null,popupInfo:Object(b["k"])(this.popupTemplate)?this.popupTemplate.toJSON():null}}};ne.fields=[{name:"__OBJECTID",alias:"OBJECTID",type:"esriFieldTypeOID",editable:!1,nullable:!1,domain:null},{name:"BarrierType",alias:"Barrier Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNABarrierType",codedValues:[{name:"Restriction",code:0},{name:"Scaled Cost",code:1},{name:"Added Cost",code:2}]}},{name:"Costs",alias:"Costs",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"Name",alias:"Name",type:"esriFieldTypeString",length:255,editable:!0,nullable:!0,visible:!0},{name:"ScaleFactor",alias:"Scale Factor",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0}],ne.popupInfo={title:"Polygon Barriers",fieldInfos:[{fieldName:"Name",label:"Name",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"BarrierType",label:"Barrier Type",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"ScaleFactor",isEditable:!0,tooltip:"",visible:!0,format:{places:3,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Costs",label:"Costs",isEditable:!0,tooltip:"",visible:!1,stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},Object(r["a"])([Object(f["b"])({type:K["a"].apiValues,json:{name:"attributes.BarrierType",read:{reader:K["a"].read},write:{writer:K["a"].write}}})],ne.prototype,"barrierType",void 0),Object(r["a"])([Object(f["b"])()],ne.prototype,"costs",void 0),Object(r["a"])([Object(v["a"])("costs",["attributes"])],ne.prototype,"readCosts",null),Object(r["a"])([Object(g["a"])("costs")],ne.prototype,"writeCosts",null),Object(r["a"])([Object(f["b"])({type:le["a"],json:{write:!0}})],ne.prototype,"geometry",void 0),Object(r["a"])([Object(f["b"])({json:{name:"attributes.Name",write:!0}})],ne.prototype,"name",void 0),Object(r["a"])([Object(f["b"])({json:{name:"attributes.ObjectID",write:!0}})],ne.prototype,"objectId",void 0),Object(r["a"])([Object(f["b"])({type:s["a"],json:{read:!1}})],ne.prototype,"popupTemplate",void 0),Object(r["a"])([Object(f["b"])({json:{read:!1}})],ne.prototype,"scaleFactor",void 0),Object(r["a"])([Object(f["b"])({types:E["e"],json:{read:!1}})],ne.prototype,"symbol",void 0),ne=se=Object(r["a"])([Object(T["a"])("esri.rest.support.PolygonBarrier")],ne);const ue=ne;var pe;let ce=pe=class extends x["a"]{constructor(e){super(e),this.barrierType=null,this.costs=null,this.geometry=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.scaleFactor=null,this.symbol=null}readCosts(e,t){return ie(t.attributes,"Attr_")}static fromPortalJSON(e){var t,i;return new pe({barrierType:Object(b["k"])(e.attributes.BarrierType)?K["a"].fromJSON(e.attributes.BarrierType):null,costs:Object(b["k"])(e.attributes.Costs)?JSON.parse(e.attributes.Costs):null,geometry:G["a"].fromJSON(e.geometry),name:null!=(t=e.attributes.Name)?t:null,objectId:e.attributes.__OBJECTID,popupTemplate:Object(b["k"])(e.popupInfo)?s["a"].fromJSON(e.popupInfo):null,scaleFactor:null!=(i=e.attributes.ScaleFactor)?i:null,symbol:Object(b["k"])(e.symbol)?Object(z["a"])(e.symbol):null})}clone(){return new pe(Object(te["a"])({barrierType:this.barrierType,costs:this.costs,geometry:this.geometry,name:this.name,objectId:this.objectId,popupTemplate:this.popupTemplate,scaleFactor:this.scaleFactor,symbol:this.symbol}))}toPortalJSON(){return{geometry:Object(b["k"])(this.geometry)?this.geometry.toJSON():null,attributes:{__OBJECTID:Object(b["t"])(this.objectId),BarrierType:Object(b["k"])(this.barrierType)?K["a"].toJSON(this.barrierType):null,Costs:Object(b["k"])(this.costs)?JSON.stringify(this.costs):null,Name:this.name,ScaleFactor:this.scaleFactor},symbol:Object(b["k"])(this.symbol)?this.symbol.toJSON():null,popupInfo:Object(b["k"])(this.popupTemplate)?this.popupTemplate.toJSON():null}}};ce.fields=[{name:"__OBJECTID",alias:"OBJECTID",type:"esriFieldTypeOID",editable:!1,nullable:!1,domain:null},{name:"BarrierType",alias:"Barrier Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNABarrierType",codedValues:[{name:"Restriction",code:0},{name:"Scaled Cost",code:1},{name:"Added Cost",code:2}]}},{name:"Costs",alias:"Costs",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"Name",alias:"Name",type:"esriFieldTypeString",length:255,editable:!0,nullable:!0,visible:!0},{name:"ScaleFactor",alias:"Scale Factor",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0}],ce.popupInfo={title:"Line Barriers",fieldInfos:[{fieldName:"Name",label:"Name",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"BarrierType",label:"Barrier Type",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"ScaleFactor",isEditable:!0,tooltip:"",visible:!0,format:{places:3,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Costs",label:"Costs",isEditable:!0,tooltip:"",visible:!1,stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},Object(r["a"])([Object(f["b"])({type:K["a"].apiValues,json:{read:{source:"attributes.BarrierType",reader:K["a"].read}}})],ce.prototype,"barrierType",void 0),Object(r["a"])([Object(f["b"])()],ce.prototype,"costs",void 0),Object(r["a"])([Object(v["a"])("costs",["attributes"])],ce.prototype,"readCosts",null),Object(r["a"])([Object(f["b"])({type:G["a"],json:{write:!0}})],ce.prototype,"geometry",void 0),Object(r["a"])([Object(f["b"])({json:{name:"attributes.Name",write:!0}})],ce.prototype,"name",void 0),Object(r["a"])([Object(f["b"])({json:{name:"attributes.ObjectID",write:!0}})],ce.prototype,"objectId",void 0),Object(r["a"])([Object(f["b"])({type:s["a"],json:{read:!1}})],ce.prototype,"popupTemplate",void 0),Object(r["a"])([Object(f["b"])({json:{read:!1}})],ce.prototype,"scaleFactor",void 0),Object(r["a"])([Object(f["b"])({types:E["e"],json:{read:!1}})],ce.prototype,"symbol",void 0),ce=pe=Object(r["a"])([Object(T["a"])("esri.rest.support.PolylineBarrier")],ce);const be=ce;var de=i("748f");let me=class extends x["a"]{constructor(e){super(e),this.accumulateAttributes=null,this.directionsLanguage=null,this.findBestSequence=null,this.preserveFirstStop=null,this.preserveLastStop=null,this.startTimeIsUTC=null,this.timeWindowsAreUTC=null,this.travelMode=null}};Object(r["a"])([Object(f["b"])({type:[String],json:{read:{source:"accumulateAttributeNames"},write:{target:"accumulateAttributeNames"}}})],me.prototype,"accumulateAttributes",void 0),Object(r["a"])([Object(f["b"])({type:String,json:{write:!0}})],me.prototype,"directionsLanguage",void 0),Object(r["a"])([Object(f["b"])({type:Boolean,json:{write:!0}})],me.prototype,"findBestSequence",void 0),Object(r["a"])([Object(f["b"])({type:Boolean,json:{write:!0}})],me.prototype,"preserveFirstStop",void 0),Object(r["a"])([Object(f["b"])({type:Boolean,json:{write:!0}})],me.prototype,"preserveLastStop",void 0),Object(r["a"])([Object(f["b"])({type:Boolean,json:{write:!0}})],me.prototype,"startTimeIsUTC",void 0),Object(r["a"])([Object(f["b"])({type:Boolean,json:{write:!0}})],me.prototype,"timeWindowsAreUTC",void 0),Object(r["a"])([Object(f["b"])({type:de["a"],json:{write:!0}})],me.prototype,"travelMode",void 0),me=Object(r["a"])([Object(T["a"])("esri.layers.support.RouteSettings")],me);const ye=me;var Oe;let je=Oe=class extends x["a"]{constructor(e){super(e),this.analysisSettings=null,this.endTime=null,this.endTimeOffset=null,this.firstStopId=null,this.geometry=null,this.lastStopId=null,this.messages=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.startTime=null,this.startTimeOffset=null,this.stopCount=null,this.symbol=null,this.totalCosts=null,this.totalDistance=null,this.totalDuration=null,this.totalLateDuration=null,this.totalViolations=null,this.totalWait=null,this.totalWaitDuration=null,this.version="1.0.0"}readEndTime(e,t){return Object(b["k"])(t.attributes.EndTimeUTC)?new Date(t.attributes.EndTimeUTC):null}readEndTimeOffset(e,t){return re(t.attributes.EndTime,t.attributes.EndTimeUTC)}readStartTime(e,t){return Object(b["k"])(t.attributes.StartTimeUTC)?new Date(t.attributes.StartTimeUTC):null}readStartTimeOffset(e,t){return re(t.attributes.StartTime,t.attributes.StartTimeUTC)}readTotalCosts(e,t){return ie(t.attributes,"Total_")}readTotalViolations(e,t){return ie(t.attributes,"TotalViolation_")}readTotalWait(e,t){return ie(t.attributes,"TotalWait_")}static fromPortalJSON(e){var t,i,r,a,o,l;return new Oe({analysisSettings:Object(b["k"])(e.attributes.AnalysisSettings)?ye.fromJSON(JSON.parse(e.attributes.AnalysisSettings)):null,endTime:Object(b["k"])(e.attributes.EndTime)?new Date(e.attributes.EndTime):null,endTimeOffset:null!=(t=e.attributes.EndUTCOffset)?t:null,geometry:G["a"].fromJSON(e.geometry),messages:Object(b["k"])(e.attributes.Messages)?JSON.parse(e.attributes.Messages):null,name:e.attributes.RouteName,objectId:e.attributes.__OBJECTID,popupTemplate:Object(b["k"])(e.popupInfo)?s["a"].fromJSON(e.popupInfo):null,startTime:Object(b["k"])(e.attributes.StartTime)?new Date(e.attributes.StartTime):null,startTimeOffset:null!=(i=e.attributes.StartUTCOffset)?i:null,symbol:Object(b["k"])(e.symbol)?Object(z["a"])(e.symbol):null,totalCosts:Object(b["k"])(e.attributes.TotalCosts)?JSON.parse(e.attributes.TotalCosts):null,totalDistance:null!=(r=e.attributes.TotalMeters)?r:null,totalDuration:null!=(a=e.attributes.TotalMinutes)?a:null,totalLateDuration:null!=(o=e.attributes.TotalLateMinutes)?o:null,totalWaitDuration:null!=(l=e.attributes.TotalWaitMinutes)?l:null,version:e.attributes.Version})}toPortalJSON(){return{geometry:Object(b["k"])(this.geometry)?this.geometry.toJSON():null,attributes:{__OBJECTID:Object(b["t"])(this.objectId),AnalysisSettings:Object(b["k"])(this.analysisSettings)?JSON.stringify(this.analysisSettings.toJSON()):null,EndTime:Object(b["k"])(this.endTime)?this.endTime.getTime():null,EndUTCOffset:this.endTimeOffset,Messages:Object(b["k"])(this.messages)?JSON.stringify(this.messages):null,RouteName:Object(b["t"])(this.name),StartTime:Object(b["k"])(this.startTime)?this.startTime.getTime():null,StartUTCOffset:this.startTimeOffset,TotalCosts:Object(b["k"])(this.totalCosts)?JSON.stringify(this.totalCosts):null,TotalLateMinutes:this.totalLateDuration,TotalMeters:this.totalDistance,TotalMinutes:this.totalDuration,TotalWaitMinutes:this.totalWaitDuration,Version:Object(b["t"])(this.version)},symbol:Object(b["k"])(this.symbol)?this.symbol.toJSON():null,popupInfo:Object(b["k"])(this.popupTemplate)?this.popupTemplate.toJSON():null}}};je.fields=[{name:"__OBJECTID",alias:"OBJECTID",type:"esriFieldTypeOID",editable:!1,nullable:!1,domain:null},{name:"AnalysisSettings",alias:"Analysis Settings",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"EndTime",alias:"End Time",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!0},{name:"EndUTCOffset",alias:"End Time: Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"Messages",alias:"Analysis Messages",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"RouteName",alias:"Route Name",type:"esriFieldTypeString",length:1024,editable:!0,nullable:!0,visible:!0,domain:null},{name:"StartTime",alias:"Start Time",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!0},{name:"StartUTCOffset",alias:"Start Time: Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"TotalCosts",alias:"Total Costs",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"TotalLateMinutes",alias:"Total Late Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!1},{name:"TotalMeters",alias:"Total Meters",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"TotalMinutes",alias:"Total Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"TotalWaitMinutes",alias:"Total Wait Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!1},{name:"Version",alias:"Version",type:"esriFieldTypeString",length:16,editable:!0,nullable:!0,visible:!0,domain:null}],je.popupInfo={title:"Route Details",fieldInfos:[{fieldName:"RouteName",label:"Route Name",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"TotalMinutes",label:"Total Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TotalMeters",label:"Total Meters",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TotalLateMinutes",label:"Total Late Minutes",isEditable:!1,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TotalWaitMinutes",label:"Total Wait Minutes",isEditable:!1,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TotalCosts",label:"Total Costs",isEditable:!1,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"StartTime",label:"Start Time",isEditable:!1,tooltip:"",visible:!0,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"StartUTCOffset",label:"Start Time: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"EndTime",label:"End Time",isEditable:!1,tooltip:"",visible:!0,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"EndUTCOffset",label:"End Time: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Messages",label:"Analysis Messages",isEditable:!1,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"AnalysisSettings",isEditable:!1,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"Version",label:"Version",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},Object(r["a"])([Object(f["b"])({json:{read:!1}})],je.prototype,"analysisSettings",void 0),Object(r["a"])([Object(f["b"])()],je.prototype,"endTime",void 0),Object(r["a"])([Object(v["a"])("endTime",["attributes.EndTimeUTC"])],je.prototype,"readEndTime",null),Object(r["a"])([Object(f["b"])()],je.prototype,"endTimeOffset",void 0),Object(r["a"])([Object(v["a"])("endTimeOffset",["attributes.EndTime","attributes.EndTimeUTC"])],je.prototype,"readEndTimeOffset",null),Object(r["a"])([Object(f["b"])({json:{read:{source:"attributes.FirstStopID"}}})],je.prototype,"firstStopId",void 0),Object(r["a"])([Object(f["b"])({type:G["a"]})],je.prototype,"geometry",void 0),Object(r["a"])([Object(f["b"])({json:{read:{source:"attributes.LastStopID"}}})],je.prototype,"lastStopId",void 0),Object(r["a"])([Object(f["b"])({json:{read:!1}})],je.prototype,"messages",void 0),Object(r["a"])([Object(f["b"])({json:{read:{source:"attributes.Name"}}})],je.prototype,"name",void 0),Object(r["a"])([Object(f["b"])({json:{read:{source:"attributes.ObjectID"}}})],je.prototype,"objectId",void 0),Object(r["a"])([Object(f["b"])({type:s["a"],json:{read:!1}})],je.prototype,"popupTemplate",void 0),Object(r["a"])([Object(f["b"])()],je.prototype,"startTime",void 0),Object(r["a"])([Object(v["a"])("startTime",["attributes.StartTimeUTC"])],je.prototype,"readStartTime",null),Object(r["a"])([Object(f["b"])()],je.prototype,"startTimeOffset",void 0),Object(r["a"])([Object(v["a"])("startTimeOffset",["attributes.StartTime","attributes.StartTimeUTC"])],je.prototype,"readStartTimeOffset",null),Object(r["a"])([Object(f["b"])({json:{read:{source:"attributes.StopCount"}}})],je.prototype,"stopCount",void 0),Object(r["a"])([Object(f["b"])({types:E["e"],json:{read:!1}})],je.prototype,"symbol",void 0),Object(r["a"])([Object(f["b"])()],je.prototype,"totalCosts",void 0),Object(r["a"])([Object(v["a"])("totalCosts",["attributes"])],je.prototype,"readTotalCosts",null),Object(r["a"])([Object(f["b"])({json:{read:!1}})],je.prototype,"totalDistance",void 0),Object(r["a"])([Object(f["b"])({json:{read:!1}})],je.prototype,"totalDuration",void 0),Object(r["a"])([Object(f["b"])({json:{read:!1}})],je.prototype,"totalLateDuration",void 0),Object(r["a"])([Object(f["b"])()],je.prototype,"totalViolations",void 0),Object(r["a"])([Object(v["a"])("totalViolations",["attributes"])],je.prototype,"readTotalViolations",null),Object(r["a"])([Object(f["b"])()],je.prototype,"totalWait",void 0),Object(r["a"])([Object(v["a"])("totalWait",["attributes"])],je.prototype,"readTotalWait",null),Object(r["a"])([Object(f["b"])({json:{read:!1}})],je.prototype,"totalWaitDuration",void 0),Object(r["a"])([Object(f["b"])({json:{read:!1}})],je.prototype,"version",void 0),je=Oe=Object(r["a"])([Object(T["a"])("esri.rest.support.RouteInfo")],je);const fe=je;var he=i("448d");const ve={type:String,json:{read:{source:"token"},write:{target:"token"}}};var Te,ge=i("5996");let Se=Te=class extends x["a"]{constructor(e){super(e),this.accumulateAttributes=null,this.apiKey=null,this.attributeParameterValues=null,this.directionsLanguage=null,this.directionsLengthUnits=null,this.directionsOutputType=null,this.directionsStyleName=null,this.directionsTimeAttribute=null,this.findBestSequence=null,this.ignoreInvalidLocations=null,this.impedanceAttribute=null,this.outputGeometryPrecision=null,this.outputGeometryPrecisionUnits=null,this.outputLines="true-shape",this.outSpatialReference=null,this.pointBarriers=null,this.polygonBarriers=null,this.polylineBarriers=null,this.preserveFirstStop=null,this.preserveLastStop=null,this.restrictionAttributes=null,this.restrictUTurns=null,this.returnBarriers=!1,this.returnDirections=!1,this.returnPolygonBarriers=!1,this.returnPolylineBarriers=!1,this.returnRoutes=!0,this.returnStops=!1,this.returnZ=!0,this.startTime=null,this.startTimeIsUTC=!0,this.stops=null,this.timeWindowsAreUTC=null,this.travelMode=null,this.useHierarchy=null,this.useTimeWindows=null}static from(e){return Object(h["d"])(Te,e)}writePointBarriers(e,t,i){this._writeNetworkFeatures(e,t,i)}writePolygonBarrier(e,t,i){this._writeNetworkFeatures(e,t,i)}writePolylineBarrier(e,t,i){this._writeNetworkFeatures(e,t,i)}readStartTime(e,t){return null!=t.startTime?new Date(t.startTime):null}writeStartTime(e,t){t.startTime=e?e.getTime():null}writeStops(e,t,i){this._writeNetworkFeatures(e,t,i)}clone(){return new Te(Object(te["a"])({accumulateAttributes:this.accumulateAttributes,apiKey:this.apiKey,attributeParameterValues:this.attributeParameterValues,directionsLanguage:this.directionsLanguage,directionsLengthUnits:this.directionsLengthUnits,directionsOutputType:this.directionsOutputType,directionsStyleName:this.directionsStyleName,directionsTimeAttribute:this.directionsTimeAttribute,findBestSequence:this.findBestSequence,ignoreInvalidLocations:this.ignoreInvalidLocations,impedanceAttribute:this.impedanceAttribute,outputGeometryPrecision:this.outputGeometryPrecision,outputGeometryPrecisionUnits:this.outputGeometryPrecisionUnits,outputLines:this.outputLines,outSpatialReference:this.outSpatialReference,pointBarriers:this.pointBarriers,polygonBarriers:this.polygonBarriers,polylineBarriers:this.polylineBarriers,preserveFirstStop:this.preserveFirstStop,preserveLastStop:this.preserveLastStop,restrictionAttributes:this.restrictionAttributes,restrictUTurns:this.restrictUTurns,returnBarriers:this.returnBarriers,returnDirections:this.returnDirections,returnPolygonBarriers:this.returnPolygonBarriers,returnPolylineBarriers:this.returnPolylineBarriers,returnRoutes:this.returnRoutes,returnStops:this.returnStops,returnZ:this.returnZ,startTime:this.startTime,startTimeIsUTC:this.startTimeIsUTC,stops:this.stops,timeWindowsAreUTC:this.timeWindowsAreUTC,travelMode:this.travelMode,useHierarchy:this.useHierarchy,useTimeWindows:this.useTimeWindows}))}_writeNetworkFeatures(e,t,i){t[i]=n["a"].isCollection(e)?{features:e.toArray().map(e=>e.toJSON())}:e.toJSON()}};Object(r["a"])([Object(f["b"])({type:[String],json:{name:"accumulateAttributeNames",write:!0}})],Se.prototype,"accumulateAttributes",void 0),Object(r["a"])([Object(f["b"])(ve)],Se.prototype,"apiKey",void 0),Object(r["a"])([Object(f["b"])({json:{write:!0}})],Se.prototype,"attributeParameterValues",void 0),Object(r["a"])([Object(f["b"])({type:String,json:{write:!0}})],Se.prototype,"directionsLanguage",void 0),Object(r["a"])([Object(he["a"])(K["e"])],Se.prototype,"directionsLengthUnits",void 0),Object(r["a"])([Object(he["a"])(K["f"])],Se.prototype,"directionsOutputType",void 0),Object(r["a"])([Object(f["b"])({type:String,json:{write:!0}})],Se.prototype,"directionsStyleName",void 0),Object(r["a"])([Object(f["b"])({type:String,json:{write:!0}})],Se.prototype,"directionsTimeAttribute",void 0),Object(r["a"])([Object(f["b"])({json:{write:!0}})],Se.prototype,"findBestSequence",void 0),Object(r["a"])([Object(f["b"])({json:{write:!0}})],Se.prototype,"ignoreInvalidLocations",void 0),Object(r["a"])([Object(f["b"])({type:String,json:{read:{source:"impedanceAttributeName"},write:{target:"impedanceAttributeName"}}})],Se.prototype,"impedanceAttribute",void 0),Object(r["a"])([Object(f["b"])({type:Number,json:{write:!0}})],Se.prototype,"outputGeometryPrecision",void 0),Object(r["a"])([Object(he["a"])(K["i"])],Se.prototype,"outputGeometryPrecisionUnits",void 0),Object(r["a"])([Object(he["a"])(K["k"])],Se.prototype,"outputLines",void 0),Object(r["a"])([Object(f["b"])({type:ge["a"],json:{write:!0}})],Se.prototype,"outSpatialReference",void 0),Object(r["a"])([Object(f["b"])({json:{write:!0}})],Se.prototype,"pointBarriers",void 0),Object(r["a"])([Object(g["a"])("pointBarriers")],Se.prototype,"writePointBarriers",null),Object(r["a"])([Object(f["b"])({json:{write:!0}})],Se.prototype,"polygonBarriers",void 0),Object(r["a"])([Object(g["a"])("polygonBarriers")],Se.prototype,"writePolygonBarrier",null),Object(r["a"])([Object(f["b"])({json:{write:!0}})],Se.prototype,"polylineBarriers",void 0),Object(r["a"])([Object(g["a"])("polylineBarriers")],Se.prototype,"writePolylineBarrier",null),Object(r["a"])([Object(f["b"])({json:{write:!0}})],Se.prototype,"preserveFirstStop",void 0),Object(r["a"])([Object(f["b"])({json:{write:!0}})],Se.prototype,"preserveLastStop",void 0),Object(r["a"])([Object(f["b"])({type:[String],json:{write:!0}})],Se.prototype,"restrictionAttributes",void 0),Object(r["a"])([Object(he["a"])(K["l"])],Se.prototype,"restrictUTurns",void 0),Object(r["a"])([Object(f["b"])({type:Boolean,json:{write:!0}})],Se.prototype,"returnBarriers",void 0),Object(r["a"])([Object(f["b"])({type:Boolean,json:{write:!0}})],Se.prototype,"returnDirections",void 0),Object(r["a"])([Object(f["b"])({type:Boolean,json:{write:!0}})],Se.prototype,"returnPolygonBarriers",void 0),Object(r["a"])([Object(f["b"])({type:Boolean,json:{write:!0}})],Se.prototype,"returnPolylineBarriers",void 0),Object(r["a"])([Object(f["b"])({type:Boolean,json:{write:!0}})],Se.prototype,"returnRoutes",void 0),Object(r["a"])([Object(f["b"])({type:Boolean,json:{write:!0}})],Se.prototype,"returnStops",void 0),Object(r["a"])([Object(f["b"])({type:Boolean,json:{write:!0}})],Se.prototype,"returnZ",void 0),Object(r["a"])([Object(f["b"])({type:Date,json:{type:Number,write:!0}})],Se.prototype,"startTime",void 0),Object(r["a"])([Object(v["a"])("startTime")],Se.prototype,"readStartTime",null),Object(r["a"])([Object(g["a"])("startTime")],Se.prototype,"writeStartTime",null),Object(r["a"])([Object(f["b"])({type:Boolean,json:{write:!0}})],Se.prototype,"startTimeIsUTC",void 0),Object(r["a"])([Object(f["b"])({json:{write:!0}})],Se.prototype,"stops",void 0),Object(r["a"])([Object(g["a"])("stops")],Se.prototype,"writeStops",null),Object(r["a"])([Object(f["b"])({json:{write:!0}})],Se.prototype,"timeWindowsAreUTC",void 0),Object(r["a"])([Object(f["b"])({type:de["a"],json:{write:!0}})],Se.prototype,"travelMode",void 0),Object(r["a"])([Object(f["b"])({type:Boolean,json:{write:!0}})],Se.prototype,"useHierarchy",void 0),Object(r["a"])([Object(f["b"])({type:Boolean,json:{write:!0}})],Se.prototype,"useTimeWindows",void 0),Se=Te=Object(r["a"])([Object(T["a"])("esri.rest.support.RouteParameters")],Se);const we=Se;var Ne;let Ie=Ne=class extends x["a"]{constructor(e){super(e),this.arriveCurbApproach=null,this.arriveTime=null,this.arriveTimeOffset=null,this.bearing=null,this.bearingTol=null,this.cumulativeCosts=null,this.cumulativeDistance=null,this.cumulativeDuration=null,this.curbApproach=null,this.departCurbApproach=null,this.departTime=null,this.departTimeOffset=null,this.distanceToNetworkInMeters=null,this.geometry=null,this.lateDuration=null,this.locationType=null,this.name=null,this.navLatency=null,this.objectId=null,this.popupTemplate=null,this.posAlong=null,this.routeName=null,this.serviceCosts=null,this.serviceDistance=null,this.serviceDuration=null,this.sequence=null,this.sideOfEdge=null,this.snapX=null,this.snapY=null,this.snapZ=null,this.sourceId=null,this.sourceOid=null,this.status=null,this.symbol=null,this.timeWindowEnd=null,this.timeWindowEndOffset=null,this.timeWindowStart=null,this.timeWindowStartOffset=null,this.violations=null,this.waitDuration=null,this.wait=null}readArriveTimeOffset(e,t){return re(t.attributes.ArriveTime,t.attributes.ArriveTimeUTC)}readCumulativeCosts(e,t){return ie(t.attributes,"Cumul_")}readDepartTimeOffset(e,t){return re(t.attributes.DepartTime,t.attributes.DepartTimeUTC)}readServiceCosts(e,t){return ie(t.attributes,"Attr_")}writeServiceCosts(e,t){if(!Object(b["j"])(e)){t.attributes||(t.attributes={});for(const i in e)t.attributes["Attr_"+i]=e[i]}}writeTimeWindowEnd(e,t){Object(b["j"])(e)||(t.attributes||(t.attributes={}),t.attributes.TimeWindowEnd=e.getTime())}writeTimeWindowStart(e,t){Object(b["j"])(e)||(t.attributes||(t.attributes={}),t.attributes.TimeWindowStart=e.getTime())}readViolations(e,t){return ie(t.attributes,"Violation_")}readWait(e,t){return ie(t.attributes,"Wait_")}static fromPortalJSON(e){var t,i,r,a,o,l,n,u,p,c;return new Ne({arriveCurbApproach:Object(b["k"])(e.attributes.ArrivalCurbApproach)?K["b"].fromJSON(e.attributes.ArrivalCurbApproach):null,arriveTime:Object(b["k"])(e.attributes.ArrivalTime)?new Date(e.attributes.ArrivalTime):null,arriveTimeOffset:e.attributes.ArrivalUTCOffset,cumulativeCosts:Object(b["k"])(e.attributes.CumulativeCosts)?JSON.parse(e.attributes.CumulativeCosts):null,cumulativeDistance:null!=(t=e.attributes.CumulativeMeters)?t:null,cumulativeDuration:null!=(i=e.attributes.CumulativeMinutes)?i:null,curbApproach:Object(b["k"])(e.attributes.CurbApproach)?K["b"].fromJSON(e.attributes.CurbApproach):null,departCurbApproach:Object(b["k"])(e.attributes.DepartureCurbApproach)?K["b"].fromJSON(e.attributes.DepartureCurbApproach):null,departTime:Object(b["k"])(e.attributes.DepartureTime)?new Date(e.attributes.DepartureTime):null,departTimeOffset:null!=(r=e.attributes.DepartureUTCOffset)?r:null,geometry:X["a"].fromJSON(e.geometry),lateDuration:null!=(a=e.attributes.LateMinutes)?a:null,locationType:Object(b["k"])(e.attributes.LocationType)?K["j"].fromJSON(e.attributes.LocationType):null,name:e.attributes.Name,objectId:e.attributes.__OBJECTID,popupTemplate:Object(b["k"])(e.popupInfo)?s["a"].fromJSON(e.popupInfo):null,routeName:e.attributes.RouteName,sequence:null!=(o=e.attributes.Sequence)?o:null,serviceCosts:Object(b["k"])(e.attributes.ServiceCosts)?JSON.parse(e.attributes.ServiceCosts):null,serviceDistance:null!=(l=e.attributes.ServiceMeters)?l:null,serviceDuration:null!=(n=e.attributes.ServiceMinutes)?n:null,status:Object(b["k"])(e.attributes.Status)?K["n"].fromJSON(e.attributes.Status):null,symbol:Object(b["k"])(e.symbol)?Object(z["a"])(e.symbol):null,timeWindowEnd:Object(b["k"])(e.attributes.TimeWindowEnd)?new Date(e.attributes.TimeWindowEnd):null,timeWindowEndOffset:null!=(u=e.attributes.TimeWindowEndUTCOffset)?u:null,timeWindowStart:Object(b["k"])(e.attributes.TimeWindowStart)?new Date(e.attributes.TimeWindowStart):null,timeWindowStartOffset:null!=(p=e.attributes.TimeWindowStartUTCOffset)?p:null,waitDuration:null!=(c=e.attributes.WaitMinutes)?c:null})}clone(){return new Ne(Object(te["a"])({arriveCurbApproach:this.arriveCurbApproach,arriveTime:this.arriveTime,arriveTimeOffset:this.arriveTimeOffset,bearing:this.bearing,bearingTol:this.bearingTol,cumulativeCosts:this.cumulativeCosts,cumulativeDistance:this.cumulativeDistance,cumulativeTime:this.cumulativeDuration,curbApproach:this.curbApproach,departCurbApproach:this.departCurbApproach,departTime:this.departTime,departTimeOffset:this.departTimeOffset,distanceToNetworkInMeters:this.distanceToNetworkInMeters,geometry:this.geometry,lateDuration:this.lateDuration,locationType:this.locationType,name:this.name,navLatency:this.navLatency,objectId:this.objectId,popupTemplate:this.popupTemplate,posAlong:this.posAlong,routeName:this.routeName,serviceCosts:this.serviceCosts,serviceDistance:this.serviceDistance,serviceDuration:this.serviceDuration,sequence:this.sequence,sideOfEdge:this.sideOfEdge,snapX:this.snapX,snapY:this.snapY,snapZ:this.snapZ,sourceId:this.sourceId,sourceOid:this.sourceOid,status:this.status,symbol:this.symbol,timeWindowEnd:this.timeWindowEnd,timeWindowEndOffset:this.timeWindowEndOffset,timeWindowStart:this.timeWindowStart,timeWindowStartOffset:this.timeWindowStartOffset,waitDuration:this.waitDuration}))}toPortalJSON(){var e,t;return{geometry:Object(b["k"])(this.geometry)?this.geometry.toJSON():null,attributes:{__OBJECTID:Object(b["t"])(this.objectId),ArrivalCurbApproach:Object(b["k"])(this.arriveCurbApproach)?K["b"].toJSON(this.arriveCurbApproach):null,ArrivalTime:Object(b["k"])(this.arriveTime)?this.arriveTime.getTime():null,ArrivalUTCOffset:this.arriveTimeOffset,CumulativeCosts:Object(b["k"])(this.cumulativeCosts)?JSON.stringify(this.cumulativeCosts):null,CumulativeMeters:this.cumulativeDistance,CumulativeMinutes:this.cumulativeDuration,CurbApproach:Object(b["k"])(this.curbApproach)?K["b"].toJSON(this.curbApproach):null,DepartureCurbApproach:Object(b["k"])(this.departCurbApproach)?K["b"].toJSON(this.departCurbApproach):null,DepartureTime:Object(b["k"])(this.departTime)?this.departTime.getTime():null,DepartureUTCOffset:this.departTimeOffset,LateMinutes:this.lateDuration,LocationType:Object(b["k"])(this.locationType)?K["j"].toJSON(this.locationType):null,Name:Object(b["t"])(this.name),RouteName:Object(b["t"])(this.routeName),Sequence:this.sequence,ServiceCosts:Object(b["k"])(this.serviceCosts)?JSON.stringify(this.serviceCosts):null,ServiceMeters:this.serviceDistance,ServiceMinutes:this.serviceDuration,Status:Object(b["k"])(this.status)?K["n"].toJSON(this.status):null,TimeWindowEnd:Object(b["k"])(this.timeWindowEnd)?this.timeWindowEnd.getTime():null,TimeWindowEndUTCOffset:null!=(e=this.timeWindowEndOffset)?e:this.arriveTimeOffset,TimeWindowStart:Object(b["k"])(this.timeWindowStart)?this.timeWindowStart.getTime():null,TimeWindowStartUTCOffset:null!=(t=this.timeWindowEndOffset)?t:this.arriveTimeOffset,WaitMinutes:this.waitDuration},symbol:Object(b["k"])(this.symbol)?this.symbol.toJSON():null,popupInfo:Object(b["k"])(this.popupTemplate)?this.popupTemplate.toJSON():null}}};Ie.fields=[{name:"__OBJECTID",alias:"OBJECTID",type:"esriFieldTypeOID",editable:!1,nullable:!1,domain:null},{name:"ArrivalCurbApproach",alias:"Arrival Curb Approach",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNACurbApproachType",codedValues:[{name:"Either side",code:0},{name:"From the right",code:1},{name:"From the left",code:2},{name:"Depart in the same direction",code:3}]}},{name:"ArrivalTime",alias:"Arrival Time",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!0},{name:"ArrivalUTCOffset",alias:"Arrival Time: Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"CumulativeCosts",alias:"Cumulative Costs",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"CumulativeMeters",alias:"Cumulative Meters",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"CumulativeMinutes",alias:"Cumulative Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"CurbApproach",alias:"Curb Approach",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!1,domain:{type:"codedValue",name:"esriNACurbApproachType",codedValues:[{name:"Either side",code:0},{name:"From the right",code:1},{name:"From the left",code:2},{name:"Depart in the same direction",code:3}]}},{name:"DepartureCurbApproach",alias:"Departure Curb Approach",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNACurbApproachType",codedValues:[{name:"Either side",code:0},{name:"From the right",code:1},{name:"From the left",code:2},{name:"Depart in the same direction",code:3}]}},{name:"DepartureTime",alias:"Departure Time",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!0},{name:"DepartureUTCOffset",alias:"Departure Time: Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"LateMinutes",alias:"Minutes Late",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!1},{name:"LocationType",alias:"Location Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNALocationType",codedValues:[{name:"Stop",code:0},{name:"Waypoint",code:1}]}},{name:"Name",alias:"Name",type:"esriFieldTypeString",length:255,editable:!0,nullable:!0,visible:!0},{name:"RouteName",alias:"Route Name",type:"esriFieldTypeString",length:255,editable:!0,nullable:!0,visible:!0},{name:"Sequence",alias:"Sequence",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"ServiceCosts",alias:"Service Costs",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"ServiceMeters",alias:"Service Meters",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!1},{name:"ServiceMinutes",alias:"Service Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!1},{name:"Status",alias:"Status",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNAObjectStatus",codedValues:[{name:"OK",code:0},{name:"Not Located on Network",code:1},{name:"Network Unbuilt",code:2},{name:"Prohibited Street",code:3},{name:"Invalid Field Values",code:4},{name:"Cannot Reach",code:5},{name:"Time Window Violation",code:6}]}},{name:"TimeWindowEnd",alias:"Time Window End",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!1},{name:"TimeWindowEndUTCOffset",alias:"Time Window End: Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"TimeWindowStart",alias:"Time Window Start",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!1},{name:"TimeWindowStartUTCOffset",alias:"Time Window Start: Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"WaitMinutes",alias:"Minutes Early",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!1}],Ie.popupInfo={title:"{Name}",fieldInfos:[{fieldName:"Name",label:"Name",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"RouteName",label:"Route Name",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"Sequence",label:"Sequence",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ArrivalTime",label:"Arrival Time",isEditable:!0,tooltip:"",visible:!0,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"ArrivalUTCOffset",label:"Arrival Time: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"DepartureTime",label:"Departure Time",isEditable:!0,tooltip:"",visible:!0,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"DepartureUTCOffset",label:"Departure Time: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"CurbApproach",label:"Curb Approach",isEditable:!0,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ArrivalCurbApproach",label:"Arrival Curb Approach",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"DepartureCurbApproach",label:"Departure Curb Approach",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Status",label:"Status",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"LocationType",label:"Location Type",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TimeWindowStart",label:"Time Window Start",isEditable:!0,tooltip:"",visible:!1,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"TimeWindowStartUTCOffset",label:"Time Window Start: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TimeWindowEnd",label:"Time Window End",isEditable:!0,tooltip:"",visible:!1,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"TimeWindowEndUTCOffset",label:"Time Window End: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ServiceMinutes",label:"Service Minutes",isEditable:!0,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ServiceMeters",label:"Service Meters",isEditable:!0,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ServiceCosts",label:"Service Costs",isEditable:!0,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"CumulativeMinutes",label:"Cumulative Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"CumulativeMeters",label:"Cumulative Meters",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"CumulativeCosts",label:"Cumulative Costs",isEditable:!0,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"LateMinutes",label:"Minutes Late",isEditable:!1,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"WaitMinutes",label:"Minutes Early",isEditable:!1,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},Object(r["a"])([Object(f["b"])({type:K["b"].apiValues,json:{read:{source:"attributes.ArrivalCurbApproach",reader:K["b"].read}}})],Ie.prototype,"arriveCurbApproach",void 0),Object(r["a"])([Object(f["b"])({type:Date,json:{read:{source:"attributes.ArriveTimeUTC"}}})],Ie.prototype,"arriveTime",void 0),Object(r["a"])([Object(f["b"])()],Ie.prototype,"arriveTimeOffset",void 0),Object(r["a"])([Object(v["a"])("arriveTimeOffset",["attributes.ArriveTime","attributes.ArriveTimeUTC"])],Ie.prototype,"readArriveTimeOffset",null),Object(r["a"])([Object(f["b"])({json:{name:"attributes.Bearing",read:!1,write:!0}})],Ie.prototype,"bearing",void 0),Object(r["a"])([Object(f["b"])({json:{name:"attributes.BearingTol",read:!1,write:!0}})],Ie.prototype,"bearingTol",void 0),Object(r["a"])([Object(f["b"])()],Ie.prototype,"cumulativeCosts",void 0),Object(r["a"])([Object(v["a"])("cumulativeCosts",["attributes"])],Ie.prototype,"readCumulativeCosts",null),Object(r["a"])([Object(f["b"])({json:{read:!1}})],Ie.prototype,"cumulativeDistance",void 0),Object(r["a"])([Object(f["b"])({json:{read:!1}})],Ie.prototype,"cumulativeDuration",void 0),Object(r["a"])([Object(f["b"])({type:K["b"].apiValues,json:{name:"attributes.CurbApproach",read:{reader:K["b"].read},write:{writer:K["b"].write}}})],Ie.prototype,"curbApproach",void 0),Object(r["a"])([Object(f["b"])({type:K["b"].apiValues,json:{read:{source:"attributes.DepartCurbApproach",reader:K["b"].read}}})],Ie.prototype,"departCurbApproach",void 0),Object(r["a"])([Object(f["b"])({type:Date,json:{read:{source:"attributes.DepartTimeUTC"}}})],Ie.prototype,"departTime",void 0),Object(r["a"])([Object(f["b"])()],Ie.prototype,"departTimeOffset",void 0),Object(r["a"])([Object(v["a"])("departTimeOffset",["attributes.DepartTime","attributes.DepartTimeUTC"])],Ie.prototype,"readDepartTimeOffset",null),Object(r["a"])([Object(f["b"])({json:{read:{source:"attributes.DistanceToNetworkInMeters"}}})],Ie.prototype,"distanceToNetworkInMeters",void 0),Object(r["a"])([Object(f["b"])({type:X["a"],json:{write:!0}})],Ie.prototype,"geometry",void 0),Object(r["a"])([Object(f["b"])({json:{name:"attributes.LateMinutes",read:!1}})],Ie.prototype,"lateDuration",void 0),Object(r["a"])([Object(f["b"])({type:K["j"].apiValues,json:{name:"attributes.LocationType",read:{reader:K["j"].read},write:{writer:K["j"].write}}})],Ie.prototype,"locationType",void 0),Object(r["a"])([Object(f["b"])({json:{name:"attributes.Name",write:!0}})],Ie.prototype,"name",void 0),Object(r["a"])([Object(f["b"])({json:{read:{source:"attributes.NavLatency"}}})],Ie.prototype,"navLatency",void 0),Object(r["a"])([Object(f["b"])({json:{name:"attributes.ObjectID",write:!0}})],Ie.prototype,"objectId",void 0),Object(r["a"])([Object(f["b"])({type:s["a"],json:{read:!1}})],Ie.prototype,"popupTemplate",void 0),Object(r["a"])([Object(f["b"])({json:{read:{source:"attributes.PosAlong"}}})],Ie.prototype,"posAlong",void 0),Object(r["a"])([Object(f["b"])({json:{name:"attributes.RouteName",write:!0}})],Ie.prototype,"routeName",void 0),Object(r["a"])([Object(f["b"])()],Ie.prototype,"serviceCosts",void 0),Object(r["a"])([Object(v["a"])("serviceCosts",["attributes"])],Ie.prototype,"readServiceCosts",null),Object(r["a"])([Object(g["a"])("serviceCosts")],Ie.prototype,"writeServiceCosts",null),Object(r["a"])([Object(f["b"])({json:{read:!1}})],Ie.prototype,"serviceDistance",void 0),Object(r["a"])([Object(f["b"])({json:{read:!1}})],Ie.prototype,"serviceDuration",void 0),Object(r["a"])([Object(f["b"])({json:{name:"attributes.Sequence",write:!0}})],Ie.prototype,"sequence",void 0),Object(r["a"])([Object(f["b"])({type:K["m"].apiValues,json:{read:{source:"attributes.SideOfEdge",reader:K["m"].read}}})],Ie.prototype,"sideOfEdge",void 0),Object(r["a"])([Object(f["b"])({json:{read:{source:"attributes.SnapX"}}})],Ie.prototype,"snapX",void 0),Object(r["a"])([Object(f["b"])({json:{read:{source:"attributes.SnapY"}}})],Ie.prototype,"snapY",void 0),Object(r["a"])([Object(f["b"])({json:{read:{source:"attributes.SnapZ"}}})],Ie.prototype,"snapZ",void 0),Object(r["a"])([Object(f["b"])({json:{read:{source:"attributes.SourceID"}}})],Ie.prototype,"sourceId",void 0),Object(r["a"])([Object(f["b"])({json:{read:{source:"attributes.SourceOID"}}})],Ie.prototype,"sourceOid",void 0),Object(r["a"])([Object(f["b"])({type:K["n"].apiValues,json:{read:{source:"attributes.Status",reader:K["n"].read}}})],Ie.prototype,"status",void 0),Object(r["a"])([Object(f["b"])({types:E["e"],json:{read:!1}})],Ie.prototype,"symbol",void 0),Object(r["a"])([Object(f["b"])({type:Date,json:{name:"attributes.TimeWindowEnd"}})],Ie.prototype,"timeWindowEnd",void 0),Object(r["a"])([Object(g["a"])("timeWindowEnd")],Ie.prototype,"writeTimeWindowEnd",null),Object(r["a"])([Object(f["b"])({json:{read:!1}})],Ie.prototype,"timeWindowEndOffset",void 0),Object(r["a"])([Object(f["b"])({type:Date,json:{name:"attributes.TimeWindowStart"}})],Ie.prototype,"timeWindowStart",void 0),Object(r["a"])([Object(g["a"])("timeWindowStart")],Ie.prototype,"writeTimeWindowStart",null),Object(r["a"])([Object(f["b"])({json:{read:!1}})],Ie.prototype,"timeWindowStartOffset",void 0),Object(r["a"])([Object(f["b"])()],Ie.prototype,"violations",void 0),Object(r["a"])([Object(v["a"])("violations",["attributes"])],Ie.prototype,"readViolations",null),Object(r["a"])([Object(f["b"])({json:{read:!1}})],Ie.prototype,"waitDuration",void 0),Object(r["a"])([Object(f["b"])()],Ie.prototype,"wait",void 0),Object(r["a"])([Object(v["a"])("wait",["attributes"])],Ie.prototype,"readWait",null),Ie=Ne=Object(r["a"])([Object(T["a"])("esri.rest.support.Stop")],Ie);const Ce=Ie;var De=i("57dc");function Ae(e){return e.length?e:null}function Fe(e){return"layers"in e}function Be(e){return"esri.rest.support.FeatureSet"===e.declaredClass}function ke(e){return"esri.rest.support.NetworkFeatureSet"===e.declaredClass}function Ee(e,t,i){var r,a,o,s,l,n,p,c,d,m,y;const{impedance:O,networkDataset:j,supportedTravelModes:f,defaultTravelMode:h}=t,v=j.networkAttributes.filter(e=>"esriNAUTCost"===e.usageType),T=f.find(e=>e.id===h),g=null!=(r=i.travelMode)?r:T;if(Object(b["j"])(g))return void Ve.warn("route-layer:missing-travel-mode","The routing service must have a default travel mode or one must be specified in the route parameter.");const{timeAttributeName:S,distanceAttributeName:w}=g,N=v.find(e=>e.name===S),I=v.find(e=>e.name===w),C=null!=(a=null!=(o=null==(s=i.travelMode)?void 0:s.impedanceAttributeName)?o:i.impedanceAttribute)?a:O,D=K["g"].fromJSON(null==N?void 0:N.units),A=K["e"].fromJSON(null==I?void 0:I.units);if(!D||!A)throw new u["a"]("routelayer:unknown-impedance-units","the units of either the distance or time impedance are unknown");const F=null!=(l=i.directionsLanguage)?l:t.directionsLanguage,B=null!=(n=null!=(p=i.accumulateAttributes)?p:t.accumulateAttributeNames)?n:[],k=new Set(v.filter(({name:e})=>e===S||e===w||e===C||B.includes(e)).map(({name:e})=>e)),E=e=>{for(const t in e)k.has(t)||delete e[t]};for(const u of e.pointBarriers){var x;Object(b["k"])(u.costs)&&(u.addedCost=null!=(x=u.costs[C])?x:0,E(u.costs))}for(const u of e.polygonBarriers){var P;Object(b["k"])(u.costs)&&(u.scaleFactor=null!=(P=u.costs[C])?P:1,E(u.costs))}for(const u of e.polylineBarriers){var M;Object(b["k"])(u.costs)&&(u.scaleFactor=null!=(M=u.costs[C])?M:1,E(u.costs))}const{routeInfo:J}=e,{findBestSequence:L,preserveFirstStop:U,preserveLastStop:_,startTimeIsUTC:W,timeWindowsAreUTC:R}=i;J.analysisSettings=new ye({accumulateAttributes:B,directionsLanguage:F,findBestSequence:L,preserveFirstStop:U,preserveLastStop:_,startTimeIsUTC:W,timeWindowsAreUTC:R,travelMode:g}),J.totalDuration=Pe(null!=(c=J.totalCosts[S])?c:0,D),J.totalDistance=Me(null!=(d=J.totalCosts[w])?d:0,A),J.totalLateDuration=Pe(null!=(m=J.totalViolations[S])?m:0,D),J.totalWaitDuration=Pe(null!=(y=J.totalWait[S])?y:0,D),Object(b["k"])(J.totalCosts)&&E(J.totalCosts),Object(b["k"])(J.totalViolations)&&E(J.totalViolations),Object(b["k"])(J.totalWait)&&E(J.totalWait);for(const u of e.stops){var V,q,G,z,Z,H;Object(b["k"])(u.serviceCosts)&&(u.serviceDuration=Pe(null!=(V=u.serviceCosts[S])?V:0,D),u.serviceDistance=Me(null!=(q=u.serviceCosts[w])?q:0,A),E(u.serviceCosts)),Object(b["k"])(u.cumulativeCosts)&&(u.cumulativeDuration=Pe(null!=(G=u.cumulativeCosts[S])?G:0,D),u.cumulativeDistance=Me(null!=(z=u.cumulativeCosts[w])?z:0,A),E(u.cumulativeCosts)),Object(b["k"])(u.violations)&&(u.lateDuration=Pe(null!=(Z=u.violations[S])?Z:0,D),E(u.violations)),Object(b["k"])(u.wait)&&(u.waitDuration=Pe(null!=(H=u.wait[S])?H:0,D),E(u.wait))}}async function xe(e){const t=ge["a"].WGS84;return await Object(N["g"])(e.spatialReference,t),Object(N["m"])(e,t)}function Pe(e,t){switch(t){case"seconds":return e/60;case"hours":return 60*e;case"days":return 60*e*24;default:return e}}function Me(e,t){return"decimal-degrees"===t||"points"===t||"unknown"===t?e:Object(O["c"])(e,t,"meters")}const Je=n["a"].ofType(H),Le=n["a"].ofType($),Ue=n["a"].ofType(oe),_e=n["a"].ofType(ue),We=n["a"].ofType(be),Re=n["a"].ofType(Ce),Ve=c["a"].getLogger("esri.layers.RouteLayer");let qe=class extends(Object(D["a"])(Object(B["a"])(Object(A["a"])(Object(F["a"])(Object(d["a"])(Object(p["b"])(C["a"]))))))){constructor(...e){super(...e),this._featureCollection=null,this._type="Feature Collection",this.defaultSymbols=new U,this.directionLines=null,this.directionPoints=null,this.featureCollectionType="route",this.legendEnabled=!1,this.maxScale=0,this.minScale=0,this.pointBarriers=new Ue,this.polygonBarriers=new _e,this.polylineBarriers=new We,this.routeInfo=null,this.spatialReference=ge["a"].WGS84,this.stops=new Re,this.type="route",this.handles.add(Object(y["e"])(()=>this.stops.toArray(),()=>{Object(b["j"])(this.routeInfo)&&this._setStopSymbol(this.stops)},{sync:!0}))}writeFeatureCollectionWebmap(e,t,i,r){const a=[this._writePolygonBarriers(),this._writePolylineBarriers(),this._writePointBarriers(),this._writeRouteInfo(),this._writeDirectionLines(),this._writeDirectionPoints(),this._writeStops()].filter(e=>!!e),o=a.map((e,t)=>t),s="web-map"===r.origin?"featureCollection.layers":"layers";Object(m["c"])(s,a,t),t.opacity=this.opacity,t.visibility=this.visible,t.visibleLayers=o}readDirectionLines(e,t){return this._getNetworkFeatures(t,"DirectionLines",e=>H.fromPortalJSON(e))}readDirectionPoints(e,t){return this._getNetworkFeatures(t,"DirectionPoints",e=>$.fromPortalJSON(e))}get fullExtent(){if(Object(b["k"])(this.routeInfo)&&Object(b["k"])(this.routeInfo.geometry))return this.routeInfo.geometry.extent;if(this.stops.length>1){const{spatialReference:e}=this.stops[0],t=new De["a"]({spatialReference:e}),i=this.stops.toArray().map(e=>e.geometry);for(const r of i)Object(b["k"])(r)&&t.addPoint(r);return t.extent}return new w["a"]({xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:ge["a"].WGS84})}readMaxScale(e,t){var i;const r=(Fe(t)?t.layers:t.featureCollection.layers).find(e=>Object(b["k"])(e.layerDefinition.maxScale));return null!=(i=null==r?void 0:r.layerDefinition.maxScale)?i:0}readMinScale(e,t){var i;const r=(Fe(t)?t.layers:t.featureCollection.layers).find(e=>Object(b["k"])(e.layerDefinition.minScale));return null!=(i=null==r?void 0:r.layerDefinition.minScale)?i:0}readPointBarriers(e,t){return this._getNetworkFeatures(t,"Barriers",e=>oe.fromPortalJSON(e))}readPolygonBarriers(e,t){return this._getNetworkFeatures(t,"PolygonBarriers",e=>ue.fromPortalJSON(e))}readPolylineBarriers(e,t){return this._getNetworkFeatures(t,"PolylineBarriers",e=>be.fromPortalJSON(e))}readRouteInfo(e,t){const i=this._getNetworkFeatures(t,"RouteInfo",e=>fe.fromPortalJSON(e));return i.length>0?i.getItemAt(0):null}readSpatialReference(e,t){var i,r;const a=Fe(t)?t.layers:t.featureCollection.layers;if(!a.length)return ge["a"].WGS84;const{layerDefinition:o}=a[0],s=null!=(i=null!=(r=o.spatialReference)?r:o.extent.spatialReference)?i:I["b"];return ge["a"].fromJSON(s)}readStops(e,t){return this._getNetworkFeatures(t,"Stops",e=>Ce.fromPortalJSON(e),e=>this._setStopSymbol(e))}get title(){return Object(b["k"])(this.routeInfo)&&Object(b["k"])(this.routeInfo.name)?this.routeInfo.name:"Route"}set title(e){e?this._override("title",e):this._clearOverride("title")}get url(){return a["a"].routeServiceUrl}set url(e){null!=e?this._set("url",Object(k["g"])(e,Ve)):this._set("url",a["a"].routeServiceUrl)}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Feature Collection"]},e)),Promise.resolve(this)}removeAll(){Object(b["k"])(this.directionLines)&&(this.directionLines.removeAll(),this._set("directionLines",null)),Object(b["k"])(this.directionPoints)&&(this.directionPoints.removeAll(),this._set("directionPoints",null)),Object(b["k"])(this.routeInfo)&&this._set("routeInfo",null),this.pointBarriers.removeAll(),this.polygonBarriers.removeAll(),this.polylineBarriers.removeAll(),this.stops.removeAll()}async save(){await this.load();const{fullExtent:e,portalItem:t}=this;if(!t)throw new u["a"]("routelayer:portal-item-not-set","save() requires to the layer to have a portal item");if(!t.id)throw new u["a"]("routelayer:portal-item-not-saved","Please use saveAs() first to save the routelayer");if("Feature Collection"!==t.type)throw new u["a"]("routelayer:portal-item-wrong-type",'Portal item needs to have type "Feature Collection"');if(Object(b["j"])(this.routeInfo))throw new u["a"]("routelayer:route-unsolved","save() requires a solved route");const{portal:i}=t;if(await i._signIn(),i.user||await t.reload(),i.user.username!==t.owner)throw new u["a"]("routelayer:not-portal-item-owner","You can only overwrite your portal items");const{itemUrl:r}=t,a={messages:[],origin:"portal-item",portal:i,url:r&&Object(j["M"])(r),writtenProperties:[]},o=this.write(null,a);return t.extent=await xe(e),t.title=this.title,await t.update({data:o}),t}async saveAs(e,t={}){if(await this.load(),Object(b["j"])(this.routeInfo))throw new u["a"]("routelayer:route-unsolved","saveAs() requires a solved route");const i=R["default"].from(e).clone();null!=i.extent||(i.extent=await xe(this.fullExtent)),i.id=null,null!=i.portal||(i.portal=W["a"].getDefault()),null!=i.title||(i.title=this.title),i.type="Feature Collection",i.typeKeywords=["Data","Feature Collection","Multilayer","Route Layer"];const{portal:r}=i,a={messages:[],origin:"portal-item",portal:r,url:null,writtenProperties:[]};await r._signIn();const o=null==t?void 0:t.folder,s=this.write(null,a);return await r.user.addItem({item:i,folder:o,data:s}),this.portalItem=i,Object(S["a"])(a),a.portalItem=i,i}async solve(e,t){var i,r,a,o,s,l;const p=null!=(i=null==e?void 0:e.stops)?i:this.stops,c=null!=(r=null==e?void 0:e.pointBarriers)?r:Ae(this.pointBarriers),d=null!=(a=null==e?void 0:e.polylineBarriers)?a:Ae(this.polylineBarriers),m=null!=(o=null==e?void 0:e.polygonBarriers)?o:Ae(this.polygonBarriers);if(Object(b["j"])(p))throw new u["a"]("routelayer:undefined-stops","the route layer must have stops defined in the route parameters.");if((Be(p)||ke(p))&&p.features.length<2||n["a"].isCollection(p)&&p.length<2)throw new u["a"]("routelayer:insufficent-stops","the route layer must have two or more stops to solve a route.");const y=await Object(V["c"])(this.url,null==e?void 0:e.apiKey,t),{defaultTravelMode:O,supportedTravelModes:j}=y,f=j.find(e=>e.id===O),h=null!=(s=null==e?void 0:e.travelMode)?s:f,v=null!=(l=null==e?void 0:e.accumulateAttributes)?l:[];Object(b["k"])(h)&&v.push(h.distanceAttributeName);const T={startTime:new Date},g={accumulateAttributes:v,directionsOutputType:"featuresets",ignoreInvalidLocations:!0,pointBarriers:c,polylineBarriers:d,polygonBarriers:m,preserveFirstStop:!0,preserveLastStop:!0,returnBarriers:!!c,returnDirections:!0,returnPolygonBarriers:!!m,returnPolylineBarriers:!!d,returnRoutes:!0,returnStops:!0,stops:p},S=e?we.from(e):new we;for(const n in T)null==S[n]&&(S[n]=T[n]);S.set(g);const w=await Object(q["a"])(this.url,S,t),N=this._toRouteLayerSolution(w);return this._isOverridden("title")||(this.title=Object(b["w"])(N.routeInfo.name,"Route")),Ee(N,y,S),N}update(e){const{stops:t,directionLines:i,directionPoints:r,pointBarriers:a,polylineBarriers:o,polygonBarriers:s,routeInfo:l}=e;this.set({stops:t,pointBarriers:a,polylineBarriers:o,polygonBarriers:s}),this._set("directionLines",i),this._set("directionPoints",r),this._set("routeInfo",l)}_getLayerDefinition(){return{capabilities:"Query,Update,Editing",extent:this.fullExtent.toJSON(),hasM:!1,hasZ:!1,maxScale:this.maxScale,minScale:this.minScale,objectIdField:"__OBJECTID",spatialReference:this.spatialReference.toJSON(),type:"Feature Layer",typeIdField:""}}_getNetworkFeatures(e,t,i,r){const a=(Fe(e)?e.layers:e.featureCollection.layers).find(e=>e.layerDefinition.name===t);if(Object(b["j"])(a))return new n["a"];const{layerDefinition:u,popupInfo:p,featureSet:c}=a,d=u.drawingInfo.renderer,{features:m}=c,y=d&&Object(l["b"])(d),O=m.map(e=>{var r;const a=i(e),{attributes:l}=e,n=new o["a"]({attributes:l});return null!=a.symbol||(a.symbol=null!=(r=null==y?void 0:y.getSymbol(n))?r:this._getNetworkSymbol(t)),null!=a.popupTemplate||(a.popupTemplate=p&&s["a"].fromJSON(p)),a});return r&&O.some(e=>!e.symbol)&&r(O),new n["a"](O)}_getNetworkSymbol(e){switch(e){case"Barriers":return this.defaultSymbols.pointBarriers;case"DirectionPoints":return this.defaultSymbols.directionPoints;case"DirectionLines":return this.defaultSymbols.directionLines;case"PolylineBarriers":return this.defaultSymbols.polylineBarriers;case"PolygonBarriers":return this.defaultSymbols.polygonBarriers;case"RouteInfo":return this.defaultSymbols.routeInfo;case"Stops":return null}}_setStopSymbol(e){if(!e||0===e.length)return;if(Object(b["j"])(this.routeInfo)||1===e.length)return void e.forEach((t,i)=>{switch(i){case 0:t.symbol=this.defaultSymbols.firstStop;break;case e.length-1:t.symbol=this.defaultSymbols.lastStop;break;default:t.symbol=this.defaultSymbols.middleStop}});const t=e.map(e=>e.sequence).filter(e=>Object(b["k"])(e)),i=Math.min(...t),r=Math.max(...t);for(const a of e)a.sequence!==i?a.sequence!==r?"ok"===a.status||"not-located-on-closest"===a.status?"waypoint"!==a.locationType?"break"!==a.locationType?a.symbol=this.defaultSymbols.middleStop:a.symbol=this.defaultSymbols.breakStop:a.symbol=this.defaultSymbols.waypointStop:a.symbol=this.defaultSymbols.invalidStop:a.symbol=this.defaultSymbols.lastStop:a.symbol=this.defaultSymbols.firstStop}_toRouteLayerSolution(e){var t,i,r,a,o;const s=e.routeResults[0].stops.map(e=>Ce.fromJSON(e.toJSON()));this._setStopSymbol(s);const l=new Re(s),n=new _e(null==(t=e.polygonBarriers)?void 0:t.map(e=>{const t=ue.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.polygonBarriers,t})),u=new We(null==(i=e.polylineBarriers)?void 0:i.map(e=>{const t=be.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.polylineBarriers,t})),p=new Ue(null==(r=e.pointBarriers)?void 0:r.map(e=>{const t=oe.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.pointBarriers,t})),c=fe.fromJSON(e.routeResults[0].route.toJSON());c.symbol=this.defaultSymbols.routeInfo;const b=new Le(null==(a=e.routeResults[0].directionPoints)?void 0:a.features.map(e=>{const t=$.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.directionPoints,t}));return{directionLines:new Je(null==(o=e.routeResults[0].directionLines)?void 0:o.features.map(e=>{const t=H.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.directionLines,t})),directionPoints:b,pointBarriers:p,polygonBarriers:n,polylineBarriers:u,routeInfo:c,stops:l}}_writeDirectionLines(){return Object(b["j"])(this.directionLines)||!this.directionLines.length?null:{featureSet:{features:this.directionLines.toArray().map(e=>e.toPortalJSON()),geometryType:"esriGeometryPolyline"},layerDefinition:{...this._getLayerDefinition(),drawingInfo:{renderer:{type:"simple",symbol:this.defaultSymbols.directionLines.toJSON()}},fields:H.fields,geometryType:"esriGeometryPolyline",name:"DirectionLines",title:"Direction Lines"},popupInfo:H.popupInfo}}_writeDirectionPoints(){return Object(b["j"])(this.directionPoints)||!this.directionPoints.length?null:{featureSet:{features:this.directionPoints.toArray().map(e=>e.toPortalJSON()),geometryType:"esriGeometryPoint"},layerDefinition:{...this._getLayerDefinition(),drawingInfo:{renderer:{type:"simple",symbol:this.defaultSymbols.directionPoints.toJSON()}},fields:$.fields,geometryType:"esriGeometryPoint",name:"DirectionPoints",title:"Direction Points"},popupInfo:$.popupInfo}}_writePointBarriers(){return Object(b["j"])(this.pointBarriers)||!this.pointBarriers.length?null:{featureSet:{features:this.pointBarriers.toArray().map(e=>e.toPortalJSON()),geometryType:"esriGeometryPoint"},layerDefinition:{...this._getLayerDefinition(),drawingInfo:{renderer:{type:"simple",symbol:this.defaultSymbols.pointBarriers.toJSON()}},fields:oe.fields,geometryType:"esriGeometryPoint",name:"Barrier",title:"Point Barrier"},popupInfo:oe.popupInfo}}_writePolygonBarriers(){return Object(b["j"])(this.polygonBarriers)||!this.polygonBarriers.length?null:{featureSet:{features:this.polygonBarriers.toArray().map(e=>e.toPortalJSON()),geometryType:"esriGeometryPolygon"},layerDefinition:{...this._getLayerDefinition(),drawingInfo:{renderer:{type:"simple",symbol:this.defaultSymbols.polygonBarriers.toJSON()}},fields:ue.fields,geometryType:"esriGeometryPolygon",name:"PolygonBarriers",title:"Polygon Barriers"},popupInfo:ue.popupInfo}}_writePolylineBarriers(){return Object(b["j"])(this.polylineBarriers)||!this.polylineBarriers.length?null:{featureSet:{features:this.polylineBarriers.toArray().map(e=>e.toPortalJSON()),geometryType:"esriGeometryPolyline"},layerDefinition:{...this._getLayerDefinition(),drawingInfo:{renderer:{type:"simple",symbol:this.defaultSymbols.polylineBarriers.toJSON()}},fields:be.fields,geometryType:"esriGeometryPolyline",name:"PolylineBarriers",title:"Line Barriers"},popupInfo:be.popupInfo}}_writeRouteInfo(){return Object(b["j"])(this.routeInfo)?null:{featureSet:{features:[this.routeInfo.toPortalJSON()],geometryType:"esriGeometryPolyline"},layerDefinition:{...this._getLayerDefinition(),drawingInfo:{renderer:{type:"simple",symbol:this.defaultSymbols.routeInfo.toJSON()}},fields:fe.fields,geometryType:"esriGeometryPolyline",name:"RouteInfo",title:"Route Details"},popupInfo:fe.popupInfo}}_writeStops(){return Object(b["j"])(this.stops)||!this.stops.length?null:{featureSet:{features:this.stops.toArray().map(e=>e.toPortalJSON()),geometryType:"esriGeometryPoint"},layerDefinition:{...this._getLayerDefinition(),drawingInfo:{renderer:{type:"uniqueValue",field1:"Sequence",defaultSymbol:this.defaultSymbols.middleStop.toJSON(),uniqueValueInfos:[{value:"1",symbol:this.defaultSymbols.firstStop.toJSON(),label:"First Stop"},{value:""+this.stops.length,symbol:this.defaultSymbols.lastStop.toJSON(),label:"Last Stop"}]}},fields:Ce.fields,geometryType:"esriGeometryPoint",name:"Stops",title:"Stops"},popupInfo:Ce.popupInfo}}};Object(r["a"])([Object(f["b"])({readOnly:!0,json:{read:!1,origins:{"portal-item":{write:{allowNull:!0,ignoreOrigin:!0}},"web-map":{write:{overridePolicy(){return{allowNull:!0,ignoreOrigin:null==this.portalItem}}}}}}})],qe.prototype,"_featureCollection",void 0),Object(r["a"])([Object(g["a"])(["web-map","portal-item"],"_featureCollection")],qe.prototype,"writeFeatureCollectionWebmap",null),Object(r["a"])([Object(f["b"])({readOnly:!0,json:{read:!1,origins:{"web-map":{write:{target:"type",overridePolicy(){return{ignoreOrigin:null!=this.portalItem}}}}}}})],qe.prototype,"_type",void 0),Object(r["a"])([Object(f["b"])({nonNullable:!0,type:U})],qe.prototype,"defaultSymbols",void 0),Object(r["a"])([Object(f["b"])({readOnly:!0})],qe.prototype,"directionLines",void 0),Object(r["a"])([Object(v["a"])(["web-map","portal-item"],"directionLines",["layers","featureCollection.layers"])],qe.prototype,"readDirectionLines",null),Object(r["a"])([Object(f["b"])({readOnly:!0})],qe.prototype,"directionPoints",void 0),Object(r["a"])([Object(v["a"])(["web-map","portal-item"],"directionPoints",["layers","featureCollection.layers"])],qe.prototype,"readDirectionPoints",null),Object(r["a"])([Object(f["b"])({readOnly:!0,json:{read:!1,origins:{"web-map":{write:{ignoreOrigin:!0}}}}})],qe.prototype,"featureCollectionType",void 0),Object(r["a"])([Object(f["b"])({readOnly:!0})],qe.prototype,"fullExtent",null),Object(r["a"])([Object(f["b"])({json:{origins:{"web-map":{name:"featureCollection.showLegend"}},write:!0}})],qe.prototype,"legendEnabled",void 0),Object(r["a"])([Object(f["b"])({type:["show","hide"]})],qe.prototype,"listMode",void 0),Object(r["a"])([Object(f["b"])({type:Number,nonNullable:!0,json:{write:!1}})],qe.prototype,"maxScale",void 0),Object(r["a"])([Object(v["a"])(["web-map","portal-item"],"maxScale",["layers","featureCollection.layers"])],qe.prototype,"readMaxScale",null),Object(r["a"])([Object(f["b"])({type:Number,nonNullable:!0,json:{write:!1}})],qe.prototype,"minScale",void 0),Object(r["a"])([Object(v["a"])(["web-map","portal-item"],"minScale",["layers","featureCollection.layers"])],qe.prototype,"readMinScale",null),Object(r["a"])([Object(f["b"])({type:["ArcGISFeatureLayer"],value:"ArcGISFeatureLayer"})],qe.prototype,"operationalLayerType",void 0),Object(r["a"])([Object(f["b"])({nonNullable:!0,type:n["a"].ofType(oe)})],qe.prototype,"pointBarriers",void 0),Object(r["a"])([Object(v["a"])(["web-map","portal-item"],"pointBarriers",["layers","featureCollection.layers"])],qe.prototype,"readPointBarriers",null),Object(r["a"])([Object(f["b"])({nonNullable:!0,type:n["a"].ofType(ue)})],qe.prototype,"polygonBarriers",void 0),Object(r["a"])([Object(v["a"])(["web-map","portal-item"],"polygonBarriers",["layers","featureCollection.layers"])],qe.prototype,"readPolygonBarriers",null),Object(r["a"])([Object(f["b"])({nonNullable:!0,type:n["a"].ofType(be)})],qe.prototype,"polylineBarriers",void 0),Object(r["a"])([Object(v["a"])(["web-map","portal-item"],"polylineBarriers",["layers","featureCollection.layers"])],qe.prototype,"readPolylineBarriers",null),Object(r["a"])([Object(f["b"])({readOnly:!0})],qe.prototype,"routeInfo",void 0),Object(r["a"])([Object(v["a"])(["web-map","portal-item"],"routeInfo",["layers","featureCollection.layers"])],qe.prototype,"readRouteInfo",null),Object(r["a"])([Object(f["b"])({type:ge["a"]})],qe.prototype,"spatialReference",void 0),Object(r["a"])([Object(v["a"])(["web-map","portal-item"],"spatialReference",["layers","featureCollection.layers"])],qe.prototype,"readSpatialReference",null),Object(r["a"])([Object(f["b"])({nonNullable:!0,type:n["a"].ofType(Ce)})],qe.prototype,"stops",void 0),Object(r["a"])([Object(v["a"])(["web-map","portal-item"],"stops",["layers","featureCollection.layers"])],qe.prototype,"readStops",null),Object(r["a"])([Object(f["b"])()],qe.prototype,"title",null),Object(r["a"])([Object(f["b"])({readOnly:!0,json:{read:!1}})],qe.prototype,"type",void 0),Object(r["a"])([Object(f["b"])()],qe.prototype,"url",null),qe=Object(r["a"])([Object(T["a"])("esri.layers.RouteLayer")],qe);const Ge=qe},c279:function(e,t,i){"use strict";i.d(t,"a",(function(){return f})),i.d(t,"b",(function(){return h})),i.d(t,"c",(function(){return T})),i.d(t,"d",(function(){return v}));var r=i("2eab"),a=i("ce50"),o=i("b2b2"),s=i("9d1d"),l=i("e041"),n=i("bb72"),u=i("a4ee"),p=i("6a0ed"),c=i("59b2"),b=(i("b50f"),i("c120"),i("cea0"),i("448d")),d=i("d386"),m=i("ff81"),y=i("748f");let O=class extends p["a"]{constructor(e){super(e),this.accumulateAttributeNames=null,this.currentVersion=null,this.defaultTravelMode=null,this.directionsLanguage=null,this.directionsLengthUnits=null,this.directionsSupportedLanguages=null,this.directionsTimeAttribute=null,this.hasZ=null,this.impedance=null,this.networkDataset=null,this.supportedTravelModes=null}};Object(u["a"])([Object(c["b"])()],O.prototype,"accumulateAttributeNames",void 0),Object(u["a"])([Object(c["b"])()],O.prototype,"currentVersion",void 0),Object(u["a"])([Object(c["b"])()],O.prototype,"defaultTravelMode",void 0),Object(u["a"])([Object(c["b"])()],O.prototype,"directionsLanguage",void 0),Object(u["a"])([Object(b["a"])(m["e"])],O.prototype,"directionsLengthUnits",void 0),Object(u["a"])([Object(c["b"])()],O.prototype,"directionsSupportedLanguages",void 0),Object(u["a"])([Object(c["b"])()],O.prototype,"directionsTimeAttribute",void 0),Object(u["a"])([Object(c["b"])()],O.prototype,"hasZ",void 0),Object(u["a"])([Object(c["b"])()],O.prototype,"impedance",void 0),Object(u["a"])([Object(c["b"])()],O.prototype,"networkDataset",void 0),Object(u["a"])([Object(c["b"])({type:[y["a"]]})],O.prototype,"supportedTravelModes",void 0),O=Object(u["a"])([Object(d["a"])("esri.rest.support.NetworkServiceDescription")],O);const j=O;function f(e,t,i,r){r[i]=[t.length,t.length+e.length],e.forEach(e=>{t.push(e.geometry)})}function h(e,t){for(let i=0;i=10.4?S(e,t,i):g(e,i),{defaultTravelMode:u,supportedTravelModes:p}=await l;return s.defaultTravelMode=u,s.supportedTravelModes=p,j.fromJSON(s)}async function g(e,t){var i,a;const o=Object(n["a"])({f:"json"},t),{data:u}=await Object(r["default"])(e.replace(/\/rest\/.*$/i,"/info"),o);if(!u||!u.owningSystemUrl)return{supportedTravelModes:[],defaultTravelMode:null};const{owningSystemUrl:p}=u,c=Object(l["K"])(p)+"/sharing/rest/portals/self",{data:b}=await Object(r["default"])(c,o),d=Object(s["b"])("helperServices.routingUtilities.url",b);if(!d)return{supportedTravelModes:[],defaultTravelMode:null};const m=Object(n["c"])(p),y=/\/solve$/i.test(m.path)?"Route":/\/solveclosestfacility$/i.test(m.path)?"ClosestFacility":"ServiceAreas",O=Object(n["a"])({f:"json",serviceName:y},t),j=Object(l["K"])(d)+"/GetTravelModes/execute",f=await Object(r["default"])(j,O),h=[];let v=null;if(null!=f&&null!=(i=f.data)&&null!=(a=i.results)&&a.length){const e=f.data.results;for(const t of e){var T;if("supportedTravelModes"===t.paramName){if(null!=(T=t.value)&&T.features)for(const{attributes:e}of t.value.features)if(e){const t=JSON.parse(e.TravelMode);h.push(t)}}else"defaultTravelMode"===t.paramName&&(v=t.value)}}return{supportedTravelModes:h,defaultTravelMode:v}}async function S(e,t,i){try{const a=Object(n["a"])({f:"json",token:t},i),o=Object(l["K"])(e)+"/retrieveTravelModes",{data:{supportedTravelModes:s,defaultTravelMode:u}}=await Object(r["default"])(o,a);return{supportedTravelModes:s,defaultTravelMode:u}}catch(o){throw new a["a"]("network-service:retrieveTravelModes","Could not get to the NAServer's retrieveTravelModes.",{error:o})}}},ca81:function(e,t,i){"use strict";i.d(t,"a",(function(){return a}));var r=i("2698");function a(e){e&&e.writtenProperties&&e.writtenProperties.forEach(e=>{const t=e.target;e.newOrigin&&e.oldOrigin!==e.newOrigin&&Object(r["a"])(t)&&t.updateOrigin(e.propName,e.newOrigin)})}},ff81:function(e,t,i){"use strict";i.d(t,"a",(function(){return y})),i.d(t,"b",(function(){return c})),i.d(t,"c",(function(){return f})),i.d(t,"d",(function(){return j})),i.d(t,"e",(function(){return o})),i.d(t,"f",(function(){return l})),i.d(t,"g",(function(){return s})),i.d(t,"h",(function(){return O})),i.d(t,"i",(function(){return a})),i.d(t,"j",(function(){return b})),i.d(t,"k",(function(){return n})),i.d(t,"l",(function(){return u})),i.d(t,"m",(function(){return m})),i.d(t,"n",(function(){return d})),i.d(t,"o",(function(){return p}));var r=i("fa8a");const a=Object(r["b"])()({esriCentimeters:"centimeters",esriDecimalDegrees:"decimal-degrees",esriDecimeters:"decimeters",esriFeet:"feet",esriInches:"inches",esriKilometers:"kilometers",esriMeters:"meters",esriMiles:"miles",esriMillimeters:"millimeters",esriNauticalMiles:"nautical-miles",esriPoints:"points",esriUnknownUnits:"unknown",esriYards:"yards"}),o=Object(r["b"])()({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"}),s=Object(r["b"])()({esriNAUDays:"days",esriNAUHours:"hours",esriNAUMinutes:"minutes",esriNAUSeconds:"seconds"}),l=Object(r["b"])()({esriDOTComplete:"complete",esriDOTCompleteNoEvents:"complete-no-events",esriDOTFeatureSets:"featuresets",esriDOTInstructionsOnly:"instructions-only",esriDOTStandard:"standard",esriDOTSummaryOnly:"summary-only"}),n=Object(r["b"])()({esriNAOutputLineNone:"none",esriNAOutputLineStraight:"straight",esriNAOutputLineTrueShape:"true-shape",esriNAOutputLineTrueShapeWithMeasure:"true-shape-with-measure"}),u=(Object(r["b"])()({esriNAOutputPolygonNone:"none",esriNAOutputPolygonSimplified:"simplified",esriNAOutputPolygonDetailed:"detailed"}),Object(r["b"])()({esriNFSBAllowBacktrack:"allow-backtrack",esriNFSBAtDeadEndsOnly:"at-dead-ends-only",esriNFSBNoBacktrack:"no-backtrack",esriNFSBAtDeadEndsAndIntersections:"at-dead-ends-and-intersections"})),p=(Object(r["b"])()({esriNATravelDirectionFromFacility:"from-facility",esriNATravelDirectionToFacility:"to-facility"}),Object(r["b"])()({esriNATimeOfDayNotUsed:"not-used",esriNATimeOfDayUseAsStartTime:"start",esriNATimeOfDayUseAsEndTime:"end"}),Object(r["b"])()({AUTOMOBILE:"automobile",TRUCK:"truck",WALK:"walk",OTHER:"other"})),c=Object(r["b"])()({0:"either-side-of-vehicle",1:"right-side-of-vehicle",2:"left-side-of-vehicle",3:"no-u-turn"},{useNumericKeys:!0}),b=Object(r["b"])()({0:"stop",1:"waypoint",2:"break"},{useNumericKeys:!0}),d=Object(r["b"])()({0:"ok",1:"not-located",2:"network-element-not-located",3:"element-not-traversable",4:"invalid-field-values",5:"not-reached",6:"time-window-violation",7:"not-located-on-closest"},{useNumericKeys:!0}),m=Object(r["b"])()({1:"right",2:"left"},{useNumericKeys:!0}),y=Object(r["b"])()({0:"restriction",1:"added-cost"},{useNumericKeys:!0}),O=Object(r["b"])()({0:"permit",1:"restrict"},{useNumericKeys:!0}),j=Object(r["b"])()({1:"header",50:"arrive",51:"depart",52:"straight",100:"on-ferry",101:"off-ferry",102:"central-fork",103:"roundabout",104:"u-turn",150:"door",151:"stairs",152:"elevator",153:"escalator",154:"pedestrian-ramp",200:"left-fork",201:"left-ramp",202:"clockwise-roundabout",203:"left-handed-u-turn",204:"bear-left",205:"left-turn",206:"sharp-left",207:"left-turn-and-immediate-left-turn",208:"left-turn-and-immediate-right-turn",300:"right-fork",301:"right-ramp",302:"counter-clockwise-roundabout",303:"right-handed-u-turn",304:"bear-right",305:"right-turn",306:"sharp-right",307:"right-turn-and-immediate-left-turn",308:"right-turn-and-immediate-right-turn",400:"up-elevator",401:"up-escalator",402:"up-stairs",500:"down-elevator",501:"down-escalator",502:"down-stairs",1e3:"general-event",1001:"landmark",1002:"time-zone-change",1003:"traffic-event",1004:"scaled-cost-barrier-event",1005:"boundary-crossing",1006:"restriction-violation"},{useNumericKeys:!0}),f=Object(r["b"])()({0:"unknown",1:"segment",2:"maneuver-segment",3:"restriction-violation",4:"scaled-cost-barrier",5:"heavy-traffic",6:"slow-traffic",7:"moderate-traffic"},{useNumericKeys:!0})}}]);
//# sourceMappingURL=chunk-205d323f.7270a526.js.map