@arcgis/core 4.30.0-next.20240320 → 4.30.0-next.20240321

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/{ef19c4fabc3682fc7aa7.js → 0b1ccc2cfb7a6361eae6.js} +1 -1
  3. package/assets/esri/core/workers/chunks/{2d0a01d0957b3e4512f6.js → 2cc832f9f5b10817f300.js} +1 -1
  4. package/assets/esri/core/workers/chunks/{95d7b168991ddb3a96ca.js → 2fe91a15fcdae540babe.js} +1 -1
  5. package/assets/esri/core/workers/chunks/505f35a02ac6a67a255b.js +1 -0
  6. package/assets/esri/core/workers/chunks/{51fc02ce8cab70b363b1.js → 5162ba2975b4b025590e.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{4e76bc3274df21ec22e0.js → 51700be6f50efba0bc82.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{65ed5dfd19d99588d66e.js → 689a122c77b39e5c73eb.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{bf65e5c155ad15f58907.js → 7530fef3ee217643898e.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{a0fa32df6a262ffb3179.js → 75bd66a0a1b42e057c1a.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{a53b90ced443603a78c5.js → 7819a446d3c9749ff74f.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{424b5d20d7f64e28c0a7.js → 7ca976273f1f64f75aa7.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{36d697a3788b86f24588.js → 9403e2ee9c97488ce4f0.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{e6a5ccd93f2dab2bb1e0.js → a0de5ad1d08f511cf3d8.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{3c19806b03f14d288fae.js → b3cd5f8691ba0b5b5729.js} +1 -1
  16. package/assets/esri/core/workers/chunks/b3d905c6b100831ad3c4.js +1 -0
  17. package/assets/esri/core/workers/chunks/{785454b084d8ec4e7dc0.js → df38774f63984be0a478.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{1cc0714457e299b54496.js → e22a13ff683d207e0434.js} +1 -1
  19. package/assets/esri/core/workers/chunks/{7f8725f146c29290e240.js → e93cc8cdeaaf81210dc2.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{ac8606f2e4719c96a732.js → ee1345b212cde1ff4755.js} +1 -1
  21. package/assets/esri/core/workers/chunks/eecb0064c5343e88bfde.js +1 -0
  22. package/interfaces.d.ts +33 -106
  23. package/package.json +1 -1
  24. package/rest/geoprocessor/utils.js +1 -1
  25. package/rest/utils.js +1 -1
  26. package/support/revision.js +1 -1
  27. package/views/2d/FrameTask.js +1 -1
  28. package/views/2d/engine/webgl/shaderGraph/techniques/TechniqueDebugLayerView.js +1 -1
  29. package/views/2d/input/MapViewInputManager.js +1 -1
  30. package/views/2d/input/handlers/KeyPan.js +1 -1
  31. package/views/2d/layers/BaseDynamicLayerView2D.js +1 -1
  32. package/views/2d/layers/BaseLayerView2D.js +1 -1
  33. package/views/2d/layers/BaseLayerViewGL2D.js +1 -1
  34. package/views/2d/layers/CatalogDynamicGroupLayerView2D.js +1 -1
  35. package/views/2d/layers/CatalogLayerView2D.js +1 -1
  36. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  37. package/views/2d/layers/GeoRSSLayerView2D.js +1 -1
  38. package/views/2d/layers/GraphicsLayerView2D.js +1 -1
  39. package/views/2d/layers/GroupLayerView2D.js +1 -1
  40. package/views/2d/layers/ImageryLayerView2D.js +1 -1
  41. package/views/2d/layers/ImageryTileLayerView2D.js +1 -1
  42. package/views/2d/layers/KMLLayerView2D.js +1 -1
  43. package/views/2d/layers/KnowledgeGraphLayerView2D.js +1 -1
  44. package/views/2d/layers/MapImageLayerView2D.js +1 -1
  45. package/views/2d/layers/MapNotesLayerView2D.js +1 -1
  46. package/views/2d/layers/MediaLayerView2D.js +1 -1
  47. package/views/2d/layers/RouteLayerView2D.js +1 -1
  48. package/views/2d/layers/TileLayerView2D.js +1 -1
  49. package/views/2d/layers/VectorTileLayerView2D.js +1 -1
  50. package/views/2d/layers/VideoLayerView2D.js +1 -1
  51. package/views/2d/layers/WMSLayerView2D.js +1 -1
  52. package/views/2d/layers/WMTSLayerView2D.js +1 -1
  53. package/views/2d/layers/features/sources/FeatureSourceQueryInfo.js +1 -1
  54. package/views/2d/layers/features/sources/strategies/AFetchLoadStrategy.js +1 -1
  55. package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
  56. package/views/2d/navigation/ZoomBox.js +1 -1
  57. package/views/2d/viewpointUtils.js +1 -1
  58. package/views/draw/DrawOperation.js +1 -1
  59. package/views/input/InputManager.js +1 -1
  60. package/views/input/keys.js +1 -1
  61. package/views/interactive/snapping/SnappingManager.js +1 -1
  62. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  63. package/widgets/FeatureTable/Grid/Grid.js +1 -1
  64. package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
  65. package/widgets/FeatureTable.js +1 -1
  66. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  67. package/widgets/OrientedImageryViewer/components/ImageViewerViewModel.js +1 -1
  68. package/widgets/OrientedImageryViewer.js +1 -1
  69. package/widgets/Popup.js +1 -1
  70. package/assets/esri/core/workers/chunks/2427699e34e1895ed024.js +0 -1
  71. package/assets/esri/core/workers/chunks/7bba67d345da6eced804.js +0 -1
  72. package/assets/esri/core/workers/chunks/d344e99dd999aaaabbe3.js +0 -1
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3920],{4902:(e,t,i)=>{i.d(t,{PH:()=>a,sA:()=>n});var r=i(90237),o=i(40608);let s=0;const n=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+s++})}};return t=(0,r._)([(0,o.$)("esri.core.Identifiable")],t),t},a=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:s++})}};return t=(0,r._)([(0,o.$)("esri.core.Identifiable.NumericIdentifiable")],t),t};let l=class extends(n(class{})){};l=(0,r._)([(0,o.$)("esri.core.Identifiable")],l)},46130:(e,t,i)=>{i.d(t,{v:()=>o});var r=i(76553);function o(e){e?.writtenProperties&&e.writtenProperties.forEach((({target:e,propName:t,newOrigin:i})=>{(0,r.H)(e)&&i&&e.originOf(t)!==i&&e.updateOrigin(t,i)}))}},76553:(e,t,i)=>{function r(e){return e&&"getAtOrigin"in e&&"originOf"in e}i.d(t,{H:()=>r})},3330:(e,t,i)=>{i.d(t,{GB:()=>o,Qo:()=>n,Y4:()=>s});var r=i(96285);class o{}function s(e){return e instanceof r.bo?e===o.instance:"unknown"===e?.toString().toLowerCase()}function n(e){return s(e)?o.instance:e}o.instance=new r.oh("Etc/UTC")},70328:(e,t,i)=>{i.d(t,{BI:()=>h,Ej:()=>p,Hq:()=>u,Ie:()=>y,Jt:()=>f,Ne:()=>d,RF:()=>a,aI:()=>v,fA:()=>s,hZ:()=>m,iT:()=>l,is:()=>b,qv:()=>g,vI:()=>c,v_:()=>T,vt:()=>o,w1:()=>n});var r=i(5443);function o(e=T){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function s(e,t,i,r,s,n,a=o()){return a[0]=e,a[1]=t,a[2]=i,a[3]=r,a[4]=s,a[5]=n,a}function n(e,t){const i=isFinite(e[2])||isFinite(e[5]);return new r.A(i?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function a(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function l(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function u(e,t,i=0,r=t.length/3){let o=e[0],s=e[1],n=e[2],a=e[3],l=e[4],u=e[5];for(let e=0;e<r;e++)o=Math.min(o,t[i+3*e]),s=Math.min(s,t[i+3*e+1]),n=Math.min(n,t[i+3*e+2]),a=Math.max(a,t[i+3*e]),l=Math.max(l,t[i+3*e+1]),u=Math.max(u,t[i+3*e+2]);e[0]=o,e[1]=s,e[2]=n,e[3]=a,e[4]=l,e[5]=u}function p(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function d(e,t,i=e){return i[0]=t[0],i[1]=t[1],i[2]=t[2],i!==e&&(i[3]=e[3],i[4]=e[4],i[5]=e[5]),i}function c(e,t,i=e){return i[3]=t[0],i[4]=t[1],i[5]=t[2],i!==e&&(i[0]=e[0],i[1]=e[1],i[2]=e[2]),e}function m(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function y(e){return e?m(e,g):o(g)}function f(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function h(e,t,i,r,o){return e[0]=t,e[1]=i,e[2]=Number.NEGATIVE_INFINITY,e[3]=r,e[4]=o,e[5]=Number.POSITIVE_INFINITY,e}function b(e){return 6===e.length}function v(e,t,i){if(null==e||null==t)return e===t;if(!b(e)||!b(t))return!1;if(i){for(let r=0;r<e.length;r++)if(!i(e[r],t[r]))return!1}else for(let i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0}i(19419);const g=[1/0,1/0,1/0,-1/0,-1/0,-1/0],T=[0,0,0,0,0,0];o()},17136:(e,t,i)=>{i.d(t,{el:()=>S});var r=i(92602),o=i(49186),s=i(53966),n=i(39829),a=i(82799),l=i(80754),u=i(21325),p=i(28735),d=(i(59456),i(78888)),c=i(65864),m=i(2272),y=i(84952),f=i(92300);const h=()=>s.A.getLogger("esri.geometry.support.normalizeUtils");function b(e){return"polygon"===e[0].type}function v(e){return"polyline"===e[0].type}function g(e,t,i){if(t){const t=function(e,t){if(!(e instanceof a.A||e instanceof n.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw h().error(e),new o.A(e)}const i=(0,l.r8)(e),r=[];for(const e of i){const i=[];r.push(i),i.push([e[0][0],e[0][1]]);for(let r=0;r<e.length-1;r++){const o=e[r][0],s=e[r][1],n=e[r+1][0],a=e[r+1][1],l=Math.sqrt((n-o)*(n-o)+(a-s)*(a-s)),u=(a-s)/l,p=(n-o)/l,d=l/t;if(d>1){for(let e=1;e<=d-1;e++){const r=e*t,n=p*r+o,a=u*r+s;i.push([n,a])}const e=(l+Math.floor(d-1)*t)/2,r=p*e+o,n=u*e+s;i.push([r,n])}i.push([n,a])}}return function(e){return"polygon"===e.type}(e)?new n.A({rings:r,spatialReference:e.spatialReference}):new a.A({paths:r,spatialReference:e.spatialReference})}(e,1e6);e=(0,p.ci)(t,!0)}return i&&(e=(0,l.kS)(e,i)),e}function T(e,t,i){if(Array.isArray(e)){const r=e[0];if(r>t){const i=(0,l.kd)(r,t);e[0]=r+i*(-2*t)}else if(r<i){const t=(0,l.kd)(r,i);e[0]=r+t*(-2*i)}}else{const r=e.x;if(r>t){const i=(0,l.kd)(r,t);e=e.clone().offset(i*(-2*t),0)}else if(r<i){const t=(0,l.kd)(r,i);e=e.clone().offset(t*(-2*i),0)}}return e}function w(e,t){let i=-1;for(let r=0;r<t.cutIndexes.length;r++){const o=t.cutIndexes[r],s=t.geometries[r],n=(0,l.r8)(s);for(let e=0;e<n.length;e++){const t=n[e];t.some((i=>{if(i[0]<180)return!0;{let i=0;for(let e=0;e<t.length;e++){const r=t[e][0];i=r>i?r:i}i=Number(i.toFixed(9));const r=-360*(0,l.kd)(i,180);for(let i=0;i<t.length;i++){const t=s.getPoint(e,i);s.setPoint(e,i,t.clone().offset(r,0))}return!0}}))}if(o===i){if(b(e))for(const t of(0,l.r8)(s))e[o]=e[o].addRing(t);else if(v(e))for(const t of(0,l.r8)(s))e[o]=e[o].addPath(t)}else i=o,e[o]=s}return e}async function S(e,t,i){if(!Array.isArray(e))return S([e],t);t&&"string"!=typeof t&&h().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const o="string"==typeof t?t:t?.url??r.A.geometryServiceUrl;let s,b,v,A,_,M,N,O,I=0;const x=[],D=[];for(const t of e)if(null!=t)if(s||(s=t.spatialReference,b=(0,u.Vp)(s),v=s.isWebMercator,M=v?102100:4326,A=l.j7[M].maxX,_=l.j7[M].minX,N=l.j7[M].plus180Line,O=l.j7[M].minus180Line),b)if("mesh"===t.type)D.push(t);else if("point"===t.type)D.push(T(t.clone(),A,_));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>T(e,A,_))),D.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,b);D.push(e.rings?new n.A(e):e)}else if(t.extent){const e=t.extent,i=(0,l.kd)(e.xmin,_)*(2*A);let r=0===i?t.clone():(0,l.kS)(t.clone(),i);e.offset(i,0);let{xmin:o,xmax:s}=e;o=Number(o.toFixed(9)),s=Number(s.toFixed(9)),e.intersects(N)&&s!==A?(I=s>I?s:I,r=g(r,v),x.push(r),D.push("cut")):e.intersects(O)&&o!==_?(I=s*(2*A)>I?s*(2*A):I,r=g(r,v,360),x.push(r),D.push("cut")):D.push(r)}else D.push(t.clone());else D.push(t);else D.push(t);let F=(0,l.kd)(I,A),Z=-90;const C=F,j=new a.A;for(;F>0;){const e=360*F-180;j.addPath([[e,Z],[e,-1*Z]]),Z*=-1,F--}if(x.length>0&&C>0){const t=w(x,await async function(e,t,i,r){const o=(0,m.Dl)(e),s=t[0].spatialReference,n={...r,responseType:"json",query:{...o.query,f:"json",sr:(0,u.YX)(s),target:JSON.stringify({geometryType:(0,c.$B)(t[0]),geometries:t}),cutter:JSON.stringify(i)}},a=await(0,d.A)(o.path+"/cut",n),{cutIndexes:l,geometries:p=[]}=a.data;return{cutIndexes:l,geometries:p.map((e=>{const t=(0,c.rS)(e);return t.spatialReference=s,t}))}}(o,x,j,i)),r=[],s=[];for(let i=0;i<D.length;i++){const o=D[i];if("cut"!==o)s.push(o);else{const o=t.shift(),n=e[i];null!=n&&"polygon"===n.type&&n.rings&&n.rings.length>1&&o.rings.length>=n.rings.length?(r.push(o),s.push("simplify")):s.push(v?(0,p.Gh)(o):o)}}if(!r.length)return s;const n=await async function(e,t,i){const r="string"==typeof e?(0,y.An)(e):e,o=t[0].spatialReference,s=(0,c.$B)(t[0]),n={...i,query:{...r.query,f:"json",sr:(0,u.YX)(o),geometries:JSON.stringify((0,f.X)(t))}},{data:a}=await(0,d.A)(r.path+"/simplify",n);return(0,f.V)(a.geometries,s,o)}(o,r,i),a=[];for(let e=0;e<s.length;e++){const t=s[e];"simplify"!==t?a.push(t):a.push(v?(0,p.Gh)(n.shift()):n.shift())}return a}const E=[];for(let e=0;e<D.length;e++){const t=D[e];if("cut"!==t)E.push(t);else{const e=x.shift();E.push(!0===v?(0,p.Gh)(e):e)}}return E}},80754:(e,t,i)=>{i.d(t,{j7:()=>n,kS:()=>l,kd:()=>a,r8:()=>u});var r=i(82799),o=i(16930),s=i(65864);const n={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new r.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:o.A.WebMercator}),minus180Line:new r.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:o.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new r.A({paths:[[[180,-180],[180,180]]],spatialReference:o.A.WGS84}),minus180Line:new r.A({paths:[[[-180,-180],[-180,180]]],spatialReference:o.A.WGS84})}};function a(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const i=u(e);for(const e of i)for(const i of e)i[0]+=t;return e}function u(e){return(0,s.Bi)(e)?e.rings:e.paths}},4146:(e,t,i)=>{i.d(t,{A:()=>g});var r=i(90237),o=(i(59456),i(78888)),s=i(49186),n=i(65529),a=i(4902),l=i(92474),u=i(53966),p=i(74887),d=i(84952),c=i(10107),m=(i(44208),i(87811),i(40608)),y=i(92602),f=i(5443),h=i(16930);let b=0,v=class extends(n.A.EventedMixin((0,a.sA)(l.A))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new f.A(-180,-90,180,90,h.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+b++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=h.A.WGS84,this.title=null,this.type=null,this.url=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await i.e(7982).then(i.bind(i,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:r}=await i.e(5613).then(i.bind(i,45613));try{return await r(t)}catch(e){const i=t?.portalItem,r=i?.id||"unset",o=i?.portal?.url||y.A.portalUrl;throw u.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+o+"', id: '"+r+"')",e),e}}(e)}initialize(){this.when().catch((e=>{(0,p.zf)(e)||u.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})}))}destroy(){const e=this.parent;if(e){const t=this;"layers"in e&&e.layers.includes(t)?e.layers.remove(t):"tables"in e&&e.tables.includes(t)?e.tables.remove(t):"baseLayers"in e&&e.baseLayers.includes(t)?e.baseLayers.remove(t):"referenceLayers"in e&&e.referenceLayers.includes(t)&&e.referenceLayers.remove(t),this._set("parent",null)}}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,d.An)(this.url)}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,o.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new s.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,r._)([(0,c.MZ)({type:String})],v.prototype,"attributionDataUrl",void 0),(0,r._)([(0,c.MZ)({type:f.A})],v.prototype,"fullExtent",void 0),(0,r._)([(0,c.MZ)({readOnly:!0})],v.prototype,"hasAttributionData",null),(0,r._)([(0,c.MZ)({type:String,clonable:!1})],v.prototype,"id",void 0),(0,r._)([(0,c.MZ)({type:Boolean,nonNullable:!0})],v.prototype,"legendEnabled",void 0),(0,r._)([(0,c.MZ)({type:["show","hide","hide-children"]})],v.prototype,"listMode",void 0),(0,r._)([(0,c.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],v.prototype,"opacity",void 0),(0,r._)([(0,c.MZ)({clonable:!1})],v.prototype,"parent",void 0),(0,r._)([(0,c.MZ)({readOnly:!0})],v.prototype,"parsedUrl",null),(0,r._)([(0,c.MZ)({type:Boolean,readOnly:!0})],v.prototype,"persistenceEnabled",void 0),(0,r._)([(0,c.MZ)({type:Boolean})],v.prototype,"popupEnabled",void 0),(0,r._)([(0,c.MZ)({type:Boolean})],v.prototype,"attributionVisible",void 0),(0,r._)([(0,c.MZ)({type:h.A})],v.prototype,"spatialReference",void 0),(0,r._)([(0,c.MZ)({type:String})],v.prototype,"title",void 0),(0,r._)([(0,c.MZ)({readOnly:!0,json:{read:!1}})],v.prototype,"type",void 0),(0,r._)([(0,c.MZ)()],v.prototype,"url",void 0),(0,r._)([(0,c.MZ)({type:Boolean,nonNullable:!0})],v.prototype,"visible",void 0),v=(0,r._)([(0,m.$)("esri.layers.Layer")],v);const g=v},97550:(e,t,i)=>{i.r(t),i.d(t,{default:()=>ui});var r=i(90237),o=i(92602),s=i(59456),n=i(52106),a=i(13874),l=(i(86162),i(94409),i(65345),i(42980),i(39290),i(92438),i(96576),i(93618),i(65494)),u=i(53966),p=i(5503),d=i(49186),c=i(92071),m=i(93637),y=i(74887),f=i(36708),h=i(83047),b=i(84952),v=i(10107),g=(i(44208),i(87811),i(36005)),T=i(40608),w=i(43937),S=i(46130),A=i(5443),_=i(57251),M=i(21325),N=i(4146),O=i(63074),I=i(16131),x=i(8303),D=i(25036),F=i(60694),Z=i(61147),C=i(25482),j=i(53930);let E=class extends C.oY{constructor(e){super(e),this.break=new j.A({color:[255,255,255],size:12,outline:{color:[0,122,194],width:3}}),this.first=new j.A({color:[0,255,0],size:20,outline:{color:[255,255,255],width:4}}),this.unlocated=new j.A({color:[255,0,0],size:12,outline:{color:[255,255,255],width:3}}),this.last=new j.A({color:[255,0,0],size:20,outline:{color:[255,255,255],width:4}}),this.middle=new j.A({color:[51,51,51],size:12,outline:{color:[0,122,194],width:3}}),this.waypoint=new j.A({color:[255,255,255],size:12,outline:{color:[0,122,194],width:3}})}};(0,r._)([(0,v.MZ)({types:Z.Es})],E.prototype,"break",void 0),(0,r._)([(0,v.MZ)({types:Z.Es})],E.prototype,"first",void 0),(0,r._)([(0,v.MZ)({types:Z.Es})],E.prototype,"unlocated",void 0),(0,r._)([(0,v.MZ)({types:Z.Es})],E.prototype,"last",void 0),(0,r._)([(0,v.MZ)({types:Z.Es})],E.prototype,"middle",void 0),(0,r._)([(0,v.MZ)({types:Z.Es})],E.prototype,"waypoint",void 0),E=(0,r._)([(0,T.$)("esri.layers.support.RouteStopSymbols")],E);const B=E;var P=i(31593),R=i(94985);let L=class extends C.oY{constructor(e){super(e),this.directionLines=new P.A({color:[0,122,194],width:6}),this.directionPoints=new j.A({color:[255,255,255],size:6,outline:{color:[0,122,194],width:2}}),this.pointBarriers=new j.A({style:"x",size:10,outline:{color:[255,0,0],width:3}}),this.polygonBarriers=new R.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.stops=new B}};(0,r._)([(0,v.MZ)({types:Z.Es})],L.prototype,"directionLines",void 0),(0,r._)([(0,v.MZ)({types:Z.Es})],L.prototype,"directionPoints",void 0),(0,r._)([(0,v.MZ)({types:Z.Es})],L.prototype,"pointBarriers",void 0),(0,r._)([(0,v.MZ)({types:Z.Es})],L.prototype,"polygonBarriers",void 0),(0,r._)([(0,v.MZ)({types:Z.Es})],L.prototype,"polylineBarriers",void 0),(0,r._)([(0,v.MZ)({types:Z.Es})],L.prototype,"routeInfo",void 0),(0,r._)([(0,v.MZ)({type:B})],L.prototype,"stops",void 0),L=(0,r._)([(0,T.$)("esri.layers.support.RouteSymbols")],L);const U=L;var k=i(20655),J=i(80812),V=i(10407),W=i(78888),G=i(2272),$=i(93223),q=i(66552);const z=(0,q.O)()({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"}),K=(0,q.O)()({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"}),Y=((0,q.O)()({esriNAUDays:"days",esriNAUHours:"hours",esriNAUMinutes:"minutes",esriNAUSeconds:"seconds"}),(0,q.O)()({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",esriNAUDays:"days",esriNAUHours:"hours",esriNAUMinutes:"minutes",esriNAUSeconds:"seconds",esriNAUKilometersPerHour:"kilometers-per-hour",esriNAUMilesPerHour:"miles-per-hour",esriNAUUnknown:"unknown"})),H=(0,q.O)()({esriDOTComplete:"complete",esriDOTCompleteNoEvents:"complete-no-events",esriDOTFeatureSets:"featuresets",esriDOTInstructionsOnly:"instructions-only",esriDOTStandard:"standard",esriDOTSummaryOnly:"summary-only"}),X=(0,q.O)()({esriNAOutputLineNone:"none",esriNAOutputLineStraight:"straight",esriNAOutputLineTrueShape:"true-shape",esriNAOutputLineTrueShapeWithMeasure:"true-shape-with-measure"}),Q=((0,q.O)()({esriNAOutputPolygonNone:"none",esriNAOutputPolygonSimplified:"simplified",esriNAOutputPolygonDetailed:"detailed"}),(0,q.O)()({esriNFSBAllowBacktrack:"allow-backtrack",esriNFSBAtDeadEndsOnly:"at-dead-ends-only",esriNFSBNoBacktrack:"no-backtrack",esriNFSBAtDeadEndsAndIntersections:"at-dead-ends-and-intersections"})),ee=((0,q.O)()({esriNATravelDirectionFromFacility:"from-facility",esriNATravelDirectionToFacility:"to-facility"}),(0,q.O)()({esriNATimeOfDayNotUsed:"not-used",esriNATimeOfDayUseAsStartTime:"start",esriNATimeOfDayUseAsEndTime:"end"}),(0,q.O)()({AUTOMOBILE:"automobile",TRUCK:"truck",WALK:"walk",OTHER:"other"})),te=(0,q.O)()({0:"either-side-of-vehicle",1:"right-side-of-vehicle",2:"left-side-of-vehicle",3:"no-u-turn"},{useNumericKeys:!0}),ie=(0,q.O)()({0:"stop",1:"waypoint",2:"break"},{useNumericKeys:!0}),re=(0,q.O)()({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}),oe=(0,q.O)()({1:"right",2:"left"},{useNumericKeys:!0}),se=(0,q.O)()({0:"restriction",1:"scaled-cost",2:"added-cost"},{useNumericKeys:!0}),ne=(0,q.O)()({0:"permit",1:"restrict"},{useNumericKeys:!0}),ae=(0,q.O)()({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",1007:"lane"},{useNumericKeys:!0}),le=(0,q.O)()({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}),ue=(0,q.O)()({"NA Campus":"campus","NA Desktop":"desktop","NA Navigation":"navigation"}),pe=(0,q.O)()({Kilometers:"kilometers",Miles:"miles",Meters:"meters"},{ignoreUnknown:!1}),de=(0,q.O)()({Minutes:"minutes",TimeAt1KPH:"time-at-1-kph",TravelTime:"travel-time",TruckMinutes:"truck-minutes",TruckTravelTime:"truck-travel-time",WalkTime:"walk-time"},{ignoreUnknown:!1}),ce=(0,q.O)()({Kilometers:"kilometers",Miles:"miles",Meters:"meters",Minutes:"minutes",TimeAt1KPH:"time-at-1-kph",TravelTime:"travel-time",TruckMinutes:"truck-minutes",TruckTravelTime:"truck-travel-time",WalkTime:"walk-time"},{ignoreUnknown:!1}),me=(0,q.O)()({"Any Hazmat Prohibited":"any-hazmat-prohibited","Avoid Carpool Roads":"avoid-carpool-roads","Avoid Express Lanes":"avoid-express-lanes","Avoid Ferries":"avoid-ferries","Avoid Gates":"avoid-gates","Avoid Limited Access Roads":"avoid-limited-access-roads","Avoid Private Roads":"avoid-private-roads","Avoid Roads Unsuitable for Pedestrians":"avoid-roads-unsuitable-for-pedestrians","Avoid Stairways":"avoid-stairways","Avoid Toll Roads":"avoid-toll-roads","Avoid Toll Roads for Trucks":"avoid-toll-roads-for-trucks","Avoid Truck Restricted Roads":"avoid-truck-restricted-roads","Avoid Unpaved Roads":"avoid-unpaved-roads","Axle Count Restriction":"axle-count-restriction","Driving a Bus":"driving-a-bus","Driving a Taxi":"driving-a-taxi","Driving a Truck":"driving-a-truck","Driving an Automobile":"driving-an-automobile","Driving an Emergency Vehicle":"driving-an-emergency-vehicle","Height Restriction":"height-restriction","Kingpin to Rear Axle Length Restriction":"kingpin-to-rear-axle-length-restriction","Length Restriction":"length-restriction","Preferred for Pedestrians":"preferred-for-pedestrians","Riding a Motorcycle":"riding-a-motorcycle","Roads Under Construction Prohibited":"roads-under-construction-prohibited","Semi or Tractor with One or More Trailers Prohibited":"semi-or-tractor-with-one-or-more-trailers-prohibited","Single Axle Vehicles Prohibited":"single-axle-vehicles-prohibited","Tandem Axle Vehicles Prohibited":"tandem-axle-vehicles-prohibited","Through Traffic Prohibited":"through-traffic-prohibited","Truck with Trailers Restriction":"truck-with-trailers-restriction","Use Preferred Hazmat Routes":"use-preferred-hazmat-routes","Use Preferred Truck Routes":"use-preferred-truck-routes",Walking:"walking","Weight Restriction":"weight-restriction"},{ignoreUnknown:!1}),ye=(0,q.O)()({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),fe=(0,q.O)()({esriGeometryPoint:"point",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"envelope",esriGeometryMultipoint:"multipoint"}),he=(0,q.O)()({esriNAUTCost:"cost",esriNAUTDescriptor:"descriptor",esriNAUTRestriction:"restriction",esriNAUTHierarchy:"hierarchy"}),be=(0,q.O)()({esriDSTAltName:"alt-name",esriDSTArrive:"arrive",esriDSTBranch:"branch",esriDSTCrossStreet:"cross-street",esriDSTCumulativeLength:"cumulative-length",esriDSTDepart:"depart",esriDSTEstimatedArrivalTime:"estimated-arrival-time",esriDSTExit:"exit",esriDSTGeneral:"general",esriDSTLength:"length",esriDSTServiceTime:"service-time",esriDSTStreetName:"street-name",esriDSTSummary:"summary",esriDSTTime:"time",esriDSTTimeWindow:"time-window",esriDSTToward:"toward",esriDSTViolationTime:"violation-time",esriDSTWaitTime:"wait-time"});let ve=class extends C.oY{constructor(e){super(e),this.dataType=null,this.name=null,this.parameterNames=null,this.restrictionUsageParameterName=null,this.timeNeutralAttributeName=null,this.trafficSupport=null,this.units=null,this.usageType=null}};(0,r._)([(0,v.MZ)({type:String})],ve.prototype,"dataType",void 0),(0,r._)([(0,$.e)(ce,{ignoreUnknown:!1})],ve.prototype,"name",void 0),(0,r._)([(0,v.MZ)({type:[String]})],ve.prototype,"parameterNames",void 0),(0,r._)([(0,v.MZ)({type:String})],ve.prototype,"restrictionUsageParameterName",void 0),(0,r._)([(0,$.e)(de,{ignoreUnknown:!1})],ve.prototype,"timeNeutralAttributeName",void 0),(0,r._)([(0,v.MZ)({type:String})],ve.prototype,"trafficSupport",void 0),(0,r._)([(0,$.e)(Y)],ve.prototype,"units",void 0),(0,r._)([(0,$.e)(he)],ve.prototype,"usageType",void 0),ve=(0,r._)([(0,T.$)("esri.rest.support.NetworkAttribute")],ve);const ge=ve;let Te=class extends C.oY{constructor(e){super(e),this.buildTime=null,this.name=null,this.networkAttributes=null,this.networkSources=null,this.state=null}};(0,r._)([(0,v.MZ)({type:Number})],Te.prototype,"buildTime",void 0),(0,r._)([(0,v.MZ)({type:String})],Te.prototype,"name",void 0),(0,r._)([(0,v.MZ)({type:[ge]})],Te.prototype,"networkAttributes",void 0),(0,r._)([(0,v.MZ)()],Te.prototype,"networkSources",void 0),(0,r._)([(0,v.MZ)({type:String})],Te.prototype,"state",void 0),Te=(0,r._)([(0,T.$)("esri.rest.support.NetworkDataset")],Te);const we=Te;var Se=i(69540);let Ae=class extends((0,Se.O)(C.oY)){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}readId(e,t){return t.id??t.itemId??null}readRestrictionAttributes(e,t){const{restrictionAttributeNames:i}=t;return null==i?null:i.map((e=>me.fromJSON(e)))}writeRestrictionAttributes(e,t,i){null!=e&&(t[i]=e.map((e=>me.toJSON(e))))}};(0,r._)([(0,v.MZ)({type:[Object],json:{write:!0}})],Ae.prototype,"attributeParameterValues",void 0),(0,r._)([(0,v.MZ)({type:String,json:{write:!0}})],Ae.prototype,"description",void 0),(0,r._)([(0,$.e)(pe,{ignoreUnknown:!1})],Ae.prototype,"distanceAttributeName",void 0),(0,r._)([(0,v.MZ)({type:String,json:{write:!0}})],Ae.prototype,"id",void 0),(0,r._)([(0,g.w)("id",["id","itemId"])],Ae.prototype,"readId",null),(0,r._)([(0,$.e)(ce,{ignoreUnknown:!1})],Ae.prototype,"impedanceAttributeName",void 0),(0,r._)([(0,v.MZ)({type:String,json:{write:!0}})],Ae.prototype,"name",void 0),(0,r._)([(0,v.MZ)({type:[String],json:{write:!0}})],Ae.prototype,"restrictionAttributeNames",void 0),(0,r._)([(0,g.w)("restrictionAttributeNames")],Ae.prototype,"readRestrictionAttributes",null),(0,r._)([(0,w.K)("restrictionAttributeNames")],Ae.prototype,"writeRestrictionAttributes",null),(0,r._)([(0,v.MZ)({type:Number,json:{write:{allowNull:!0}}})],Ae.prototype,"simplificationTolerance",void 0),(0,r._)([(0,$.e)(z)],Ae.prototype,"simplificationToleranceUnits",void 0),(0,r._)([(0,$.e)(de,{ignoreUnknown:!1})],Ae.prototype,"timeAttributeName",void 0),(0,r._)([(0,$.e)(ee)],Ae.prototype,"type",void 0),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],Ae.prototype,"useHierarchy",void 0),(0,r._)([(0,$.e)(Q)],Ae.prototype,"uturnAtJunctions",void 0),Ae=(0,r._)([(0,T.$)("esri.rest.support.TravelMode")],Ae);const _e=Ae;let Me=class extends C.oY{constructor(e){super(e),this.accumulateAttributeNames=null,this.attributeParameterValues=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}readAccumulateAttributes(e){return null==e?null:e.map((e=>ce.fromJSON(e)))}writeAccumulateAttributes(e,t,i){e?.length&&(t[i]=e.map((e=>ce.toJSON(e))))}get capabilities(){return{supportsNow:(this.currentVersion??10)>=10.81}}readDefaultTravelMode(e,t){const i=t.supportedTravelModes?.find((({id:e})=>e===t.defaultTravelMode))??t.supportedTravelModes?.find((({itemId:e})=>e===t.defaultTravelMode));return i?_e.fromJSON(i):null}};(0,r._)([(0,v.MZ)()],Me.prototype,"accumulateAttributeNames",void 0),(0,r._)([(0,g.w)("accumulateAttributeNames")],Me.prototype,"readAccumulateAttributes",null),(0,r._)([(0,w.K)("accumulateAttributeNames")],Me.prototype,"writeAccumulateAttributes",null),(0,r._)([(0,v.MZ)()],Me.prototype,"attributeParameterValues",void 0),(0,r._)([(0,v.MZ)()],Me.prototype,"capabilities",null),(0,r._)([(0,v.MZ)()],Me.prototype,"currentVersion",void 0),(0,r._)([(0,v.MZ)()],Me.prototype,"defaultTravelMode",void 0),(0,r._)([(0,g.w)("defaultTravelMode",["defaultTravelMode","supportedTravelModes"])],Me.prototype,"readDefaultTravelMode",null),(0,r._)([(0,v.MZ)()],Me.prototype,"directionsLanguage",void 0),(0,r._)([(0,$.e)(K)],Me.prototype,"directionsLengthUnits",void 0),(0,r._)([(0,v.MZ)()],Me.prototype,"directionsSupportedLanguages",void 0),(0,r._)([(0,$.e)(de,{ignoreUnknown:!1})],Me.prototype,"directionsTimeAttribute",void 0),(0,r._)([(0,v.MZ)()],Me.prototype,"hasZ",void 0),(0,r._)([(0,$.e)(ce,{ignoreUnknown:!1})],Me.prototype,"impedance",void 0),(0,r._)([(0,v.MZ)({type:we})],Me.prototype,"networkDataset",void 0),(0,r._)([(0,v.MZ)({type:[_e]})],Me.prototype,"supportedTravelModes",void 0),Me=(0,r._)([(0,T.$)("esri.rest.support.NetworkServiceDescription")],Me);const Ne=Me;function Oe(e,t,i,r){r[i]=[t.length,t.length+e.length],e.forEach((e=>{t.push(e.geometry)}))}async function Ie(e,t,i){if(!e)throw new d.A("network-service:missing-url","Url to Network service is missing");const r=(0,G.jV)({f:"json",token:t},i),{data:o}=await(0,W.A)(e,r),s=o.currentVersion>=10.4?async function(e,t,i){try{const r=(0,G.jV)({f:"json",token:t},i),o=(0,b.UC)(e)+"/retrieveTravelModes",{data:{supportedTravelModes:s,defaultTravelMode:n}}=await(0,W.A)(o,r);return{supportedTravelModes:s,defaultTravelMode:n}}catch(e){throw new d.A("network-service:retrieveTravelModes","Could not get to the NAServer's retrieveTravelModes.",{error:e})}}(e,t,i):async function(e,t){const i=(0,G.jV)({f:"json"},t),{data:r}=await(0,W.A)(e.replace(/\/rest\/.*$/i,"/info"),i);if(!r?.owningSystemUrl)return{supportedTravelModes:[],defaultTravelMode:null};const{owningSystemUrl:o}=r,s=(0,b.UC)(o)+"/sharing/rest/portals/self",{data:n}=await(0,W.A)(s,i),a=(0,m.wc)("helperServices.routingUtilities.url",n);if(!a)return{supportedTravelModes:[],defaultTravelMode:null};const l=(0,G.Dl)(o),u=/\/solve$/i.test(l.path)?"Route":/\/solveclosestfacility$/i.test(l.path)?"ClosestFacility":"ServiceAreas",p=(0,G.jV)({f:"json",serviceName:u},t),d=(0,b.UC)(a)+"/GetTravelModes/execute",c=await(0,W.A)(d,p),y=[];let f=null;if(c?.data?.results?.length){const e=c.data.results;for(const t of e)if("supportedTravelModes"===t.paramName){if(t.value?.features)for(const{attributes:e}of t.value.features)if(e){const t=JSON.parse(e.TravelMode);y.push(t)}}else"defaultTravelMode"===t.paramName&&(f=t.value)}return{supportedTravelModes:y,defaultTravelMode:f}}(e,i),{defaultTravelMode:n,supportedTravelModes:a}=await s;return o.defaultTravelMode=n,o.supportedTravelModes=a,Ne.fromJSON(o)}var xe=i(16649),De=i(17136);function Fe(e,t){if(null==e)return null;const i={},r=new RegExp(`^${t}`,"i");for(const o of Object.keys(e))if(r.test(o)){const r=o.substring(t.length);i[ce.fromJSON(r)]=e[o]}return i}function Ze(e,t,i){if(null!=e){t.attributes||(t.attributes={});for(const r in e){const o=ce.toJSON(r);t.attributes[`${i}${o}`]=e[r]}}}function Ce(e){const t={};for(const i of Object.keys(e)){const r=i;t[ce.fromJSON(r)]=e[i]}return t}function je(e){const t={};for(const i of Object.keys(e)){const r=i;t[ce.toJSON(r)]=e[i]}return t}function Ee(e,t){return null==e||null==t?null:Math.round((e-t)/6e4)}function Be(e){const t=e.toJSON(),i=t;return i.accumulateAttributeNames&&=t.accumulateAttributeNames?.join(),i.attributeParameterValues&&=JSON.stringify(t.attributeParameterValues),i.barriers&&=JSON.stringify(t.barriers),i.outSR&&=t.outSR?.wkid,i.overrides&&=JSON.stringify(t.overrides),i.polygonBarriers&&=JSON.stringify(t.polygonBarriers),i.polylineBarriers&&=JSON.stringify(t.polylineBarriers),i.restrictionAttributeNames&&=t.restrictionAttributeNames?.join(),i.stops&&=JSON.stringify(t.stops),i.travelMode&&=JSON.stringify(t.travelMode),i}var Pe=i(22671),Re=i(4576);const Le=new q.J({esriJobMessageTypeInformative:"informative",esriJobMessageTypeProcessDefinition:"process-definition",esriJobMessageTypeProcessStart:"process-start",esriJobMessageTypeProcessStop:"process-stop",esriJobMessageTypeWarning:"warning",esriJobMessageTypeError:"error",esriJobMessageTypeEmpty:"empty",esriJobMessageTypeAbort:"abort"});let Ue=class extends C.oY{constructor(e){super(e),this.description=null,this.type=null}};(0,r._)([(0,v.MZ)({type:String,json:{write:!0}})],Ue.prototype,"description",void 0),(0,r._)([(0,v.MZ)({type:String,json:{read:Le.read,write:Le.write}})],Ue.prototype,"type",void 0),Ue=(0,r._)([(0,T.$)("esri.rest.support.GPMessage")],Ue);const ke=Ue,Je=new q.J({0:"informative",1:"process-definition",2:"process-start",3:"process-stop",50:"warning",100:"error",101:"empty",200:"abort"});let Ve=class extends ke{constructor(e){super(e),this.type=null}};(0,r._)([(0,v.MZ)({type:String,json:{read:Je.read,write:Je.write}})],Ve.prototype,"type",void 0),Ve=(0,r._)([(0,T.$)("esri.rest.support.NAMessage")],Ve);const We=Ve;let Ge=class extends C.oY{constructor(e){super(e)}};(0,r._)([(0,v.MZ)({json:{read:{source:"string"}}})],Ge.prototype,"text",void 0),(0,r._)([(0,$.e)(be,{name:"stringType"})],Ge.prototype,"type",void 0),Ge=(0,r._)([(0,T.$)("esri.rest.support.DirectionsString")],Ge);const $e=Ge;var qe=i(86738);let ze=class extends C.oY{constructor(e){super(e),this.arriveTime=null,this.arriveTimeOffset=null,this.geometry=null,this.strings=null}readArriveTimeOffset(e,t){return Ee(t.ETA,t.arriveTimeUTC)}readGeometry(e,t){return qe.A.fromJSON(t.point)}};(0,r._)([(0,v.MZ)({type:Date,json:{read:{source:"arriveTimeUTC"}}})],ze.prototype,"arriveTime",void 0),(0,r._)([(0,v.MZ)()],ze.prototype,"arriveTimeOffset",void 0),(0,r._)([(0,g.w)("arriveTimeOffset",["arriveTimeUTC","ETA"])],ze.prototype,"readArriveTimeOffset",null),(0,r._)([(0,v.MZ)({type:qe.A})],ze.prototype,"geometry",void 0),(0,r._)([(0,g.w)("geometry",["point"])],ze.prototype,"readGeometry",null),(0,r._)([(0,v.MZ)({type:[$e]})],ze.prototype,"strings",void 0),ze=(0,r._)([(0,T.$)("esri.rest.support.DirectionsEvent")],ze);const Ke=ze;var Ye=i(82799);let He=class extends n.A{constructor(e){super(e),this.events=null,this.strings=null}readGeometry(e,t){const i=function(e){if(null==e||""===e)return null;let t=0,i=0,r=0,o=0;const s=[];let n,a,l,u,p,d,c,m,y=0,f=0,h=0;if(p=e.match(/((\+|\-)[^\+\-\|]+|\|)/g),p||(p=[]),0===parseInt(p[y],32)){y=2;const e=parseInt(p[y],32);y++,d=parseInt(p[y],32),y++,1&e&&(f=p.indexOf("|")+1,c=parseInt(p[f],32),f++),2&e&&(h=p.indexOf("|",f)+1,m=parseInt(p[h],32),h++)}else d=parseInt(p[y],32),y++;for(;y<p.length&&"|"!==p[y];){n=parseInt(p[y],32)+t,y++,t=n,a=parseInt(p[y],32)+i,y++,i=a;const e=[n/d,a/d];f&&(u=parseInt(p[f],32)+r,f++,r=u,e.push(u/c)),h&&(l=parseInt(p[h],32)+o,h++,o=l,e.push(l/m)),s.push(e)}return{paths:[s],hasZ:f>0,hasM:h>0}}(t.compressedGeometry);return null!=i?Ye.A.fromJSON(i):null}};(0,r._)([(0,v.MZ)({type:[Ke]})],He.prototype,"events",void 0),(0,r._)([(0,g.w)("geometry",["compressedGeometry"])],He.prototype,"readGeometry",null),(0,r._)([(0,v.MZ)({type:[$e]})],He.prototype,"strings",void 0),He=(0,r._)([(0,T.$)("esri.rest.support.DirectionsFeature")],He);const Xe=He;var Qe=i(16930);let et=class extends Pe.A{constructor(e){super(e),this.extent=null,this.features=[],this.geometryType="polyline",this.routeId=null,this.routeName=null,this.totalDriveTime=null,this.totalLength=null,this.totalTime=null}readFeatures(e,t){if(!e)return[];const i=t.summary.envelope.spatialReference??t.spatialReference,r=i&&Qe.A.fromJSON(i);return e.map((e=>{const t=Xe.fromJSON(e);if(null!=t.geometry&&(t.geometry.spatialReference=r),null!=t.events)for(const e of t.events)null!=e.geometry&&(e.geometry.spatialReference=r);return t}))}get mergedGeometry(){return this.features?function(e,t){if(0===e.length)return new Ye.A({spatialReference:t});const i=[];for(const t of e)for(const e of t.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:o,hasZ:s}=e[0];return new Ye.A({hasM:o,hasZ:s,paths:[r],spatialReference:t})}(this.features.map((({geometry:e})=>e)),this.extent.spatialReference):null}get strings(){return this.features.flatMap((({strings:e})=>e)).filter(Re.Ru)}};(0,r._)([(0,v.MZ)({type:A.A,json:{read:{source:"summary.envelope"}}})],et.prototype,"extent",void 0),(0,r._)([(0,v.MZ)({nonNullable:!0})],et.prototype,"features",void 0),(0,r._)([(0,g.w)("features")],et.prototype,"readFeatures",null),(0,r._)([(0,v.MZ)()],et.prototype,"geometryType",void 0),(0,r._)([(0,v.MZ)({readOnly:!0})],et.prototype,"mergedGeometry",null),(0,r._)([(0,v.MZ)()],et.prototype,"routeId",void 0),(0,r._)([(0,v.MZ)()],et.prototype,"routeName",void 0),(0,r._)([(0,v.MZ)({value:null,readOnly:!0})],et.prototype,"strings",null),(0,r._)([(0,v.MZ)({json:{read:{source:"summary.totalDriveTime"}}})],et.prototype,"totalDriveTime",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"summary.totalLength"}}})],et.prototype,"totalLength",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"summary.totalTime"}}})],et.prototype,"totalTime",void 0),et=(0,r._)([(0,T.$)("esri.rest.support.DirectionsFeatureSet")],et);const tt=et;let it=class extends C.oY{constructor(e){super(e),this.directionLines=null,this.directionPoints=null,this.directions=null,this.route=null,this.routeName=null,this.stops=null,this.traversedEdges=null,this.traversedJunctions=null,this.traversedTurns=null}};(0,r._)([(0,v.MZ)({type:Pe.A,json:{write:!0}})],it.prototype,"directionLines",void 0),(0,r._)([(0,v.MZ)({type:Pe.A,json:{write:!0}})],it.prototype,"directionPoints",void 0),(0,r._)([(0,v.MZ)({type:tt,json:{write:!0}})],it.prototype,"directions",void 0),(0,r._)([(0,v.MZ)({type:n.A,json:{write:!0}})],it.prototype,"route",void 0),(0,r._)([(0,v.MZ)({type:String,json:{write:!0}})],it.prototype,"routeName",void 0),(0,r._)([(0,v.MZ)({type:[n.A],json:{write:!0}})],it.prototype,"stops",void 0),(0,r._)([(0,v.MZ)({type:Pe.A,json:{write:!0}})],it.prototype,"traversedEdges",void 0),(0,r._)([(0,v.MZ)({type:Pe.A,json:{write:!0}})],it.prototype,"traversedJunctions",void 0),(0,r._)([(0,v.MZ)({type:Pe.A,json:{write:!0}})],it.prototype,"traversedTurns",void 0),it=(0,r._)([(0,T.$)("esri.rest.support.RouteResult")],it);const rt=it;function ot(e){return e?Pe.A.fromJSON(e).features.filter(Re.Ru):[]}let st=class extends C.oY{constructor(e){super(e),this.messages=null,this.pointBarriers=null,this.polylineBarriers=null,this.polygonBarriers=null,this.routeResults=null}readPointBarriers(e,t){return ot(t.barriers)}readPolylineBarriers(e){return ot(e)}readPolygonBarriers(e){return ot(e)}};(0,r._)([(0,v.MZ)({type:[We]})],st.prototype,"messages",void 0),(0,r._)([(0,v.MZ)({type:[n.A]})],st.prototype,"pointBarriers",void 0),(0,r._)([(0,g.w)("pointBarriers",["barriers"])],st.prototype,"readPointBarriers",null),(0,r._)([(0,v.MZ)({type:[n.A]})],st.prototype,"polylineBarriers",void 0),(0,r._)([(0,g.w)("polylineBarriers")],st.prototype,"readPolylineBarriers",null),(0,r._)([(0,v.MZ)({type:[n.A]})],st.prototype,"polygonBarriers",void 0),(0,r._)([(0,g.w)("polygonBarriers")],st.prototype,"readPolygonBarriers",null),(0,r._)([(0,v.MZ)({type:[rt]})],st.prototype,"routeResults",void 0),st=(0,r._)([(0,T.$)("esri.rest.support.RouteSolveResult")],st);const nt=st;function at(e){return e instanceof Pe.A}async function lt(e,t,i){const r=[],o=[],s={},n={},a=(0,G.Dl)(e),{path:l}=a;at(t.stops)&&Oe(t.stops.features,o,"stops.features",s),at(t.pointBarriers)&&Oe(t.pointBarriers.features,o,"pointBarriers.features",s),at(t.polylineBarriers)&&Oe(t.polylineBarriers.features,o,"polylineBarriers.features",s),at(t.polygonBarriers)&&Oe(t.polygonBarriers.features,o,"polygonBarriers.features",s);const p=await(0,De.el)(o);for(const e in s){const t=s[e];r.push(e),n[e]=p.slice(t[0],t[1])}if(function(e,t){for(let i=0;i<t.length;i++){const r=e[t[i]];if(r&&r.length)for(const e of r)if(null!=e&&e.hasZ)return!0}return!1}(n,r)){let e=null;try{e=await Ie(l,t.apiKey,i)}catch{}e&&!e.hasZ&&function(e,t){for(let i=0;i<t.length;i++){const r=e[t[i]];if(r&&r.length)for(const e of r)e.z=void 0}u.A.getLogger("esri.rest.networkService").warnOnce("The remote Network Analysis service is powered by a network dataset which is not Z-aware.\nZ-coordinates of the input geometry are ignored.")}(n,r)}for(const e in n)n[e].forEach(((i,r)=>{(0,xe.Jt)(t,e)[r].geometry=i}));const d={...i,query:{...a.query,...Be(t),f:"json"}},c=l.endsWith("/solve")?l:`${l}/solve`,{data:m}=await(0,W.A)(c,d);return function(e){const{barriers:t,directionLines:i,directionPoints:r,directions:o,messages:s,polygonBarriers:n,polylineBarriers:a,routes:l,stops:u,traversedEdges:p,traversedJunctions:d,traversedTurns:c}=e,m=e=>{const t=f.find((t=>t.routeName===e));if(null!=t)return t;const i={routeId:f.length+1,routeName:e};return f.push(i),i},y=e=>{const t=f.find((t=>t.routeId===e));if(null!=t)return t;const i={routeId:e,routeName:null};return f.push(i),i},f=[];l?.features.forEach(((e,t)=>{e.geometry.spatialReference=l.spatialReference??void 0;const i=e.attributes.Name,r=t+1;f.push({routeId:r,routeName:i,route:e})})),o?.forEach((e=>{const{routeName:t}=e;m(t).directions=e}));const h=u?.features.every((e=>null==e.attributes.RouteName))&&f.length>0?f[0].routeName:null;return u?.features.forEach((e=>{e.geometry&&(e.geometry.spatialReference??=u.spatialReference??void 0);const t=h??e.attributes.RouteName,i=m(t);i.stops??=[],i.stops.push(e)})),i?.features.forEach((e=>{const t=e.attributes.RouteID,r=y(t),{geometryType:o,spatialReference:s}=i;r.directionLines??={features:[],geometryType:o,spatialReference:s},r.directionLines.features.push(e)})),r?.features.forEach((e=>{const t=e.attributes.RouteID,i=y(t),{geometryType:o,spatialReference:s}=r;i.directionPoints??={features:[],geometryType:o,spatialReference:s},i.directionPoints.features.push(e)})),p?.features.forEach((e=>{const t=e.attributes.RouteID,i=y(t),{geometryType:r,spatialReference:o}=p;i.traversedEdges??={features:[],geometryType:r,spatialReference:o},i.traversedEdges.features.push(e)})),d?.features.forEach((e=>{const t=e.attributes.RouteID,i=y(t),{geometryType:r,spatialReference:o}=d;i.traversedJunctions??={features:[],geometryType:r,spatialReference:o},i.traversedJunctions.features.push(e)})),c?.features.forEach((e=>{const t=e.attributes.RouteID,i=y(t);i.traversedTurns??={features:[]},i.traversedTurns.features.push(e)})),nt.fromJSON({routeResults:f,barriers:t,polygonBarriers:n,polylineBarriers:a,messages:s})}(m)}var ut;let pt=ut=class extends((0,Se.O)(C.oY)){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,this.type="direction-line"}static fromGraphic(e){return new ut({directionLineType:le.fromJSON(e.attributes.DirectionLineType),directionPointId:e.attributes.DirectionPointID,distance:e.attributes.Meters,duration:e.attributes.Minutes,fromLevel:e.attributes.FromLevel??null,geometry:e.geometry,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,symbol:e.symbol,toLevel:e.attributes.ToLevel??null})}toGraphic(){const e={ObjectID:this.objectId,DirectionLineType:null!=this.directionLineType?le.toJSON(this.directionLineType):null,DirectionPointID:this.directionPointId,Meters:this.distance,Minutes:this.duration};return null!=this.fromLevel&&(e.FromLevel=this.fromLevel),null!=this.toLevel&&(e.ToLevel=this.toLevel),new n.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};pt.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}],pt.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:[]},(0,r._)([(0,v.MZ)({type:le.apiValues,json:{read:{source:"attributes.DirectionLineType",reader:le.read}}})],pt.prototype,"directionLineType",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.DirectionPointID"}}})],pt.prototype,"directionPointId",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.Meters"}}})],pt.prototype,"distance",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.Minutes"}}})],pt.prototype,"duration",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.FromLevel"}}})],pt.prototype,"fromLevel",void 0),(0,r._)([(0,v.MZ)({type:Ye.A})],pt.prototype,"geometry",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.ObjectID"}}})],pt.prototype,"objectId",void 0),(0,r._)([(0,v.MZ)({type:a.A})],pt.prototype,"popupTemplate",void 0),(0,r._)([(0,v.MZ)({types:Z.Es})],pt.prototype,"symbol",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.ToLevel"}}})],pt.prototype,"toLevel",void 0),(0,r._)([(0,v.MZ)({readOnly:!0,json:{read:!1}})],pt.prototype,"type",void 0),pt=ut=(0,r._)([(0,T.$)("esri.rest.support.DirectionLine")],pt);const dt=pt;var ct;let mt=ct=class extends((0,Se.O)(C.oY)){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.type="direction-point",this.voiceInstruction=null}readArrivalTime(e,t){return null!=t.attributes.ArrivalTime?new Date(t.attributes.ArrivalTime):null}static fromGraphic(e){return new ct({alternateName:e.attributes.AlternateName??null,arrivalTime:null!=e.attributes.ArrivalTime?new Date(e.attributes.ArrivalTime):null,arrivalTimeOffset:e.attributes.ArrivalUTCOffset??null,azimuth:e.attributes.Azimuth??null,branchName:e.attributes.BranchName??null,directionPointType:ae.fromJSON(e.attributes.DirectionPointType),displayText:e.attributes.DisplayText??null,exitName:e.attributes.ExitName??null,geometry:e.geometry,intersectingName:e.attributes.IntersectingName??null,level:e.attributes.Level??null,name:e.attributes.Name??null,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,sequence:e.attributes.Sequence,shortVoiceInstruction:e.attributes.ShortVoiceInstruction??null,stopId:e.attributes.StopID??null,symbol:e.symbol,towardName:e.attributes.TowardName??null,voiceInstruction:e.attributes.VoiceInstruction??null})}toGraphic(){const e={ObjectID:this.objectId,DirectionPointType:null!=this.directionPointType?ae.toJSON(this.directionPointType):null,Sequence:this.sequence,StopID:this.stopId};return null!=this.alternateName&&(e.AlternateName=this.alternateName),null!=this.arrivalTime&&(e.ArrivalTime=this.arrivalTime.getTime()),null!=this.arrivalTimeOffset&&(e.ArrivalUTCOffset=this.arrivalTimeOffset),null!=this.azimuth&&(e.Azimuth=this.azimuth),null!=this.branchName&&(e.BranchName=this.branchName),null!=this.displayText&&(e.DisplayText=this.displayText),null!=this.exitName&&(e.ExitName=this.exitName),null!=this.intersectingName&&(e.IntersectingName=this.intersectingName),null!=this.level&&(e.Level=this.level),null!=this.name&&(e.Name=this.name),null!=this.shortVoiceInstruction&&(e.ShortVoiceInstruction=this.shortVoiceInstruction),null!=this.towardName&&(e.TowardName=this.towardName),null!=this.voiceInstruction&&(e.VoiceInstruction=this.voiceInstruction),new n.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};mt.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}],mt.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:[]},(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.AlternateName"}}})],mt.prototype,"alternateName",void 0),(0,r._)([(0,v.MZ)()],mt.prototype,"arrivalTime",void 0),(0,r._)([(0,g.w)("arrivalTime",["attributes.ArrivalTime"])],mt.prototype,"readArrivalTime",null),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.ArrivalUTCOffset"}}})],mt.prototype,"arrivalTimeOffset",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.Azimuth"}}})],mt.prototype,"azimuth",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.BranchName"}}})],mt.prototype,"branchName",void 0),(0,r._)([(0,v.MZ)({type:ae.apiValues,json:{read:{source:"attributes.DirectionPointType",reader:ae.read}}})],mt.prototype,"directionPointType",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.DisplayText"}}})],mt.prototype,"displayText",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.ExitName"}}})],mt.prototype,"exitName",void 0),(0,r._)([(0,v.MZ)({type:qe.A})],mt.prototype,"geometry",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.IntersectingName"}}})],mt.prototype,"intersectingName",void 0),(0,r._)([(0,v.MZ)()],mt.prototype,"level",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.Name"}}})],mt.prototype,"name",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.ObjectID"}}})],mt.prototype,"objectId",void 0),(0,r._)([(0,v.MZ)({type:a.A})],mt.prototype,"popupTemplate",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.Sequence"}}})],mt.prototype,"sequence",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.ShortVoiceInstruction"}}})],mt.prototype,"shortVoiceInstruction",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.StopID"}}})],mt.prototype,"stopId",void 0),(0,r._)([(0,v.MZ)({types:Z.Es})],mt.prototype,"symbol",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.TowardName"}}})],mt.prototype,"towardName",void 0),(0,r._)([(0,v.MZ)({readOnly:!0,json:{read:!1}})],mt.prototype,"type",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.VoiceInstruction"}}})],mt.prototype,"voiceInstruction",void 0),mt=ct=(0,r._)([(0,T.$)("esri.rest.support.DirectionPoint")],mt);const yt=mt;var ft;let ht=ft=class extends((0,Se.O)(C.oY)){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,this.type="point-barrier"}readCosts(e,t){return Fe(t.attributes,"Attr_")}writeCosts(e,t){Ze(e,t,"Attr_")}static fromGraphic(e){return new ft({addedCost:e.attributes.AddedCost??null,barrierType:null!=e.attributes.BarrierType?se.fromJSON(e.attributes.BarrierType):null,costs:null!=e.attributes.Costs?Ce(JSON.parse(e.attributes.Costs)):null,curbApproach:null!=e.attributes.CurbApproach?te.fromJSON(e.attributes.CurbApproach):null,fullEdge:null!=e.attributes.FullEdge?ne.fromJSON(e.attributes.FullEdge):null,geometry:e.geometry,name:e.attributes.Name??null,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,status:null!=e.attributes.Status?re.fromJSON(e.attributes.Status):null,symbol:e.symbol})}toGraphic(){const e={ObjectID:this.objectId,AddedCost:this.addedCost,BarrierType:null!=this.barrierType?se.toJSON(this.barrierType):null,Costs:null!=this.costs?JSON.stringify(je(this.costs)):null,CurbApproach:null!=this.curbApproach?te.toJSON(this.curbApproach):null,FullEdge:null!=this.fullEdge?ne.toJSON(this.fullEdge):null,Name:this.name,Status:null!=this.status?re.toJSON(this.status):null};return new n.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};ht.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}]}}],ht.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:[]},(0,r._)([(0,v.MZ)()],ht.prototype,"addedCost",void 0),(0,r._)([(0,v.MZ)({type:se.apiValues,json:{name:"attributes.BarrierType",read:{reader:se.read},write:{writer:se.write}}})],ht.prototype,"barrierType",void 0),(0,r._)([(0,v.MZ)()],ht.prototype,"costs",void 0),(0,r._)([(0,g.w)("costs",["attributes"])],ht.prototype,"readCosts",null),(0,r._)([(0,w.K)("costs")],ht.prototype,"writeCosts",null),(0,r._)([(0,v.MZ)({constructOnly:!0,type:te.apiValues,json:{read:{source:"attributes.CurbApproach",reader:te.read}}})],ht.prototype,"curbApproach",void 0),(0,r._)([(0,v.MZ)({type:ne.apiValues,json:{name:"attributes.FullEdge",read:{reader:ne.read},write:{writer:ne.write}}})],ht.prototype,"fullEdge",void 0),(0,r._)([(0,v.MZ)({type:qe.A,json:{write:!0}})],ht.prototype,"geometry",void 0),(0,r._)([(0,v.MZ)({json:{name:"attributes.Name"}})],ht.prototype,"name",void 0),(0,r._)([(0,v.MZ)({json:{name:"attributes.ObjectID"}})],ht.prototype,"objectId",void 0),(0,r._)([(0,v.MZ)({type:a.A})],ht.prototype,"popupTemplate",void 0),(0,r._)([(0,v.MZ)({type:oe.apiValues,json:{read:{source:"attributes.SideOfEdge",reader:oe.read}}})],ht.prototype,"sideOfEdge",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.SourceID"}}})],ht.prototype,"sourceId",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.SourceOID"}}})],ht.prototype,"sourceOid",void 0),(0,r._)([(0,v.MZ)({type:re.apiValues,json:{read:{source:"attributes.Status",reader:re.read}}})],ht.prototype,"status",void 0),(0,r._)([(0,v.MZ)({types:Z.Es})],ht.prototype,"symbol",void 0),(0,r._)([(0,v.MZ)({readOnly:!0,json:{read:!1}})],ht.prototype,"type",void 0),ht=ft=(0,r._)([(0,T.$)("esri.rest.support.PointBarrier")],ht);const bt=ht;var vt,gt=i(39829);let Tt=vt=class extends((0,Se.O)(C.oY)){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,this.type="polygon-barrier"}readCosts(e,t){return Fe(t.attributes,"Attr_")}writeCosts(e,t){Ze(e,t,"Attr_")}static fromGraphic(e){return new vt({barrierType:null!=e.attributes.BarrierType?se.fromJSON(e.attributes.BarrierType):null,costs:null!=e.attributes.Costs?Ce(JSON.parse(e.attributes.Costs)):null,geometry:e.geometry,name:e.attributes.Name??null,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,scaleFactor:e.attributes.ScaleFactor??null,symbol:e.symbol})}toGraphic(){const e={ObjectID:this.objectId,BarrierType:null!=this.barrierType?se.toJSON(this.barrierType):null,Costs:null!=this.costs?JSON.stringify(je(this.costs)):null,Name:this.name??null,ScaleFactor:this.scaleFactor??null};return new n.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};Tt.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}],Tt.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:[]},(0,r._)([(0,v.MZ)({type:se.apiValues,json:{name:"attributes.BarrierType",read:{reader:se.read},write:{writer:se.write}}})],Tt.prototype,"barrierType",void 0),(0,r._)([(0,v.MZ)()],Tt.prototype,"costs",void 0),(0,r._)([(0,g.w)("costs",["attributes"])],Tt.prototype,"readCosts",null),(0,r._)([(0,w.K)("costs")],Tt.prototype,"writeCosts",null),(0,r._)([(0,v.MZ)({type:gt.A,json:{write:!0}})],Tt.prototype,"geometry",void 0),(0,r._)([(0,v.MZ)({json:{name:"attributes.Name"}})],Tt.prototype,"name",void 0),(0,r._)([(0,v.MZ)({json:{name:"attributes.ObjectID"}})],Tt.prototype,"objectId",void 0),(0,r._)([(0,v.MZ)({type:a.A})],Tt.prototype,"popupTemplate",void 0),(0,r._)([(0,v.MZ)()],Tt.prototype,"scaleFactor",void 0),(0,r._)([(0,v.MZ)({types:Z.Es})],Tt.prototype,"symbol",void 0),(0,r._)([(0,v.MZ)({readOnly:!0,json:{read:!1}})],Tt.prototype,"type",void 0),Tt=vt=(0,r._)([(0,T.$)("esri.rest.support.PolygonBarrier")],Tt);const wt=Tt;var St;let At=St=class extends((0,Se.O)(C.oY)){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,this.type="polyline-barrier"}readCosts(e,t){return Fe(t.attributes,"Attr_")}static fromGraphic(e){return new St({barrierType:null!=e.attributes.BarrierType?se.fromJSON(e.attributes.BarrierType):null,costs:null!=e.attributes.Costs?Ce(JSON.parse(e.attributes.Costs)):null,geometry:e.geometry,name:e.attributes.Name??null,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,scaleFactor:e.attributes.ScaleFactor??null,symbol:e.symbol})}toGraphic(){const e={ObjectID:this.objectId,BarrierType:null!=this.barrierType?se.toJSON(this.barrierType):null,Costs:null!=this.costs?JSON.stringify(je(this.costs)):null,Name:this.name,ScaleFactor:this.scaleFactor};return new n.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};At.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}],At.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:[]},(0,r._)([(0,v.MZ)({type:se.apiValues,json:{read:{source:"attributes.BarrierType",reader:se.read}}})],At.prototype,"barrierType",void 0),(0,r._)([(0,v.MZ)()],At.prototype,"costs",void 0),(0,r._)([(0,g.w)("costs",["attributes"])],At.prototype,"readCosts",null),(0,r._)([(0,v.MZ)({type:Ye.A,json:{write:!0}})],At.prototype,"geometry",void 0),(0,r._)([(0,v.MZ)({json:{name:"attributes.Name"}})],At.prototype,"name",void 0),(0,r._)([(0,v.MZ)({json:{name:"attributes.ObjectID"}})],At.prototype,"objectId",void 0),(0,r._)([(0,v.MZ)({type:a.A})],At.prototype,"popupTemplate",void 0),(0,r._)([(0,v.MZ)()],At.prototype,"scaleFactor",void 0),(0,r._)([(0,v.MZ)({types:Z.Es})],At.prototype,"symbol",void 0),(0,r._)([(0,v.MZ)({readOnly:!0,json:{read:!1}})],At.prototype,"type",void 0),At=St=(0,r._)([(0,T.$)("esri.rest.support.PolylineBarrier")],At);const _t=At;let Mt=class extends C.oY{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}readAccumulateAttributes(e){return null==e?null:e.map((e=>ce.fromJSON(e)))}writeAccumulateAttributes(e,t,i){e?.length&&(t[i]=e.map((e=>ce.toJSON(e))))}};(0,r._)([(0,v.MZ)({type:[String],json:{name:"accumulateAttributeNames",write:!0}})],Mt.prototype,"accumulateAttributes",void 0),(0,r._)([(0,g.w)("accumulateAttributes")],Mt.prototype,"readAccumulateAttributes",null),(0,r._)([(0,w.K)("accumulateAttributes")],Mt.prototype,"writeAccumulateAttributes",null),(0,r._)([(0,v.MZ)({type:String,json:{write:!0}})],Mt.prototype,"directionsLanguage",void 0),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],Mt.prototype,"findBestSequence",void 0),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],Mt.prototype,"preserveFirstStop",void 0),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],Mt.prototype,"preserveLastStop",void 0),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],Mt.prototype,"startTimeIsUTC",void 0),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],Mt.prototype,"timeWindowsAreUTC",void 0),(0,r._)([(0,v.MZ)({type:_e,json:{write:!0}})],Mt.prototype,"travelMode",void 0),Mt=(0,r._)([(0,T.$)("esri.rest.support.RouteSettings")],Mt);const Nt=Mt;var Ot;let It=Ot=class extends((0,Se.O)(C.oY)){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.type="route-info",this.version="1.0.0"}readEndTime(e,t){return null!=t.attributes.EndTimeUTC?new Date(t.attributes.EndTimeUTC):null}readEndTimeOffset(e,t){return Ee(t.attributes.EndTime,t.attributes.EndTimeUTC)}readStartTime(e,t){return null!=t.attributes.StartTimeUTC?new Date(t.attributes.StartTimeUTC):null}readStartTimeOffset(e,t){return Ee(t.attributes.StartTime,t.attributes.StartTimeUTC)}readTotalCosts(e,t){return Fe(t.attributes,"Total_")}readTotalViolations(e,t){return Fe(t.attributes,"TotalViolation_")}readTotalWait(e,t){return Fe(t.attributes,"TotalWait_")}static fromGraphic(e){return new Ot({analysisSettings:null!=e.attributes.AnalysisSettings?Nt.fromJSON(JSON.parse(e.attributes.AnalysisSettings)):null,endTime:null!=e.attributes.EndTime?new Date(e.attributes.EndTime):null,endTimeOffset:e.attributes.EndUTCOffset??null,geometry:e.geometry,messages:null!=e.attributes.Messages?JSON.parse(e.attributes.Messages):null,name:e.attributes.RouteName,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,startTime:null!=e.attributes.StartTime?new Date(e.attributes.StartTime):null,startTimeOffset:e.attributes.StartUTCOffset??null,symbol:e.symbol,totalCosts:null!=e.attributes.TotalCosts?Ce(JSON.parse(e.attributes.TotalCosts)):null,totalDistance:e.attributes.TotalMeters??null,totalDuration:e.attributes.TotalMinutes??null,totalLateDuration:e.attributes.TotalLateMinutes??null,totalWaitDuration:e.attributes.TotalWaitMinutes??null,version:e.attributes.Version})}toGraphic(){const e={ObjectID:this.objectId,AnalysisSettings:null!=this.analysisSettings?JSON.stringify(this.analysisSettings.toJSON()):null,EndTime:null!=this.endTime?this.endTime.getTime():null,EndUTCOffset:this.endTimeOffset,Messages:null!=this.messages?JSON.stringify(this.messages):null,RouteName:this.name,StartTime:null!=this.startTime?this.startTime.getTime():null,StartUTCOffset:this.startTimeOffset,TotalCosts:null!=this.totalCosts?JSON.stringify(je(this.totalCosts)):null,TotalLateMinutes:this.totalLateDuration,TotalMeters:this.totalDistance,TotalMinutes:this.totalDuration,TotalWaitMinutes:this.totalWaitDuration,Version:this.version};return new n.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};It.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}],It.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:[]},(0,r._)([(0,v.MZ)()],It.prototype,"analysisSettings",void 0),(0,r._)([(0,v.MZ)()],It.prototype,"endTime",void 0),(0,r._)([(0,g.w)("endTime",["attributes.EndTimeUTC"])],It.prototype,"readEndTime",null),(0,r._)([(0,v.MZ)()],It.prototype,"endTimeOffset",void 0),(0,r._)([(0,g.w)("endTimeOffset",["attributes.EndTime","attributes.EndTimeUTC"])],It.prototype,"readEndTimeOffset",null),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.FirstStopID"}}})],It.prototype,"firstStopId",void 0),(0,r._)([(0,v.MZ)({type:Ye.A})],It.prototype,"geometry",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.LastStopID"}}})],It.prototype,"lastStopId",void 0),(0,r._)([(0,v.MZ)()],It.prototype,"messages",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.Name"}}})],It.prototype,"name",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.ObjectID"}}})],It.prototype,"objectId",void 0),(0,r._)([(0,v.MZ)({type:a.A})],It.prototype,"popupTemplate",void 0),(0,r._)([(0,v.MZ)()],It.prototype,"startTime",void 0),(0,r._)([(0,g.w)("startTime",["attributes.StartTimeUTC"])],It.prototype,"readStartTime",null),(0,r._)([(0,v.MZ)()],It.prototype,"startTimeOffset",void 0),(0,r._)([(0,g.w)("startTimeOffset",["attributes.StartTime","attributes.StartTimeUTC"])],It.prototype,"readStartTimeOffset",null),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.StopCount"}}})],It.prototype,"stopCount",void 0),(0,r._)([(0,v.MZ)({types:Z.Es})],It.prototype,"symbol",void 0),(0,r._)([(0,v.MZ)()],It.prototype,"totalCosts",void 0),(0,r._)([(0,g.w)("totalCosts",["attributes"])],It.prototype,"readTotalCosts",null),(0,r._)([(0,v.MZ)()],It.prototype,"totalDistance",void 0),(0,r._)([(0,v.MZ)()],It.prototype,"totalDuration",void 0),(0,r._)([(0,v.MZ)()],It.prototype,"totalLateDuration",void 0),(0,r._)([(0,v.MZ)()],It.prototype,"totalViolations",void 0),(0,r._)([(0,g.w)("totalViolations",["attributes"])],It.prototype,"readTotalViolations",null),(0,r._)([(0,v.MZ)()],It.prototype,"totalWait",void 0),(0,r._)([(0,g.w)("totalWait",["attributes"])],It.prototype,"readTotalWait",null),(0,r._)([(0,v.MZ)()],It.prototype,"totalWaitDuration",void 0),(0,r._)([(0,v.MZ)({readOnly:!0,json:{read:!1}})],It.prototype,"type",void 0),(0,r._)([(0,v.MZ)()],It.prototype,"version",void 0),It=Ot=(0,r._)([(0,T.$)("esri.rest.support.RouteInfo")],It);const xt=It;var Dt=i(56507);const Ft={type:String,json:{read:{source:"token"},write:{target:"token"}}};var Zt=i(65864);let Ct=class extends((0,Se.O)(C.oY)){constructor(e){super(e),this.doNotLocateOnRestrictedElements=null,this.geometry=null,this.geometryType=null,this.name=null,this.spatialRelationship=null,this.type="layer",this.where=null}};(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],Ct.prototype,"doNotLocateOnRestrictedElements",void 0),(0,r._)([(0,v.MZ)({types:s.yR,json:{read:Zt.rS,write:!0}})],Ct.prototype,"geometry",void 0),(0,r._)([(0,$.e)(fe)],Ct.prototype,"geometryType",void 0),(0,r._)([(0,v.MZ)({type:String,json:{name:"layerName",write:!0}})],Ct.prototype,"name",void 0),(0,r._)([(0,$.e)(ye,{name:"spatialRel"})],Ct.prototype,"spatialRelationship",void 0),(0,r._)([(0,v.MZ)({type:String,json:{write:!0}})],Ct.prototype,"type",void 0),(0,r._)([(0,v.MZ)({type:String,json:{write:!0}})],Ct.prototype,"where",void 0),Ct=(0,r._)([(0,T.$)("esri.rest.support.DataLayer")],Ct);const jt=Ct;var Et;let Bt=Et=class extends Pe.A{constructor(e){super(e),this.doNotLocateOnRestrictedElements=null}clone(){return new Et({doNotLocateOnRestrictedElements:this.doNotLocateOnRestrictedElements,...this.cloneProperties()})}};(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],Bt.prototype,"doNotLocateOnRestrictedElements",void 0),Bt=Et=(0,r._)([(0,T.$)("esri.rest.support.NetworkFeatureSet")],Bt);const Pt=Bt;let Rt=class extends((0,Se.O)(C.oY)){constructor(e){super(e),this.doNotLocateOnRestrictedElements=null,this.url=null}};(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],Rt.prototype,"doNotLocateOnRestrictedElements",void 0),(0,r._)([(0,v.MZ)({type:String,json:{write:!0}})],Rt.prototype,"url",void 0),Rt=(0,r._)([(0,T.$)("esri.rest.support.NetworkUrl")],Rt);const Lt=Rt;var Ut;let kt=Ut=class extends((0,Se.O)(C.oY)){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.geometryPrecision=null,this.geometryPrecisionM=null,this.geometryPrecisionZ=null,this.ignoreInvalidLocations=null,this.impedanceAttribute=null,this.outputGeometryPrecision=null,this.outputGeometryPrecisionUnits=null,this.outputLines="true-shape",this.outSpatialReference=null,this.overrides=null,this.pointBarriers=null,this.polygonBarriers=null,this.polylineBarriers=null,this.preserveFirstStop=null,this.preserveLastStop=null,this.preserveObjectID=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.returnTraversedEdges=null,this.returnTraversedJunctions=null,this.returnTraversedTurns=null,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(0,Dt.PZ)(Ut,e)}readAccumulateAttributes(e){return null==e?null:e.map((e=>ce.fromJSON(e)))}writeAccumulateAttributes(e,t,i){e?.length&&(t[i]=e.map((e=>ce.toJSON(e))))}writePointBarriers(e,t,i){Vt(e,t,i)}writePolygonBarrier(e,t,i){Vt(e,t,i)}writePolylineBarrier(e,t,i){Vt(e,t,i)}readRestrictionAttributes(e){return null==e?null:e.map((e=>me.fromJSON(e)))}writeRestrictionAttributes(e,t,i){e?.length&&(t[i]=e.map((e=>me.toJSON(e))))}readStartTime(e,t){const{startTime:i}=t;return null==i?null:"now"===i?"now":new Date(i)}writeStartTime(e,t){null!=e&&(t.startTime="now"===e?"now":e.getTime())}readStops(e,t){return function(e){return function(e){return e&&"type"in e}(e)?jt.fromJSON(e):function(e){return e&&"url"in e}(e)?Lt.fromJSON(e):function(e){return e&&"features"in e&&"doNotLocateOnRestrictedElements"in e}(e)?Pt.fromJSON(e):function(e){return e&&"features"in e}(e)?Pe.A.fromJSON(e):null}(t.stops)}writeStops(e,t,i){Vt(e,t,i)}};(0,r._)([(0,v.MZ)({type:[String],json:{name:"accumulateAttributeNames",write:!0}})],kt.prototype,"accumulateAttributes",void 0),(0,r._)([(0,g.w)("accumulateAttributes")],kt.prototype,"readAccumulateAttributes",null),(0,r._)([(0,w.K)("accumulateAttributes")],kt.prototype,"writeAccumulateAttributes",null),(0,r._)([(0,v.MZ)(Ft)],kt.prototype,"apiKey",void 0),(0,r._)([(0,v.MZ)({json:{write:!0}})],kt.prototype,"attributeParameterValues",void 0),(0,r._)([(0,v.MZ)({type:String,json:{write:!0}})],kt.prototype,"directionsLanguage",void 0),(0,r._)([(0,$.e)(K)],kt.prototype,"directionsLengthUnits",void 0),(0,r._)([(0,$.e)(H)],kt.prototype,"directionsOutputType",void 0),(0,r._)([(0,$.e)(ue)],kt.prototype,"directionsStyleName",void 0),(0,r._)([(0,$.e)(de,{name:"directionsTimeAttributeName",ignoreUnknown:!1})],kt.prototype,"directionsTimeAttribute",void 0),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],kt.prototype,"findBestSequence",void 0),(0,r._)([(0,v.MZ)({type:Number,json:{write:!0}})],kt.prototype,"geometryPrecision",void 0),(0,r._)([(0,v.MZ)({type:Number,json:{write:!0}})],kt.prototype,"geometryPrecisionM",void 0),(0,r._)([(0,v.MZ)({type:Number,json:{write:!0}})],kt.prototype,"geometryPrecisionZ",void 0),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],kt.prototype,"ignoreInvalidLocations",void 0),(0,r._)([(0,$.e)(ce,{name:"impedanceAttributeName",ignoreUnknown:!1})],kt.prototype,"impedanceAttribute",void 0),(0,r._)([(0,v.MZ)({type:Number,json:{write:!0}})],kt.prototype,"outputGeometryPrecision",void 0),(0,r._)([(0,$.e)(z)],kt.prototype,"outputGeometryPrecisionUnits",void 0),(0,r._)([(0,$.e)(X)],kt.prototype,"outputLines",void 0),(0,r._)([(0,v.MZ)({type:Qe.A,json:{name:"outSR",write:!0}})],kt.prototype,"outSpatialReference",void 0),(0,r._)([(0,v.MZ)({json:{write:!0}})],kt.prototype,"overrides",void 0),(0,r._)([(0,v.MZ)({json:{name:"barriers",write:!0}})],kt.prototype,"pointBarriers",void 0),(0,r._)([(0,w.K)("pointBarriers")],kt.prototype,"writePointBarriers",null),(0,r._)([(0,v.MZ)({json:{write:!0}})],kt.prototype,"polygonBarriers",void 0),(0,r._)([(0,w.K)("polygonBarriers")],kt.prototype,"writePolygonBarrier",null),(0,r._)([(0,v.MZ)({json:{write:!0}})],kt.prototype,"polylineBarriers",void 0),(0,r._)([(0,w.K)("polylineBarriers")],kt.prototype,"writePolylineBarrier",null),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],kt.prototype,"preserveFirstStop",void 0),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],kt.prototype,"preserveLastStop",void 0),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],kt.prototype,"preserveObjectID",void 0),(0,r._)([(0,v.MZ)({type:[String],json:{name:"restrictionAttributeNames",write:!0}})],kt.prototype,"restrictionAttributes",void 0),(0,r._)([(0,g.w)("restrictionAttributes")],kt.prototype,"readRestrictionAttributes",null),(0,r._)([(0,w.K)("restrictionAttributes")],kt.prototype,"writeRestrictionAttributes",null),(0,r._)([(0,$.e)(Q)],kt.prototype,"restrictUTurns",void 0),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],kt.prototype,"returnBarriers",void 0),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],kt.prototype,"returnDirections",void 0),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],kt.prototype,"returnPolygonBarriers",void 0),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],kt.prototype,"returnPolylineBarriers",void 0),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],kt.prototype,"returnRoutes",void 0),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],kt.prototype,"returnStops",void 0),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],kt.prototype,"returnTraversedEdges",void 0),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],kt.prototype,"returnTraversedJunctions",void 0),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],kt.prototype,"returnTraversedTurns",void 0),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],kt.prototype,"returnZ",void 0),(0,r._)([(0,v.MZ)({json:{write:!0}})],kt.prototype,"startTime",void 0),(0,r._)([(0,g.w)("startTime")],kt.prototype,"readStartTime",null),(0,r._)([(0,w.K)("startTime")],kt.prototype,"writeStartTime",null),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],kt.prototype,"startTimeIsUTC",void 0),(0,r._)([(0,v.MZ)({json:{write:!0}})],kt.prototype,"stops",void 0),(0,r._)([(0,g.w)("stops")],kt.prototype,"readStops",null),(0,r._)([(0,w.K)("stops")],kt.prototype,"writeStops",null),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],kt.prototype,"timeWindowsAreUTC",void 0),(0,r._)([(0,v.MZ)({type:_e,json:{write:!0}})],kt.prototype,"travelMode",void 0),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],kt.prototype,"useHierarchy",void 0),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],kt.prototype,"useTimeWindows",void 0),kt=Ut=(0,r._)([(0,T.$)("esri.rest.support.RouteParameters")],kt);const Jt=kt;function Vt(e,t,i){null!=e&&(t[i]=p.A.isCollection(e)?{features:e.toArray().map((e=>e.toJSON()))}:e.toJSON())}var Wt;let Gt=Wt=class extends((0,Se.O)(C.oY)){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.type="stop",this.violations=null,this.waitDuration=null,this.wait=null}readArriveTimeOffset(e,t){return Ee(t.attributes.ArriveTime,t.attributes.ArriveTimeUTC)}readCumulativeCosts(e,t){return Fe(t.attributes,"Cumul_")}readDepartTimeOffset(e,t){return Ee(t.attributes.DepartTime,t.attributes.DepartTimeUTC)}readServiceCosts(e,t){return Fe(t.attributes,"Attr_")}writeServiceCosts(e,t){Ze(e,t,"Attr_")}writeTimeWindowEnd(e,t){null!=e&&(t.attributes||(t.attributes={}),t.attributes.TimeWindowEnd=e.getTime())}writeTimeWindowStart(e,t){null!=e&&(t.attributes||(t.attributes={}),t.attributes.TimeWindowStart=e.getTime())}readViolations(e,t){return Fe(t.attributes,"Violation_")}readWait(e,t){return Fe(t.attributes,"Wait_")}static fromGraphic(e){return new Wt({arriveCurbApproach:null!=e.attributes.ArrivalCurbApproach?te.fromJSON(e.attributes.ArrivalCurbApproach):null,arriveTime:null!=e.attributes.ArrivalTime?new Date(e.attributes.ArrivalTime):null,arriveTimeOffset:e.attributes.ArrivalUTCOffset,cumulativeCosts:null!=e.attributes.CumulativeCosts?Ce(JSON.parse(e.attributes.CumulativeCosts)):null,cumulativeDistance:e.attributes.CumulativeMeters??null,cumulativeDuration:e.attributes.CumulativeMinutes??null,curbApproach:null!=e.attributes.CurbApproach?te.fromJSON(e.attributes.CurbApproach):null,departCurbApproach:null!=e.attributes.DepartureCurbApproach?te.fromJSON(e.attributes.DepartureCurbApproach):null,departTime:null!=e.attributes.DepartureTime?new Date(e.attributes.DepartureTime):null,departTimeOffset:e.attributes.DepartureUTCOffset??null,geometry:e.geometry,lateDuration:e.attributes.LateMinutes??null,locationType:null!=e.attributes.LocationType?ie.fromJSON(e.attributes.LocationType):null,name:e.attributes.Name,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,routeName:e.attributes.RouteName,sequence:e.attributes.Sequence??null,serviceCosts:null!=e.attributes.ServiceCosts?Ce(JSON.parse(e.attributes.ServiceCosts)):null,serviceDistance:e.attributes.ServiceMeters??null,serviceDuration:e.attributes.ServiceMinutes??null,status:null!=e.attributes.Status?re.fromJSON(e.attributes.Status):null,symbol:e.symbol,timeWindowEnd:null!=e.attributes.TimeWindowEnd?new Date(e.attributes.TimeWindowEnd):null,timeWindowEndOffset:e.attributes.TimeWindowEndUTCOffset??null,timeWindowStart:null!=e.attributes.TimeWindowStart?new Date(e.attributes.TimeWindowStart):null,timeWindowStartOffset:e.attributes.TimeWindowStartUTCOffset??null,waitDuration:e.attributes.WaitMinutes??null})}toGraphic(){const e={ObjectID:this.objectId,ArrivalCurbApproach:null!=this.arriveCurbApproach?te.toJSON(this.arriveCurbApproach):null,ArrivalTime:null!=this.arriveTime?this.arriveTime.getTime():null,ArrivalUTCOffset:this.arriveTimeOffset,CumulativeCosts:null!=this.cumulativeCosts?JSON.stringify(je(this.cumulativeCosts)):null,CumulativeMeters:this.cumulativeDistance,CumulativeMinutes:this.cumulativeDuration,CurbApproach:null!=this.curbApproach?te.toJSON(this.curbApproach):null,DepartureCurbApproach:null!=this.departCurbApproach?te.toJSON(this.departCurbApproach):null,DepartureTime:null!=this.departTime?this.departTime.getTime():null,DepartureUTCOffset:this.departTimeOffset,LateMinutes:this.lateDuration,LocationType:null!=this.locationType?ie.toJSON(this.locationType):null,Name:this.name,RouteName:this.routeName,Sequence:this.sequence,ServiceCosts:null!=this.serviceCosts?JSON.stringify(je(this.serviceCosts)):null,ServiceMeters:this.serviceDistance,ServiceMinutes:this.serviceDuration,Status:null!=this.status?re.toJSON(this.status):null,TimeWindowEnd:null!=this.timeWindowEnd?this.timeWindowEnd.getTime():null,TimeWindowEndUTCOffset:this.timeWindowEndOffset??this.arriveTimeOffset,TimeWindowStart:null!=this.timeWindowStart?this.timeWindowStart.getTime():null,TimeWindowStartUTCOffset:this.timeWindowStartOffset??this.arriveTimeOffset,WaitMinutes:this.waitDuration};return new n.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};Gt.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}],Gt.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:[]},(0,r._)([(0,v.MZ)({type:te.apiValues,json:{read:{source:"attributes.ArrivalCurbApproach",reader:te.read}}})],Gt.prototype,"arriveCurbApproach",void 0),(0,r._)([(0,v.MZ)({type:Date,json:{read:{source:"attributes.ArriveTimeUTC"}}})],Gt.prototype,"arriveTime",void 0),(0,r._)([(0,v.MZ)()],Gt.prototype,"arriveTimeOffset",void 0),(0,r._)([(0,g.w)("arriveTimeOffset",["attributes.ArriveTime","attributes.ArriveTimeUTC"])],Gt.prototype,"readArriveTimeOffset",null),(0,r._)([(0,v.MZ)({json:{name:"attributes.Bearing",read:!1,write:!0}})],Gt.prototype,"bearing",void 0),(0,r._)([(0,v.MZ)({json:{name:"attributes.BearingTol",read:!1,write:!0}})],Gt.prototype,"bearingTol",void 0),(0,r._)([(0,v.MZ)()],Gt.prototype,"cumulativeCosts",void 0),(0,r._)([(0,g.w)("cumulativeCosts",["attributes"])],Gt.prototype,"readCumulativeCosts",null),(0,r._)([(0,v.MZ)()],Gt.prototype,"cumulativeDistance",void 0),(0,r._)([(0,v.MZ)()],Gt.prototype,"cumulativeDuration",void 0),(0,r._)([(0,v.MZ)({type:te.apiValues,json:{name:"attributes.CurbApproach",read:{reader:te.read},write:{writer:te.write}}})],Gt.prototype,"curbApproach",void 0),(0,r._)([(0,v.MZ)({type:te.apiValues,json:{read:{source:"attributes.DepartCurbApproach",reader:te.read}}})],Gt.prototype,"departCurbApproach",void 0),(0,r._)([(0,v.MZ)({type:Date,json:{read:{source:"attributes.DepartTimeUTC"}}})],Gt.prototype,"departTime",void 0),(0,r._)([(0,v.MZ)()],Gt.prototype,"departTimeOffset",void 0),(0,r._)([(0,g.w)("departTimeOffset",["attributes.DepartTime","attributes.DepartTimeUTC"])],Gt.prototype,"readDepartTimeOffset",null),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.DistanceToNetworkInMeters"}}})],Gt.prototype,"distanceToNetworkInMeters",void 0),(0,r._)([(0,v.MZ)({type:qe.A,json:{write:!0}})],Gt.prototype,"geometry",void 0),(0,r._)([(0,v.MZ)()],Gt.prototype,"lateDuration",void 0),(0,r._)([(0,v.MZ)({type:ie.apiValues,json:{name:"attributes.LocationType",read:{reader:ie.read},write:{writer:ie.write}}})],Gt.prototype,"locationType",void 0),(0,r._)([(0,v.MZ)({json:{name:"attributes.Name"}})],Gt.prototype,"name",void 0),(0,r._)([(0,v.MZ)({json:{name:"attributes.NavLatency",read:!1,write:!0}})],Gt.prototype,"navLatency",void 0),(0,r._)([(0,v.MZ)({json:{name:"attributes.ObjectID"}})],Gt.prototype,"objectId",void 0),(0,r._)([(0,v.MZ)({type:a.A})],Gt.prototype,"popupTemplate",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.PosAlong"}}})],Gt.prototype,"posAlong",void 0),(0,r._)([(0,v.MZ)({json:{name:"attributes.RouteName"}})],Gt.prototype,"routeName",void 0),(0,r._)([(0,v.MZ)()],Gt.prototype,"serviceCosts",void 0),(0,r._)([(0,g.w)("serviceCosts",["attributes"])],Gt.prototype,"readServiceCosts",null),(0,r._)([(0,w.K)("serviceCosts")],Gt.prototype,"writeServiceCosts",null),(0,r._)([(0,v.MZ)()],Gt.prototype,"serviceDistance",void 0),(0,r._)([(0,v.MZ)()],Gt.prototype,"serviceDuration",void 0),(0,r._)([(0,v.MZ)({json:{name:"attributes.Sequence"}})],Gt.prototype,"sequence",void 0),(0,r._)([(0,v.MZ)({type:oe.apiValues,json:{read:{source:"attributes.SideOfEdge",reader:oe.read}}})],Gt.prototype,"sideOfEdge",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.SnapX"}}})],Gt.prototype,"snapX",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.SnapY"}}})],Gt.prototype,"snapY",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.SnapZ"}}})],Gt.prototype,"snapZ",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.SourceID"}}})],Gt.prototype,"sourceId",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.SourceOID"}}})],Gt.prototype,"sourceOid",void 0),(0,r._)([(0,v.MZ)({type:re.apiValues,json:{read:{source:"attributes.Status",reader:re.read}}})],Gt.prototype,"status",void 0),(0,r._)([(0,v.MZ)({types:Z.Es})],Gt.prototype,"symbol",void 0),(0,r._)([(0,v.MZ)({type:Date,json:{name:"attributes.TimeWindowEnd"}})],Gt.prototype,"timeWindowEnd",void 0),(0,r._)([(0,w.K)("timeWindowEnd")],Gt.prototype,"writeTimeWindowEnd",null),(0,r._)([(0,v.MZ)()],Gt.prototype,"timeWindowEndOffset",void 0),(0,r._)([(0,v.MZ)({type:Date,json:{name:"attributes.TimeWindowStart"}})],Gt.prototype,"timeWindowStart",void 0),(0,r._)([(0,w.K)("timeWindowStart")],Gt.prototype,"writeTimeWindowStart",null),(0,r._)([(0,v.MZ)()],Gt.prototype,"timeWindowStartOffset",void 0),(0,r._)([(0,v.MZ)({readOnly:!0,json:{read:!1}})],Gt.prototype,"type",void 0),(0,r._)([(0,v.MZ)()],Gt.prototype,"violations",void 0),(0,r._)([(0,g.w)("violations",["attributes"])],Gt.prototype,"readViolations",null),(0,r._)([(0,v.MZ)()],Gt.prototype,"waitDuration",void 0),(0,r._)([(0,v.MZ)()],Gt.prototype,"wait",void 0),(0,r._)([(0,g.w)("wait",["attributes"])],Gt.prototype,"readWait",null),Gt=Wt=(0,r._)([(0,T.$)("esri.rest.support.Stop")],Gt);const $t=Gt;var qt=i(48526);function zt(e){return e.length?e:null}function Kt(e){switch(e){case"esriGeometryPoint":return{type:"esriSMS",style:"esriSMSCircle",size:12,color:[0,0,0,0],outline:Kt("esriGeometryPolyline")};case"esriGeometryPolyline":return{type:"esriSLS",style:"esriSLSSolid",width:1,color:[0,0,0,0]};case"esriGeometryPolygon":return{type:"esriSFS",style:"esriSFSNull",outline:Kt("esriGeometryPolyline")}}}function Yt(e){return"layers"in e}async function Ht(e){const t=Qe.A.WGS84;return await(0,_.initializeProjection)(e.spatialReference,t),(0,_.project)(e,t)}function Xt(e,t){switch(t){case"seconds":return e/60;case"hours":return 60*e;case"days":return 60*e*24;default:return e}}function Qt(e,t){return"decimal-degrees"===t||"points"===t||"unknown"===t?e:(0,h.oU)(e,t,"meters")}const ei=p.A.ofType(dt),ti=p.A.ofType(yt),ii=p.A.ofType(bt),ri=p.A.ofType(wt),oi=p.A.ofType(_t),si=p.A.ofType($t),ni="esri.layers.RouteLayer",ai=()=>u.A.getLogger(ni);let li=class extends((0,O.d)((0,D.j)((0,I.q)((0,x.A)((0,c.P)(N.A)))))){constructor(e){super(e),this._cachedServiceDescription=null,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 ii,this.polygonBarriers=new ri,this.polylineBarriers=new oi,this.routeInfo=null,this.spatialReference=Qe.A.WGS84,this.stops=new si,this.type="route";const t=()=>{this._setStopSymbol(this.stops)};this.addHandles((0,f.on)((()=>this.stops),"change",t,{sync:!0,onListenerAdd:t}))}writeFeatureCollectionWebmap(e,t,i,r){const o=[this._writePolygonBarriers(),this._writePolylineBarriers(),this._writePointBarriers(),this._writeRouteInfo(),this._writeDirectionLines(),this._writeDirectionPoints(),this._writeStops()].filter((e=>!!e)),s=o.map(((e,t)=>t)),n="web-map"===r.origin?"featureCollection.layers":"layers";(0,m.sM)(n,o,t),t.opacity=this.opacity,t.visibility=this.visible,t.visibleLayers=s}readDirectionLines(e,t){return this._getNetworkFeatures(t,"DirectionLines",(e=>dt.fromGraphic(e)))}readDirectionPoints(e,t){return this._getNetworkFeatures(t,"DirectionPoints",(e=>yt.fromGraphic(e)))}get fullExtent(){const e=new A.A({xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:Qe.A.WGS84});if(null!=this.routeInfo?.geometry)return this.routeInfo.geometry.extent??e;if(null==this.stops)return e;const t=this.stops.filter((e=>null!=e.geometry));if(t.length<2)return e;const{spatialReference:i}=t.at(0).geometry;if(null==i)return e;const r=t.toArray().map((e=>{const t=e.geometry;return[t.x,t.y]}));return new qt.A({points:r,spatialReference:i}).extent}readMaxScale(e,t){const i=Yt(t)?t.layers:t.featureCollection?.layers,r=i?.find((e=>null!=e.layerDefinition.maxScale));return r?.layerDefinition.maxScale??0}readMinScale(e,t){const i=Yt(t)?t.layers:t.featureCollection?.layers,r=i?.find((e=>null!=e.layerDefinition.minScale));return r?.layerDefinition.minScale??0}readPointBarriers(e,t){return this._getNetworkFeatures(t,"Barriers",(e=>bt.fromGraphic(e)))}readPolygonBarriers(e,t){return this._getNetworkFeatures(t,"PolygonBarriers",(e=>wt.fromGraphic(e)))}readPolylineBarriers(e,t){return this._getNetworkFeatures(t,"PolylineBarriers",(e=>_t.fromGraphic(e)))}readRouteInfo(e,t){const i=this._getNetworkFeatures(t,"RouteInfo",(e=>xt.fromGraphic(e)));return i.length>0?i.at(0):null}readSpatialReference(e,t){const i=Yt(t)?t.layers:t.featureCollection?.layers;if(!i?.length)return Qe.A.WGS84;const{layerDefinition:r,featureSet:o}=i[0],s=o.features[0],n=s?.geometry?.spatialReference??o.spatialReference??r.spatialReference??r.extent.spatialReference??M.KK;return Qe.A.fromJSON(n)}readStops(e,t){return this._getNetworkFeatures(t,"Stops",(e=>$t.fromGraphic(e)),(e=>this._setStopSymbol(e)))}get title(){return null!=this.routeInfo?.name?this.routeInfo.name:"Route"}set title(e){this._overrideIfSome("title",e)}get url(){return o.A.routeServiceUrl}set url(e){null!=e?this._set("url",(0,F.Jf)(e,ai())):this._set("url",o.A.routeServiceUrl)}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Feature Collection"]},e)),Promise.resolve(this)}removeAll(){this.removeResult(),this.pointBarriers.removeAll(),this.polygonBarriers.removeAll(),this.polylineBarriers.removeAll(),this.stops.removeAll()}removeResult(){null!=this.directionLines&&(this.directionLines.removeAll(),this._set("directionLines",null)),null!=this.directionPoints&&(this.directionPoints.removeAll(),this._set("directionPoints",null)),null!=this.routeInfo&&this._set("routeInfo",null)}async save(){await this.load();const{fullExtent:e,portalItem:t}=this;if(!t)throw new d.A("routelayer:portal-item-not-set","save() requires to the layer to have a portal item");if(!t.id)throw new d.A("routelayer:portal-item-not-saved","Please use saveAs() first to save the routelayer");if("Feature Collection"!==t.type)throw new d.A("routelayer:portal-item-wrong-type",'Portal item needs to have type "Feature Collection"');if(null==this.routeInfo)throw new d.A("routelayer:route-unsolved","save() requires a solved route");const{portal:i}=t;await i.signIn(),i.user||await t.reload();const{itemUrl:r,itemControl:o}=t;if("admin"!==o&&"update"!==o)throw new d.A("routelayer:insufficient-permissions","To save this layer, you need to be the owner or an administrator of your organization");const s={messages:[],origin:"portal-item",portal:i,url:r?(0,b.An)(r):void 0,writtenProperties:[]},n=this.write(void 0,s);return t.extent=await Ht(e),t.title=this.title,await t.update({data:n}),t}async saveAs(e,t={}){if(await this.load(),null==this.routeInfo)throw new d.A("routelayer:route-unsolved","saveAs() requires a solved route");const i=J.default.from(e).clone();i.extent??=await Ht(this.fullExtent),i.id=null,i.portal??=k.A.getDefault(),i.title??=this.title,i.type="Feature Collection",i.typeKeywords=["Data","Feature Collection",V.mm.MULTI_LAYER,"Route Layer"];const{portal:r}=i,o={messages:[],origin:"portal-item",portal:r,url:null,writtenProperties:[]};await r.signIn();const s=t?.folder,n=this.write(void 0,o);return await(r.user?.addItem({item:i,folder:s,data:n})),this.portalItem=i,(0,S.v)(o),o.portalItem=i,i}async solve(e,t){const i=e?.stops??this.stops,r=e?.pointBarriers??zt(this.pointBarriers),o=e?.polylineBarriers??zt(this.polylineBarriers),s=e?.polygonBarriers??zt(this.polygonBarriers);if(null==i)throw new d.A("routelayer:undefined-stops","the route layer must have stops defined in the route parameters.");if((function(e){return"esri.rest.support.FeatureSet"===e.declaredClass}(i)||function(e){return"esri.rest.support.NetworkFeatureSet"===e.declaredClass}(i))&&i.features.length<2||p.A.isCollection(i)&&i.length<2)throw new d.A("routelayer:insufficent-stops","the route layer must have two or more stops to solve a route.");if(p.A.isCollection(i))for(const e of i)e.routeName=null;const n=e?.apiKey,a=this.url,l=await this._getServiceDescription(a,n,t),u=e?.travelMode??l.defaultTravelMode,c=e?.accumulateAttributes??[];null!=u&&(c.push(u.distanceAttributeName),u.timeAttributeName&&c.push(u.timeAttributeName));const m={accumulateAttributes:c,directionsOutputType:"featuresets",ignoreInvalidLocations:!0,pointBarriers:r,polylineBarriers:o,polygonBarriers:s,preserveFirstStop:!0,preserveLastStop:!0,returnBarriers:!!r,returnDirections:!0,returnPolygonBarriers:!!s,returnPolylineBarriers:!!o,returnRoutes:!0,returnStops:!0,stops:i},f=Jt.from(e??{});let h;f.set(m);try{h=await lt(a,f,t)}catch(e){throw(0,y.zf)(e)?e:new d.A("routelayer:failed-route-request","the routing request failed",{error:e})}const b=this._toRouteLayerSolution(h);return this._isOverridden("title")||(this.title=b.routeInfo.name??"Route"),function(e,t,i){const r=t.networkDataset?.networkAttributes,o=r?.filter((({usageType:e})=>"cost"===e))??[],s=i.travelMode??t.defaultTravelMode;if(null==s)return void ai().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:n,distanceAttributeName:a}=s,l=o.find((({name:e})=>e===n)),u=o.find((({name:e})=>e===a)),p=i.travelMode?.impedanceAttributeName??i.impedanceAttribute??t.impedance,c=l?.units,m=u?.units;if(!c||!m)throw new d.A("routelayer:unknown-impedance-units","the units of either the distance or time impedance are unknown");const y=i.directionsLanguage??t.directionsLanguage,f=i.accumulateAttributes??t.accumulateAttributeNames??[],h=new Set(o.filter((({name:e})=>e===n||e===a||e===p||null!=e&&f.includes(e))).map((({name:e})=>e))),b=e=>{for(const t in e)h.has(t)||delete e[t]};for(const t of e.pointBarriers)null!=t.costs&&(t.addedCost=t.costs[p]??0,b(t.costs));for(const t of e.polygonBarriers)null!=t.costs&&(t.scaleFactor=t.costs[p]??1,b(t.costs));for(const t of e.polylineBarriers)null!=t.costs&&(t.scaleFactor=t.costs[p]??1,b(t.costs));const{routeInfo:v}=e,{findBestSequence:g,preserveFirstStop:T,preserveLastStop:w,startTimeIsUTC:S,timeWindowsAreUTC:A}=i;v.analysisSettings=new Nt({accumulateAttributes:f,directionsLanguage:y,findBestSequence:g,preserveFirstStop:T,preserveLastStop:w,startTimeIsUTC:S,timeWindowsAreUTC:A,travelMode:s}),v.totalDuration=Xt(v.totalCosts?.[n]??0,c),v.totalDistance=Qt(v.totalCosts?.[a]??0,m),v.totalLateDuration=Xt(v.totalViolations?.[n]??0,c),v.totalWaitDuration=Xt(v.totalWait?.[n]??0,c),null!=v.totalCosts&&b(v.totalCosts),null!=v.totalViolations&&b(v.totalViolations),null!=v.totalWait&&b(v.totalWait);for(const t of e.stops)null!=t.serviceCosts&&(t.serviceDuration=Xt(t.serviceCosts[n]??0,c),t.serviceDistance=Qt(t.serviceCosts[a]??0,m),b(t.serviceCosts)),null!=t.cumulativeCosts&&(t.cumulativeDuration=Xt(t.cumulativeCosts[n]??0,c),t.cumulativeDistance=Qt(t.cumulativeCosts[a]??0,m),b(t.cumulativeCosts)),null!=t.violations&&(t.lateDuration=Xt(t.violations[n]??0,c),b(t.violations)),null!=t.wait&&(t.waitDuration=Xt(t.wait[n]??0,c),b(t.wait))}(b,l,f),b}update(e){const{stops:t,directionLines:i,directionPoints:r,pointBarriers:o,polylineBarriers:s,polygonBarriers:n,routeInfo:a}=e;this.set({stops:t,pointBarriers:o,polylineBarriers:s,polygonBarriers:n}),this._set("directionLines",i),this._set("directionPoints",r),this._set("routeInfo",a),null!=a.geometry&&(this.spatialReference=a.geometry.spatialReference)}_getNetworkFeatures(e,t,i,r){const o=Yt(e)?e.layers:e.featureCollection?.layers,s=o?.find((e=>e.layerDefinition.name===t));if(null==s)return new p.A;const{layerDefinition:u,popupInfo:d,featureSet:c}=s,m=u.drawingInfo.renderer,{features:y}=c,f=c.spatialReference??u.spatialReference??u.extent.spatialReference??M.KK,h=m&&(0,l.L)(m),b=Qe.A.fromJSON(f),v=y.map((e=>{const r=n.A.fromJSON(e);null!=r.geometry&&null!=e.geometry&&null==e.geometry.spatialReference&&(r.geometry.spatialReference=b);const o=i(r);return o.symbol??=h?.getSymbol(r)??this._getNetworkSymbol(t),o.popupTemplate??=d&&a.A.fromJSON(d),o}));return r&&v.some((e=>!e.symbol))&&r(v),new p.A(v)}_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}}async _getServiceDescription(e,t,i){if(null!=this._cachedServiceDescription&&this._cachedServiceDescription.url===e)return this._cachedServiceDescription.serviceDescription;const r=await Ie(e,t,i);return this._cachedServiceDescription={serviceDescription:r,url:e},r}_setStopSymbol(e){if(!e||0===e.length)return;if(null==this.defaultSymbols.stops)return;if(e.every((({symbol:e})=>null!=e)))return;const{first:t,last:i,middle:r,unlocated:o,waypoint:s,break:n}=this.defaultSymbols.stops;if(null==this.routeInfo||1===e.length)return void e.forEach(((o,s)=>{switch(s){case 0:o.symbol=t;break;case e.length-1:o.symbol=i;break;default:o.symbol=r}}));const a=e.map((({sequence:e})=>e)).filter((e=>null!=e)),l=Math.min(...a),u=Math.max(...a);for(const a of e)a.sequence!==l?a.sequence!==u?"ok"===a.status||"not-located-on-closest"===a.status?"waypoint"!==a.locationType?"break"!==a.locationType?a.symbol=r:a.symbol=n:a.symbol=s:a.symbol=o:a.symbol=i:a.symbol=t}_toRouteLayerSolution(e){const t=e.routeResults[0].stops?.map((e=>$t.fromJSON(e.toJSON())));this._setStopSymbol(t);const i=new si(t),r=new ri(e.polygonBarriers?.map((e=>{const t=wt.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.polygonBarriers,t}))),o=new oi(e.polylineBarriers?.map((e=>{const t=_t.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.polylineBarriers,t}))),s=new ii(e.pointBarriers?.map((e=>{const t=bt.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.pointBarriers,t}))),n=e.routeResults[0].route?.toJSON(),a=xt.fromJSON(n);a.symbol=this.defaultSymbols.routeInfo;const l=new ti(e.routeResults[0].directionPoints?.features.map((e=>{const t=yt.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.directionPoints,t})));return{directionLines:new ei(e.routeResults[0].directionLines?.features.map((e=>{const t=dt.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.directionLines,t}))),directionPoints:l,pointBarriers:s,polygonBarriers:r,polylineBarriers:o,routeInfo:a,stops:i}}_writeDirectionLines(){return this._writeNetworkFeatures(this.directionLines,this.defaultSymbols.directionLines,"esriGeometryPolyline",dt.fields,dt.popupInfo,"DirectionLines","Direction Lines")}_writeDirectionPoints(){return this._writeNetworkFeatures(this.directionPoints,this.defaultSymbols.directionPoints,"esriGeometryPoint",yt.fields,yt.popupInfo,"DirectionPoints","Direction Points")}_writeNetworkFeatures(e,t,i,r,o,s,n){if(!e?.length)return null;const a=this.spatialReference.toJSON(),{fullExtent:l,maxScale:u,minScale:p}=this;return{featureSet:{features:e.toArray().map((e=>function(e){const{attributes:t,geometry:i,popupTemplate:r,symbol:o}=e.toGraphic().toJSON();return{attributes:t,geometry:i,popupInfo:r,symbol:o}}(e))),geometryType:i,spatialReference:a},layerDefinition:{capabilities:"Query,Update,Editing",drawingInfo:{renderer:{type:"simple",symbol:null!=t?t.toJSON():Kt(i)}},extent:l.toJSON(),fields:r,geometryType:i,hasM:!1,hasZ:!1,maxScale:u,minScale:p,name:s,objectIdField:"ObjectID",spatialReference:a,title:n,type:"Feature Layer",typeIdField:""},popupInfo:o}}_writePointBarriers(){return this._writeNetworkFeatures(this.pointBarriers,this.defaultSymbols.pointBarriers,"esriGeometryPoint",bt.fields,bt.popupInfo,"Barriers","Point Barriers")}_writePolygonBarriers(){return this._writeNetworkFeatures(this.polygonBarriers,this.defaultSymbols.polygonBarriers,"esriGeometryPolygon",wt.fields,wt.popupInfo,"PolygonBarriers","Polygon Barriers")}_writePolylineBarriers(){return this._writeNetworkFeatures(this.polylineBarriers,this.defaultSymbols.polylineBarriers,"esriGeometryPolyline",_t.fields,_t.popupInfo,"PolylineBarriers","Line Barriers")}_writeRouteInfo(){return this._writeNetworkFeatures(null!=this.routeInfo?new p.A([this.routeInfo]):null,this.defaultSymbols.routeInfo,"esriGeometryPolyline",xt.fields,xt.popupInfo,"RouteInfo","Route Details")}_writeStops(){const e=this._writeNetworkFeatures(this.stops,null,"esriGeometryPoint",$t.fields,$t.popupInfo,"Stops","Stops");if(null==e)return null;const{stops:t}=this.defaultSymbols,i=t?.first?.toJSON(),r=t?.middle?.toJSON(),o=t?.last?.toJSON();return e.layerDefinition.drawingInfo.renderer={type:"uniqueValue",field1:"Sequence",defaultSymbol:r,uniqueValueInfos:[{value:"1",symbol:i,label:"First Stop"},{value:`${this.stops.length}`,symbol:o,label:"Last Stop"}]},e}};(0,r._)([(0,v.MZ)({readOnly:!0,json:{read:!1,origins:{"portal-item":{write:{allowNull:!0,ignoreOrigin:!0}},"web-map":{write:{overridePolicy(){return{allowNull:!0,ignoreOrigin:null==this.portalItem}}}}}}})],li.prototype,"_featureCollection",void 0),(0,r._)([(0,w.K)(["web-map","portal-item"],"_featureCollection")],li.prototype,"writeFeatureCollectionWebmap",null),(0,r._)([(0,v.MZ)({readOnly:!0,json:{read:!1,origins:{"web-map":{write:{target:"type",overridePolicy(){return{ignoreOrigin:null!=this.portalItem}}}}}}})],li.prototype,"_type",void 0),(0,r._)([(0,v.MZ)({nonNullable:!0,type:U})],li.prototype,"defaultSymbols",void 0),(0,r._)([(0,v.MZ)({readOnly:!0})],li.prototype,"directionLines",void 0),(0,r._)([(0,g.w)(["web-map","portal-item"],"directionLines",["layers","featureCollection.layers"])],li.prototype,"readDirectionLines",null),(0,r._)([(0,v.MZ)({readOnly:!0})],li.prototype,"directionPoints",void 0),(0,r._)([(0,g.w)(["web-map","portal-item"],"directionPoints",["layers","featureCollection.layers"])],li.prototype,"readDirectionPoints",null),(0,r._)([(0,v.MZ)({readOnly:!0,json:{read:!1,origins:{"web-map":{write:{ignoreOrigin:!0}}}}})],li.prototype,"featureCollectionType",void 0),(0,r._)([(0,v.MZ)({readOnly:!0})],li.prototype,"fullExtent",null),(0,r._)([(0,v.MZ)({json:{origins:{"web-map":{name:"featureCollection.showLegend"}},write:!0}})],li.prototype,"legendEnabled",void 0),(0,r._)([(0,v.MZ)({type:["show","hide"]})],li.prototype,"listMode",void 0),(0,r._)([(0,v.MZ)({type:Number,nonNullable:!0,json:{write:!1}})],li.prototype,"maxScale",void 0),(0,r._)([(0,g.w)(["web-map","portal-item"],"maxScale",["layers","featureCollection.layers"])],li.prototype,"readMaxScale",null),(0,r._)([(0,v.MZ)({type:Number,nonNullable:!0,json:{write:!1}})],li.prototype,"minScale",void 0),(0,r._)([(0,g.w)(["web-map","portal-item"],"minScale",["layers","featureCollection.layers"])],li.prototype,"readMinScale",null),(0,r._)([(0,v.MZ)({type:["ArcGISFeatureLayer"],value:"ArcGISFeatureLayer"})],li.prototype,"operationalLayerType",void 0),(0,r._)([(0,v.MZ)({nonNullable:!0,type:p.A.ofType(bt)})],li.prototype,"pointBarriers",void 0),(0,r._)([(0,g.w)(["web-map","portal-item"],"pointBarriers",["layers","featureCollection.layers"])],li.prototype,"readPointBarriers",null),(0,r._)([(0,v.MZ)({nonNullable:!0,type:p.A.ofType(wt)})],li.prototype,"polygonBarriers",void 0),(0,r._)([(0,g.w)(["web-map","portal-item"],"polygonBarriers",["layers","featureCollection.layers"])],li.prototype,"readPolygonBarriers",null),(0,r._)([(0,v.MZ)({nonNullable:!0,type:p.A.ofType(_t)})],li.prototype,"polylineBarriers",void 0),(0,r._)([(0,g.w)(["web-map","portal-item"],"polylineBarriers",["layers","featureCollection.layers"])],li.prototype,"readPolylineBarriers",null),(0,r._)([(0,v.MZ)({readOnly:!0})],li.prototype,"routeInfo",void 0),(0,r._)([(0,g.w)(["web-map","portal-item"],"routeInfo",["layers","featureCollection.layers"])],li.prototype,"readRouteInfo",null),(0,r._)([(0,v.MZ)({type:Qe.A})],li.prototype,"spatialReference",void 0),(0,r._)([(0,g.w)(["web-map","portal-item"],"spatialReference",["layers","featureCollection.layers"])],li.prototype,"readSpatialReference",null),(0,r._)([(0,v.MZ)({nonNullable:!0,type:p.A.ofType($t)})],li.prototype,"stops",void 0),(0,r._)([(0,g.w)(["web-map","portal-item"],"stops",["layers","featureCollection.layers"])],li.prototype,"readStops",null),(0,r._)([(0,v.MZ)()],li.prototype,"title",null),(0,r._)([(0,v.MZ)({readOnly:!0,json:{read:!1}})],li.prototype,"type",void 0),(0,r._)([(0,v.MZ)()],li.prototype,"url",null),li=(0,r._)([(0,T.$)(ni)],li);const ui=li},76369:(e,t,i)=>{i.d(t,{LF:()=>M,M9:()=>N});var r,o,s=i(49186),n=i(93637),a=i(40876),l=i(59247),u=(i(11053),i(27865)),p={exports:{}};o=function(){function e(t,i,r,o){var s=Error.call(this,t);return Object.setPrototypeOf&&Object.setPrototypeOf(s,e.prototype),s.expected=i,s.found=r,s.location=o,s.name="SyntaxError",s}function t(e,t,i){return i=i||" ",e.length>t?e:(t-=e.length,e+(i+=i.repeat(t)).slice(0,t))}return function(e,t){function i(){this.constructor=e}i.prototype=t.prototype,e.prototype=new i}(e,Error),e.prototype.format=function(e){var i="Error: "+this.message;if(this.location){var r,o=null;for(r=0;r<e.length;r++)if(e[r].source===this.location.source){o=e[r].text.split(/\r\n|\n|\r/g);break}var s=this.location.start,n=this.location.source&&"function"==typeof this.location.source.offset?this.location.source.offset(s):s,a=this.location.source+":"+n.line+":"+n.column;if(o){var l=this.location.end,u=t("",n.line.toString().length," "),p=o[s.line-1],d=(s.line===l.line?l.column:p.length+1)-s.column||1;i+="\n --\x3e "+a+"\n"+u+" |\n"+n.line+" | "+p+"\n"+u+" | "+t("",s.column-1," ")+t("",d,"^")}else i+="\n at "+a}return i},e.buildMessage=function(e,t){var i={literal:function(e){return'"'+o(e.text)+'"'},class:function(e){var t=e.parts.map((function(e){return Array.isArray(e)?s(e[0])+"-"+s(e[1]):s(e)}));return"["+(e.inverted?"^":"")+t.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(e){return e.description}};function r(e){return e.charCodeAt(0).toString(16).toUpperCase()}function o(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+r(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+r(e)}))}function s(e){return e.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+r(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+r(e)}))}function n(e){return i[e.type](e)}return"Expected "+function(e){var t,i,r=e.map(n);if(r.sort(),r.length>0){for(t=1,i=1;t<r.length;t++)r[t-1]!==r[t]&&(r[i]=r[t],i++);r.length=i}switch(r.length){case 1:return r[0];case 2:return r[0]+" or "+r[1];default:return r.slice(0,-1).join(", ")+", or "+r[r.length-1]}}(e)+" but "+function(e){return e?'"'+o(e)+'"':"end of input"}(t)+" found."},{SyntaxError:e,parse:function(t,i){var r,o={},s=(i=void 0!==i?i:{}).grammarSource,n={start:Ge},a=Ge,l="none",u=")",p=",",d="(",c="%",m="px",y="cm",f="mm",h="in",b="pt",v="pc",g="deg",T="rad",w="grad",S="turn",A="#",_=".",M="e",N=/^[ \t\n\r]/,O=/^[a-z\-]/,I=/^[0-9a-fA-F]/,x=/^[+\-]/,D=/^[0-9]/,F=ke("none"),Z=Le("none",!1),C=Le(")",!1),j=Le(",",!1),E=ke("whitespace"),B=Ue([" ","\t","\n","\r"],!1,!1),P=ke("function"),R=Le("(",!1),L=ke("identifier"),U=Ue([["a","z"],"-"],!1,!1),k=ke("percentage"),J=Le("%",!1),V=ke("length"),W=Le("px",!1),G=Le("cm",!1),$=Le("mm",!1),q=Le("in",!1),z=Le("pt",!1),K=Le("pc",!1),Y=ke("angle"),H=Le("deg",!1),X=Le("rad",!1),Q=Le("grad",!1),ee=Le("turn",!1),te=ke("number"),ie=ke("color"),re=Le("#",!1),oe=Ue([["0","9"],["a","f"],["A","F"]],!1,!1),se=Ue(["+","-"],!1,!1),ne=Ue([["0","9"]],!1,!1),ae=Le(".",!1),le=Le("e",!1),ue=function(){return[]},pe=function(e,t){return{type:"function",name:e,parameters:t||[]}},de=function(e,t){return t.length>0?function(e,t,i){return[e].concat(function(e,t){return e.map((function(e){return e[3]}))}(t))}(e,t):[e]},ce=function(e){return{type:"quantity",value:e.value,unit:e.unit}},me=function(e){return{type:"color",colorType:e.type,value:e.value}},ye=function(e){return e},fe=function(){return Re()},he=function(e){return{value:e,unit:"%"}},be=function(e){return{value:e,unit:"px"}},ve=function(e){return{value:e,unit:"cm"}},ge=function(e){return{value:e,unit:"mm"}},Te=function(e){return{value:e,unit:"in"}},we=function(e){return{value:e,unit:"pt"}},Se=function(e){return{value:e,unit:"pc"}},Ae=function(e){return{value:e,unit:"deg"}},_e=function(e){return{value:e,unit:"rad"}},Me=function(e){return{value:e,unit:"grad"}},Ne=function(e){return{value:e,unit:"turn"}},Oe=function(e){return{value:e,unit:null}},Ie=function(){return{type:"hex",value:Re()}},xe=function(e){return{type:"function",value:e}},De=function(){return{type:"named",value:Re()}},Fe=function(){return parseFloat(Re())},Ze=0,Ce=0,je=[{line:1,column:1}],Ee=0,Be=[],Pe=0;if("startRule"in i){if(!(i.startRule in n))throw new Error("Can't start parsing from rule \""+i.startRule+'".');a=n[i.startRule]}function Re(){return t.substring(Ce,Ze)}function Le(e,t){return{type:"literal",text:e,ignoreCase:t}}function Ue(e,t,i){return{type:"class",parts:e,inverted:t,ignoreCase:i}}function ke(e){return{type:"other",description:e}}function Je(e){var i,r=je[e];if(r)return r;for(i=e-1;!je[i];)i--;for(r={line:(r=je[i]).line,column:r.column};i<e;)10===t.charCodeAt(i)?(r.line++,r.column=1):r.column++,i++;return je[e]=r,r}function Ve(e,t,i){var r=Je(e),o=Je(t),n={source:s,start:{offset:e,line:r.line,column:r.column},end:{offset:t,line:o.line,column:o.column}};return i&&s&&"function"==typeof s.offset&&(n.start=s.offset(n.start),n.end=s.offset(n.end)),n}function We(e){Ze<Ee||(Ze>Ee&&(Ee=Ze,Be=[]),Be.push(e))}function Ge(){var e;return(e=$e())===o&&(e=function(){var e,t;if(e=[],(t=qe())!==o)for(;t!==o;)e.push(t),t=qe();else e=o;return e}()),e}function $e(){var e,i;return Pe++,e=Ze,Ke(),t.substr(Ze,4)===l?(i=l,Ze+=4):(i=o,0===Pe&&We(Z)),i!==o?(Ke(),Ce=e,e=ue()):(Ze=e,e=o),Pe--,e===o&&0===Pe&&We(F),e}function qe(){var e,i,r,s;return e=Ze,Ke(),(i=function(){var e,i,r;return Pe++,e=Ze,(i=Ye())!==o?(40===t.charCodeAt(Ze)?(r=d,Ze++):(r=o,0===Pe&&We(R)),r!==o?(Ce=e,e=ye(i)):(Ze=e,e=o)):(Ze=e,e=o),Pe--,e===o&&(i=o,0===Pe&&We(P)),e}())!==o?(Ke(),(r=function(){var e,i,r,s,n,a,l,u;if(e=Ze,(i=ze())!==o){for(r=[],s=Ze,n=Ke(),44===t.charCodeAt(Ze)?(a=p,Ze++):(a=o,0===Pe&&We(j)),a===o&&(a=null),l=Ke(),(u=ze())!==o?s=n=[n,a,l,u]:(Ze=s,s=o);s!==o;)r.push(s),s=Ze,n=Ke(),44===t.charCodeAt(Ze)?(a=p,Ze++):(a=o,0===Pe&&We(j)),a===o&&(a=null),l=Ke(),(u=ze())!==o?s=n=[n,a,l,u]:(Ze=s,s=o);Ce=e,e=de(i,r)}else Ze=e,e=o;return e}())===o&&(r=null),Ke(),41===t.charCodeAt(Ze)?(s=u,Ze++):(s=o,0===Pe&&We(C)),s!==o?(Ke(),Ce=e,e=pe(i,r)):(Ze=e,e=o)):(Ze=e,e=o),e}function ze(){var e,t;return e=Ze,(t=He())===o&&(t=Xe())===o&&(t=Qe())===o&&(t=function(){var e,t;return Pe++,e=Ze,Ke(),(t=tt())!==o?(Ce=e,e=Oe(t)):(Ze=e,e=o),Pe--,e===o&&0===Pe&&We(te),e}()),t!==o&&(Ce=e,t=ce(t)),(e=t)===o&&(e=Ze,(t=et())!==o&&(Ce=e,t=me(t)),e=t),e}function Ke(){var e,i;for(Pe++,e=[],N.test(t.charAt(Ze))?(i=t.charAt(Ze),Ze++):(i=o,0===Pe&&We(B));i!==o;)e.push(i),N.test(t.charAt(Ze))?(i=t.charAt(Ze),Ze++):(i=o,0===Pe&&We(B));return Pe--,i=o,0===Pe&&We(E),e}function Ye(){var e,i,r;if(Pe++,e=Ze,i=[],O.test(t.charAt(Ze))?(r=t.charAt(Ze),Ze++):(r=o,0===Pe&&We(U)),r!==o)for(;r!==o;)i.push(r),O.test(t.charAt(Ze))?(r=t.charAt(Ze),Ze++):(r=o,0===Pe&&We(U));else i=o;return i!==o&&(Ce=e,i=fe()),Pe--,(e=i)===o&&(i=o,0===Pe&&We(L)),e}function He(){var e,i,r;return Pe++,e=Ze,Ke(),(i=tt())!==o?(37===t.charCodeAt(Ze)?(r=c,Ze++):(r=o,0===Pe&&We(J)),r!==o?(Ce=e,e=he(i)):(Ze=e,e=o)):(Ze=e,e=o),Pe--,e===o&&0===Pe&&We(k),e}function Xe(){var e,i,r;return Pe++,e=Ze,Ke(),(i=tt())!==o?(t.substr(Ze,2)===m?(r=m,Ze+=2):(r=o,0===Pe&&We(W)),r!==o?(Ce=e,e=be(i)):(Ze=e,e=o)):(Ze=e,e=o),e===o&&(e=Ze,Ke(),(i=tt())!==o?(t.substr(Ze,2)===y?(r=y,Ze+=2):(r=o,0===Pe&&We(G)),r!==o?(Ce=e,e=ve(i)):(Ze=e,e=o)):(Ze=e,e=o),e===o&&(e=Ze,Ke(),(i=tt())!==o?(t.substr(Ze,2)===f?(r=f,Ze+=2):(r=o,0===Pe&&We($)),r!==o?(Ce=e,e=ge(i)):(Ze=e,e=o)):(Ze=e,e=o),e===o&&(e=Ze,Ke(),(i=tt())!==o?(t.substr(Ze,2)===h?(r=h,Ze+=2):(r=o,0===Pe&&We(q)),r!==o?(Ce=e,e=Te(i)):(Ze=e,e=o)):(Ze=e,e=o),e===o&&(e=Ze,Ke(),(i=tt())!==o?(t.substr(Ze,2)===b?(r=b,Ze+=2):(r=o,0===Pe&&We(z)),r!==o?(Ce=e,e=we(i)):(Ze=e,e=o)):(Ze=e,e=o),e===o&&(e=Ze,Ke(),(i=tt())!==o?(t.substr(Ze,2)===v?(r=v,Ze+=2):(r=o,0===Pe&&We(K)),r!==o?(Ce=e,e=Se(i)):(Ze=e,e=o)):(Ze=e,e=o)))))),Pe--,e===o&&0===Pe&&We(V),e}function Qe(){var e,i,r;return Pe++,e=Ze,(i=tt())!==o?(t.substr(Ze,3)===g?(r=g,Ze+=3):(r=o,0===Pe&&We(H)),r!==o?(Ce=e,e=Ae(i)):(Ze=e,e=o)):(Ze=e,e=o),e===o&&(e=Ze,(i=tt())!==o?(t.substr(Ze,3)===T?(r=T,Ze+=3):(r=o,0===Pe&&We(X)),r!==o?(Ce=e,e=_e(i)):(Ze=e,e=o)):(Ze=e,e=o),e===o&&(e=Ze,(i=tt())!==o?(t.substr(Ze,4)===w?(r=w,Ze+=4):(r=o,0===Pe&&We(Q)),r!==o?(Ce=e,e=Me(i)):(Ze=e,e=o)):(Ze=e,e=o),e===o&&(e=Ze,(i=tt())!==o?(t.substr(Ze,4)===S?(r=S,Ze+=4):(r=o,0===Pe&&We(ee)),r!==o?(Ce=e,e=Ne(i)):(Ze=e,e=o)):(Ze=e,e=o)))),Pe--,e===o&&(i=o,0===Pe&&We(Y)),e}function et(){var e,i,r,s;if(Pe++,e=Ze,35===t.charCodeAt(Ze)?(i=A,Ze++):(i=o,0===Pe&&We(re)),i!==o){if(r=[],I.test(t.charAt(Ze))?(s=t.charAt(Ze),Ze++):(s=o,0===Pe&&We(oe)),s!==o)for(;s!==o;)r.push(s),I.test(t.charAt(Ze))?(s=t.charAt(Ze),Ze++):(s=o,0===Pe&&We(oe));else r=o;r!==o?(Ce=e,e=Ie()):(Ze=e,e=o)}else Ze=e,e=o;return e===o&&(e=Ze,(i=qe())!==o&&(Ce=e,i=xe(i)),(e=i)===o&&(e=Ze,(i=Ye())!==o&&(Ce=e,i=De()),e=i)),Pe--,e===o&&(i=o,0===Pe&&We(ie)),e}function tt(){var e,i,r,s,n,a,l;for(e=Ze,x.test(t.charAt(Ze))?(t.charAt(Ze),Ze++):0===Pe&&We(se),i=Ze,r=[],D.test(t.charAt(Ze))?(s=t.charAt(Ze),Ze++):(s=o,0===Pe&&We(ne));s!==o;)r.push(s),D.test(t.charAt(Ze))?(s=t.charAt(Ze),Ze++):(s=o,0===Pe&&We(ne));if(46===t.charCodeAt(Ze)?(s=_,Ze++):(s=o,0===Pe&&We(ae)),s!==o){if(n=[],D.test(t.charAt(Ze))?(a=t.charAt(Ze),Ze++):(a=o,0===Pe&&We(ne)),a!==o)for(;a!==o;)n.push(a),D.test(t.charAt(Ze))?(a=t.charAt(Ze),Ze++):(a=o,0===Pe&&We(ne));else n=o;n!==o?i=r=[r,s,n]:(Ze=i,i=o)}else Ze=i,i=o;if(i===o)if(i=[],D.test(t.charAt(Ze))?(r=t.charAt(Ze),Ze++):(r=o,0===Pe&&We(ne)),r!==o)for(;r!==o;)i.push(r),D.test(t.charAt(Ze))?(r=t.charAt(Ze),Ze++):(r=o,0===Pe&&We(ne));else i=o;if(i!==o){if(r=Ze,101===t.charCodeAt(Ze)?(s=M,Ze++):(s=o,0===Pe&&We(le)),s!==o){if(x.test(t.charAt(Ze))?(n=t.charAt(Ze),Ze++):(n=o,0===Pe&&We(se)),n===o&&(n=null),a=[],D.test(t.charAt(Ze))?(l=t.charAt(Ze),Ze++):(l=o,0===Pe&&We(ne)),l!==o)for(;l!==o;)a.push(l),D.test(t.charAt(Ze))?(l=t.charAt(Ze),Ze++):(l=o,0===Pe&&We(ne));else a=o;a!==o?r=s=[s,n,a]:(Ze=r,r=o)}else Ze=r,r=o;r===o&&(r=null),Ce=e,e=Fe()}else Ze=e,e=o;return e}if((r=a())!==o&&Ze===t.length)return r;throw r!==o&&Ze<t.length&&We({type:"end"}),function(t,i,r){return new e(e.buildMessage(t,i),t,i,r)}(Be,Ee<t.length?t.charAt(Ee):null,Ee<t.length?Ve(Ee,Ee+1):Ve(Ee,Ee))}}},(r=p).exports&&(r.exports=o());var d=p.exports;function c(e){if(!e||0===e.length)return null;if("string"==typeof e){const t=m(e);return t&&0!==t.length?t:null}const t=e.map((e=>{if(!Number.isFinite(e.scale)||e.scale<=0)throw new s.A("effect:invalid-scale","scale must be finite and greater than 0",{stop:e});return{scale:e.scale,effects:m(e.value)}}));t.sort(((e,t)=>t.effects.length-e.effects.length));for(let e=0;e<t.length-1;e++){if(!(0,u.mj)(t[e].effects,t[e+1].effects))throw new s.A("effect:interpolation-impossible","Cannot interpolate by scale between 2 lists of mixed effects",{a:t[e].effects,b:t[e+1].effects});(0,u.O9)(t[e].effects,t[e+1].effects)}return t.sort(((e,t)=>t.scale-e.scale)),t}function m(e){let t;if(!e)return[];try{t=d.parse(e)}catch(t){throw new s.A("effect:invalid-syntax","Invalid effect syntax",{value:e,error:t})}return t.map((e=>function(e){try{switch(e.name){case"grayscale":case"sepia":case"saturate":case"invert":case"brightness":case"contrast":return function(e){let t=1;return y(e.parameters,1),1===e.parameters.length&&(t=g(e.parameters[0])),new l.yG(e.name,t)}(e);case"opacity":return function(e){let t=1;return y(e.parameters,1),1===e.parameters.length&&(t=g(e.parameters[0])),new l.jm(t)}(e);case"hue-rotate":return function(e){let t=0;return y(e.parameters,1),1===e.parameters.length&&(t=function(e){return function(e){if("quantity"!==e.type||!(0===e.value&&null===e.unit||e.unit&&null!=b[e.unit]))throw new s.A("effect:type-error",`Expected <angle>, Actual: ${f(e)}`,{term:e})}(e),e.value*b[e.unit]||0}(e.parameters[0])),new l.Nd(t)}(e);case"blur":return function(e){let t=0;return y(e.parameters,1),1===e.parameters.length&&(t=T(e.parameters[0]),h(t,e.parameters[0])),new l.Fk(t)}(e);case"drop-shadow":return function(e){const t=[];let i=null;for(const r of e.parameters)if("color"===r.type){if(t.length&&Object.freeze(t),i)throw new s.A("effect:type-error","Accepts only one color",{});i=w(r)}else{const e=T(r);if(Object.isFrozen(t))throw new s.A("effect:type-error","<length> parameters not consecutive",{lengths:t});t.push(e),3===t.length&&h(e,r)}if(t.length<2||t.length>3)throw new s.A("effect:type-error",`Expected <length>{2,3}, Actual: <length>{${t.length}}`,{lengths:t});return new l.$b(t[0],t[1],t[2]||0,i||S("black"))}(e);case"bloom":return function(e){let t=1,i=0,r=0;return y(e.parameters,3),e.parameters[0]&&(t=g(e.parameters[0])),e.parameters[1]&&(i=T(e.parameters[1]),h(i,e.parameters[1])),e.parameters[2]&&(r=g(e.parameters[2])),new l.bv(t,i,r)}(e)}}catch(t){throw t.details.filter=e,t}throw new s.A("effect:unknown-effect",`Effect '${e.name}' is not supported`,{effect:e})}(e)))}function y(e,t){if(e.length>t)throw new s.A("effect:type-error",`Function supports up to ${t} parameters, Actual: ${e.length}`,{parameters:e})}function f(e){if("color"===e.type)return"<color>";if(e.unit){if(e.unit in v)return"<length>";if(e.unit in b)return"<angle>";if("%"===e.unit)return"<percentage>"}return"<double>"}function h(e,t){if(e<0)throw new s.A("effect:type-error",`Negative values are not allowed, Actual: ${e}`,{term:t})}const b={deg:1,grad:.9,rad:180/Math.PI,turn:360},v={px:1,cm:96/2.54,mm:96/2.54/10,in:96,pc:16,pt:96/72};function g(e){!function(e){if("quantity"!==e.type||null!==e.unit&&"%"!==e.unit)throw new s.A("effect:type-error",`Expected <double> or <percentage>, Actual: ${f(e)}`,{term:e})}(e);const t=e.value;return h(t,e),"%"===e.unit?.01*t:t}function T(e){return function(e){if("quantity"!==e.type||!(0===e.value&&null===e.unit||e.unit&&null!=v[e.unit]))throw new s.A("effect:type-error",`Expected <length>, Actual: ${f(e)}`,{term:e})}(e),e.value*v[e.unit]||0}function w(e){switch(e.colorType){case"hex":return(0,a.qh)(e.value);case"named":return S(e.value);case"function":return function(e){if(y(e.parameters,4),A.test(e.name))return[g(e.parameters[0]),g(e.parameters[1]),g(e.parameters[2]),e.parameters[3]?g(e.parameters[3]):1];if(_.test(e.name))return(0,a.z$)(function(e){return function(e){if("quantity"!==e.type||null!==e.unit)throw new s.A("effect:type-error",`Expected <double>, Actual: ${f(e)}`,{term:e})}(e),h(e.value,e),e.value}(e.parameters[0]),g(e.parameters[1]),g(e.parameters[2]),e.parameters[3]?g(e.parameters[3]):1);throw new s.A("effect:syntax-error",`Invalid color function '${e.name}'`,{colorFunction:e})}(e.value)}}function S(e){if(!(0,a.V6)(e))throw new s.A("effect:unknown-color",`color '${e}' isn't valid`,{namedColor:e});return(0,a.c4)(e)}const A=/^rgba?/i,_=/^hsla?/i;function M(e,t,i){try{return function(e){if(!e||0===e.length)return null;if(function(e){const t=e[0];return!!t&&"scale"in t}(e)){const t=[];for(const i of e)t.push({scale:i.scale,value:O(i.value)});return t}return O(e)}(e)}catch(e){i?.messages?.push(e)}return null}function N(e,t,i,r){try{const r=function(e){const t=c(e);return t?(0,u.dw)(t)?t.map((e=>e.toJSON())):t.map((({scale:e,effects:t})=>({scale:e,value:t.map((e=>e.toJSON()))}))):null}(e);(0,n.sM)(i,r,t)}catch(e){r.messages&&r.messages.push(e)}}function O(e){if(!e?.length)return"";const t=[];for(const i of e){let e=[];switch(i.type){case"grayscale":case"sepia":case"saturate":case"invert":case"brightness":case"contrast":case"opacity":e=[I(i,"amount")];break;case"blur":e=[I(i,"radius","pt")];break;case"hue-rotate":e=[I(i,"angle","deg")];break;case"drop-shadow":e=[I(i,"xoffset","pt"),I(i,"yoffset","pt"),I(i,"blurRadius","pt"),x(i,"color")];break;case"bloom":e=[I(i,"strength"),I(i,"radius","pt"),I(i,"threshold")]}const r=`${i.type}(${e.filter(Boolean).join(" ")})`;c(r),t.push(r)}return t.join(" ")}function I(e,t,i){if(null==e[t])throw new s.A("effect:missing-parameter",`Missing parameter '${t}' in ${e.type} effect`,{effect:e});return i?e[t]+i:""+e[t]}function x(e,t){if(null==e[t])throw new s.A("effect:missing-parameter",`Missing parameter '${t}' in ${e.type} effect`,{effect:e});const i=e[t];return`rgba(${i[0]||0}, ${i[1]||0}, ${i[2]||0}, ${i[3]/255||0})`}},63074:(e,t,i)=>{i.d(t,{d:()=>l});var r=i(90237),o=i(10107),s=(i(44208),i(53966),i(87811),i(40608)),n=i(76369);const a={read:{reader:n.LF},write:{allowNull:!0,writer:n.M9}},l=e=>{let t=class extends e{constructor(){super(...arguments),this.blendMode="normal",this.effect=null}};return(0,r._)([(0,o.MZ)({type:["average","color-burn","color-dodge","color","darken","destination-atop","destination-in","destination-out","destination-over","difference","exclusion","hard-light","hue","invert","lighten","lighter","luminosity","minus","multiply","normal","overlay","plus","reflect","saturation","screen","soft-light","source-atop","source-in","source-out","vivid-light","xor"],nonNullable:!0,json:{read:!1,write:!1,origins:{"web-map":{read:!0,write:!0},"portal-item":{read:!0,write:!0}}}})],t.prototype,"blendMode",void 0),(0,r._)([(0,o.MZ)({json:{read:!1,write:!1,origins:{"web-map":a,"portal-item":a}}})],t.prototype,"effect",void 0),t=(0,r._)([(0,s.$)("esri.layers.mixins.BlendLayer")],t),t}},8303:(e,t,i)=>{i.d(t,{A:()=>S});var r=i(90237),o=i(92602),s=i(70333),n=i(78888),a=i(60999),l=i(49186),u=i(53966),p=i(97768),d=i(74887),c=i(84952),m=i(10107),y=(i(44208),i(87811),i(36005)),f=i(40608),h=i(43937),b=i(83531),v=i(20655),g=i(80812),T=i(41318),w=i(10407);const S=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,p.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,i){if(t.itemId)return new g.default({id:t.itemId,portal:i?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:r}=await Promise.all([i.e(5356),i.e(8823)]).then(i.bind(i,41204));return(0,d.Te)(t),await r({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,d.zf)(e)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,d.QP)(e),!0))))}async setUserPrivileges(e,t){if(!o.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:i,fullEdit:r},content:{updateItem:o}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",i),this._set("userHasFullEditingPrivileges",r),this._set("userHasUpdateItemPrivileges",o)}catch(e){(0,d.QP)(e)}}async _fetchUserPrivileges(e,t){let i=this.portalItem;if(!e||!i||!i.loaded||i.sourceUrl)return this._fetchFallbackUserPrivileges(t);const r=e===i.id;if(r&&i.portal.user)return(0,w.It)(i);let o,n;if(r)o=i.portal.url;else try{o=await(0,b.wI)(this.url,t)}catch(e){(0,d.QP)(e)}if(!o||!(0,c.b8)(o,i.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;n=await(s.id?.getCredential(`${o}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,d.QP)(e)}const a=!0,l=!1,u=!1;if(!n)return{features:{edit:a,fullEdit:l},content:{updateItem:u}};try{if(r?await i.reload():(i=new g.default({id:e,portal:{url:o}}),await i.load(t)),i.portal.user)return(0,w.It)(i)}catch(e){(0,d.QP)(e)}return{features:{edit:a,fullEdit:l},content:{updateItem:u}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,d.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?s.id?.findCredential(this.url):null;if(!t)return!0;const i=A.credential===t?A.user:await this._fetchEditingUser(e);return A.credential=t,A.user=i,null==i?.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const i=s.id.findServerInfo(this.url??"");if(!i?.owningSystemUrl)return null;const r=`${i.owningSystemUrl}/sharing/rest`,o=v.A.getDefault();if(o&&o.loaded&&(0,c.S8)(o.restUrl)===(0,c.S8)(r))return o.user;const l=`${r}/community/self`,u=null!=e?e.signal:null,p=await(0,a.Ke)((0,n.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?T.A.fromJSON(p.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const i=t?.portal,r=this.portalItem?.id&&(this.portalItem.portal||v.A.getDefault());return i&&r&&!(0,c.ut)(r.restUrl,i.restUrl)?(t.messages&&t.messages.push(new l.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,r._)([(0,m.MZ)({type:g.default})],t.prototype,"portalItem",null),(0,r._)([(0,y.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,r._)([(0,h.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,r._)([(0,m.MZ)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,r._)([(0,m.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,r._)([(0,m.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,r._)([(0,m.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,r._)([(0,f.$)("esri.layers.mixins.PortalLayer")],t),t},A={credential:null,user:null}},25036:(e,t,i)=>{i.d(t,{j:()=>n});var r=i(90237),o=i(10107),s=(i(44208),i(53966),i(87811),i(40608));const n=e=>{let t=class extends e{constructor(){super(...arguments),this.minScale=0,this.maxScale=0}get effectiveScaleRange(){const e={minScale:this.minScale,maxScale:this.maxScale},t=this.parent;t&&"effectiveScaleRange"in t&&function(e,t){e.minScale=e.minScale>0?t.minScale>0?Math.min(e.minScale,t.minScale):e.minScale:t.minScale,e.maxScale=e.maxScale>0?t.maxScale>0?Math.max(e.maxScale,t.maxScale):e.maxScale:t.maxScale}(e,t.effectiveScaleRange);const i=this._get("effectiveScaleRange");return i&&i.minScale===e.minScale&&i.maxScale===e.maxScale?i:e}};return(0,r._)([(0,o.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"minScale",void 0),(0,r._)([(0,o.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"maxScale",void 0),(0,r._)([(0,o.MZ)({readOnly:!0})],t.prototype,"effectiveScaleRange",null),t=(0,r._)([(0,s.$)("esri.layers.mixins.ScaleRangeLayer")],t),t}},20437:(e,t,i)=>{i.d(t,{A:()=>h});var r,o=i(90237),s=i(66552),n=i(25482),a=i(10107),l=i(56507),u=(i(87811),i(44208),i(93223)),p=i(36005),d=i(40608),c=i(72088),m=i(98453);const y=new s.J({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let f=r=class extends n.oY{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let i=null;try{i=t?JSON.parse(t):null}catch(e){}return i?.value??null}readValueType(e,{description:t}){let i=null;try{i=t?JSON.parse(t):null}catch(e){}return i?y.fromJSON(i.fieldValueType):null}clone(){return new r({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain?.clone()??null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,o._)([(0,a.MZ)({type:String,json:{write:!0}})],f.prototype,"alias",void 0),(0,o._)([(0,a.MZ)({type:[String,Number],json:{write:{allowNull:!0}}})],f.prototype,"defaultValue",void 0),(0,o._)([(0,a.MZ)()],f.prototype,"description",void 0),(0,o._)([(0,p.w)("description")],f.prototype,"readDescription",null),(0,o._)([(0,a.MZ)({types:c.gK,json:{read:{reader:c.rS},write:!0}})],f.prototype,"domain",void 0),(0,o._)([(0,a.MZ)({type:Boolean,json:{write:!0}})],f.prototype,"editable",void 0),(0,o._)([(0,a.MZ)({type:l.jz,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],f.prototype,"length",void 0),(0,o._)([(0,a.MZ)({type:String,json:{write:!0}})],f.prototype,"name",void 0),(0,o._)([(0,a.MZ)({type:Boolean,json:{write:!0}})],f.prototype,"nullable",void 0),(0,o._)([(0,u.e)(m.m)],f.prototype,"type",void 0),(0,o._)([(0,a.MZ)()],f.prototype,"valueType",void 0),(0,o._)([(0,p.w)("valueType",["description"])],f.prototype,"readValueType",null),(0,o._)([(0,a.MZ)({type:Boolean,json:{read:!1}})],f.prototype,"visible",void 0),f=r=(0,o._)([(0,d.$)("esri.layers.support.Field")],f);const h=f},95466:(e,t,i)=>{i.d(t,{A:()=>c});var r=i(49186),o=i(25482),s=i(53966),n=i(91869),a=i(3330),l=i(30524),u=i(56400),p=i(96285);const d=new Map;class c{static fromJSON(e){return new c(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new c(e.fields??[],h(e))}static fromLayerJSON(e){return new c(e.fields??[],h(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const i=[];for(const e of this.fields){const t=e?.name,r=y(t);if(t&&r){const o=m(t);this._fieldsMap.set(t,e),this._fieldsMap.set(o,e),this._normalizedFieldsMap.set(r,e),i.push(`${o}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,l.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,l.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,l.te)(e)||(0,l.Xz)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}i.sort(),this.uid=i.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,l.te)(e)||(0,l.Xz)(e)||e.nullable||void 0!==(0,l.lD)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(m(e))??this._normalizedFieldsMap.get(y(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(s.A.getLogger("esri.layers.support.FieldsIndex").error(new r.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),u.n$):f.has(t.type)?u.L5:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===u.L5?a.GB.instance:t===u.n$?p.mQ.utcInstance:(0,n.tE)(d,t,(()=>p.oh.create(t))):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,l.OH)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map((e=>(0,o.Wj)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function m(e){return e.trim().toLowerCase()}function y(e){return(0,l.rS)(e)?.toLowerCase()??""}const f=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function h(e){const t=new Map;if(!e.fields)return t;const i=!0===e.datesInUnknownTimezone,{timeInfo:r,editFieldsInfo:o}=e,s=(r?"startField"in r?r.startField:r.startTimeField:"")??"",n=(r?"endField"in r?r.endField:r.endTimeField:"")??"",a=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,u.ZS)(e.dateFieldsTimeReference):null,l=o?function(e){return"timeZone"in e}(o)?o.timeZone??a:o.dateFieldsTimeReference?(0,u.ZS)(o.dateFieldsTimeReference):a??u.n$:null,p=r?function(e){return"timeZone"in e}(r)?r.timeZone??a:r.timeReference?(0,u.ZS)(r.timeReference):a:null,d=new Map([[m(o?.creationDateField??""),l],[m(o?.editDateField??""),l],[m(s),p],[m(n),p]]);for(const{name:r,type:o}of e.fields)if(f.has(o))t.set(r,u.L5);else if("date"!==o&&"esriFieldTypeDate"!==o)t.set(r,null);else if(i)t.set(r,u.L5);else{const e=d.get(m(r??""))??a;t.set(r,e)}return t}},72088:(e,t,i)=>{i.d(t,{rS:()=>_,gK:()=>A}),i(44208);var r,o=i(90237),s=i(4718),n=i(10107),a=(i(53966),i(93223)),l=i(40608),u=i(25482);i(87811);let p=r=class extends u.oY{constructor(e){super(e),this.name=null,this.code=null}clone(){return new r({name:this.name,code:this.code})}};(0,o._)([(0,n.MZ)({type:String,json:{write:!0}})],p.prototype,"name",void 0),(0,o._)([(0,n.MZ)({type:[String,Number],json:{write:!0}})],p.prototype,"code",void 0),p=r=(0,o._)([(0,l.$)("esri.layers.support.CodedValue")],p);const d=new(i(66552).J)({inherited:"inherited",codedValue:"coded-value",range:"range"});let c=class extends u.oY{constructor(e){super(e),this.name=null,this.type=null}};(0,o._)([(0,n.MZ)({type:String,json:{write:!0}})],c.prototype,"name",void 0),(0,o._)([(0,a.e)(d)],c.prototype,"type",void 0),c=(0,o._)([(0,l.$)("esri.layers.support.Domain")],c);const m=c;var y;let f=y=class extends m{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const i=String(e);this.codedValues.some((e=>(String(e.code)===i&&(t=e.name),!!t)))}return t}clone(){return new y({codedValues:(0,s.o8)(this.codedValues),name:this.name})}};(0,o._)([(0,n.MZ)({type:[p],json:{write:!0}})],f.prototype,"codedValues",void 0),(0,o._)([(0,a.e)({codedValue:"coded-value"})],f.prototype,"type",void 0),f=y=(0,o._)([(0,l.$)("esri.layers.support.CodedValueDomain")],f);const h=f;var b;i(49186);let v=b=class extends m{constructor(e){super(e),this.type="inherited"}clone(){return new b}};(0,o._)([(0,a.e)({inherited:"inherited"})],v.prototype,"type",void 0),v=b=(0,o._)([(0,l.$)("esri.layers.support.InheritedDomain")],v);const g=v;var T;let w=T=class extends m{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new T({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,o._)([(0,n.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,i){t[i]=[this.minValue||0,e]}}}})],w.prototype,"maxValue",void 0),(0,o._)([(0,n.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,i){t[i]=[e,this.maxValue||0]}}}})],w.prototype,"minValue",void 0),(0,o._)([(0,a.e)({range:"range"})],w.prototype,"type",void 0),w=T=(0,o._)([(0,l.$)("esri.layers.support.RangeDomain")],w);const S=w,A={key:"type",base:m,typeMap:{range:w,"coded-value":h,inherited:g}};function _(e){if(!e?.type)return null;switch(e.type){case"range":return S.fromJSON(e);case"codedValue":return h.fromJSON(e);case"inherited":return g.fromJSON(e)}return null}},98453:(e,t,i)=>{i.d(t,{m:()=>r});const r=new(i(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},92300:(e,t,i)=>{i.d(t,{V:()=>s,X:()=>o});var r=i(65864);function o(e){return{geometryType:(0,r.$B)(e[0]),geometries:e.map((e=>e.toJSON()))}}function s(e,t,i){const o=(0,r.xD)(t);return e.map((e=>{const t=o.fromJSON(e);return t.spatialReference=i,t}))}},22671:(e,t,i)=>{i.d(t,{A:()=>g});var r,o=i(90237),s=i(59456),n=i(52106),a=i(66552),l=i(25482),u=i(4718),p=i(10107),d=(i(44208),i(53966),i(36005)),c=i(40608),m=i(43937),y=i(16930),f=i(65864),h=i(20437);const b=new a.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let v=r=class extends l.oY{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const i=y.A.fromJSON(t.spatialReference),r=[];for(let t=0;t<e.length;t++){const o=e[t],s=n.A.fromJSON(o),a=o.geometry?.spatialReference;null==s.geometry||a||(s.geometry.spatialReference=i);const l=o.aggregateGeometries,u=s.aggregateGeometries;if(l&&null!=u)for(const e in u){const t=u[e],r=l[e],o=r?.spatialReference;null==t||o||(t.spatialReference=i)}r.push(s)}return r}writeGeometryType(e,t,i,r){if(e)return void b.write(e,t,i,r);const{features:o}=this;if(o)for(const e of o)if(null!=e?.geometry)return void b.write(e.geometry.type,t,i,r)}readQueryGeometry(e,t){if(!e)return null;const i=!!e.spatialReference,r=(0,f.rS)(e);return r&&!i&&t.spatialReference&&(r.spatialReference=y.A.fromJSON(t.spatialReference)),r}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:i}=this;if(i)for(const e of i)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new r(this.cloneProperties())}cloneProperties(){return(0,u.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let i=0;i<t.features.length;i++){const r=t.features[i];if(r.geometry){const t=e?.[i];r.geometry=t?.toJSON()||r.geometry}}return t}quantize(e){const{scale:[t,i],translate:[r,o]}=e,s=this.features,n=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-r)/t)),(e=>Math.round((o-e)/i)));for(let e=0,t=s.length;e<t;e++)n?.(s[e].geometry)||(s.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:i}=this;if(!i)return this;const{translate:[r,o],scale:[s,n]}=i;let a=null,l=null;if(this.hasZ&&null!=i?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=i;a=i=>i*t+e}if(this.hasM&&null!=i?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=i;l=i=>null==i?i:i*t+e}const u=this._getHydrationFunction(e,(e=>e*s+r),(e=>o-e*n),a,l);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}_quantizePoints(e,t,i){let r,o;const s=[];for(let n=0,a=e.length;n<a;n++){const a=e[n];if(n>0){const e=t(a[0]),n=i(a[1]);e===r&&n===o||(s.push([e-r,n-o]),r=e,o=n)}else r=t(a[0]),o=i(a[1]),s.push([r,o])}return s.length>0?s:null}_getQuantizationFunction(e,t,i){return"point"===e?e=>(e.x=t(e.x),e.y=i(e.y),e):"polyline"===e||"polygon"===e?e=>{const r=(0,f.Bi)(e)?e.rings:e.paths,o=[];for(let e=0,s=r.length;e<s;e++){const s=r[e],n=this._quantizePoints(s,t,i);n&&o.push(n)}return o.length>0?((0,f.Bi)(e)?e.rings=o:e.paths=o,e):null}:"multipoint"===e?e=>{const r=this._quantizePoints(e.points,t,i);return r&&r.length>0?(e.points=r,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,i,r,o){return"point"===e?e=>{e.x=t(e.x),e.y=i(e.y),r&&(e.z=r(e.z))}:"polyline"===e||"polygon"===e?e=>{const s=(0,f.Bi)(e)?e.rings:e.paths;let n,a;for(let e=0,r=s.length;e<r;e++){const r=s[e];for(let e=0,o=r.length;e<o;e++){const o=r[e];e>0?(n+=o[0],a+=o[1]):(n=o[0],a=o[1]),o[0]=t(n),o[1]=i(a)}}if(r&&o)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,i=t.length;e<i;e++){const i=t[e];i[2]=r(i[2]),i[3]=o(i[3])}}else if(r)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,i=t.length;e<i;e++){const i=t[e];i[2]=r(i[2])}}else if(o)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,i=t.length;e<i;e++){const i=t[e];i[2]=o(i[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=i(e.ymin),e.xmax=t(e.xmax),e.ymax=i(e.ymax),r&&null!=e.zmax&&null!=e.zmin&&(e.zmax=r(e.zmax),e.zmin=r(e.zmin)),o&&null!=e.mmax&&null!=e.mmin&&(e.mmax=o(e.mmax),e.mmin=o(e.mmin))}:"multipoint"===e?e=>{const s=e.points;let n,a;for(let e=0,r=s.length;e<r;e++){const r=s[e];e>0?(n+=r[0],a+=r[1]):(n=r[0],a=r[1]),r[0]=t(n),r[1]=i(a)}if(r&&o)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=r(t[2]),t[3]=o(t[3])}else if(r)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=r(t[2])}else if(o)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=o(t[2])}}:null}};(0,o._)([(0,p.MZ)({type:String,json:{write:!0}})],v.prototype,"displayFieldName",void 0),(0,o._)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"exceededTransferLimit",void 0),(0,o._)([(0,p.MZ)({type:[n.A],json:{write:!0}})],v.prototype,"features",void 0),(0,o._)([(0,d.w)("features")],v.prototype,"readFeatures",null),(0,o._)([(0,p.MZ)({type:[h.A],json:{write:!0}})],v.prototype,"fields",void 0),(0,o._)([(0,p.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:b.read}}})],v.prototype,"geometryType",void 0),(0,o._)([(0,m.K)("geometryType")],v.prototype,"writeGeometryType",null),(0,o._)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasM",void 0),(0,o._)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasZ",void 0),(0,o._)([(0,p.MZ)({types:s.yR,json:{write:!0}})],v.prototype,"queryGeometry",void 0),(0,o._)([(0,d.w)("queryGeometry")],v.prototype,"readQueryGeometry",null),(0,o._)([(0,p.MZ)({type:y.A,json:{write:!0}})],v.prototype,"spatialReference",void 0),(0,o._)([(0,m.K)("spatialReference")],v.prototype,"writeSpatialReference",null),(0,o._)([(0,p.MZ)({json:{write:!0}})],v.prototype,"transform",void 0),v=r=(0,o._)([(0,c.$)("esri.rest.support.FeatureSet")],v),v.prototype.toJSON.isDefaultToJSON=!0;const g=v},2272:(e,t,i)=>{i.d(t,{Dl:()=>n,jV:()=>s,lF:()=>a}),i(92602),i(70333);var r=i(4718),o=i(84952);function s(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function n(e){return"string"==typeof e?(0,o.An)(e):(0,r.o8)(e)}function a(e,t,i){const r={};for(const o in e){if("declaredClass"===o)continue;const s=e[o];if(null!=s&&"function"!=typeof s)if(Array.isArray(s))r[o]=s.map((e=>a({item:e},t,i).item));else if("object"==typeof s)if(s.toJSON){const e=s.toJSON(i?.[o]);r[o]=t?e:JSON.stringify(e)}else r[o]=t?s:JSON.stringify(s);else r[o]=s}return r}i(926)}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3920],{4902:(e,t,i)=>{i.d(t,{PH:()=>a,sA:()=>n});var r=i(90237),o=i(40608);let s=0;const n=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+s++})}};return t=(0,r._)([(0,o.$)("esri.core.Identifiable")],t),t},a=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:s++})}};return t=(0,r._)([(0,o.$)("esri.core.Identifiable.NumericIdentifiable")],t),t};let l=class extends(n(class{})){};l=(0,r._)([(0,o.$)("esri.core.Identifiable")],l)},46130:(e,t,i)=>{i.d(t,{v:()=>o});var r=i(76553);function o(e){e?.writtenProperties&&e.writtenProperties.forEach((({target:e,propName:t,newOrigin:i})=>{(0,r.H)(e)&&i&&e.originOf(t)!==i&&e.updateOrigin(t,i)}))}},76553:(e,t,i)=>{function r(e){return e&&"getAtOrigin"in e&&"originOf"in e}i.d(t,{H:()=>r})},3330:(e,t,i)=>{i.d(t,{GB:()=>o,Qo:()=>n,Y4:()=>s});var r=i(96285);class o{}function s(e){return e instanceof r.bo?e===o.instance:"unknown"===e?.toString().toLowerCase()}function n(e){return s(e)?o.instance:e}o.instance=new r.oh("Etc/UTC")},70328:(e,t,i)=>{i.d(t,{BI:()=>h,Ej:()=>p,Hq:()=>u,Ie:()=>y,Jt:()=>f,Ne:()=>d,RF:()=>a,aI:()=>v,fA:()=>s,hZ:()=>m,iT:()=>l,is:()=>b,qv:()=>g,vI:()=>c,v_:()=>T,vt:()=>o,w1:()=>n});var r=i(5443);function o(e=T){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function s(e,t,i,r,s,n,a=o()){return a[0]=e,a[1]=t,a[2]=i,a[3]=r,a[4]=s,a[5]=n,a}function n(e,t){const i=isFinite(e[2])||isFinite(e[5]);return new r.A(i?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function a(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function l(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function u(e,t,i=0,r=t.length/3){let o=e[0],s=e[1],n=e[2],a=e[3],l=e[4],u=e[5];for(let e=0;e<r;e++)o=Math.min(o,t[i+3*e]),s=Math.min(s,t[i+3*e+1]),n=Math.min(n,t[i+3*e+2]),a=Math.max(a,t[i+3*e]),l=Math.max(l,t[i+3*e+1]),u=Math.max(u,t[i+3*e+2]);e[0]=o,e[1]=s,e[2]=n,e[3]=a,e[4]=l,e[5]=u}function p(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function d(e,t,i=e){return i[0]=t[0],i[1]=t[1],i[2]=t[2],i!==e&&(i[3]=e[3],i[4]=e[4],i[5]=e[5]),i}function c(e,t,i=e){return i[3]=t[0],i[4]=t[1],i[5]=t[2],i!==e&&(i[0]=e[0],i[1]=e[1],i[2]=e[2]),e}function m(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function y(e){return e?m(e,g):o(g)}function f(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function h(e,t,i,r,o){return e[0]=t,e[1]=i,e[2]=Number.NEGATIVE_INFINITY,e[3]=r,e[4]=o,e[5]=Number.POSITIVE_INFINITY,e}function b(e){return 6===e.length}function v(e,t,i){if(null==e||null==t)return e===t;if(!b(e)||!b(t))return!1;if(i){for(let r=0;r<e.length;r++)if(!i(e[r],t[r]))return!1}else for(let i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0}i(19419);const g=[1/0,1/0,1/0,-1/0,-1/0,-1/0],T=[0,0,0,0,0,0];o()},17136:(e,t,i)=>{i.d(t,{el:()=>S});var r=i(92602),o=i(49186),s=i(53966),n=i(39829),a=i(82799),l=i(80754),u=i(21325),p=i(28735),d=(i(59456),i(78888)),c=i(65864),m=i(2272),y=i(84952),f=i(92300);const h=()=>s.A.getLogger("esri.geometry.support.normalizeUtils");function b(e){return"polygon"===e[0].type}function v(e){return"polyline"===e[0].type}function g(e,t,i){if(t){const t=function(e,t){if(!(e instanceof a.A||e instanceof n.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw h().error(e),new o.A(e)}const i=(0,l.r8)(e),r=[];for(const e of i){const i=[];r.push(i),i.push([e[0][0],e[0][1]]);for(let r=0;r<e.length-1;r++){const o=e[r][0],s=e[r][1],n=e[r+1][0],a=e[r+1][1],l=Math.sqrt((n-o)*(n-o)+(a-s)*(a-s)),u=(a-s)/l,p=(n-o)/l,d=l/t;if(d>1){for(let e=1;e<=d-1;e++){const r=e*t,n=p*r+o,a=u*r+s;i.push([n,a])}const e=(l+Math.floor(d-1)*t)/2,r=p*e+o,n=u*e+s;i.push([r,n])}i.push([n,a])}}return function(e){return"polygon"===e.type}(e)?new n.A({rings:r,spatialReference:e.spatialReference}):new a.A({paths:r,spatialReference:e.spatialReference})}(e,1e6);e=(0,p.ci)(t,!0)}return i&&(e=(0,l.kS)(e,i)),e}function T(e,t,i){if(Array.isArray(e)){const r=e[0];if(r>t){const i=(0,l.kd)(r,t);e[0]=r+i*(-2*t)}else if(r<i){const t=(0,l.kd)(r,i);e[0]=r+t*(-2*i)}}else{const r=e.x;if(r>t){const i=(0,l.kd)(r,t);e=e.clone().offset(i*(-2*t),0)}else if(r<i){const t=(0,l.kd)(r,i);e=e.clone().offset(t*(-2*i),0)}}return e}function w(e,t){let i=-1;for(let r=0;r<t.cutIndexes.length;r++){const o=t.cutIndexes[r],s=t.geometries[r],n=(0,l.r8)(s);for(let e=0;e<n.length;e++){const t=n[e];t.some((i=>{if(i[0]<180)return!0;{let i=0;for(let e=0;e<t.length;e++){const r=t[e][0];i=r>i?r:i}i=Number(i.toFixed(9));const r=-360*(0,l.kd)(i,180);for(let i=0;i<t.length;i++){const t=s.getPoint(e,i);s.setPoint(e,i,t.clone().offset(r,0))}return!0}}))}if(o===i){if(b(e))for(const t of(0,l.r8)(s))e[o]=e[o].addRing(t);else if(v(e))for(const t of(0,l.r8)(s))e[o]=e[o].addPath(t)}else i=o,e[o]=s}return e}async function S(e,t,i){if(!Array.isArray(e))return S([e],t);t&&"string"!=typeof t&&h().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const o="string"==typeof t?t:t?.url??r.A.geometryServiceUrl;let s,b,v,A,_,M,N,O,I=0;const x=[],D=[];for(const t of e)if(null!=t)if(s||(s=t.spatialReference,b=(0,u.Vp)(s),v=s.isWebMercator,M=v?102100:4326,A=l.j7[M].maxX,_=l.j7[M].minX,N=l.j7[M].plus180Line,O=l.j7[M].minus180Line),b)if("mesh"===t.type)D.push(t);else if("point"===t.type)D.push(T(t.clone(),A,_));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>T(e,A,_))),D.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,b);D.push(e.rings?new n.A(e):e)}else if(t.extent){const e=t.extent,i=(0,l.kd)(e.xmin,_)*(2*A);let r=0===i?t.clone():(0,l.kS)(t.clone(),i);e.offset(i,0);let{xmin:o,xmax:s}=e;o=Number(o.toFixed(9)),s=Number(s.toFixed(9)),e.intersects(N)&&s!==A?(I=s>I?s:I,r=g(r,v),x.push(r),D.push("cut")):e.intersects(O)&&o!==_?(I=s*(2*A)>I?s*(2*A):I,r=g(r,v,360),x.push(r),D.push("cut")):D.push(r)}else D.push(t.clone());else D.push(t);else D.push(t);let F=(0,l.kd)(I,A),Z=-90;const C=F,j=new a.A;for(;F>0;){const e=360*F-180;j.addPath([[e,Z],[e,-1*Z]]),Z*=-1,F--}if(x.length>0&&C>0){const t=w(x,await async function(e,t,i,r){const o=(0,m.Dl)(e),s=t[0].spatialReference,n={...r,responseType:"json",query:{...o.query,f:"json",sr:(0,u.YX)(s),target:JSON.stringify({geometryType:(0,c.$B)(t[0]),geometries:t}),cutter:JSON.stringify(i)}},a=await(0,d.A)(o.path+"/cut",n),{cutIndexes:l,geometries:p=[]}=a.data;return{cutIndexes:l,geometries:p.map((e=>{const t=(0,c.rS)(e);return t.spatialReference=s,t}))}}(o,x,j,i)),r=[],s=[];for(let i=0;i<D.length;i++){const o=D[i];if("cut"!==o)s.push(o);else{const o=t.shift(),n=e[i];null!=n&&"polygon"===n.type&&n.rings&&n.rings.length>1&&o.rings.length>=n.rings.length?(r.push(o),s.push("simplify")):s.push(v?(0,p.Gh)(o):o)}}if(!r.length)return s;const n=await async function(e,t,i){const r="string"==typeof e?(0,y.An)(e):e,o=t[0].spatialReference,s=(0,c.$B)(t[0]),n={...i,query:{...r.query,f:"json",sr:(0,u.YX)(o),geometries:JSON.stringify((0,f.X)(t))}},{data:a}=await(0,d.A)(r.path+"/simplify",n);return(0,f.V)(a.geometries,s,o)}(o,r,i),a=[];for(let e=0;e<s.length;e++){const t=s[e];"simplify"!==t?a.push(t):a.push(v?(0,p.Gh)(n.shift()):n.shift())}return a}const E=[];for(let e=0;e<D.length;e++){const t=D[e];if("cut"!==t)E.push(t);else{const e=x.shift();E.push(!0===v?(0,p.Gh)(e):e)}}return E}},80754:(e,t,i)=>{i.d(t,{j7:()=>n,kS:()=>l,kd:()=>a,r8:()=>u});var r=i(82799),o=i(16930),s=i(65864);const n={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new r.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:o.A.WebMercator}),minus180Line:new r.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:o.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new r.A({paths:[[[180,-180],[180,180]]],spatialReference:o.A.WGS84}),minus180Line:new r.A({paths:[[[-180,-180],[-180,180]]],spatialReference:o.A.WGS84})}};function a(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const i=u(e);for(const e of i)for(const i of e)i[0]+=t;return e}function u(e){return(0,s.Bi)(e)?e.rings:e.paths}},4146:(e,t,i)=>{i.d(t,{A:()=>g});var r=i(90237),o=(i(59456),i(78888)),s=i(49186),n=i(65529),a=i(4902),l=i(92474),u=i(53966),p=i(74887),d=i(84952),c=i(10107),m=(i(44208),i(87811),i(40608)),y=i(92602),f=i(5443),h=i(16930);let b=0,v=class extends(n.A.EventedMixin((0,a.sA)(l.A))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new f.A(-180,-90,180,90,h.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+b++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=h.A.WGS84,this.title=null,this.type=null,this.url=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await i.e(7982).then(i.bind(i,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:r}=await i.e(5613).then(i.bind(i,45613));try{return await r(t)}catch(e){const i=t?.portalItem,r=i?.id||"unset",o=i?.portal?.url||y.A.portalUrl;throw u.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+o+"', id: '"+r+"')",e),e}}(e)}initialize(){this.when().catch((e=>{(0,p.zf)(e)||u.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})}))}destroy(){const e=this.parent;if(e){const t=this;"layers"in e&&e.layers.includes(t)?e.layers.remove(t):"tables"in e&&e.tables.includes(t)?e.tables.remove(t):"baseLayers"in e&&e.baseLayers.includes(t)?e.baseLayers.remove(t):"referenceLayers"in e&&e.referenceLayers.includes(t)&&e.referenceLayers.remove(t),this._set("parent",null)}}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,d.An)(this.url)}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,o.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new s.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,r._)([(0,c.MZ)({type:String})],v.prototype,"attributionDataUrl",void 0),(0,r._)([(0,c.MZ)({type:f.A})],v.prototype,"fullExtent",void 0),(0,r._)([(0,c.MZ)({readOnly:!0})],v.prototype,"hasAttributionData",null),(0,r._)([(0,c.MZ)({type:String,clonable:!1})],v.prototype,"id",void 0),(0,r._)([(0,c.MZ)({type:Boolean,nonNullable:!0})],v.prototype,"legendEnabled",void 0),(0,r._)([(0,c.MZ)({type:["show","hide","hide-children"]})],v.prototype,"listMode",void 0),(0,r._)([(0,c.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],v.prototype,"opacity",void 0),(0,r._)([(0,c.MZ)({clonable:!1})],v.prototype,"parent",void 0),(0,r._)([(0,c.MZ)({readOnly:!0})],v.prototype,"parsedUrl",null),(0,r._)([(0,c.MZ)({type:Boolean,readOnly:!0})],v.prototype,"persistenceEnabled",void 0),(0,r._)([(0,c.MZ)({type:Boolean})],v.prototype,"popupEnabled",void 0),(0,r._)([(0,c.MZ)({type:Boolean})],v.prototype,"attributionVisible",void 0),(0,r._)([(0,c.MZ)({type:h.A})],v.prototype,"spatialReference",void 0),(0,r._)([(0,c.MZ)({type:String})],v.prototype,"title",void 0),(0,r._)([(0,c.MZ)({readOnly:!0,json:{read:!1}})],v.prototype,"type",void 0),(0,r._)([(0,c.MZ)()],v.prototype,"url",void 0),(0,r._)([(0,c.MZ)({type:Boolean,nonNullable:!0})],v.prototype,"visible",void 0),v=(0,r._)([(0,m.$)("esri.layers.Layer")],v);const g=v},97550:(e,t,i)=>{i.r(t),i.d(t,{default:()=>ui});var r=i(90237),o=i(92602),s=i(59456),n=i(52106),a=i(13874),l=(i(86162),i(94409),i(65345),i(42980),i(39290),i(92438),i(96576),i(93618),i(65494)),u=i(53966),p=i(5503),d=i(49186),c=i(92071),m=i(93637),y=i(74887),f=i(36708),h=i(83047),b=i(84952),v=i(10107),g=(i(44208),i(87811),i(36005)),T=i(40608),w=i(43937),S=i(46130),A=i(5443),_=i(57251),M=i(21325),N=i(4146),O=i(63074),I=i(16131),x=i(8303),D=i(25036),F=i(60694),Z=i(61147),C=i(25482),j=i(53930);let E=class extends C.oY{constructor(e){super(e),this.break=new j.A({color:[255,255,255],size:12,outline:{color:[0,122,194],width:3}}),this.first=new j.A({color:[0,255,0],size:20,outline:{color:[255,255,255],width:4}}),this.unlocated=new j.A({color:[255,0,0],size:12,outline:{color:[255,255,255],width:3}}),this.last=new j.A({color:[255,0,0],size:20,outline:{color:[255,255,255],width:4}}),this.middle=new j.A({color:[51,51,51],size:12,outline:{color:[0,122,194],width:3}}),this.waypoint=new j.A({color:[255,255,255],size:12,outline:{color:[0,122,194],width:3}})}};(0,r._)([(0,v.MZ)({types:Z.Es})],E.prototype,"break",void 0),(0,r._)([(0,v.MZ)({types:Z.Es})],E.prototype,"first",void 0),(0,r._)([(0,v.MZ)({types:Z.Es})],E.prototype,"unlocated",void 0),(0,r._)([(0,v.MZ)({types:Z.Es})],E.prototype,"last",void 0),(0,r._)([(0,v.MZ)({types:Z.Es})],E.prototype,"middle",void 0),(0,r._)([(0,v.MZ)({types:Z.Es})],E.prototype,"waypoint",void 0),E=(0,r._)([(0,T.$)("esri.layers.support.RouteStopSymbols")],E);const B=E;var P=i(31593),R=i(94985);let L=class extends C.oY{constructor(e){super(e),this.directionLines=new P.A({color:[0,122,194],width:6}),this.directionPoints=new j.A({color:[255,255,255],size:6,outline:{color:[0,122,194],width:2}}),this.pointBarriers=new j.A({style:"x",size:10,outline:{color:[255,0,0],width:3}}),this.polygonBarriers=new R.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.stops=new B}};(0,r._)([(0,v.MZ)({types:Z.Es})],L.prototype,"directionLines",void 0),(0,r._)([(0,v.MZ)({types:Z.Es})],L.prototype,"directionPoints",void 0),(0,r._)([(0,v.MZ)({types:Z.Es})],L.prototype,"pointBarriers",void 0),(0,r._)([(0,v.MZ)({types:Z.Es})],L.prototype,"polygonBarriers",void 0),(0,r._)([(0,v.MZ)({types:Z.Es})],L.prototype,"polylineBarriers",void 0),(0,r._)([(0,v.MZ)({types:Z.Es})],L.prototype,"routeInfo",void 0),(0,r._)([(0,v.MZ)({type:B})],L.prototype,"stops",void 0),L=(0,r._)([(0,T.$)("esri.layers.support.RouteSymbols")],L);const U=L;var k=i(20655),J=i(80812),V=i(10407),W=i(78888),G=i(2272),$=i(93223),q=i(66552);const z=(0,q.O)()({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"}),K=(0,q.O)()({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"}),Y=((0,q.O)()({esriNAUDays:"days",esriNAUHours:"hours",esriNAUMinutes:"minutes",esriNAUSeconds:"seconds"}),(0,q.O)()({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",esriNAUDays:"days",esriNAUHours:"hours",esriNAUMinutes:"minutes",esriNAUSeconds:"seconds",esriNAUKilometersPerHour:"kilometers-per-hour",esriNAUMilesPerHour:"miles-per-hour",esriNAUUnknown:"unknown"})),H=(0,q.O)()({esriDOTComplete:"complete",esriDOTCompleteNoEvents:"complete-no-events",esriDOTFeatureSets:"featuresets",esriDOTInstructionsOnly:"instructions-only",esriDOTStandard:"standard",esriDOTSummaryOnly:"summary-only"}),X=(0,q.O)()({esriNAOutputLineNone:"none",esriNAOutputLineStraight:"straight",esriNAOutputLineTrueShape:"true-shape",esriNAOutputLineTrueShapeWithMeasure:"true-shape-with-measure"}),Q=((0,q.O)()({esriNAOutputPolygonNone:"none",esriNAOutputPolygonSimplified:"simplified",esriNAOutputPolygonDetailed:"detailed"}),(0,q.O)()({esriNFSBAllowBacktrack:"allow-backtrack",esriNFSBAtDeadEndsOnly:"at-dead-ends-only",esriNFSBNoBacktrack:"no-backtrack",esriNFSBAtDeadEndsAndIntersections:"at-dead-ends-and-intersections"})),ee=((0,q.O)()({esriNATravelDirectionFromFacility:"from-facility",esriNATravelDirectionToFacility:"to-facility"}),(0,q.O)()({esriNATimeOfDayNotUsed:"not-used",esriNATimeOfDayUseAsStartTime:"start",esriNATimeOfDayUseAsEndTime:"end"}),(0,q.O)()({AUTOMOBILE:"automobile",TRUCK:"truck",WALK:"walk",OTHER:"other"})),te=(0,q.O)()({0:"either-side-of-vehicle",1:"right-side-of-vehicle",2:"left-side-of-vehicle",3:"no-u-turn"},{useNumericKeys:!0}),ie=(0,q.O)()({0:"stop",1:"waypoint",2:"break"},{useNumericKeys:!0}),re=(0,q.O)()({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}),oe=(0,q.O)()({1:"right",2:"left"},{useNumericKeys:!0}),se=(0,q.O)()({0:"restriction",1:"scaled-cost",2:"added-cost"},{useNumericKeys:!0}),ne=(0,q.O)()({0:"permit",1:"restrict"},{useNumericKeys:!0}),ae=(0,q.O)()({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",1007:"lane"},{useNumericKeys:!0}),le=(0,q.O)()({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}),ue=(0,q.O)()({"NA Campus":"campus","NA Desktop":"desktop","NA Navigation":"navigation"}),pe=(0,q.O)()({Kilometers:"kilometers",Miles:"miles",Meters:"meters"},{ignoreUnknown:!1}),de=(0,q.O)()({Minutes:"minutes",TimeAt1KPH:"time-at-1-kph",TravelTime:"travel-time",TruckMinutes:"truck-minutes",TruckTravelTime:"truck-travel-time",WalkTime:"walk-time"},{ignoreUnknown:!1}),ce=(0,q.O)()({Kilometers:"kilometers",Miles:"miles",Meters:"meters",Minutes:"minutes",TimeAt1KPH:"time-at-1-kph",TravelTime:"travel-time",TruckMinutes:"truck-minutes",TruckTravelTime:"truck-travel-time",WalkTime:"walk-time"},{ignoreUnknown:!1}),me=(0,q.O)()({"Any Hazmat Prohibited":"any-hazmat-prohibited","Avoid Carpool Roads":"avoid-carpool-roads","Avoid Express Lanes":"avoid-express-lanes","Avoid Ferries":"avoid-ferries","Avoid Gates":"avoid-gates","Avoid Limited Access Roads":"avoid-limited-access-roads","Avoid Private Roads":"avoid-private-roads","Avoid Roads Unsuitable for Pedestrians":"avoid-roads-unsuitable-for-pedestrians","Avoid Stairways":"avoid-stairways","Avoid Toll Roads":"avoid-toll-roads","Avoid Toll Roads for Trucks":"avoid-toll-roads-for-trucks","Avoid Truck Restricted Roads":"avoid-truck-restricted-roads","Avoid Unpaved Roads":"avoid-unpaved-roads","Axle Count Restriction":"axle-count-restriction","Driving a Bus":"driving-a-bus","Driving a Taxi":"driving-a-taxi","Driving a Truck":"driving-a-truck","Driving an Automobile":"driving-an-automobile","Driving an Emergency Vehicle":"driving-an-emergency-vehicle","Height Restriction":"height-restriction","Kingpin to Rear Axle Length Restriction":"kingpin-to-rear-axle-length-restriction","Length Restriction":"length-restriction","Preferred for Pedestrians":"preferred-for-pedestrians","Riding a Motorcycle":"riding-a-motorcycle","Roads Under Construction Prohibited":"roads-under-construction-prohibited","Semi or Tractor with One or More Trailers Prohibited":"semi-or-tractor-with-one-or-more-trailers-prohibited","Single Axle Vehicles Prohibited":"single-axle-vehicles-prohibited","Tandem Axle Vehicles Prohibited":"tandem-axle-vehicles-prohibited","Through Traffic Prohibited":"through-traffic-prohibited","Truck with Trailers Restriction":"truck-with-trailers-restriction","Use Preferred Hazmat Routes":"use-preferred-hazmat-routes","Use Preferred Truck Routes":"use-preferred-truck-routes",Walking:"walking","Weight Restriction":"weight-restriction"},{ignoreUnknown:!1}),ye=(0,q.O)()({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),fe=(0,q.O)()({esriGeometryPoint:"point",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"envelope",esriGeometryMultipoint:"multipoint"}),he=(0,q.O)()({esriNAUTCost:"cost",esriNAUTDescriptor:"descriptor",esriNAUTRestriction:"restriction",esriNAUTHierarchy:"hierarchy"}),be=(0,q.O)()({esriDSTAltName:"alt-name",esriDSTArrive:"arrive",esriDSTBranch:"branch",esriDSTCrossStreet:"cross-street",esriDSTCumulativeLength:"cumulative-length",esriDSTDepart:"depart",esriDSTEstimatedArrivalTime:"estimated-arrival-time",esriDSTExit:"exit",esriDSTGeneral:"general",esriDSTLength:"length",esriDSTServiceTime:"service-time",esriDSTStreetName:"street-name",esriDSTSummary:"summary",esriDSTTime:"time",esriDSTTimeWindow:"time-window",esriDSTToward:"toward",esriDSTViolationTime:"violation-time",esriDSTWaitTime:"wait-time"});let ve=class extends C.oY{constructor(e){super(e),this.dataType=null,this.name=null,this.parameterNames=null,this.restrictionUsageParameterName=null,this.timeNeutralAttributeName=null,this.trafficSupport=null,this.units=null,this.usageType=null}};(0,r._)([(0,v.MZ)({type:String})],ve.prototype,"dataType",void 0),(0,r._)([(0,$.e)(ce,{ignoreUnknown:!1})],ve.prototype,"name",void 0),(0,r._)([(0,v.MZ)({type:[String]})],ve.prototype,"parameterNames",void 0),(0,r._)([(0,v.MZ)({type:String})],ve.prototype,"restrictionUsageParameterName",void 0),(0,r._)([(0,$.e)(de,{ignoreUnknown:!1})],ve.prototype,"timeNeutralAttributeName",void 0),(0,r._)([(0,v.MZ)({type:String})],ve.prototype,"trafficSupport",void 0),(0,r._)([(0,$.e)(Y)],ve.prototype,"units",void 0),(0,r._)([(0,$.e)(he)],ve.prototype,"usageType",void 0),ve=(0,r._)([(0,T.$)("esri.rest.support.NetworkAttribute")],ve);const ge=ve;let Te=class extends C.oY{constructor(e){super(e),this.buildTime=null,this.name=null,this.networkAttributes=null,this.networkSources=null,this.state=null}};(0,r._)([(0,v.MZ)({type:Number})],Te.prototype,"buildTime",void 0),(0,r._)([(0,v.MZ)({type:String})],Te.prototype,"name",void 0),(0,r._)([(0,v.MZ)({type:[ge]})],Te.prototype,"networkAttributes",void 0),(0,r._)([(0,v.MZ)()],Te.prototype,"networkSources",void 0),(0,r._)([(0,v.MZ)({type:String})],Te.prototype,"state",void 0),Te=(0,r._)([(0,T.$)("esri.rest.support.NetworkDataset")],Te);const we=Te;var Se=i(69540);let Ae=class extends((0,Se.O)(C.oY)){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}readId(e,t){return t.id??t.itemId??null}readRestrictionAttributes(e,t){const{restrictionAttributeNames:i}=t;return null==i?null:i.map((e=>me.fromJSON(e)))}writeRestrictionAttributes(e,t,i){null!=e&&(t[i]=e.map((e=>me.toJSON(e))))}};(0,r._)([(0,v.MZ)({type:[Object],json:{write:!0}})],Ae.prototype,"attributeParameterValues",void 0),(0,r._)([(0,v.MZ)({type:String,json:{write:!0}})],Ae.prototype,"description",void 0),(0,r._)([(0,$.e)(pe,{ignoreUnknown:!1})],Ae.prototype,"distanceAttributeName",void 0),(0,r._)([(0,v.MZ)({type:String,json:{write:!0}})],Ae.prototype,"id",void 0),(0,r._)([(0,g.w)("id",["id","itemId"])],Ae.prototype,"readId",null),(0,r._)([(0,$.e)(ce,{ignoreUnknown:!1})],Ae.prototype,"impedanceAttributeName",void 0),(0,r._)([(0,v.MZ)({type:String,json:{write:!0}})],Ae.prototype,"name",void 0),(0,r._)([(0,v.MZ)({type:[String],json:{write:!0}})],Ae.prototype,"restrictionAttributeNames",void 0),(0,r._)([(0,g.w)("restrictionAttributeNames")],Ae.prototype,"readRestrictionAttributes",null),(0,r._)([(0,w.K)("restrictionAttributeNames")],Ae.prototype,"writeRestrictionAttributes",null),(0,r._)([(0,v.MZ)({type:Number,json:{write:{allowNull:!0}}})],Ae.prototype,"simplificationTolerance",void 0),(0,r._)([(0,$.e)(z)],Ae.prototype,"simplificationToleranceUnits",void 0),(0,r._)([(0,$.e)(de,{ignoreUnknown:!1})],Ae.prototype,"timeAttributeName",void 0),(0,r._)([(0,$.e)(ee)],Ae.prototype,"type",void 0),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],Ae.prototype,"useHierarchy",void 0),(0,r._)([(0,$.e)(Q)],Ae.prototype,"uturnAtJunctions",void 0),Ae=(0,r._)([(0,T.$)("esri.rest.support.TravelMode")],Ae);const _e=Ae;let Me=class extends C.oY{constructor(e){super(e),this.accumulateAttributeNames=null,this.attributeParameterValues=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}readAccumulateAttributes(e){return null==e?null:e.map((e=>ce.fromJSON(e)))}writeAccumulateAttributes(e,t,i){e?.length&&(t[i]=e.map((e=>ce.toJSON(e))))}get capabilities(){return{supportsNow:(this.currentVersion??10)>=10.81}}readDefaultTravelMode(e,t){const i=t.supportedTravelModes?.find((({id:e})=>e===t.defaultTravelMode))??t.supportedTravelModes?.find((({itemId:e})=>e===t.defaultTravelMode));return i?_e.fromJSON(i):null}};(0,r._)([(0,v.MZ)()],Me.prototype,"accumulateAttributeNames",void 0),(0,r._)([(0,g.w)("accumulateAttributeNames")],Me.prototype,"readAccumulateAttributes",null),(0,r._)([(0,w.K)("accumulateAttributeNames")],Me.prototype,"writeAccumulateAttributes",null),(0,r._)([(0,v.MZ)()],Me.prototype,"attributeParameterValues",void 0),(0,r._)([(0,v.MZ)()],Me.prototype,"capabilities",null),(0,r._)([(0,v.MZ)()],Me.prototype,"currentVersion",void 0),(0,r._)([(0,v.MZ)()],Me.prototype,"defaultTravelMode",void 0),(0,r._)([(0,g.w)("defaultTravelMode",["defaultTravelMode","supportedTravelModes"])],Me.prototype,"readDefaultTravelMode",null),(0,r._)([(0,v.MZ)()],Me.prototype,"directionsLanguage",void 0),(0,r._)([(0,$.e)(K)],Me.prototype,"directionsLengthUnits",void 0),(0,r._)([(0,v.MZ)()],Me.prototype,"directionsSupportedLanguages",void 0),(0,r._)([(0,$.e)(de,{ignoreUnknown:!1})],Me.prototype,"directionsTimeAttribute",void 0),(0,r._)([(0,v.MZ)()],Me.prototype,"hasZ",void 0),(0,r._)([(0,$.e)(ce,{ignoreUnknown:!1})],Me.prototype,"impedance",void 0),(0,r._)([(0,v.MZ)({type:we})],Me.prototype,"networkDataset",void 0),(0,r._)([(0,v.MZ)({type:[_e]})],Me.prototype,"supportedTravelModes",void 0),Me=(0,r._)([(0,T.$)("esri.rest.support.NetworkServiceDescription")],Me);const Ne=Me;function Oe(e,t,i,r){r[i]=[t.length,t.length+e.length],e.forEach((e=>{t.push(e.geometry)}))}async function Ie(e,t,i){if(!e)throw new d.A("network-service:missing-url","Url to Network service is missing");const r=(0,G.jV)({f:"json",token:t},i),{data:o}=await(0,W.A)(e,r),s=o.currentVersion>=10.4?async function(e,t,i){try{const r=(0,G.jV)({f:"json",token:t},i),o=(0,b.UC)(e)+"/retrieveTravelModes",{data:{supportedTravelModes:s,defaultTravelMode:n}}=await(0,W.A)(o,r);return{supportedTravelModes:s,defaultTravelMode:n}}catch(e){throw new d.A("network-service:retrieveTravelModes","Could not get to the NAServer's retrieveTravelModes.",{error:e})}}(e,t,i):async function(e,t){const i=(0,G.jV)({f:"json"},t),{data:r}=await(0,W.A)(e.replace(/\/rest\/.*$/i,"/info"),i);if(!r?.owningSystemUrl)return{supportedTravelModes:[],defaultTravelMode:null};const{owningSystemUrl:o}=r,s=(0,b.UC)(o)+"/sharing/rest/portals/self",{data:n}=await(0,W.A)(s,i),a=(0,m.wc)("helperServices.routingUtilities.url",n);if(!a)return{supportedTravelModes:[],defaultTravelMode:null};const l=(0,G.Dl)(o),u=/\/solve$/i.test(l.path)?"Route":/\/solveclosestfacility$/i.test(l.path)?"ClosestFacility":"ServiceAreas",p=(0,G.jV)({f:"json",serviceName:u},t),d=(0,b.UC)(a)+"/GetTravelModes/execute",c=await(0,W.A)(d,p),y=[];let f=null;if(c?.data?.results?.length){const e=c.data.results;for(const t of e)if("supportedTravelModes"===t.paramName){if(t.value?.features)for(const{attributes:e}of t.value.features)if(e){const t=JSON.parse(e.TravelMode);y.push(t)}}else"defaultTravelMode"===t.paramName&&(f=t.value)}return{supportedTravelModes:y,defaultTravelMode:f}}(e,i),{defaultTravelMode:n,supportedTravelModes:a}=await s;return o.defaultTravelMode=n,o.supportedTravelModes=a,Ne.fromJSON(o)}var xe=i(16649),De=i(17136);function Fe(e,t){if(null==e)return null;const i={},r=new RegExp(`^${t}`,"i");for(const o of Object.keys(e))if(r.test(o)){const r=o.substring(t.length);i[ce.fromJSON(r)]=e[o]}return i}function Ze(e,t,i){if(null!=e){t.attributes||(t.attributes={});for(const r in e){const o=ce.toJSON(r);t.attributes[`${i}${o}`]=e[r]}}}function Ce(e){const t={};for(const i of Object.keys(e)){const r=i;t[ce.fromJSON(r)]=e[i]}return t}function je(e){const t={};for(const i of Object.keys(e)){const r=i;t[ce.toJSON(r)]=e[i]}return t}function Ee(e,t){return null==e||null==t?null:Math.round((e-t)/6e4)}function Be(e){const t=e.toJSON(),i=t;return i.accumulateAttributeNames&&=t.accumulateAttributeNames?.join(),i.attributeParameterValues&&=JSON.stringify(t.attributeParameterValues),i.barriers&&=JSON.stringify(t.barriers),i.outSR&&=t.outSR?.wkid,i.overrides&&=JSON.stringify(t.overrides),i.polygonBarriers&&=JSON.stringify(t.polygonBarriers),i.polylineBarriers&&=JSON.stringify(t.polylineBarriers),i.restrictionAttributeNames&&=t.restrictionAttributeNames?.join(),i.stops&&=JSON.stringify(t.stops),i.travelMode&&=JSON.stringify(t.travelMode),i}var Pe=i(22671),Re=i(4576);const Le=new q.J({esriJobMessageTypeInformative:"informative",esriJobMessageTypeProcessDefinition:"process-definition",esriJobMessageTypeProcessStart:"process-start",esriJobMessageTypeProcessStop:"process-stop",esriJobMessageTypeWarning:"warning",esriJobMessageTypeError:"error",esriJobMessageTypeEmpty:"empty",esriJobMessageTypeAbort:"abort"});let Ue=class extends C.oY{constructor(e){super(e),this.description=null,this.type=null}};(0,r._)([(0,v.MZ)({type:String,json:{write:!0}})],Ue.prototype,"description",void 0),(0,r._)([(0,v.MZ)({type:String,json:{read:Le.read,write:Le.write}})],Ue.prototype,"type",void 0),Ue=(0,r._)([(0,T.$)("esri.rest.support.GPMessage")],Ue);const ke=Ue,Je=new q.J({0:"informative",1:"process-definition",2:"process-start",3:"process-stop",50:"warning",100:"error",101:"empty",200:"abort"});let Ve=class extends ke{constructor(e){super(e),this.type=null}};(0,r._)([(0,v.MZ)({type:String,json:{read:Je.read,write:Je.write}})],Ve.prototype,"type",void 0),Ve=(0,r._)([(0,T.$)("esri.rest.support.NAMessage")],Ve);const We=Ve;let Ge=class extends C.oY{constructor(e){super(e)}};(0,r._)([(0,v.MZ)({json:{read:{source:"string"}}})],Ge.prototype,"text",void 0),(0,r._)([(0,$.e)(be,{name:"stringType"})],Ge.prototype,"type",void 0),Ge=(0,r._)([(0,T.$)("esri.rest.support.DirectionsString")],Ge);const $e=Ge;var qe=i(86738);let ze=class extends C.oY{constructor(e){super(e),this.arriveTime=null,this.arriveTimeOffset=null,this.geometry=null,this.strings=null}readArriveTimeOffset(e,t){return Ee(t.ETA,t.arriveTimeUTC)}readGeometry(e,t){return qe.A.fromJSON(t.point)}};(0,r._)([(0,v.MZ)({type:Date,json:{read:{source:"arriveTimeUTC"}}})],ze.prototype,"arriveTime",void 0),(0,r._)([(0,v.MZ)()],ze.prototype,"arriveTimeOffset",void 0),(0,r._)([(0,g.w)("arriveTimeOffset",["arriveTimeUTC","ETA"])],ze.prototype,"readArriveTimeOffset",null),(0,r._)([(0,v.MZ)({type:qe.A})],ze.prototype,"geometry",void 0),(0,r._)([(0,g.w)("geometry",["point"])],ze.prototype,"readGeometry",null),(0,r._)([(0,v.MZ)({type:[$e]})],ze.prototype,"strings",void 0),ze=(0,r._)([(0,T.$)("esri.rest.support.DirectionsEvent")],ze);const Ke=ze;var Ye=i(82799);let He=class extends n.A{constructor(e){super(e),this.events=null,this.strings=null}readGeometry(e,t){const i=function(e){if(null==e||""===e)return null;let t=0,i=0,r=0,o=0;const s=[];let n,a,l,u,p,d,c,m,y=0,f=0,h=0;if(p=e.match(/((\+|\-)[^\+\-\|]+|\|)/g),p||(p=[]),0===parseInt(p[y],32)){y=2;const e=parseInt(p[y],32);y++,d=parseInt(p[y],32),y++,1&e&&(f=p.indexOf("|")+1,c=parseInt(p[f],32),f++),2&e&&(h=p.indexOf("|",f)+1,m=parseInt(p[h],32),h++)}else d=parseInt(p[y],32),y++;for(;y<p.length&&"|"!==p[y];){n=parseInt(p[y],32)+t,y++,t=n,a=parseInt(p[y],32)+i,y++,i=a;const e=[n/d,a/d];f&&(u=parseInt(p[f],32)+r,f++,r=u,e.push(u/c)),h&&(l=parseInt(p[h],32)+o,h++,o=l,e.push(l/m)),s.push(e)}return{paths:[s],hasZ:f>0,hasM:h>0}}(t.compressedGeometry);return null!=i?Ye.A.fromJSON(i):null}};(0,r._)([(0,v.MZ)({type:[Ke]})],He.prototype,"events",void 0),(0,r._)([(0,g.w)("geometry",["compressedGeometry"])],He.prototype,"readGeometry",null),(0,r._)([(0,v.MZ)({type:[$e]})],He.prototype,"strings",void 0),He=(0,r._)([(0,T.$)("esri.rest.support.DirectionsFeature")],He);const Xe=He;var Qe=i(16930);let et=class extends Pe.A{constructor(e){super(e),this.extent=null,this.features=[],this.geometryType="polyline",this.routeId=null,this.routeName=null,this.totalDriveTime=null,this.totalLength=null,this.totalTime=null}readFeatures(e,t){if(!e)return[];const i=t.summary.envelope.spatialReference??t.spatialReference,r=i&&Qe.A.fromJSON(i);return e.map((e=>{const t=Xe.fromJSON(e);if(null!=t.geometry&&(t.geometry.spatialReference=r),null!=t.events)for(const e of t.events)null!=e.geometry&&(e.geometry.spatialReference=r);return t}))}get mergedGeometry(){return this.features?function(e,t){if(0===e.length)return new Ye.A({spatialReference:t});const i=[];for(const t of e)for(const e of t.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:o,hasZ:s}=e[0];return new Ye.A({hasM:o,hasZ:s,paths:[r],spatialReference:t})}(this.features.map((({geometry:e})=>e)),this.extent.spatialReference):null}get strings(){return this.features.flatMap((({strings:e})=>e)).filter(Re.Ru)}};(0,r._)([(0,v.MZ)({type:A.A,json:{read:{source:"summary.envelope"}}})],et.prototype,"extent",void 0),(0,r._)([(0,v.MZ)({nonNullable:!0})],et.prototype,"features",void 0),(0,r._)([(0,g.w)("features")],et.prototype,"readFeatures",null),(0,r._)([(0,v.MZ)()],et.prototype,"geometryType",void 0),(0,r._)([(0,v.MZ)({readOnly:!0})],et.prototype,"mergedGeometry",null),(0,r._)([(0,v.MZ)()],et.prototype,"routeId",void 0),(0,r._)([(0,v.MZ)()],et.prototype,"routeName",void 0),(0,r._)([(0,v.MZ)({value:null,readOnly:!0})],et.prototype,"strings",null),(0,r._)([(0,v.MZ)({json:{read:{source:"summary.totalDriveTime"}}})],et.prototype,"totalDriveTime",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"summary.totalLength"}}})],et.prototype,"totalLength",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"summary.totalTime"}}})],et.prototype,"totalTime",void 0),et=(0,r._)([(0,T.$)("esri.rest.support.DirectionsFeatureSet")],et);const tt=et;let it=class extends C.oY{constructor(e){super(e),this.directionLines=null,this.directionPoints=null,this.directions=null,this.route=null,this.routeName=null,this.stops=null,this.traversedEdges=null,this.traversedJunctions=null,this.traversedTurns=null}};(0,r._)([(0,v.MZ)({type:Pe.A,json:{write:!0}})],it.prototype,"directionLines",void 0),(0,r._)([(0,v.MZ)({type:Pe.A,json:{write:!0}})],it.prototype,"directionPoints",void 0),(0,r._)([(0,v.MZ)({type:tt,json:{write:!0}})],it.prototype,"directions",void 0),(0,r._)([(0,v.MZ)({type:n.A,json:{write:!0}})],it.prototype,"route",void 0),(0,r._)([(0,v.MZ)({type:String,json:{write:!0}})],it.prototype,"routeName",void 0),(0,r._)([(0,v.MZ)({type:[n.A],json:{write:!0}})],it.prototype,"stops",void 0),(0,r._)([(0,v.MZ)({type:Pe.A,json:{write:!0}})],it.prototype,"traversedEdges",void 0),(0,r._)([(0,v.MZ)({type:Pe.A,json:{write:!0}})],it.prototype,"traversedJunctions",void 0),(0,r._)([(0,v.MZ)({type:Pe.A,json:{write:!0}})],it.prototype,"traversedTurns",void 0),it=(0,r._)([(0,T.$)("esri.rest.support.RouteResult")],it);const rt=it;function ot(e){return e?Pe.A.fromJSON(e).features.filter(Re.Ru):[]}let st=class extends C.oY{constructor(e){super(e),this.messages=null,this.pointBarriers=null,this.polylineBarriers=null,this.polygonBarriers=null,this.routeResults=null}readPointBarriers(e,t){return ot(t.barriers)}readPolylineBarriers(e){return ot(e)}readPolygonBarriers(e){return ot(e)}};(0,r._)([(0,v.MZ)({type:[We]})],st.prototype,"messages",void 0),(0,r._)([(0,v.MZ)({type:[n.A]})],st.prototype,"pointBarriers",void 0),(0,r._)([(0,g.w)("pointBarriers",["barriers"])],st.prototype,"readPointBarriers",null),(0,r._)([(0,v.MZ)({type:[n.A]})],st.prototype,"polylineBarriers",void 0),(0,r._)([(0,g.w)("polylineBarriers")],st.prototype,"readPolylineBarriers",null),(0,r._)([(0,v.MZ)({type:[n.A]})],st.prototype,"polygonBarriers",void 0),(0,r._)([(0,g.w)("polygonBarriers")],st.prototype,"readPolygonBarriers",null),(0,r._)([(0,v.MZ)({type:[rt]})],st.prototype,"routeResults",void 0),st=(0,r._)([(0,T.$)("esri.rest.support.RouteSolveResult")],st);const nt=st;function at(e){return e instanceof Pe.A}async function lt(e,t,i){const r=[],o=[],s={},n={},a=(0,G.Dl)(e),{path:l}=a;at(t.stops)&&Oe(t.stops.features,o,"stops.features",s),at(t.pointBarriers)&&Oe(t.pointBarriers.features,o,"pointBarriers.features",s),at(t.polylineBarriers)&&Oe(t.polylineBarriers.features,o,"polylineBarriers.features",s),at(t.polygonBarriers)&&Oe(t.polygonBarriers.features,o,"polygonBarriers.features",s);const p=await(0,De.el)(o);for(const e in s){const t=s[e];r.push(e),n[e]=p.slice(t[0],t[1])}if(function(e,t){for(let i=0;i<t.length;i++){const r=e[t[i]];if(r&&r.length)for(const e of r)if(null!=e&&e.hasZ)return!0}return!1}(n,r)){let e=null;try{e=await Ie(l,t.apiKey,i)}catch{}e&&!e.hasZ&&function(e,t){for(let i=0;i<t.length;i++){const r=e[t[i]];if(r&&r.length)for(const e of r)e.z=void 0}u.A.getLogger("esri.rest.networkService").warnOnce("The remote Network Analysis service is powered by a network dataset which is not Z-aware.\nZ-coordinates of the input geometry are ignored.")}(n,r)}for(const e in n)n[e].forEach(((i,r)=>{(0,xe.Jt)(t,e)[r].geometry=i}));const d={...i,query:{...a.query,...Be(t),f:"json"}},c=l.endsWith("/solve")?l:`${l}/solve`,{data:m}=await(0,W.A)(c,d);return function(e){const{barriers:t,directionLines:i,directionPoints:r,directions:o,messages:s,polygonBarriers:n,polylineBarriers:a,routes:l,stops:u,traversedEdges:p,traversedJunctions:d,traversedTurns:c}=e,m=e=>{const t=f.find((t=>t.routeName===e));if(null!=t)return t;const i={routeId:f.length+1,routeName:e};return f.push(i),i},y=e=>{const t=f.find((t=>t.routeId===e));if(null!=t)return t;const i={routeId:e,routeName:null};return f.push(i),i},f=[];l?.features.forEach(((e,t)=>{e.geometry.spatialReference=l.spatialReference??void 0;const i=e.attributes.Name,r=t+1;f.push({routeId:r,routeName:i,route:e})})),o?.forEach((e=>{const{routeName:t}=e;m(t).directions=e}));const h=u?.features.every((e=>null==e.attributes.RouteName))&&f.length>0?f[0].routeName:null;return u?.features.forEach((e=>{e.geometry&&(e.geometry.spatialReference??=u.spatialReference??void 0);const t=h??e.attributes.RouteName,i=m(t);i.stops??=[],i.stops.push(e)})),i?.features.forEach((e=>{const t=e.attributes.RouteID,r=y(t),{geometryType:o,spatialReference:s}=i;r.directionLines??={features:[],geometryType:o,spatialReference:s},r.directionLines.features.push(e)})),r?.features.forEach((e=>{const t=e.attributes.RouteID,i=y(t),{geometryType:o,spatialReference:s}=r;i.directionPoints??={features:[],geometryType:o,spatialReference:s},i.directionPoints.features.push(e)})),p?.features.forEach((e=>{const t=e.attributes.RouteID,i=y(t),{geometryType:r,spatialReference:o}=p;i.traversedEdges??={features:[],geometryType:r,spatialReference:o},i.traversedEdges.features.push(e)})),d?.features.forEach((e=>{const t=e.attributes.RouteID,i=y(t),{geometryType:r,spatialReference:o}=d;i.traversedJunctions??={features:[],geometryType:r,spatialReference:o},i.traversedJunctions.features.push(e)})),c?.features.forEach((e=>{const t=e.attributes.RouteID,i=y(t);i.traversedTurns??={features:[]},i.traversedTurns.features.push(e)})),nt.fromJSON({routeResults:f,barriers:t,polygonBarriers:n,polylineBarriers:a,messages:s})}(m)}var ut;let pt=ut=class extends((0,Se.O)(C.oY)){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,this.type="direction-line"}static fromGraphic(e){return new ut({directionLineType:le.fromJSON(e.attributes.DirectionLineType),directionPointId:e.attributes.DirectionPointID,distance:e.attributes.Meters,duration:e.attributes.Minutes,fromLevel:e.attributes.FromLevel??null,geometry:e.geometry,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,symbol:e.symbol,toLevel:e.attributes.ToLevel??null})}toGraphic(){const e={ObjectID:this.objectId,DirectionLineType:null!=this.directionLineType?le.toJSON(this.directionLineType):null,DirectionPointID:this.directionPointId,Meters:this.distance,Minutes:this.duration};return null!=this.fromLevel&&(e.FromLevel=this.fromLevel),null!=this.toLevel&&(e.ToLevel=this.toLevel),new n.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};pt.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}],pt.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:[]},(0,r._)([(0,v.MZ)({type:le.apiValues,json:{read:{source:"attributes.DirectionLineType",reader:le.read}}})],pt.prototype,"directionLineType",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.DirectionPointID"}}})],pt.prototype,"directionPointId",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.Meters"}}})],pt.prototype,"distance",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.Minutes"}}})],pt.prototype,"duration",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.FromLevel"}}})],pt.prototype,"fromLevel",void 0),(0,r._)([(0,v.MZ)({type:Ye.A})],pt.prototype,"geometry",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.ObjectID"}}})],pt.prototype,"objectId",void 0),(0,r._)([(0,v.MZ)({type:a.A})],pt.prototype,"popupTemplate",void 0),(0,r._)([(0,v.MZ)({types:Z.Es})],pt.prototype,"symbol",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.ToLevel"}}})],pt.prototype,"toLevel",void 0),(0,r._)([(0,v.MZ)({readOnly:!0,json:{read:!1}})],pt.prototype,"type",void 0),pt=ut=(0,r._)([(0,T.$)("esri.rest.support.DirectionLine")],pt);const dt=pt;var ct;let mt=ct=class extends((0,Se.O)(C.oY)){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.type="direction-point",this.voiceInstruction=null}readArrivalTime(e,t){return null!=t.attributes.ArrivalTime?new Date(t.attributes.ArrivalTime):null}static fromGraphic(e){return new ct({alternateName:e.attributes.AlternateName??null,arrivalTime:null!=e.attributes.ArrivalTime?new Date(e.attributes.ArrivalTime):null,arrivalTimeOffset:e.attributes.ArrivalUTCOffset??null,azimuth:e.attributes.Azimuth??null,branchName:e.attributes.BranchName??null,directionPointType:ae.fromJSON(e.attributes.DirectionPointType),displayText:e.attributes.DisplayText??null,exitName:e.attributes.ExitName??null,geometry:e.geometry,intersectingName:e.attributes.IntersectingName??null,level:e.attributes.Level??null,name:e.attributes.Name??null,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,sequence:e.attributes.Sequence,shortVoiceInstruction:e.attributes.ShortVoiceInstruction??null,stopId:e.attributes.StopID??null,symbol:e.symbol,towardName:e.attributes.TowardName??null,voiceInstruction:e.attributes.VoiceInstruction??null})}toGraphic(){const e={ObjectID:this.objectId,DirectionPointType:null!=this.directionPointType?ae.toJSON(this.directionPointType):null,Sequence:this.sequence,StopID:this.stopId};return null!=this.alternateName&&(e.AlternateName=this.alternateName),null!=this.arrivalTime&&(e.ArrivalTime=this.arrivalTime.getTime()),null!=this.arrivalTimeOffset&&(e.ArrivalUTCOffset=this.arrivalTimeOffset),null!=this.azimuth&&(e.Azimuth=this.azimuth),null!=this.branchName&&(e.BranchName=this.branchName),null!=this.displayText&&(e.DisplayText=this.displayText),null!=this.exitName&&(e.ExitName=this.exitName),null!=this.intersectingName&&(e.IntersectingName=this.intersectingName),null!=this.level&&(e.Level=this.level),null!=this.name&&(e.Name=this.name),null!=this.shortVoiceInstruction&&(e.ShortVoiceInstruction=this.shortVoiceInstruction),null!=this.towardName&&(e.TowardName=this.towardName),null!=this.voiceInstruction&&(e.VoiceInstruction=this.voiceInstruction),new n.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};mt.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}],mt.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:[]},(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.AlternateName"}}})],mt.prototype,"alternateName",void 0),(0,r._)([(0,v.MZ)()],mt.prototype,"arrivalTime",void 0),(0,r._)([(0,g.w)("arrivalTime",["attributes.ArrivalTime"])],mt.prototype,"readArrivalTime",null),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.ArrivalUTCOffset"}}})],mt.prototype,"arrivalTimeOffset",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.Azimuth"}}})],mt.prototype,"azimuth",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.BranchName"}}})],mt.prototype,"branchName",void 0),(0,r._)([(0,v.MZ)({type:ae.apiValues,json:{read:{source:"attributes.DirectionPointType",reader:ae.read}}})],mt.prototype,"directionPointType",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.DisplayText"}}})],mt.prototype,"displayText",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.ExitName"}}})],mt.prototype,"exitName",void 0),(0,r._)([(0,v.MZ)({type:qe.A})],mt.prototype,"geometry",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.IntersectingName"}}})],mt.prototype,"intersectingName",void 0),(0,r._)([(0,v.MZ)()],mt.prototype,"level",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.Name"}}})],mt.prototype,"name",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.ObjectID"}}})],mt.prototype,"objectId",void 0),(0,r._)([(0,v.MZ)({type:a.A})],mt.prototype,"popupTemplate",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.Sequence"}}})],mt.prototype,"sequence",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.ShortVoiceInstruction"}}})],mt.prototype,"shortVoiceInstruction",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.StopID"}}})],mt.prototype,"stopId",void 0),(0,r._)([(0,v.MZ)({types:Z.Es})],mt.prototype,"symbol",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.TowardName"}}})],mt.prototype,"towardName",void 0),(0,r._)([(0,v.MZ)({readOnly:!0,json:{read:!1}})],mt.prototype,"type",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.VoiceInstruction"}}})],mt.prototype,"voiceInstruction",void 0),mt=ct=(0,r._)([(0,T.$)("esri.rest.support.DirectionPoint")],mt);const yt=mt;var ft;let ht=ft=class extends((0,Se.O)(C.oY)){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,this.type="point-barrier"}readCosts(e,t){return Fe(t.attributes,"Attr_")}writeCosts(e,t){Ze(e,t,"Attr_")}static fromGraphic(e){return new ft({addedCost:e.attributes.AddedCost??null,barrierType:null!=e.attributes.BarrierType?se.fromJSON(e.attributes.BarrierType):null,costs:null!=e.attributes.Costs?Ce(JSON.parse(e.attributes.Costs)):null,curbApproach:null!=e.attributes.CurbApproach?te.fromJSON(e.attributes.CurbApproach):null,fullEdge:null!=e.attributes.FullEdge?ne.fromJSON(e.attributes.FullEdge):null,geometry:e.geometry,name:e.attributes.Name??null,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,status:null!=e.attributes.Status?re.fromJSON(e.attributes.Status):null,symbol:e.symbol})}toGraphic(){const e={ObjectID:this.objectId,AddedCost:this.addedCost,BarrierType:null!=this.barrierType?se.toJSON(this.barrierType):null,Costs:null!=this.costs?JSON.stringify(je(this.costs)):null,CurbApproach:null!=this.curbApproach?te.toJSON(this.curbApproach):null,FullEdge:null!=this.fullEdge?ne.toJSON(this.fullEdge):null,Name:this.name,Status:null!=this.status?re.toJSON(this.status):null};return new n.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};ht.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}]}}],ht.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:[]},(0,r._)([(0,v.MZ)()],ht.prototype,"addedCost",void 0),(0,r._)([(0,v.MZ)({type:se.apiValues,json:{name:"attributes.BarrierType",read:{reader:se.read},write:{writer:se.write}}})],ht.prototype,"barrierType",void 0),(0,r._)([(0,v.MZ)()],ht.prototype,"costs",void 0),(0,r._)([(0,g.w)("costs",["attributes"])],ht.prototype,"readCosts",null),(0,r._)([(0,w.K)("costs")],ht.prototype,"writeCosts",null),(0,r._)([(0,v.MZ)({constructOnly:!0,type:te.apiValues,json:{read:{source:"attributes.CurbApproach",reader:te.read}}})],ht.prototype,"curbApproach",void 0),(0,r._)([(0,v.MZ)({type:ne.apiValues,json:{name:"attributes.FullEdge",read:{reader:ne.read},write:{writer:ne.write}}})],ht.prototype,"fullEdge",void 0),(0,r._)([(0,v.MZ)({type:qe.A,json:{write:!0}})],ht.prototype,"geometry",void 0),(0,r._)([(0,v.MZ)({json:{name:"attributes.Name"}})],ht.prototype,"name",void 0),(0,r._)([(0,v.MZ)({json:{name:"attributes.ObjectID"}})],ht.prototype,"objectId",void 0),(0,r._)([(0,v.MZ)({type:a.A})],ht.prototype,"popupTemplate",void 0),(0,r._)([(0,v.MZ)({type:oe.apiValues,json:{read:{source:"attributes.SideOfEdge",reader:oe.read}}})],ht.prototype,"sideOfEdge",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.SourceID"}}})],ht.prototype,"sourceId",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.SourceOID"}}})],ht.prototype,"sourceOid",void 0),(0,r._)([(0,v.MZ)({type:re.apiValues,json:{read:{source:"attributes.Status",reader:re.read}}})],ht.prototype,"status",void 0),(0,r._)([(0,v.MZ)({types:Z.Es})],ht.prototype,"symbol",void 0),(0,r._)([(0,v.MZ)({readOnly:!0,json:{read:!1}})],ht.prototype,"type",void 0),ht=ft=(0,r._)([(0,T.$)("esri.rest.support.PointBarrier")],ht);const bt=ht;var vt,gt=i(39829);let Tt=vt=class extends((0,Se.O)(C.oY)){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,this.type="polygon-barrier"}readCosts(e,t){return Fe(t.attributes,"Attr_")}writeCosts(e,t){Ze(e,t,"Attr_")}static fromGraphic(e){return new vt({barrierType:null!=e.attributes.BarrierType?se.fromJSON(e.attributes.BarrierType):null,costs:null!=e.attributes.Costs?Ce(JSON.parse(e.attributes.Costs)):null,geometry:e.geometry,name:e.attributes.Name??null,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,scaleFactor:e.attributes.ScaleFactor??null,symbol:e.symbol})}toGraphic(){const e={ObjectID:this.objectId,BarrierType:null!=this.barrierType?se.toJSON(this.barrierType):null,Costs:null!=this.costs?JSON.stringify(je(this.costs)):null,Name:this.name??null,ScaleFactor:this.scaleFactor??null};return new n.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};Tt.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}],Tt.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:[]},(0,r._)([(0,v.MZ)({type:se.apiValues,json:{name:"attributes.BarrierType",read:{reader:se.read},write:{writer:se.write}}})],Tt.prototype,"barrierType",void 0),(0,r._)([(0,v.MZ)()],Tt.prototype,"costs",void 0),(0,r._)([(0,g.w)("costs",["attributes"])],Tt.prototype,"readCosts",null),(0,r._)([(0,w.K)("costs")],Tt.prototype,"writeCosts",null),(0,r._)([(0,v.MZ)({type:gt.A,json:{write:!0}})],Tt.prototype,"geometry",void 0),(0,r._)([(0,v.MZ)({json:{name:"attributes.Name"}})],Tt.prototype,"name",void 0),(0,r._)([(0,v.MZ)({json:{name:"attributes.ObjectID"}})],Tt.prototype,"objectId",void 0),(0,r._)([(0,v.MZ)({type:a.A})],Tt.prototype,"popupTemplate",void 0),(0,r._)([(0,v.MZ)()],Tt.prototype,"scaleFactor",void 0),(0,r._)([(0,v.MZ)({types:Z.Es})],Tt.prototype,"symbol",void 0),(0,r._)([(0,v.MZ)({readOnly:!0,json:{read:!1}})],Tt.prototype,"type",void 0),Tt=vt=(0,r._)([(0,T.$)("esri.rest.support.PolygonBarrier")],Tt);const wt=Tt;var St;let At=St=class extends((0,Se.O)(C.oY)){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,this.type="polyline-barrier"}readCosts(e,t){return Fe(t.attributes,"Attr_")}static fromGraphic(e){return new St({barrierType:null!=e.attributes.BarrierType?se.fromJSON(e.attributes.BarrierType):null,costs:null!=e.attributes.Costs?Ce(JSON.parse(e.attributes.Costs)):null,geometry:e.geometry,name:e.attributes.Name??null,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,scaleFactor:e.attributes.ScaleFactor??null,symbol:e.symbol})}toGraphic(){const e={ObjectID:this.objectId,BarrierType:null!=this.barrierType?se.toJSON(this.barrierType):null,Costs:null!=this.costs?JSON.stringify(je(this.costs)):null,Name:this.name,ScaleFactor:this.scaleFactor};return new n.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};At.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}],At.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:[]},(0,r._)([(0,v.MZ)({type:se.apiValues,json:{read:{source:"attributes.BarrierType",reader:se.read}}})],At.prototype,"barrierType",void 0),(0,r._)([(0,v.MZ)()],At.prototype,"costs",void 0),(0,r._)([(0,g.w)("costs",["attributes"])],At.prototype,"readCosts",null),(0,r._)([(0,v.MZ)({type:Ye.A,json:{write:!0}})],At.prototype,"geometry",void 0),(0,r._)([(0,v.MZ)({json:{name:"attributes.Name"}})],At.prototype,"name",void 0),(0,r._)([(0,v.MZ)({json:{name:"attributes.ObjectID"}})],At.prototype,"objectId",void 0),(0,r._)([(0,v.MZ)({type:a.A})],At.prototype,"popupTemplate",void 0),(0,r._)([(0,v.MZ)()],At.prototype,"scaleFactor",void 0),(0,r._)([(0,v.MZ)({types:Z.Es})],At.prototype,"symbol",void 0),(0,r._)([(0,v.MZ)({readOnly:!0,json:{read:!1}})],At.prototype,"type",void 0),At=St=(0,r._)([(0,T.$)("esri.rest.support.PolylineBarrier")],At);const _t=At;let Mt=class extends C.oY{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}readAccumulateAttributes(e){return null==e?null:e.map((e=>ce.fromJSON(e)))}writeAccumulateAttributes(e,t,i){e?.length&&(t[i]=e.map((e=>ce.toJSON(e))))}};(0,r._)([(0,v.MZ)({type:[String],json:{name:"accumulateAttributeNames",write:!0}})],Mt.prototype,"accumulateAttributes",void 0),(0,r._)([(0,g.w)("accumulateAttributes")],Mt.prototype,"readAccumulateAttributes",null),(0,r._)([(0,w.K)("accumulateAttributes")],Mt.prototype,"writeAccumulateAttributes",null),(0,r._)([(0,v.MZ)({type:String,json:{write:!0}})],Mt.prototype,"directionsLanguage",void 0),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],Mt.prototype,"findBestSequence",void 0),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],Mt.prototype,"preserveFirstStop",void 0),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],Mt.prototype,"preserveLastStop",void 0),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],Mt.prototype,"startTimeIsUTC",void 0),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],Mt.prototype,"timeWindowsAreUTC",void 0),(0,r._)([(0,v.MZ)({type:_e,json:{write:!0}})],Mt.prototype,"travelMode",void 0),Mt=(0,r._)([(0,T.$)("esri.rest.support.RouteSettings")],Mt);const Nt=Mt;var Ot;let It=Ot=class extends((0,Se.O)(C.oY)){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.type="route-info",this.version="1.0.0"}readEndTime(e,t){return null!=t.attributes.EndTimeUTC?new Date(t.attributes.EndTimeUTC):null}readEndTimeOffset(e,t){return Ee(t.attributes.EndTime,t.attributes.EndTimeUTC)}readStartTime(e,t){return null!=t.attributes.StartTimeUTC?new Date(t.attributes.StartTimeUTC):null}readStartTimeOffset(e,t){return Ee(t.attributes.StartTime,t.attributes.StartTimeUTC)}readTotalCosts(e,t){return Fe(t.attributes,"Total_")}readTotalViolations(e,t){return Fe(t.attributes,"TotalViolation_")}readTotalWait(e,t){return Fe(t.attributes,"TotalWait_")}static fromGraphic(e){return new Ot({analysisSettings:null!=e.attributes.AnalysisSettings?Nt.fromJSON(JSON.parse(e.attributes.AnalysisSettings)):null,endTime:null!=e.attributes.EndTime?new Date(e.attributes.EndTime):null,endTimeOffset:e.attributes.EndUTCOffset??null,geometry:e.geometry,messages:null!=e.attributes.Messages?JSON.parse(e.attributes.Messages):null,name:e.attributes.RouteName,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,startTime:null!=e.attributes.StartTime?new Date(e.attributes.StartTime):null,startTimeOffset:e.attributes.StartUTCOffset??null,symbol:e.symbol,totalCosts:null!=e.attributes.TotalCosts?Ce(JSON.parse(e.attributes.TotalCosts)):null,totalDistance:e.attributes.TotalMeters??null,totalDuration:e.attributes.TotalMinutes??null,totalLateDuration:e.attributes.TotalLateMinutes??null,totalWaitDuration:e.attributes.TotalWaitMinutes??null,version:e.attributes.Version})}toGraphic(){const e={ObjectID:this.objectId,AnalysisSettings:null!=this.analysisSettings?JSON.stringify(this.analysisSettings.toJSON()):null,EndTime:null!=this.endTime?this.endTime.getTime():null,EndUTCOffset:this.endTimeOffset,Messages:null!=this.messages?JSON.stringify(this.messages):null,RouteName:this.name,StartTime:null!=this.startTime?this.startTime.getTime():null,StartUTCOffset:this.startTimeOffset,TotalCosts:null!=this.totalCosts?JSON.stringify(je(this.totalCosts)):null,TotalLateMinutes:this.totalLateDuration,TotalMeters:this.totalDistance,TotalMinutes:this.totalDuration,TotalWaitMinutes:this.totalWaitDuration,Version:this.version};return new n.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};It.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}],It.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:[]},(0,r._)([(0,v.MZ)()],It.prototype,"analysisSettings",void 0),(0,r._)([(0,v.MZ)()],It.prototype,"endTime",void 0),(0,r._)([(0,g.w)("endTime",["attributes.EndTimeUTC"])],It.prototype,"readEndTime",null),(0,r._)([(0,v.MZ)()],It.prototype,"endTimeOffset",void 0),(0,r._)([(0,g.w)("endTimeOffset",["attributes.EndTime","attributes.EndTimeUTC"])],It.prototype,"readEndTimeOffset",null),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.FirstStopID"}}})],It.prototype,"firstStopId",void 0),(0,r._)([(0,v.MZ)({type:Ye.A})],It.prototype,"geometry",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.LastStopID"}}})],It.prototype,"lastStopId",void 0),(0,r._)([(0,v.MZ)()],It.prototype,"messages",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.Name"}}})],It.prototype,"name",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.ObjectID"}}})],It.prototype,"objectId",void 0),(0,r._)([(0,v.MZ)({type:a.A})],It.prototype,"popupTemplate",void 0),(0,r._)([(0,v.MZ)()],It.prototype,"startTime",void 0),(0,r._)([(0,g.w)("startTime",["attributes.StartTimeUTC"])],It.prototype,"readStartTime",null),(0,r._)([(0,v.MZ)()],It.prototype,"startTimeOffset",void 0),(0,r._)([(0,g.w)("startTimeOffset",["attributes.StartTime","attributes.StartTimeUTC"])],It.prototype,"readStartTimeOffset",null),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.StopCount"}}})],It.prototype,"stopCount",void 0),(0,r._)([(0,v.MZ)({types:Z.Es})],It.prototype,"symbol",void 0),(0,r._)([(0,v.MZ)()],It.prototype,"totalCosts",void 0),(0,r._)([(0,g.w)("totalCosts",["attributes"])],It.prototype,"readTotalCosts",null),(0,r._)([(0,v.MZ)()],It.prototype,"totalDistance",void 0),(0,r._)([(0,v.MZ)()],It.prototype,"totalDuration",void 0),(0,r._)([(0,v.MZ)()],It.prototype,"totalLateDuration",void 0),(0,r._)([(0,v.MZ)()],It.prototype,"totalViolations",void 0),(0,r._)([(0,g.w)("totalViolations",["attributes"])],It.prototype,"readTotalViolations",null),(0,r._)([(0,v.MZ)()],It.prototype,"totalWait",void 0),(0,r._)([(0,g.w)("totalWait",["attributes"])],It.prototype,"readTotalWait",null),(0,r._)([(0,v.MZ)()],It.prototype,"totalWaitDuration",void 0),(0,r._)([(0,v.MZ)({readOnly:!0,json:{read:!1}})],It.prototype,"type",void 0),(0,r._)([(0,v.MZ)()],It.prototype,"version",void 0),It=Ot=(0,r._)([(0,T.$)("esri.rest.support.RouteInfo")],It);const xt=It;var Dt=i(56507);const Ft={type:String,json:{read:{source:"token"},write:{target:"token"}}};var Zt=i(65864);let Ct=class extends((0,Se.O)(C.oY)){constructor(e){super(e),this.doNotLocateOnRestrictedElements=null,this.geometry=null,this.geometryType=null,this.name=null,this.spatialRelationship=null,this.type="layer",this.where=null}};(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],Ct.prototype,"doNotLocateOnRestrictedElements",void 0),(0,r._)([(0,v.MZ)({types:s.yR,json:{read:Zt.rS,write:!0}})],Ct.prototype,"geometry",void 0),(0,r._)([(0,$.e)(fe)],Ct.prototype,"geometryType",void 0),(0,r._)([(0,v.MZ)({type:String,json:{name:"layerName",write:!0}})],Ct.prototype,"name",void 0),(0,r._)([(0,$.e)(ye,{name:"spatialRel"})],Ct.prototype,"spatialRelationship",void 0),(0,r._)([(0,v.MZ)({type:String,json:{write:!0}})],Ct.prototype,"type",void 0),(0,r._)([(0,v.MZ)({type:String,json:{write:!0}})],Ct.prototype,"where",void 0),Ct=(0,r._)([(0,T.$)("esri.rest.support.DataLayer")],Ct);const jt=Ct;var Et;let Bt=Et=class extends Pe.A{constructor(e){super(e),this.doNotLocateOnRestrictedElements=null}clone(){return new Et({doNotLocateOnRestrictedElements:this.doNotLocateOnRestrictedElements,...this.cloneProperties()})}};(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],Bt.prototype,"doNotLocateOnRestrictedElements",void 0),Bt=Et=(0,r._)([(0,T.$)("esri.rest.support.NetworkFeatureSet")],Bt);const Pt=Bt;let Rt=class extends((0,Se.O)(C.oY)){constructor(e){super(e),this.doNotLocateOnRestrictedElements=null,this.url=null}};(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],Rt.prototype,"doNotLocateOnRestrictedElements",void 0),(0,r._)([(0,v.MZ)({type:String,json:{write:!0}})],Rt.prototype,"url",void 0),Rt=(0,r._)([(0,T.$)("esri.rest.support.NetworkUrl")],Rt);const Lt=Rt;var Ut;let kt=Ut=class extends((0,Se.O)(C.oY)){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.geometryPrecision=null,this.geometryPrecisionM=null,this.geometryPrecisionZ=null,this.ignoreInvalidLocations=null,this.impedanceAttribute=null,this.outputGeometryPrecision=null,this.outputGeometryPrecisionUnits=null,this.outputLines="true-shape",this.outSpatialReference=null,this.overrides=null,this.pointBarriers=null,this.polygonBarriers=null,this.polylineBarriers=null,this.preserveFirstStop=null,this.preserveLastStop=null,this.preserveObjectID=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.returnTraversedEdges=null,this.returnTraversedJunctions=null,this.returnTraversedTurns=null,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(0,Dt.PZ)(Ut,e)}readAccumulateAttributes(e){return null==e?null:e.map((e=>ce.fromJSON(e)))}writeAccumulateAttributes(e,t,i){e?.length&&(t[i]=e.map((e=>ce.toJSON(e))))}writePointBarriers(e,t,i){Vt(e,t,i)}writePolygonBarrier(e,t,i){Vt(e,t,i)}writePolylineBarrier(e,t,i){Vt(e,t,i)}readRestrictionAttributes(e){return null==e?null:e.map((e=>me.fromJSON(e)))}writeRestrictionAttributes(e,t,i){e?.length&&(t[i]=e.map((e=>me.toJSON(e))))}readStartTime(e,t){const{startTime:i}=t;return null==i?null:"now"===i?"now":new Date(i)}writeStartTime(e,t){null!=e&&(t.startTime="now"===e?"now":e.getTime())}readStops(e,t){return function(e){return function(e){return e&&"type"in e}(e)?jt.fromJSON(e):function(e){return e&&"url"in e}(e)?Lt.fromJSON(e):function(e){return e&&"features"in e&&"doNotLocateOnRestrictedElements"in e}(e)?Pt.fromJSON(e):function(e){return e&&"features"in e}(e)?Pe.A.fromJSON(e):null}(t.stops)}writeStops(e,t,i){Vt(e,t,i)}};(0,r._)([(0,v.MZ)({type:[String],json:{name:"accumulateAttributeNames",write:!0}})],kt.prototype,"accumulateAttributes",void 0),(0,r._)([(0,g.w)("accumulateAttributes")],kt.prototype,"readAccumulateAttributes",null),(0,r._)([(0,w.K)("accumulateAttributes")],kt.prototype,"writeAccumulateAttributes",null),(0,r._)([(0,v.MZ)(Ft)],kt.prototype,"apiKey",void 0),(0,r._)([(0,v.MZ)({json:{write:!0}})],kt.prototype,"attributeParameterValues",void 0),(0,r._)([(0,v.MZ)({type:String,json:{write:!0}})],kt.prototype,"directionsLanguage",void 0),(0,r._)([(0,$.e)(K)],kt.prototype,"directionsLengthUnits",void 0),(0,r._)([(0,$.e)(H)],kt.prototype,"directionsOutputType",void 0),(0,r._)([(0,$.e)(ue)],kt.prototype,"directionsStyleName",void 0),(0,r._)([(0,$.e)(de,{name:"directionsTimeAttributeName",ignoreUnknown:!1})],kt.prototype,"directionsTimeAttribute",void 0),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],kt.prototype,"findBestSequence",void 0),(0,r._)([(0,v.MZ)({type:Number,json:{write:!0}})],kt.prototype,"geometryPrecision",void 0),(0,r._)([(0,v.MZ)({type:Number,json:{write:!0}})],kt.prototype,"geometryPrecisionM",void 0),(0,r._)([(0,v.MZ)({type:Number,json:{write:!0}})],kt.prototype,"geometryPrecisionZ",void 0),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],kt.prototype,"ignoreInvalidLocations",void 0),(0,r._)([(0,$.e)(ce,{name:"impedanceAttributeName",ignoreUnknown:!1})],kt.prototype,"impedanceAttribute",void 0),(0,r._)([(0,v.MZ)({type:Number,json:{write:!0}})],kt.prototype,"outputGeometryPrecision",void 0),(0,r._)([(0,$.e)(z)],kt.prototype,"outputGeometryPrecisionUnits",void 0),(0,r._)([(0,$.e)(X)],kt.prototype,"outputLines",void 0),(0,r._)([(0,v.MZ)({type:Qe.A,json:{name:"outSR",write:!0}})],kt.prototype,"outSpatialReference",void 0),(0,r._)([(0,v.MZ)({json:{write:!0}})],kt.prototype,"overrides",void 0),(0,r._)([(0,v.MZ)({json:{name:"barriers",write:!0}})],kt.prototype,"pointBarriers",void 0),(0,r._)([(0,w.K)("pointBarriers")],kt.prototype,"writePointBarriers",null),(0,r._)([(0,v.MZ)({json:{write:!0}})],kt.prototype,"polygonBarriers",void 0),(0,r._)([(0,w.K)("polygonBarriers")],kt.prototype,"writePolygonBarrier",null),(0,r._)([(0,v.MZ)({json:{write:!0}})],kt.prototype,"polylineBarriers",void 0),(0,r._)([(0,w.K)("polylineBarriers")],kt.prototype,"writePolylineBarrier",null),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],kt.prototype,"preserveFirstStop",void 0),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],kt.prototype,"preserveLastStop",void 0),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],kt.prototype,"preserveObjectID",void 0),(0,r._)([(0,v.MZ)({type:[String],json:{name:"restrictionAttributeNames",write:!0}})],kt.prototype,"restrictionAttributes",void 0),(0,r._)([(0,g.w)("restrictionAttributes")],kt.prototype,"readRestrictionAttributes",null),(0,r._)([(0,w.K)("restrictionAttributes")],kt.prototype,"writeRestrictionAttributes",null),(0,r._)([(0,$.e)(Q)],kt.prototype,"restrictUTurns",void 0),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],kt.prototype,"returnBarriers",void 0),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],kt.prototype,"returnDirections",void 0),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],kt.prototype,"returnPolygonBarriers",void 0),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],kt.prototype,"returnPolylineBarriers",void 0),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],kt.prototype,"returnRoutes",void 0),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],kt.prototype,"returnStops",void 0),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],kt.prototype,"returnTraversedEdges",void 0),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],kt.prototype,"returnTraversedJunctions",void 0),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],kt.prototype,"returnTraversedTurns",void 0),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],kt.prototype,"returnZ",void 0),(0,r._)([(0,v.MZ)({json:{write:!0}})],kt.prototype,"startTime",void 0),(0,r._)([(0,g.w)("startTime")],kt.prototype,"readStartTime",null),(0,r._)([(0,w.K)("startTime")],kt.prototype,"writeStartTime",null),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],kt.prototype,"startTimeIsUTC",void 0),(0,r._)([(0,v.MZ)({json:{write:!0}})],kt.prototype,"stops",void 0),(0,r._)([(0,g.w)("stops")],kt.prototype,"readStops",null),(0,r._)([(0,w.K)("stops")],kt.prototype,"writeStops",null),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],kt.prototype,"timeWindowsAreUTC",void 0),(0,r._)([(0,v.MZ)({type:_e,json:{write:!0}})],kt.prototype,"travelMode",void 0),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],kt.prototype,"useHierarchy",void 0),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],kt.prototype,"useTimeWindows",void 0),kt=Ut=(0,r._)([(0,T.$)("esri.rest.support.RouteParameters")],kt);const Jt=kt;function Vt(e,t,i){null!=e&&(t[i]=p.A.isCollection(e)?{features:e.toArray().map((e=>e.toJSON()))}:e.toJSON())}var Wt;let Gt=Wt=class extends((0,Se.O)(C.oY)){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.type="stop",this.violations=null,this.waitDuration=null,this.wait=null}readArriveTimeOffset(e,t){return Ee(t.attributes.ArriveTime,t.attributes.ArriveTimeUTC)}readCumulativeCosts(e,t){return Fe(t.attributes,"Cumul_")}readDepartTimeOffset(e,t){return Ee(t.attributes.DepartTime,t.attributes.DepartTimeUTC)}readServiceCosts(e,t){return Fe(t.attributes,"Attr_")}writeServiceCosts(e,t){Ze(e,t,"Attr_")}writeTimeWindowEnd(e,t){null!=e&&(t.attributes||(t.attributes={}),t.attributes.TimeWindowEnd=e.getTime())}writeTimeWindowStart(e,t){null!=e&&(t.attributes||(t.attributes={}),t.attributes.TimeWindowStart=e.getTime())}readViolations(e,t){return Fe(t.attributes,"Violation_")}readWait(e,t){return Fe(t.attributes,"Wait_")}static fromGraphic(e){return new Wt({arriveCurbApproach:null!=e.attributes.ArrivalCurbApproach?te.fromJSON(e.attributes.ArrivalCurbApproach):null,arriveTime:null!=e.attributes.ArrivalTime?new Date(e.attributes.ArrivalTime):null,arriveTimeOffset:e.attributes.ArrivalUTCOffset,cumulativeCosts:null!=e.attributes.CumulativeCosts?Ce(JSON.parse(e.attributes.CumulativeCosts)):null,cumulativeDistance:e.attributes.CumulativeMeters??null,cumulativeDuration:e.attributes.CumulativeMinutes??null,curbApproach:null!=e.attributes.CurbApproach?te.fromJSON(e.attributes.CurbApproach):null,departCurbApproach:null!=e.attributes.DepartureCurbApproach?te.fromJSON(e.attributes.DepartureCurbApproach):null,departTime:null!=e.attributes.DepartureTime?new Date(e.attributes.DepartureTime):null,departTimeOffset:e.attributes.DepartureUTCOffset??null,geometry:e.geometry,lateDuration:e.attributes.LateMinutes??null,locationType:null!=e.attributes.LocationType?ie.fromJSON(e.attributes.LocationType):null,name:e.attributes.Name,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,routeName:e.attributes.RouteName,sequence:e.attributes.Sequence??null,serviceCosts:null!=e.attributes.ServiceCosts?Ce(JSON.parse(e.attributes.ServiceCosts)):null,serviceDistance:e.attributes.ServiceMeters??null,serviceDuration:e.attributes.ServiceMinutes??null,status:null!=e.attributes.Status?re.fromJSON(e.attributes.Status):null,symbol:e.symbol,timeWindowEnd:null!=e.attributes.TimeWindowEnd?new Date(e.attributes.TimeWindowEnd):null,timeWindowEndOffset:e.attributes.TimeWindowEndUTCOffset??null,timeWindowStart:null!=e.attributes.TimeWindowStart?new Date(e.attributes.TimeWindowStart):null,timeWindowStartOffset:e.attributes.TimeWindowStartUTCOffset??null,waitDuration:e.attributes.WaitMinutes??null})}toGraphic(){const e={ObjectID:this.objectId,ArrivalCurbApproach:null!=this.arriveCurbApproach?te.toJSON(this.arriveCurbApproach):null,ArrivalTime:null!=this.arriveTime?this.arriveTime.getTime():null,ArrivalUTCOffset:this.arriveTimeOffset,CumulativeCosts:null!=this.cumulativeCosts?JSON.stringify(je(this.cumulativeCosts)):null,CumulativeMeters:this.cumulativeDistance,CumulativeMinutes:this.cumulativeDuration,CurbApproach:null!=this.curbApproach?te.toJSON(this.curbApproach):null,DepartureCurbApproach:null!=this.departCurbApproach?te.toJSON(this.departCurbApproach):null,DepartureTime:null!=this.departTime?this.departTime.getTime():null,DepartureUTCOffset:this.departTimeOffset,LateMinutes:this.lateDuration,LocationType:null!=this.locationType?ie.toJSON(this.locationType):null,Name:this.name,RouteName:this.routeName,Sequence:this.sequence,ServiceCosts:null!=this.serviceCosts?JSON.stringify(je(this.serviceCosts)):null,ServiceMeters:this.serviceDistance,ServiceMinutes:this.serviceDuration,Status:null!=this.status?re.toJSON(this.status):null,TimeWindowEnd:null!=this.timeWindowEnd?this.timeWindowEnd.getTime():null,TimeWindowEndUTCOffset:this.timeWindowEndOffset??this.arriveTimeOffset,TimeWindowStart:null!=this.timeWindowStart?this.timeWindowStart.getTime():null,TimeWindowStartUTCOffset:this.timeWindowStartOffset??this.arriveTimeOffset,WaitMinutes:this.waitDuration};return new n.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};Gt.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}],Gt.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:[]},(0,r._)([(0,v.MZ)({type:te.apiValues,json:{read:{source:"attributes.ArrivalCurbApproach",reader:te.read}}})],Gt.prototype,"arriveCurbApproach",void 0),(0,r._)([(0,v.MZ)({type:Date,json:{read:{source:"attributes.ArriveTimeUTC"}}})],Gt.prototype,"arriveTime",void 0),(0,r._)([(0,v.MZ)()],Gt.prototype,"arriveTimeOffset",void 0),(0,r._)([(0,g.w)("arriveTimeOffset",["attributes.ArriveTime","attributes.ArriveTimeUTC"])],Gt.prototype,"readArriveTimeOffset",null),(0,r._)([(0,v.MZ)({json:{name:"attributes.Bearing",read:!1,write:!0}})],Gt.prototype,"bearing",void 0),(0,r._)([(0,v.MZ)({json:{name:"attributes.BearingTol",read:!1,write:!0}})],Gt.prototype,"bearingTol",void 0),(0,r._)([(0,v.MZ)()],Gt.prototype,"cumulativeCosts",void 0),(0,r._)([(0,g.w)("cumulativeCosts",["attributes"])],Gt.prototype,"readCumulativeCosts",null),(0,r._)([(0,v.MZ)()],Gt.prototype,"cumulativeDistance",void 0),(0,r._)([(0,v.MZ)()],Gt.prototype,"cumulativeDuration",void 0),(0,r._)([(0,v.MZ)({type:te.apiValues,json:{name:"attributes.CurbApproach",read:{reader:te.read},write:{writer:te.write}}})],Gt.prototype,"curbApproach",void 0),(0,r._)([(0,v.MZ)({type:te.apiValues,json:{read:{source:"attributes.DepartCurbApproach",reader:te.read}}})],Gt.prototype,"departCurbApproach",void 0),(0,r._)([(0,v.MZ)({type:Date,json:{read:{source:"attributes.DepartTimeUTC"}}})],Gt.prototype,"departTime",void 0),(0,r._)([(0,v.MZ)()],Gt.prototype,"departTimeOffset",void 0),(0,r._)([(0,g.w)("departTimeOffset",["attributes.DepartTime","attributes.DepartTimeUTC"])],Gt.prototype,"readDepartTimeOffset",null),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.DistanceToNetworkInMeters"}}})],Gt.prototype,"distanceToNetworkInMeters",void 0),(0,r._)([(0,v.MZ)({type:qe.A,json:{write:!0}})],Gt.prototype,"geometry",void 0),(0,r._)([(0,v.MZ)()],Gt.prototype,"lateDuration",void 0),(0,r._)([(0,v.MZ)({type:ie.apiValues,json:{name:"attributes.LocationType",read:{reader:ie.read},write:{writer:ie.write}}})],Gt.prototype,"locationType",void 0),(0,r._)([(0,v.MZ)({json:{name:"attributes.Name"}})],Gt.prototype,"name",void 0),(0,r._)([(0,v.MZ)({json:{name:"attributes.NavLatency",read:!1,write:!0}})],Gt.prototype,"navLatency",void 0),(0,r._)([(0,v.MZ)({json:{name:"attributes.ObjectID"}})],Gt.prototype,"objectId",void 0),(0,r._)([(0,v.MZ)({type:a.A})],Gt.prototype,"popupTemplate",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.PosAlong"}}})],Gt.prototype,"posAlong",void 0),(0,r._)([(0,v.MZ)({json:{name:"attributes.RouteName"}})],Gt.prototype,"routeName",void 0),(0,r._)([(0,v.MZ)()],Gt.prototype,"serviceCosts",void 0),(0,r._)([(0,g.w)("serviceCosts",["attributes"])],Gt.prototype,"readServiceCosts",null),(0,r._)([(0,w.K)("serviceCosts")],Gt.prototype,"writeServiceCosts",null),(0,r._)([(0,v.MZ)()],Gt.prototype,"serviceDistance",void 0),(0,r._)([(0,v.MZ)()],Gt.prototype,"serviceDuration",void 0),(0,r._)([(0,v.MZ)({json:{name:"attributes.Sequence"}})],Gt.prototype,"sequence",void 0),(0,r._)([(0,v.MZ)({type:oe.apiValues,json:{read:{source:"attributes.SideOfEdge",reader:oe.read}}})],Gt.prototype,"sideOfEdge",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.SnapX"}}})],Gt.prototype,"snapX",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.SnapY"}}})],Gt.prototype,"snapY",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.SnapZ"}}})],Gt.prototype,"snapZ",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.SourceID"}}})],Gt.prototype,"sourceId",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.SourceOID"}}})],Gt.prototype,"sourceOid",void 0),(0,r._)([(0,v.MZ)({type:re.apiValues,json:{read:{source:"attributes.Status",reader:re.read}}})],Gt.prototype,"status",void 0),(0,r._)([(0,v.MZ)({types:Z.Es})],Gt.prototype,"symbol",void 0),(0,r._)([(0,v.MZ)({type:Date,json:{name:"attributes.TimeWindowEnd"}})],Gt.prototype,"timeWindowEnd",void 0),(0,r._)([(0,w.K)("timeWindowEnd")],Gt.prototype,"writeTimeWindowEnd",null),(0,r._)([(0,v.MZ)()],Gt.prototype,"timeWindowEndOffset",void 0),(0,r._)([(0,v.MZ)({type:Date,json:{name:"attributes.TimeWindowStart"}})],Gt.prototype,"timeWindowStart",void 0),(0,r._)([(0,w.K)("timeWindowStart")],Gt.prototype,"writeTimeWindowStart",null),(0,r._)([(0,v.MZ)()],Gt.prototype,"timeWindowStartOffset",void 0),(0,r._)([(0,v.MZ)({readOnly:!0,json:{read:!1}})],Gt.prototype,"type",void 0),(0,r._)([(0,v.MZ)()],Gt.prototype,"violations",void 0),(0,r._)([(0,g.w)("violations",["attributes"])],Gt.prototype,"readViolations",null),(0,r._)([(0,v.MZ)()],Gt.prototype,"waitDuration",void 0),(0,r._)([(0,v.MZ)()],Gt.prototype,"wait",void 0),(0,r._)([(0,g.w)("wait",["attributes"])],Gt.prototype,"readWait",null),Gt=Wt=(0,r._)([(0,T.$)("esri.rest.support.Stop")],Gt);const $t=Gt;var qt=i(48526);function zt(e){return e.length?e:null}function Kt(e){switch(e){case"esriGeometryPoint":return{type:"esriSMS",style:"esriSMSCircle",size:12,color:[0,0,0,0],outline:Kt("esriGeometryPolyline")};case"esriGeometryPolyline":return{type:"esriSLS",style:"esriSLSSolid",width:1,color:[0,0,0,0]};case"esriGeometryPolygon":return{type:"esriSFS",style:"esriSFSNull",outline:Kt("esriGeometryPolyline")}}}function Yt(e){return"layers"in e}async function Ht(e){const t=Qe.A.WGS84;return await(0,_.initializeProjection)(e.spatialReference,t),(0,_.project)(e,t)}function Xt(e,t){switch(t){case"seconds":return e/60;case"hours":return 60*e;case"days":return 60*e*24;default:return e}}function Qt(e,t){return"decimal-degrees"===t||"points"===t||"unknown"===t?e:(0,h.oU)(e,t,"meters")}const ei=p.A.ofType(dt),ti=p.A.ofType(yt),ii=p.A.ofType(bt),ri=p.A.ofType(wt),oi=p.A.ofType(_t),si=p.A.ofType($t),ni="esri.layers.RouteLayer",ai=()=>u.A.getLogger(ni);let li=class extends((0,O.d)((0,D.j)((0,I.q)((0,x.A)((0,c.P)(N.A)))))){constructor(e){super(e),this._cachedServiceDescription=null,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 ii,this.polygonBarriers=new ri,this.polylineBarriers=new oi,this.routeInfo=null,this.spatialReference=Qe.A.WGS84,this.stops=new si,this.type="route";const t=()=>{this._setStopSymbol(this.stops)};this.addHandles((0,f.on)((()=>this.stops),"change",t,{sync:!0,onListenerAdd:t}))}writeFeatureCollectionWebmap(e,t,i,r){const o=[this._writePolygonBarriers(),this._writePolylineBarriers(),this._writePointBarriers(),this._writeRouteInfo(),this._writeDirectionLines(),this._writeDirectionPoints(),this._writeStops()].filter((e=>!!e)),s=o.map(((e,t)=>t)),n="web-map"===r.origin?"featureCollection.layers":"layers";(0,m.sM)(n,o,t),t.opacity=this.opacity,t.visibility=this.visible,t.visibleLayers=s}readDirectionLines(e,t){return this._getNetworkFeatures(t,"DirectionLines",(e=>dt.fromGraphic(e)))}readDirectionPoints(e,t){return this._getNetworkFeatures(t,"DirectionPoints",(e=>yt.fromGraphic(e)))}get fullExtent(){const e=new A.A({xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:Qe.A.WGS84});if(null!=this.routeInfo?.geometry)return this.routeInfo.geometry.extent??e;if(null==this.stops)return e;const t=this.stops.filter((e=>null!=e.geometry));if(t.length<2)return e;const{spatialReference:i}=t.at(0).geometry;if(null==i)return e;const r=t.toArray().map((e=>{const t=e.geometry;return[t.x,t.y]}));return new qt.A({points:r,spatialReference:i}).extent}readMaxScale(e,t){const i=Yt(t)?t.layers:t.featureCollection?.layers,r=i?.find((e=>null!=e.layerDefinition.maxScale));return r?.layerDefinition.maxScale??0}readMinScale(e,t){const i=Yt(t)?t.layers:t.featureCollection?.layers,r=i?.find((e=>null!=e.layerDefinition.minScale));return r?.layerDefinition.minScale??0}readPointBarriers(e,t){return this._getNetworkFeatures(t,"Barriers",(e=>bt.fromGraphic(e)))}readPolygonBarriers(e,t){return this._getNetworkFeatures(t,"PolygonBarriers",(e=>wt.fromGraphic(e)))}readPolylineBarriers(e,t){return this._getNetworkFeatures(t,"PolylineBarriers",(e=>_t.fromGraphic(e)))}readRouteInfo(e,t){const i=this._getNetworkFeatures(t,"RouteInfo",(e=>xt.fromGraphic(e)));return i.length>0?i.at(0):null}readSpatialReference(e,t){const i=Yt(t)?t.layers:t.featureCollection?.layers;if(!i?.length)return Qe.A.WGS84;const{layerDefinition:r,featureSet:o}=i[0],s=o.features[0],n=s?.geometry?.spatialReference??o.spatialReference??r.spatialReference??r.extent.spatialReference??M.KK;return Qe.A.fromJSON(n)}readStops(e,t){return this._getNetworkFeatures(t,"Stops",(e=>$t.fromGraphic(e)),(e=>this._setStopSymbol(e)))}get title(){return null!=this.routeInfo?.name?this.routeInfo.name:"Route"}set title(e){this._overrideIfSome("title",e)}get url(){return o.A.routeServiceUrl}set url(e){null!=e?this._set("url",(0,F.Jf)(e,ai())):this._set("url",o.A.routeServiceUrl)}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Feature Collection"]},e)),Promise.resolve(this)}removeAll(){this.removeResult(),this.pointBarriers.removeAll(),this.polygonBarriers.removeAll(),this.polylineBarriers.removeAll(),this.stops.removeAll()}removeResult(){null!=this.directionLines&&(this.directionLines.removeAll(),this._set("directionLines",null)),null!=this.directionPoints&&(this.directionPoints.removeAll(),this._set("directionPoints",null)),null!=this.routeInfo&&this._set("routeInfo",null)}async save(){await this.load();const{fullExtent:e,portalItem:t}=this;if(!t)throw new d.A("routelayer:portal-item-not-set","save() requires to the layer to have a portal item");if(!t.id)throw new d.A("routelayer:portal-item-not-saved","Please use saveAs() first to save the routelayer");if("Feature Collection"!==t.type)throw new d.A("routelayer:portal-item-wrong-type",'Portal item needs to have type "Feature Collection"');if(null==this.routeInfo)throw new d.A("routelayer:route-unsolved","save() requires a solved route");const{portal:i}=t;await i.signIn(),i.user||await t.reload();const{itemUrl:r,itemControl:o}=t;if("admin"!==o&&"update"!==o)throw new d.A("routelayer:insufficient-permissions","To save this layer, you need to be the owner or an administrator of your organization");const s={messages:[],origin:"portal-item",portal:i,url:r?(0,b.An)(r):void 0,writtenProperties:[]},n=this.write(void 0,s);return t.extent=await Ht(e),t.title=this.title,await t.update({data:n}),t}async saveAs(e,t={}){if(await this.load(),null==this.routeInfo)throw new d.A("routelayer:route-unsolved","saveAs() requires a solved route");const i=J.default.from(e).clone();i.extent??=await Ht(this.fullExtent),i.id=null,i.portal??=k.A.getDefault(),i.title??=this.title,i.type="Feature Collection",i.typeKeywords=["Data","Feature Collection",V.mm.MULTI_LAYER,"Route Layer"];const{portal:r}=i,o={messages:[],origin:"portal-item",portal:r,url:null,writtenProperties:[]};await r.signIn();const s=t?.folder,n=this.write(void 0,o);return await(r.user?.addItem({item:i,folder:s,data:n})),this.portalItem=i,(0,S.v)(o),o.portalItem=i,i}async solve(e,t){const i=e?.stops??this.stops,r=e?.pointBarriers??zt(this.pointBarriers),o=e?.polylineBarriers??zt(this.polylineBarriers),s=e?.polygonBarriers??zt(this.polygonBarriers);if(null==i)throw new d.A("routelayer:undefined-stops","the route layer must have stops defined in the route parameters.");if((function(e){return"esri.rest.support.FeatureSet"===e.declaredClass}(i)||function(e){return"esri.rest.support.NetworkFeatureSet"===e.declaredClass}(i))&&i.features.length<2||p.A.isCollection(i)&&i.length<2)throw new d.A("routelayer:insufficent-stops","the route layer must have two or more stops to solve a route.");if(p.A.isCollection(i))for(const e of i)e.routeName=null;const n=e?.apiKey,a=this.url,l=await this._getServiceDescription(a,n,t),u=e?.travelMode??l.defaultTravelMode,c=e?.accumulateAttributes??[];null!=u&&(c.push(u.distanceAttributeName),u.timeAttributeName&&c.push(u.timeAttributeName));const m={accumulateAttributes:c,directionsOutputType:"featuresets",ignoreInvalidLocations:!0,pointBarriers:r,polylineBarriers:o,polygonBarriers:s,preserveFirstStop:!0,preserveLastStop:!0,returnBarriers:!!r,returnDirections:!0,returnPolygonBarriers:!!s,returnPolylineBarriers:!!o,returnRoutes:!0,returnStops:!0,stops:i},f=Jt.from(e??{});let h;f.set(m);try{h=await lt(a,f,t)}catch(e){throw(0,y.zf)(e)?e:new d.A("routelayer:failed-route-request","the routing request failed",{error:e})}const b=this._toRouteLayerSolution(h);return this._isOverridden("title")||(this.title=b.routeInfo.name??"Route"),function(e,t,i){const r=t.networkDataset?.networkAttributes,o=r?.filter((({usageType:e})=>"cost"===e))??[],s=i.travelMode??t.defaultTravelMode;if(null==s)return void ai().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:n,distanceAttributeName:a}=s,l=o.find((({name:e})=>e===n)),u=o.find((({name:e})=>e===a)),p=i.travelMode?.impedanceAttributeName??i.impedanceAttribute??t.impedance,c=l?.units,m=u?.units;if(!c||!m)throw new d.A("routelayer:unknown-impedance-units","the units of either the distance or time impedance are unknown");const y=i.directionsLanguage??t.directionsLanguage,f=i.accumulateAttributes??t.accumulateAttributeNames??[],h=new Set(o.filter((({name:e})=>e===n||e===a||e===p||null!=e&&f.includes(e))).map((({name:e})=>e))),b=e=>{for(const t in e)h.has(t)||delete e[t]};for(const t of e.pointBarriers)null!=t.costs&&(t.addedCost=t.costs[p]??0,b(t.costs));for(const t of e.polygonBarriers)null!=t.costs&&(t.scaleFactor=t.costs[p]??1,b(t.costs));for(const t of e.polylineBarriers)null!=t.costs&&(t.scaleFactor=t.costs[p]??1,b(t.costs));const{routeInfo:v}=e,{findBestSequence:g,preserveFirstStop:T,preserveLastStop:w,startTimeIsUTC:S,timeWindowsAreUTC:A}=i;v.analysisSettings=new Nt({accumulateAttributes:f,directionsLanguage:y,findBestSequence:g,preserveFirstStop:T,preserveLastStop:w,startTimeIsUTC:S,timeWindowsAreUTC:A,travelMode:s}),v.totalDuration=Xt(v.totalCosts?.[n]??0,c),v.totalDistance=Qt(v.totalCosts?.[a]??0,m),v.totalLateDuration=Xt(v.totalViolations?.[n]??0,c),v.totalWaitDuration=Xt(v.totalWait?.[n]??0,c),null!=v.totalCosts&&b(v.totalCosts),null!=v.totalViolations&&b(v.totalViolations),null!=v.totalWait&&b(v.totalWait);for(const t of e.stops)null!=t.serviceCosts&&(t.serviceDuration=Xt(t.serviceCosts[n]??0,c),t.serviceDistance=Qt(t.serviceCosts[a]??0,m),b(t.serviceCosts)),null!=t.cumulativeCosts&&(t.cumulativeDuration=Xt(t.cumulativeCosts[n]??0,c),t.cumulativeDistance=Qt(t.cumulativeCosts[a]??0,m),b(t.cumulativeCosts)),null!=t.violations&&(t.lateDuration=Xt(t.violations[n]??0,c),b(t.violations)),null!=t.wait&&(t.waitDuration=Xt(t.wait[n]??0,c),b(t.wait))}(b,l,f),b}update(e){const{stops:t,directionLines:i,directionPoints:r,pointBarriers:o,polylineBarriers:s,polygonBarriers:n,routeInfo:a}=e;this.set({stops:t,pointBarriers:o,polylineBarriers:s,polygonBarriers:n}),this._set("directionLines",i),this._set("directionPoints",r),this._set("routeInfo",a),null!=a.geometry&&(this.spatialReference=a.geometry.spatialReference)}_getNetworkFeatures(e,t,i,r){const o=Yt(e)?e.layers:e.featureCollection?.layers,s=o?.find((e=>e.layerDefinition.name===t));if(null==s)return new p.A;const{layerDefinition:u,popupInfo:d,featureSet:c}=s,m=u.drawingInfo.renderer,{features:y}=c,f=c.spatialReference??u.spatialReference??u.extent.spatialReference??M.KK,h=m&&(0,l.L)(m),b=Qe.A.fromJSON(f),v=y.map((e=>{const r=n.A.fromJSON(e);null!=r.geometry&&null!=e.geometry&&null==e.geometry.spatialReference&&(r.geometry.spatialReference=b);const o=i(r);return o.symbol??=h?.getSymbol(r)??this._getNetworkSymbol(t),o.popupTemplate??=d&&a.A.fromJSON(d),o}));return r&&v.some((e=>!e.symbol))&&r(v),new p.A(v)}_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}}async _getServiceDescription(e,t,i){if(null!=this._cachedServiceDescription&&this._cachedServiceDescription.url===e)return this._cachedServiceDescription.serviceDescription;const r=await Ie(e,t,i);return this._cachedServiceDescription={serviceDescription:r,url:e},r}_setStopSymbol(e){if(!e||0===e.length)return;if(null==this.defaultSymbols.stops)return;if(e.every((({symbol:e})=>null!=e)))return;const{first:t,last:i,middle:r,unlocated:o,waypoint:s,break:n}=this.defaultSymbols.stops;if(null==this.routeInfo||1===e.length)return void e.forEach(((o,s)=>{switch(s){case 0:o.symbol=t;break;case e.length-1:o.symbol=i;break;default:o.symbol=r}}));const a=e.map((({sequence:e})=>e)).filter((e=>null!=e)),l=Math.min(...a),u=Math.max(...a);for(const a of e)a.sequence!==l?a.sequence!==u?"ok"===a.status||"not-located-on-closest"===a.status?"waypoint"!==a.locationType?"break"!==a.locationType?a.symbol=r:a.symbol=n:a.symbol=s:a.symbol=o:a.symbol=i:a.symbol=t}_toRouteLayerSolution(e){const t=e.routeResults[0].stops?.map((e=>$t.fromJSON(e.toJSON())));this._setStopSymbol(t);const i=new si(t),r=new ri(e.polygonBarriers?.map((e=>{const t=wt.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.polygonBarriers,t}))),o=new oi(e.polylineBarriers?.map((e=>{const t=_t.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.polylineBarriers,t}))),s=new ii(e.pointBarriers?.map((e=>{const t=bt.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.pointBarriers,t}))),n=e.routeResults[0].route?.toJSON(),a=xt.fromJSON(n);a.symbol=this.defaultSymbols.routeInfo;const l=new ti(e.routeResults[0].directionPoints?.features.map((e=>{const t=yt.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.directionPoints,t})));return{directionLines:new ei(e.routeResults[0].directionLines?.features.map((e=>{const t=dt.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.directionLines,t}))),directionPoints:l,pointBarriers:s,polygonBarriers:r,polylineBarriers:o,routeInfo:a,stops:i}}_writeDirectionLines(){return this._writeNetworkFeatures(this.directionLines,this.defaultSymbols.directionLines,"esriGeometryPolyline",dt.fields,dt.popupInfo,"DirectionLines","Direction Lines")}_writeDirectionPoints(){return this._writeNetworkFeatures(this.directionPoints,this.defaultSymbols.directionPoints,"esriGeometryPoint",yt.fields,yt.popupInfo,"DirectionPoints","Direction Points")}_writeNetworkFeatures(e,t,i,r,o,s,n){if(!e?.length)return null;const a=this.spatialReference.toJSON(),{fullExtent:l,maxScale:u,minScale:p}=this;return{featureSet:{features:e.toArray().map((e=>function(e){const{attributes:t,geometry:i,popupTemplate:r,symbol:o}=e.toGraphic().toJSON();return{attributes:t,geometry:i,popupInfo:r,symbol:o}}(e))),geometryType:i,spatialReference:a},layerDefinition:{capabilities:"Query,Update,Editing",drawingInfo:{renderer:{type:"simple",symbol:null!=t?t.toJSON():Kt(i)}},extent:l.toJSON(),fields:r,geometryType:i,hasM:!1,hasZ:!1,maxScale:u,minScale:p,name:s,objectIdField:"ObjectID",spatialReference:a,title:n,type:"Feature Layer",typeIdField:""},popupInfo:o}}_writePointBarriers(){return this._writeNetworkFeatures(this.pointBarriers,this.defaultSymbols.pointBarriers,"esriGeometryPoint",bt.fields,bt.popupInfo,"Barriers","Point Barriers")}_writePolygonBarriers(){return this._writeNetworkFeatures(this.polygonBarriers,this.defaultSymbols.polygonBarriers,"esriGeometryPolygon",wt.fields,wt.popupInfo,"PolygonBarriers","Polygon Barriers")}_writePolylineBarriers(){return this._writeNetworkFeatures(this.polylineBarriers,this.defaultSymbols.polylineBarriers,"esriGeometryPolyline",_t.fields,_t.popupInfo,"PolylineBarriers","Line Barriers")}_writeRouteInfo(){return this._writeNetworkFeatures(null!=this.routeInfo?new p.A([this.routeInfo]):null,this.defaultSymbols.routeInfo,"esriGeometryPolyline",xt.fields,xt.popupInfo,"RouteInfo","Route Details")}_writeStops(){const e=this._writeNetworkFeatures(this.stops,null,"esriGeometryPoint",$t.fields,$t.popupInfo,"Stops","Stops");if(null==e)return null;const{stops:t}=this.defaultSymbols,i=t?.first?.toJSON(),r=t?.middle?.toJSON(),o=t?.last?.toJSON();return e.layerDefinition.drawingInfo.renderer={type:"uniqueValue",field1:"Sequence",defaultSymbol:r,uniqueValueInfos:[{value:"1",symbol:i,label:"First Stop"},{value:`${this.stops.length}`,symbol:o,label:"Last Stop"}]},e}};(0,r._)([(0,v.MZ)({readOnly:!0,json:{read:!1,origins:{"portal-item":{write:{allowNull:!0,ignoreOrigin:!0}},"web-map":{write:{overridePolicy(){return{allowNull:!0,ignoreOrigin:null==this.portalItem}}}}}}})],li.prototype,"_featureCollection",void 0),(0,r._)([(0,w.K)(["web-map","portal-item"],"_featureCollection")],li.prototype,"writeFeatureCollectionWebmap",null),(0,r._)([(0,v.MZ)({readOnly:!0,json:{read:!1,origins:{"web-map":{write:{target:"type",overridePolicy(){return{ignoreOrigin:null!=this.portalItem}}}}}}})],li.prototype,"_type",void 0),(0,r._)([(0,v.MZ)({nonNullable:!0,type:U})],li.prototype,"defaultSymbols",void 0),(0,r._)([(0,v.MZ)({readOnly:!0})],li.prototype,"directionLines",void 0),(0,r._)([(0,g.w)(["web-map","portal-item"],"directionLines",["layers","featureCollection.layers"])],li.prototype,"readDirectionLines",null),(0,r._)([(0,v.MZ)({readOnly:!0})],li.prototype,"directionPoints",void 0),(0,r._)([(0,g.w)(["web-map","portal-item"],"directionPoints",["layers","featureCollection.layers"])],li.prototype,"readDirectionPoints",null),(0,r._)([(0,v.MZ)({readOnly:!0,json:{read:!1,origins:{"web-map":{write:{ignoreOrigin:!0}}}}})],li.prototype,"featureCollectionType",void 0),(0,r._)([(0,v.MZ)({readOnly:!0})],li.prototype,"fullExtent",null),(0,r._)([(0,v.MZ)({json:{origins:{"web-map":{name:"featureCollection.showLegend"}},write:!0}})],li.prototype,"legendEnabled",void 0),(0,r._)([(0,v.MZ)({type:["show","hide"]})],li.prototype,"listMode",void 0),(0,r._)([(0,v.MZ)({type:Number,nonNullable:!0,json:{write:!1}})],li.prototype,"maxScale",void 0),(0,r._)([(0,g.w)(["web-map","portal-item"],"maxScale",["layers","featureCollection.layers"])],li.prototype,"readMaxScale",null),(0,r._)([(0,v.MZ)({type:Number,nonNullable:!0,json:{write:!1}})],li.prototype,"minScale",void 0),(0,r._)([(0,g.w)(["web-map","portal-item"],"minScale",["layers","featureCollection.layers"])],li.prototype,"readMinScale",null),(0,r._)([(0,v.MZ)({type:["ArcGISFeatureLayer"],value:"ArcGISFeatureLayer"})],li.prototype,"operationalLayerType",void 0),(0,r._)([(0,v.MZ)({nonNullable:!0,type:p.A.ofType(bt)})],li.prototype,"pointBarriers",void 0),(0,r._)([(0,g.w)(["web-map","portal-item"],"pointBarriers",["layers","featureCollection.layers"])],li.prototype,"readPointBarriers",null),(0,r._)([(0,v.MZ)({nonNullable:!0,type:p.A.ofType(wt)})],li.prototype,"polygonBarriers",void 0),(0,r._)([(0,g.w)(["web-map","portal-item"],"polygonBarriers",["layers","featureCollection.layers"])],li.prototype,"readPolygonBarriers",null),(0,r._)([(0,v.MZ)({nonNullable:!0,type:p.A.ofType(_t)})],li.prototype,"polylineBarriers",void 0),(0,r._)([(0,g.w)(["web-map","portal-item"],"polylineBarriers",["layers","featureCollection.layers"])],li.prototype,"readPolylineBarriers",null),(0,r._)([(0,v.MZ)({readOnly:!0})],li.prototype,"routeInfo",void 0),(0,r._)([(0,g.w)(["web-map","portal-item"],"routeInfo",["layers","featureCollection.layers"])],li.prototype,"readRouteInfo",null),(0,r._)([(0,v.MZ)({type:Qe.A})],li.prototype,"spatialReference",void 0),(0,r._)([(0,g.w)(["web-map","portal-item"],"spatialReference",["layers","featureCollection.layers"])],li.prototype,"readSpatialReference",null),(0,r._)([(0,v.MZ)({nonNullable:!0,type:p.A.ofType($t)})],li.prototype,"stops",void 0),(0,r._)([(0,g.w)(["web-map","portal-item"],"stops",["layers","featureCollection.layers"])],li.prototype,"readStops",null),(0,r._)([(0,v.MZ)()],li.prototype,"title",null),(0,r._)([(0,v.MZ)({readOnly:!0,json:{read:!1}})],li.prototype,"type",void 0),(0,r._)([(0,v.MZ)()],li.prototype,"url",null),li=(0,r._)([(0,T.$)(ni)],li);const ui=li},76369:(e,t,i)=>{i.d(t,{LF:()=>M,M9:()=>N});var r,o,s=i(49186),n=i(93637),a=i(40876),l=i(59247),u=(i(11053),i(27865)),p={exports:{}};o=function(){function e(t,i,r,o){var s=Error.call(this,t);return Object.setPrototypeOf&&Object.setPrototypeOf(s,e.prototype),s.expected=i,s.found=r,s.location=o,s.name="SyntaxError",s}function t(e,t,i){return i=i||" ",e.length>t?e:(t-=e.length,e+(i+=i.repeat(t)).slice(0,t))}return function(e,t){function i(){this.constructor=e}i.prototype=t.prototype,e.prototype=new i}(e,Error),e.prototype.format=function(e){var i="Error: "+this.message;if(this.location){var r,o=null;for(r=0;r<e.length;r++)if(e[r].source===this.location.source){o=e[r].text.split(/\r\n|\n|\r/g);break}var s=this.location.start,n=this.location.source&&"function"==typeof this.location.source.offset?this.location.source.offset(s):s,a=this.location.source+":"+n.line+":"+n.column;if(o){var l=this.location.end,u=t("",n.line.toString().length," "),p=o[s.line-1],d=(s.line===l.line?l.column:p.length+1)-s.column||1;i+="\n --\x3e "+a+"\n"+u+" |\n"+n.line+" | "+p+"\n"+u+" | "+t("",s.column-1," ")+t("",d,"^")}else i+="\n at "+a}return i},e.buildMessage=function(e,t){var i={literal:function(e){return'"'+o(e.text)+'"'},class:function(e){var t=e.parts.map((function(e){return Array.isArray(e)?s(e[0])+"-"+s(e[1]):s(e)}));return"["+(e.inverted?"^":"")+t.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(e){return e.description}};function r(e){return e.charCodeAt(0).toString(16).toUpperCase()}function o(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+r(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+r(e)}))}function s(e){return e.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+r(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+r(e)}))}function n(e){return i[e.type](e)}return"Expected "+function(e){var t,i,r=e.map(n);if(r.sort(),r.length>0){for(t=1,i=1;t<r.length;t++)r[t-1]!==r[t]&&(r[i]=r[t],i++);r.length=i}switch(r.length){case 1:return r[0];case 2:return r[0]+" or "+r[1];default:return r.slice(0,-1).join(", ")+", or "+r[r.length-1]}}(e)+" but "+function(e){return e?'"'+o(e)+'"':"end of input"}(t)+" found."},{SyntaxError:e,parse:function(t,i){var r,o={},s=(i=void 0!==i?i:{}).grammarSource,n={start:Ge},a=Ge,l="none",u=")",p=",",d="(",c="%",m="px",y="cm",f="mm",h="in",b="pt",v="pc",g="deg",T="rad",w="grad",S="turn",A="#",_=".",M="e",N=/^[ \t\n\r]/,O=/^[a-z\-]/,I=/^[0-9a-fA-F]/,x=/^[+\-]/,D=/^[0-9]/,F=ke("none"),Z=Le("none",!1),C=Le(")",!1),j=Le(",",!1),E=ke("whitespace"),B=Ue([" ","\t","\n","\r"],!1,!1),P=ke("function"),R=Le("(",!1),L=ke("identifier"),U=Ue([["a","z"],"-"],!1,!1),k=ke("percentage"),J=Le("%",!1),V=ke("length"),W=Le("px",!1),G=Le("cm",!1),$=Le("mm",!1),q=Le("in",!1),z=Le("pt",!1),K=Le("pc",!1),Y=ke("angle"),H=Le("deg",!1),X=Le("rad",!1),Q=Le("grad",!1),ee=Le("turn",!1),te=ke("number"),ie=ke("color"),re=Le("#",!1),oe=Ue([["0","9"],["a","f"],["A","F"]],!1,!1),se=Ue(["+","-"],!1,!1),ne=Ue([["0","9"]],!1,!1),ae=Le(".",!1),le=Le("e",!1),ue=function(){return[]},pe=function(e,t){return{type:"function",name:e,parameters:t||[]}},de=function(e,t){return t.length>0?function(e,t,i){return[e].concat(function(e,t){return e.map((function(e){return e[3]}))}(t))}(e,t):[e]},ce=function(e){return{type:"quantity",value:e.value,unit:e.unit}},me=function(e){return{type:"color",colorType:e.type,value:e.value}},ye=function(e){return e},fe=function(){return Re()},he=function(e){return{value:e,unit:"%"}},be=function(e){return{value:e,unit:"px"}},ve=function(e){return{value:e,unit:"cm"}},ge=function(e){return{value:e,unit:"mm"}},Te=function(e){return{value:e,unit:"in"}},we=function(e){return{value:e,unit:"pt"}},Se=function(e){return{value:e,unit:"pc"}},Ae=function(e){return{value:e,unit:"deg"}},_e=function(e){return{value:e,unit:"rad"}},Me=function(e){return{value:e,unit:"grad"}},Ne=function(e){return{value:e,unit:"turn"}},Oe=function(e){return{value:e,unit:null}},Ie=function(){return{type:"hex",value:Re()}},xe=function(e){return{type:"function",value:e}},De=function(){return{type:"named",value:Re()}},Fe=function(){return parseFloat(Re())},Ze=0,Ce=0,je=[{line:1,column:1}],Ee=0,Be=[],Pe=0;if("startRule"in i){if(!(i.startRule in n))throw new Error("Can't start parsing from rule \""+i.startRule+'".');a=n[i.startRule]}function Re(){return t.substring(Ce,Ze)}function Le(e,t){return{type:"literal",text:e,ignoreCase:t}}function Ue(e,t,i){return{type:"class",parts:e,inverted:t,ignoreCase:i}}function ke(e){return{type:"other",description:e}}function Je(e){var i,r=je[e];if(r)return r;for(i=e-1;!je[i];)i--;for(r={line:(r=je[i]).line,column:r.column};i<e;)10===t.charCodeAt(i)?(r.line++,r.column=1):r.column++,i++;return je[e]=r,r}function Ve(e,t,i){var r=Je(e),o=Je(t),n={source:s,start:{offset:e,line:r.line,column:r.column},end:{offset:t,line:o.line,column:o.column}};return i&&s&&"function"==typeof s.offset&&(n.start=s.offset(n.start),n.end=s.offset(n.end)),n}function We(e){Ze<Ee||(Ze>Ee&&(Ee=Ze,Be=[]),Be.push(e))}function Ge(){var e;return(e=$e())===o&&(e=function(){var e,t;if(e=[],(t=qe())!==o)for(;t!==o;)e.push(t),t=qe();else e=o;return e}()),e}function $e(){var e,i;return Pe++,e=Ze,Ke(),t.substr(Ze,4)===l?(i=l,Ze+=4):(i=o,0===Pe&&We(Z)),i!==o?(Ke(),Ce=e,e=ue()):(Ze=e,e=o),Pe--,e===o&&0===Pe&&We(F),e}function qe(){var e,i,r,s;return e=Ze,Ke(),(i=function(){var e,i,r;return Pe++,e=Ze,(i=Ye())!==o?(40===t.charCodeAt(Ze)?(r=d,Ze++):(r=o,0===Pe&&We(R)),r!==o?(Ce=e,e=ye(i)):(Ze=e,e=o)):(Ze=e,e=o),Pe--,e===o&&(i=o,0===Pe&&We(P)),e}())!==o?(Ke(),(r=function(){var e,i,r,s,n,a,l,u;if(e=Ze,(i=ze())!==o){for(r=[],s=Ze,n=Ke(),44===t.charCodeAt(Ze)?(a=p,Ze++):(a=o,0===Pe&&We(j)),a===o&&(a=null),l=Ke(),(u=ze())!==o?s=n=[n,a,l,u]:(Ze=s,s=o);s!==o;)r.push(s),s=Ze,n=Ke(),44===t.charCodeAt(Ze)?(a=p,Ze++):(a=o,0===Pe&&We(j)),a===o&&(a=null),l=Ke(),(u=ze())!==o?s=n=[n,a,l,u]:(Ze=s,s=o);Ce=e,e=de(i,r)}else Ze=e,e=o;return e}())===o&&(r=null),Ke(),41===t.charCodeAt(Ze)?(s=u,Ze++):(s=o,0===Pe&&We(C)),s!==o?(Ke(),Ce=e,e=pe(i,r)):(Ze=e,e=o)):(Ze=e,e=o),e}function ze(){var e,t;return e=Ze,(t=He())===o&&(t=Xe())===o&&(t=Qe())===o&&(t=function(){var e,t;return Pe++,e=Ze,Ke(),(t=tt())!==o?(Ce=e,e=Oe(t)):(Ze=e,e=o),Pe--,e===o&&0===Pe&&We(te),e}()),t!==o&&(Ce=e,t=ce(t)),(e=t)===o&&(e=Ze,(t=et())!==o&&(Ce=e,t=me(t)),e=t),e}function Ke(){var e,i;for(Pe++,e=[],N.test(t.charAt(Ze))?(i=t.charAt(Ze),Ze++):(i=o,0===Pe&&We(B));i!==o;)e.push(i),N.test(t.charAt(Ze))?(i=t.charAt(Ze),Ze++):(i=o,0===Pe&&We(B));return Pe--,i=o,0===Pe&&We(E),e}function Ye(){var e,i,r;if(Pe++,e=Ze,i=[],O.test(t.charAt(Ze))?(r=t.charAt(Ze),Ze++):(r=o,0===Pe&&We(U)),r!==o)for(;r!==o;)i.push(r),O.test(t.charAt(Ze))?(r=t.charAt(Ze),Ze++):(r=o,0===Pe&&We(U));else i=o;return i!==o&&(Ce=e,i=fe()),Pe--,(e=i)===o&&(i=o,0===Pe&&We(L)),e}function He(){var e,i,r;return Pe++,e=Ze,Ke(),(i=tt())!==o?(37===t.charCodeAt(Ze)?(r=c,Ze++):(r=o,0===Pe&&We(J)),r!==o?(Ce=e,e=he(i)):(Ze=e,e=o)):(Ze=e,e=o),Pe--,e===o&&0===Pe&&We(k),e}function Xe(){var e,i,r;return Pe++,e=Ze,Ke(),(i=tt())!==o?(t.substr(Ze,2)===m?(r=m,Ze+=2):(r=o,0===Pe&&We(W)),r!==o?(Ce=e,e=be(i)):(Ze=e,e=o)):(Ze=e,e=o),e===o&&(e=Ze,Ke(),(i=tt())!==o?(t.substr(Ze,2)===y?(r=y,Ze+=2):(r=o,0===Pe&&We(G)),r!==o?(Ce=e,e=ve(i)):(Ze=e,e=o)):(Ze=e,e=o),e===o&&(e=Ze,Ke(),(i=tt())!==o?(t.substr(Ze,2)===f?(r=f,Ze+=2):(r=o,0===Pe&&We($)),r!==o?(Ce=e,e=ge(i)):(Ze=e,e=o)):(Ze=e,e=o),e===o&&(e=Ze,Ke(),(i=tt())!==o?(t.substr(Ze,2)===h?(r=h,Ze+=2):(r=o,0===Pe&&We(q)),r!==o?(Ce=e,e=Te(i)):(Ze=e,e=o)):(Ze=e,e=o),e===o&&(e=Ze,Ke(),(i=tt())!==o?(t.substr(Ze,2)===b?(r=b,Ze+=2):(r=o,0===Pe&&We(z)),r!==o?(Ce=e,e=we(i)):(Ze=e,e=o)):(Ze=e,e=o),e===o&&(e=Ze,Ke(),(i=tt())!==o?(t.substr(Ze,2)===v?(r=v,Ze+=2):(r=o,0===Pe&&We(K)),r!==o?(Ce=e,e=Se(i)):(Ze=e,e=o)):(Ze=e,e=o)))))),Pe--,e===o&&0===Pe&&We(V),e}function Qe(){var e,i,r;return Pe++,e=Ze,(i=tt())!==o?(t.substr(Ze,3)===g?(r=g,Ze+=3):(r=o,0===Pe&&We(H)),r!==o?(Ce=e,e=Ae(i)):(Ze=e,e=o)):(Ze=e,e=o),e===o&&(e=Ze,(i=tt())!==o?(t.substr(Ze,3)===T?(r=T,Ze+=3):(r=o,0===Pe&&We(X)),r!==o?(Ce=e,e=_e(i)):(Ze=e,e=o)):(Ze=e,e=o),e===o&&(e=Ze,(i=tt())!==o?(t.substr(Ze,4)===w?(r=w,Ze+=4):(r=o,0===Pe&&We(Q)),r!==o?(Ce=e,e=Me(i)):(Ze=e,e=o)):(Ze=e,e=o),e===o&&(e=Ze,(i=tt())!==o?(t.substr(Ze,4)===S?(r=S,Ze+=4):(r=o,0===Pe&&We(ee)),r!==o?(Ce=e,e=Ne(i)):(Ze=e,e=o)):(Ze=e,e=o)))),Pe--,e===o&&(i=o,0===Pe&&We(Y)),e}function et(){var e,i,r,s;if(Pe++,e=Ze,35===t.charCodeAt(Ze)?(i=A,Ze++):(i=o,0===Pe&&We(re)),i!==o){if(r=[],I.test(t.charAt(Ze))?(s=t.charAt(Ze),Ze++):(s=o,0===Pe&&We(oe)),s!==o)for(;s!==o;)r.push(s),I.test(t.charAt(Ze))?(s=t.charAt(Ze),Ze++):(s=o,0===Pe&&We(oe));else r=o;r!==o?(Ce=e,e=Ie()):(Ze=e,e=o)}else Ze=e,e=o;return e===o&&(e=Ze,(i=qe())!==o&&(Ce=e,i=xe(i)),(e=i)===o&&(e=Ze,(i=Ye())!==o&&(Ce=e,i=De()),e=i)),Pe--,e===o&&(i=o,0===Pe&&We(ie)),e}function tt(){var e,i,r,s,n,a,l;for(e=Ze,x.test(t.charAt(Ze))?(t.charAt(Ze),Ze++):0===Pe&&We(se),i=Ze,r=[],D.test(t.charAt(Ze))?(s=t.charAt(Ze),Ze++):(s=o,0===Pe&&We(ne));s!==o;)r.push(s),D.test(t.charAt(Ze))?(s=t.charAt(Ze),Ze++):(s=o,0===Pe&&We(ne));if(46===t.charCodeAt(Ze)?(s=_,Ze++):(s=o,0===Pe&&We(ae)),s!==o){if(n=[],D.test(t.charAt(Ze))?(a=t.charAt(Ze),Ze++):(a=o,0===Pe&&We(ne)),a!==o)for(;a!==o;)n.push(a),D.test(t.charAt(Ze))?(a=t.charAt(Ze),Ze++):(a=o,0===Pe&&We(ne));else n=o;n!==o?i=r=[r,s,n]:(Ze=i,i=o)}else Ze=i,i=o;if(i===o)if(i=[],D.test(t.charAt(Ze))?(r=t.charAt(Ze),Ze++):(r=o,0===Pe&&We(ne)),r!==o)for(;r!==o;)i.push(r),D.test(t.charAt(Ze))?(r=t.charAt(Ze),Ze++):(r=o,0===Pe&&We(ne));else i=o;if(i!==o){if(r=Ze,101===t.charCodeAt(Ze)?(s=M,Ze++):(s=o,0===Pe&&We(le)),s!==o){if(x.test(t.charAt(Ze))?(n=t.charAt(Ze),Ze++):(n=o,0===Pe&&We(se)),n===o&&(n=null),a=[],D.test(t.charAt(Ze))?(l=t.charAt(Ze),Ze++):(l=o,0===Pe&&We(ne)),l!==o)for(;l!==o;)a.push(l),D.test(t.charAt(Ze))?(l=t.charAt(Ze),Ze++):(l=o,0===Pe&&We(ne));else a=o;a!==o?r=s=[s,n,a]:(Ze=r,r=o)}else Ze=r,r=o;r===o&&(r=null),Ce=e,e=Fe()}else Ze=e,e=o;return e}if((r=a())!==o&&Ze===t.length)return r;throw r!==o&&Ze<t.length&&We({type:"end"}),function(t,i,r){return new e(e.buildMessage(t,i),t,i,r)}(Be,Ee<t.length?t.charAt(Ee):null,Ee<t.length?Ve(Ee,Ee+1):Ve(Ee,Ee))}}},(r=p).exports&&(r.exports=o());var d=p.exports;function c(e){if(!e||0===e.length)return null;if("string"==typeof e){const t=m(e);return t&&0!==t.length?t:null}const t=e.map((e=>{if(!Number.isFinite(e.scale)||e.scale<=0)throw new s.A("effect:invalid-scale","scale must be finite and greater than 0",{stop:e});return{scale:e.scale,effects:m(e.value)}}));t.sort(((e,t)=>t.effects.length-e.effects.length));for(let e=0;e<t.length-1;e++){if(!(0,u.mj)(t[e].effects,t[e+1].effects))throw new s.A("effect:interpolation-impossible","Cannot interpolate by scale between 2 lists of mixed effects",{a:t[e].effects,b:t[e+1].effects});(0,u.O9)(t[e].effects,t[e+1].effects)}return t.sort(((e,t)=>t.scale-e.scale)),t}function m(e){let t;if(!e)return[];try{t=d.parse(e)}catch(t){throw new s.A("effect:invalid-syntax","Invalid effect syntax",{value:e,error:t})}return t.map((e=>function(e){try{switch(e.name){case"grayscale":case"sepia":case"saturate":case"invert":case"brightness":case"contrast":return function(e){let t=1;return y(e.parameters,1),1===e.parameters.length&&(t=g(e.parameters[0])),new l.yG(e.name,t)}(e);case"opacity":return function(e){let t=1;return y(e.parameters,1),1===e.parameters.length&&(t=g(e.parameters[0])),new l.jm(t)}(e);case"hue-rotate":return function(e){let t=0;return y(e.parameters,1),1===e.parameters.length&&(t=function(e){return function(e){if("quantity"!==e.type||!(0===e.value&&null===e.unit||e.unit&&null!=b[e.unit]))throw new s.A("effect:type-error",`Expected <angle>, Actual: ${f(e)}`,{term:e})}(e),e.value*b[e.unit]||0}(e.parameters[0])),new l.Nd(t)}(e);case"blur":return function(e){let t=0;return y(e.parameters,1),1===e.parameters.length&&(t=T(e.parameters[0]),h(t,e.parameters[0])),new l.Fk(t)}(e);case"drop-shadow":return function(e){const t=[];let i=null;for(const r of e.parameters)if("color"===r.type){if(t.length&&Object.freeze(t),i)throw new s.A("effect:type-error","Accepts only one color",{});i=w(r)}else{const e=T(r);if(Object.isFrozen(t))throw new s.A("effect:type-error","<length> parameters not consecutive",{lengths:t});t.push(e),3===t.length&&h(e,r)}if(t.length<2||t.length>3)throw new s.A("effect:type-error",`Expected <length>{2,3}, Actual: <length>{${t.length}}`,{lengths:t});return new l.$b(t[0],t[1],t[2]||0,i||S("black"))}(e);case"bloom":return function(e){let t=1,i=0,r=0;return y(e.parameters,3),e.parameters[0]&&(t=g(e.parameters[0])),e.parameters[1]&&(i=T(e.parameters[1]),h(i,e.parameters[1])),e.parameters[2]&&(r=g(e.parameters[2])),new l.bv(t,i,r)}(e)}}catch(t){throw t.details.filter=e,t}throw new s.A("effect:unknown-effect",`Effect '${e.name}' is not supported`,{effect:e})}(e)))}function y(e,t){if(e.length>t)throw new s.A("effect:type-error",`Function supports up to ${t} parameters, Actual: ${e.length}`,{parameters:e})}function f(e){if("color"===e.type)return"<color>";if(e.unit){if(e.unit in v)return"<length>";if(e.unit in b)return"<angle>";if("%"===e.unit)return"<percentage>"}return"<double>"}function h(e,t){if(e<0)throw new s.A("effect:type-error",`Negative values are not allowed, Actual: ${e}`,{term:t})}const b={deg:1,grad:.9,rad:180/Math.PI,turn:360},v={px:1,cm:96/2.54,mm:96/2.54/10,in:96,pc:16,pt:96/72};function g(e){!function(e){if("quantity"!==e.type||null!==e.unit&&"%"!==e.unit)throw new s.A("effect:type-error",`Expected <double> or <percentage>, Actual: ${f(e)}`,{term:e})}(e);const t=e.value;return h(t,e),"%"===e.unit?.01*t:t}function T(e){return function(e){if("quantity"!==e.type||!(0===e.value&&null===e.unit||e.unit&&null!=v[e.unit]))throw new s.A("effect:type-error",`Expected <length>, Actual: ${f(e)}`,{term:e})}(e),e.value*v[e.unit]||0}function w(e){switch(e.colorType){case"hex":return(0,a.qh)(e.value);case"named":return S(e.value);case"function":return function(e){if(y(e.parameters,4),A.test(e.name))return[g(e.parameters[0]),g(e.parameters[1]),g(e.parameters[2]),e.parameters[3]?g(e.parameters[3]):1];if(_.test(e.name))return(0,a.z$)(function(e){return function(e){if("quantity"!==e.type||null!==e.unit)throw new s.A("effect:type-error",`Expected <double>, Actual: ${f(e)}`,{term:e})}(e),h(e.value,e),e.value}(e.parameters[0]),g(e.parameters[1]),g(e.parameters[2]),e.parameters[3]?g(e.parameters[3]):1);throw new s.A("effect:syntax-error",`Invalid color function '${e.name}'`,{colorFunction:e})}(e.value)}}function S(e){if(!(0,a.V6)(e))throw new s.A("effect:unknown-color",`color '${e}' isn't valid`,{namedColor:e});return(0,a.c4)(e)}const A=/^rgba?/i,_=/^hsla?/i;function M(e,t,i){try{return function(e){if(!e||0===e.length)return null;if(function(e){const t=e[0];return!!t&&"scale"in t}(e)){const t=[];for(const i of e)t.push({scale:i.scale,value:O(i.value)});return t}return O(e)}(e)}catch(e){i?.messages?.push(e)}return null}function N(e,t,i,r){try{const r=function(e){const t=c(e);return t?(0,u.dw)(t)?t.map((e=>e.toJSON())):t.map((({scale:e,effects:t})=>({scale:e,value:t.map((e=>e.toJSON()))}))):null}(e);(0,n.sM)(i,r,t)}catch(e){r.messages&&r.messages.push(e)}}function O(e){if(!e?.length)return"";const t=[];for(const i of e){let e=[];switch(i.type){case"grayscale":case"sepia":case"saturate":case"invert":case"brightness":case"contrast":case"opacity":e=[I(i,"amount")];break;case"blur":e=[I(i,"radius","pt")];break;case"hue-rotate":e=[I(i,"angle","deg")];break;case"drop-shadow":e=[I(i,"xoffset","pt"),I(i,"yoffset","pt"),I(i,"blurRadius","pt"),x(i,"color")];break;case"bloom":e=[I(i,"strength"),I(i,"radius","pt"),I(i,"threshold")]}const r=`${i.type}(${e.filter(Boolean).join(" ")})`;c(r),t.push(r)}return t.join(" ")}function I(e,t,i){if(null==e[t])throw new s.A("effect:missing-parameter",`Missing parameter '${t}' in ${e.type} effect`,{effect:e});return i?e[t]+i:""+e[t]}function x(e,t){if(null==e[t])throw new s.A("effect:missing-parameter",`Missing parameter '${t}' in ${e.type} effect`,{effect:e});const i=e[t];return`rgba(${i[0]||0}, ${i[1]||0}, ${i[2]||0}, ${i[3]/255||0})`}},63074:(e,t,i)=>{i.d(t,{d:()=>l});var r=i(90237),o=i(10107),s=(i(44208),i(53966),i(87811),i(40608)),n=i(76369);const a={read:{reader:n.LF},write:{allowNull:!0,writer:n.M9}},l=e=>{let t=class extends e{constructor(){super(...arguments),this.blendMode="normal",this.effect=null}};return(0,r._)([(0,o.MZ)({type:["average","color-burn","color-dodge","color","darken","destination-atop","destination-in","destination-out","destination-over","difference","exclusion","hard-light","hue","invert","lighten","lighter","luminosity","minus","multiply","normal","overlay","plus","reflect","saturation","screen","soft-light","source-atop","source-in","source-out","vivid-light","xor"],nonNullable:!0,json:{read:!1,write:!1,origins:{"web-map":{read:!0,write:!0},"portal-item":{read:!0,write:!0}}}})],t.prototype,"blendMode",void 0),(0,r._)([(0,o.MZ)({json:{read:!1,write:!1,origins:{"web-map":a,"portal-item":a}}})],t.prototype,"effect",void 0),t=(0,r._)([(0,s.$)("esri.layers.mixins.BlendLayer")],t),t}},8303:(e,t,i)=>{i.d(t,{A:()=>S});var r=i(90237),o=i(92602),s=i(70333),n=i(78888),a=i(60999),l=i(49186),u=i(53966),p=i(97768),d=i(74887),c=i(84952),m=i(10107),y=(i(44208),i(87811),i(36005)),f=i(40608),h=i(43937),b=i(83531),v=i(20655),g=i(80812),T=i(41318),w=i(10407);const S=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,p.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,i){if(t.itemId)return new g.default({id:t.itemId,portal:i?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:r}=await Promise.all([i.e(5356),i.e(8823)]).then(i.bind(i,41204));return(0,d.Te)(t),await r({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,d.zf)(e)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,d.QP)(e),!0))))}async setUserPrivileges(e,t){if(!o.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:i,fullEdit:r},content:{updateItem:o}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",i),this._set("userHasFullEditingPrivileges",r),this._set("userHasUpdateItemPrivileges",o)}catch(e){(0,d.QP)(e)}}async _fetchUserPrivileges(e,t){let i=this.portalItem;if(!e||!i||!i.loaded||i.sourceUrl)return this._fetchFallbackUserPrivileges(t);const r=e===i.id;if(r&&i.portal.user)return(0,w.It)(i);let o,n;if(r)o=i.portal.url;else try{o=await(0,b.wI)(this.url,t)}catch(e){(0,d.QP)(e)}if(!o||!(0,c.b8)(o,i.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;n=await(s.id?.getCredential(`${o}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,d.QP)(e)}const a=!0,l=!1,u=!1;if(!n)return{features:{edit:a,fullEdit:l},content:{updateItem:u}};try{if(r?await i.reload():(i=new g.default({id:e,portal:{url:o}}),await i.load(t)),i.portal.user)return(0,w.It)(i)}catch(e){(0,d.QP)(e)}return{features:{edit:a,fullEdit:l},content:{updateItem:u}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,d.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?s.id?.findCredential(this.url):null;if(!t)return!0;const i=A.credential===t?A.user:await this._fetchEditingUser(e);return A.credential=t,A.user=i,null==i?.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const i=s.id.findServerInfo(this.url??"");if(!i?.owningSystemUrl)return null;const r=`${i.owningSystemUrl}/sharing/rest`,o=v.A.getDefault();if(o&&o.loaded&&(0,c.S8)(o.restUrl)===(0,c.S8)(r))return o.user;const l=`${r}/community/self`,u=null!=e?e.signal:null,p=await(0,a.Ke)((0,n.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?T.A.fromJSON(p.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const i=t?.portal,r=this.portalItem?.id&&(this.portalItem.portal||v.A.getDefault());return i&&r&&!(0,c.ut)(r.restUrl,i.restUrl)?(t.messages&&t.messages.push(new l.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,r._)([(0,m.MZ)({type:g.default})],t.prototype,"portalItem",null),(0,r._)([(0,y.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,r._)([(0,h.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,r._)([(0,m.MZ)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,r._)([(0,m.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,r._)([(0,m.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,r._)([(0,m.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,r._)([(0,f.$)("esri.layers.mixins.PortalLayer")],t),t},A={credential:null,user:null}},25036:(e,t,i)=>{i.d(t,{j:()=>n});var r=i(90237),o=i(10107),s=(i(44208),i(53966),i(87811),i(40608));const n=e=>{let t=class extends e{constructor(){super(...arguments),this.minScale=0,this.maxScale=0}get effectiveScaleRange(){const e={minScale:this.minScale,maxScale:this.maxScale},t=this.parent;t&&"effectiveScaleRange"in t&&function(e,t){e.minScale=e.minScale>0?t.minScale>0?Math.min(e.minScale,t.minScale):e.minScale:t.minScale,e.maxScale=e.maxScale>0?t.maxScale>0?Math.max(e.maxScale,t.maxScale):e.maxScale:t.maxScale}(e,t.effectiveScaleRange);const i=this._get("effectiveScaleRange");return i&&i.minScale===e.minScale&&i.maxScale===e.maxScale?i:e}};return(0,r._)([(0,o.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"minScale",void 0),(0,r._)([(0,o.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"maxScale",void 0),(0,r._)([(0,o.MZ)({readOnly:!0})],t.prototype,"effectiveScaleRange",null),t=(0,r._)([(0,s.$)("esri.layers.mixins.ScaleRangeLayer")],t),t}},20437:(e,t,i)=>{i.d(t,{A:()=>h});var r,o=i(90237),s=i(66552),n=i(25482),a=i(10107),l=i(56507),u=(i(87811),i(44208),i(93223)),p=i(36005),d=i(40608),c=i(72088),m=i(98453);const y=new s.J({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let f=r=class extends n.oY{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let i=null;try{i=t?JSON.parse(t):null}catch(e){}return i?.value??null}readValueType(e,{description:t}){let i=null;try{i=t?JSON.parse(t):null}catch(e){}return i?y.fromJSON(i.fieldValueType):null}clone(){return new r({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain?.clone()??null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,o._)([(0,a.MZ)({type:String,json:{write:!0}})],f.prototype,"alias",void 0),(0,o._)([(0,a.MZ)({type:[String,Number],json:{write:{allowNull:!0}}})],f.prototype,"defaultValue",void 0),(0,o._)([(0,a.MZ)()],f.prototype,"description",void 0),(0,o._)([(0,p.w)("description")],f.prototype,"readDescription",null),(0,o._)([(0,a.MZ)({types:c.gK,json:{read:{reader:c.rS},write:!0}})],f.prototype,"domain",void 0),(0,o._)([(0,a.MZ)({type:Boolean,json:{write:!0}})],f.prototype,"editable",void 0),(0,o._)([(0,a.MZ)({type:l.jz,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],f.prototype,"length",void 0),(0,o._)([(0,a.MZ)({type:String,json:{write:!0}})],f.prototype,"name",void 0),(0,o._)([(0,a.MZ)({type:Boolean,json:{write:!0}})],f.prototype,"nullable",void 0),(0,o._)([(0,u.e)(m.m)],f.prototype,"type",void 0),(0,o._)([(0,a.MZ)()],f.prototype,"valueType",void 0),(0,o._)([(0,p.w)("valueType",["description"])],f.prototype,"readValueType",null),(0,o._)([(0,a.MZ)({type:Boolean,json:{read:!1}})],f.prototype,"visible",void 0),f=r=(0,o._)([(0,d.$)("esri.layers.support.Field")],f);const h=f},95466:(e,t,i)=>{i.d(t,{A:()=>c});var r=i(49186),o=i(25482),s=i(53966),n=i(91869),a=i(3330),l=i(30524),u=i(56400),p=i(96285);const d=new Map;class c{static fromJSON(e){return new c(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new c(e.fields??[],h(e))}static fromLayerJSON(e){return new c(e.fields??[],h(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const i=[];for(const e of this.fields){const t=e?.name,r=y(t);if(t&&r){const o=m(t);this._fieldsMap.set(t,e),this._fieldsMap.set(o,e),this._normalizedFieldsMap.set(r,e),i.push(`${o}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,l.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,l.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,l.te)(e)||(0,l.Xz)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}i.sort(),this.uid=i.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,l.te)(e)||(0,l.Xz)(e)||e.nullable||void 0!==(0,l.lD)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(m(e))??this._normalizedFieldsMap.get(y(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(s.A.getLogger("esri.layers.support.FieldsIndex").error(new r.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),u.n$):f.has(t.type)?u.L5:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===u.L5?a.GB.instance:t===u.n$?p.mQ.utcInstance:(0,n.tE)(d,t,(()=>p.oh.create(t))):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,l.OH)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map((e=>(0,o.Wj)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function m(e){return e.trim().toLowerCase()}function y(e){return(0,l.rS)(e)?.toLowerCase()??""}const f=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function h(e){const t=new Map;if(!e.fields)return t;const i=!0===e.datesInUnknownTimezone,{timeInfo:r,editFieldsInfo:o}=e,s=(r?"startField"in r?r.startField:r.startTimeField:"")??"",n=(r?"endField"in r?r.endField:r.endTimeField:"")??"",a=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,u.ZS)(e.dateFieldsTimeReference):null,l=o?function(e){return"timeZone"in e}(o)?o.timeZone??a:o.dateFieldsTimeReference?(0,u.ZS)(o.dateFieldsTimeReference):a??u.n$:null,p=r?function(e){return"timeZone"in e}(r)?r.timeZone??a:r.timeReference?(0,u.ZS)(r.timeReference):a:null,d=new Map([[m(o?.creationDateField??""),l],[m(o?.editDateField??""),l],[m(s),p],[m(n),p]]);for(const{name:r,type:o}of e.fields)if(f.has(o))t.set(r,u.L5);else if("date"!==o&&"esriFieldTypeDate"!==o)t.set(r,null);else if(i)t.set(r,u.L5);else{const e=d.get(m(r??""))??a;t.set(r,e)}return t}},72088:(e,t,i)=>{i.d(t,{rS:()=>_,gK:()=>A}),i(44208);var r,o=i(90237),s=i(4718),n=i(10107),a=(i(53966),i(93223)),l=i(40608),u=i(25482);i(87811);let p=r=class extends u.oY{constructor(e){super(e),this.name=null,this.code=null}clone(){return new r({name:this.name,code:this.code})}};(0,o._)([(0,n.MZ)({type:String,json:{write:!0}})],p.prototype,"name",void 0),(0,o._)([(0,n.MZ)({type:[String,Number],json:{write:!0}})],p.prototype,"code",void 0),p=r=(0,o._)([(0,l.$)("esri.layers.support.CodedValue")],p);const d=new(i(66552).J)({inherited:"inherited",codedValue:"coded-value",range:"range"});let c=class extends u.oY{constructor(e){super(e),this.name=null,this.type=null}};(0,o._)([(0,n.MZ)({type:String,json:{write:!0}})],c.prototype,"name",void 0),(0,o._)([(0,a.e)(d)],c.prototype,"type",void 0),c=(0,o._)([(0,l.$)("esri.layers.support.Domain")],c);const m=c;var y;let f=y=class extends m{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const i=String(e);this.codedValues.some((e=>(String(e.code)===i&&(t=e.name),!!t)))}return t}clone(){return new y({codedValues:(0,s.o8)(this.codedValues),name:this.name})}};(0,o._)([(0,n.MZ)({type:[p],json:{write:!0}})],f.prototype,"codedValues",void 0),(0,o._)([(0,a.e)({codedValue:"coded-value"})],f.prototype,"type",void 0),f=y=(0,o._)([(0,l.$)("esri.layers.support.CodedValueDomain")],f);const h=f;var b;i(49186);let v=b=class extends m{constructor(e){super(e),this.type="inherited"}clone(){return new b}};(0,o._)([(0,a.e)({inherited:"inherited"})],v.prototype,"type",void 0),v=b=(0,o._)([(0,l.$)("esri.layers.support.InheritedDomain")],v);const g=v;var T;let w=T=class extends m{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new T({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,o._)([(0,n.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,i){t[i]=[this.minValue||0,e]}}}})],w.prototype,"maxValue",void 0),(0,o._)([(0,n.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,i){t[i]=[e,this.maxValue||0]}}}})],w.prototype,"minValue",void 0),(0,o._)([(0,a.e)({range:"range"})],w.prototype,"type",void 0),w=T=(0,o._)([(0,l.$)("esri.layers.support.RangeDomain")],w);const S=w,A={key:"type",base:m,typeMap:{range:w,"coded-value":h,inherited:g}};function _(e){if(!e?.type)return null;switch(e.type){case"range":return S.fromJSON(e);case"codedValue":return h.fromJSON(e);case"inherited":return g.fromJSON(e)}return null}},98453:(e,t,i)=>{i.d(t,{m:()=>r});const r=new(i(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},92300:(e,t,i)=>{i.d(t,{V:()=>s,X:()=>o});var r=i(65864);function o(e){return{geometryType:(0,r.$B)(e[0]),geometries:e.map((e=>e.toJSON()))}}function s(e,t,i){const o=(0,r.xD)(t);return e.map((e=>{const t=o.fromJSON(e);return t.spatialReference=i,t}))}},22671:(e,t,i)=>{i.d(t,{A:()=>g});var r,o=i(90237),s=i(59456),n=i(52106),a=i(66552),l=i(25482),u=i(4718),p=i(10107),d=(i(44208),i(53966),i(36005)),c=i(40608),m=i(43937),y=i(16930),f=i(65864),h=i(20437);const b=new a.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let v=r=class extends l.oY{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const i=y.A.fromJSON(t.spatialReference),r=[];for(let t=0;t<e.length;t++){const o=e[t],s=n.A.fromJSON(o),a=o.geometry?.spatialReference;null==s.geometry||a||(s.geometry.spatialReference=i);const l=o.aggregateGeometries,u=s.aggregateGeometries;if(l&&null!=u)for(const e in u){const t=u[e],r=l[e],o=r?.spatialReference;null==t||o||(t.spatialReference=i)}r.push(s)}return r}writeGeometryType(e,t,i,r){if(e)return void b.write(e,t,i,r);const{features:o}=this;if(o)for(const e of o)if(null!=e?.geometry)return void b.write(e.geometry.type,t,i,r)}readQueryGeometry(e,t){if(!e)return null;const i=!!e.spatialReference,r=(0,f.rS)(e);return r&&!i&&t.spatialReference&&(r.spatialReference=y.A.fromJSON(t.spatialReference)),r}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:i}=this;if(i)for(const e of i)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new r(this.cloneProperties())}cloneProperties(){return(0,u.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let i=0;i<t.features.length;i++){const r=t.features[i];if(r.geometry){const t=e?.[i];r.geometry=t?.toJSON()||r.geometry}}return t}quantize(e){const{scale:[t,i],translate:[r,o]}=e,s=this.features,n=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-r)/t)),(e=>Math.round((o-e)/i)));for(let e=0,t=s.length;e<t;e++)n?.(s[e].geometry)||(s.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:i}=this;if(!i)return this;const{translate:[r,o],scale:[s,n]}=i;let a=null,l=null;if(this.hasZ&&null!=i?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=i;a=i=>i*t+e}if(this.hasM&&null!=i?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=i;l=i=>null==i?i:i*t+e}const u=this._getHydrationFunction(e,(e=>e*s+r),(e=>o-e*n),a,l);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}_quantizePoints(e,t,i){let r,o;const s=[];for(let n=0,a=e.length;n<a;n++){const a=e[n];if(n>0){const e=t(a[0]),n=i(a[1]);e===r&&n===o||(s.push([e-r,n-o]),r=e,o=n)}else r=t(a[0]),o=i(a[1]),s.push([r,o])}return s.length>0?s:null}_getQuantizationFunction(e,t,i){return"point"===e?e=>(e.x=t(e.x),e.y=i(e.y),e):"polyline"===e||"polygon"===e?e=>{const r=(0,f.Bi)(e)?e.rings:e.paths,o=[];for(let e=0,s=r.length;e<s;e++){const s=r[e],n=this._quantizePoints(s,t,i);n&&o.push(n)}return o.length>0?((0,f.Bi)(e)?e.rings=o:e.paths=o,e):null}:"multipoint"===e?e=>{const r=this._quantizePoints(e.points,t,i);return r&&r.length>0?(e.points=r,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,i,r,o){return"point"===e?e=>{e.x=t(e.x),e.y=i(e.y),r&&(e.z=r(e.z))}:"polyline"===e||"polygon"===e?e=>{const s=(0,f.Bi)(e)?e.rings:e.paths;let n,a;for(let e=0,r=s.length;e<r;e++){const r=s[e];for(let e=0,o=r.length;e<o;e++){const o=r[e];e>0?(n+=o[0],a+=o[1]):(n=o[0],a=o[1]),o[0]=t(n),o[1]=i(a)}}if(r&&o)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,i=t.length;e<i;e++){const i=t[e];i[2]=r(i[2]),i[3]=o(i[3])}}else if(r)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,i=t.length;e<i;e++){const i=t[e];i[2]=r(i[2])}}else if(o)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,i=t.length;e<i;e++){const i=t[e];i[2]=o(i[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=i(e.ymin),e.xmax=t(e.xmax),e.ymax=i(e.ymax),r&&null!=e.zmax&&null!=e.zmin&&(e.zmax=r(e.zmax),e.zmin=r(e.zmin)),o&&null!=e.mmax&&null!=e.mmin&&(e.mmax=o(e.mmax),e.mmin=o(e.mmin))}:"multipoint"===e?e=>{const s=e.points;let n,a;for(let e=0,r=s.length;e<r;e++){const r=s[e];e>0?(n+=r[0],a+=r[1]):(n=r[0],a=r[1]),r[0]=t(n),r[1]=i(a)}if(r&&o)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=r(t[2]),t[3]=o(t[3])}else if(r)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=r(t[2])}else if(o)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=o(t[2])}}:null}};(0,o._)([(0,p.MZ)({type:String,json:{write:!0}})],v.prototype,"displayFieldName",void 0),(0,o._)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"exceededTransferLimit",void 0),(0,o._)([(0,p.MZ)({type:[n.A],json:{write:!0}})],v.prototype,"features",void 0),(0,o._)([(0,d.w)("features")],v.prototype,"readFeatures",null),(0,o._)([(0,p.MZ)({type:[h.A],json:{write:!0}})],v.prototype,"fields",void 0),(0,o._)([(0,p.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:b.read}}})],v.prototype,"geometryType",void 0),(0,o._)([(0,m.K)("geometryType")],v.prototype,"writeGeometryType",null),(0,o._)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasM",void 0),(0,o._)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasZ",void 0),(0,o._)([(0,p.MZ)({types:s.yR,json:{write:!0}})],v.prototype,"queryGeometry",void 0),(0,o._)([(0,d.w)("queryGeometry")],v.prototype,"readQueryGeometry",null),(0,o._)([(0,p.MZ)({type:y.A,json:{write:!0}})],v.prototype,"spatialReference",void 0),(0,o._)([(0,m.K)("spatialReference")],v.prototype,"writeSpatialReference",null),(0,o._)([(0,p.MZ)({json:{write:!0}})],v.prototype,"transform",void 0),v=r=(0,o._)([(0,c.$)("esri.rest.support.FeatureSet")],v),v.prototype.toJSON.isDefaultToJSON=!0;const g=v},2272:(e,t,i)=>{i.d(t,{Dl:()=>n,jV:()=>s,lF:()=>a}),i(92602),i(70333);var r=i(4718),o=i(84952);function s(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function n(e){return"string"==typeof e?(0,o.An)(e):(0,r.o8)(e)}function a(e,t,i){const r={};for(const o in e){if("declaredClass"===o)continue;const s=e[o];if(null!=s&&"function"!=typeof s)if(Array.isArray(s))r[o]=s.map((e=>a(e)));else if("object"==typeof s)if(s.toJSON){const e=s.toJSON(i?.[o]);r[o]=t?e:JSON.stringify(e)}else r[o]=t?s:JSON.stringify(s);else r[o]=s}return r}i(926)}}]);