@arcgis/core 4.28.0-next.20230920 → 4.28.0-next.20230921

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 (146) hide show
  1. package/WebScene.js +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/1cbaba30f55f00f7498b.js +1 -0
  4. package/assets/esri/core/workers/chunks/21a9c8aa2a9e9990df41.js +1 -0
  5. package/assets/esri/core/workers/chunks/24629402c647ef6b5f6b.js +1 -0
  6. package/assets/esri/core/workers/chunks/{b428fcb53ecc82b49e66.js → 332689bf60d246485993.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{b558a402e2ce2616cf37.js → 3ca759f72d3bb29e9ea9.js} +22 -22
  8. package/assets/esri/core/workers/chunks/4339ce8aaf87fabb80cc.js +1 -0
  9. package/assets/esri/core/workers/chunks/4369a6c1e0a82ab4db6a.js +1 -0
  10. package/assets/esri/core/workers/chunks/43ba2bacd0f7d19915f7.js +1 -0
  11. package/assets/esri/core/workers/chunks/44b8e75593b7df1843e1.js +1 -0
  12. package/assets/esri/core/workers/chunks/53097659f31750c03a6d.js +1 -0
  13. package/assets/esri/core/workers/chunks/{7c72d5368bb2d7484b9b.js → 580039dd491854ca325c.js} +1 -1
  14. package/assets/esri/core/workers/chunks/59c00d6fba0fd1c03d01.js +1 -0
  15. package/assets/esri/core/workers/chunks/5edb99b58549cd66b394.js +1 -0
  16. package/assets/esri/core/workers/chunks/6203ddf6caad3d356327.js +1 -0
  17. package/assets/esri/core/workers/chunks/652749dc847fcb887234.js +1 -0
  18. package/assets/esri/core/workers/chunks/74d3ecb1a06d9f81e2c5.js +1 -0
  19. package/assets/esri/core/workers/chunks/7ea33aa455c5143affb1.js +1 -0
  20. package/assets/esri/core/workers/chunks/90771b0de3e520a1df9a.js +1 -0
  21. package/assets/esri/core/workers/chunks/a277c980ba8704939688.js +1 -0
  22. package/assets/esri/core/workers/chunks/bbc0dcd316c5598bc9ad.js +1 -0
  23. package/assets/esri/core/workers/chunks/bc1dc6383e60e7e61d50.js +1 -0
  24. package/assets/esri/core/workers/chunks/c4bb67150ccd01ea6014.js +1 -0
  25. package/assets/esri/core/workers/chunks/{aa021bc97b4a18a749dd.js → cad260881653567bc8f9.js} +1 -1
  26. package/assets/esri/core/workers/chunks/cec607d0138351a4952e.js +1 -0
  27. package/assets/esri/core/workers/chunks/{f147269d85adfb4588ed.js → d9061beaa43065316062.js} +1 -1
  28. package/assets/esri/core/workers/chunks/e55f7fc7eff0074ce0fc.js +1 -0
  29. package/assets/esri/core/workers/chunks/{9c40e7ed387071544f8c.js → ed1fbc1bc8d50453e2f5.js} +1 -1
  30. package/assets/esri/core/workers/chunks/eef27d305023034084a4.js +1 -0
  31. package/assets/esri/images/portal/onlinemedialayer16.png +0 -0
  32. package/chunks/LaserlinePath.glsl.js +5 -1
  33. package/core/sql.js +1 -1
  34. package/interfaces.d.ts +1 -17
  35. package/layers/graphics/sources/WFSSourceWorker.js +1 -1
  36. package/layers/mixins/SceneService.js +1 -1
  37. package/layers/save/utils.js +1 -1
  38. package/layers/support/editableLayers.js +1 -1
  39. package/package.json +1 -1
  40. package/portal/PortalItem.js +1 -1
  41. package/rest/geometryService/cut.js +1 -1
  42. package/rest/query/operations/query.js +1 -1
  43. package/rest/versionManagement/deleteVersion.js +1 -1
  44. package/rest/versionManagement/gdbVersion/alterVersion.js +1 -1
  45. package/rest/versionManagement/gdbVersion/post.js +1 -1
  46. package/rest/versionManagement/gdbVersion/reconcile.js +1 -1
  47. package/rest/versionManagement/gdbVersion/serverVersionUtils.js +5 -0
  48. package/support/revision.js +1 -1
  49. package/views/2d/engine/Stage.js +1 -1
  50. package/views/3d/analysis/Dimension/LengthDimensionSubTool.js +1 -1
  51. package/views/3d/analysis/Dimension/lengthDimensionConstraintUtils.js +1 -1
  52. package/views/3d/analysis/Slice/RotateManipulator.js +1 -1
  53. package/views/3d/environment/LocalAtmosphere.js +1 -1
  54. package/views/3d/interactive/manipulatorUtils.js +1 -1
  55. package/views/3d/interactive/visualElements/MeasurementAreaVisualElement.js +1 -1
  56. package/views/3d/interactive/visualElements/OutlineVisualElement.js +1 -1
  57. package/views/3d/interactive/visualElements/PointVisualElement.js +1 -1
  58. package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
  59. package/views/3d/layers/MediaLayerView3D.js +1 -1
  60. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  61. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  62. package/views/3d/layers/graphics/ElevationAligners.js +1 -1
  63. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  64. package/views/3d/layers/graphics/Graphics3DLineCalloutSymbolLayer.js +1 -1
  65. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  66. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  67. package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
  68. package/views/3d/layers/graphics/polygonUtils.js +1 -1
  69. package/views/3d/layers/graphics/wosrLoader.js +1 -1
  70. package/views/3d/layers/i3s/I3SUtil.js +1 -1
  71. package/views/3d/layers/support/HeatmapFeatureProcessor.js +1 -1
  72. package/views/3d/layers/support/overlayImageUtils.js +1 -1
  73. package/views/3d/layers/support/patternUtils.js +1 -1
  74. package/views/3d/support/dito.js +1 -1
  75. package/views/3d/support/engineContent/line.js +1 -1
  76. package/views/3d/support/pointsOfInterest/CenterOnSurface.js +1 -1
  77. package/views/3d/support/pointsOfInterest/Focus.js +1 -1
  78. package/views/3d/terrain/TerrainRenderer.js +1 -1
  79. package/views/3d/webgl-engine/collections/Component/ComponentIntersectionData.js +1 -1
  80. package/views/3d/webgl-engine/collections/Component/IntersectionGeometry.js +1 -1
  81. package/views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js +6 -6
  82. package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
  83. package/views/3d/webgl-engine/lib/Attribute.js +1 -1
  84. package/views/3d/webgl-engine/lib/BoundingInfo.js +1 -1
  85. package/views/3d/webgl-engine/lib/Camera.js +1 -1
  86. package/views/3d/webgl-engine/lib/Geometry.js +1 -1
  87. package/views/3d/webgl-engine/lib/GeometryUtil.js +1 -1
  88. package/views/3d/webgl-engine/lib/GridLocalOriginFactory.js +1 -1
  89. package/views/3d/webgl-engine/lib/PathGeometryData.js +1 -1
  90. package/views/3d/webgl-engine/lib/RenderGeometry.js +1 -1
  91. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  92. package/views/3d/webgl-engine/lib/geometryDataUtils.js +1 -1
  93. package/views/3d/webgl-engine/lib/lodRendering/LodResources.js +1 -1
  94. package/views/3d/webgl-engine/materials/DefaultBufferWriter.js +1 -1
  95. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  96. package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +1 -1
  97. package/views/3d/webgl-engine/materials/ImageMaterial.js +1 -1
  98. package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
  99. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  100. package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
  101. package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
  102. package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
  103. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  104. package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
  105. package/views/3d/webgl-engine/materials/internal/MaterialUtil.js +1 -1
  106. package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
  107. package/views/draw/DrawGraphicTool.js +1 -1
  108. package/views/interactive/keybindings.js +1 -1
  109. package/views/interactive/tooltip/SketchTooltipInfo.js +1 -1
  110. package/views/interactive/tooltip/TooltipEditableField.js +1 -1
  111. package/views/interactive/tooltip/content/Fields.js +5 -0
  112. package/views/interactive/tooltip/content/TooltipContentDrawPoint.js +1 -1
  113. package/views/interactive/tooltip/content/TooltipContentDrawPolygon.js +1 -1
  114. package/views/interactive/tooltip/content/TooltipContentDrawPolyline.js +1 -1
  115. package/webdoc/saveAPIKeyUtils.js +5 -0
  116. package/webdoc/webdocSaveUtils.js +1 -1
  117. package/widgets/BasemapGallery.js +1 -1
  118. package/widgets/BasemapLayerList.js +1 -1
  119. package/widgets/Expand.js +1 -1
  120. package/widgets/Feature/FeatureRelationship.js +1 -1
  121. package/widgets/Fullscreen.js +1 -1
  122. package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
  123. package/widgets/Swipe.js +1 -1
  124. package/widgets/support/globalCss.js +1 -1
  125. package/assets/esri/core/workers/chunks/034accc7cab6c88a3b31.js +0 -1
  126. package/assets/esri/core/workers/chunks/084a85e2e31b4d5fa924.js +0 -1
  127. package/assets/esri/core/workers/chunks/1a449168d30a688e6128.js +0 -1
  128. package/assets/esri/core/workers/chunks/21f0fafafcd754f5fb88.js +0 -1
  129. package/assets/esri/core/workers/chunks/273167b2dd46e58b8739.js +0 -1
  130. package/assets/esri/core/workers/chunks/2bf58296a6ea4eee960b.js +0 -1
  131. package/assets/esri/core/workers/chunks/3c2c64832fb498bbaa83.js +0 -1
  132. package/assets/esri/core/workers/chunks/4b3a5cc435435c81e6a5.js +0 -1
  133. package/assets/esri/core/workers/chunks/56afd89d08c874f620a1.js +0 -1
  134. package/assets/esri/core/workers/chunks/6108d72faf48a592c8ba.js +0 -1
  135. package/assets/esri/core/workers/chunks/74ddc14e4b576ddbb582.js +0 -1
  136. package/assets/esri/core/workers/chunks/7f680cf24dd97d61bcd2.js +0 -1
  137. package/assets/esri/core/workers/chunks/9b54b5bdb6367c36f6e9.js +0 -1
  138. package/assets/esri/core/workers/chunks/a838dc6653ec29503053.js +0 -1
  139. package/assets/esri/core/workers/chunks/b10a91cae610aba62bf8.js +0 -1
  140. package/assets/esri/core/workers/chunks/b8eb842ea98a9734e161.js +0 -1
  141. package/assets/esri/core/workers/chunks/bbb63392485ed57703e0.js +0 -1
  142. package/assets/esri/core/workers/chunks/bdf13091bd0e1ab0db7e.js +0 -1
  143. package/assets/esri/core/workers/chunks/c88869d2a647c22dc3e6.js +0 -1
  144. package/assets/esri/core/workers/chunks/e54ae2a4281dd58e0707.js +0 -1
  145. package/assets/esri/core/workers/chunks/e5fcfd41f0ec12dcb7f2.js +0 -1
  146. package/assets/esri/core/workers/chunks/f07a0ea10428adecea1a.js +0 -1
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8008,8062],{71592:(e,a,t)=>{t.d(a,{w:()=>u});var r=t(40330),n=t(3172),i=t(20102),l=t(95330),s=t(66677),c=t(48522),o=t(15235);async function u(e,a){const t=(0,s.Qc)(e);if(!t)throw new i.Z("invalid-url","Invalid scene service url");const u={...a,sceneServerUrl:t.url.path,layerId:t.sublayer??void 0};if(u.sceneLayerItem??=await async function(e){const a=(await y(e)).serviceItemId;if(!a)return null;const t=new o.default({id:a,apiKey:e.apiKey}),i=await async function(e){const a=r.id?.findServerInfo(e.sceneServerUrl);if(a?.owningSystemUrl)return a.owningSystemUrl;const t=e.sceneServerUrl.replace(/(.*\/rest)\/.*/i,"$1")+"/info";try{const a=(await(0,n.Z)(t,{query:{f:"json"},responseType:"json",signal:e.signal})).data.owningSystemUrl;if(a)return a}catch(e){(0,l.r9)(e)}return null}(e);null!=i&&(t.portal=new c.Z({url:i}));try{return t.load({signal:e.signal})}catch(e){return(0,l.r9)(e),null}}(u),null==u.sceneLayerItem)return d(u.sceneServerUrl.replace("/SceneServer","/FeatureServer"),u);const f=await async function({sceneLayerItem:e,signal:a}){if(!e)return null;try{const t=(await e.fetchRelatedItems({relationshipType:"Service2Service",direction:"reverse"},{signal:a})).find((e=>"Feature Service"===e.type))||null;if(!t)return null;const r=new o.default({portal:t.portal,id:t.id});return await r.load(),r}catch(e){return(0,l.r9)(e),null}}(u);if(!f?.url)throw new i.Z("related-service-not-found","Could not find feature service through portal item relationship");const p=await d(f.url,u);return p.portalItem=f,p}async function y(e){if(e.rootDocument)return e.rootDocument;const a={query:{f:"json",token:e.apiKey},responseType:"json",signal:e.signal};try{const t=await(0,n.Z)(e.sceneServerUrl,a);e.rootDocument=t.data}catch{e.rootDocument={}}return e.rootDocument}async function d(e,a){const t=(0,s.Qc)(e);if(!t)throw new i.Z("invalid-feature-service-url","Invalid feature service url");const r=t.url.path,l=a.layerId;if(null==l)return{serverUrl:r};const c=y(a),o=e=>{const t={query:{f:"json"},responseType:"json",authMode:e,signal:a.signal};return(0,n.Z)(r,t)},u=o("anonymous").catch((()=>o("no-prompt"))),[d,f]=await Promise.all([u,c]),p=f&&f.layers,m=d.data&&d.data.layers;if(!Array.isArray(m))throw new Error("expected layers array");if(Array.isArray(p)){for(let e=0;e<Math.min(p.length,m.length);e++)if(p[e].id===l)return{serverUrl:r,layerId:m[e].id}}else if(null!=l&&l<m.length)return{serverUrl:r,layerId:m[l].id};throw new Error("could not find matching associated sublayer")}},52104:(e,a,t)=>{t.d(a,{V:()=>n});var r=t(96187);async function n(e,a){const t=await(0,r.T)(e,a);t.layers=t.layers.filter(i);const n={serviceJSON:t};if((t.currentVersion??0)<10.5)return n;const l=await(0,r.T)(e+"/layers",a);return n.layersJSON={layers:l.layers.filter(i),tables:l.tables},n}function i(e){return!e.type||"Feature Layer"===e.type||"Oriented Imagery Layer"===e.type}},87344:(e,a,t)=>{t.d(a,{T:()=>r});const r={BingMapsLayer:async()=>(await Promise.all([t.e(163),t.e(4609),t.e(8153)]).then(t.bind(t,2723))).default,BuildingSceneLayer:async()=>(await Promise.all([t.e(163),t.e(4609),t.e(9790),t.e(8775),t.e(3928),t.e(3547),t.e(6569),t.e(1423),t.e(4165),t.e(3778),t.e(6404),t.e(8654),t.e(9238),t.e(6170),t.e(3975),t.e(1161),t.e(3554)]).then(t.bind(t,30223))).default,CSVLayer:async()=>(await Promise.all([t.e(163),t.e(4609),t.e(9790),t.e(8775),t.e(3928),t.e(3547),t.e(6569),t.e(1423),t.e(4165),t.e(3778),t.e(6404),t.e(8654),t.e(9238),t.e(3584)]).then(t.bind(t,45425))).default,DimensionLayer:async()=>(await Promise.all([t.e(163),t.e(9717)]).then(t.bind(t,40081))).default,ElevationLayer:async()=>(await Promise.all([t.e(163),t.e(6569),t.e(9016),t.e(2763)]).then(t.bind(t,65665))).default,FeatureLayer:async()=>(await Promise.all([t.e(163),t.e(4609),t.e(9790),t.e(8775),t.e(3928),t.e(3547),t.e(6569),t.e(1423),t.e(4165),t.e(3778),t.e(6404),t.e(8654),t.e(9238),t.e(7520)]).then(t.bind(t,19238))).default,GeoJSONLayer:async()=>(await Promise.all([t.e(163),t.e(4609),t.e(9790),t.e(8775),t.e(3928),t.e(3547),t.e(6569),t.e(1423),t.e(4165),t.e(3778),t.e(6404),t.e(9069)]).then(t.bind(t,23477))).default,GeoRSSLayer:async()=>(await Promise.all([t.e(163),t.e(4609),t.e(9790),t.e(1043)]).then(t.bind(t,3723))).default,GroupLayer:async()=>(await Promise.all([t.e(163),t.e(4609),t.e(9059)]).then(t.bind(t,40504))).default,ImageryLayer:async()=>(await Promise.all([t.e(163),t.e(4609),t.e(9790),t.e(8775),t.e(3928),t.e(3547),t.e(6569),t.e(4165),t.e(4599),t.e(6610),t.e(3663),t.e(4608)]).then(t.bind(t,60590))).default,ImageryTileLayer:async()=>(await Promise.all([t.e(163),t.e(4609),t.e(9790),t.e(8775),t.e(3928),t.e(3547),t.e(6569),t.e(6610),t.e(4136),t.e(3663),t.e(5913)]).then(t.bind(t,74878))).default,IntegratedMeshLayer:async()=>(await Promise.all([t.e(163),t.e(3975),t.e(1537)]).then(t.bind(t,9310))).default,KMLLayer:async()=>(await Promise.all([t.e(163),t.e(4609),t.e(9790),t.e(8775),t.e(3928),t.e(3547),t.e(1423),t.e(6472)]).then(t.bind(t,42756))).default,LineOfSightLayer:async()=>(await Promise.all([t.e(163),t.e(4998)]).then(t.bind(t,21786))).default,LinkChartLayer:async()=>(await Promise.all([t.e(4609),t.e(9790),t.e(8775),t.e(3928),t.e(3547),t.e(6569),t.e(1423),t.e(4165),t.e(6404),t.e(8968),t.e(5286),t.e(801)]).then(t.bind(t,19087))).default,MapImageLayer:async()=>(await Promise.all([t.e(163),t.e(4609),t.e(9790),t.e(8775),t.e(3928),t.e(3547),t.e(1423),t.e(4165),t.e(3778),t.e(4599),t.e(2863),t.e(7374)]).then(t.bind(t,27374))).default,MapNotesLayer:async()=>(await Promise.all([t.e(163),t.e(4609),t.e(9790),t.e(8775),t.e(3928),t.e(3547),t.e(6569),t.e(1423),t.e(4165),t.e(3778),t.e(6404),t.e(8654),t.e(9238),t.e(2575)]).then(t.bind(t,62128))).default,MediaLayer:async()=>(await Promise.all([t.e(163),t.e(4609),t.e(4828)]).then(t.bind(t,57765))).default,OGCFeatureLayer:async()=>(await Promise.all([t.e(163),t.e(4609),t.e(9790),t.e(8775),t.e(3928),t.e(3547),t.e(1423),t.e(4165),t.e(3778),t.e(6404),t.e(2341)]).then(t.bind(t,88068))).default,OpenStreetMapLayer:async()=>(await Promise.all([t.e(163),t.e(4609),t.e(9971),t.e(6237)]).then(t.bind(t,66237))).default,OrientedImageryLayer:async()=>(await Promise.all([t.e(163),t.e(4609),t.e(9790),t.e(8775),t.e(3928),t.e(3547),t.e(6569),t.e(1423),t.e(4165),t.e(3778),t.e(6404),t.e(8654),t.e(9238),t.e(6964)]).then(t.bind(t,76604))).default,PointCloudLayer:async()=>(await Promise.all([t.e(163),t.e(8775),t.e(3975),t.e(8643),t.e(6138)]).then(t.bind(t,10608))).default,RouteLayer:async()=>(await Promise.all([t.e(163),t.e(4609),t.e(9790),t.e(8775),t.e(3928),t.e(3547),t.e(1423),t.e(261)]).then(t.bind(t,40153))).default,SceneLayer:async()=>(await Promise.all([t.e(163),t.e(9790),t.e(8775),t.e(3928),t.e(3547),t.e(1423),t.e(4165),t.e(3778),t.e(6170),t.e(3975),t.e(1161),t.e(1174)]).then(t.bind(t,57476))).default,StreamLayer:async()=>(await Promise.all([t.e(163),t.e(4609),t.e(9790),t.e(8775),t.e(3928),t.e(3547),t.e(1423),t.e(4165),t.e(3778),t.e(6404),t.e(7132)]).then(t.bind(t,88387))).default,SubtypeGroupLayer:async()=>(await Promise.all([t.e(163),t.e(4609),t.e(9790),t.e(8775),t.e(3928),t.e(3547),t.e(1423),t.e(4165),t.e(3778),t.e(8654),t.e(8324),t.e(2596)]).then(t.bind(t,20697))).default,TileLayer:async()=>(await Promise.all([t.e(163),t.e(4609),t.e(9790),t.e(8775),t.e(3928),t.e(3547),t.e(1423),t.e(4165),t.e(3778),t.e(4599),t.e(9016),t.e(2863),t.e(8636)]).then(t.bind(t,98636))).default,UnknownLayer:async()=>(await t.e(4166).then(t.bind(t,44166))).default,UnsupportedLayer:async()=>(await t.e(9296).then(t.bind(t,39296))).default,VectorTileLayer:async()=>(await Promise.all([t.e(163),t.e(4609),t.e(9016),t.e(4325),t.e(9805),t.e(5481)]).then(t.bind(t,94756))).default,VoxelLayer:async()=>(await Promise.all([t.e(163),t.e(8775),t.e(3975),t.e(9327)]).then(t.bind(t,28865))).default,WFSLayer:async()=>(await Promise.all([t.e(163),t.e(4609),t.e(9790),t.e(8775),t.e(3928),t.e(3547),t.e(6569),t.e(1423),t.e(4165),t.e(3778),t.e(6404),t.e(6506)]).then(t.bind(t,12653))).default,WMSLayer:async()=>(await Promise.all([t.e(163),t.e(4609),t.e(9790),t.e(8775),t.e(1574)]).then(t.bind(t,25906))).default,WMTSLayer:async()=>(await Promise.all([t.e(163),t.e(4609),t.e(9971),t.e(2594)]).then(t.bind(t,72594))).default,WebTileLayer:async()=>(await Promise.all([t.e(163),t.e(4609),t.e(9971)]).then(t.bind(t,16199))).default}},33516:(e,a,t)=>{t.d(a,{Y:()=>l,h:()=>i});var r=t(17452),n=t(48522);function i(e){return{origin:"portal-item",url:(0,r.mN)(e.itemUrl),portal:e.portal||n.Z.getDefault(),portalItem:e,readResourcePaths:[]}}function l(e){return{origin:"portal-item",messages:[],writtenProperties:[],url:e.itemUrl?(0,r.mN)(e.itemUrl):null,portal:e.portal||n.Z.getDefault(),portalItem:e}}},18062:(e,a,t)=>{t.d(a,{$O:()=>b,CD:()=>p,Ld:()=>d,Ok:()=>S,Q4:()=>g,XX:()=>v,_Y:()=>I,load:()=>f});var r=t(20102),n=t(66677),i=t(71592),l=t(52104),s=t(87344),c=t(48522),o=t(33516),u=t(40555),y=t(96187);class d{constructor(){this._serviceMetadatas=new Map}async fetchServiceMetadata(e,a){const t=this._serviceMetadatas.get(e);if(t)return t;const r=await(0,y.T)(e,a);return this._serviceMetadatas.set(e,r),r}}async function f(e,a){const t=e.instance.portalItem;if(t&&t.id)return await t.load(a),function(e){const a=e.instance.portalItem;if(!a?.type||!e.supportedTypes.includes(a.type))throw new r.Z("portal:invalid-layer-item-type","Invalid layer item type '${type}', expected '${expectedType}'",{type:a?.type,expectedType:e.supportedTypes.join(", ")})}(e),async function(e,a){const t=e.instance,n=t.portalItem;if(!n)return;const{url:i,title:s}=n,c=(0,o.h)(n);if("group"===t.type)return t.read({title:s},c),async function(e,a){let t;const{portalItem:n}=e;if(!n)return;const i=n.type,s=a.layerModuleTypeMap;switch(i){case"Feature Service":case"Feature Collection":t=s.FeatureLayer;break;case"Stream Service":t=s.StreamLayer;break;case"Scene Service":t=s.SceneLayer;break;default:throw new r.Z("portal:unsupported-item-type-as-group",`The item type '${i}' is not supported as a 'IGroupLayer'`)}const c=new d;let[o,u]=await Promise.all([t(),L(a,c)]),f=()=>o;if("Feature Service"===i){u=n.url?await b(u,n.url,c):{};const a=v(u),t=I(u),r=[];if(a.length||t?.length){a.length&&r.push("SubtypeGroupLayer"),t?.length&&r.push("OrientedImageryLayer");const e=[];for(const a of r){const t=s[a];e.push(t())}const n=await Promise.all(e),i=new Map;r.forEach(((e,a)=>{i.set(e,n[a])})),f=e=>e.layerType?i.get(e.layerType)??o:o}const i=await async function(e){const{layersJSON:a}=await(0,l.V)(e);if(!a)return null;const t=[...a.layers,...a.tables];return e=>t.find((a=>a.id===e.id))}(n.url);return await w(e,f,u,i)}return"Scene Service"===i&&n.url&&(u=await p(n,u,c)),g(u)>0?await w(e,f,u):await async function(e,a){const{portalItem:t}=e;if(!t?.url)return;const r=await(0,y.T)(t.url);r&&w(e,a,{layers:r.layers?.map(m),tables:r.tables?.map(m)})}(e,f)}(t,e);i&&t.read({url:i},c);const f=new d,h=await L(e,f,a);return h&&t.read(h,c),t.resourceReferences={portalItem:n,paths:c.readResourcePaths??[]},"subtype-group"!==t.type&&t.read({title:s},c),(0,u.y)(t,c)}(e,a)}async function p(e,a,t){if(!e?.url)return a??{};if(a??={},!a.layers){const r=await t.fetchServiceMetadata(e.url);a.layers=r.layers?.map(m)}const{serverUrl:r,portalItem:n}=await(0,i.w)(e.url,{sceneLayerItem:e}).catch((()=>({serverUrl:null,portalItem:null})));if(null==r)return a.tables=[],a;if(!a.tables&&n){const e=await n.fetchData();if(e?.tables)a.tables=e.tables.map(m);else{const e=await t.fetchServiceMetadata(r);a.tables=e?.tables?.map(m)}}if(a.tables)for(const e of a.tables)e.url=`${r}/${e.id}`;return a}function m(e){return{id:e.id,name:e.name}}async function w(e,a,t,r){let n=t.layers||[];const i=t.tables||[];if("Feature Collection"===e.portalItem?.type?(n.forEach(((e,a)=>{e.id=a,"Table"===e?.layerDefinition?.type&&i.push(e)})),n=n.filter((e=>"Table"!==e?.layerDefinition?.type))):(n.reverse(),i.reverse()),n.forEach((n=>{const i=r?.(n);if(i||!r){const r=h(e,a(n),t,n,i);e.add(r)}})),i.length){const a=await s.T.FeatureLayer();i.forEach((n=>{const i=r?.(n);if(i||!r){const r=h(e,a,t,n,i);e.tables.add(r)}}))}}function h(e,a,t,r,n){const i=e.portalItem,l={portalItem:i.clone(),layerId:r.id};null!=r.url&&(l.url=r.url);const s=new a(l);if("sourceJSON"in s&&(s.sourceJSON=n),"subtype-group"!==s.type&&(s.sublayerTitleMode="service-name"),"Feature Collection"===i.type){const e={origin:"portal-item",portal:i.portal||c.Z.getDefault()};s.read(r,e);const a=t.showLegend;null!=a&&s.read({showLegend:a},e)}return s}async function L(e,a,t){if(!1===e.supportsData)return;const r=e.instance,i=r.portalItem;if(!i)return;let l=null;try{l=await i.fetchData("json",t)}catch(e){}if(function(e){return"stream"!==e.type&&"layerId"in e}(r)){let e=null;const t=await async function(e,a,t){if(a?.layers&&a?.tables)return g(a);const r=(0,n.Qc)(e.url);if(!r)return 1;const i=await t.fetchServiceMetadata(r.url.path).catch((()=>null));return(a?.layers?.length??i?.layers?.length??0)+(a?.tables?.length??i?.tables?.length??0)}(i,l,a);if((l?.layers||l?.tables)&&t>0){if(null==r.layerId){const e=v(l);r.layerId="subtype-group"===r.type?e?.[0]:S(l)}e=function(e,a){const{layerId:t}=a,r=e.layers?.find((e=>e.id===t))||e.tables?.find((e=>e.id===t));return r&&function(e,a){return!("feature"===a.type&&"layerType"in e&&"SubtypeGroupLayer"===e.layerType||"subtype-group"===a.type&&!("layerType"in e))}(r,a)?r:null}(l,r),e&&null!=l.showLegend&&(e.showLegend=l.showLegend)}return t>1&&"sublayerTitleMode"in r&&"service-name"!==r.sublayerTitleMode&&(r.sublayerTitleMode="item-title-and-service-name"),e}return l}async function b(e,a,t){if(null==e?.layers||null==e?.tables){const r=await t.fetchServiceMetadata(a);(e=e||{}).layers=e.layers||r?.layers,e.tables=e.tables||r?.tables}return e}function S(e){const a=e.layers;if(a&&a.length)return a[0].id;const t=e.tables;return t&&t.length?t[0].id:null}function g(e){return(e?.layers?.length??0)+(e?.tables?.length??0)}function v(e){const a=[];return e?.layers?.forEach((e=>{"SubtypeGroupLayer"===e.layerType&&a.push(e.id)})),a}function I(e){return e?.layers?.filter((({layerType:e})=>"OrientedImageryLayer"===e)).map((({id:e})=>e))}},28008:(e,a,t)=>{t.d(a,{fromItem:()=>u,v:()=>y});var r=t(20102),n=t(71592),i=t(84230),l=t(87344),s=t(15235),c=t(18062),o=t(14661);async function u(e){!e.portalItem||e.portalItem instanceof s.default||(e={...e,portalItem:new s.default(e.portalItem)});const a=await async function(e){await e.load();const a=new c.Ld;return async function(e){const a=e.className,t=l.T[a];return{constructor:await t(),properties:e.properties}}(await y(e,a))}(e.portalItem);return new(0,a.constructor)({portalItem:e.portalItem,...a.properties})}async function y(e,a){switch(e.type){case"Map Service":return async function(e,a){return await async function(e,a){return(await a.fetchServiceMetadata(e.url)).tileInfo}(e,a)?{className:"TileLayer"}:{className:"MapImageLayer"}}(e,a);case"Feature Service":return async function(e,a){const t=await d(e,a);if("object"==typeof t){const e={};return null!=t.id&&(e.layerId=t.id),{className:t.className||"FeatureLayer",properties:e}}return{className:"GroupLayer"}}(e,a);case"Feature Collection":return async function(e){await e.load();const a=(0,o._$)(e,"Map Notes"),t=(0,o._$)(e,"Markup");if(a||t)return{className:"MapNotesLayer"};if((0,o._$)(e,"Route Layer"))return{className:"RouteLayer"};const r=await e.fetchData();return 1===(0,c.Q4)(r)?{className:"FeatureLayer"}:{className:"GroupLayer"}}(e);case"Scene Service":return async function(e,a){const t=await d(e,a,(async()=>{try{if(!e.url)return[];const{serverUrl:t}=await(0,n.w)(e.url,{sceneLayerItem:e}),r=await a.fetchServiceMetadata(t);return r?.tables??[]}catch{return[]}}));if("object"==typeof t){const r={};let n;if(null!=t.id?(r.layerId=t.id,n=`${e.url}/layers/${t.id}`):n=e.url,e.typeKeywords?.length)for(const a of Object.keys(i.fb))if(e.typeKeywords.includes(a))return{className:i.fb[a]};const l=await a.fetchServiceMetadata(n);return{className:i.fb[l?.layerType]||"SceneLayer",properties:r}}if(!1===t){const t=await a.fetchServiceMetadata(e.url);if("Voxel"===t?.layerType)return{className:"VoxelLayer"}}return{className:"GroupLayer"}}(e,a);case"Image Service":return async function(e,a){await e.load();const t=e.typeKeywords?.map((e=>e.toLowerCase()))??[];if(t.includes("elevation 3d layer"))return{className:"ElevationLayer"};if(t.includes("tiled imagery"))return{className:"ImageryTileLayer"};const r=await e.fetchData(),n=r?.layerType;if("ArcGISTiledImageServiceLayer"===n)return{className:"ImageryTileLayer"};if("ArcGISImageServiceLayer"===n)return{className:"ImageryLayer"};const i=await a.fetchServiceMetadata(e.url),l=i.cacheType?.toLowerCase(),s=i.capabilities?.toLowerCase().includes("tilesonly");return"map"===l||s?{className:"ImageryTileLayer"}:{className:"ImageryLayer"}}(e,a);case"Stream Service":case"Feed":return{className:"StreamLayer"};case"Vector Tile Service":return{className:"VectorTileLayer"};case"GeoJson":return{className:"GeoJSONLayer"};case"CSV":return{className:"CSVLayer"};case"KML":return{className:"KMLLayer"};case"WFS":return{className:"WFSLayer"};case"WMTS":return{className:"WMTSLayer"};case"WMS":return{className:"WMSLayer"};default:throw new r.Z("portal:unknown-item-type","Unknown item type '${type}'",{type:e.type})}}async function d(e,a,t){const r=e.url;if(!r||/\/\d+$/.test(r))return{};await e.load();let n=await e.fetchData();if("Feature Service"===e.type){const e=f(await(0,c.$O)(n,r,a));if("object"==typeof e){const a=(0,c.XX)(n),t=(0,c._Y)(n);e.className=null!=e.id&&a.includes(e.id)?"SubtypeGroupLayer":null!=e.id&&t?.includes(e.id)?"OrientedImageryLayer":"FeatureLayer"}return e}if("Scene Service"===e.type&&(n=await(0,c.CD)(e,n,a)),(0,c.Q4)(n)>0)return f(n);const i=await a.fetchServiceMetadata(r);return t&&(i.tables=await t()),f(i)}function f(e){return 1===(0,c.Q4)(e)&&{id:(0,c.Ok)(e)}}},40555:(e,a,t)=>{t.d(a,{y:()=>l});var r=t(66643),n=t(95330),i=t(20941);async function l(e,a,t){const l=e&&e.getAtOrigin&&e.getAtOrigin("renderer",a.origin);if(l&&"unique-value"===l.type&&l.styleOrigin){const s=await(0,r.q6)(l.populateFromStyle());if((0,n.k_)(t),!1===s.ok){const t=s.error;a&&a.messages&&a.messages.push(new i.Z("renderer:style-reference",`Failed to create unique value renderer from style reference: ${t.message}`,{error:t,context:a})),e.clear("renderer",a?.origin)}}}},96187:(e,a,t)=>{t.d(a,{T:()=>n});var r=t(3172);async function n(e,a){const{data:t}=await(0,r.Z)(e,{responseType:"json",query:{f:"json",...a?.customParameters,token:a?.apiKey}});return t}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[261,5732,2596],{5732:(e,t,i)=>{i.d(t,{c:()=>r,g:()=>o});var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},65845:(e,t,i)=>{i.d(t,{D:()=>o});var r=i(81153);function o(e){e&&e.writtenProperties&&e.writtenProperties.forEach((({target:e,propName:t,newOrigin:i})=>{(0,r.l)(e)&&i&&e.originOf(t)!==i&&e.updateOrigin(t,i)}))}},81153:(e,t,i)=>{function r(e){return e&&"getAtOrigin"in e&&"originOf"in e}i.d(t,{l:()=>r})},16306:(e,t,i)=>{i.d(t,{aX:()=>S});var r=i(68773),o=i(20102),s=i(92604),a=i(38913),l=i(58901),n=i(73913),u=i(8744),p=i(40488),d=(i(66577),i(3172)),c=i(33955),m=i(11282),y=i(17452);async function b(e,t,i){const r="string"==typeof e?(0,y.mN)(e):e,o=t[0].spatialReference,s=(0,c.Ji)(t[0]),a={...i,query:{...r.query,f:"json",sr:(0,u.B9)(o),geometries:JSON.stringify((n=t,{geometryType:(0,c.Ji)(n[0]),geometries:n.map((e=>e.toJSON()))}))}},{data:l}=await(0,d.Z)(r.path+"/simplify",a);var n;return function(e,t,i){const r=(0,c.q9)(t);return e.map((e=>{const t=r.fromJSON(e);return t.spatialReference=i,t}))}(l.geometries,s,o)}const h=s.Z.getLogger("esri.geometry.support.normalizeUtils");function f(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 l.Z||e instanceof a.Z)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw h.error(e),new o.Z(e)}const i=(0,n.x3)(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],a=e[r+1][0],l=e[r+1][1],n=Math.sqrt((a-o)*(a-o)+(l-s)*(l-s)),u=(l-s)/n,p=(a-o)/n,d=n/t;if(d>1){for(let e=1;e<=d-1;e++){const r=e*t,a=p*r+o,l=u*r+s;i.push([a,l])}const e=(n+Math.floor(d-1)*t)/2,r=p*e+o,a=u*e+s;i.push([r,a])}i.push([a,l])}}return function(e){return"polygon"===e.type}(e)?new a.Z({rings:r,spatialReference:e.spatialReference}):new l.Z({paths:r,spatialReference:e.spatialReference})}(e,1e6);e=(0,p.Sx)(t,!0)}return i&&(e=(0,n.Sy)(e,i)),e}function T(e,t,i){if(Array.isArray(e)){const r=e[0];if(r>t){const i=(0,n.XZ)(r,t);e[0]=r+i*(-2*t)}else if(r<i){const t=(0,n.XZ)(r,i);e[0]=r+t*(-2*i)}}else{const r=e.x;if(r>t){const i=(0,n.XZ)(r,t);e=e.clone().offset(i*(-2*t),0)}else if(r<i){const t=(0,n.XZ)(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],a=(0,n.x3)(s);for(let e=0;e<a.length;e++){const t=a[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,n.XZ)(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(f(e))for(const t of(0,n.x3)(s))e[o]=e[o].addRing(t);else if(v(e))for(const t of(0,n.x3)(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.default.geometryServiceUrl;let s,y,f,v,C,N,_,O,A=0;const D=[],I=[];for(const t of e)if(null!=t)if(s||(s=t.spatialReference,y=(0,u.C5)(s),f=s.isWebMercator,N=f?102100:4326,v=n.UZ[N].maxX,C=n.UZ[N].minX,_=n.UZ[N].plus180Line,O=n.UZ[N].minus180Line),y)if("mesh"===t.type)I.push(t);else if("point"===t.type)I.push(T(t.clone(),v,C));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>T(e,v,C))),I.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,y);I.push(e.rings?new a.Z(e):e)}else if(t.extent){const e=t.extent,i=(0,n.XZ)(e.xmin,C)*(2*v);let r=0===i?t.clone():(0,n.Sy)(t.clone(),i);e.offset(i,0),e.intersects(_)&&e.xmax!==v?(A=e.xmax>A?e.xmax:A,r=g(r,f),D.push(r),I.push("cut")):e.intersects(O)&&e.xmin!==C?(A=e.xmax*(2*v)>A?e.xmax*(2*v):A,r=g(r,f,360),D.push(r),I.push("cut")):I.push(r)}else I.push(t.clone());else I.push(t);else I.push(t);let x=(0,n.XZ)(A,v),F=-90;const j=x,B=new l.Z;for(;x>0;){const e=360*x-180;B.addPath([[e,F],[e,-1*F]]),F*=-1,x--}if(D.length>0&&j>0){const t=w(D,await async function(e,t,i,r){const o=(0,m.en)(e),s=t[0].spatialReference,a={...r,responseType:"json",query:{...o.query,f:"json",sr:(0,u.B9)(s),target:JSON.stringify({geometryType:(0,c.Ji)(t[0]),geometries:t}),cutter:JSON.stringify(i)}},l=await(0,d.Z)(o.path+"/cut",a),{cutIndexes:n,geometries:p=[]}=l.data;return{cutIndexes:n,geometries:p.map((e=>{const t=(0,c.im)(e);return t.spatialReference=s,t}))}}(o,D,B,i)),r=[],s=[];for(let i=0;i<I.length;i++){const o=I[i];if("cut"!==o)s.push(o);else{const o=t.shift(),a=e[i];null!=a&&"polygon"===a.type&&a.rings&&a.rings.length>1&&o.rings.length>=a.rings.length?(r.push(o),s.push("simplify")):s.push(f?(0,p.$)(o):o)}}if(!r.length)return s;const a=await b(o,r,i),l=[];for(let e=0;e<s.length;e++){const t=s[e];"simplify"!==t?l.push(t):l.push(f?(0,p.$)(a.shift()):a.shift())}return l}const E=[];for(let e=0;e<I.length;e++){const t=I[e];if("cut"!==t)E.push(t);else{const e=D.shift();E.push(!0===f?(0,p.$)(e):e)}}return E}},73913:(e,t,i)=>{i.d(t,{Sy:()=>n,UZ:()=>a,XZ:()=>l,x3:()=>u});var r=i(58901),o=i(82971),s=i(33955);const a={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new r.Z({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:o.Z.WebMercator}),minus180Line:new r.Z({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:o.Z.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new r.Z({paths:[[[180,-180],[180,180]]],spatialReference:o.Z.WGS84}),minus180Line:new r.Z({paths:[[[-180,-180],[-180,180]]],spatialReference:o.Z.WGS84})}};function l(e,t){return Math.ceil((e-t)/(2*t))}function n(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.oU)(e)?e.rings:e.paths}},40153:(e,t,i)=>{i.r(t),i.d(t,{default:()=>ui});var r=i(43697),o=i(68773),s=i(66577),a=i(38171),l=i(51773),n=(i(16050),i(12501),i(28756),i(92271),i(72529),i(5499),i(84382),i(81571),i(91423)),u=i(92604),p=i(46791),d=i(20102),c=i(16453),m=i(78286),y=i(95330),b=i(17445),h=i(67900),f=i(17452),v=i(5600),g=i(75215),T=i(67676),w=(i(80442),i(71715)),S=i(52011),C=i(30556),N=i(65845),_=i(6570),O=i(73615),A=i(8744),D=i(87085),I=i(71612),x=i(38009),F=i(16859),j=i(72965),B=i(66677),E=i(9790),M=i(96674),P=i(77987);let L=class extends M.wq{constructor(e){super(e),this.break=new P.Z({color:[255,255,255],size:12,outline:{color:[0,122,194],width:3}}),this.first=new P.Z({color:[0,255,0],size:20,outline:{color:[255,255,255],width:4}}),this.unlocated=new P.Z({color:[255,0,0],size:12,outline:{color:[255,255,255],width:3}}),this.last=new P.Z({color:[255,0,0],size:20,outline:{color:[255,255,255],width:4}}),this.middle=new P.Z({color:[51,51,51],size:12,outline:{color:[0,122,194],width:3}}),this.waypoint=new P.Z({color:[255,255,255],size:12,outline:{color:[0,122,194],width:3}})}};(0,r._)([(0,v.Cb)({types:E.LB})],L.prototype,"break",void 0),(0,r._)([(0,v.Cb)({types:E.LB})],L.prototype,"first",void 0),(0,r._)([(0,v.Cb)({types:E.LB})],L.prototype,"unlocated",void 0),(0,r._)([(0,v.Cb)({types:E.LB})],L.prototype,"last",void 0),(0,r._)([(0,v.Cb)({types:E.LB})],L.prototype,"middle",void 0),(0,r._)([(0,v.Cb)({types:E.LB})],L.prototype,"waypoint",void 0),L=(0,r._)([(0,S.j)("esri.layers.support.RouteStopSymbols")],L);const R=L;var U=i(4095),J=i(20256);let Z=class extends M.wq{constructor(e){super(e),this.directionLines=new U.Z({color:[0,122,194],width:6}),this.directionPoints=new P.Z({color:[255,255,255],size:6,outline:{color:[0,122,194],width:2}}),this.pointBarriers=new P.Z({style:"x",size:10,outline:{color:[255,0,0],width:3}}),this.polygonBarriers=new J.Z({color:[255,170,0,.6],outline:{width:7.5,color:[255,0,0,.6]}}),this.polylineBarriers=new U.Z({width:7.5,color:[255,85,0,.7]}),this.routeInfo=new U.Z({width:8,color:[20,89,127]}),this.stops=new R}};(0,r._)([(0,v.Cb)({types:E.LB})],Z.prototype,"directionLines",void 0),(0,r._)([(0,v.Cb)({types:E.LB})],Z.prototype,"directionPoints",void 0),(0,r._)([(0,v.Cb)({types:E.LB})],Z.prototype,"pointBarriers",void 0),(0,r._)([(0,v.Cb)({types:E.LB})],Z.prototype,"polygonBarriers",void 0),(0,r._)([(0,v.Cb)({types:E.LB})],Z.prototype,"polylineBarriers",void 0),(0,r._)([(0,v.Cb)({types:E.LB})],Z.prototype,"routeInfo",void 0),(0,r._)([(0,v.Cb)({type:R})],Z.prototype,"stops",void 0),Z=(0,r._)([(0,S.j)("esri.layers.support.RouteSymbols")],Z);const k=Z;var W=i(48522),V=i(15235),q=i(14661),G=i(3172),z=i(11282),H=i(36030),K=i(35454);const X=(0,K.w)()({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"}),$=(0,K.w)()({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,K.w)()({esriNAUDays:"days",esriNAUHours:"hours",esriNAUMinutes:"minutes",esriNAUSeconds:"seconds"}),(0,K.w)()({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"})),Q=(0,K.w)()({esriDOTComplete:"complete",esriDOTCompleteNoEvents:"complete-no-events",esriDOTFeatureSets:"featuresets",esriDOTInstructionsOnly:"instructions-only",esriDOTStandard:"standard",esriDOTSummaryOnly:"summary-only"}),ee=(0,K.w)()({esriNAOutputLineNone:"none",esriNAOutputLineStraight:"straight",esriNAOutputLineTrueShape:"true-shape",esriNAOutputLineTrueShapeWithMeasure:"true-shape-with-measure"}),te=((0,K.w)()({esriNAOutputPolygonNone:"none",esriNAOutputPolygonSimplified:"simplified",esriNAOutputPolygonDetailed:"detailed"}),(0,K.w)()({esriNFSBAllowBacktrack:"allow-backtrack",esriNFSBAtDeadEndsOnly:"at-dead-ends-only",esriNFSBNoBacktrack:"no-backtrack",esriNFSBAtDeadEndsAndIntersections:"at-dead-ends-and-intersections"})),ie=((0,K.w)()({esriNATravelDirectionFromFacility:"from-facility",esriNATravelDirectionToFacility:"to-facility"}),(0,K.w)()({esriNATimeOfDayNotUsed:"not-used",esriNATimeOfDayUseAsStartTime:"start",esriNATimeOfDayUseAsEndTime:"end"}),(0,K.w)()({AUTOMOBILE:"automobile",TRUCK:"truck",WALK:"walk",OTHER:"other"})),re=(0,K.w)()({0:"either-side-of-vehicle",1:"right-side-of-vehicle",2:"left-side-of-vehicle",3:"no-u-turn"},{useNumericKeys:!0}),oe=(0,K.w)()({0:"stop",1:"waypoint",2:"break"},{useNumericKeys:!0}),se=(0,K.w)()({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}),ae=(0,K.w)()({1:"right",2:"left"},{useNumericKeys:!0}),le=(0,K.w)()({0:"restriction",1:"scaled-cost",2:"added-cost"},{useNumericKeys:!0}),ne=(0,K.w)()({0:"permit",1:"restrict"},{useNumericKeys:!0}),ue=(0,K.w)()({1:"header",50:"arrive",51:"depart",52:"straight",100:"on-ferry",101:"off-ferry",102:"central-fork",103:"roundabout",104:"u-turn",150:"door",151:"stairs",152:"elevator",153:"escalator",154:"pedestrian-ramp",200:"left-fork",201:"left-ramp",202:"clockwise-roundabout",203:"left-handed-u-turn",204:"bear-left",205:"left-turn",206:"sharp-left",207:"left-turn-and-immediate-left-turn",208:"left-turn-and-immediate-right-turn",300:"right-fork",301:"right-ramp",302:"counter-clockwise-roundabout",303:"right-handed-u-turn",304:"bear-right",305:"right-turn",306:"sharp-right",307:"right-turn-and-immediate-left-turn",308:"right-turn-and-immediate-right-turn",400:"up-elevator",401:"up-escalator",402:"up-stairs",500:"down-elevator",501:"down-escalator",502:"down-stairs",1e3:"general-event",1001:"landmark",1002:"time-zone-change",1003:"traffic-event",1004:"scaled-cost-barrier-event",1005:"boundary-crossing",1006:"restriction-violation"},{useNumericKeys:!0}),pe=(0,K.w)()({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}),de=(0,K.w)()({"NA Campus":"campus","NA Desktop":"desktop","NA Navigation":"navigation"}),ce=(0,K.w)()({Kilometers:"kilometers",Miles:"miles",Meters:"meters"},{ignoreUnknown:!1}),me=(0,K.w)()({Minutes:"minutes",TimeAt1KPH:"time-at-1-kph",TravelTime:"travel-time",TruckMinutes:"truck-minutes",TruckTravelTime:"truck-travel-time",WalkTime:"walk-time"},{ignoreUnknown:!1}),ye=(0,K.w)()({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}),be=(0,K.w)()({"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}),he=(0,K.w)()({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),fe=(0,K.w)()({esriGeometryPoint:"point",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"envelope",esriGeometryMultipoint:"multipoint"}),ve=(0,K.w)()({esriNAUTCost:"cost",esriNAUTDescriptor:"descriptor",esriNAUTRestriction:"restriction",esriNAUTHierarchy:"hierarchy"}),ge=(0,K.w)()({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 Te=class extends M.wq{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.Cb)({type:String})],Te.prototype,"dataType",void 0),(0,r._)([(0,H.J)(ye,{ignoreUnknown:!1})],Te.prototype,"name",void 0),(0,r._)([(0,v.Cb)({type:[String]})],Te.prototype,"parameterNames",void 0),(0,r._)([(0,v.Cb)({type:String})],Te.prototype,"restrictionUsageParameterName",void 0),(0,r._)([(0,H.J)(me,{ignoreUnknown:!1})],Te.prototype,"timeNeutralAttributeName",void 0),(0,r._)([(0,v.Cb)({type:String})],Te.prototype,"trafficSupport",void 0),(0,r._)([(0,H.J)(Y)],Te.prototype,"units",void 0),(0,r._)([(0,H.J)(ve)],Te.prototype,"usageType",void 0),Te=(0,r._)([(0,S.j)("esri.rest.support.NetworkAttribute")],Te);const we=Te;let Se=class extends M.wq{constructor(e){super(e),this.buildTime=null,this.name=null,this.networkAttributes=null,this.networkSources=null,this.state=null}};(0,r._)([(0,v.Cb)({type:Number})],Se.prototype,"buildTime",void 0),(0,r._)([(0,v.Cb)({type:String})],Se.prototype,"name",void 0),(0,r._)([(0,v.Cb)({type:[we]})],Se.prototype,"networkAttributes",void 0),(0,r._)([(0,v.Cb)()],Se.prototype,"networkSources",void 0),(0,r._)([(0,v.Cb)({type:String})],Se.prototype,"state",void 0),Se=(0,r._)([(0,S.j)("esri.rest.support.NetworkDataset")],Se);const Ce=Se;var Ne=i(2368);let _e=class extends((0,Ne.J)(M.wq)){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=>be.fromJSON(e)))}writeRestrictionAttributes(e,t,i){null!=e&&(t[i]=e.map((e=>be.toJSON(e))))}};(0,r._)([(0,v.Cb)({type:[Object],json:{write:!0}})],_e.prototype,"attributeParameterValues",void 0),(0,r._)([(0,v.Cb)({type:String,json:{write:!0}})],_e.prototype,"description",void 0),(0,r._)([(0,H.J)(ce,{ignoreUnknown:!1})],_e.prototype,"distanceAttributeName",void 0),(0,r._)([(0,v.Cb)({type:String,json:{write:!0}})],_e.prototype,"id",void 0),(0,r._)([(0,w.r)("id",["id","itemId"])],_e.prototype,"readId",null),(0,r._)([(0,H.J)(ye,{ignoreUnknown:!1})],_e.prototype,"impedanceAttributeName",void 0),(0,r._)([(0,v.Cb)({type:String,json:{write:!0}})],_e.prototype,"name",void 0),(0,r._)([(0,v.Cb)({type:[String],json:{write:!0}})],_e.prototype,"restrictionAttributeNames",void 0),(0,r._)([(0,w.r)("restrictionAttributeNames")],_e.prototype,"readRestrictionAttributes",null),(0,r._)([(0,C.c)("restrictionAttributeNames")],_e.prototype,"writeRestrictionAttributes",null),(0,r._)([(0,v.Cb)({type:Number,json:{write:{allowNull:!0}}})],_e.prototype,"simplificationTolerance",void 0),(0,r._)([(0,H.J)(X)],_e.prototype,"simplificationToleranceUnits",void 0),(0,r._)([(0,H.J)(me,{ignoreUnknown:!1})],_e.prototype,"timeAttributeName",void 0),(0,r._)([(0,H.J)(ie)],_e.prototype,"type",void 0),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],_e.prototype,"useHierarchy",void 0),(0,r._)([(0,H.J)(te)],_e.prototype,"uturnAtJunctions",void 0),_e=(0,r._)([(0,S.j)("esri.rest.support.TravelMode")],_e);const Oe=_e;let Ae=class extends M.wq{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=>ye.fromJSON(e)))}writeAccumulateAttributes(e,t,i){null!=e&&e.length&&(t[i]=e.map((e=>ye.toJSON(e))))}readDefaultTravelMode(e,t){const i=t.supportedTravelModes?.find((({id:e})=>e===t.defaultTravelMode))??t.supportedTravelModes?.find((({itemId:e})=>e===t.defaultTravelMode));return i?Oe.fromJSON(i):null}};(0,r._)([(0,v.Cb)()],Ae.prototype,"accumulateAttributeNames",void 0),(0,r._)([(0,w.r)("accumulateAttributeNames")],Ae.prototype,"readAccumulateAttributes",null),(0,r._)([(0,C.c)("accumulateAttributeNames")],Ae.prototype,"writeAccumulateAttributes",null),(0,r._)([(0,v.Cb)()],Ae.prototype,"attributeParameterValues",void 0),(0,r._)([(0,v.Cb)()],Ae.prototype,"currentVersion",void 0),(0,r._)([(0,v.Cb)()],Ae.prototype,"defaultTravelMode",void 0),(0,r._)([(0,w.r)("defaultTravelMode",["defaultTravelMode","supportedTravelModes"])],Ae.prototype,"readDefaultTravelMode",null),(0,r._)([(0,v.Cb)()],Ae.prototype,"directionsLanguage",void 0),(0,r._)([(0,H.J)($)],Ae.prototype,"directionsLengthUnits",void 0),(0,r._)([(0,v.Cb)()],Ae.prototype,"directionsSupportedLanguages",void 0),(0,r._)([(0,H.J)(me,{ignoreUnknown:!1})],Ae.prototype,"directionsTimeAttribute",void 0),(0,r._)([(0,v.Cb)()],Ae.prototype,"hasZ",void 0),(0,r._)([(0,H.J)(ye,{ignoreUnknown:!1})],Ae.prototype,"impedance",void 0),(0,r._)([(0,v.Cb)({type:Ce})],Ae.prototype,"networkDataset",void 0),(0,r._)([(0,v.Cb)({type:[Oe]})],Ae.prototype,"supportedTravelModes",void 0),Ae=(0,r._)([(0,S.j)("esri.rest.support.NetworkServiceDescription")],Ae);const De=Ae,Ie=u.Z.getLogger("esri.rest.networkService");function xe(e,t,i,r){r[i]=[t.length,t.length+e.length],e.forEach((e=>{t.push(e.geometry)}))}async function Fe(e,t,i){if(!e)throw new d.Z("network-service:missing-url","Url to Network service is missing");const r=(0,z.lA)({f:"json",token:t},i),{data:o}=await(0,G.Z)(e,r),s=o.currentVersion>=10.4?async function(e,t,i){try{const r=(0,z.lA)({f:"json",token:t},i),o=(0,f.Qj)(e)+"/retrieveTravelModes",{data:{supportedTravelModes:s,defaultTravelMode:a}}=await(0,G.Z)(o,r);return{supportedTravelModes:s,defaultTravelMode:a}}catch(e){throw new d.Z("network-service:retrieveTravelModes","Could not get to the NAServer's retrieveTravelModes.",{error:e})}}(e,t,i):async function(e,t){const i=(0,z.lA)({f:"json"},t),{data:r}=await(0,G.Z)(e.replace(/\/rest\/.*$/i,"/info"),i);if(!r||!r.owningSystemUrl)return{supportedTravelModes:[],defaultTravelMode:null};const{owningSystemUrl:o}=r,s=(0,f.Qj)(o)+"/sharing/rest/portals/self",{data:a}=await(0,G.Z)(s,i),l=(0,m.hS)("helperServices.routingUtilities.url",a);if(!l)return{supportedTravelModes:[],defaultTravelMode:null};const n=(0,z.en)(o),u=/\/solve$/i.test(n.path)?"Route":/\/solveclosestfacility$/i.test(n.path)?"ClosestFacility":"ServiceAreas",p=(0,z.lA)({f:"json",serviceName:u},t),d=(0,f.Qj)(l)+"/GetTravelModes/execute",c=await(0,G.Z)(d,p),y=[];let b=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&&(b=t.value)}return{supportedTravelModes:y,defaultTravelMode:b}}(e,i),{defaultTravelMode:a,supportedTravelModes:l}=await s;return o.defaultTravelMode=a,o.supportedTravelModes=l,De.fromJSON(o)}var je=i(67723),Be=i(16306);function Ee(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[ye.fromJSON(r)]=e[o]}return i}function Me(e,t,i){if(null!=e){t.attributes||(t.attributes={});for(const r in e){const o=ye.toJSON(r);t.attributes[`${i}${o}`]=e[r]}}}function Pe(e){const t={};for(const i of Object.keys(e)){const r=i;t[ye.fromJSON(r)]=e[i]}return t}function Le(e){const t={};for(const i of Object.keys(e)){const r=i;t[ye.toJSON(r)]=e[i]}return t}function Re(e,t){return null==e||null==t?null:Math.round((e-t)/6e4)}function Ue(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 Je=i(74889);const Ze=new K.X({esriJobMessageTypeInformative:"informative",esriJobMessageTypeProcessDefinition:"process-definition",esriJobMessageTypeProcessStart:"process-start",esriJobMessageTypeProcessStop:"process-stop",esriJobMessageTypeWarning:"warning",esriJobMessageTypeError:"error",esriJobMessageTypeEmpty:"empty",esriJobMessageTypeAbort:"abort"});let ke=class extends M.wq{constructor(e){super(e),this.description=null,this.type=null}};(0,r._)([(0,v.Cb)({type:String,json:{write:!0}})],ke.prototype,"description",void 0),(0,r._)([(0,v.Cb)({type:String,json:{read:Ze.read,write:Ze.write}})],ke.prototype,"type",void 0),ke=(0,r._)([(0,S.j)("esri.rest.support.GPMessage")],ke);const We=ke,Ve=new K.X({0:"informative",1:"process-definition",2:"process-start",3:"process-stop",50:"warning",100:"error",101:"empty",200:"abort"});let qe=class extends We{constructor(e){super(e),this.type=null}};(0,r._)([(0,v.Cb)({type:String,json:{read:Ve.read,write:Ve.write}})],qe.prototype,"type",void 0),qe=(0,r._)([(0,S.j)("esri.rest.support.NAMessage")],qe);const Ge=qe;let ze=class extends M.wq{constructor(e){super(e)}};(0,r._)([(0,v.Cb)({json:{read:{source:"string"}}})],ze.prototype,"text",void 0),(0,r._)([(0,H.J)(ge,{name:"stringType"})],ze.prototype,"type",void 0),ze=(0,r._)([(0,S.j)("esri.rest.support.DirectionsString")],ze);const He=ze;var Ke=i(94139);let Xe=class extends M.wq{constructor(e){super(e),this.arriveTime=null,this.arriveTimeOffset=null,this.geometry=null,this.strings=null}readArriveTimeOffset(e,t){return Re(t.ETA,t.arriveTimeUTC)}readGeometry(e,t){return Ke.Z.fromJSON(t.point)}};(0,r._)([(0,v.Cb)({type:Date,json:{read:{source:"arriveTimeUTC"}}})],Xe.prototype,"arriveTime",void 0),(0,r._)([(0,v.Cb)()],Xe.prototype,"arriveTimeOffset",void 0),(0,r._)([(0,w.r)("arriveTimeOffset",["arriveTimeUTC","ETA"])],Xe.prototype,"readArriveTimeOffset",null),(0,r._)([(0,v.Cb)({type:Ke.Z})],Xe.prototype,"geometry",void 0),(0,r._)([(0,w.r)("geometry",["point"])],Xe.prototype,"readGeometry",null),(0,r._)([(0,v.Cb)({type:[He]})],Xe.prototype,"strings",void 0),Xe=(0,r._)([(0,S.j)("esri.rest.support.DirectionsEvent")],Xe);const $e=Xe;var Ye=i(58901);let Qe=class extends a.Z{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 a,l,n,u,p,d,c,m,y=0,b=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&&(b=p.indexOf("|")+1,c=parseInt(p[b],32),b++),2&e&&(h=p.indexOf("|",b)+1,m=parseInt(p[h],32),h++)}else d=parseInt(p[y],32),y++;for(;y<p.length&&"|"!==p[y];){a=parseInt(p[y],32)+t,y++,t=a,l=parseInt(p[y],32)+i,y++,i=l;const e=[a/d,l/d];b&&(u=parseInt(p[b],32)+r,b++,r=u,e.push(u/c)),h&&(n=parseInt(p[h],32)+o,h++,o=n,e.push(n/m)),s.push(e)}return{paths:[s],hasZ:b>0,hasM:h>0}}(t.compressedGeometry);return null!=i?Ye.Z.fromJSON(i):null}};(0,r._)([(0,v.Cb)({type:[$e]})],Qe.prototype,"events",void 0),(0,r._)([(0,w.r)("geometry",["compressedGeometry"])],Qe.prototype,"readGeometry",null),(0,r._)([(0,v.Cb)({type:[He]})],Qe.prototype,"strings",void 0),Qe=(0,r._)([(0,S.j)("esri.rest.support.DirectionsFeature")],Qe);const et=Qe;var tt=i(82971);let it=class extends Je.Z{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&&tt.Z.fromJSON(i);return e.map((e=>{const t=et.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.Z({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.Z({hasM:o,hasZ:s,paths:[r],spatialReference:t})}(this.features.map((({geometry:e})=>e)),this.extent.spatialReference):null}get strings(){return this.features.map((({strings:e})=>e)).flat().filter(T.pC)}};(0,r._)([(0,v.Cb)({type:_.Z,json:{read:{source:"summary.envelope"}}})],it.prototype,"extent",void 0),(0,r._)([(0,v.Cb)({nonNullable:!0})],it.prototype,"features",void 0),(0,r._)([(0,w.r)("features")],it.prototype,"readFeatures",null),(0,r._)([(0,v.Cb)()],it.prototype,"geometryType",void 0),(0,r._)([(0,v.Cb)({readOnly:!0})],it.prototype,"mergedGeometry",null),(0,r._)([(0,v.Cb)()],it.prototype,"routeId",void 0),(0,r._)([(0,v.Cb)()],it.prototype,"routeName",void 0),(0,r._)([(0,v.Cb)({value:null,readOnly:!0})],it.prototype,"strings",null),(0,r._)([(0,v.Cb)({json:{read:{source:"summary.totalDriveTime"}}})],it.prototype,"totalDriveTime",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"summary.totalLength"}}})],it.prototype,"totalLength",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"summary.totalTime"}}})],it.prototype,"totalTime",void 0),it=(0,r._)([(0,S.j)("esri.rest.support.DirectionsFeatureSet")],it);const rt=it;let ot=class extends M.wq{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.Cb)({type:Je.Z,json:{write:!0}})],ot.prototype,"directionLines",void 0),(0,r._)([(0,v.Cb)({type:Je.Z,json:{write:!0}})],ot.prototype,"directionPoints",void 0),(0,r._)([(0,v.Cb)({type:rt,json:{write:!0}})],ot.prototype,"directions",void 0),(0,r._)([(0,v.Cb)({type:a.Z,json:{write:!0}})],ot.prototype,"route",void 0),(0,r._)([(0,v.Cb)({type:String,json:{write:!0}})],ot.prototype,"routeName",void 0),(0,r._)([(0,v.Cb)({type:[a.Z],json:{write:!0}})],ot.prototype,"stops",void 0),(0,r._)([(0,v.Cb)({type:Je.Z,json:{write:!0}})],ot.prototype,"traversedEdges",void 0),(0,r._)([(0,v.Cb)({type:Je.Z,json:{write:!0}})],ot.prototype,"traversedJunctions",void 0),(0,r._)([(0,v.Cb)({type:Je.Z,json:{write:!0}})],ot.prototype,"traversedTurns",void 0),ot=(0,r._)([(0,S.j)("esri.rest.support.RouteResult")],ot);const st=ot;function at(e){return e?Je.Z.fromJSON(e).features.filter(T.pC):[]}let lt=class extends M.wq{constructor(e){super(e),this.messages=null,this.pointBarriers=null,this.polylineBarriers=null,this.polygonBarriers=null,this.routeResults=null}readPointBarriers(e,t){return at(t.barriers)}readPolylineBarriers(e){return at(e)}readPolygonBarriers(e){return at(e)}};(0,r._)([(0,v.Cb)({type:[Ge]})],lt.prototype,"messages",void 0),(0,r._)([(0,v.Cb)({type:[a.Z]})],lt.prototype,"pointBarriers",void 0),(0,r._)([(0,w.r)("pointBarriers",["barriers"])],lt.prototype,"readPointBarriers",null),(0,r._)([(0,v.Cb)({type:[a.Z]})],lt.prototype,"polylineBarriers",void 0),(0,r._)([(0,w.r)("polylineBarriers")],lt.prototype,"readPolylineBarriers",null),(0,r._)([(0,v.Cb)({type:[a.Z]})],lt.prototype,"polygonBarriers",void 0),(0,r._)([(0,w.r)("polygonBarriers")],lt.prototype,"readPolygonBarriers",null),(0,r._)([(0,v.Cb)({type:[st]})],lt.prototype,"routeResults",void 0),lt=(0,r._)([(0,S.j)("esri.rest.support.RouteSolveResult")],lt);const nt=lt;function ut(e){return e instanceof Je.Z}var pt;let dt=pt=class extends((0,Ne.J)(M.wq)){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 pt({directionLineType:pe.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?pe.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 a.Z({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};dt.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}],dt.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.Cb)({type:pe.apiValues,json:{read:{source:"attributes.DirectionLineType",reader:pe.read}}})],dt.prototype,"directionLineType",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.DirectionPointID"}}})],dt.prototype,"directionPointId",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.Meters"}}})],dt.prototype,"distance",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.Minutes"}}})],dt.prototype,"duration",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.FromLevel"}}})],dt.prototype,"fromLevel",void 0),(0,r._)([(0,v.Cb)({type:Ye.Z})],dt.prototype,"geometry",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.ObjectID"}}})],dt.prototype,"objectId",void 0),(0,r._)([(0,v.Cb)({type:l.Z})],dt.prototype,"popupTemplate",void 0),(0,r._)([(0,v.Cb)({types:E.LB})],dt.prototype,"symbol",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.ToLevel"}}})],dt.prototype,"toLevel",void 0),(0,r._)([(0,v.Cb)({readOnly:!0,json:{read:!1}})],dt.prototype,"type",void 0),dt=pt=(0,r._)([(0,S.j)("esri.rest.support.DirectionLine")],dt);const ct=dt;var mt;let yt=mt=class extends((0,Ne.J)(M.wq)){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 mt({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:ue.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?ue.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 a.Z({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};yt.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}],yt.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.Cb)()],yt.prototype,"alternateName",void 0),(0,r._)([(0,v.Cb)()],yt.prototype,"arrivalTime",void 0),(0,r._)([(0,w.r)("arrivalTime",["attributes.ArrivalTime"])],yt.prototype,"readArrivalTime",null),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.ArrivalUTCOffset"}}})],yt.prototype,"arrivalTimeOffset",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.Azimuth"}}})],yt.prototype,"azimuth",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.BranchName"}}})],yt.prototype,"branchName",void 0),(0,r._)([(0,v.Cb)({type:ue.apiValues,json:{read:{source:"attributes.DirectionPointType",reader:ue.read}}})],yt.prototype,"directionPointType",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.DisplayText"}}})],yt.prototype,"displayText",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.ExitName"}}})],yt.prototype,"exitName",void 0),(0,r._)([(0,v.Cb)({type:Ke.Z})],yt.prototype,"geometry",void 0),(0,r._)([(0,v.Cb)()],yt.prototype,"intersectingName",void 0),(0,r._)([(0,v.Cb)()],yt.prototype,"level",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.Name"}}})],yt.prototype,"name",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.ObjectID"}}})],yt.prototype,"objectId",void 0),(0,r._)([(0,v.Cb)({type:l.Z})],yt.prototype,"popupTemplate",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.Sequence"}}})],yt.prototype,"sequence",void 0),(0,r._)([(0,v.Cb)()],yt.prototype,"shortVoiceInstruction",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.StopID"}}})],yt.prototype,"stopId",void 0),(0,r._)([(0,v.Cb)({types:E.LB})],yt.prototype,"symbol",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.TowardName"}}})],yt.prototype,"towardName",void 0),(0,r._)([(0,v.Cb)({readOnly:!0,json:{read:!1}})],yt.prototype,"type",void 0),(0,r._)([(0,v.Cb)()],yt.prototype,"voiceInstruction",void 0),yt=mt=(0,r._)([(0,S.j)("esri.rest.support.DirectionPoint")],yt);const bt=yt;var ht;let ft=ht=class extends((0,Ne.J)(M.wq)){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 Ee(t.attributes,"Attr_")}writeCosts(e,t){Me(e,t,"Attr_")}static fromGraphic(e){return new ht({addedCost:e.attributes.AddedCost??null,barrierType:null!=e.attributes.BarrierType?le.fromJSON(e.attributes.BarrierType):null,costs:null!=e.attributes.Costs?Pe(JSON.parse(e.attributes.Costs)):null,curbApproach:null!=e.attributes.CurbApproach?re.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?se.fromJSON(e.attributes.Status):null,symbol:e.symbol})}toGraphic(){const e={ObjectID:this.objectId,AddedCost:this.addedCost,BarrierType:null!=this.barrierType?le.toJSON(this.barrierType):null,Costs:null!=this.costs?JSON.stringify(Le(this.costs)):null,CurbApproach:null!=this.curbApproach?re.toJSON(this.curbApproach):null,FullEdge:null!=this.fullEdge?ne.toJSON(this.fullEdge):null,Name:this.name,Status:null!=this.status?se.toJSON(this.status):null};return new a.Z({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};ft.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}]}}],ft.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.Cb)()],ft.prototype,"addedCost",void 0),(0,r._)([(0,v.Cb)({type:le.apiValues,json:{name:"attributes.BarrierType",read:{reader:le.read},write:{writer:le.write}}})],ft.prototype,"barrierType",void 0),(0,r._)([(0,v.Cb)()],ft.prototype,"costs",void 0),(0,r._)([(0,w.r)("costs",["attributes"])],ft.prototype,"readCosts",null),(0,r._)([(0,C.c)("costs")],ft.prototype,"writeCosts",null),(0,r._)([(0,v.Cb)({constructOnly:!0,type:re.apiValues,json:{read:{source:"attributes.CurbApproach",reader:re.read}}})],ft.prototype,"curbApproach",void 0),(0,r._)([(0,v.Cb)({type:ne.apiValues,json:{name:"attributes.FullEdge",read:{reader:ne.read},write:{writer:ne.write}}})],ft.prototype,"fullEdge",void 0),(0,r._)([(0,v.Cb)({type:Ke.Z,json:{write:!0}})],ft.prototype,"geometry",void 0),(0,r._)([(0,v.Cb)({json:{name:"attributes.Name"}})],ft.prototype,"name",void 0),(0,r._)([(0,v.Cb)({json:{name:"attributes.ObjectID"}})],ft.prototype,"objectId",void 0),(0,r._)([(0,v.Cb)({type:l.Z})],ft.prototype,"popupTemplate",void 0),(0,r._)([(0,v.Cb)({type:ae.apiValues,json:{read:{source:"attributes.SideOfEdge",reader:ae.read}}})],ft.prototype,"sideOfEdge",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.SourceID"}}})],ft.prototype,"sourceId",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.SourceOID"}}})],ft.prototype,"sourceOid",void 0),(0,r._)([(0,v.Cb)({type:se.apiValues,json:{read:{source:"attributes.Status",reader:se.read}}})],ft.prototype,"status",void 0),(0,r._)([(0,v.Cb)({types:E.LB})],ft.prototype,"symbol",void 0),(0,r._)([(0,v.Cb)({readOnly:!0,json:{read:!1}})],ft.prototype,"type",void 0),ft=ht=(0,r._)([(0,S.j)("esri.rest.support.PointBarrier")],ft);const vt=ft;var gt,Tt=i(38913);let wt=gt=class extends((0,Ne.J)(M.wq)){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 Ee(t.attributes,"Attr_")}writeCosts(e,t){Me(e,t,"Attr_")}static fromGraphic(e){return new gt({barrierType:null!=e.attributes.BarrierType?le.fromJSON(e.attributes.BarrierType):null,costs:null!=e.attributes.Costs?Pe(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?le.toJSON(this.barrierType):null,Costs:null!=this.costs?JSON.stringify(Le(this.costs)):null,Name:this.name??null,ScaleFactor:this.scaleFactor??null};return new a.Z({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};wt.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}],wt.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.Cb)({type:le.apiValues,json:{name:"attributes.BarrierType",read:{reader:le.read},write:{writer:le.write}}})],wt.prototype,"barrierType",void 0),(0,r._)([(0,v.Cb)()],wt.prototype,"costs",void 0),(0,r._)([(0,w.r)("costs",["attributes"])],wt.prototype,"readCosts",null),(0,r._)([(0,C.c)("costs")],wt.prototype,"writeCosts",null),(0,r._)([(0,v.Cb)({type:Tt.Z,json:{write:!0}})],wt.prototype,"geometry",void 0),(0,r._)([(0,v.Cb)({json:{name:"attributes.Name"}})],wt.prototype,"name",void 0),(0,r._)([(0,v.Cb)({json:{name:"attributes.ObjectID"}})],wt.prototype,"objectId",void 0),(0,r._)([(0,v.Cb)({type:l.Z})],wt.prototype,"popupTemplate",void 0),(0,r._)([(0,v.Cb)()],wt.prototype,"scaleFactor",void 0),(0,r._)([(0,v.Cb)({types:E.LB})],wt.prototype,"symbol",void 0),(0,r._)([(0,v.Cb)({readOnly:!0,json:{read:!1}})],wt.prototype,"type",void 0),wt=gt=(0,r._)([(0,S.j)("esri.rest.support.PolygonBarrier")],wt);const St=wt;var Ct;let Nt=Ct=class extends((0,Ne.J)(M.wq)){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 Ee(t.attributes,"Attr_")}static fromGraphic(e){return new Ct({barrierType:null!=e.attributes.BarrierType?le.fromJSON(e.attributes.BarrierType):null,costs:null!=e.attributes.Costs?Pe(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?le.toJSON(this.barrierType):null,Costs:null!=this.costs?JSON.stringify(Le(this.costs)):null,Name:this.name,ScaleFactor:this.scaleFactor};return new a.Z({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};Nt.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}],Nt.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.Cb)({type:le.apiValues,json:{read:{source:"attributes.BarrierType",reader:le.read}}})],Nt.prototype,"barrierType",void 0),(0,r._)([(0,v.Cb)()],Nt.prototype,"costs",void 0),(0,r._)([(0,w.r)("costs",["attributes"])],Nt.prototype,"readCosts",null),(0,r._)([(0,v.Cb)({type:Ye.Z,json:{write:!0}})],Nt.prototype,"geometry",void 0),(0,r._)([(0,v.Cb)({json:{name:"attributes.Name"}})],Nt.prototype,"name",void 0),(0,r._)([(0,v.Cb)({json:{name:"attributes.ObjectID"}})],Nt.prototype,"objectId",void 0),(0,r._)([(0,v.Cb)({type:l.Z})],Nt.prototype,"popupTemplate",void 0),(0,r._)([(0,v.Cb)()],Nt.prototype,"scaleFactor",void 0),(0,r._)([(0,v.Cb)({types:E.LB})],Nt.prototype,"symbol",void 0),(0,r._)([(0,v.Cb)({readOnly:!0,json:{read:!1}})],Nt.prototype,"type",void 0),Nt=Ct=(0,r._)([(0,S.j)("esri.rest.support.PolylineBarrier")],Nt);const _t=Nt;let Ot=class extends M.wq{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=>ye.fromJSON(e)))}writeAccumulateAttributes(e,t,i){null!=e&&e.length&&(t[i]=e.map((e=>ye.toJSON(e))))}};(0,r._)([(0,v.Cb)({type:[String],json:{name:"accumulateAttributeNames",write:!0}})],Ot.prototype,"accumulateAttributes",void 0),(0,r._)([(0,w.r)("accumulateAttributes")],Ot.prototype,"readAccumulateAttributes",null),(0,r._)([(0,C.c)("accumulateAttributes")],Ot.prototype,"writeAccumulateAttributes",null),(0,r._)([(0,v.Cb)({type:String,json:{write:!0}})],Ot.prototype,"directionsLanguage",void 0),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Ot.prototype,"findBestSequence",void 0),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Ot.prototype,"preserveFirstStop",void 0),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Ot.prototype,"preserveLastStop",void 0),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Ot.prototype,"startTimeIsUTC",void 0),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Ot.prototype,"timeWindowsAreUTC",void 0),(0,r._)([(0,v.Cb)({type:Oe,json:{write:!0}})],Ot.prototype,"travelMode",void 0),Ot=(0,r._)([(0,S.j)("esri.layers.support.RouteSettings")],Ot);const At=Ot;var Dt;let It=Dt=class extends((0,Ne.J)(M.wq)){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 Re(t.attributes.EndTime,t.attributes.EndTimeUTC)}readStartTime(e,t){return null!=t.attributes.StartTimeUTC?new Date(t.attributes.StartTimeUTC):null}readStartTimeOffset(e,t){return Re(t.attributes.StartTime,t.attributes.StartTimeUTC)}readTotalCosts(e,t){return Ee(t.attributes,"Total_")}readTotalViolations(e,t){return Ee(t.attributes,"TotalViolation_")}readTotalWait(e,t){return Ee(t.attributes,"TotalWait_")}static fromGraphic(e){return new Dt({analysisSettings:null!=e.attributes.AnalysisSettings?At.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?Pe(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(Le(this.totalCosts)):null,TotalLateMinutes:this.totalLateDuration,TotalMeters:this.totalDistance,TotalMinutes:this.totalDuration,TotalWaitMinutes:this.totalWaitDuration,Version:this.version};return new a.Z({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.Cb)()],It.prototype,"analysisSettings",void 0),(0,r._)([(0,v.Cb)()],It.prototype,"endTime",void 0),(0,r._)([(0,w.r)("endTime",["attributes.EndTimeUTC"])],It.prototype,"readEndTime",null),(0,r._)([(0,v.Cb)()],It.prototype,"endTimeOffset",void 0),(0,r._)([(0,w.r)("endTimeOffset",["attributes.EndTime","attributes.EndTimeUTC"])],It.prototype,"readEndTimeOffset",null),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.FirstStopID"}}})],It.prototype,"firstStopId",void 0),(0,r._)([(0,v.Cb)({type:Ye.Z})],It.prototype,"geometry",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.LastStopID"}}})],It.prototype,"lastStopId",void 0),(0,r._)([(0,v.Cb)()],It.prototype,"messages",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.Name"}}})],It.prototype,"name",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.ObjectID"}}})],It.prototype,"objectId",void 0),(0,r._)([(0,v.Cb)({type:l.Z})],It.prototype,"popupTemplate",void 0),(0,r._)([(0,v.Cb)()],It.prototype,"startTime",void 0),(0,r._)([(0,w.r)("startTime",["attributes.StartTimeUTC"])],It.prototype,"readStartTime",null),(0,r._)([(0,v.Cb)()],It.prototype,"startTimeOffset",void 0),(0,r._)([(0,w.r)("startTimeOffset",["attributes.StartTime","attributes.StartTimeUTC"])],It.prototype,"readStartTimeOffset",null),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.StopCount"}}})],It.prototype,"stopCount",void 0),(0,r._)([(0,v.Cb)({types:E.LB})],It.prototype,"symbol",void 0),(0,r._)([(0,v.Cb)()],It.prototype,"totalCosts",void 0),(0,r._)([(0,w.r)("totalCosts",["attributes"])],It.prototype,"readTotalCosts",null),(0,r._)([(0,v.Cb)()],It.prototype,"totalDistance",void 0),(0,r._)([(0,v.Cb)()],It.prototype,"totalDuration",void 0),(0,r._)([(0,v.Cb)()],It.prototype,"totalLateDuration",void 0),(0,r._)([(0,v.Cb)()],It.prototype,"totalViolations",void 0),(0,r._)([(0,w.r)("totalViolations",["attributes"])],It.prototype,"readTotalViolations",null),(0,r._)([(0,v.Cb)()],It.prototype,"totalWait",void 0),(0,r._)([(0,w.r)("totalWait",["attributes"])],It.prototype,"readTotalWait",null),(0,r._)([(0,v.Cb)()],It.prototype,"totalWaitDuration",void 0),(0,r._)([(0,v.Cb)({readOnly:!0,json:{read:!1}})],It.prototype,"type",void 0),(0,r._)([(0,v.Cb)()],It.prototype,"version",void 0),It=Dt=(0,r._)([(0,S.j)("esri.rest.support.RouteInfo")],It);const xt=It,Ft={type:String,json:{read:{source:"token"},write:{target:"token"}}};var jt=i(33955);let Bt=class extends((0,Ne.J)(M.wq)){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.Cb)({type:Boolean,json:{write:!0}})],Bt.prototype,"doNotLocateOnRestrictedElements",void 0),(0,r._)([(0,v.Cb)({types:s.qM,json:{read:jt.im,write:!0}})],Bt.prototype,"geometry",void 0),(0,r._)([(0,H.J)(fe)],Bt.prototype,"geometryType",void 0),(0,r._)([(0,v.Cb)({type:String,json:{name:"layerName",write:!0}})],Bt.prototype,"name",void 0),(0,r._)([(0,H.J)(he,{name:"spatialRel"})],Bt.prototype,"spatialRelationship",void 0),(0,r._)([(0,v.Cb)({type:String,json:{write:!0}})],Bt.prototype,"type",void 0),(0,r._)([(0,v.Cb)({type:String,json:{write:!0}})],Bt.prototype,"where",void 0),Bt=(0,r._)([(0,S.j)("esri.rest.support.DataLayer")],Bt);const Et=Bt;var Mt;let Pt=Mt=class extends Je.Z{constructor(e){super(e),this.doNotLocateOnRestrictedElements=null}clone(){return new Mt({doNotLocateOnRestrictedElements:this.doNotLocateOnRestrictedElements,...this.cloneProperties()})}};(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Pt.prototype,"doNotLocateOnRestrictedElements",void 0),Pt=Mt=(0,r._)([(0,S.j)("esri.rest.support.NetworkFeatureSet")],Pt);const Lt=Pt;let Rt=class extends((0,Ne.J)(M.wq)){constructor(e){super(e),this.doNotLocateOnRestrictedElements=null,this.url=null}};(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Rt.prototype,"doNotLocateOnRestrictedElements",void 0),(0,r._)([(0,v.Cb)({type:String,json:{write:!0}})],Rt.prototype,"url",void 0),Rt=(0,r._)([(0,S.j)("esri.rest.support.NetworkUrl")],Rt);const Ut=Rt;var Jt;let Zt=Jt=class extends((0,Ne.J)(M.wq)){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,g.TJ)(Jt,e)}readAccumulateAttributes(e){return null==e?null:e.map((e=>ye.fromJSON(e)))}writeAccumulateAttributes(e,t,i){null!=e&&e.length&&(t[i]=e.map((e=>ye.toJSON(e))))}writePointBarriers(e,t,i){Wt(e,t,i)}writePolygonBarrier(e,t,i){Wt(e,t,i)}writePolylineBarrier(e,t,i){Wt(e,t,i)}readRestrictionAttributes(e){return null==e?null:e.map((e=>be.fromJSON(e)))}writeRestrictionAttributes(e,t,i){null!=e&&e.length&&(t[i]=e.map((e=>be.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)?Et.fromJSON(e):function(e){return e&&"url"in e}(e)?Ut.fromJSON(e):function(e){return e&&"features"in e&&"doNotLocateOnRestrictedElements"in e}(e)?Lt.fromJSON(e):function(e){return e&&"features"in e}(e)?Je.Z.fromJSON(e):null}(t.stops)}writeStops(e,t,i){Wt(e,t,i)}};(0,r._)([(0,v.Cb)({type:[String],json:{name:"accumulateAttributeNames",write:!0}})],Zt.prototype,"accumulateAttributes",void 0),(0,r._)([(0,w.r)("accumulateAttributes")],Zt.prototype,"readAccumulateAttributes",null),(0,r._)([(0,C.c)("accumulateAttributes")],Zt.prototype,"writeAccumulateAttributes",null),(0,r._)([(0,v.Cb)(Ft)],Zt.prototype,"apiKey",void 0),(0,r._)([(0,v.Cb)({json:{write:!0}})],Zt.prototype,"attributeParameterValues",void 0),(0,r._)([(0,v.Cb)({type:String,json:{write:!0}})],Zt.prototype,"directionsLanguage",void 0),(0,r._)([(0,H.J)($)],Zt.prototype,"directionsLengthUnits",void 0),(0,r._)([(0,H.J)(Q)],Zt.prototype,"directionsOutputType",void 0),(0,r._)([(0,H.J)(de)],Zt.prototype,"directionsStyleName",void 0),(0,r._)([(0,H.J)(me,{name:"directionsTimeAttributeName",ignoreUnknown:!1})],Zt.prototype,"directionsTimeAttribute",void 0),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Zt.prototype,"findBestSequence",void 0),(0,r._)([(0,v.Cb)({type:Number,json:{write:!0}})],Zt.prototype,"geometryPrecision",void 0),(0,r._)([(0,v.Cb)({type:Number,json:{write:!0}})],Zt.prototype,"geometryPrecisionM",void 0),(0,r._)([(0,v.Cb)({type:Number,json:{write:!0}})],Zt.prototype,"geometryPrecisionZ",void 0),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Zt.prototype,"ignoreInvalidLocations",void 0),(0,r._)([(0,H.J)(ye,{name:"impedanceAttributeName",ignoreUnknown:!1})],Zt.prototype,"impedanceAttribute",void 0),(0,r._)([(0,v.Cb)({type:Number,json:{write:!0}})],Zt.prototype,"outputGeometryPrecision",void 0),(0,r._)([(0,H.J)(X)],Zt.prototype,"outputGeometryPrecisionUnits",void 0),(0,r._)([(0,H.J)(ee)],Zt.prototype,"outputLines",void 0),(0,r._)([(0,v.Cb)({type:tt.Z,json:{name:"outSR",write:!0}})],Zt.prototype,"outSpatialReference",void 0),(0,r._)([(0,v.Cb)({json:{write:!0}})],Zt.prototype,"overrides",void 0),(0,r._)([(0,v.Cb)({json:{name:"barriers",write:!0}})],Zt.prototype,"pointBarriers",void 0),(0,r._)([(0,C.c)("pointBarriers")],Zt.prototype,"writePointBarriers",null),(0,r._)([(0,v.Cb)({json:{write:!0}})],Zt.prototype,"polygonBarriers",void 0),(0,r._)([(0,C.c)("polygonBarriers")],Zt.prototype,"writePolygonBarrier",null),(0,r._)([(0,v.Cb)({json:{write:!0}})],Zt.prototype,"polylineBarriers",void 0),(0,r._)([(0,C.c)("polylineBarriers")],Zt.prototype,"writePolylineBarrier",null),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Zt.prototype,"preserveFirstStop",void 0),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Zt.prototype,"preserveLastStop",void 0),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Zt.prototype,"preserveObjectID",void 0),(0,r._)([(0,v.Cb)({type:[String],json:{name:"restrictionAttributeNames",write:!0}})],Zt.prototype,"restrictionAttributes",void 0),(0,r._)([(0,w.r)("restrictionAttributes")],Zt.prototype,"readRestrictionAttributes",null),(0,r._)([(0,C.c)("restrictionAttributes")],Zt.prototype,"writeRestrictionAttributes",null),(0,r._)([(0,H.J)(te)],Zt.prototype,"restrictUTurns",void 0),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Zt.prototype,"returnBarriers",void 0),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Zt.prototype,"returnDirections",void 0),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Zt.prototype,"returnPolygonBarriers",void 0),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Zt.prototype,"returnPolylineBarriers",void 0),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Zt.prototype,"returnRoutes",void 0),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Zt.prototype,"returnStops",void 0),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Zt.prototype,"returnTraversedEdges",void 0),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Zt.prototype,"returnTraversedJunctions",void 0),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Zt.prototype,"returnTraversedTurns",void 0),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Zt.prototype,"returnZ",void 0),(0,r._)([(0,v.Cb)({type:Date,json:{type:Number,write:!0}})],Zt.prototype,"startTime",void 0),(0,r._)([(0,w.r)("startTime")],Zt.prototype,"readStartTime",null),(0,r._)([(0,C.c)("startTime")],Zt.prototype,"writeStartTime",null),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Zt.prototype,"startTimeIsUTC",void 0),(0,r._)([(0,v.Cb)({json:{write:!0}})],Zt.prototype,"stops",void 0),(0,r._)([(0,w.r)("stops")],Zt.prototype,"readStops",null),(0,r._)([(0,C.c)("stops")],Zt.prototype,"writeStops",null),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Zt.prototype,"timeWindowsAreUTC",void 0),(0,r._)([(0,v.Cb)({type:Oe,json:{write:!0}})],Zt.prototype,"travelMode",void 0),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Zt.prototype,"useHierarchy",void 0),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Zt.prototype,"useTimeWindows",void 0),Zt=Jt=(0,r._)([(0,S.j)("esri.rest.support.RouteParameters")],Zt);const kt=Zt;function Wt(e,t,i){null!=e&&(t[i]=p.Z.isCollection(e)?{features:e.toArray().map((e=>e.toJSON()))}:e.toJSON())}var Vt;let qt=Vt=class extends((0,Ne.J)(M.wq)){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 Re(t.attributes.ArriveTime,t.attributes.ArriveTimeUTC)}readCumulativeCosts(e,t){return Ee(t.attributes,"Cumul_")}readDepartTimeOffset(e,t){return Re(t.attributes.DepartTime,t.attributes.DepartTimeUTC)}readServiceCosts(e,t){return Ee(t.attributes,"Attr_")}writeServiceCosts(e,t){Me(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 Ee(t.attributes,"Violation_")}readWait(e,t){return Ee(t.attributes,"Wait_")}static fromGraphic(e){return new Vt({arriveCurbApproach:null!=e.attributes.ArrivalCurbApproach?re.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?Pe(JSON.parse(e.attributes.CumulativeCosts)):null,cumulativeDistance:e.attributes.CumulativeMeters??null,cumulativeDuration:e.attributes.CumulativeMinutes??null,curbApproach:null!=e.attributes.CurbApproach?re.fromJSON(e.attributes.CurbApproach):null,departCurbApproach:null!=e.attributes.DepartureCurbApproach?re.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?oe.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?Pe(JSON.parse(e.attributes.ServiceCosts)):null,serviceDistance:e.attributes.ServiceMeters??null,serviceDuration:e.attributes.ServiceMinutes??null,status:null!=e.attributes.Status?se.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?re.toJSON(this.arriveCurbApproach):null,ArrivalTime:null!=this.arriveTime?this.arriveTime.getTime():null,ArrivalUTCOffset:this.arriveTimeOffset,CumulativeCosts:null!=this.cumulativeCosts?JSON.stringify(Le(this.cumulativeCosts)):null,CumulativeMeters:this.cumulativeDistance,CumulativeMinutes:this.cumulativeDuration,CurbApproach:null!=this.curbApproach?re.toJSON(this.curbApproach):null,DepartureCurbApproach:null!=this.departCurbApproach?re.toJSON(this.departCurbApproach):null,DepartureTime:null!=this.departTime?this.departTime.getTime():null,DepartureUTCOffset:this.departTimeOffset,LateMinutes:this.lateDuration,LocationType:null!=this.locationType?oe.toJSON(this.locationType):null,Name:this.name,RouteName:this.routeName,Sequence:this.sequence,ServiceCosts:null!=this.serviceCosts?JSON.stringify(Le(this.serviceCosts)):null,ServiceMeters:this.serviceDistance,ServiceMinutes:this.serviceDuration,Status:null!=this.status?se.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 a.Z({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};qt.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}],qt.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.Cb)({type:re.apiValues,json:{read:{source:"attributes.ArrivalCurbApproach",reader:re.read}}})],qt.prototype,"arriveCurbApproach",void 0),(0,r._)([(0,v.Cb)({type:Date,json:{read:{source:"attributes.ArriveTimeUTC"}}})],qt.prototype,"arriveTime",void 0),(0,r._)([(0,v.Cb)()],qt.prototype,"arriveTimeOffset",void 0),(0,r._)([(0,w.r)("arriveTimeOffset",["attributes.ArriveTime","attributes.ArriveTimeUTC"])],qt.prototype,"readArriveTimeOffset",null),(0,r._)([(0,v.Cb)({json:{name:"attributes.Bearing",read:!1,write:!0}})],qt.prototype,"bearing",void 0),(0,r._)([(0,v.Cb)({json:{name:"attributes.BearingTol",read:!1,write:!0}})],qt.prototype,"bearingTol",void 0),(0,r._)([(0,v.Cb)()],qt.prototype,"cumulativeCosts",void 0),(0,r._)([(0,w.r)("cumulativeCosts",["attributes"])],qt.prototype,"readCumulativeCosts",null),(0,r._)([(0,v.Cb)()],qt.prototype,"cumulativeDistance",void 0),(0,r._)([(0,v.Cb)()],qt.prototype,"cumulativeDuration",void 0),(0,r._)([(0,v.Cb)({type:re.apiValues,json:{name:"attributes.CurbApproach",read:{reader:re.read},write:{writer:re.write}}})],qt.prototype,"curbApproach",void 0),(0,r._)([(0,v.Cb)({type:re.apiValues,json:{read:{source:"attributes.DepartCurbApproach",reader:re.read}}})],qt.prototype,"departCurbApproach",void 0),(0,r._)([(0,v.Cb)({type:Date,json:{read:{source:"attributes.DepartTimeUTC"}}})],qt.prototype,"departTime",void 0),(0,r._)([(0,v.Cb)()],qt.prototype,"departTimeOffset",void 0),(0,r._)([(0,w.r)("departTimeOffset",["attributes.DepartTime","attributes.DepartTimeUTC"])],qt.prototype,"readDepartTimeOffset",null),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.DistanceToNetworkInMeters"}}})],qt.prototype,"distanceToNetworkInMeters",void 0),(0,r._)([(0,v.Cb)({type:Ke.Z,json:{write:!0}})],qt.prototype,"geometry",void 0),(0,r._)([(0,v.Cb)()],qt.prototype,"lateDuration",void 0),(0,r._)([(0,v.Cb)({type:oe.apiValues,json:{name:"attributes.LocationType",read:{reader:oe.read},write:{writer:oe.write}}})],qt.prototype,"locationType",void 0),(0,r._)([(0,v.Cb)({json:{name:"attributes.Name"}})],qt.prototype,"name",void 0),(0,r._)([(0,v.Cb)({json:{name:"attributes.NavLatency",read:!1,write:!0}})],qt.prototype,"navLatency",void 0),(0,r._)([(0,v.Cb)({json:{name:"attributes.ObjectID"}})],qt.prototype,"objectId",void 0),(0,r._)([(0,v.Cb)({type:l.Z})],qt.prototype,"popupTemplate",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.PosAlong"}}})],qt.prototype,"posAlong",void 0),(0,r._)([(0,v.Cb)({json:{name:"attributes.RouteName"}})],qt.prototype,"routeName",void 0),(0,r._)([(0,v.Cb)()],qt.prototype,"serviceCosts",void 0),(0,r._)([(0,w.r)("serviceCosts",["attributes"])],qt.prototype,"readServiceCosts",null),(0,r._)([(0,C.c)("serviceCosts")],qt.prototype,"writeServiceCosts",null),(0,r._)([(0,v.Cb)()],qt.prototype,"serviceDistance",void 0),(0,r._)([(0,v.Cb)()],qt.prototype,"serviceDuration",void 0),(0,r._)([(0,v.Cb)({json:{name:"attributes.Sequence"}})],qt.prototype,"sequence",void 0),(0,r._)([(0,v.Cb)({type:ae.apiValues,json:{read:{source:"attributes.SideOfEdge",reader:ae.read}}})],qt.prototype,"sideOfEdge",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.SnapX"}}})],qt.prototype,"snapX",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.SnapY"}}})],qt.prototype,"snapY",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.SnapZ"}}})],qt.prototype,"snapZ",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.SourceID"}}})],qt.prototype,"sourceId",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.SourceOID"}}})],qt.prototype,"sourceOid",void 0),(0,r._)([(0,v.Cb)({type:se.apiValues,json:{read:{source:"attributes.Status",reader:se.read}}})],qt.prototype,"status",void 0),(0,r._)([(0,v.Cb)({types:E.LB})],qt.prototype,"symbol",void 0),(0,r._)([(0,v.Cb)({type:Date,json:{name:"attributes.TimeWindowEnd"}})],qt.prototype,"timeWindowEnd",void 0),(0,r._)([(0,C.c)("timeWindowEnd")],qt.prototype,"writeTimeWindowEnd",null),(0,r._)([(0,v.Cb)()],qt.prototype,"timeWindowEndOffset",void 0),(0,r._)([(0,v.Cb)({type:Date,json:{name:"attributes.TimeWindowStart"}})],qt.prototype,"timeWindowStart",void 0),(0,r._)([(0,C.c)("timeWindowStart")],qt.prototype,"writeTimeWindowStart",null),(0,r._)([(0,v.Cb)()],qt.prototype,"timeWindowStartOffset",void 0),(0,r._)([(0,v.Cb)({readOnly:!0,json:{read:!1}})],qt.prototype,"type",void 0),(0,r._)([(0,v.Cb)()],qt.prototype,"violations",void 0),(0,r._)([(0,w.r)("violations",["attributes"])],qt.prototype,"readViolations",null),(0,r._)([(0,v.Cb)()],qt.prototype,"waitDuration",void 0),(0,r._)([(0,v.Cb)()],qt.prototype,"wait",void 0),(0,r._)([(0,w.r)("wait",["attributes"])],qt.prototype,"readWait",null),qt=Vt=(0,r._)([(0,S.j)("esri.rest.support.Stop")],qt);const Gt=qt;var zt=i(65091);function Ht(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 Xt(e){return"layers"in e}async function $t(e){const t=tt.Z.WGS84;return await(0,O.initializeProjection)(e.spatialReference,t),(0,O.project)(e,t)}function Yt(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.En)(e,t,"meters")}const ei=p.Z.ofType(ct),ti=p.Z.ofType(bt),ii=p.Z.ofType(vt),ri=p.Z.ofType(St),oi=p.Z.ofType(_t),si=p.Z.ofType(Gt),ai="esri.layers.RouteLayer",li=u.Z.getLogger(ai);let ni=class extends((0,I.h)((0,j.M)((0,x.q)((0,F.I)((0,c.R)(D.Z)))))){constructor(e){super(e),this._cachedServiceDescription=null,this._featureCollection=null,this._type="Feature Collection",this.defaultSymbols=new k,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=tt.Z.WGS84,this.stops=new si,this.type="route";const t=()=>{this._setStopSymbol(this.stops)};this.addHandles((0,b.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)),a="web-map"===r.origin?"featureCollection.layers":"layers";(0,m.RB)(a,o,t),t.opacity=this.opacity,t.visibility=this.visible,t.visibleLayers=s}readDirectionLines(e,t){return this._getNetworkFeatures(t,"DirectionLines",(e=>ct.fromGraphic(e)))}readDirectionPoints(e,t){return this._getNetworkFeatures(t,"DirectionPoints",(e=>bt.fromGraphic(e)))}get fullExtent(){const e=new _.Z({xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:tt.Z.WGS84});if(null!=this.routeInfo&&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 zt.Z({points:r,spatialReference:i}).extent}readMaxScale(e,t){const i=Xt(t)?t.layers:t.featureCollection?.layers,r=i?.find((e=>null!=e.layerDefinition.maxScale));return r?.layerDefinition.maxScale??0}readMinScale(e,t){const i=Xt(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=>vt.fromGraphic(e)))}readPolygonBarriers(e,t){return this._getNetworkFeatures(t,"PolygonBarriers",(e=>St.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=Xt(t)?t.layers:t.featureCollection?.layers;if(!i?.length)return tt.Z.WGS84;const{layerDefinition:r,featureSet:o}=i[0],s=o.features[0],a=s?.geometry?.spatialReference??o.spatialReference??r.spatialReference??r.extent.spatialReference??A.Zn;return tt.Z.fromJSON(a)}readStops(e,t){return this._getNetworkFeatures(t,"Stops",(e=>Gt.fromGraphic(e)),(e=>this._setStopSymbol(e)))}get title(){return null!=this.routeInfo&&null!=this.routeInfo.name?this.routeInfo.name:"Route"}set title(e){this._overrideIfSome("title",e)}get url(){return o.default.routeServiceUrl}set url(e){null!=e?this._set("url",(0,B.Nm)(e,li)):this._set("url",o.default.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.Z("routelayer:portal-item-not-set","save() requires to the layer to have a portal item");if(!t.id)throw new d.Z("routelayer:portal-item-not-saved","Please use saveAs() first to save the routelayer");if("Feature Collection"!==t.type)throw new d.Z("routelayer:portal-item-wrong-type",'Portal item needs to have type "Feature Collection"');if(null==this.routeInfo)throw new d.Z("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.Z("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,f.mN)(r):void 0,writtenProperties:[]},a=this.write(void 0,s);return t.extent=await $t(e),t.title=this.title,await t.update({data:a}),t}async saveAs(e,t={}){if(await this.load(),null==this.routeInfo)throw new d.Z("routelayer:route-unsolved","saveAs() requires a solved route");const i=V.default.from(e).clone();i.extent??=await $t(this.fullExtent),i.id=null,i.portal??=W.Z.getDefault(),i.title??=this.title,i.type="Feature Collection",i.typeKeywords=["Data","Feature Collection",q.Kz.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,a=this.write(void 0,o);return await(r.user?.addItem({item:i,folder:s,data:a})),this.portalItem=i,(0,N.D)(o),o.portalItem=i,i}async solve(e,t){const i=e?.stops??this.stops,r=e?.pointBarriers??Ht(this.pointBarriers),o=e?.polylineBarriers??Ht(this.polylineBarriers),s=e?.polygonBarriers??Ht(this.polygonBarriers);if(null==i)throw new d.Z("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.Z.isCollection(i)&&i.length<2)throw new d.Z("routelayer:insufficent-stops","the route layer must have two or more stops to solve a route.");if(p.Z.isCollection(i))for(const e of i)e.routeName=null;const a=e?.apiKey,l=this.url,n=await this._getServiceDescription(l,a,t),u=e?.travelMode??n.defaultTravelMode,c=e?.accumulateAttributes??[];null!=u&&(c.push(u.distanceAttributeName),u.timeAttributeName&&c.push(u.timeAttributeName));const m={startTime:new Date},b={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},h=e?kt.from(e):new kt;for(const e in m)null==h[e]&&(h[e]=m[e]);let f;h.set(b);try{f=await async function(e,t,i){const r=[],o=[],s={},a={},l=(0,z.en)(e),{path:n}=l;ut(t.stops)&&xe(t.stops.features,o,"stops.features",s),ut(t.pointBarriers)&&xe(t.pointBarriers.features,o,"pointBarriers.features",s),ut(t.polylineBarriers)&&xe(t.polylineBarriers.features,o,"polylineBarriers.features",s),ut(t.polygonBarriers)&&xe(t.polygonBarriers.features,o,"polygonBarriers.features",s);const u=await(0,Be.aX)(o);for(const e in s){const t=s[e];r.push(e),a[e]=u.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}(a,r)){let e=null;try{e=await Fe(n,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}Ie.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.")}(a,r)}for(const e in a)a[e].forEach(((i,r)=>{(0,je.U2)(t,e)[r].geometry=i}));const p={...i,query:{...l.query,...Ue(t),f:"json"}},d=n.endsWith("/solve")?n:`${n}/solve`,{data:c}=await(0,G.Z)(d,p);return function(e){const{barriers:t,directionLines:i,directionPoints:r,directions:o,messages:s,polygonBarriers:a,polylineBarriers:l,routes:n,stops:u,traversedEdges:p,traversedJunctions:d,traversedTurns:c}=e,m=e=>{const t=b.find((t=>t.routeName===e));if(null!=t)return t;const i={routeId:b.length+1,routeName:e};return b.push(i),i},y=e=>{const t=b.find((t=>t.routeId===e));if(null!=t)return t;const i={routeId:e,routeName:null};return b.push(i),i},b=[];n?.features.forEach(((e,t)=>{e.geometry.spatialReference=n.spatialReference??void 0;const i=e.attributes.Name,r=t+1;b.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))&&b.length>0?b[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:b,barriers:t,polygonBarriers:a,polylineBarriers:l,messages:s})}(c)}(l,h,t)}catch(e){throw(0,y.D_)(e)?e:new d.Z("routelayer:failed-route-request","the routing request failed",{error:e})}const v=this._toRouteLayerSolution(f);return this._isOverridden("title")||(this.title=v.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 li.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:a,distanceAttributeName:l}=s,n=o.find((({name:e})=>e===a)),u=o.find((({name:e})=>e===l)),p=i.travelMode?.impedanceAttributeName??i.impedanceAttribute??t.impedance,c=n?.units,m=u?.units;if(!c||!m)throw new d.Z("routelayer:unknown-impedance-units","the units of either the distance or time impedance are unknown");const y=i.directionsLanguage??t.directionsLanguage,b=i.accumulateAttributes??t.accumulateAttributeNames??[],h=new Set(o.filter((({name:e})=>e===a||e===l||e===p||null!=e&&b.includes(e))).map((({name:e})=>e))),f=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,f(t.costs));for(const t of e.polygonBarriers)null!=t.costs&&(t.scaleFactor=t.costs[p]??1,f(t.costs));for(const t of e.polylineBarriers)null!=t.costs&&(t.scaleFactor=t.costs[p]??1,f(t.costs));const{routeInfo:v}=e,{findBestSequence:g,preserveFirstStop:T,preserveLastStop:w,startTimeIsUTC:S,timeWindowsAreUTC:C}=i;v.analysisSettings=new At({accumulateAttributes:b,directionsLanguage:y,findBestSequence:g,preserveFirstStop:T,preserveLastStop:w,startTimeIsUTC:S,timeWindowsAreUTC:C,travelMode:s}),v.totalDuration=Yt(v.totalCosts?.[a]??0,c),v.totalDistance=Qt(v.totalCosts?.[l]??0,m),v.totalLateDuration=Yt(v.totalViolations?.[a]??0,c),v.totalWaitDuration=Yt(v.totalWait?.[a]??0,c),null!=v.totalCosts&&f(v.totalCosts),null!=v.totalViolations&&f(v.totalViolations),null!=v.totalWait&&f(v.totalWait);for(const t of e.stops)null!=t.serviceCosts&&(t.serviceDuration=Yt(t.serviceCosts[a]??0,c),t.serviceDistance=Qt(t.serviceCosts[l]??0,m),f(t.serviceCosts)),null!=t.cumulativeCosts&&(t.cumulativeDuration=Yt(t.cumulativeCosts[a]??0,c),t.cumulativeDistance=Qt(t.cumulativeCosts[l]??0,m),f(t.cumulativeCosts)),null!=t.violations&&(t.lateDuration=Yt(t.violations[a]??0,c),f(t.violations)),null!=t.wait&&(t.waitDuration=Yt(t.wait[a]??0,c),f(t.wait))}(v,n,h),v}update(e){const{stops:t,directionLines:i,directionPoints:r,pointBarriers:o,polylineBarriers:s,polygonBarriers:a,routeInfo:l}=e;this.set({stops:t,pointBarriers:o,polylineBarriers:s,polygonBarriers:a}),this._set("directionLines",i),this._set("directionPoints",r),this._set("routeInfo",l),null!=l.geometry&&(this.spatialReference=l.geometry.spatialReference)}_getNetworkFeatures(e,t,i,r){const o=Xt(e)?e.layers:e.featureCollection?.layers,s=o?.find((e=>e.layerDefinition.name===t));if(null==s)return new p.Z;const{layerDefinition:u,popupInfo:d,featureSet:c}=s,m=u.drawingInfo.renderer,{features:y}=c,b=c.spatialReference??u.spatialReference??u.extent.spatialReference??A.Zn,h=m&&(0,n.a)(m),f=tt.Z.fromJSON(b),v=y.map((e=>{const r=a.Z.fromJSON(e);null!=r.geometry&&null!=e.geometry&&null==e.geometry.spatialReference&&(r.geometry.spatialReference=f);const o=i(r);return o.symbol??=h?.getSymbol(r)??this._getNetworkSymbol(t),o.popupTemplate??=d&&l.Z.fromJSON(d),o}));return r&&v.some((e=>!e.symbol))&&r(v),new p.Z(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 Fe(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:a}=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 l=e.map((({sequence:e})=>e)).filter((e=>null!=e)),n=Math.min(...l),u=Math.max(...l);for(const l of e)l.sequence!==n?l.sequence!==u?"ok"===l.status||"not-located-on-closest"===l.status?"waypoint"!==l.locationType?"break"!==l.locationType?l.symbol=r:l.symbol=a:l.symbol=s:l.symbol=o:l.symbol=i:l.symbol=t}_toRouteLayerSolution(e){const t=e.routeResults[0].stops?.map((e=>Gt.fromJSON(e.toJSON())));this._setStopSymbol(t);const i=new si(t),r=new ri(e.polygonBarriers?.map((e=>{const t=St.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=vt.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.pointBarriers,t}))),a=e.routeResults[0].route?.toJSON(),l=xt.fromJSON(a);l.symbol=this.defaultSymbols.routeInfo;const n=new ti(e.routeResults[0].directionPoints?.features.map((e=>{const t=bt.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.directionPoints,t})));return{directionLines:new ei(e.routeResults[0].directionLines?.features.map((e=>{const t=ct.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.directionLines,t}))),directionPoints:n,pointBarriers:s,polygonBarriers:r,polylineBarriers:o,routeInfo:l,stops:i}}_writeDirectionLines(){return this._writeNetworkFeatures(this.directionLines,this.defaultSymbols.directionLines,"esriGeometryPolyline",ct.fields,ct.popupInfo,"DirectionLines","Direction Lines")}_writeDirectionPoints(){return this._writeNetworkFeatures(this.directionPoints,this.defaultSymbols.directionPoints,"esriGeometryPoint",bt.fields,bt.popupInfo,"DirectionPoints","Direction Points")}_writeNetworkFeatures(e,t,i,r,o,s,a){if(null==e||!e.length)return null;const l=this.spatialReference.toJSON(),{fullExtent:n,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:l},layerDefinition:{capabilities:"Query,Update,Editing",drawingInfo:{renderer:{type:"simple",symbol:null!=t?t.toJSON():Kt(i)}},extent:n.toJSON(),fields:r,geometryType:i,hasM:!1,hasZ:!1,maxScale:u,minScale:p,name:s,objectIdField:"ObjectID",spatialReference:l,title:a,type:"Feature Layer",typeIdField:""},popupInfo:o}}_writePointBarriers(){return this._writeNetworkFeatures(this.pointBarriers,this.defaultSymbols.pointBarriers,"esriGeometryPoint",vt.fields,vt.popupInfo,"Barriers","Point Barriers")}_writePolygonBarriers(){return this._writeNetworkFeatures(this.polygonBarriers,this.defaultSymbols.polygonBarriers,"esriGeometryPolygon",St.fields,St.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.Z([this.routeInfo]):null,this.defaultSymbols.routeInfo,"esriGeometryPolyline",xt.fields,xt.popupInfo,"RouteInfo","Route Details")}_writeStops(){const e=this._writeNetworkFeatures(this.stops,null,"esriGeometryPoint",Gt.fields,Gt.popupInfo,"Stops","Stops");if(null==e)return null;const{stops:t}=this.defaultSymbols,i=null!=t&&null!=t.first&&t.first.toJSON(),r=null!=t&&null!=t.middle&&t.middle.toJSON(),o=null!=t&&null!=t.last&&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.Cb)({readOnly:!0,json:{read:!1,origins:{"portal-item":{write:{allowNull:!0,ignoreOrigin:!0}},"web-map":{write:{overridePolicy(){return{allowNull:!0,ignoreOrigin:null==this.portalItem}}}}}}})],ni.prototype,"_featureCollection",void 0),(0,r._)([(0,C.c)(["web-map","portal-item"],"_featureCollection")],ni.prototype,"writeFeatureCollectionWebmap",null),(0,r._)([(0,v.Cb)({readOnly:!0,json:{read:!1,origins:{"web-map":{write:{target:"type",overridePolicy(){return{ignoreOrigin:null!=this.portalItem}}}}}}})],ni.prototype,"_type",void 0),(0,r._)([(0,v.Cb)({nonNullable:!0,type:k})],ni.prototype,"defaultSymbols",void 0),(0,r._)([(0,v.Cb)({readOnly:!0})],ni.prototype,"directionLines",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"directionLines",["layers","featureCollection.layers"])],ni.prototype,"readDirectionLines",null),(0,r._)([(0,v.Cb)({readOnly:!0})],ni.prototype,"directionPoints",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"directionPoints",["layers","featureCollection.layers"])],ni.prototype,"readDirectionPoints",null),(0,r._)([(0,v.Cb)({readOnly:!0,json:{read:!1,origins:{"web-map":{write:{ignoreOrigin:!0}}}}})],ni.prototype,"featureCollectionType",void 0),(0,r._)([(0,v.Cb)({readOnly:!0})],ni.prototype,"fullExtent",null),(0,r._)([(0,v.Cb)({json:{origins:{"web-map":{name:"featureCollection.showLegend"}},write:!0}})],ni.prototype,"legendEnabled",void 0),(0,r._)([(0,v.Cb)({type:["show","hide"]})],ni.prototype,"listMode",void 0),(0,r._)([(0,v.Cb)({type:Number,nonNullable:!0,json:{write:!1}})],ni.prototype,"maxScale",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"maxScale",["layers","featureCollection.layers"])],ni.prototype,"readMaxScale",null),(0,r._)([(0,v.Cb)({type:Number,nonNullable:!0,json:{write:!1}})],ni.prototype,"minScale",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"minScale",["layers","featureCollection.layers"])],ni.prototype,"readMinScale",null),(0,r._)([(0,v.Cb)({type:["ArcGISFeatureLayer"],value:"ArcGISFeatureLayer"})],ni.prototype,"operationalLayerType",void 0),(0,r._)([(0,v.Cb)({nonNullable:!0,type:p.Z.ofType(vt)})],ni.prototype,"pointBarriers",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"pointBarriers",["layers","featureCollection.layers"])],ni.prototype,"readPointBarriers",null),(0,r._)([(0,v.Cb)({nonNullable:!0,type:p.Z.ofType(St)})],ni.prototype,"polygonBarriers",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"polygonBarriers",["layers","featureCollection.layers"])],ni.prototype,"readPolygonBarriers",null),(0,r._)([(0,v.Cb)({nonNullable:!0,type:p.Z.ofType(_t)})],ni.prototype,"polylineBarriers",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"polylineBarriers",["layers","featureCollection.layers"])],ni.prototype,"readPolylineBarriers",null),(0,r._)([(0,v.Cb)({readOnly:!0})],ni.prototype,"routeInfo",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"routeInfo",["layers","featureCollection.layers"])],ni.prototype,"readRouteInfo",null),(0,r._)([(0,v.Cb)({type:tt.Z})],ni.prototype,"spatialReference",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"spatialReference",["layers","featureCollection.layers"])],ni.prototype,"readSpatialReference",null),(0,r._)([(0,v.Cb)({nonNullable:!0,type:p.Z.ofType(Gt)})],ni.prototype,"stops",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"stops",["layers","featureCollection.layers"])],ni.prototype,"readStops",null),(0,r._)([(0,v.Cb)()],ni.prototype,"title",null),(0,r._)([(0,v.Cb)({readOnly:!0,json:{read:!1}})],ni.prototype,"type",void 0),(0,r._)([(0,v.Cb)()],ni.prototype,"url",null),ni=(0,r._)([(0,S.j)(ai)],ni);const ui=ni},16859:(e,t,i)=>{i.d(t,{I:()=>S});var r=i(43697),o=i(68773),s=i(40330),a=i(3172),l=i(66643),n=i(20102),u=i(92604),p=i(70586),d=i(95330),c=i(17452),m=i(5600),y=(i(75215),i(67676),i(80442),i(71715)),b=i(52011),h=i(30556),f=i(84230),v=i(48522),g=i(15235),T=i(86082),w=i(14661);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.SC)(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&&i.portal})}writePortalItem(e,t){e&&e.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem&&this.portalItem.id)try{const{load:r}=await i.e(8062).then(i.bind(i,18062));return(0,d.k_)(t),await r({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,d.D_)(e)||u.Z.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.r9)(e),!0))))}async setUserPrivileges(e,t){if(!o.default.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.r9)(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.Ss)(i);let o,a;if(r)o=i.portal.url;else try{o=await(0,f.oP)(this.url,t)}catch(e){(0,d.r9)(e)}if(!o||!(0,c.Zo)(o,i.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;a=await(s.id?.getCredential(`${o}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,d.r9)(e)}if(!a)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};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.Ss)(i)}catch(e){(0,d.r9)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,d.r9)(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=C.credential===t?C.user:await this._fetchEditingUser(e);return C.credential=t,C.user=i,null==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.Z.getDefault();if(o&&o.loaded&&(0,c.Fv)(o.restUrl)===(0,c.Fv)(r))return o.user;const n=`${r}/community/self`,u=null!=e?e.signal:null,p=await(0,l.q6)((0,a.Z)(n,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?T.Z.fromJSON(p.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const i=t&&t.portal,r=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||v.Z.getDefault());return i&&r&&!(0,c.tm)(r.restUrl,i.restUrl)?(t.messages&&t.messages.push(new n.Z("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.Cb)({type:g.default})],t.prototype,"portalItem",null),(0,r._)([(0,y.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,r._)([(0,h.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,r._)([(0,m.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,r._)([(0,m.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,r._)([(0,m.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,r._)([(0,m.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,r._)([(0,b.j)("esri.layers.mixins.PortalLayer")],t),t},C={credential:null,user:null}},74889:(e,t,i)=>{i.d(t,{Z:()=>g});var r,o=i(43697),s=i(66577),a=i(38171),l=i(35454),n=i(96674),u=i(22974),p=i(5600),d=(i(75215),i(71715)),c=i(52011),m=i(30556),y=i(82971),b=i(33955),h=i(1231);const f=new l.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let v=r=class extends n.wq{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.Z.fromJSON(t.spatialReference),r=[];for(let t=0;t<e.length;t++){const o=e[t],s=a.Z.fromJSON(o),l=o.geometry&&o.geometry.spatialReference;null==s.geometry||l||(s.geometry.spatialReference=i);const n=o.aggregateGeometries,u=s.aggregateGeometries;if(n&&null!=u)for(const e in u){const t=u[e],r=n[e],o=r?.spatialReference;null==t||o||(t.spatialReference=i)}r.push(s)}return r}writeGeometryType(e,t,i,r){if(e)return void f.write(e,t,i,r);const{features:o}=this;if(o)for(const e of o)if(e&&null!=e.geometry)return void f.write(e.geometry.type,t,i,r)}readQueryGeometry(e,t){if(!e)return null;const i=!!e.spatialReference,r=(0,b.im)(e);return r&&!i&&t.spatialReference&&(r.spatialReference=y.Z.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.d9)({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&&e[i];r.geometry=t&&t.toJSON()||r.geometry}}return t}quantize(e){const{scale:[t,i],translate:[r,o]}=e,s=this.features,a=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++)a?.(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,a]}=i;let l=null,n=null;if(this.hasZ&&null!=i?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=i;l=i=>i*t+e}if(this.hasM&&null!=i?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=i;n=i=>null==i?i:i*t+e}const u=this._getHydrationFunction(e,(e=>e*s+r),(e=>o-e*a),l,n);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 a=0,l=e.length;a<l;a++){const l=e[a];if(a>0){const e=t(l[0]),a=i(l[1]);e===r&&a===o||(s.push([e-r,a-o]),r=e,o=a)}else r=t(l[0]),o=i(l[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,b.oU)(e)?e.rings:e.paths,o=[];for(let e=0,s=r.length;e<s;e++){const s=r[e],a=this._quantizePoints(s,t,i);a&&o.push(a)}return o.length>0?((0,b.oU)(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,b.oU)(e)?e.rings:e.paths;let a,l;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?(a+=o[0],l+=o[1]):(a=o[0],l=o[1]),o[0]=t(a),o[1]=i(l)}}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 a,l;for(let e=0,r=s.length;e<r;e++){const r=s[e];e>0?(a+=r[0],l+=r[1]):(a=r[0],l=r[1]),r[0]=t(a),r[1]=i(l)}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.Cb)({type:String,json:{write:!0}})],v.prototype,"displayFieldName",void 0),(0,o._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"exceededTransferLimit",void 0),(0,o._)([(0,p.Cb)({type:[a.Z],json:{write:!0}})],v.prototype,"features",void 0),(0,o._)([(0,d.r)("features")],v.prototype,"readFeatures",null),(0,o._)([(0,p.Cb)({type:[h.Z],json:{write:!0}})],v.prototype,"fields",void 0),(0,o._)([(0,p.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:f.read}}})],v.prototype,"geometryType",void 0),(0,o._)([(0,m.c)("geometryType")],v.prototype,"writeGeometryType",null),(0,o._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasM",void 0),(0,o._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasZ",void 0),(0,o._)([(0,p.Cb)({types:s.qM,json:{write:!0}})],v.prototype,"queryGeometry",void 0),(0,o._)([(0,d.r)("queryGeometry")],v.prototype,"readQueryGeometry",null),(0,o._)([(0,p.Cb)({type:y.Z,json:{write:!0}})],v.prototype,"spatialReference",void 0),(0,o._)([(0,m.c)("spatialReference")],v.prototype,"writeSpatialReference",null),(0,o._)([(0,p.Cb)({json:{write:!0}})],v.prototype,"transform",void 0),v=r=(0,o._)([(0,c.j)("esri.rest.support.FeatureSet")],v),v.prototype.toJSON.isDefaultToJSON=!0;const g=v},11282:(e,t,i)=>{i.d(t,{cv:()=>l,en:()=>a,lA:()=>s}),i(68773),i(40330);var r=i(22974),o=i(17452);function s(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function a(e){return"string"==typeof e?(0,o.mN)(e):(0,r.d9)(e)}function l(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]=[];for(let e=0;e<s.length;e++)r[o][e]=l(s[e])}else if("object"==typeof s)if(s.toJSON){const e=s.toJSON(i&&i[o]);r[o]=t?e:JSON.stringify(e)}else r[o]=t?s:JSON.stringify(s);else r[o]=s}return r}i(71058)}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4720,1444],{41123:(e,t,r)=>{r.d(t,{D:()=>a,z:()=>s});const n="randomUUID"in crypto;function a(){if(n)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function s(){return`{${a()}}`}},16306:(e,t,r)=>{r.d(t,{aX:()=>Z});var n=r(68773),a=r(20102),s=r(92604),i=r(38913),o=r(58901),l=r(73913),d=r(8744),u=r(40488),p=(r(66577),r(3172)),c=r(33955),h=r(11282),f=r(17452);async function y(e,t,r){const n="string"==typeof e?(0,f.mN)(e):e,a=t[0].spatialReference,s=(0,c.Ji)(t[0]),i={...r,query:{...n.query,f:"json",sr:(0,d.B9)(a),geometries:JSON.stringify((l=t,{geometryType:(0,c.Ji)(l[0]),geometries:l.map((e=>e.toJSON()))}))}},{data:o}=await(0,p.Z)(n.path+"/simplify",i);var l;return function(e,t,r){const n=(0,c.q9)(t);return e.map((e=>{const t=n.fromJSON(e);return t.spatialReference=r,t}))}(o.geometries,s,a)}const m=s.Z.getLogger("esri.geometry.support.normalizeUtils");function g(e){return"polygon"===e[0].type}function b(e){return"polyline"===e[0].type}function F(e,t,r){if(t){const t=function(e,t){if(!(e instanceof o.Z||e instanceof i.Z)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw m.error(e),new a.Z(e)}const r=(0,l.x3)(e),n=[];for(const e of r){const r=[];n.push(r),r.push([e[0][0],e[0][1]]);for(let n=0;n<e.length-1;n++){const a=e[n][0],s=e[n][1],i=e[n+1][0],o=e[n+1][1],l=Math.sqrt((i-a)*(i-a)+(o-s)*(o-s)),d=(o-s)/l,u=(i-a)/l,p=l/t;if(p>1){for(let e=1;e<=p-1;e++){const n=e*t,i=u*n+a,o=d*n+s;r.push([i,o])}const e=(l+Math.floor(p-1)*t)/2,n=u*e+a,i=d*e+s;r.push([n,i])}r.push([i,o])}}return function(e){return"polygon"===e.type}(e)?new i.Z({rings:n,spatialReference:e.spatialReference}):new o.Z({paths:n,spatialReference:e.spatialReference})}(e,1e6);e=(0,u.Sx)(t,!0)}return r&&(e=(0,l.Sy)(e,r)),e}function w(e,t,r){if(Array.isArray(e)){const n=e[0];if(n>t){const r=(0,l.XZ)(n,t);e[0]=n+r*(-2*t)}else if(n<r){const t=(0,l.XZ)(n,r);e[0]=n+t*(-2*r)}}else{const n=e.x;if(n>t){const r=(0,l.XZ)(n,t);e=e.clone().offset(r*(-2*t),0)}else if(n<r){const t=(0,l.XZ)(n,r);e=e.clone().offset(t*(-2*r),0)}}return e}function I(e,t){let r=-1;for(let n=0;n<t.cutIndexes.length;n++){const a=t.cutIndexes[n],s=t.geometries[n],i=(0,l.x3)(s);for(let e=0;e<i.length;e++){const t=i[e];t.some((r=>{if(r[0]<180)return!0;{let r=0;for(let e=0;e<t.length;e++){const n=t[e][0];r=n>r?n:r}r=Number(r.toFixed(9));const n=-360*(0,l.XZ)(r,180);for(let r=0;r<t.length;r++){const t=s.getPoint(e,r);s.setPoint(e,r,t.clone().offset(n,0))}return!0}}))}if(a===r){if(g(e))for(const t of(0,l.x3)(s))e[a]=e[a].addRing(t);else if(b(e))for(const t of(0,l.x3)(s))e[a]=e[a].addPath(t)}else r=a,e[a]=s}return e}async function Z(e,t,r){if(!Array.isArray(e))return Z([e],t);t&&"string"!=typeof t&&m.warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const a="string"==typeof t?t:t?.url??n.default.geometryServiceUrl;let s,f,g,b,A,v,S,R,E=0;const $=[],x=[];for(const t of e)if(null!=t)if(s||(s=t.spatialReference,f=(0,d.C5)(s),g=s.isWebMercator,v=g?102100:4326,b=l.UZ[v].maxX,A=l.UZ[v].minX,S=l.UZ[v].plus180Line,R=l.UZ[v].minus180Line),f)if("mesh"===t.type)x.push(t);else if("point"===t.type)x.push(w(t.clone(),b,A));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>w(e,b,A))),x.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,f);x.push(e.rings?new i.Z(e):e)}else if(t.extent){const e=t.extent,r=(0,l.XZ)(e.xmin,A)*(2*b);let n=0===r?t.clone():(0,l.Sy)(t.clone(),r);e.offset(r,0),e.intersects(S)&&e.xmax!==b?(E=e.xmax>E?e.xmax:E,n=F(n,g),$.push(n),x.push("cut")):e.intersects(R)&&e.xmin!==A?(E=e.xmax*(2*b)>E?e.xmax*(2*b):E,n=F(n,g,360),$.push(n),x.push("cut")):x.push(n)}else x.push(t.clone());else x.push(t);else x.push(t);let O=(0,l.XZ)(E,b),L=-90;const U=O,M=new o.Z;for(;O>0;){const e=360*O-180;M.addPath([[e,L],[e,-1*L]]),L*=-1,O--}if($.length>0&&U>0){const t=I($,await async function(e,t,r,n){const a=(0,h.en)(e),s=t[0].spatialReference,i={...n,responseType:"json",query:{...a.query,f:"json",sr:(0,d.B9)(s),target:JSON.stringify({geometryType:(0,c.Ji)(t[0]),geometries:t}),cutter:JSON.stringify(r)}},o=await(0,p.Z)(a.path+"/cut",i),{cutIndexes:l,geometries:u=[]}=o.data;return{cutIndexes:l,geometries:u.map((e=>{const t=(0,c.im)(e);return t.spatialReference=s,t}))}}(a,$,M,r)),n=[],s=[];for(let r=0;r<x.length;r++){const a=x[r];if("cut"!==a)s.push(a);else{const a=t.shift(),i=e[r];null!=i&&"polygon"===i.type&&i.rings&&i.rings.length>1&&a.rings.length>=i.rings.length?(n.push(a),s.push("simplify")):s.push(g?(0,u.$)(a):a)}}if(!n.length)return s;const i=await y(a,n,r),o=[];for(let e=0;e<s.length;e++){const t=s[e];"simplify"!==t?o.push(t):o.push(g?(0,u.$)(i.shift()):i.shift())}return o}const j=[];for(let e=0;e<x.length;e++){const t=x[e];if("cut"!==t)j.push(t);else{const e=$.shift();j.push(!0===g?(0,u.$)(e):e)}}return j}},73913:(e,t,r)=>{r.d(t,{Sy:()=>l,UZ:()=>i,XZ:()=>o,x3:()=>d});var n=r(58901),a=r(82971),s=r(33955);const i={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new n.Z({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:a.Z.WebMercator}),minus180Line:new n.Z({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:a.Z.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new n.Z({paths:[[[180,-180],[180,180]]],spatialReference:a.Z.WGS84}),minus180Line:new n.Z({paths:[[[-180,-180],[-180,180]]],spatialReference:a.Z.WGS84})}};function o(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const r=d(e);for(const e of r)for(const r of e)r[0]+=t;return e}function d(e){return(0,s.oU)(e)?e.rings:e.paths}},14720:(e,t,r)=>{r.d(t,{Ey:()=>F,applyEdits:()=>w,aw:()=>g,uploadAssets:()=>E});var n=r(38171),a=r(46791),s=r(20102),i=r(22974),o=r(92604),l=r(95330),d=r(17452),u=r(41123),p=r(16306),c=r(54253),h=r(2981),f=r(84230);function y(e){return e&&null!=e.applyEdits}function m(e){return"object"==typeof e&&null!=e&&"objectId"in e&&!!e.objectId}function g(e){return e.every(m)}function b(e){return"object"==typeof e&&null!=e&&"globalId"in e&&!!e.globalId}function F(e){return e.every(b)}async function w(e,t,r,n={}){let d;if((0,c.lQ)(e)&&e.url)d=(0,c.jF)(e.url,e.layerId,n.gdbVersion,"original-and-current-features"===n.returnServiceEditsOption);else{d=(0,l.hh)(),d.promise.then((t=>{(t.addedFeatures.length||t.updatedFeatures.length||t.deletedFeatures.length||t.addedAttachments.length||t.updatedAttachments.length||t.deletedAttachments.length)&&e.emit("edits",t)}));const t={result:d.promise};e.emit("apply-edits",t)}try{const{results:l,edits:p}=await async function(e,t,r,n){if(await e.load(),!y(t))throw new s.Z(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!(0,f.ln)(e))throw new s.Z(`${e.type}-layer:editing-disabled`,"Editing is disabled for layer",{layer:e});const{edits:i,options:l}=await async function(e,t,r){const n=t&&(t.addFeatures||t.updateFeatures||t.deleteFeatures),i=t&&(t.addAttachments||t.updateAttachments||t.deleteAttachments),l=null!=e.infoFor3D;if(!t||!n&&!i)throw new s.Z(`${e.type}-layer:missing-parameters`,"'addFeatures', 'updateFeatures', 'deleteFeatures', 'addAttachments', 'updateAttachments' or 'deleteAttachments' parameter is required");const d=(0,f.S1)(e);if(!d.data.isVersioned&&r?.gdbVersion)throw new s.Z(`${e.type}-layer:invalid-parameter`,"'gdbVersion' is applicable only if the layer supports versioned data. See: 'capabilities.data.isVersioned'");if(!d.editing.supportsRollbackOnFailure&&r?.rollbackOnFailureEnabled)throw new s.Z(`${e.type}-layer:invalid-parameter`,"This layer does not support 'rollbackOnFailureEnabled' parameter. See: 'capabilities.editing.supportsRollbackOnFailure'");if(!d.editing.supportsGlobalId&&r?.globalIdUsed)throw new s.Z(`${e.type}-layer:invalid-parameter`,"This layer does not support 'globalIdUsed' parameter. See: 'capabilities.editing.supportsGlobalId'");if(!d.editing.supportsGlobalId&&i)throw new s.Z(`${e.type}-layer:invalid-parameter`,"'addAttachments', 'updateAttachments' and 'deleteAttachments' are applicable only if the layer supports global ids. See: 'capabilities.editing.supportsGlobalId'");if(!r?.globalIdUsed&&i)throw new s.Z(`${e.type}-layer:invalid-parameter`,"When 'addAttachments', 'updateAttachments' or 'deleteAttachments' is specified, globalIdUsed should be set to true");const p={...r};if(null!=p.rollbackOnFailureEnabled||d.editing.supportsRollbackOnFailure||(p.rollbackOnFailureEnabled=!0),p.rollbackOnFailureEnabled||"original-and-current-features"!==p.returnServiceEditsOption||(!1===p.rollbackOnFailureEnabled&&o.Z.getLogger("esri.layers.graphics.editingSupport").warn(`${e.type}-layer:invalid-parameter`,"'original-and-current-features' is valid for 'returnServiceEditsOption' only when 'rollBackOnFailure' is true, but 'rollBackOnFailure' was set to false. 'rollBackOnFailure' has been overwrritten and set to true."),p.rollbackOnFailureEnabled=!0),!d.editing.supportsReturnServiceEditsInSourceSpatialReference&&p.returnServiceEditsInSourceSR)throw new s.Z(`${e.type}-layer:invalid-parameter`,"This layer does not support 'returnServiceEditsInSourceSR' parameter. See: 'capabilities.editing.supportsReturnServiceEditsInSourceSpatialReference'");if(p.returnServiceEditsInSourceSR&&"original-and-current-features"!==p.returnServiceEditsOption)throw new s.Z(`${e.type}-layer:invalid-parameter`,"'returnServiceEditsInSourceSR' is valid only when 'returnServiceEditsOption' is set to 'original-and-current-features'");const c={...t};if(c.addFeatures=t&&a.Z.isCollection(t.addFeatures)?t.addFeatures.toArray():c.addFeatures||[],c.updateFeatures=t&&a.Z.isCollection(t.updateFeatures)?t.updateFeatures.toArray():c.updateFeatures||[],c.deleteFeatures=t&&a.Z.isCollection(t.deleteFeatures)?t.deleteFeatures.toArray():c.deleteFeatures||[],c.addFeatures.length&&!d.operations.supportsAdd)throw new s.Z(`${e.type}-layer:unsupported-operation`,"Layer does not support adding features.");if(c.updateFeatures.length&&!d.operations.supportsUpdate)throw new s.Z(`${e.type}-layer:unsupported-operation`,"Layer does not support updating features.");if(c.deleteFeatures.length&&!d.operations.supportsDelete)throw new s.Z(`${e.type}-layer:unsupported-operation`,"Layer does not support deleting features.");c.addAttachments=c.addAttachments||[],c.updateAttachments=c.updateAttachments||[],c.deleteAttachments=c.deleteAttachments||[],c.addFeatures=c.addFeatures.map(S),c.updateFeatures=c.updateFeatures.map(S),c.addAssetFeatures=[];const y=r?.globalIdUsed||l;if(y){const{globalIdField:t}=e;if(null==t)throw new s.Z(`${e.type}-layer:invalid-parameter`,"Layer does not specify a global id field.");c.addFeatures.forEach((e=>function(e,t){const{attributes:r}=e;null==r[t]&&(r[t]=(0,u.z)())}(e,t)))}return c.addFeatures.forEach((t=>function(e,t,r){I(e,t,r),Z(e,t)}(t,e,y))),c.updateFeatures.forEach((t=>function(e,t,r){I(e,t,r),Z(e,t);const n=(0,f.S1)(t);if("geometry"in e&&null!=e.geometry&&!n?.editing.supportsGeometryUpdate)throw new s.Z(`${t.type}-layer:unsupported-operation`,"Layer does not support geometry updates.")}(t,e,y))),c.deleteFeatures.forEach((t=>function(e,t,r){I(e,t,r)}(t,e,y))),c.addAttachments.forEach((t=>A(t,e))),c.updateAttachments.forEach((t=>A(t,e))),l&&await async function(e,t){if(null==t.infoFor3D)return;const{infoFor3D:r}=t,n=(0,h.S0)("model/gltf-binary",r.supportedFormats)??(0,h.Ow)("glb",r.supportedFormats);if(!n||!r.editFormats.includes(n))throw new s.Z(`${t.type}-layer:binary-gltf-asset-not-supported`,"3DObjectFeatureLayer requires binary glTF (.glb) support for updating mesh geometry.");e.addAssetFeatures??=[];const{addAssetFeatures:a}=e;for(const t of e.addFeatures??[])R(t)&&a.push(t);for(const t of e.updateFeatures??[])R(t)&&a.push(t)}(c,e),{edits:await v(c),options:p}}(e,r,n);return i.addFeatures?.length||i.updateFeatures?.length||i.deleteFeatures?.length||i.addAttachments?.length||i.updateAttachments?.length||i.deleteAttachments?.length?{edits:i,results:await t.applyEdits(i,l)}:{edits:i,results:{addFeatureResults:[],updateFeatureResults:[],deleteFeatureResults:[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}}(e,t,r,n),c=e=>e.filter((e=>!e.error)).map(i.d9),m={edits:p,addedFeatures:c(l.addFeatureResults),updatedFeatures:c(l.updateFeatureResults),deletedFeatures:c(l.deleteFeatureResults),addedAttachments:c(l.addAttachmentResults),updatedAttachments:c(l.updateAttachmentResults),deletedAttachments:c(l.deleteAttachmentResults),exceededTransferLimit:!1,historicMoment:l.editMoment?new Date(l.editMoment):null};return l.editedFeatureResults?.length&&(m.editedFeatures=l.editedFeatureResults),d.resolve(m),l}catch(e){throw d.reject(e),e}}function I(e,t,r){if(r){if("attributes"in e&&!e.attributes[t.globalIdField])throw new s.Z(`${t.type}-layer:invalid-parameter`,`Feature should have '${t.globalIdField}' when 'globalIdUsed' is true`);if(!("attributes"in e)&&!e.globalId)throw new s.Z(`${t.type}-layer:invalid-parameter`,"`'globalId' of the feature should be passed when 'globalIdUsed' is true")}if("geometry"in e&&null!=e.geometry){if(e.geometry.hasZ&&!1===t.capabilities?.data.supportsZ)throw new s.Z(`${t.type}-layer:z-unsupported`,"Layer does not support z values while feature has z values.");if(e.geometry.hasM&&!1===t.capabilities?.data.supportsM)throw new s.Z(`${t.type}-layer:m-unsupported`,"Layer does not support m values while feature has m values.")}}function Z(e,t){if("geometry"in e&&"mesh"===e.geometry?.type&&null!=t.infoFor3D){const{geometry:r}=e;if(r.vertexSpace.isGeoreferenced)throw new s.Z(`${t.type}-layer:georeferenced-mesh-unsupported`,"Uploading georeferenced meshes to a layer is not supported.")}}function A(e,t){const{feature:r,attachment:n}=e;if(!r||"attributes"in r&&!r.attributes[t.globalIdField])throw new s.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to a feature with 'globalId'");if(!("attributes"in r)&&!r.globalId)throw new s.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to 'globalId' of the parent feature");if(!n.globalId)throw new s.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have 'globalId'");if(!n.data&&!n.uploadId)throw new s.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have 'data' or 'uploadId'");if(!(n.data instanceof File&&n.data.name||n.name))throw new s.Z(`${t.type}-layer:invalid-parameter`,"'name' is required when attachment is specified as Base64 encoded string using 'data'");if(!t.capabilities?.editing.supportsUploadWithItemId&&n.uploadId)throw new s.Z(`${t.type}-layer:invalid-parameter`,"This layer does not support 'uploadId' parameter. See: 'capabilities.editing.supportsUploadWithItemId'");if("string"==typeof n.data){const e=(0,d.sJ)(n.data);if(e&&!e.isBase64)throw new s.Z(`${t.type}-layer:invalid-parameter`,"Attachment 'data' should be a Blob, File or Base64 encoded string")}}async function v(e){const t=e.addFeatures??[],r=e.updateFeatures??[],n=t.concat(r).map((e=>e.geometry)),a=await(0,p.aX)(n),s=t.length,i=r.length;return a.slice(0,s).forEach(((e,r)=>t[r].geometry=e)),a.slice(s,s+i).forEach(((e,t)=>r[t].geometry=e)),e}function S(e){const t=new n.Z;return e.attributes||(e.attributes={}),t.geometry=e.geometry,t.attributes=e.attributes,t}function R(e){return"mesh"===e?.geometry?.type}function E(e,t,r,n){if(!y(t))throw new s.Z(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!t.uploadAssets)throw new s.Z(`${e.type}-layer:no-asset-upload-support`,"Layer source does not support uploadAssets capability",{layer:e});return t.uploadAssets(r,n)}},54253:(e,t,r)=>{r.d(t,{o1:()=>m,jF:()=>u,lQ:()=>h});var n=r(43697),a=r(32448),s=r(22974),i=r(95330),o=(r(92604),r(75215),r(20102),r(80442),r(52011));(0,r(41123).z)();const l=new Map,d=new a.Z.EventEmitter;function u(e,t,r=null,n=!1){const a=(0,i.hh)();return n=null==t||n,d.emit("apply-edits",{serviceUrl:e,layerId:t,gdbVersion:r,mayReceiveServiceEdits:n,result:a.promise}),a}const p="esri.layers.mixins.EditBusLayer",c=Symbol(p);function h(e){return null!=e&&"object"==typeof e&&c in e}function f(e){return null!=e&&"object"==typeof e&&"gdbVersion"in e}function y(e,t,r){const n=new URL(e).host,a=l.get(n),s=e=>!e||e===a;return s(t)&&s(r)||t===r}const m=e=>{var t;let r=class extends e{constructor(...e){super(...e),this[t]=!0,this._applyEditsHandler=e=>{const{serviceUrl:t,layerId:r,gdbVersion:n,mayReceiveServiceEdits:a,result:i}=e,o=t===this.url,l=null!=r&&null!=this.layerId&&r===this.layerId,d=f(this),u=f(this)&&y(t,n,this.gdbVersion);if(!o||d&&!u||!l&&!a)return;const p=i.then((e=>{if(l&&(e.addedFeatures.length||e.updatedFeatures.length||e.deletedFeatures.length||e.addedAttachments.length||e.updatedAttachments.length||e.deletedAttachments.length))return this.emit("edits",(0,s.d9)(e)),e;const t=e.editedFeatures?.find((({layerId:e})=>e===this.layerId));if(t){const{adds:r,updates:n,deletes:a}=t.editedFeatures,i={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:r?r.map((({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]}))):[],deletedFeatures:a?a.map((({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]}))):[],updatedFeatures:n?n.map((({current:{attributes:e}})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]}))):[],editedFeatures:(0,s.d9)(e.editedFeatures),exceededTransferLimit:!1,historicMoment:(0,s.d9)(e.historicMoment)};return this.emit("edits",i),i}return{edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:[],deletedFeatures:[],updatedFeatures:[],editedFeatures:(0,s.d9)(e.editedFeatures),exceededTransferLimit:!1,historicMoment:(0,s.d9)(e.historicMoment)}})).then((e=>("historicMoment"in this&&this.historicMoment!==e.historicMoment&&(this.historicMoment=e.historicMoment),e)));this.emit("apply-edits",{result:p})},this._updateMomentHandler=e=>{const{serviceUrl:t,gdbVersion:r,moment:n}=e,a=t===this.url,s=f(this),i=f(this)&&y(t,r,this.gdbVersion),o=f(this)&&!y(t,this.gdbVersion,null);a&&s&&i&&o&&"historicMoment"in this&&(this.historicMoment=n)},this.when().then((()=>{this.addHandles(function(e){return d.on("apply-edits",new WeakRef(e))}(this._applyEditsHandler)),"historicMoment"in this&&this.addHandles(function(e){return d.on("update-moment",new WeakRef(e))}(this._updateMomentHandler))}),(()=>{}))}};return t=c,r=(0,n._)([(0,o.j)(p)],r),r}},2981:(e,t,r)=>{r.d(t,{$6:()=>f,$z:()=>s,F7:()=>a,Ow:()=>o,S0:()=>i,d1:()=>l,dm:()=>d});const n=[["binary","application/octet-stream","bin",""]];function a(e,t){return null!=p(t.name,e?.supportedFormats??[])}function s(e,t){if(!e)return!1;const r=d(t,e.supportedFormats??[]);return null!=r&&e.editFormats.includes(r)}function i(e,t){return c(function(e,t){const r=e.toLowerCase();return u(t).find((e=>h(e)===r))}(e,t))}function o(e,t){return c(p(e,t))}function l(e,t){return h(function(e,t){return u(t).find((t=>c(t)===e))}(e,t))}function d(e,t){return o(e.name,t)??i(e.type,t)}function u(e){return[...n,...e]}function p(e,t){const r=e.toLowerCase();return u(t).find((e=>function(e){return e?.[2].split(",").map((e=>e.toLowerCase()))??[]}(e).some((e=>r.endsWith(e)))))}function c(e){return e?.[0]}function h(e){return e?.[1].toLowerCase()}function f(e){return e.tables?.find((e=>"assetMaps"===e.role))}},11282:(e,t,r)=>{r.d(t,{cv:()=>o,en:()=>i,lA:()=>s}),r(68773),r(40330);var n=r(22974),a=r(17452);function s(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function i(e){return"string"==typeof e?(0,a.mN)(e):(0,n.d9)(e)}function o(e,t,r){const n={};for(const a in e){if("declaredClass"===a)continue;const s=e[a];if(null!=s&&"function"!=typeof s)if(Array.isArray(s)){n[a]=[];for(let e=0;e<s.length;e++)n[a][e]=o(s[e])}else if("object"==typeof s)if(s.toJSON){const e=s.toJSON(r&&r[a]);n[a]=t?e:JSON.stringify(e)}else n[a]=t?s:JSON.stringify(s);else n[a]=s}return n}r(71058)}}]);