@arcgis/core 4.33.0-next.20250305 → 4.33.0-next.20250307

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 (236) hide show
  1. package/arcade/arcadeAsyncRuntime.js +1 -1
  2. package/arcade/arcadeCompiler.js +1 -1
  3. package/arcade/featureSetUtils.js +1 -1
  4. package/arcade/featureset/actions/GroupBy.js +1 -1
  5. package/arcade/featureset/actions/OrderBy.js +1 -1
  6. package/arcade/functions/aiServices.js +5 -0
  7. package/arcade/functions/date.js +1 -1
  8. package/arcade/functions/feature.js +1 -1
  9. package/arcade/functions/featuresetbase.js +1 -1
  10. package/arcade/functions/featuresetstring.js +1 -1
  11. package/arcade/functions/fieldStats.js +1 -1
  12. package/arcade/functions/geometry.js +1 -1
  13. package/arcade/functions/maths.js +1 -1
  14. package/arcade/functions/string.js +1 -1
  15. package/arcade/languageUtils.js +1 -1
  16. package/arcade/treeAnalysis.js +1 -1
  17. package/arcade.js +1 -1
  18. package/assets/esri/core/workers/RemoteClient.js +1 -1
  19. package/assets/esri/core/workers/chunks/028e2e0fa6971aaaaae8.js +1 -0
  20. package/assets/esri/core/workers/chunks/0576b035c1654a43ad5c.js +1 -0
  21. package/assets/esri/core/workers/chunks/081699532b183db1e7c2.js +1 -0
  22. package/assets/esri/core/workers/chunks/087a09b4c41abef6b516.js +1 -0
  23. package/assets/esri/core/workers/chunks/{7ec2f531217718e76469.js → 0b4e63e705db09dbe171.js} +1 -1
  24. package/assets/esri/core/workers/chunks/0c9e933b392616460e62.js +1 -0
  25. package/assets/esri/core/workers/chunks/{c3d23c45db427a29d596.js → 0f4a2bdf5bb2f4303b7f.js} +1 -1
  26. package/assets/esri/core/workers/chunks/{f995a74bd9b58c069c07.js → 10631680abe7607616ca.js} +1 -1
  27. package/assets/esri/core/workers/chunks/{567aa24d7e99e0b5a6cb.js → 1263391920fbb8926ced.js} +1 -1
  28. package/assets/esri/core/workers/chunks/186387a561364a11e574.js +1 -0
  29. package/assets/esri/core/workers/chunks/1cc7bbd0f4a8cf06050a.js +1 -0
  30. package/assets/esri/core/workers/chunks/1d0473dd43c88ab5776d.js +1 -0
  31. package/assets/esri/core/workers/chunks/{ef46613c3aa363dc1cfc.js → 285e573aa6f3acf70b32.js} +1 -1
  32. package/assets/esri/core/workers/chunks/2bb508701ad8ccc3d6ab.js +1 -0
  33. package/assets/esri/core/workers/chunks/36fe6b8228e622407ec2.js +1 -0
  34. package/assets/esri/core/workers/chunks/37a3533f004bf2e888da.js +1 -0
  35. package/assets/esri/core/workers/chunks/3be465c653236d6d8c1f.js +1 -0
  36. package/assets/esri/core/workers/chunks/3e4204502f6e09483c60.js +1 -0
  37. package/assets/esri/core/workers/chunks/3e9cd82325c473ddbf1f.js +1 -0
  38. package/assets/esri/core/workers/chunks/{370ab4b33fb7292bb3b8.js → 424e2058228e5f6a183d.js} +1 -1
  39. package/assets/esri/core/workers/chunks/4496ef270c700078df0c.js +1 -0
  40. package/assets/esri/core/workers/chunks/458f4c6c8820c1f62f69.js +1 -0
  41. package/assets/esri/core/workers/chunks/49c346d2fb8538990f45.js +1 -0
  42. package/assets/esri/core/workers/chunks/4bb65ef7b3a02ebe416e.js +1 -0
  43. package/assets/esri/core/workers/chunks/4c765464288b6d096d08.js +1 -0
  44. package/assets/esri/core/workers/chunks/4eb1a2433f675bde12ad.js +1 -0
  45. package/assets/esri/core/workers/chunks/4ffdff269aae8c293cb4.js +1 -0
  46. package/assets/esri/core/workers/chunks/55f7b1de8882569861c0.js +1 -0
  47. package/assets/esri/core/workers/chunks/564cc81c232c97646833.js +1 -0
  48. package/assets/esri/core/workers/chunks/5a6f7360183693f8490d.js +1 -0
  49. package/assets/esri/core/workers/chunks/5f8028928ae8e5d27dda.js +1 -0
  50. package/assets/esri/core/workers/chunks/{c03e6e35082beaec02a6.js → 5fa5bfc70512994f5ec1.js} +1 -1
  51. package/assets/esri/core/workers/chunks/605eddec7aac891ed141.js +1 -0
  52. package/assets/esri/core/workers/chunks/66cba22c09f595bba3bf.js +1 -0
  53. package/assets/esri/core/workers/chunks/6cb5ce0a6bb85c624a21.js +1 -0
  54. package/assets/esri/core/workers/chunks/{bf9b45604249520b596a.js → 74c01de62ccaed0666e0.js} +1 -1
  55. package/assets/esri/core/workers/chunks/7a4413a188a8f1affb2f.js +1 -0
  56. package/assets/esri/core/workers/chunks/{b66e8a48ce7098ca43d5.js → 7c3cd6aefd16fcc1a7fd.js} +1 -1
  57. package/assets/esri/core/workers/chunks/7e0e9ca84490a0c67197.js +1 -0
  58. package/assets/esri/core/workers/chunks/{3315de71eb8791189c05.js → 835fa4484c58d9b31c78.js} +1 -1
  59. package/assets/esri/core/workers/chunks/88a7780b1c689afff8bd.js +1 -0
  60. package/assets/esri/core/workers/chunks/8d636075e5aa053940fc.js +1 -0
  61. package/assets/esri/core/workers/chunks/{7ca33e03a2fd217b9443.js → 9dfdd8e91897d166d888.js} +1 -1
  62. package/assets/esri/core/workers/chunks/{790f86ddf57be50e0dd5.js → 9ef509e0853ad41f7690.js} +1 -1
  63. package/assets/esri/core/workers/chunks/a2377969f76640f1d6fe.js +1 -0
  64. package/assets/esri/core/workers/chunks/aa3a45e8228216c1739b.js +1 -0
  65. package/assets/esri/core/workers/chunks/b2289c18c02c868a2939.js +1 -0
  66. package/assets/esri/core/workers/chunks/b5f44cf03c4e5cc07bc4.js +1 -0
  67. package/assets/esri/core/workers/chunks/b948fe33b4d650eea796.js +1 -0
  68. package/assets/esri/core/workers/chunks/bdeac9196f28aff93e68.js +1 -0
  69. package/assets/esri/core/workers/chunks/c591527543fd75a917d4.js +1 -0
  70. package/assets/esri/core/workers/chunks/{ca4af35af02e3804042e.js → c6580fdcdc33153008b0.js} +1 -1
  71. package/assets/esri/core/workers/chunks/{fe8ee1938d196a70d809.js → ca0572fe5614005acceb.js} +1 -1
  72. package/assets/esri/core/workers/chunks/{67c1e2c17ea3ca27248c.js → cbbbaccc0d3683e1c0fe.js} +1 -1
  73. package/assets/esri/core/workers/chunks/ccc6f6f7052985bebdab.js +1 -0
  74. package/assets/esri/core/workers/chunks/d72d993b36daf6ec2a10.js +1 -0
  75. package/assets/esri/core/workers/chunks/eb9d2bb8b44a93347274.js +1 -0
  76. package/assets/esri/core/workers/chunks/f809cbfb744adb4fad29.js +1 -0
  77. package/assets/esri/core/workers/chunks/fa011ad649c05201e92a.js +1 -0
  78. package/assets/esri/core/workers/chunks/fa7ddf3c89cdb8052b26.js +1 -0
  79. package/assets/esri/core/workers/chunks/fdc9bd8f309af610fa62.js +1 -0
  80. package/assets/esri/libs/parquet/pkg/arcgis_parquet_bg.wasm +0 -0
  81. package/assets/esri/themes/base/widgets/_ElevationProfile.scss +2 -2
  82. package/assets/esri/themes/dark/main.css +1 -1
  83. package/assets/esri/themes/light/main.css +1 -1
  84. package/assets/esri/themes/light/view.css +1 -1
  85. package/chunks/LineMarker.glsl.js +2 -2
  86. package/chunks/aiServices.js +5 -0
  87. package/chunks/array.js +1 -1
  88. package/chunks/languageUtils.js +1 -1
  89. package/copyright.txt +38 -0
  90. package/editing/sharedTemplates/executor/createTemplateExecutor.js +1 -1
  91. package/interfaces.d.ts +11 -3
  92. package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
  93. package/layers/graphics/data/AttributesBuilder.js +1 -1
  94. package/layers/graphics/data/QueryEngineResult.js +1 -1
  95. package/layers/graphics/data/queryValidationUtils.js +1 -1
  96. package/layers/graphics/editingSupport.js +1 -1
  97. package/layers/support/TitleCreator.js +1 -1
  98. package/layers/support/fieldUtils.js +1 -1
  99. package/layers/support/labelFormatUtils.js +1 -1
  100. package/libs/parquet/parquet.js +1 -1
  101. package/package.json +1 -1
  102. package/renderers/ClassBreaksRenderer.js +1 -1
  103. package/renderers/DictionaryRenderer.js +1 -1
  104. package/renderers/UniqueValueRenderer.js +1 -1
  105. package/renderers/support/DictionaryControlString.js +5 -0
  106. package/renderers/support/DictionaryLoader.js +1 -1
  107. package/renderers/support/DictionaryScriptEvaluator.js +5 -0
  108. package/rest/featureService/FeatureService.js +1 -1
  109. package/rest/print.js +1 -1
  110. package/rest/support/TranslateContent.js +5 -0
  111. package/rest/support/TranslateParameters.js +5 -0
  112. package/rest/support/TranslateResult.js +5 -0
  113. package/rest/translate.js +5 -0
  114. package/rest/utils.js +1 -1
  115. package/smartMapping/statistics/support/attributeDensity.js +1 -1
  116. package/smartMapping/statistics/support/utils.js +1 -1
  117. package/smartMapping/support/adapters/InMemoryLayerAdapter.js +1 -1
  118. package/smartMapping/support/utils.js +1 -1
  119. package/support/ArcadeExpression.js +5 -0
  120. package/support/loadArcade.js +5 -0
  121. package/support/revision.js +1 -1
  122. package/symbols/cim/OverrideHelper.js +1 -1
  123. package/symbols/cim/cimAnalyzer.js +1 -1
  124. package/symbols/cim/utils.js +1 -1
  125. package/symbols/support/symbolUtils.js +1 -1
  126. package/views/2d/arcade/callExpressionWithCursor.js +1 -1
  127. package/views/2d/arcade/callExpressionWithFeature.js +1 -1
  128. package/views/2d/engine/webgl/mesh/factories/ResourceProxy.js +1 -1
  129. package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriterInputEvaluator.js +1 -1
  130. package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriterRegistry.js +1 -1
  131. package/views/2d/engine/webgl/util/DictionaryMatcher.js +1 -1
  132. package/views/2d/engine/webgl/util/MatcherContext.js +1 -1
  133. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  134. package/views/2d/layers/MediaLayerView2D.js +1 -1
  135. package/views/2d/layers/TileLayerView2D.js +1 -1
  136. package/views/2d/layers/features/FeaturePipelineWorker.js +1 -1
  137. package/views/2d/layers/features/Processor.js +1 -1
  138. package/views/2d/layers/features/processor/AAggregateStrategy.js +1 -1
  139. package/views/2d/layers/features/processor/AProcessorStrategy.js +1 -1
  140. package/views/2d/layers/features/processor/TrackStrategy.js +1 -1
  141. package/views/2d/layers/features/schema/processor/MatcherSchema.js +1 -1
  142. package/views/2d/layers/features/schema/processor/symbols/SymbolSchema.js +1 -1
  143. package/views/2d/layers/features/sources/FeatureSource.js +1 -1
  144. package/views/2d/layers/features/sources/strategies/StreamLoadStrategy.js +1 -1
  145. package/views/2d/layers/features/support/AttributeStore.js +1 -1
  146. package/views/2d/layers/features/support/ComputedAttributeStorage.js +1 -1
  147. package/views/2d/layers/features/support/ComputedExpression.js +1 -1
  148. package/views/2d/layers/features/support/DictionaryTemplate.js +5 -0
  149. package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
  150. package/views/3d/environment/EnvironmentManager.js +1 -1
  151. package/views/3d/environment/Precipitation.js +1 -1
  152. package/views/3d/layers/DynamicLayerView3D.js +1 -1
  153. package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
  154. package/views/3d/layers/GraphicsLayerView3D.js +1 -1
  155. package/views/3d/layers/I3SMeshView3D.js +1 -1
  156. package/views/3d/layers/RouteLayerView3D.js +1 -1
  157. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  158. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  159. package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
  160. package/views/3d/layers/graphics/featureExpressionInfoUtils.js +1 -1
  161. package/views/3d/layers/graphics/queryForSymbologySnapping.js +1 -1
  162. package/views/3d/webgl-engine/lib/PathBuilder.js +1 -1
  163. package/views/3d/webgl-engine/lib/PathGeometryData.js +1 -1
  164. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  165. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  166. package/views/VideoView.js +1 -1
  167. package/views/layers/FeatureLayerView.js +1 -1
  168. package/views/layers/support/MapServiceLayerViewHelper.js +1 -1
  169. package/views/overlay/CrosshairOverlayItem.js +1 -1
  170. package/views/support/projectionUtils.js +1 -1
  171. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  172. package/widgets/Editor/CreateFeaturesWorkflowData.js +1 -1
  173. package/widgets/Editor/EditorViewModel.js +1 -1
  174. package/widgets/Editor/Edits.js +1 -1
  175. package/widgets/Editor/UpdateWorkflow.js +1 -1
  176. package/widgets/Editor/components/PendingFeatureList.js +1 -1
  177. package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
  178. package/widgets/Editor/support/dependencySort.js +5 -0
  179. package/widgets/Editor/workflowUtils.js +1 -1
  180. package/widgets/Feature/FeatureRelationship/FeatureRelationshipViewModel.js +1 -1
  181. package/widgets/Feature/FeatureRelationship.js +1 -1
  182. package/widgets/Feature/support/featureUtils.js +1 -1
  183. package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
  184. package/widgets/FeatureForm/RelationshipInput.js +1 -1
  185. package/widgets/FeatureForm.js +1 -1
  186. package/widgets/FeatureTemplates/FeatureTemplatesViewModel.js +1 -1
  187. package/widgets/OrientedImageryViewer/adapters/sketch/MeasurementAdapter.js +1 -1
  188. package/widgets/Popup.js +1 -1
  189. package/widgets/Print.js +1 -1
  190. package/widgets/Sketch.js +1 -1
  191. package/assets/esri/core/workers/chunks/0121702bc9a1f3a85f1f.js +0 -1
  192. package/assets/esri/core/workers/chunks/05b7c739115be0490583.js +0 -1
  193. package/assets/esri/core/workers/chunks/0ce1bfcdcccb679569f8.js +0 -1
  194. package/assets/esri/core/workers/chunks/1007c1a908b6e503e0db.js +0 -1
  195. package/assets/esri/core/workers/chunks/1439f1d84e21e6295e3f.js +0 -1
  196. package/assets/esri/core/workers/chunks/1912d25f8007685c7aee.js +0 -1
  197. package/assets/esri/core/workers/chunks/1bd58eaac6f4906bbdae.js +0 -1
  198. package/assets/esri/core/workers/chunks/2c091edee3601f345f5f.js +0 -1
  199. package/assets/esri/core/workers/chunks/2e40f2527345ad85d800.js +0 -1
  200. package/assets/esri/core/workers/chunks/30f271bbc34f66cbfc23.js +0 -1
  201. package/assets/esri/core/workers/chunks/36b406131cd864567033.js +0 -1
  202. package/assets/esri/core/workers/chunks/4395b7263a299a8020d4.js +0 -1
  203. package/assets/esri/core/workers/chunks/4c15de6b2b8eefd76b61.js +0 -1
  204. package/assets/esri/core/workers/chunks/4c596cb20baaae5166de.js +0 -1
  205. package/assets/esri/core/workers/chunks/4d16b1e50caad0da7838.js +0 -1
  206. package/assets/esri/core/workers/chunks/5802406d0a239a27a9a3.js +0 -1
  207. package/assets/esri/core/workers/chunks/5c86df2a5e16877ba614.js +0 -1
  208. package/assets/esri/core/workers/chunks/62c9171a58160ea099f8.js +0 -1
  209. package/assets/esri/core/workers/chunks/6a4731b47629604a9ca0.js +0 -1
  210. package/assets/esri/core/workers/chunks/81c507c0d901448835f4.js +0 -1
  211. package/assets/esri/core/workers/chunks/8278d9263e9b7e3bf2d1.js +0 -1
  212. package/assets/esri/core/workers/chunks/8926f672397620591740.js +0 -1
  213. package/assets/esri/core/workers/chunks/8b057b5a606ac3669a78.js +0 -1
  214. package/assets/esri/core/workers/chunks/8bf623f560b1ed440004.js +0 -1
  215. package/assets/esri/core/workers/chunks/924176d9ab2e070248a8.js +0 -1
  216. package/assets/esri/core/workers/chunks/988efc508c33ca341e49.js +0 -1
  217. package/assets/esri/core/workers/chunks/98cbfc72430a378a9451.js +0 -1
  218. package/assets/esri/core/workers/chunks/9fde9309cb64f1a9301c.js +0 -1
  219. package/assets/esri/core/workers/chunks/a901c445d36f1a9e7df8.js +0 -1
  220. package/assets/esri/core/workers/chunks/ab525991f71240d68471.js +0 -1
  221. package/assets/esri/core/workers/chunks/af27a3f646a4404d3b8d.js +0 -1
  222. package/assets/esri/core/workers/chunks/b464b7800a2ddd92b9a7.js +0 -1
  223. package/assets/esri/core/workers/chunks/c15c3fec95f365580902.js +0 -1
  224. package/assets/esri/core/workers/chunks/c1e343cdf85da40ac10e.js +0 -1
  225. package/assets/esri/core/workers/chunks/c3806be4a760735e6082.js +0 -1
  226. package/assets/esri/core/workers/chunks/c3dc8d1958ddc71e1129.js +0 -1
  227. package/assets/esri/core/workers/chunks/c7b0f58550e63ce6ad5b.js +0 -1
  228. package/assets/esri/core/workers/chunks/ccf8a423eee7ef4ffe4c.js +0 -1
  229. package/assets/esri/core/workers/chunks/d24321b1eeabe9ec553c.js +0 -1
  230. package/assets/esri/core/workers/chunks/dd913cb7cf3bb172b34c.js +0 -1
  231. package/assets/esri/core/workers/chunks/e3e049311bced533c853.js +0 -1
  232. package/assets/esri/core/workers/chunks/e3e5a215dcd531b1196f.js +0 -1
  233. package/assets/esri/core/workers/chunks/f31986ea5cadfade8344.js +0 -1
  234. package/assets/esri/core/workers/chunks/f350aefc5e348ebad1da.js +0 -1
  235. package/support/arcadeOnDemand.js +0 -5
  236. package/views/3d/layers/support/projectExtentUtils.js +0 -5
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4755,7136,7634],{2073:(e,t,r)=>{r.d(t,{$n:()=>_,$r:()=>f,EM:()=>h,Ec:()=>Z,JJ:()=>y,Mm:()=>A,OC:()=>N,Sr:()=>c,UO:()=>a,Vj:()=>D,WU:()=>I,Y8:()=>n,Z7:()=>l,_6:()=>T,aJ:()=>p,dd:()=>S,dn:()=>u,et:()=>M,fe:()=>b,gD:()=>w,hE:()=>d,hY:()=>o,iM:()=>g,mt:()=>v,ow:()=>m,vS:()=>O});var i=r(66552);const s={esriCentimeters:"centimeters",esriDecimalDegrees:"decimal-degrees",esriDecimeters:"decimeters",esriFeet:"feet",esriInches:"inches",esriKilometers:"kilometers",esriMeters:"meters",esriMiles:"miles",esriMillimeters:"millimeters",esriNauticalMiles:"nautical-miles",esriPoints:"points",esriUnknownUnits:"unknown",esriYards:"yards"},o=(0,i.O)()(s),n=(0,i.O)()({...s,esriIntFeet:"international-feet",esriIntInches:"international-inches",esriIntMiles:"international-miles",esriIntNauticalMiles:"international-nautical-miles",esriIntYards:"international-yards"}),a=(0,i.O)()({esriAcres:"international-acres",esriAcresUS:"us-acres",esriAres:"ares",esriHectares:"hectares",esriSquareCentimeters:"square-centimeters",esriSquareDecimeters:"square-decimeters",esriSquareFeet:"square-international-feet",esriSquareFeetUS:"square-us-feet",esriSquareInches:"square-international-inches",esriSquareInchesUS:"square-us-inches",esriSquareKilometers:"square-kilometers",esriSquareMeters:"square-meters",esriSquareMiles:"square-international-miles",esriSquareMilesUS:"square-us-miles",esriSquareMillimeters:"square-millimeters",esriSquareYards:"square-international-yards",esriSquareYardsUS:"square-us-yards",esriUnknownAreaUnits:"unknown"}),l=(0,i.O)()({esriNAUCentimeters:"centimeters",esriNAUDecimalDegrees:"decimal-degrees",esriNAUDecimeters:"decimeters",esriNAUFeet:"feet",esriNAUInches:"inches",esriNAUKilometers:"kilometers",esriNAUMeters:"meters",esriNAUMiles:"miles",esriNAUMillimeters:"millimeters",esriNAUNauticalMiles:"nautical-miles",esriNAUPoints:"points",esriNAUYards:"yards"}),u=(0,i.O)()({esriNAUCentimeters:"centimeters",esriNAUDecimalDegrees:"decimal-degrees",esriNAUDecimeters:"decimeters",esriNAUFeet:"feet",esriNAUInches:"inches",esriNAUKilometers:"kilometers",esriNAUMeters:"meters",esriNAUMiles:"miles",esriNAUMillimeters:"millimeters",esriNAUNauticalMiles:"nautical-miles",esriNAUPoints:"points",esriNAUYards:"yards",esriNAUDays:"days",esriNAUHours:"hours",esriNAUMinutes:"minutes",esriNAUSeconds:"seconds",esriNAUKilometersPerHour:"kilometers-per-hour",esriNAUMilesPerHour:"miles-per-hour",esriNAUUnknown:"unknown"}),p=(0,i.O)()({esriDOTComplete:"complete",esriDOTCompleteNoEvents:"complete-no-events",esriDOTFeatureSets:"featuresets",esriDOTInstructionsOnly:"instructions-only",esriDOTStandard:"standard",esriDOTSummaryOnly:"summary-only"}),c=(0,i.O)()({esriNAOutputLineNone:"none",esriNAOutputLineStraight:"straight",esriNAOutputLineTrueShape:"true-shape",esriNAOutputLineTrueShapeWithMeasure:"true-shape-with-measure"}),d=((0,i.O)()({esriNAOutputPolygonNone:"none",esriNAOutputPolygonSimplified:"simplified",esriNAOutputPolygonDetailed:"detailed"}),(0,i.O)()({esriNFSBAllowBacktrack:"allow-backtrack",esriNFSBAtDeadEndsOnly:"at-dead-ends-only",esriNFSBNoBacktrack:"no-backtrack",esriNFSBAtDeadEndsAndIntersections:"at-dead-ends-and-intersections"})),m=((0,i.O)()({esriNATravelDirectionFromFacility:"from-facility",esriNATravelDirectionToFacility:"to-facility"}),(0,i.O)()({esriNATimeOfDayNotUsed:"not-used",esriNATimeOfDayUseAsStartTime:"start",esriNATimeOfDayUseAsEndTime:"end"}),(0,i.O)()({AUTOMOBILE:"automobile",TRUCK:"truck",WALK:"walk",OTHER:"other"})),y=(0,i.O)()({0:"either-side-of-vehicle",1:"right-side-of-vehicle",2:"left-side-of-vehicle",3:"no-u-turn"},{useNumericKeys:!0}),h=(0,i.O)()({0:"stop",1:"waypoint",2:"break"},{useNumericKeys:!0}),f=(0,i.O)()({0:"ok",1:"not-located",2:"network-element-not-located",3:"element-not-traversable",4:"invalid-field-values",5:"not-reached",6:"time-window-violation",7:"not-located-on-closest"},{useNumericKeys:!0}),v=(0,i.O)()({1:"right",2:"left"},{useNumericKeys:!0}),g=(0,i.O)()({0:"restriction",1:"scaled-cost",2:"added-cost"},{useNumericKeys:!0}),b=(0,i.O)()({0:"permit",1:"restrict"},{useNumericKeys:!0}),T=(0,i.O)()({1:"header",50:"arrive",51:"depart",52:"straight",100:"on-ferry",101:"off-ferry",102:"central-fork",103:"roundabout",104:"u-turn",150:"door",151:"stairs",152:"elevator",153:"escalator",154:"pedestrian-ramp",200:"left-fork",201:"left-ramp",202:"clockwise-roundabout",203:"left-handed-u-turn",204:"bear-left",205:"left-turn",206:"sharp-left",207:"left-turn-and-immediate-left-turn",208:"left-turn-and-immediate-right-turn",300:"right-fork",301:"right-ramp",302:"counter-clockwise-roundabout",303:"right-handed-u-turn",304:"bear-right",305:"right-turn",306:"sharp-right",307:"right-turn-and-immediate-left-turn",308:"right-turn-and-immediate-right-turn",400:"up-elevator",401:"up-escalator",402:"up-stairs",500:"down-elevator",501:"down-escalator",502:"down-stairs",1e3:"general-event",1001:"landmark",1002:"time-zone-change",1003:"traffic-event",1004:"scaled-cost-barrier-event",1005:"boundary-crossing",1006:"restriction-violation",1007:"lane"},{useNumericKeys:!0}),w=(0,i.O)()({0:"unknown",1:"segment",2:"maneuver-segment",3:"restriction-violation",4:"scaled-cost-barrier",5:"heavy-traffic",6:"slow-traffic",7:"moderate-traffic"},{useNumericKeys:!0}),_=(0,i.O)()({"NA Campus":"campus","NA Desktop":"desktop","NA Navigation":"navigation"}),S=(0,i.O)()({Kilometers:"kilometers",Miles:"miles",Meters:"meters"},{ignoreUnknown:!1}),A=(0,i.O)()({Minutes:"minutes",TimeAt1KPH:"time-at-1-kph",TravelTime:"travel-time",TruckMinutes:"truck-minutes",TruckTravelTime:"truck-travel-time",WalkTime:"walk-time"},{ignoreUnknown:!1}),M=(0,i.O)()({Kilometers:"kilometers",Miles:"miles",Meters:"meters",Minutes:"minutes",TimeAt1KPH:"time-at-1-kph",TravelTime:"travel-time",TruckMinutes:"truck-minutes",TruckTravelTime:"truck-travel-time",WalkTime:"walk-time"},{ignoreUnknown:!1}),N=(0,i.O)()({"Any Hazmat Prohibited":"any-hazmat-prohibited","Avoid Carpool Roads":"avoid-carpool-roads","Avoid Express Lanes":"avoid-express-lanes","Avoid Ferries":"avoid-ferries","Avoid Gates":"avoid-gates","Avoid Limited Access Roads":"avoid-limited-access-roads","Avoid Private Roads":"avoid-private-roads","Avoid Roads Unsuitable for Pedestrians":"avoid-roads-unsuitable-for-pedestrians","Avoid Stairways":"avoid-stairways","Avoid Toll Roads":"avoid-toll-roads","Avoid Toll Roads for Trucks":"avoid-toll-roads-for-trucks","Avoid Truck Restricted Roads":"avoid-truck-restricted-roads","Avoid Unpaved Roads":"avoid-unpaved-roads","Axle Count Restriction":"axle-count-restriction","Driving a Bus":"driving-a-bus","Driving a Taxi":"driving-a-taxi","Driving a Truck":"driving-a-truck","Driving an Automobile":"driving-an-automobile","Driving an Emergency Vehicle":"driving-an-emergency-vehicle","Height Restriction":"height-restriction","Kingpin to Rear Axle Length Restriction":"kingpin-to-rear-axle-length-restriction","Length Restriction":"length-restriction","Preferred for Pedestrians":"preferred-for-pedestrians","Riding a Motorcycle":"riding-a-motorcycle","Roads Under Construction Prohibited":"roads-under-construction-prohibited","Semi or Tractor with One or More Trailers Prohibited":"semi-or-tractor-with-one-or-more-trailers-prohibited","Single Axle Vehicles Prohibited":"single-axle-vehicles-prohibited","Tandem Axle Vehicles Prohibited":"tandem-axle-vehicles-prohibited","Through Traffic Prohibited":"through-traffic-prohibited","Truck with Trailers Restriction":"truck-with-trailers-restriction","Use Preferred Hazmat Routes":"use-preferred-hazmat-routes","Use Preferred Truck Routes":"use-preferred-truck-routes",Walking:"walking","Weight Restriction":"weight-restriction"},{ignoreUnknown:!1}),O=(0,i.O)()({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),D=(0,i.O)()({esriGeometryPoint:"point",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"envelope",esriGeometryMultipoint:"multipoint"}),I=(0,i.O)()({esriNAUTCost:"cost",esriNAUTDescriptor:"descriptor",esriNAUTRestriction:"restriction",esriNAUTHierarchy:"hierarchy"}),Z=(0,i.O)()({esriDSTAltName:"alt-name",esriDSTArrive:"arrive",esriDSTBranch:"branch",esriDSTCrossStreet:"cross-street",esriDSTCumulativeLength:"cumulative-length",esriDSTDepart:"depart",esriDSTEstimatedArrivalTime:"estimated-arrival-time",esriDSTExit:"exit",esriDSTGeneral:"general",esriDSTLength:"length",esriDSTServiceTime:"service-time",esriDSTStreetName:"street-name",esriDSTSummary:"summary",esriDSTTime:"time",esriDSTTimeWindow:"time-window",esriDSTToward:"toward",esriDSTViolationTime:"violation-time",esriDSTWaitTime:"wait-time"})},4146:(e,t,r)=>{r.d(t,{A:()=>T});var i=r(90237),s=r(78888),o=r(49186),n=r(65529),a=r(4902),l=r(92474),u=r(53966),p=r(74887),c=r(84952),d=r(10107),m=(r(44208),r(87811),r(40608)),y=r(5443),h=r(16930),f=r(92602),v=r(79677);let g=0,b=class extends(n.A.EventedMixin(a.A.IdentifiableMixin(l.A))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new y.A(-180,-90,180,90,h.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+g++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=h.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await r.e(7982).then(r.bind(r,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:i}=await r.e(5613).then(r.bind(r,45613));try{return await i(t)}catch(e){const r=t?.portalItem,i=r?.id||"unset",s=r?.portal?.url||f.A.portalUrl;throw u.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+s+"', id: '"+i+"')",e),e}}(e)}initialize(){this.when().catch((e=>{(0,p.zf)(e)||u.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})}))}destroy(){const e=this.parent;if(e){const t=this;"layers"in e&&e.layers.includes(t)?e.layers.remove(t):"tables"in e&&e.tables.includes(t)?e.tables.remove(t):"baseLayers"in e&&e.baseLayers.includes(t)?e.baseLayers.remove(t):"referenceLayers"in e&&e.referenceLayers.includes(t)&&e.referenceLayers.remove(t),this._set("parent",null)}}get effectiveVisible(){let e=this.visible;const t=this.parent;return e&&t&&"effectiveVisible"in t&&(e&&=t.effectiveVisible),e}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,c.An)(this.url)}createLayerView(e,t){return Promise.reject(new o.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,s.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new o.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,i._)([(0,d.MZ)({type:String})],b.prototype,"attributionDataUrl",void 0),(0,i._)([(0,d.MZ)({readOnly:!0})],b.prototype,"effectiveVisible",null),(0,i._)([(0,d.MZ)({type:y.A})],b.prototype,"fullExtent",void 0),(0,i._)([(0,d.MZ)({readOnly:!0})],b.prototype,"hasAttributionData",null),(0,i._)([(0,d.MZ)({type:String,clonable:!1})],b.prototype,"id",void 0),(0,i._)([(0,d.MZ)({type:Boolean,nonNullable:!0})],b.prototype,"legendEnabled",void 0),(0,i._)([(0,d.MZ)({type:["show","hide","hide-children"]})],b.prototype,"listMode",void 0),(0,i._)([(0,d.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],b.prototype,"opacity",void 0),(0,i._)([(0,d.MZ)({clonable:!1})],b.prototype,"parent",void 0),(0,i._)([(0,d.MZ)({readOnly:!0})],b.prototype,"parsedUrl",null),(0,i._)([(0,d.MZ)({type:Boolean,readOnly:!0})],b.prototype,"persistenceEnabled",void 0),(0,i._)([(0,d.MZ)({type:Boolean})],b.prototype,"popupEnabled",void 0),(0,i._)([(0,d.MZ)({type:Boolean})],b.prototype,"attributionVisible",void 0),(0,i._)([(0,d.MZ)({type:h.A})],b.prototype,"spatialReference",void 0),(0,i._)([(0,d.MZ)({type:String})],b.prototype,"title",void 0),(0,i._)([(0,d.MZ)({readOnly:!0,json:{read:!1}})],b.prototype,"type",void 0),(0,i._)([(0,d.MZ)()],b.prototype,"url",void 0),(0,i._)([(0,d.MZ)({type:v.A})],b.prototype,"visibilityTimeExtent",void 0),(0,i._)([(0,d.MZ)({type:Boolean,nonNullable:!0})],b.prototype,"visible",void 0),b=(0,i._)([(0,m.$)("esri.layers.Layer")],b);const T=b},8303:(e,t,r)=>{r.d(t,{A:()=>_});var i=r(90237),s=r(92602),o=r(70333),n=r(78888),a=r(60999),l=r(49186),u=r(53966),p=r(97768),c=r(74887),d=r(84952),m=r(10107),y=(r(44208),r(87811),r(36005)),h=r(40608),f=r(43937),v=r(83531),g=r(20655),b=r(80812),T=r(41318),w=r(10407);const _=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,p.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new b.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:i}=await r.e(1204).then(r.bind(r,41204));return(0,c.Te)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,c.zf)(e)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,c.QP)(e),!0))))}async setUserPrivileges(e,t){if(!s.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,c.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=!o.id?.findCredential(this.url),s=e===r.id;if(s&&r.portal.user)return this._getUserPrivileges(r,i);let n,a;if(s)n=r.portal.url;else try{n=await(0,v.wI)(this.url,t)}catch(e){(0,c.QP)(e)}if(!n||!(0,d.b8)(n,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;a=await(o.id?.getCredential(`${n}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,c.QP)(e)}const l=!0,u=!1,p=!1;if(!a)return{features:{edit:l,fullEdit:u},content:{updateItem:p}};try{if(s?await r.reload():(r=new b.default({id:e,portal:{url:n}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,i)}catch(e){(0,c.QP)(e)}return{features:{edit:l,fullEdit:u},content:{updateItem:p}}}_getUserPrivileges(e,t){const r=(0,w.It)(e);return t&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,c.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?o.id?.findCredential(this.url):null;if(!t)return!0;const r=S.credential===t?S.user:await this._fetchEditingUser(e);return S.credential=t,S.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=o.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,s=g.A.getDefault();if(s&&s.loaded&&(0,d.S8)(s.restUrl)===(0,d.S8)(i))return s.user;const l=`${i}/community/self`,u=null!=e?e.signal:null,p=await(0,a.Ke)((0,n.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?T.A.fromJSON(p.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,i=this.portalItem?.id&&(this.portalItem.portal||g.A.getDefault());return r&&i&&!(0,d.ut)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new l.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i._)([(0,m.MZ)({type:b.default})],t.prototype,"portalItem",null),(0,i._)([(0,y.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,i._)([(0,f.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,i._)([(0,m.MZ)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,i._)([(0,m.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,i._)([(0,m.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,i._)([(0,m.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,i._)([(0,h.$)("esri.layers.mixins.PortalLayer")],t),t},S={credential:null,user:null}},17136:(e,t,r)=>{r.d(t,{O7:()=>S,el:()=>_});var i=r(92602),s=r(49186),o=r(53966),n=r(39829),a=r(82799),l=r(80754),u=r(21325),p=r(28735),c=r(78888),d=r(65864),m=r(2272),y=r(84952),h=r(92300);const f=()=>o.A.getLogger("esri.geometry.support.normalizeUtils");function v(e){return"polygon"===e[0].type}function g(e){return"polyline"===e[0].type}function b(e,t,r){if(t){const t=function(e,t){if(!(e instanceof a.A||e instanceof n.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw f().error(e),new s.A(e)}const r=(0,l.r8)(e),i=[];for(const e of r){const r=[];i.push(r),r.push([e[0][0],e[0][1]]);for(let i=0;i<e.length-1;i++){const s=e[i][0],o=e[i][1],n=e[i+1][0],a=e[i+1][1],l=Math.sqrt((n-s)*(n-s)+(a-o)*(a-o)),u=(a-o)/l,p=(n-s)/l,c=l/t;if(c>1){for(let e=1;e<=c-1;e++){const i=e*t,n=p*i+s,a=u*i+o;r.push([n,a])}const e=(l+Math.floor(c-1)*t)/2,i=p*e+s,n=u*e+o;r.push([i,n])}r.push([n,a])}}return function(e){return"polygon"===e.type}(e)?new n.A({rings:i,spatialReference:e.spatialReference}):new a.A({paths:i,spatialReference:e.spatialReference})}(e,1e6);e=(0,p.ci)(t,!0)}return r&&(e=(0,l.kS)(e,r)),e}function T(e,t,r){if(Array.isArray(e)){const i=e[0];if(i>t){const r=(0,l.kd)(i,t);e[0]=i+r*(-2*t)}else if(i<r){const t=(0,l.kd)(i,r);e[0]=i+t*(-2*r)}}else{const i=e.x;if(i>t){const r=(0,l.kd)(i,t);e=e.clone().offset(r*(-2*t),0)}else if(i<r){const t=(0,l.kd)(i,r);e=e.clone().offset(t*(-2*r),0)}}return e}function w(e,t){let r=-1;for(let i=0;i<t.cutIndexes.length;i++){const s=t.cutIndexes[i],o=t.geometries[i],n=(0,l.r8)(o);for(let e=0;e<n.length;e++){const t=n[e];t.some((r=>{if(r[0]<180)return!0;{let r=0;for(let e=0;e<t.length;e++){const i=t[e][0];r=i>r?i:r}r=Number(r.toFixed(9));const i=-360*(0,l.kd)(r,180);for(let r=0;r<t.length;r++){const t=o.getPoint(e,r);o.setPoint(e,r,t.clone().offset(i,0))}return!0}}))}if(s===r){if(v(e))for(const t of(0,l.r8)(o))e[s]=e[s].addRing(t);else if(g(e))for(const t of(0,l.r8)(o))e[s]=e[s].addPath(t)}else r=s,e[s]=o}return e}async function _(e,t,r){if(!Array.isArray(e))return _([e],t);t&&"string"!=typeof t&&f().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const s="string"==typeof t?t:t?.url??i.A.geometryServiceUrl;let o,v,g,S,A,M,N,O,D=0;const I=[],Z=[];for(const t of e)if(null!=t)if(o||(o=t.spatialReference,v=(0,u.Vp)(o),g=o.isWebMercator,M=g?102100:4326,S=l.j7[M].maxX,A=l.j7[M].minX,N=l.j7[M].plus180Line,O=l.j7[M].minus180Line),v)if("mesh"===t.type)Z.push(t);else if("point"===t.type)Z.push(T(t.clone(),S,A));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>T(e,S,A))),Z.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,v);Z.push(e.rings?new n.A(e):e)}else if(t.extent){const e=t.extent,r=(0,l.kd)(e.xmin,A)*(2*S);let i=0===r?t.clone():(0,l.kS)(t.clone(),r);e.offset(r,0);let{xmin:s,xmax:o}=e;s=Number(s.toFixed(9)),o=Number(o.toFixed(9)),e.intersects(N)&&o!==S?(D=o>D?o:D,i=b(i,g),I.push(i),Z.push("cut")):e.intersects(O)&&s!==A?(D=o*(2*S)>D?o*(2*S):D,i=b(i,g,360),I.push(i),Z.push("cut")):Z.push(i)}else Z.push(t.clone());else Z.push(t);else Z.push(t);let C=(0,l.kd)(D,S),j=-90;const x=C,F=new a.A;for(;C>0;){const e=360*C-180;F.addPath([[e,j],[e,-1*j]]),j*=-1,C--}if(I.length>0&&x>0){const t=w(I,await async function(e,t,r,i){const s=(0,m.Dl)(e),o=t[0].spatialReference,n={...i,responseType:"json",query:{...s.query,f:"json",sr:(0,u.YX)(o),target:JSON.stringify({geometryType:(0,d.$B)(t[0]),geometries:t}),cutter:JSON.stringify(r)}},a=await(0,c.A)(s.path+"/cut",n),{cutIndexes:l,geometries:p=[]}=a.data;return{cutIndexes:l,geometries:p.map((e=>{const t=(0,d.rS)(e);return t.spatialReference=o,t}))}}(s,I,F,r)),i=[],o=[];for(let r=0;r<Z.length;r++){const s=Z[r];if("cut"!==s)o.push(s);else{const s=t.shift(),n=e[r];null!=n&&"polygon"===n.type&&n.rings&&n.rings.length>1&&s.rings.length>=n.rings.length?(i.push(s),o.push("simplify")):o.push(g?(0,p.Gh)(s):s)}}if(!i.length)return o;const n=await async function(e,t,r){const i="string"==typeof e?(0,y.An)(e):e,s=t[0].spatialReference,o=(0,d.$B)(t[0]),n={...r,query:{...i.query,f:"json",sr:(0,u.YX)(s),geometries:JSON.stringify((0,h.X)(t))}},{data:a}=await(0,c.A)(i.path+"/simplify",n);return(0,h.V)(a.geometries,o,s)}(s,i,r),a=[];for(let e=0;e<o.length;e++){const t=o[e];"simplify"!==t?a.push(t):a.push(g?(0,p.Gh)(n.shift()):n.shift())}return a}const B=[];for(let e=0;e<Z.length;e++){const t=Z[e];if("cut"!==t)B.push(t);else{const e=I.shift();B.push(!0===g?(0,p.Gh)(e):e)}}return B}function S(e,t,r){const i=(0,u.Vp)(r);if(null==i)return e;const[s,o]=i.valid,n=2*o;let a=0,l=0;t>o?a=Math.ceil(Math.abs(t-o)/n):t<s&&(a=-Math.ceil(Math.abs(t-s)/n)),e>o?l=Math.ceil(Math.abs(e-o)/n):e<s&&(l=-Math.ceil(Math.abs(e-s)/n));let p=e+(a-l)*n;const c=p-t;return c>o?p-=n:c<s&&(p+=n),p}},22671:(e,t,r)=>{r.d(t,{A:()=>b});var i,s=r(90237),o=r(52106),n=r(66552),a=r(25482),l=r(4718),u=r(10107),p=(r(44208),r(53966),r(36005)),c=r(40608),d=r(43937),m=r(16930),y=r(65864),h=r(50498),f=r(20437);const v=new n.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let g=i=class extends a.A{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){return this.readFeaturesWithClass(e,t,o.A)}writeGeometryType(e,t,r,i){if(e)return void v.write(e,t,r,i);const{features:s}=this;if(s)for(const e of s)if(null!=e?.geometry)return void v.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,i=(0,y.rS)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=m.A.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,l.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const i=t.features[r];if(i.geometry){const t=e?.[r];i.geometry=t?.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,r],translate:[i,s]}=e,o=this.features,n=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-i)/t)),(e=>Math.round((s-e)/r)));for(let e=0,t=o.length;e<t;e++)n?.(o[e].geometry)||(o.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[i,s],scale:[o,n]}=r;let a=null,l=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;a=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;l=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,(e=>e*o+i),(e=>s-e*n),a,l);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){const i=m.A.fromJSON(t.spatialReference),s=[];for(let t=0;t<e.length;t++){const o=e[t],n=r.fromJSON(o),a=o.geometry?.spatialReference;null==n.geometry||a||(n.geometry.spatialReference=i);const l=o.aggregateGeometries,u=n.aggregateGeometries;if(l&&null!=u)for(const e in u){const t=u[e],r=l[e],s=r?.spatialReference;null==t||s||(t.spatialReference=i)}s.push(n)}return s}_quantizePoints(e,t,r){let i,s;const o=[];for(let n=0,a=e.length;n<a;n++){const a=e[n];if(n>0){const e=t(a[0]),n=r(a[1]);e===i&&n===s||(o.push([e-i,n-s]),i=e,s=n)}else i=t(a[0]),s=r(a[1]),o.push([i,s])}return o.length>0?o:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const i=(0,y.Bi)(e)?e.rings:e.paths,s=[];for(let e=0,o=i.length;e<o;e++){const o=i[e],n=this._quantizePoints(o,t,r);n&&s.push(n)}return s.length>0?((0,y.Bi)(e)?e.rings=s:e.paths=s,e):null}:"multipoint"===e?e=>{const i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,s){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{const o=(0,y.Bi)(e)?e.rings:e.paths;let n,a;for(let e=0,i=o.length;e<i;e++){const i=o[e];for(let e=0,s=i.length;e<s;e++){const s=i[e];e>0?(n+=s[0],a+=s[1]):(n=s[0],a=s[1]),s[0]=t(n),s[1]=r(a)}}if(i&&s)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2]),r[3]=s(r[3])}}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}else if(s)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=s(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),s&&null!=e.mmax&&null!=e.mmin&&(e.mmax=s(e.mmax),e.mmin=s(e.mmin))}:"multipoint"===e?e=>{const o=e.points;let n,a;for(let e=0,i=o.length;e<i;e++){const i=o[e];e>0?(n+=i[0],a+=i[1]):(n=i[0],a=i[1]),i[0]=t(n),i[1]=r(a)}if(i&&s)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2]),t[3]=s(t[3])}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2])}else if(s)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=s(t[2])}}:null}};(0,s._)([(0,u.MZ)({type:String,json:{write:!0}})],g.prototype,"displayFieldName",void 0),(0,s._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],g.prototype,"exceededTransferLimit",void 0),(0,s._)([(0,u.MZ)({type:[o.A],json:{write:!0}})],g.prototype,"features",void 0),(0,s._)([(0,p.w)("features")],g.prototype,"readFeatures",null),(0,s._)([(0,u.MZ)({type:[f.A],json:{write:!0}})],g.prototype,"fields",void 0),(0,s._)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:v.read}}})],g.prototype,"geometryType",void 0),(0,s._)([(0,d.K)("geometryType")],g.prototype,"writeGeometryType",null),(0,s._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],g.prototype,"hasM",void 0),(0,s._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],g.prototype,"hasZ",void 0),(0,s._)([(0,u.MZ)({types:h.yR,json:{write:!0}})],g.prototype,"queryGeometry",void 0),(0,s._)([(0,p.w)("queryGeometry")],g.prototype,"readQueryGeometry",null),(0,s._)([(0,u.MZ)({type:m.A,json:{write:!0}})],g.prototype,"spatialReference",void 0),(0,s._)([(0,d.K)("spatialReference")],g.prototype,"writeSpatialReference",null),(0,s._)([(0,u.MZ)({json:{write:!0}})],g.prototype,"transform",void 0),g=i=(0,s._)([(0,c.$)("esri.rest.support.FeatureSet")],g),g.prototype.toJSON.isDefaultToJSON=!0;const b=g},24097:(e,t,r)=>{r.d(t,{K:()=>i});const i={type:String,json:{read:{source:"token"},write:{target:"token"}}}},25036:(e,t,r)=>{r.d(t,{j:()=>n});var i=r(90237),s=r(10107),o=(r(44208),r(53966),r(87811),r(40608));const n=e=>{let t=class extends e{constructor(){super(...arguments),this.minScale=0,this.maxScale=0}get effectiveScaleRange(){const e={minScale:this.minScale,maxScale:this.maxScale},t=this.parent;t&&"effectiveScaleRange"in t&&function(e,t){e.minScale=e.minScale>0?t.minScale>0?Math.min(e.minScale,t.minScale):e.minScale:t.minScale,e.maxScale=e.maxScale>0?t.maxScale>0?Math.max(e.maxScale,t.maxScale):e.maxScale:t.maxScale}(e,t.effectiveScaleRange);const r=this._get("effectiveScaleRange");return r&&r.minScale===e.minScale&&r.maxScale===e.maxScale?r:e}};return(0,i._)([(0,s.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"minScale",void 0),(0,i._)([(0,s.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"maxScale",void 0),(0,i._)([(0,s.MZ)({readOnly:!0})],t.prototype,"effectiveScaleRange",null),t=(0,i._)([(0,o.$)("esri.layers.mixins.ScaleRangeLayer")],t),t}},37807:(e,t,r)=>{r.d(t,{A:()=>p});var i=r(90237),s=r(66552),o=r(25482),n=r(10107),a=(r(44208),r(53966),r(87811),r(40608));const l=new s.J({esriJobMessageTypeInformative:"informative",esriJobMessageTypeProcessDefinition:"process-definition",esriJobMessageTypeProcessStart:"process-start",esriJobMessageTypeProcessStop:"process-stop",esriJobMessageTypeWarning:"warning",esriJobMessageTypeError:"error",esriJobMessageTypeEmpty:"empty",esriJobMessageTypeAbort:"abort"});let u=class extends o.A{constructor(e){super(e),this.description=null,this.type=null}};(0,i._)([(0,n.MZ)({type:String,json:{write:!0}})],u.prototype,"description",void 0),(0,i._)([(0,n.MZ)({type:String,json:{read:l.read,write:l.write}})],u.prototype,"type",void 0),u=(0,i._)([(0,a.$)("esri.rest.support.GPMessage")],u);const p=u},46130:(e,t,r)=>{r.d(t,{v:()=>s});var i=r(76553);function s(e){e?.writtenProperties&&e.writtenProperties.forEach((({target:e,propName:t,newOrigin:r})=>{(0,i.H)(e)&&r&&e.originOf(t)!==r&&e.updateOrigin(t,r)}))}},46140:(e,t,r)=>{r.d(t,{R:()=>s});var i=r(49186);let s=class e{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new i.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new e(this.major,this.minor,this._context)}static parse(t,r=""){const[s,o]=t.split("."),n=/^\s*\d+\s*$/;if(!s?.match||!n.test(s))throw new i.A((r&&r+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:t});if(!o?.match||!n.test(o))throw new i.A((r&&r+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:t});const a=parseInt(s,10),l=parseInt(o,10);return new e(a,l,r)}}},55674:(e,t,r)=>{r.d(t,{Ad:()=>m,Gj:()=>f,QY:()=>d,lL:()=>v,xR:()=>y});var i=r(66131),s=r(49186),o=(r(44208),r(44729)),n=r(15032),a=r(65864),l=r(95466),u=r(43668),p=r(98623);const c=["geometry","scale","timeProperties"];function d(e,t){if(null!=t)for(const r of c)t.hasArcadeDependency(r)&&e.add(r);return e}function m(e,t){return h.create(e,t,null,["$feature","$view"])}function y(e,t,r){return h.create(e,t,r,["$feature","$view","$config"])}class h{static async create(e,t,r,i){const{arcade:o,Dictionary:n}=await(0,u.l)();let a;try{a=o.parseScript(e)}catch(t){throw new s.A("arcade-bad-expression","Failed to parse arcade script",{script:e,error:t})}const l=o.scriptUsesGeometryEngine(a);l&&await o.enableGeometrySupport(),await o.loadDependentModules(new Set,a,null,!1,l);const p={vars:i.reduce(((e,t)=>({...e,[t]:null})),{}),spatialReference:t,useAsync:!1},c=o.compileScript(a,p);let d=null;null!=r&&(d=new n(r),d.immutable=!0);const m=new n;return m.immutable=!1,m.setField("scale",0),new h(e,o,a,c,t,m,d,n)}constructor(e,t,r,i,s,o,n,a){this.script=e,this._arcade=t,this._syntaxTree=r,this._compiled=i,this._spatialReference=s,this._viewDict=o,this._configDict=n,this._dictionaryCtor=a,this._dependencies=new Map,this._featureReader=new f,this._dependencies.set("geometry",t.scriptTouchesGeometry(this._syntaxTree)),this._dependencies.set("scale",this._arcade.referencesMember(this._syntaxTree,"scale")),this._dependencies.set("timeProperties",this._arcade.scriptUsesViewProperties(this._syntaxTree,["timeProperties"]))}evaluate(e,t){const r=t.$view?.timeZone;if(t.$view){let e;if(this._viewDict.setField("scale",t.$view.scale),null!=t.$view.timeProperties){const{currentStart:s,currentEnd:o}=t.$view.timeProperties;e=new this._dictionaryCtor({currentStart:null!=s?null!=r?i.lY.epochToArcadeDate(s,r):i.lY.unknownEpochToArcadeDate(s):void 0,currentEnd:null!=o?null!=r?i.lY.epochToArcadeDate(o,r):i.lY.unknownEpochToArcadeDate(o):void 0,startIncluded:!0,endIncluded:!0})}this._viewDict.setField("timeProperties",e)}return this._compiled({vars:{$view:this._viewDict,$config:this._configDict,$feature:e},spatialReference:this._spatialReference,timeZone:r})}repurposeFeature(e,t){return this._featureReader.bind(e,t,this._spatialReference),this._featureReader}references(e){return this._dependencies.get(e)??!1}}class f{constructor(){this._boundTarget=null,this._boundSchema={fields:null,fieldsIndex:null,spatialReference:null,get geometryType(){return null},get objectIdField(){return null}},this.arcadeDeclaredClass="esri.arcade.Feature",this._contextTimeZone=null}bind(e,t,r){const i=t??new l.A(v(e.attributes));this._boundTarget=e,this._boundSchema.fields=i.fields,this._boundSchema.fieldsIndex=i,this._boundSchema.spatialReference=r}_getField(e){return this._boundSchema.fieldsIndex.get(e)}get contextTimeZone(){return this._contextTimeZone}set contextTimeZone(e){this._contextTimeZone=e}readArcadeFeature(){return this}hasField(e){return this._boundSchema.fieldsIndex.has(e)}geometry(){if("fromJSON"in this._boundTarget)return this._boundTarget.geometry;const e=(0,a.rS)(this._boundTarget.geometry);if(e){if(!this._boundSchema.spatialReference)throw new Error("InternalError: Expected spatial reference to be defined");e.spatialReference=this._boundSchema.spatialReference}return e}isUnknownDateTimeField(e){return this._boundSchema.fieldsIndex.getTimeZone(e)===p.L5}field(e,t=!0){const r=this._getField(e);if(r)switch(r.type){case"date-only":case"esriFieldTypeDateOnly":return o.n.fromReader(this._boundTarget.attributes[r.name]);case"time-only":case"esriFieldTypeTimeOnly":return n.k.fromReader(this._boundTarget.attributes[r.name]);case"esriFieldTypeTimestampOffset":case"timestamp-offset":return i.lY.fromReaderAsTimeStampOffset(this._boundTarget.attributes[r.name]);case"date":case"esriFieldTypeDate":{const t=this._boundTarget.attributes[r.name];return this.isUnknownDateTimeField(e)?i.lY.unknownEpochToArcadeDate(t):i.lY.epochToArcadeDate(t,this.contextTimeZone??p.qU)}default:return this._boundTarget.attributes[r.name]}if(t)throw new Error(`Field ${e} does not exist`);return null}setField(e,t){throw new Error("Unable to update feature attribute values, feature is readonly")}keys(){return this._boundSchema.fieldsIndex.fields.map((e=>e.name))}castToText(e=!1){return JSON.stringify(this._boundTarget)}gdbVersion(){return null}fullSchema(){return this._boundSchema}castAsJson(e=null){return{attributes:this._boundTarget.attributes,geometry:!0===e?.keepGeometryType?this.geometry():this.geometry()?.toJSON()??null}}castAsJsonAsync(e=null,t=null){return Promise.resolve(this.castAsJson(t))}}function v(e){const t=[];for(const r in e)t.push({name:r,alias:r,type:"string"==typeof e[r]?"esriFieldTypeString":"esriFieldTypeDouble"});return t}},63074:(e,t,r)=>{r.d(t,{LF:()=>p,dM:()=>c,sU:()=>l});var i=r(90237),s=r(10107),o=(r(44208),r(53966),r(87811),r(40608)),n=r(89317),a=r(76369);const l={type:["average","color-burn","color-dodge","color","darken","destination-atop","destination-in","destination-out","destination-over","difference","exclusion","hard-light","hue","invert","lighten","lighter","luminosity","minus","multiply","normal","overlay","plus","reflect","saturation","screen","soft-light","source-atop","source-in","source-out","vivid-light","xor"],nonNullable:!0,json:{read:!1,write:!1,origins:{"web-map":{read:!0,write:{layerContainerTypes:n.K}},"portal-item":{read:!0,write:{layerContainerTypes:n.K}}}}},u={read:{reader:a.LF},write:{allowNull:!0,writer:a.M9,layerContainerTypes:n.K}},p={json:{read:!1,write:!1,origins:{"web-map":u,"portal-item":u}}},c=e=>{let t=class extends e{constructor(){super(...arguments),this.blendMode="normal",this.effect=null}};return(0,i._)([(0,s.MZ)(l)],t.prototype,"blendMode",void 0),(0,i._)([(0,s.MZ)(p)],t.prototype,"effect",void 0),t=(0,i._)([(0,o.$)("esri.layers.mixins.BlendLayer")],t),t}},64185:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Ut});var i=r(90237),s=r(92602),o=r(52106),n=r(13874),a=r(5503),l=r(49186),u=r(53966),p=r(92071),c=r(93637),d=r(74887),m=r(36708),y=r(83047),h=r(84952),f=r(10107),v=(r(44208),r(87811),r(36005)),g=r(40608),b=r(43937),T=r(46130),w=r(5443),_=r(48526),S=r(57251),A=r(16930),M=r(21325),N=r(4146),O=r(63074),D=r(16131),I=r(8303),Z=r(25036),C=r(60694),j=r(25482),x=r(53930),F=r(33910);let B=class extends j.A{constructor(e){super(e),this.break=new x.A({color:[255,255,255],size:12,outline:{color:[0,122,194],width:3}}),this.first=new x.A({color:[0,255,0],size:20,outline:{color:[255,255,255],width:4}}),this.unlocated=new x.A({color:[255,0,0],size:12,outline:{color:[255,255,255],width:3}}),this.last=new x.A({color:[255,0,0],size:20,outline:{color:[255,255,255],width:4}}),this.middle=new x.A({color:[51,51,51],size:12,outline:{color:[0,122,194],width:3}}),this.waypoint=new x.A({color:[255,255,255],size:12,outline:{color:[0,122,194],width:3}})}};(0,i._)([(0,f.MZ)({types:F.wC})],B.prototype,"break",void 0),(0,i._)([(0,f.MZ)({types:F.wC})],B.prototype,"first",void 0),(0,i._)([(0,f.MZ)({types:F.wC})],B.prototype,"unlocated",void 0),(0,i._)([(0,f.MZ)({types:F.wC})],B.prototype,"last",void 0),(0,i._)([(0,f.MZ)({types:F.wC})],B.prototype,"middle",void 0),(0,i._)([(0,f.MZ)({types:F.wC})],B.prototype,"waypoint",void 0),B=(0,i._)([(0,g.$)("esri.layers.support.RouteStopSymbols")],B);const R=B;var P=r(94985),E=r(31593);let L=class extends j.A{constructor(e){super(e),this.directionLines=new E.A({color:[0,122,194],width:6}),this.directionPoints=new x.A({color:[255,255,255],size:6,outline:{color:[0,122,194],width:2}}),this.pointBarriers=new x.A({style:"x",size:10,outline:{color:[255,0,0],width:3}}),this.polygonBarriers=new P.A({color:[255,170,0,.6],outline:{width:7.5,color:[255,0,0,.6]}}),this.polylineBarriers=new E.A({width:7.5,color:[255,85,0,.7]}),this.routeInfo=new E.A({width:8,color:[20,89,127]}),this.stops=new R}};(0,i._)([(0,f.MZ)({types:F.Y7})],L.prototype,"directionLines",void 0),(0,i._)([(0,f.MZ)({types:F.wC})],L.prototype,"directionPoints",void 0),(0,i._)([(0,f.MZ)({types:F.wC})],L.prototype,"pointBarriers",void 0),(0,i._)([(0,f.MZ)({types:F.Ac})],L.prototype,"polygonBarriers",void 0),(0,i._)([(0,f.MZ)({types:F.Y7})],L.prototype,"polylineBarriers",void 0),(0,i._)([(0,f.MZ)({types:F.Y7})],L.prototype,"routeInfo",void 0),(0,i._)([(0,f.MZ)({type:R})],L.prototype,"stops",void 0),L=(0,i._)([(0,g.$)("esri.layers.support.RouteSymbols")],L);const J=L;var U=r(20655),k=r(80812),$=r(10407),W=r(65494),q=r(78888),G=r(2272),V=r(93223),z=r(2073);let K=class extends j.A{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,i._)([(0,f.MZ)({type:String})],K.prototype,"dataType",void 0),(0,i._)([(0,V.e)(z.et,{ignoreUnknown:!1})],K.prototype,"name",void 0),(0,i._)([(0,f.MZ)({type:[String]})],K.prototype,"parameterNames",void 0),(0,i._)([(0,f.MZ)({type:String})],K.prototype,"restrictionUsageParameterName",void 0),(0,i._)([(0,V.e)(z.Mm,{ignoreUnknown:!1})],K.prototype,"timeNeutralAttributeName",void 0),(0,i._)([(0,f.MZ)({type:String})],K.prototype,"trafficSupport",void 0),(0,i._)([(0,V.e)(z.dn)],K.prototype,"units",void 0),(0,i._)([(0,V.e)(z.WU)],K.prototype,"usageType",void 0),K=(0,i._)([(0,g.$)("esri.rest.support.NetworkAttribute")],K);const H=K;let Y=class extends j.A{constructor(e){super(e),this.buildTime=null,this.name=null,this.networkAttributes=null,this.networkSources=null,this.state=null}};(0,i._)([(0,f.MZ)({type:Number})],Y.prototype,"buildTime",void 0),(0,i._)([(0,f.MZ)({type:String})],Y.prototype,"name",void 0),(0,i._)([(0,f.MZ)({type:[H]})],Y.prototype,"networkAttributes",void 0),(0,i._)([(0,f.MZ)()],Y.prototype,"networkSources",void 0),(0,i._)([(0,f.MZ)({type:String})],Y.prototype,"state",void 0),Y=(0,i._)([(0,g.$)("esri.rest.support.NetworkDataset")],Y);const X=Y;var Q=r(69540);let ee=class extends(Q.A.ClonableMixin(j.A)){constructor(e){super(e),this.attributeParameterValues=null,this.description=null,this.distanceAttributeName=null,this.id=null,this.impedanceAttributeName=null,this.name=null,this.restrictionAttributeNames=null,this.simplificationTolerance=null,this.simplificationToleranceUnits=null,this.timeAttributeName=null,this.type=null,this.useHierarchy=null,this.uturnAtJunctions=null}readId(e,t){return t.id??t.itemId??null}readRestrictionAttributes(e,t){const{restrictionAttributeNames:r}=t;return null==r?null:r.map((e=>z.OC.fromJSON(e)))}writeRestrictionAttributes(e,t,r){null!=e&&(t[r]=e.map((e=>z.OC.toJSON(e))))}};(0,i._)([(0,f.MZ)({type:[Object],json:{write:!0}})],ee.prototype,"attributeParameterValues",void 0),(0,i._)([(0,f.MZ)({type:String,json:{write:!0}})],ee.prototype,"description",void 0),(0,i._)([(0,V.e)(z.dd,{ignoreUnknown:!1})],ee.prototype,"distanceAttributeName",void 0),(0,i._)([(0,f.MZ)({type:String,json:{write:!0}})],ee.prototype,"id",void 0),(0,i._)([(0,v.w)("id",["id","itemId"])],ee.prototype,"readId",null),(0,i._)([(0,V.e)(z.et,{ignoreUnknown:!1})],ee.prototype,"impedanceAttributeName",void 0),(0,i._)([(0,f.MZ)({type:String,json:{write:!0}})],ee.prototype,"name",void 0),(0,i._)([(0,f.MZ)({type:[String],json:{write:!0}})],ee.prototype,"restrictionAttributeNames",void 0),(0,i._)([(0,v.w)("restrictionAttributeNames")],ee.prototype,"readRestrictionAttributes",null),(0,i._)([(0,b.K)("restrictionAttributeNames")],ee.prototype,"writeRestrictionAttributes",null),(0,i._)([(0,f.MZ)({type:Number,json:{write:{allowNull:!0}}})],ee.prototype,"simplificationTolerance",void 0),(0,i._)([(0,V.e)(z.hY)],ee.prototype,"simplificationToleranceUnits",void 0),(0,i._)([(0,V.e)(z.Mm,{ignoreUnknown:!1})],ee.prototype,"timeAttributeName",void 0),(0,i._)([(0,V.e)(z.ow)],ee.prototype,"type",void 0),(0,i._)([(0,f.MZ)({type:Boolean,json:{write:!0}})],ee.prototype,"useHierarchy",void 0),(0,i._)([(0,V.e)(z.hE)],ee.prototype,"uturnAtJunctions",void 0),ee=(0,i._)([(0,g.$)("esri.rest.support.TravelMode")],ee);const te=ee;let re=class extends j.A{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=>z.et.fromJSON(e)))}writeAccumulateAttributes(e,t,r){e?.length&&(t[r]=e.map((e=>z.et.toJSON(e))))}get capabilities(){return{supportsNow:(this.currentVersion??10)>=10.81}}readDefaultTravelMode(e,t){const r=t.supportedTravelModes?.find((({id:e})=>e===t.defaultTravelMode))??t.supportedTravelModes?.find((({itemId:e})=>e===t.defaultTravelMode));return r?te.fromJSON(r):null}};(0,i._)([(0,f.MZ)()],re.prototype,"accumulateAttributeNames",void 0),(0,i._)([(0,v.w)("accumulateAttributeNames")],re.prototype,"readAccumulateAttributes",null),(0,i._)([(0,b.K)("accumulateAttributeNames")],re.prototype,"writeAccumulateAttributes",null),(0,i._)([(0,f.MZ)()],re.prototype,"attributeParameterValues",void 0),(0,i._)([(0,f.MZ)()],re.prototype,"capabilities",null),(0,i._)([(0,f.MZ)()],re.prototype,"currentVersion",void 0),(0,i._)([(0,f.MZ)()],re.prototype,"defaultTravelMode",void 0),(0,i._)([(0,v.w)("defaultTravelMode",["defaultTravelMode","supportedTravelModes"])],re.prototype,"readDefaultTravelMode",null),(0,i._)([(0,f.MZ)()],re.prototype,"directionsLanguage",void 0),(0,i._)([(0,V.e)(z.Z7)],re.prototype,"directionsLengthUnits",void 0),(0,i._)([(0,f.MZ)()],re.prototype,"directionsSupportedLanguages",void 0),(0,i._)([(0,V.e)(z.Mm,{ignoreUnknown:!1})],re.prototype,"directionsTimeAttribute",void 0),(0,i._)([(0,f.MZ)()],re.prototype,"hasZ",void 0),(0,i._)([(0,V.e)(z.et,{ignoreUnknown:!1})],re.prototype,"impedance",void 0),(0,i._)([(0,f.MZ)({type:X})],re.prototype,"networkDataset",void 0),(0,i._)([(0,f.MZ)({type:[te]})],re.prototype,"supportedTravelModes",void 0),re=(0,i._)([(0,g.$)("esri.rest.support.NetworkServiceDescription")],re);const ie=re;function se(e,t,r,i){i[r]=[t.length,t.length+e.length],e.forEach((e=>{t.push(e.geometry)}))}async function oe(e,t,r){if(!e)throw new l.A("network-service:missing-url","Url to Network service is missing");const i=(0,G.jV)({f:"json",token:t},r),{data:s}=await(0,q.A)(e,i),o=s.currentVersion>=10.4?async function(e,t,r){try{const i=(0,G.jV)({f:"json",token:t},r),s=(0,h.UC)(e)+"/retrieveTravelModes",{data:{supportedTravelModes:o,defaultTravelMode:n}}=await(0,q.A)(s,i);return{supportedTravelModes:o,defaultTravelMode:n}}catch(e){throw new l.A("network-service:retrieveTravelModes","Could not get to the NAServer's retrieveTravelModes.",{error:e})}}(e,t,r):async function(e,t){const r=(0,G.jV)({f:"json"},t),{data:i}=await(0,q.A)(e.replace(/\/rest\/.*$/i,"/info"),r);if(!i?.owningSystemUrl)return{supportedTravelModes:[],defaultTravelMode:null};const{owningSystemUrl:s}=i,o=(0,h.UC)(s)+"/sharing/rest/portals/self",{data:n}=await(0,q.A)(o,r),a=(0,c.wc)("helperServices.routingUtilities.url",n);if(!a)return{supportedTravelModes:[],defaultTravelMode:null};const l=(0,G.Dl)(s),u=/\/solve$/i.test(l.path)?"Route":/\/solveclosestfacility$/i.test(l.path)?"ClosestFacility":"ServiceAreas",p=(0,G.jV)({f:"json",serviceName:u},t),d=(0,h.UC)(a)+"/GetTravelModes/execute",m=await(0,q.A)(d,p),y=[];let f=null;if(m?.data?.results?.length){const e=m.data.results;for(const t of e)if("supportedTravelModes"===t.paramName){if(t.value?.features)for(const{attributes:e}of t.value.features)if(e){const t=JSON.parse(e.TravelMode);y.push(t)}}else"defaultTravelMode"===t.paramName&&(f=t.value)}return{supportedTravelModes:y,defaultTravelMode:f}}(e,r),{defaultTravelMode:n,supportedTravelModes:a}=await o;return s.defaultTravelMode=n,s.supportedTravelModes=a,ie.fromJSON(s)}var ne=r(16649),ae=r(17136);function le(e,t){if(null==e)return null;const r={},i=new RegExp(`^${t}`,"i");for(const s of Object.keys(e))if(i.test(s)){const i=s.slice(t.length);r[z.et.fromJSON(i)]=e[s]}return r}function ue(e,t,r){if(null!=e){t.attributes||(t.attributes={});for(const i in e){const s=z.et.toJSON(i);t.attributes[`${r}${s}`]=e[i]}}}function pe(e){const t={};for(const r of Object.keys(e)){const i=r;t[z.et.fromJSON(i)]=e[r]}return t}function ce(e){const t={};for(const r of Object.keys(e)){const i=r;t[z.et.toJSON(i)]=e[r]}return t}function de(e,t){return null==e||null==t?null:Math.round((e-t)/6e4)}function me(e){const t=e.toJSON(),r=t;return r.accumulateAttributeNames&&=t.accumulateAttributeNames?.join(),r.attributeParameterValues&&=JSON.stringify(t.attributeParameterValues),r.barriers&&=JSON.stringify(t.barriers),r.outSR&&=t.outSR?.wkid,r.overrides&&=JSON.stringify(t.overrides),r.polygonBarriers&&=JSON.stringify(t.polygonBarriers),r.polylineBarriers&&=JSON.stringify(t.polylineBarriers),r.restrictionAttributeNames&&=t.restrictionAttributeNames?.join(),r.stops&&=JSON.stringify(t.stops),r.travelMode&&=JSON.stringify(t.travelMode),r}var ye=r(22671),he=r(4576),fe=r(66552),ve=r(37807);const ge=new fe.J({0:"informative",1:"process-definition",2:"process-start",3:"process-stop",50:"warning",100:"error",101:"empty",200:"abort"});let be=class extends ve.A{constructor(e){super(e),this.type=null}};(0,i._)([(0,f.MZ)({type:String,json:{read:ge.read,write:ge.write}})],be.prototype,"type",void 0),be=(0,i._)([(0,g.$)("esri.rest.support.NAMessage")],be);const Te=be;var we=r(82799),_e=r(86738);let Se=class extends j.A{constructor(e){super(e)}};(0,i._)([(0,f.MZ)({json:{read:{source:"string"}}})],Se.prototype,"text",void 0),(0,i._)([(0,V.e)(z.Ec,{name:"stringType"})],Se.prototype,"type",void 0),Se=(0,i._)([(0,g.$)("esri.rest.support.DirectionsString")],Se);const Ae=Se;let Me=class extends j.A{constructor(e){super(e),this.arriveTime=null,this.arriveTimeOffset=null,this.geometry=null,this.strings=null}readArriveTimeOffset(e,t){return de(t.ETA,t.arriveTimeUTC)}readGeometry(e,t){return _e.A.fromJSON(t.point)}};(0,i._)([(0,f.MZ)({type:Date,json:{read:{source:"arriveTimeUTC"}}})],Me.prototype,"arriveTime",void 0),(0,i._)([(0,f.MZ)()],Me.prototype,"arriveTimeOffset",void 0),(0,i._)([(0,v.w)("arriveTimeOffset",["arriveTimeUTC","ETA"])],Me.prototype,"readArriveTimeOffset",null),(0,i._)([(0,f.MZ)({type:_e.A})],Me.prototype,"geometry",void 0),(0,i._)([(0,v.w)("geometry",["point"])],Me.prototype,"readGeometry",null),(0,i._)([(0,f.MZ)({type:[Ae]})],Me.prototype,"strings",void 0),Me=(0,i._)([(0,g.$)("esri.rest.support.DirectionsEvent")],Me);const Ne=Me;let Oe=class extends o.A{constructor(e){super(e),this.events=null,this.geometry=null,this.strings=null}readGeometry(e,t){const r=function(e){if(null==e||""===e)return null;let t=0,r=0,i=0,s=0;const o=[];let n,a,l,u,p,c,d,m,y=0,h=0,f=0;if(p=e.match(/((\+|-)[^+\-|]+|\|)/g),p||(p=[]),0===parseInt(p[y],32)){y=2;const e=parseInt(p[y],32);y++,c=parseInt(p[y],32),y++,1&e&&(h=p.indexOf("|")+1,d=parseInt(p[h],32),h++),2&e&&(f=p.indexOf("|",h)+1,m=parseInt(p[f],32),f++)}else c=parseInt(p[y],32),y++;for(;y<p.length&&"|"!==p[y];){n=parseInt(p[y],32)+t,y++,t=n,a=parseInt(p[y],32)+r,y++,r=a;const e=[n/c,a/c];h&&(u=parseInt(p[h],32)+i,h++,i=u,e.push(u/d)),f&&(l=parseInt(p[f],32)+s,f++,s=l,e.push(l/m)),o.push(e)}return{paths:[o],hasZ:h>0,hasM:f>0}}(t.compressedGeometry);return null!=r?we.A.fromJSON(r):null}};(0,i._)([(0,f.MZ)({type:[Ne]})],Oe.prototype,"events",void 0),(0,i._)([(0,f.MZ)({type:we.A})],Oe.prototype,"geometry",void 0),(0,i._)([(0,v.w)("geometry",["compressedGeometry"])],Oe.prototype,"readGeometry",null),(0,i._)([(0,f.MZ)({type:[Ae]})],Oe.prototype,"strings",void 0),Oe=(0,i._)([(0,g.$)("esri.rest.support.DirectionsFeature")],Oe);const De=Oe;let Ie=class extends ye.A{constructor(e){super(e),this.extent=null,this.features=[],this.geometryType="polyline",this.routeId=null,this.routeName=null,this.totalDriveTime=null,this.totalLength=null,this.totalTime=null}readFeatures(e,t){if(!e)return[];const r=t.summary.envelope.spatialReference??t.spatialReference,i=r&&A.A.fromJSON(r);return e.map((e=>{const t=De.fromJSON(e);if(null!=t.geometry&&(t.geometry.spatialReference=i),null!=t.events)for(const e of t.events)null!=e.geometry&&(e.geometry.spatialReference=i);return t}))}get mergedGeometry(){return this.features?function(e,t){if(0===e.length)return new we.A({spatialReference:t});const r=[];for(const t of e)for(const e of t.paths)r.push(...e);const i=[];r.forEach(((e,t)=>{0!==t&&e[0]===r[t-1][0]&&e[1]===r[t-1][1]||i.push(e)}));const{hasM:s,hasZ:o}=e[0];return new we.A({hasM:s,hasZ:o,paths:[i],spatialReference:t})}(this.features.map((({geometry:e})=>e)),this.extent.spatialReference):null}get strings(){return this.features.flatMap((({strings:e})=>e)).filter(he.Ru)}};(0,i._)([(0,f.MZ)({type:w.A,json:{read:{source:"summary.envelope"}}})],Ie.prototype,"extent",void 0),(0,i._)([(0,f.MZ)({nonNullable:!0})],Ie.prototype,"features",void 0),(0,i._)([(0,v.w)("features")],Ie.prototype,"readFeatures",null),(0,i._)([(0,f.MZ)()],Ie.prototype,"geometryType",void 0),(0,i._)([(0,f.MZ)({readOnly:!0})],Ie.prototype,"mergedGeometry",null),(0,i._)([(0,f.MZ)()],Ie.prototype,"routeId",void 0),(0,i._)([(0,f.MZ)()],Ie.prototype,"routeName",void 0),(0,i._)([(0,f.MZ)({value:null,readOnly:!0})],Ie.prototype,"strings",null),(0,i._)([(0,f.MZ)({json:{read:{source:"summary.totalDriveTime"}}})],Ie.prototype,"totalDriveTime",void 0),(0,i._)([(0,f.MZ)({json:{read:{source:"summary.totalLength"}}})],Ie.prototype,"totalLength",void 0),(0,i._)([(0,f.MZ)({json:{read:{source:"summary.totalTime"}}})],Ie.prototype,"totalTime",void 0),Ie=(0,i._)([(0,g.$)("esri.rest.support.DirectionsFeatureSet")],Ie);const Ze=Ie;let Ce=class extends j.A{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,i._)([(0,f.MZ)({type:ye.A,json:{write:!0}})],Ce.prototype,"directionLines",void 0),(0,i._)([(0,f.MZ)({type:ye.A,json:{write:!0}})],Ce.prototype,"directionPoints",void 0),(0,i._)([(0,f.MZ)({type:Ze,json:{write:!0}})],Ce.prototype,"directions",void 0),(0,i._)([(0,f.MZ)({type:o.A,json:{write:!0}})],Ce.prototype,"route",void 0),(0,i._)([(0,f.MZ)({type:String,json:{write:!0}})],Ce.prototype,"routeName",void 0),(0,i._)([(0,f.MZ)({type:[o.A],json:{write:!0}})],Ce.prototype,"stops",void 0),(0,i._)([(0,f.MZ)({type:ye.A,json:{write:!0}})],Ce.prototype,"traversedEdges",void 0),(0,i._)([(0,f.MZ)({type:ye.A,json:{write:!0}})],Ce.prototype,"traversedJunctions",void 0),(0,i._)([(0,f.MZ)({type:ye.A,json:{write:!0}})],Ce.prototype,"traversedTurns",void 0),Ce=(0,i._)([(0,g.$)("esri.rest.support.RouteResult")],Ce);const je=Ce;function xe(e){return e?ye.A.fromJSON(e).features.filter(he.Ru):[]}let Fe=class extends j.A{constructor(e){super(e),this.checksum=null,this.messages=null,this.pointBarriers=null,this.polylineBarriers=null,this.polygonBarriers=null,this.routeResults=null}readPointBarriers(e,t){return xe(t.barriers)}readPolylineBarriers(e){return xe(e)}readPolygonBarriers(e){return xe(e)}};(0,i._)([(0,f.MZ)({type:String})],Fe.prototype,"checksum",void 0),(0,i._)([(0,f.MZ)({type:[Te]})],Fe.prototype,"messages",void 0),(0,i._)([(0,f.MZ)({type:[o.A]})],Fe.prototype,"pointBarriers",void 0),(0,i._)([(0,v.w)("pointBarriers",["barriers"])],Fe.prototype,"readPointBarriers",null),(0,i._)([(0,f.MZ)({type:[o.A]})],Fe.prototype,"polylineBarriers",void 0),(0,i._)([(0,v.w)("polylineBarriers")],Fe.prototype,"readPolylineBarriers",null),(0,i._)([(0,f.MZ)({type:[o.A]})],Fe.prototype,"polygonBarriers",void 0),(0,i._)([(0,v.w)("polygonBarriers")],Fe.prototype,"readPolygonBarriers",null),(0,i._)([(0,f.MZ)({type:[je]})],Fe.prototype,"routeResults",void 0),Fe=(0,i._)([(0,g.$)("esri.rest.support.RouteSolveResult")],Fe);const Be=Fe;function Re(e){return e instanceof ye.A}async function Pe(e,t,r){const i=[],s=[],o={},n={},a=(0,G.Dl)(e),{path:l}=a;Re(t.stops)&&se(t.stops.features,s,"stops.features",o),Re(t.pointBarriers)&&se(t.pointBarriers.features,s,"pointBarriers.features",o),Re(t.polylineBarriers)&&se(t.polylineBarriers.features,s,"polylineBarriers.features",o),Re(t.polygonBarriers)&&se(t.polygonBarriers.features,s,"polygonBarriers.features",o);const p=await(0,ae.el)(s);for(const e in o){const t=o[e];i.push(e),n[e]=p.slice(t[0],t[1])}if(function(e,t){for(let r=0;r<t.length;r++){const i=e[t[r]];if(i&&i.length)for(const e of i)if(null!=e&&e.hasZ)return!0}return!1}(n,i)){let e=null;try{e=await oe(l,t.apiKey,r)}catch{}e&&!e.hasZ&&function(e,t){for(let r=0;r<t.length;r++){const i=e[t[r]];if(i&&i.length)for(const e of i)e.z=void 0}u.A.getLogger("esri.rest.networkService").warnOnce("The remote Network Analysis service is powered by a network dataset which is not Z-aware.\nZ-coordinates of the input geometry are ignored.")}(n,i)}for(const e in n)n[e].forEach(((r,i)=>{(0,ne.Jt)(t,e)[i].geometry=r}));const c={...r,query:{...a.query,...me(t),f:"json"}},d=l.endsWith("/solve")?l:`${l}/solve`,{data:m}=await(0,q.A)(d,c);return function(e){const{barriers:t,checksum:r,directionLines:i,directionPoints:s,directions:o,messages:n,polygonBarriers:a,polylineBarriers:l,routes:u,stops:p,traversedEdges:c,traversedJunctions:d,traversedTurns:m}=e,y=e=>{const t=f.find((t=>t.routeName===e));if(null!=t)return t;const r={routeId:f.length+1,routeName:e};return f.push(r),r},h=e=>{const t=f.find((t=>t.routeId===e));if(null!=t)return t;const r={routeId:e,routeName:null};return f.push(r),r},f=[];u?.features.forEach(((e,t)=>{e.geometry.spatialReference=u.spatialReference??void 0;const r=e.attributes.Name,i=t+1;f.push({routeId:i,routeName:r,route:e})})),o?.forEach((e=>{const{routeName:t}=e;y(t).directions=e}));const v=p?.features.every((e=>null==e.attributes.RouteName))&&f.length>0?f[0].routeName:null;return p?.features.forEach((e=>{e.geometry&&(e.geometry.spatialReference??=p.spatialReference??void 0);const t=v??e.attributes.RouteName,r=y(t);r.stops??=[],r.stops.push(e)})),i?.features.forEach((e=>{const t=e.attributes.RouteID,r=h(t),{geometryType:s,spatialReference:o}=i;r.directionLines??={features:[],geometryType:s,spatialReference:o},r.directionLines.features.push(e)})),s?.features.forEach((e=>{const t=e.attributes.RouteID,r=h(t),{geometryType:i,spatialReference:o}=s;r.directionPoints??={features:[],geometryType:i,spatialReference:o},r.directionPoints.features.push(e)})),c?.features.forEach((e=>{const t=e.attributes.RouteID,r=h(t),{geometryType:i,spatialReference:s}=c;r.traversedEdges??={features:[],geometryType:i,spatialReference:s},r.traversedEdges.features.push(e)})),d?.features.forEach((e=>{const t=e.attributes.RouteID,r=h(t),{geometryType:i,spatialReference:s}=d;r.traversedJunctions??={features:[],geometryType:i,spatialReference:s},r.traversedJunctions.features.push(e)})),m?.features.forEach((e=>{const t=e.attributes.RouteID,r=h(t);r.traversedTurns??={features:[]},r.traversedTurns.features.push(e)})),Be.fromJSON({barriers:t,checksum:r,messages:n,polygonBarriers:a,polylineBarriers:l,routeResults:f})}(m)}var Ee;let Le=class extends(Q.A.ClonableMixin(j.A)){static{Ee=this}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{this.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID"},{name:"DirectionLineType",alias:"Line Type",type:"esriFieldTypeInteger"},{name:"DirectionPointID",alias:"Direction Point ID",type:"esriFieldTypeInteger"},{name:"FromLevel",alias:"From Level",type:"esriFieldTypeInteger"},{name:"Meters",alias:"Meters",type:"esriFieldTypeDouble"},{name:"Minutes",alias:"Minutes",type:"esriFieldTypeDouble"},{name:"ToLevel",alias:"To Level",type:"esriFieldTypeInteger"}]}static fromGraphic(e){return new Ee({directionLineType:z.gD.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?z.gD.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 o.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};(0,i._)([(0,f.MZ)({type:z.gD.apiValues,json:{read:{source:"attributes.DirectionLineType",reader:z.gD.read}}})],Le.prototype,"directionLineType",void 0),(0,i._)([(0,f.MZ)({json:{read:{source:"attributes.DirectionPointID"}}})],Le.prototype,"directionPointId",void 0),(0,i._)([(0,f.MZ)({json:{read:{source:"attributes.Meters"}}})],Le.prototype,"distance",void 0),(0,i._)([(0,f.MZ)({json:{read:{source:"attributes.Minutes"}}})],Le.prototype,"duration",void 0),(0,i._)([(0,f.MZ)({json:{read:{source:"attributes.FromLevel"}}})],Le.prototype,"fromLevel",void 0),(0,i._)([(0,f.MZ)({type:we.A})],Le.prototype,"geometry",void 0),(0,i._)([(0,f.MZ)({json:{read:{source:"attributes.ObjectID"}}})],Le.prototype,"objectId",void 0),(0,i._)([(0,f.MZ)({type:n.A})],Le.prototype,"popupTemplate",void 0),(0,i._)([(0,f.MZ)({types:F.Es})],Le.prototype,"symbol",void 0),(0,i._)([(0,f.MZ)({json:{read:{source:"attributes.ToLevel"}}})],Le.prototype,"toLevel",void 0),(0,i._)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],Le.prototype,"type",void 0),Le=Ee=(0,i._)([(0,g.$)("esri.rest.support.DirectionLine")],Le);const Je=Le;var Ue;let ke=class extends(Q.A.ClonableMixin(j.A)){static{Ue=this}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{this.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID"},{name:"AlternateName",alias:"Alternative Name",type:"esriFieldTypeString"},{name:"ArrivalTime",alias:"Arrival Time",type:"esriFieldTypeDate"},{name:"ArrivalUTCOffset",alias:"Arrival Time Offset",type:"esriFieldTypeInteger"},{name:"Azimuth",alias:"Azimuth",type:"esriFieldTypeDouble"},{name:"BranchName",alias:"Branch Name",type:"esriFieldTypeString"},{name:"DirectionPointType",alias:"Directions Point Type",type:"esriFieldTypeInteger"},{name:"DisplayText",alias:"Display Text",type:"esriFieldTypeString"},{name:"ExitName",alias:"Exit Name",type:"esriFieldTypeString"},{name:"IntersectingName",alias:"Intersecting Name",type:"esriFieldTypeString"},{name:"Level",alias:"Level",type:"esriFieldTypeInteger"},{name:"Name",alias:"Name",type:"esriFieldTypeString"},{name:"Sequence",alias:"Sequence",type:"esriFieldTypeInteger"},{name:"ShortVoiceInstruction",alias:"Short Voice Instruction",type:"esriFieldTypeString"},{name:"StopID",alias:"Stop ID",type:"esriFieldTypeInteger"},{name:"TowardName",alias:"Toward Name",type:"esriFieldTypeString"},{name:"VoiceInstruction",alias:"Voice Instruction",type:"esriFieldTypeString"}]}static fromGraphic(e){return new Ue({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:z._6.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?z._6.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 o.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};(0,i._)([(0,f.MZ)({json:{read:{source:"attributes.AlternateName"}}})],ke.prototype,"alternateName",void 0),(0,i._)([(0,f.MZ)({type:Date})],ke.prototype,"arrivalTime",void 0),(0,i._)([(0,v.w)("arrivalTime",["attributes.ArrivalTime"])],ke.prototype,"readArrivalTime",null),(0,i._)([(0,f.MZ)({json:{read:{source:"attributes.ArrivalUTCOffset"}}})],ke.prototype,"arrivalTimeOffset",void 0),(0,i._)([(0,f.MZ)({json:{read:{source:"attributes.Azimuth"}}})],ke.prototype,"azimuth",void 0),(0,i._)([(0,f.MZ)({json:{read:{source:"attributes.BranchName"}}})],ke.prototype,"branchName",void 0),(0,i._)([(0,f.MZ)({type:z._6.apiValues,json:{read:{source:"attributes.DirectionPointType",reader:z._6.read}}})],ke.prototype,"directionPointType",void 0),(0,i._)([(0,f.MZ)({json:{read:{source:"attributes.DisplayText"}}})],ke.prototype,"displayText",void 0),(0,i._)([(0,f.MZ)({json:{read:{source:"attributes.ExitName"}}})],ke.prototype,"exitName",void 0),(0,i._)([(0,f.MZ)({type:_e.A})],ke.prototype,"geometry",void 0),(0,i._)([(0,f.MZ)({json:{read:{source:"attributes.IntersectingName"}}})],ke.prototype,"intersectingName",void 0),(0,i._)([(0,f.MZ)({json:{read:{source:"attributes.Level"}}})],ke.prototype,"level",void 0),(0,i._)([(0,f.MZ)({json:{read:{source:"attributes.Name"}}})],ke.prototype,"name",void 0),(0,i._)([(0,f.MZ)({json:{read:{source:"attributes.ObjectID"}}})],ke.prototype,"objectId",void 0),(0,i._)([(0,f.MZ)({type:n.A})],ke.prototype,"popupTemplate",void 0),(0,i._)([(0,f.MZ)({json:{read:{source:"attributes.Sequence"}}})],ke.prototype,"sequence",void 0),(0,i._)([(0,f.MZ)({json:{read:{source:"attributes.ShortVoiceInstruction"}}})],ke.prototype,"shortVoiceInstruction",void 0),(0,i._)([(0,f.MZ)({json:{read:{source:"attributes.StopID"}}})],ke.prototype,"stopId",void 0),(0,i._)([(0,f.MZ)({types:F.Es})],ke.prototype,"symbol",void 0),(0,i._)([(0,f.MZ)({json:{read:{source:"attributes.TowardName"}}})],ke.prototype,"towardName",void 0),(0,i._)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],ke.prototype,"type",void 0),(0,i._)([(0,f.MZ)({json:{read:{source:"attributes.VoiceInstruction"}}})],ke.prototype,"voiceInstruction",void 0),ke=Ue=(0,i._)([(0,g.$)("esri.rest.support.DirectionPoint")],ke);const $e=ke;var We;let qe=class extends(Q.A.ClonableMixin(j.A)){static{We=this}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 le(t.attributes,"Attr_")}writeCosts(e,t){ue(e,t,"Attr_")}static{this.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID"},{name:"AddedCost",alias:"Added Cost",type:"esriFieldTypeDouble"},{name:"BarrierType",alias:"Barrier Type",type:"esriFieldTypeInteger"},{name:"Costs",alias:"Costs",type:"esriFieldTypeString"},{name:"CurbApproach",alias:"Curb Approach",type:"esriFieldTypeInteger"},{name:"FullEdge",alias:"Full Edge",type:"esriFieldTypeInteger"},{name:"Name",alias:"Name",type:"esriFieldTypeString"},{name:"Status",alias:"Status",type:"esriFieldTypeInteger"}]}static fromGraphic(e){return new We({addedCost:e.attributes.AddedCost??null,barrierType:null!=e.attributes.BarrierType?z.iM.fromJSON(e.attributes.BarrierType):null,costs:null!=e.attributes.Costs?pe(JSON.parse(e.attributes.Costs)):null,curbApproach:null!=e.attributes.CurbApproach?z.JJ.fromJSON(e.attributes.CurbApproach):null,fullEdge:null!=e.attributes.FullEdge?z.fe.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?z.$r.fromJSON(e.attributes.Status):null,symbol:e.symbol})}toGraphic(){const e={ObjectID:this.objectId,AddedCost:this.addedCost,BarrierType:null!=this.barrierType?z.iM.toJSON(this.barrierType):null,Costs:null!=this.costs?JSON.stringify(ce(this.costs)):null,CurbApproach:null!=this.curbApproach?z.JJ.toJSON(this.curbApproach):null,FullEdge:null!=this.fullEdge?z.fe.toJSON(this.fullEdge):null,Name:this.name,Status:null!=this.status?z.$r.toJSON(this.status):null};return new o.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};(0,i._)([(0,f.MZ)()],qe.prototype,"addedCost",void 0),(0,i._)([(0,f.MZ)({type:z.iM.apiValues,json:{name:"attributes.BarrierType",read:{reader:z.iM.read},write:{writer:z.iM.write}}})],qe.prototype,"barrierType",void 0),(0,i._)([(0,f.MZ)()],qe.prototype,"costs",void 0),(0,i._)([(0,v.w)("costs",["attributes"])],qe.prototype,"readCosts",null),(0,i._)([(0,b.K)("costs")],qe.prototype,"writeCosts",null),(0,i._)([(0,f.MZ)({type:z.JJ.apiValues,json:{read:{source:"attributes.CurbApproach",reader:z.JJ.read}}})],qe.prototype,"curbApproach",void 0),(0,i._)([(0,f.MZ)({type:z.fe.apiValues,json:{name:"attributes.FullEdge",read:{reader:z.fe.read},write:{writer:z.fe.write}}})],qe.prototype,"fullEdge",void 0),(0,i._)([(0,f.MZ)({type:_e.A,json:{write:!0}})],qe.prototype,"geometry",void 0),(0,i._)([(0,f.MZ)({json:{name:"attributes.Name"}})],qe.prototype,"name",void 0),(0,i._)([(0,f.MZ)({json:{name:"attributes.ObjectID"}})],qe.prototype,"objectId",void 0),(0,i._)([(0,f.MZ)({type:n.A})],qe.prototype,"popupTemplate",void 0),(0,i._)([(0,f.MZ)({type:z.mt.apiValues,json:{read:{source:"attributes.SideOfEdge",reader:z.mt.read}}})],qe.prototype,"sideOfEdge",void 0),(0,i._)([(0,f.MZ)({json:{read:{source:"attributes.SourceID"}}})],qe.prototype,"sourceId",void 0),(0,i._)([(0,f.MZ)({json:{read:{source:"attributes.SourceOID"}}})],qe.prototype,"sourceOid",void 0),(0,i._)([(0,f.MZ)({type:z.$r.apiValues,json:{read:{source:"attributes.Status",reader:z.$r.read}}})],qe.prototype,"status",void 0),(0,i._)([(0,f.MZ)({types:F.Es})],qe.prototype,"symbol",void 0),(0,i._)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],qe.prototype,"type",void 0),qe=We=(0,i._)([(0,g.$)("esri.rest.support.PointBarrier")],qe);const Ge=qe;var Ve,ze=r(39829);let Ke=class extends(Q.A.ClonableMixin(j.A)){static{Ve=this}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 le(t.attributes,"Attr_")}writeCosts(e,t){ue(e,t,"Attr_")}static{this.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID"},{name:"BarrierType",alias:"Barrier Type",type:"esriFieldTypeInteger"},{name:"Costs",alias:"Costs",type:"esriFieldTypeString"},{name:"Name",alias:"Name",type:"esriFieldTypeString"},{name:"ScaleFactor",alias:"Scale Factor",type:"esriFieldTypeDouble"}]}static fromGraphic(e){return new Ve({barrierType:null!=e.attributes.BarrierType?z.iM.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?z.iM.toJSON(this.barrierType):null,Costs:null!=this.costs?JSON.stringify(ce(this.costs)):null,Name:this.name??null,ScaleFactor:this.scaleFactor??null};return new o.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};(0,i._)([(0,f.MZ)({type:z.iM.apiValues,json:{name:"attributes.BarrierType",read:{reader:z.iM.read},write:{writer:z.iM.write}}})],Ke.prototype,"barrierType",void 0),(0,i._)([(0,f.MZ)()],Ke.prototype,"costs",void 0),(0,i._)([(0,v.w)("costs",["attributes"])],Ke.prototype,"readCosts",null),(0,i._)([(0,b.K)("costs")],Ke.prototype,"writeCosts",null),(0,i._)([(0,f.MZ)({type:ze.A,json:{write:!0}})],Ke.prototype,"geometry",void 0),(0,i._)([(0,f.MZ)({json:{name:"attributes.Name"}})],Ke.prototype,"name",void 0),(0,i._)([(0,f.MZ)({json:{name:"attributes.ObjectID"}})],Ke.prototype,"objectId",void 0),(0,i._)([(0,f.MZ)({type:n.A})],Ke.prototype,"popupTemplate",void 0),(0,i._)([(0,f.MZ)()],Ke.prototype,"scaleFactor",void 0),(0,i._)([(0,f.MZ)({types:F.Es})],Ke.prototype,"symbol",void 0),(0,i._)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],Ke.prototype,"type",void 0),Ke=Ve=(0,i._)([(0,g.$)("esri.rest.support.PolygonBarrier")],Ke);const He=Ke;var Ye;let Xe=class extends(Q.A.ClonableMixin(j.A)){static{Ye=this}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 le(t.attributes,"Attr_")}static{this.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID"},{name:"BarrierType",alias:"Barrier Type",type:"esriFieldTypeInteger"},{name:"Costs",alias:"Costs",type:"esriFieldTypeString"},{name:"Name",alias:"Name",type:"esriFieldTypeString"},{name:"ScaleFactor",alias:"Scale Factor",type:"esriFieldTypeDouble"}]}static fromGraphic(e){return new Ye({barrierType:null!=e.attributes.BarrierType?z.iM.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?z.iM.toJSON(this.barrierType):null,Costs:null!=this.costs?JSON.stringify(ce(this.costs)):null,Name:this.name,ScaleFactor:this.scaleFactor};return new o.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};(0,i._)([(0,f.MZ)({type:z.iM.apiValues,json:{read:{source:"attributes.BarrierType",reader:z.iM.read}}})],Xe.prototype,"barrierType",void 0),(0,i._)([(0,f.MZ)()],Xe.prototype,"costs",void 0),(0,i._)([(0,v.w)("costs",["attributes"])],Xe.prototype,"readCosts",null),(0,i._)([(0,f.MZ)({type:we.A,json:{write:!0}})],Xe.prototype,"geometry",void 0),(0,i._)([(0,f.MZ)({json:{name:"attributes.Name"}})],Xe.prototype,"name",void 0),(0,i._)([(0,f.MZ)({json:{name:"attributes.ObjectID"}})],Xe.prototype,"objectId",void 0),(0,i._)([(0,f.MZ)({type:n.A})],Xe.prototype,"popupTemplate",void 0),(0,i._)([(0,f.MZ)()],Xe.prototype,"scaleFactor",void 0),(0,i._)([(0,f.MZ)({types:F.Es})],Xe.prototype,"symbol",void 0),(0,i._)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],Xe.prototype,"type",void 0),Xe=Ye=(0,i._)([(0,g.$)("esri.rest.support.PolylineBarrier")],Xe);const Qe=Xe;let et=class extends j.A{constructor(e){super(e),this.accumulateAttributes=null,this.directionsLanguage=null,this.findBestSequence=null,this.preserveFirstStop=null,this.preserveLastStop=null,this.startTimeIsUTC=null,this.timeWindowsAreUTC=null,this.travelMode=null}readAccumulateAttributes(e){return null==e?null:e.map((e=>z.et.fromJSON(e)))}writeAccumulateAttributes(e,t,r){e?.length&&(t[r]=e.map((e=>z.et.toJSON(e))))}};(0,i._)([(0,f.MZ)({type:[String],json:{name:"accumulateAttributeNames",write:!0}})],et.prototype,"accumulateAttributes",void 0),(0,i._)([(0,v.w)("accumulateAttributes")],et.prototype,"readAccumulateAttributes",null),(0,i._)([(0,b.K)("accumulateAttributes")],et.prototype,"writeAccumulateAttributes",null),(0,i._)([(0,f.MZ)({type:String,json:{write:!0}})],et.prototype,"directionsLanguage",void 0),(0,i._)([(0,f.MZ)({type:Boolean,json:{write:!0}})],et.prototype,"findBestSequence",void 0),(0,i._)([(0,f.MZ)({type:Boolean,json:{write:!0}})],et.prototype,"preserveFirstStop",void 0),(0,i._)([(0,f.MZ)({type:Boolean,json:{write:!0}})],et.prototype,"preserveLastStop",void 0),(0,i._)([(0,f.MZ)({type:Boolean,json:{write:!0}})],et.prototype,"startTimeIsUTC",void 0),(0,i._)([(0,f.MZ)({type:Boolean,json:{write:!0}})],et.prototype,"timeWindowsAreUTC",void 0),(0,i._)([(0,f.MZ)({type:te,json:{write:!0}})],et.prototype,"travelMode",void 0),et=(0,i._)([(0,g.$)("esri.rest.support.RouteSettings")],et);const tt=et;var rt;let it=class extends(Q.A.ClonableMixin(j.A)){static{rt=this}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 de(t.attributes.EndTime,t.attributes.EndTimeUTC)}readStartTime(e,t){return null!=t.attributes.StartTimeUTC?new Date(t.attributes.StartTimeUTC):null}readStartTimeOffset(e,t){return de(t.attributes.StartTime,t.attributes.StartTimeUTC)}readTotalCosts(e,t){return le(t.attributes,"Total_")}readTotalViolations(e,t){return le(t.attributes,"TotalViolation_")}readTotalWait(e,t){return le(t.attributes,"TotalWait_")}static{this.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID"},{name:"AnalysisSettings",alias:"Analysis Settings",type:"esriFieldTypeString"},{name:"EndTime",alias:"End Time",type:"esriFieldTypeDate"},{name:"EndUTCOffset",alias:"End Time Offset",type:"esriFieldTypeInteger"},{name:"Messages",alias:"Messages",type:"esriFieldTypeString"},{name:"RouteName",alias:"Route Name",type:"esriFieldTypeString"},{name:"StartTime",alias:"Start Time",type:"esriFieldTypeDate"},{name:"StartUTCOffset",alias:"Start Time Offset",type:"esriFieldTypeInteger"},{name:"TotalCosts",alias:"Total Costs",type:"esriFieldTypeString"},{name:"TotalLateMinutes",alias:"Total Late Minutes",type:"esriFieldTypeDouble"},{name:"TotalMeters",alias:"Total Meters",type:"esriFieldTypeDouble"},{name:"TotalMinutes",alias:"Total Minutes",type:"esriFieldTypeDouble"},{name:"TotalWaitMinutes",alias:"Total Wait Minutes",type:"esriFieldTypeDouble"},{name:"Version",alias:"Version",type:"esriFieldTypeString"}]}static fromGraphic(e){return new rt({analysisSettings:null!=e.attributes.AnalysisSettings?tt.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(ce(this.totalCosts)):null,TotalLateMinutes:this.totalLateDuration,TotalMeters:this.totalDistance,TotalMinutes:this.totalDuration,TotalWaitMinutes:this.totalWaitDuration,Version:this.version};return new o.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};(0,i._)([(0,f.MZ)()],it.prototype,"analysisSettings",void 0),(0,i._)([(0,f.MZ)({type:Date})],it.prototype,"endTime",void 0),(0,i._)([(0,v.w)("endTime",["attributes.EndTimeUTC"])],it.prototype,"readEndTime",null),(0,i._)([(0,f.MZ)()],it.prototype,"endTimeOffset",void 0),(0,i._)([(0,v.w)("endTimeOffset",["attributes.EndTime","attributes.EndTimeUTC"])],it.prototype,"readEndTimeOffset",null),(0,i._)([(0,f.MZ)({json:{read:{source:"attributes.FirstStopID"}}})],it.prototype,"firstStopId",void 0),(0,i._)([(0,f.MZ)({type:we.A})],it.prototype,"geometry",void 0),(0,i._)([(0,f.MZ)({json:{read:{source:"attributes.LastStopID"}}})],it.prototype,"lastStopId",void 0),(0,i._)([(0,f.MZ)()],it.prototype,"messages",void 0),(0,i._)([(0,f.MZ)({json:{read:{source:"attributes.Name"}}})],it.prototype,"name",void 0),(0,i._)([(0,f.MZ)({json:{read:{source:"attributes.ObjectID"}}})],it.prototype,"objectId",void 0),(0,i._)([(0,f.MZ)({type:n.A})],it.prototype,"popupTemplate",void 0),(0,i._)([(0,f.MZ)({type:Date})],it.prototype,"startTime",void 0),(0,i._)([(0,v.w)("startTime",["attributes.StartTimeUTC"])],it.prototype,"readStartTime",null),(0,i._)([(0,f.MZ)()],it.prototype,"startTimeOffset",void 0),(0,i._)([(0,v.w)("startTimeOffset",["attributes.StartTime","attributes.StartTimeUTC"])],it.prototype,"readStartTimeOffset",null),(0,i._)([(0,f.MZ)({json:{read:{source:"attributes.StopCount"}}})],it.prototype,"stopCount",void 0),(0,i._)([(0,f.MZ)({types:F.Es})],it.prototype,"symbol",void 0),(0,i._)([(0,f.MZ)()],it.prototype,"totalCosts",void 0),(0,i._)([(0,v.w)("totalCosts",["attributes"])],it.prototype,"readTotalCosts",null),(0,i._)([(0,f.MZ)()],it.prototype,"totalDistance",void 0),(0,i._)([(0,f.MZ)()],it.prototype,"totalDuration",void 0),(0,i._)([(0,f.MZ)()],it.prototype,"totalLateDuration",void 0),(0,i._)([(0,f.MZ)()],it.prototype,"totalViolations",void 0),(0,i._)([(0,v.w)("totalViolations",["attributes"])],it.prototype,"readTotalViolations",null),(0,i._)([(0,f.MZ)()],it.prototype,"totalWait",void 0),(0,i._)([(0,v.w)("totalWait",["attributes"])],it.prototype,"readTotalWait",null),(0,i._)([(0,f.MZ)()],it.prototype,"totalWaitDuration",void 0),(0,i._)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],it.prototype,"type",void 0),(0,i._)([(0,f.MZ)()],it.prototype,"version",void 0),it=rt=(0,i._)([(0,g.$)("esri.rest.support.RouteInfo")],it);const st=it;var ot=r(56507),nt=r(24097),at=r(65864),lt=r(50498);let ut=class extends(Q.A.ClonableMixin(j.A)){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,i._)([(0,f.MZ)({type:Boolean,json:{write:!0}})],ut.prototype,"doNotLocateOnRestrictedElements",void 0),(0,i._)([(0,f.MZ)({types:lt.yR,json:{read:at.rS,write:!0}})],ut.prototype,"geometry",void 0),(0,i._)([(0,V.e)(z.Vj)],ut.prototype,"geometryType",void 0),(0,i._)([(0,f.MZ)({type:String,json:{name:"layerName",write:!0}})],ut.prototype,"name",void 0),(0,i._)([(0,V.e)(z.vS,{name:"spatialRel"})],ut.prototype,"spatialRelationship",void 0),(0,i._)([(0,f.MZ)({type:String,json:{write:!0}})],ut.prototype,"type",void 0),(0,i._)([(0,f.MZ)({type:String,json:{write:!0}})],ut.prototype,"where",void 0),ut=(0,i._)([(0,g.$)("esri.rest.support.DataLayer")],ut);const pt=ut;var ct;let dt=class extends ye.A{static{ct=this}constructor(e){super(e),this.doNotLocateOnRestrictedElements=null}clone(){return new ct({doNotLocateOnRestrictedElements:this.doNotLocateOnRestrictedElements,...this.cloneProperties()})}};(0,i._)([(0,f.MZ)({type:Boolean,json:{write:!0}})],dt.prototype,"doNotLocateOnRestrictedElements",void 0),dt=ct=(0,i._)([(0,g.$)("esri.rest.support.NetworkFeatureSet")],dt);const mt=dt;let yt=class extends(Q.A.ClonableMixin(j.A)){constructor(e){super(e),this.doNotLocateOnRestrictedElements=null,this.url=null}};(0,i._)([(0,f.MZ)({type:Boolean,json:{write:!0}})],yt.prototype,"doNotLocateOnRestrictedElements",void 0),(0,i._)([(0,f.MZ)({type:String,json:{write:!0}})],yt.prototype,"url",void 0),yt=(0,i._)([(0,g.$)("esri.rest.support.NetworkUrl")],yt);const ht=yt;var ft;let vt=class extends(Q.A.ClonableMixin(j.A)){static{ft=this}constructor(e){super(e),this.accumulateAttributes=null,this.apiKey=null,this.attributeParameterValues=null,this.checksum=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,ot.PZ)(ft,e)}readAccumulateAttributes(e){return null==e?null:e.map((e=>z.et.fromJSON(e)))}writeAccumulateAttributes(e,t,r){e?.length&&(t[r]=e.map((e=>z.et.toJSON(e))))}writePointBarriers(e,t,r){bt(e,t,r)}writePolygonBarrier(e,t,r){bt(e,t,r)}writePolylineBarrier(e,t,r){bt(e,t,r)}readRestrictionAttributes(e){return null==e?null:e.map((e=>z.OC.fromJSON(e)))}writeRestrictionAttributes(e,t,r){e?.length&&(t[r]=e.map((e=>z.OC.toJSON(e))))}readStartTime(e,t){const{startTime:r}=t;return null==r?null:"now"===r?"now":new Date(r)}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)?pt.fromJSON(e):function(e){return e&&"url"in e}(e)?ht.fromJSON(e):function(e){return e&&"features"in e&&"doNotLocateOnRestrictedElements"in e}(e)?mt.fromJSON(e):function(e){return e&&"features"in e}(e)?ye.A.fromJSON(e):null}(t.stops)}writeStops(e,t,r){bt(e,t,r)}};(0,i._)([(0,f.MZ)({type:[String],json:{name:"accumulateAttributeNames",write:!0}})],vt.prototype,"accumulateAttributes",void 0),(0,i._)([(0,v.w)("accumulateAttributes")],vt.prototype,"readAccumulateAttributes",null),(0,i._)([(0,b.K)("accumulateAttributes")],vt.prototype,"writeAccumulateAttributes",null),(0,i._)([(0,f.MZ)(nt.K)],vt.prototype,"apiKey",void 0),(0,i._)([(0,f.MZ)({json:{write:!0}})],vt.prototype,"attributeParameterValues",void 0),(0,i._)([(0,f.MZ)({type:String,json:{write:!0}})],vt.prototype,"checksum",void 0),(0,i._)([(0,f.MZ)({type:String,json:{write:!0}})],vt.prototype,"directionsLanguage",void 0),(0,i._)([(0,V.e)(z.Z7)],vt.prototype,"directionsLengthUnits",void 0),(0,i._)([(0,V.e)(z.aJ)],vt.prototype,"directionsOutputType",void 0),(0,i._)([(0,V.e)(z.$n)],vt.prototype,"directionsStyleName",void 0),(0,i._)([(0,V.e)(z.Mm,{name:"directionsTimeAttributeName",ignoreUnknown:!1})],vt.prototype,"directionsTimeAttribute",void 0),(0,i._)([(0,f.MZ)({type:Boolean,json:{write:!0}})],vt.prototype,"findBestSequence",void 0),(0,i._)([(0,f.MZ)({type:Number,json:{write:!0}})],vt.prototype,"geometryPrecision",void 0),(0,i._)([(0,f.MZ)({type:Number,json:{write:!0}})],vt.prototype,"geometryPrecisionM",void 0),(0,i._)([(0,f.MZ)({type:Number,json:{write:!0}})],vt.prototype,"geometryPrecisionZ",void 0),(0,i._)([(0,f.MZ)({type:Boolean,json:{write:!0}})],vt.prototype,"ignoreInvalidLocations",void 0),(0,i._)([(0,V.e)(z.et,{name:"impedanceAttributeName",ignoreUnknown:!1})],vt.prototype,"impedanceAttribute",void 0),(0,i._)([(0,f.MZ)({type:Number,json:{write:!0}})],vt.prototype,"outputGeometryPrecision",void 0),(0,i._)([(0,V.e)(z.hY)],vt.prototype,"outputGeometryPrecisionUnits",void 0),(0,i._)([(0,V.e)(z.Sr)],vt.prototype,"outputLines",void 0),(0,i._)([(0,f.MZ)({type:A.A,json:{name:"outSR",write:!0}})],vt.prototype,"outSpatialReference",void 0),(0,i._)([(0,f.MZ)({json:{write:!0}})],vt.prototype,"overrides",void 0),(0,i._)([(0,f.MZ)({json:{name:"barriers",write:!0}})],vt.prototype,"pointBarriers",void 0),(0,i._)([(0,b.K)("pointBarriers")],vt.prototype,"writePointBarriers",null),(0,i._)([(0,f.MZ)({json:{write:!0}})],vt.prototype,"polygonBarriers",void 0),(0,i._)([(0,b.K)("polygonBarriers")],vt.prototype,"writePolygonBarrier",null),(0,i._)([(0,f.MZ)({json:{write:!0}})],vt.prototype,"polylineBarriers",void 0),(0,i._)([(0,b.K)("polylineBarriers")],vt.prototype,"writePolylineBarrier",null),(0,i._)([(0,f.MZ)({type:Boolean,json:{write:!0}})],vt.prototype,"preserveFirstStop",void 0),(0,i._)([(0,f.MZ)({type:Boolean,json:{write:!0}})],vt.prototype,"preserveLastStop",void 0),(0,i._)([(0,f.MZ)({type:Boolean,json:{write:!0}})],vt.prototype,"preserveObjectID",void 0),(0,i._)([(0,f.MZ)({type:[String],json:{name:"restrictionAttributeNames",write:!0}})],vt.prototype,"restrictionAttributes",void 0),(0,i._)([(0,v.w)("restrictionAttributes")],vt.prototype,"readRestrictionAttributes",null),(0,i._)([(0,b.K)("restrictionAttributes")],vt.prototype,"writeRestrictionAttributes",null),(0,i._)([(0,V.e)(z.hE)],vt.prototype,"restrictUTurns",void 0),(0,i._)([(0,f.MZ)({type:Boolean,json:{write:!0}})],vt.prototype,"returnBarriers",void 0),(0,i._)([(0,f.MZ)({type:Boolean,json:{write:!0}})],vt.prototype,"returnDirections",void 0),(0,i._)([(0,f.MZ)({type:Boolean,json:{write:!0}})],vt.prototype,"returnPolygonBarriers",void 0),(0,i._)([(0,f.MZ)({type:Boolean,json:{write:!0}})],vt.prototype,"returnPolylineBarriers",void 0),(0,i._)([(0,f.MZ)({type:Boolean,json:{write:!0}})],vt.prototype,"returnRoutes",void 0),(0,i._)([(0,f.MZ)({type:Boolean,json:{write:!0}})],vt.prototype,"returnStops",void 0),(0,i._)([(0,f.MZ)({type:Boolean,json:{write:!0}})],vt.prototype,"returnTraversedEdges",void 0),(0,i._)([(0,f.MZ)({type:Boolean,json:{write:!0}})],vt.prototype,"returnTraversedJunctions",void 0),(0,i._)([(0,f.MZ)({type:Boolean,json:{write:!0}})],vt.prototype,"returnTraversedTurns",void 0),(0,i._)([(0,f.MZ)({type:Boolean,json:{write:!0}})],vt.prototype,"returnZ",void 0),(0,i._)([(0,f.MZ)({json:{write:!0}})],vt.prototype,"startTime",void 0),(0,i._)([(0,v.w)("startTime")],vt.prototype,"readStartTime",null),(0,i._)([(0,b.K)("startTime")],vt.prototype,"writeStartTime",null),(0,i._)([(0,f.MZ)({type:Boolean,json:{write:!0}})],vt.prototype,"startTimeIsUTC",void 0),(0,i._)([(0,f.MZ)({json:{write:!0}})],vt.prototype,"stops",void 0),(0,i._)([(0,v.w)("stops")],vt.prototype,"readStops",null),(0,i._)([(0,b.K)("stops")],vt.prototype,"writeStops",null),(0,i._)([(0,f.MZ)({type:Boolean,json:{write:!0}})],vt.prototype,"timeWindowsAreUTC",void 0),(0,i._)([(0,f.MZ)({type:te,json:{write:!0}})],vt.prototype,"travelMode",void 0),(0,i._)([(0,f.MZ)({type:Boolean,json:{write:!0}})],vt.prototype,"useHierarchy",void 0),(0,i._)([(0,f.MZ)({type:Boolean,json:{write:!0}})],vt.prototype,"useTimeWindows",void 0),vt=ft=(0,i._)([(0,g.$)("esri.rest.support.RouteParameters")],vt);const gt=vt;function bt(e,t,r){null!=e&&(t[r]=a.A.isCollection(e)?{features:e.toArray().map((e=>e.toJSON()))}:e.toJSON())}var Tt;let wt=class extends(Q.A.ClonableMixin(j.A)){static{Tt=this}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 de(t.attributes.ArriveTime,t.attributes.ArriveTimeUTC)}readCumulativeCosts(e,t){return le(t.attributes,"Cumul_")}readDepartTimeOffset(e,t){return de(t.attributes.DepartTime,t.attributes.DepartTimeUTC)}readServiceCosts(e,t){return le(t.attributes,"Attr_")}writeServiceCosts(e,t){ue(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 le(t.attributes,"Violation_")}readWait(e,t){return le(t.attributes,"Wait_")}static{this.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID"},{name:"ArrivalCurbApproach",alias:"Arrival Curb Approach",type:"esriFieldTypeInteger"},{name:"ArrivalTime",alias:"Arrival Time",type:"esriFieldTypeDate"},{name:"ArrivalUTCOffset",alias:"Arrival Time",type:"esriFieldTypeInteger"},{name:"CumulativeCosts",alias:"Cumulative Costs",type:"esriFieldTypeString"},{name:"CumulativeMeters",alias:"Cumulative Meters",type:"esriFieldTypeDouble"},{name:"CumulativeMinutes",alias:"Cumulative Minutes",type:"esriFieldTypeDouble"},{name:"CurbApproach",alias:"Curb Approach",type:"esriFieldTypeInteger"},{name:"DepartureCurbApproach",alias:"Departure Curb Approach",type:"esriFieldTypeInteger"},{name:"DepartureTime",alias:"Departure Time",type:"esriFieldTypeDate"},{name:"DepartureUTCOffset",alias:"Departure Time",type:"esriFieldTypeInteger"},{name:"LateMinutes",alias:"Minutes Late",type:"esriFieldTypeDouble"},{name:"LocationType",alias:"Location Type",type:"esriFieldTypeInteger"},{name:"Name",alias:"Name",type:"esriFieldTypeString"},{name:"RouteName",alias:"Route Name",type:"esriFieldTypeString"},{name:"Sequence",alias:"Sequence",type:"esriFieldTypeInteger"},{name:"ServiceCosts",alias:"Service Costs",type:"esriFieldTypeString"},{name:"ServiceMeters",alias:"Service Meters",type:"esriFieldTypeDouble"},{name:"ServiceMinutes",alias:"Service Minutes",type:"esriFieldTypeDouble"},{name:"Status",alias:"Status",type:"esriFieldTypeInteger"},{name:"TimeWindowEnd",alias:"Time Window End",type:"esriFieldTypeDate"},{name:"TimeWindowEndUTCOffset",alias:"Time Window End Offset",type:"esriFieldTypeInteger"},{name:"TimeWindowStart",alias:"Time Window Start",type:"esriFieldTypeDate"},{name:"TimeWindowStartUTCOffset",alias:"Time Window Start Offset",type:"esriFieldTypeInteger"},{name:"WaitMinutes",alias:"Minutes Wait",type:"esriFieldTypeDouble"}]}static fromGraphic(e){return new Tt({arriveCurbApproach:null!=e.attributes.ArrivalCurbApproach?z.JJ.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?z.JJ.fromJSON(e.attributes.CurbApproach):null,departCurbApproach:null!=e.attributes.DepartureCurbApproach?z.JJ.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?z.EM.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?z.$r.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?z.JJ.toJSON(this.arriveCurbApproach):null,ArrivalTime:null!=this.arriveTime?this.arriveTime.getTime():null,ArrivalUTCOffset:this.arriveTimeOffset,CumulativeCosts:null!=this.cumulativeCosts?JSON.stringify(ce(this.cumulativeCosts)):null,CumulativeMeters:this.cumulativeDistance,CumulativeMinutes:this.cumulativeDuration,CurbApproach:null!=this.curbApproach?z.JJ.toJSON(this.curbApproach):null,DepartureCurbApproach:null!=this.departCurbApproach?z.JJ.toJSON(this.departCurbApproach):null,DepartureTime:null!=this.departTime?this.departTime.getTime():null,DepartureUTCOffset:this.departTimeOffset,LateMinutes:this.lateDuration,LocationType:null!=this.locationType?z.EM.toJSON(this.locationType):null,Name:this.name,RouteName:this.routeName,Sequence:this.sequence,ServiceCosts:null!=this.serviceCosts?JSON.stringify(ce(this.serviceCosts)):null,ServiceMeters:this.serviceDistance,ServiceMinutes:this.serviceDuration,Status:null!=this.status?z.$r.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 o.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};(0,i._)([(0,f.MZ)({type:z.JJ.apiValues,json:{read:{source:"attributes.ArrivalCurbApproach",reader:z.JJ.read}}})],wt.prototype,"arriveCurbApproach",void 0),(0,i._)([(0,f.MZ)({type:Date,json:{read:{source:"attributes.ArriveTimeUTC"}}})],wt.prototype,"arriveTime",void 0),(0,i._)([(0,f.MZ)()],wt.prototype,"arriveTimeOffset",void 0),(0,i._)([(0,v.w)("arriveTimeOffset",["attributes.ArriveTime","attributes.ArriveTimeUTC"])],wt.prototype,"readArriveTimeOffset",null),(0,i._)([(0,f.MZ)({json:{name:"attributes.Bearing",read:!1,write:!0}})],wt.prototype,"bearing",void 0),(0,i._)([(0,f.MZ)({json:{name:"attributes.BearingTol",read:!1,write:!0}})],wt.prototype,"bearingTol",void 0),(0,i._)([(0,f.MZ)()],wt.prototype,"cumulativeCosts",void 0),(0,i._)([(0,v.w)("cumulativeCosts",["attributes"])],wt.prototype,"readCumulativeCosts",null),(0,i._)([(0,f.MZ)()],wt.prototype,"cumulativeDistance",void 0),(0,i._)([(0,f.MZ)()],wt.prototype,"cumulativeDuration",void 0),(0,i._)([(0,f.MZ)({type:z.JJ.apiValues,json:{name:"attributes.CurbApproach",read:{reader:z.JJ.read},write:{writer:z.JJ.write}}})],wt.prototype,"curbApproach",void 0),(0,i._)([(0,f.MZ)({type:z.JJ.apiValues,json:{read:{source:"attributes.DepartCurbApproach",reader:z.JJ.read}}})],wt.prototype,"departCurbApproach",void 0),(0,i._)([(0,f.MZ)({type:Date,json:{read:{source:"attributes.DepartTimeUTC"}}})],wt.prototype,"departTime",void 0),(0,i._)([(0,f.MZ)()],wt.prototype,"departTimeOffset",void 0),(0,i._)([(0,v.w)("departTimeOffset",["attributes.DepartTime","attributes.DepartTimeUTC"])],wt.prototype,"readDepartTimeOffset",null),(0,i._)([(0,f.MZ)({json:{read:{source:"attributes.DistanceToNetworkInMeters"}}})],wt.prototype,"distanceToNetworkInMeters",void 0),(0,i._)([(0,f.MZ)({type:_e.A,json:{write:!0}})],wt.prototype,"geometry",void 0),(0,i._)([(0,f.MZ)()],wt.prototype,"lateDuration",void 0),(0,i._)([(0,f.MZ)({type:z.EM.apiValues,json:{name:"attributes.LocationType",read:{reader:z.EM.read},write:{writer:z.EM.write}}})],wt.prototype,"locationType",void 0),(0,i._)([(0,f.MZ)({json:{name:"attributes.Name"}})],wt.prototype,"name",void 0),(0,i._)([(0,f.MZ)({json:{name:"attributes.NavLatency",read:!1,write:!0}})],wt.prototype,"navLatency",void 0),(0,i._)([(0,f.MZ)({json:{name:"attributes.ObjectID"}})],wt.prototype,"objectId",void 0),(0,i._)([(0,f.MZ)({type:n.A})],wt.prototype,"popupTemplate",void 0),(0,i._)([(0,f.MZ)({json:{read:{source:"attributes.PosAlong"}}})],wt.prototype,"posAlong",void 0),(0,i._)([(0,f.MZ)({json:{name:"attributes.RouteName"}})],wt.prototype,"routeName",void 0),(0,i._)([(0,f.MZ)()],wt.prototype,"serviceCosts",void 0),(0,i._)([(0,v.w)("serviceCosts",["attributes"])],wt.prototype,"readServiceCosts",null),(0,i._)([(0,b.K)("serviceCosts")],wt.prototype,"writeServiceCosts",null),(0,i._)([(0,f.MZ)()],wt.prototype,"serviceDistance",void 0),(0,i._)([(0,f.MZ)()],wt.prototype,"serviceDuration",void 0),(0,i._)([(0,f.MZ)({json:{name:"attributes.Sequence"}})],wt.prototype,"sequence",void 0),(0,i._)([(0,f.MZ)({type:z.mt.apiValues,json:{read:{source:"attributes.SideOfEdge",reader:z.mt.read}}})],wt.prototype,"sideOfEdge",void 0),(0,i._)([(0,f.MZ)({json:{read:{source:"attributes.SnapX"}}})],wt.prototype,"snapX",void 0),(0,i._)([(0,f.MZ)({json:{read:{source:"attributes.SnapY"}}})],wt.prototype,"snapY",void 0),(0,i._)([(0,f.MZ)({json:{read:{source:"attributes.SnapZ"}}})],wt.prototype,"snapZ",void 0),(0,i._)([(0,f.MZ)({json:{read:{source:"attributes.SourceID"}}})],wt.prototype,"sourceId",void 0),(0,i._)([(0,f.MZ)({json:{read:{source:"attributes.SourceOID"}}})],wt.prototype,"sourceOid",void 0),(0,i._)([(0,f.MZ)({type:z.$r.apiValues,json:{read:{source:"attributes.Status",reader:z.$r.read}}})],wt.prototype,"status",void 0),(0,i._)([(0,f.MZ)({types:F.Es})],wt.prototype,"symbol",void 0),(0,i._)([(0,f.MZ)({type:Date,json:{name:"attributes.TimeWindowEnd"}})],wt.prototype,"timeWindowEnd",void 0),(0,i._)([(0,b.K)("timeWindowEnd")],wt.prototype,"writeTimeWindowEnd",null),(0,i._)([(0,f.MZ)()],wt.prototype,"timeWindowEndOffset",void 0),(0,i._)([(0,f.MZ)({type:Date,json:{name:"attributes.TimeWindowStart"}})],wt.prototype,"timeWindowStart",void 0),(0,i._)([(0,b.K)("timeWindowStart")],wt.prototype,"writeTimeWindowStart",null),(0,i._)([(0,f.MZ)()],wt.prototype,"timeWindowStartOffset",void 0),(0,i._)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],wt.prototype,"type",void 0),(0,i._)([(0,f.MZ)()],wt.prototype,"violations",void 0),(0,i._)([(0,v.w)("violations",["attributes"])],wt.prototype,"readViolations",null),(0,i._)([(0,f.MZ)()],wt.prototype,"waitDuration",void 0),(0,i._)([(0,f.MZ)()],wt.prototype,"wait",void 0),(0,i._)([(0,v.w)("wait",["attributes"])],wt.prototype,"readWait",null),wt=Tt=(0,i._)([(0,g.$)("esri.rest.support.Stop")],wt);const _t=wt;function St(e){if(!e.length)return;const t=e.toArray(),r=t.map((({objectId:e})=>e)).filter((e=>null!=e));let i=Math.max(...r,0);for(const e of t)null==e.objectId&&(e.objectId=++i)}function At(e,t){return!!e.length&&e.length===t.length&&Mt(e)&&Mt(t)}function Mt(e){return e.every((({objectId:e})=>null!=e))}function Nt(e){return e.length?e:null}function Ot(e){switch(e){case"esriGeometryPoint":return{type:"esriSMS",style:"esriSMSCircle",size:12,color:[0,0,0,0],outline:Ot("esriGeometryPolyline")};case"esriGeometryPolyline":return{type:"esriSLS",style:"esriSLSSolid",width:1,color:[0,0,0,0]};case"esriGeometryPolygon":return{type:"esriSFS",style:"esriSFSNull",outline:Ot("esriGeometryPolyline")}}}function Dt(e){return"layers"in e}async function It(e){const t=A.A.WGS84;return await(0,S.initializeProjection)(e.spatialReference,t),(0,S.project)(e,t)}function Zt(e,t){switch(t){case"seconds":return e/60;case"hours":return 60*e;case"days":return 60*e*24;default:return e}}function Ct(e,t){return"decimal-degrees"===t||"points"===t||"unknown"===t?e:(0,y.oU)(e,t,"meters")}const jt=a.A.ofType(Je),xt=a.A.ofType($e),Ft=a.A.ofType(Ge),Bt=a.A.ofType(He),Rt=a.A.ofType(Qe),Pt=a.A.ofType(_t),Et="esri.layers.RouteLayer",Lt=()=>u.A.getLogger(Et);let Jt=class extends((0,O.dM)((0,Z.j)((0,D.q)((0,I.A)((0,p.P)(N.A)))))){constructor(e){super(e),this._cachedServiceDescription=null,this._featureCollection=null,this._type="Feature Collection",this.checksum=null,this.defaultSymbols=new J,this.directionLines=null,this.directionPoints=null,this.featureCollectionType="route",this.legendEnabled=!1,this.maxScale=0,this.minScale=0,this.pointBarriers=new Ft,this.polygonBarriers=new Bt,this.polylineBarriers=new Rt,this.routeInfo=null,this.spatialReference=A.A.WGS84,this.stops=new Pt,this.type="route";const t=()=>{this._setStopSymbol(this.stops)};this.addHandles((0,m.on)((()=>this.stops),"change",t,{sync:!0,onListenerAdd:t}))}writeFeatureCollectionWebmap(e,t,r,i){const s=[this._writePolygonBarriers(),this._writePolylineBarriers(),this._writePointBarriers(),this._writeRouteInfo(),this._writeDirectionLines(),this._writeDirectionPoints(),this._writeStops()].filter((e=>!!e)),o=s.map(((e,t)=>t)),n="web-map"===i.origin?"featureCollection.layers":"layers";(0,c.sM)(n,s,t),t.opacity=this.opacity,t.visibility=this.visible,t.visibleLayers=o}readDirectionLines(e,t){return this._getNetworkFeatures(t,"DirectionLines",(e=>Je.fromGraphic(e)))}readDirectionPoints(e,t){return this._getNetworkFeatures(t,"DirectionPoints",(e=>$e.fromGraphic(e)))}get fullExtent(){const e=new w.A({xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:A.A.WGS84});if(null!=this.routeInfo?.geometry)return this.routeInfo.geometry.extent??e;if(null==this.stops)return e;const t=this.stops.filter((e=>null!=e.geometry));if(t.length<2)return e;const{spatialReference:r}=t.at(0).geometry;if(null==r)return e;const i=t.toArray().map((e=>{const t=e.geometry;return[t.x,t.y]}));return new _.A({points:i,spatialReference:r}).extent}readMaxScale(e,t){const r=Dt(t)?t.layers:t.featureCollection?.layers,i=r?.find((e=>null!=e.layerDefinition.maxScale));return i?.layerDefinition.maxScale??0}readMinScale(e,t){const r=Dt(t)?t.layers:t.featureCollection?.layers,i=r?.find((e=>null!=e.layerDefinition.minScale));return i?.layerDefinition.minScale??0}readPointBarriers(e,t){return this._getNetworkFeatures(t,"Barriers",(e=>Ge.fromGraphic(e)))}readPolygonBarriers(e,t){return this._getNetworkFeatures(t,"PolygonBarriers",(e=>He.fromGraphic(e)))}readPolylineBarriers(e,t){return this._getNetworkFeatures(t,"PolylineBarriers",(e=>Qe.fromGraphic(e)))}readRouteInfo(e,t){return this._getNetworkFeatures(t,"RouteInfo",(e=>st.fromGraphic(e))).at(0)??null}readSpatialReference(e,t){const r=Dt(t)?t.layers:t.featureCollection?.layers;if(!r?.length)return A.A.WGS84;const{layerDefinition:i,featureSet:s}=r[0],o=s.features[0],n=o?.geometry?.spatialReference??s.spatialReference??i.spatialReference??i.extent.spatialReference??M.KK;return A.A.fromJSON(n)}readStops(e,t){return this._getNetworkFeatures(t,"Stops",(e=>_t.fromGraphic(e)),(e=>this._setStopSymbol(e)))}get title(){return this.routeInfo?.name??"Route"}set title(e){this._overrideIfSome("title",e)}get url(){return s.A.routeServiceUrl}set url(e){null!=e?this._set("url",(0,C.Jf)(e,Lt())):this._set("url",s.A.routeServiceUrl)}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Feature Collection"]},e)),Promise.resolve(this)}removeAll(){this.removeResult(),this.pointBarriers.removeAll(),this.polygonBarriers.removeAll(),this.polylineBarriers.removeAll(),this.stops.removeAll()}removeResult(){null!=this.directionLines&&(this.directionLines.removeAll(),this._set("directionLines",null)),null!=this.directionPoints&&(this.directionPoints.removeAll(),this._set("directionPoints",null)),null!=this.routeInfo&&this._set("routeInfo",null)}async save(){await this.load();const{fullExtent:e,portalItem:t}=this;if(!t)throw new l.A("routelayer:portal-item-not-set","save() requires to the layer to have a portal item");if(!t.id)throw new l.A("routelayer:portal-item-not-saved","Please use saveAs() first to save the routelayer");if("Feature Collection"!==t.type)throw new l.A("routelayer:portal-item-wrong-type",'Portal item needs to have type "Feature Collection"');if(null==this.routeInfo)throw new l.A("routelayer:route-unsolved","save() requires a solved route");const{portal:r}=t;await r.signIn(),r.user||await t.reload();const{itemUrl:i,itemControl:s}=t;if("admin"!==s&&"update"!==s)throw new l.A("routelayer:insufficient-permissions","To save this layer, you need to be the owner or an administrator of your organization");const o={messages:[],origin:"portal-item",portal:r,url:i?(0,h.An)(i):void 0,writtenProperties:[]},n=this.write(void 0,o);return t.extent=await It(e),t.title=this.title,await t.update({data:n}),t}async saveAs(e,t={}){if(await this.load(),null==this.routeInfo)throw new l.A("routelayer:route-unsolved","saveAs() requires a solved route");const r=k.default.from(e).clone();r.extent??=await It(this.fullExtent),r.id=null,r.portal??=U.A.getDefault(),r.title??=this.title,r.type="Feature Collection",r.typeKeywords=["Data","Feature Collection",$.mm.MULTI_LAYER,"Route Layer"];const{portal:i}=r,s={messages:[],origin:"portal-item",portal:i,url:null,writtenProperties:[]};await i.signIn();const o=t?.folder,n=this.write(void 0,s);return await i.user.addItem({item:r,folder:o,data:n}),this.portalItem=r,(0,T.v)(s),s.portalItem=r,r}async solve(e,t){St(this.stops),St(this.pointBarriers),St(this.polylineBarriers),St(this.polygonBarriers);const r=e?.stops??this.stops,i=e?.pointBarriers??Nt(this.pointBarriers),s=e?.polylineBarriers??Nt(this.polylineBarriers),o=e?.polygonBarriers??Nt(this.polygonBarriers);if(null==r)throw new l.A("routelayer:undefined-stops","the route layer must have stops defined in the route parameters.");if((function(e){return"esri.rest.support.FeatureSet"===e.declaredClass}(r)||function(e){return"esri.rest.support.NetworkFeatureSet"===e.declaredClass}(r))&&r.features.length<2||a.A.isCollection(r)&&r.length<2)throw new l.A("routelayer:insufficent-stops","the route layer must have two or more stops to solve a route.");if(a.A.isCollection(r))for(const e of r)e.routeName=null;const n=e?.apiKey,{checksum:u,url:p}=this,c=await this._getServiceDescription(p,n,t),m=e?.travelMode??c.defaultTravelMode,y=e?.accumulateAttributes??[];m&&(y.push(m.distanceAttributeName),m.timeAttributeName&&y.push(m.timeAttributeName));const h={accumulateAttributes:y,checksum:u,directionsOutputType:"featuresets",ignoreInvalidLocations:!0,pointBarriers:i,polylineBarriers:s,polygonBarriers:o,preserveObjectID:!0,returnBarriers:!!i,returnDirections:!0,returnPolygonBarriers:!!o,returnPolylineBarriers:!!s,returnRoutes:!0,returnStops:!0,stops:r},f=gt.from(e??{});let v;f.set(h);try{v=await Pe(p,f,t)}catch(e){throw(0,d.zf)(e)?e:new l.A("routelayer:failed-route-request","the routing request failed",{error:e})}const g=this._toRouteLayerSolution(v);return this._isOverridden("title")||(this.title=g.routeInfo.name??"Route"),function(e,t,r){const i=t.networkDataset?.networkAttributes,s=i?.filter((({usageType:e})=>"cost"===e))??[],o=r.travelMode??t.defaultTravelMode;if(null==o)return void Lt().warn("route-layer:missing-travel-mode","The routing service must have a default travel mode or one must be specified in the route parameter.");const{timeAttributeName:n,distanceAttributeName:a}=o,u=s.find((({name:e})=>e===n)),p=s.find((({name:e})=>e===a)),c=r.travelMode?.impedanceAttributeName??r.impedanceAttribute??t.impedance,d=u?.units,m=p?.units;if(!d||!m)throw new l.A("routelayer:unknown-impedance-units","the units of either the distance or time impedance are unknown");const y=r.directionsLanguage??t.directionsLanguage,h=r.accumulateAttributes??t.accumulateAttributeNames??[],f=new Set(s.filter((({name:e})=>e===n||e===a||e===c||null!=e&&h.includes(e))).map((({name:e})=>e))),v=e=>{for(const t in e)f.has(t)||delete e[t]};for(const t of e.pointBarriers)null!=t.costs&&(t.addedCost=t.costs[c]??0,v(t.costs));for(const t of e.polygonBarriers)null!=t.costs&&(t.scaleFactor=t.costs[c]??1,v(t.costs));for(const t of e.polylineBarriers)null!=t.costs&&(t.scaleFactor=t.costs[c]??1,v(t.costs));const{routeInfo:g}=e,{findBestSequence:b,preserveFirstStop:T,preserveLastStop:w,startTimeIsUTC:_,timeWindowsAreUTC:S}=r;g.analysisSettings=new tt({accumulateAttributes:h,directionsLanguage:y,findBestSequence:b,preserveFirstStop:T,preserveLastStop:w,startTimeIsUTC:_,timeWindowsAreUTC:S,travelMode:o}),g.totalDuration=Zt(g.totalCosts?.[n]??0,d),g.totalDistance=Ct(g.totalCosts?.[a]??0,m),g.totalLateDuration=Zt(g.totalViolations?.[n]??0,d),g.totalWaitDuration=Zt(g.totalWait?.[n]??0,d),null!=g.totalCosts&&v(g.totalCosts),null!=g.totalViolations&&v(g.totalViolations),null!=g.totalWait&&v(g.totalWait);for(const t of e.stops)null!=t.serviceCosts&&(t.serviceDuration=Zt(t.serviceCosts[n]??0,d),t.serviceDistance=Ct(t.serviceCosts[a]??0,m),v(t.serviceCosts)),null!=t.cumulativeCosts&&(t.cumulativeDuration=Zt(t.cumulativeCosts[n]??0,d),t.cumulativeDistance=Ct(t.cumulativeCosts[a]??0,m),v(t.cumulativeCosts)),null!=t.violations&&(t.lateDuration=Zt(t.violations[n]??0,d),v(t.violations)),null!=t.wait&&(t.waitDuration=Zt(t.wait[n]??0,d),v(t.wait))}(g,c,f),g}update(e){const{checksum:t,directionLines:r,directionPoints:i,pointBarriers:s,polygonBarriers:o,polylineBarriers:n,routeInfo:a,stops:l}=e;At(l,this.stops)?function(e,t){for(const r of e){const e=t.find((e=>e.objectId===r.objectId));e&&(e.arriveCurbApproach=r.arriveCurbApproach,e.arriveTime=r.arriveTime,e.arriveTimeOffset=r.arriveTimeOffset,e.cumulativeCosts=r.cumulativeCosts,e.cumulativeDistance=r.cumulativeDistance,e.cumulativeDuration=r.cumulativeDuration,e.curbApproach=r.curbApproach,e.departCurbApproach=r.departCurbApproach,e.departTime=r.departTime,e.departTimeOffset=r.departTimeOffset,e.distanceToNetworkInMeters=r.distanceToNetworkInMeters,e.geometry=r.geometry,e.lateDuration=r.lateDuration,e.name=r.name,e.navLatency=r.navLatency,e.posAlong=r.posAlong,e.routeName=r.routeName,e.serviceCosts=r.serviceCosts,e.serviceDistance=r.serviceDistance,e.serviceDuration=r.serviceDuration,e.sequence=r.sequence,e.sideOfEdge=r.sideOfEdge,e.snapX=r.snapX,e.snapY=r.snapY,e.snapZ=r.snapZ,e.sourceId=r.sourceId,e.sourceOid=r.sourceOid,e.status=r.status,e.symbol=r.symbol,e.timeWindowEnd=r.timeWindowEnd,e.timeWindowStart=r.timeWindowStart,e.violations=r.violations,e.waitDuration=r.waitDuration,e.wait=r.wait)}}(l,this.stops):this.set({stops:l}),At(s,this.pointBarriers)?function(e,t){for(const r of e){const e=t.find((e=>e.objectId===r.objectId));e&&(e.addedCost=r.addedCost,e.barrierType=r.barrierType,e.costs=r.costs,e.curbApproach=r.curbApproach,e.fullEdge=r.fullEdge,e.geometry=r.geometry,e.name=r.name,e.sideOfEdge=r.sideOfEdge,e.sourceId=r.sourceId,e.sourceOid=r.sourceOid,e.status=r.status,e.symbol=r.symbol)}}(s,this.pointBarriers):this.set({pointBarriers:s}),At(n,this.polylineBarriers)?function(e,t){for(const r of e){const e=t.find((e=>e.objectId===r.objectId));e&&(e.barrierType=r.barrierType,e.costs=r.costs,e.geometry=r.geometry,e.name=r.name,e.scaleFactor=r.scaleFactor,e.symbol=r.symbol)}}(n,this.polylineBarriers):this.set({polylineBarriers:n}),At(o,this.polygonBarriers)?function(e,t){for(const r of e){const e=t.find((e=>e.objectId===r.objectId));e&&(e.barrierType=r.barrierType,e.costs=r.costs,e.geometry=r.geometry,e.name=r.name,e.scaleFactor=r.scaleFactor,e.symbol=r.symbol)}}(o,this.polygonBarriers):this.set({polygonBarriers:o}),this.set({checksum:t}),this._set("directionLines",r),this._set("directionPoints",i),this._set("routeInfo",a),null!=a.geometry&&(this.spatialReference=a.geometry.spatialReference)}_getNetworkFeatures(e,t,r,i){const s=Dt(e)?e.layers:e.featureCollection?.layers,l=s?.find((e=>e.layerDefinition.name===t));if(null==l)return new a.A;const{layerDefinition:u,popupInfo:p,featureSet:c}=l,d=u.drawingInfo.renderer,{features:m}=c,y=c.spatialReference??u.spatialReference??u.extent.spatialReference??M.KK,h=d&&(0,W.L)(d),f=A.A.fromJSON(y),v=m.map((e=>{const i=o.A.fromJSON(e);null!=i.geometry&&null!=e.geometry&&null==e.geometry.spatialReference&&(i.geometry.spatialReference=f);const s=r(i);return s.symbol??=h?.getSymbol(i)??this._getNetworkSymbol(t),s.popupTemplate??=p&&n.A.fromJSON(p),s}));return i&&v.some((({symbol:e})=>!e))&&i(v),new a.A(v)}_getNetworkSymbol(e){switch(e){case"Barriers":return this.defaultSymbols.pointBarriers;case"DirectionPoints":return this.defaultSymbols.directionPoints;case"DirectionLines":return this.defaultSymbols.directionLines;case"PolylineBarriers":return this.defaultSymbols.polylineBarriers;case"PolygonBarriers":return this.defaultSymbols.polygonBarriers;case"RouteInfo":return this.defaultSymbols.routeInfo;case"Stops":return null}}async _getServiceDescription(e,t,r){if(null!=this._cachedServiceDescription&&this._cachedServiceDescription.url===e)return this._cachedServiceDescription.serviceDescription;const i=await oe(e,t,r);return this._cachedServiceDescription={serviceDescription:i,url:e},i}_setStopSymbol(e){if(!e||!e.length||!this.defaultSymbols.stops||e.every((({symbol:e})=>!!e)))return;const{first:t,last:r,middle:i,unlocated:s,waypoint:o,break:n}=this.defaultSymbols.stops;if(null==this.routeInfo||1===e.length)return void e.forEach(((s,o)=>{switch(o){case 0:s.symbol=t;break;case e.length-1:s.symbol=r;break;default:s.symbol=i}}));const a=e.map((({sequence:e})=>e)).filter((e=>null!=e)),l=Math.min(...a),u=Math.max(...a);for(const a of e)a.sequence!==l?a.sequence!==u?"ok"===a.status||"not-located-on-closest"===a.status?"waypoint"!==a.locationType?"break"!==a.locationType?a.symbol=i:a.symbol=n:a.symbol=o:a.symbol=s:a.symbol=r:a.symbol=t}_toRouteLayerSolution(e){const{checksum:t,routeResults:r}=e,i=r[0].stops?.map((e=>_t.fromJSON(e.toJSON())));this._setStopSymbol(i);const s=new Pt(i),o=new Bt(e.polygonBarriers?.map((e=>{const t=He.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.polygonBarriers,t}))),n=new Rt(e.polylineBarriers?.map((e=>{const t=Qe.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.polylineBarriers,t}))),a=new Ft(e.pointBarriers?.map((e=>{const t=Ge.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.pointBarriers,t}))),l=r[0].route?.toJSON(),u=st.fromJSON(l);u.symbol=this.defaultSymbols.routeInfo;const p=new xt(r[0].directionPoints?.features.map((e=>{const t=$e.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.directionPoints,t})));return{checksum:t,directionLines:new jt(r[0].directionLines?.features.map((e=>{const t=Je.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.directionLines,t}))),directionPoints:p,pointBarriers:a,polygonBarriers:o,polylineBarriers:n,routeInfo:u,stops:s}}_writeDirectionLines(){return this._writeNetworkFeatures(this.directionLines,this.defaultSymbols.directionLines,"esriGeometryPolyline",Je.fields,"DirectionLines","Direction Lines")}_writeDirectionPoints(){return this._writeNetworkFeatures(this.directionPoints,this.defaultSymbols.directionPoints,"esriGeometryPoint",$e.fields,"DirectionPoints","Direction Points")}_writeNetworkFeatures(e,t,r,i,s,o){if(!e?.length)return null;const n=this.spatialReference.toJSON(),{fullExtent:a,maxScale:l,minScale:u}=this;return{featureSet:{features:e.toArray().map((e=>function(e){const{attributes:t,geometry:r,popupTemplate:i,symbol:s}=e.toGraphic().toJSON();return{attributes:t,geometry:r,popupInfo:i,symbol:s}}(e))),geometryType:r,spatialReference:n},layerDefinition:{capabilities:"Query,Update,Editing",drawingInfo:{renderer:{type:"simple",symbol:null!=t?t.toJSON():Ot(r)}},extent:a.toJSON(),fields:i,geometryType:r,hasM:!1,hasZ:!1,maxScale:l,minScale:u,name:s,objectIdField:"ObjectID",spatialReference:n,title:o,type:"Feature Layer",typeIdField:""}}}_writePointBarriers(){return this._writeNetworkFeatures(this.pointBarriers,this.defaultSymbols.pointBarriers,"esriGeometryPoint",Ge.fields,"Barriers","Point Barriers")}_writePolygonBarriers(){return this._writeNetworkFeatures(this.polygonBarriers,this.defaultSymbols.polygonBarriers,"esriGeometryPolygon",He.fields,"PolygonBarriers","Polygon Barriers")}_writePolylineBarriers(){return this._writeNetworkFeatures(this.polylineBarriers,this.defaultSymbols.polylineBarriers,"esriGeometryPolyline",Qe.fields,"PolylineBarriers","Line Barriers")}_writeRouteInfo(){return this._writeNetworkFeatures(null!=this.routeInfo?new a.A([this.routeInfo]):null,this.defaultSymbols.routeInfo,"esriGeometryPolyline",st.fields,"RouteInfo","Route Details")}_writeStops(){const e=this._writeNetworkFeatures(this.stops,null,"esriGeometryPoint",_t.fields,"Stops","Stops");if(null==e)return null;const{stops:t}=this.defaultSymbols,r=t?.first?.toJSON(),i=t?.middle?.toJSON(),s=t?.last?.toJSON();return e.layerDefinition.drawingInfo.renderer={type:"uniqueValue",field1:"Sequence",defaultSymbol:i,uniqueValueInfos:[{value:"1",symbol:r,label:"First Stop"},{value:`${this.stops.length}`,symbol:s,label:"Last Stop"}]},e}};(0,i._)([(0,f.MZ)({readOnly:!0,json:{read:!1,origins:{"portal-item":{write:{allowNull:!0,ignoreOrigin:!0}},"web-map":{write:{overridePolicy(){return{allowNull:!0,ignoreOrigin:null==this.portalItem}}}}}}})],Jt.prototype,"_featureCollection",void 0),(0,i._)([(0,b.K)(["web-map","portal-item"],"_featureCollection")],Jt.prototype,"writeFeatureCollectionWebmap",null),(0,i._)([(0,f.MZ)({readOnly:!0,json:{read:!1,origins:{"web-map":{write:{target:"type",overridePolicy(){return{ignoreOrigin:null!=this.portalItem}}}}}}})],Jt.prototype,"_type",void 0),(0,i._)([(0,f.MZ)({type:String})],Jt.prototype,"checksum",void 0),(0,i._)([(0,f.MZ)({nonNullable:!0,type:J})],Jt.prototype,"defaultSymbols",void 0),(0,i._)([(0,f.MZ)({readOnly:!0})],Jt.prototype,"directionLines",void 0),(0,i._)([(0,v.w)(["web-map","portal-item"],"directionLines",["layers","featureCollection.layers"])],Jt.prototype,"readDirectionLines",null),(0,i._)([(0,f.MZ)({readOnly:!0})],Jt.prototype,"directionPoints",void 0),(0,i._)([(0,v.w)(["web-map","portal-item"],"directionPoints",["layers","featureCollection.layers"])],Jt.prototype,"readDirectionPoints",null),(0,i._)([(0,f.MZ)({readOnly:!0,json:{read:!1,origins:{"web-map":{write:{ignoreOrigin:!0}}}}})],Jt.prototype,"featureCollectionType",void 0),(0,i._)([(0,f.MZ)({readOnly:!0})],Jt.prototype,"fullExtent",null),(0,i._)([(0,f.MZ)({json:{origins:{"web-map":{name:"featureCollection.showLegend"}},write:!0}})],Jt.prototype,"legendEnabled",void 0),(0,i._)([(0,f.MZ)({type:["show","hide"]})],Jt.prototype,"listMode",void 0),(0,i._)([(0,f.MZ)({type:Number,nonNullable:!0,json:{write:!1}})],Jt.prototype,"maxScale",void 0),(0,i._)([(0,v.w)(["web-map","portal-item"],"maxScale",["layers","featureCollection.layers"])],Jt.prototype,"readMaxScale",null),(0,i._)([(0,f.MZ)({type:Number,nonNullable:!0,json:{write:!1}})],Jt.prototype,"minScale",void 0),(0,i._)([(0,v.w)(["web-map","portal-item"],"minScale",["layers","featureCollection.layers"])],Jt.prototype,"readMinScale",null),(0,i._)([(0,f.MZ)({type:["ArcGISFeatureLayer"],value:"ArcGISFeatureLayer"})],Jt.prototype,"operationalLayerType",void 0),(0,i._)([(0,f.MZ)({nonNullable:!0,type:a.A.ofType(Ge)})],Jt.prototype,"pointBarriers",void 0),(0,i._)([(0,v.w)(["web-map","portal-item"],"pointBarriers",["layers","featureCollection.layers"])],Jt.prototype,"readPointBarriers",null),(0,i._)([(0,f.MZ)({nonNullable:!0,type:a.A.ofType(He)})],Jt.prototype,"polygonBarriers",void 0),(0,i._)([(0,v.w)(["web-map","portal-item"],"polygonBarriers",["layers","featureCollection.layers"])],Jt.prototype,"readPolygonBarriers",null),(0,i._)([(0,f.MZ)({nonNullable:!0,type:a.A.ofType(Qe)})],Jt.prototype,"polylineBarriers",void 0),(0,i._)([(0,v.w)(["web-map","portal-item"],"polylineBarriers",["layers","featureCollection.layers"])],Jt.prototype,"readPolylineBarriers",null),(0,i._)([(0,f.MZ)({readOnly:!0})],Jt.prototype,"routeInfo",void 0),(0,i._)([(0,v.w)(["web-map","portal-item"],"routeInfo",["layers","featureCollection.layers"])],Jt.prototype,"readRouteInfo",null),(0,i._)([(0,f.MZ)({type:A.A})],Jt.prototype,"spatialReference",void 0),(0,i._)([(0,v.w)(["web-map","portal-item"],"spatialReference",["layers","featureCollection.layers"])],Jt.prototype,"readSpatialReference",null),(0,i._)([(0,f.MZ)({nonNullable:!0,type:a.A.ofType(_t)})],Jt.prototype,"stops",void 0),(0,i._)([(0,v.w)(["web-map","portal-item"],"stops",["layers","featureCollection.layers"])],Jt.prototype,"readStops",null),(0,i._)([(0,f.MZ)()],Jt.prototype,"title",null),(0,i._)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],Jt.prototype,"type",void 0),(0,i._)([(0,f.MZ)()],Jt.prototype,"url",null),Jt=(0,i._)([(0,g.$)(Et)],Jt);const Ut=Jt},65494:(e,t,r)=>{r.d(t,{L:()=>l,r:()=>n});var i=r(67076),s=r(90360),o=r(41214);function n(e,t){return l(e,null,t)}const a=(0,s.C)({types:o.Hg});function l(e,t,r){return e?e&&(e.styleName||e.styleUrl)&&"uniqueValue"!==e.type?(r?.messages&&r.messages.push(new i.A("renderer:unsupported","Only UniqueValueRenderer can be referenced from a web style, but found '"+e.type+"'",{definition:e,context:r})),null):a(e,t,r):null}},73681:(e,t,r)=>{r.d(t,{n:()=>l});var i=r(49186),s=r(53966),o=r(46140),n=r(95466),a=r(55674);class l{static async from(e,t,r){const n=e.dictionary_version?o.R.parse(e.dictionary_version):null,p=new Set(e.itemsNames),c={};if(t)for(const e in t)c[e]=t[e];if(e.authoringInfo.configuration)for(const t of e.authoringInfo.configuration)c.hasOwnProperty(t.name)||(c[t.name]=t.value);const d=new Set(e.authoringInfo.symbol);for(const e of Object.keys(r))d.delete(e);d.size&&s.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("missing-fields: fieldMap entries for the following symbol fields are missing",{symbolFields:d});const m=await(0,a.xR)(e.expression,null,c);if(!m)throw new i.A("Unable to create dictionary renderer expression");const y=!n||!n.greaterEqual(4,0);y&&s.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("Dictionary script does not support native field types. Applying fallback",{version:n});const h=new u(r,y);return new l(y,p,m,h)}constructor(e,t,r,i){this._requiresFieldCoercionToString=e,this._itemNames=t,this._compiled=r,this._reader=i}get itemNames(){return this._itemNames}evaluate(e,t,r,i){try{return this._reader.bind(e,r,i),this._compiled.evaluate(this._reader,{$view:{scale:t}})}catch(e){s.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("arcade: dictionary script evaluation failed",{error:e})}return null}createDictionaryFieldsIndex(e){if(!this._requiresFieldCoercionToString)return new n.A(e);const t=e.map((e=>({...e,type:"esriFieldTypeString"})));return new n.A(t)}}class u extends a.Gj{constructor(e,t){super(),this._fieldMap=e,this._requiresFieldCoercionToString=t}_getField(e){const t=this._fieldMap[e]??e;return this._boundSchema.fieldsIndex.get(t)}field(e){if(!this._requiresFieldCoercionToString)return super.field(e,!1);const t=this._getField(e);return null==t?"":""+this._boundTarget.attributes[t.name]}}},76369:(e,t,r)=>{r.d(t,{LF:()=>S,M9:()=>A});var i=r(49186),s=r(93637),o=r(40876),n=r(59247),a=r(27865);function l(e,t,r,i){var s=Error.call(this,e);return Object.setPrototypeOf&&Object.setPrototypeOf(s,l.prototype),s.expected=t,s.found=r,s.location=i,s.name="SyntaxError",s}function u(e,t,r){return r=r||" ",e.length>t?e:(t-=e.length,e+(r+=r.repeat(t)).slice(0,t))}function p(e){if(!e||0===e.length)return null;if("string"==typeof e){const t=c(e);return t&&0!==t.length?t:null}const t=e.map((e=>{if(!Number.isFinite(e.scale)||e.scale<=0)throw new i.A("effect:invalid-scale","scale must be finite and greater than 0",{stop:e});return{scale:e.scale,effects:c(e.value)}}));t.sort(((e,t)=>t.effects.length-e.effects.length));for(let e=0;e<t.length-1;e++){if(!(0,a.mj)(t[e].effects,t[e+1].effects))throw new i.A("effect:interpolation-impossible","Cannot interpolate by scale between 2 lists of mixed effects",{a:t[e].effects,b:t[e+1].effects});(0,a.O9)(t[e].effects,t[e+1].effects)}return t.sort(((e,t)=>t.scale-e.scale)),t}function c(e){let t;if(!e)return[];try{t=function(e,t){var r,i={},s=(t=void 0!==t?t:{}).grammarSource,o={start:qe},n=qe,a="none",u=")",p=",",c="(",d="%",m="px",y="cm",h="mm",f="in",v="pt",g="pc",b="deg",T="rad",w="grad",_="turn",S="#",A=".",M="e",N=/^[ \t\n\r]/,O=/^[a-z\-]/,D=/^[0-9a-fA-F]/,I=/^[+\-]/,Z=/^[0-9]/,C=Ue("none"),j=Le("none",!1),x=Le(")",!1),F=Le(",",!1),B=Ue("whitespace"),R=Je([" ","\t","\n","\r"],!1,!1),P=Ue("function"),E=Le("(",!1),L=Ue("identifier"),J=Je([["a","z"],"-"],!1,!1),U=Ue("percentage"),k=Le("%",!1),$=Ue("length"),W=Le("px",!1),q=Le("cm",!1),G=Le("mm",!1),V=Le("in",!1),z=Le("pt",!1),K=Le("pc",!1),H=Ue("angle"),Y=Le("deg",!1),X=Le("rad",!1),Q=Le("grad",!1),ee=Le("turn",!1),te=Ue("number"),re=Ue("color"),ie=Le("#",!1),se=Je([["0","9"],["a","f"],["A","F"]],!1,!1),oe=Je(["+","-"],!1,!1),ne=Je([["0","9"]],!1,!1),ae=Le(".",!1),le=Le("e",!1),ue=function(){return[]},pe=function(e,t){return{type:"function",name:e,parameters:t||[]}},ce=function(e,t){return t.length>0?function(e,t){return[e].concat(function(e){return e.map((function(e){return e[3]}))}(t))}(e,t):[e]},de=function(e){return{type:"quantity",value:e.value,unit:e.unit}},me=function(e){return{type:"color",colorType:e.type,value:e.value}},ye=function(e){return e},he=function(){return Ee()},fe=function(e){return{value:e,unit:"%"}},ve=function(e){return{value:e,unit:"px"}},ge=function(e){return{value:e,unit:"cm"}},be=function(e){return{value:e,unit:"mm"}},Te=function(e){return{value:e,unit:"in"}},we=function(e){return{value:e,unit:"pt"}},_e=function(e){return{value:e,unit:"pc"}},Se=function(e){return{value:e,unit:"deg"}},Ae=function(e){return{value:e,unit:"rad"}},Me=function(e){return{value:e,unit:"grad"}},Ne=function(e){return{value:e,unit:"turn"}},Oe=function(e){return{value:e,unit:null}},De=function(){return{type:"hex",value:Ee()}},Ie=function(e){return{type:"function",value:e}},Ze=function(){return{type:"named",value:Ee()}},Ce=function(){return parseFloat(Ee())},je=0|t.peg$currPos,xe=je,Fe=[{line:1,column:1}],Be=je,Re=t.peg$maxFailExpected||[],Pe=0|t.peg$silentFails;if(t.startRule){if(!(t.startRule in o))throw new Error("Can't start parsing from rule \""+t.startRule+'".');n=o[t.startRule]}function Ee(){return e.substring(xe,je)}function Le(e,t){return{type:"literal",text:e,ignoreCase:t}}function Je(e,t,r){return{type:"class",parts:e,inverted:t,ignoreCase:r}}function Ue(e){return{type:"other",description:e}}function ke(t){var r,i=Fe[t];if(i)return i;if(t>=Fe.length)r=Fe.length-1;else for(r=t;!Fe[--r];);for(i={line:(i=Fe[r]).line,column:i.column};r<t;)10===e.charCodeAt(r)?(i.line++,i.column=1):i.column++,r++;return Fe[t]=i,i}function $e(e,t,r){var i=ke(e),o=ke(t);return{source:s,start:{offset:e,line:i.line,column:i.column},end:{offset:t,line:o.line,column:o.column}}}function We(e){je<Be||(je>Be&&(Be=je,Re=[]),Re.push(e))}function qe(){var e;return(e=Ge())===i&&(e=function(){var e,t;if(e=[],(t=Ve())!==i)for(;t!==i;)e.push(t),t=Ve();else e=i;return e}()),e}function Ge(){var t,r;return Pe++,t=je,Ke(),e.substr(je,4)===a?(r=a,je+=4):(r=i,0===Pe&&We(j)),r!==i?(Ke(),xe=t,t=ue()):(je=t,t=i),Pe--,t===i&&0===Pe&&We(C),t}function Ve(){var t,r,s,o;return t=je,Ke(),(r=function(){var t,r,s;return Pe++,t=je,(r=He())!==i?(40===e.charCodeAt(je)?(s=c,je++):(s=i,0===Pe&&We(E)),s!==i?(xe=t,t=ye(r)):(je=t,t=i)):(je=t,t=i),Pe--,t===i&&(r=i,0===Pe&&We(P)),t}())!==i?(Ke(),(s=function(){var t,r,s,o,n,a,l,u;if(t=je,(r=ze())!==i){for(s=[],o=je,n=Ke(),44===e.charCodeAt(je)?(a=p,je++):(a=i,0===Pe&&We(F)),a===i&&(a=null),l=Ke(),(u=ze())!==i?o=n=[n,a,l,u]:(je=o,o=i);o!==i;)s.push(o),o=je,n=Ke(),44===e.charCodeAt(je)?(a=p,je++):(a=i,0===Pe&&We(F)),a===i&&(a=null),l=Ke(),(u=ze())!==i?o=n=[n,a,l,u]:(je=o,o=i);xe=t,t=ce(r,s)}else je=t,t=i;return t}())===i&&(s=null),Ke(),41===e.charCodeAt(je)?(o=u,je++):(o=i,0===Pe&&We(x)),o!==i?(Ke(),xe=t,t=pe(r,s)):(je=t,t=i)):(je=t,t=i),t}function ze(){var e,t;return e=je,(t=Ye())===i&&(t=Xe())===i&&(t=Qe())===i&&(t=function(){var e,t;return Pe++,e=je,Ke(),(t=tt())!==i?(xe=e,e=Oe(t)):(je=e,e=i),Pe--,e===i&&0===Pe&&We(te),e}()),t!==i&&(xe=e,t=de(t)),(e=t)===i&&(e=je,(t=et())!==i&&(xe=e,t=me(t)),e=t),e}function Ke(){var t,r;for(Pe++,t=[],r=e.charAt(je),N.test(r)?je++:(r=i,0===Pe&&We(R));r!==i;)t.push(r),r=e.charAt(je),N.test(r)?je++:(r=i,0===Pe&&We(R));return Pe--,r=i,0===Pe&&We(B),t}function He(){var t,r,s;if(Pe++,t=je,r=[],s=e.charAt(je),O.test(s)?je++:(s=i,0===Pe&&We(J)),s!==i)for(;s!==i;)r.push(s),s=e.charAt(je),O.test(s)?je++:(s=i,0===Pe&&We(J));else r=i;return r!==i&&(xe=t,r=he()),Pe--,(t=r)===i&&(r=i,0===Pe&&We(L)),t}function Ye(){var t,r,s;return Pe++,t=je,Ke(),(r=tt())!==i?(37===e.charCodeAt(je)?(s=d,je++):(s=i,0===Pe&&We(k)),s!==i?(xe=t,t=fe(r)):(je=t,t=i)):(je=t,t=i),Pe--,t===i&&0===Pe&&We(U),t}function Xe(){var t,r,s;return Pe++,t=je,Ke(),(r=tt())!==i?(e.substr(je,2)===m?(s=m,je+=2):(s=i,0===Pe&&We(W)),s!==i?(xe=t,t=ve(r)):(je=t,t=i)):(je=t,t=i),t===i&&(t=je,Ke(),(r=tt())!==i?(e.substr(je,2)===y?(s=y,je+=2):(s=i,0===Pe&&We(q)),s!==i?(xe=t,t=ge(r)):(je=t,t=i)):(je=t,t=i),t===i&&(t=je,Ke(),(r=tt())!==i?(e.substr(je,2)===h?(s=h,je+=2):(s=i,0===Pe&&We(G)),s!==i?(xe=t,t=be(r)):(je=t,t=i)):(je=t,t=i),t===i&&(t=je,Ke(),(r=tt())!==i?(e.substr(je,2)===f?(s=f,je+=2):(s=i,0===Pe&&We(V)),s!==i?(xe=t,t=Te(r)):(je=t,t=i)):(je=t,t=i),t===i&&(t=je,Ke(),(r=tt())!==i?(e.substr(je,2)===v?(s=v,je+=2):(s=i,0===Pe&&We(z)),s!==i?(xe=t,t=we(r)):(je=t,t=i)):(je=t,t=i),t===i&&(t=je,Ke(),(r=tt())!==i?(e.substr(je,2)===g?(s=g,je+=2):(s=i,0===Pe&&We(K)),s!==i?(xe=t,t=_e(r)):(je=t,t=i)):(je=t,t=i)))))),Pe--,t===i&&0===Pe&&We($),t}function Qe(){var t,r,s;return Pe++,t=je,(r=tt())!==i?(e.substr(je,3)===b?(s=b,je+=3):(s=i,0===Pe&&We(Y)),s!==i?(xe=t,t=Se(r)):(je=t,t=i)):(je=t,t=i),t===i&&(t=je,(r=tt())!==i?(e.substr(je,3)===T?(s=T,je+=3):(s=i,0===Pe&&We(X)),s!==i?(xe=t,t=Ae(r)):(je=t,t=i)):(je=t,t=i),t===i&&(t=je,(r=tt())!==i?(e.substr(je,4)===w?(s=w,je+=4):(s=i,0===Pe&&We(Q)),s!==i?(xe=t,t=Me(r)):(je=t,t=i)):(je=t,t=i),t===i&&(t=je,(r=tt())!==i?(e.substr(je,4)===_?(s=_,je+=4):(s=i,0===Pe&&We(ee)),s!==i?(xe=t,t=Ne(r)):(je=t,t=i)):(je=t,t=i)))),Pe--,t===i&&(r=i,0===Pe&&We(H)),t}function et(){var t,r,s,o;if(Pe++,t=je,35===e.charCodeAt(je)?(r=S,je++):(r=i,0===Pe&&We(ie)),r!==i){if(s=[],o=e.charAt(je),D.test(o)?je++:(o=i,0===Pe&&We(se)),o!==i)for(;o!==i;)s.push(o),o=e.charAt(je),D.test(o)?je++:(o=i,0===Pe&&We(se));else s=i;s!==i?(xe=t,t=De()):(je=t,t=i)}else je=t,t=i;return t===i&&(t=je,(r=Ve())!==i&&(xe=t,r=Ie(r)),(t=r)===i&&(t=je,(r=He())!==i&&(xe=t,r=Ze()),t=r)),Pe--,t===i&&(r=i,0===Pe&&We(re)),t}function tt(){var t,r,s,o,n,a,l,u;for(t=je,r=e.charAt(je),I.test(r)?je++:(r=i,0===Pe&&We(oe)),r===i&&(r=null),s=je,o=[],n=e.charAt(je),Z.test(n)?je++:(n=i,0===Pe&&We(ne));n!==i;)o.push(n),n=e.charAt(je),Z.test(n)?je++:(n=i,0===Pe&&We(ne));if(46===e.charCodeAt(je)?(n=A,je++):(n=i,0===Pe&&We(ae)),n!==i){if(a=[],l=e.charAt(je),Z.test(l)?je++:(l=i,0===Pe&&We(ne)),l!==i)for(;l!==i;)a.push(l),l=e.charAt(je),Z.test(l)?je++:(l=i,0===Pe&&We(ne));else a=i;a!==i?s=o=[o,n,a]:(je=s,s=i)}else je=s,s=i;if(s===i)if(s=[],o=e.charAt(je),Z.test(o)?je++:(o=i,0===Pe&&We(ne)),o!==i)for(;o!==i;)s.push(o),o=e.charAt(je),Z.test(o)?je++:(o=i,0===Pe&&We(ne));else s=i;if(s!==i){if(o=je,101===e.charCodeAt(je)?(n=M,je++):(n=i,0===Pe&&We(le)),n!==i){if(a=e.charAt(je),I.test(a)?je++:(a=i,0===Pe&&We(oe)),a===i&&(a=null),l=[],u=e.charAt(je),Z.test(u)?je++:(u=i,0===Pe&&We(ne)),u!==i)for(;u!==i;)l.push(u),u=e.charAt(je),Z.test(u)?je++:(u=i,0===Pe&&We(ne));else l=i;l!==i?o=n=[n,a,l]:(je=o,o=i)}else je=o,o=i;o===i&&(o=null),xe=t,t=Ce()}else je=t,t=i;return t}if(r=n(),t.peg$library)return{peg$result:r,peg$currPos:je,peg$FAILED:i,peg$maxFailExpected:Re,peg$maxFailPos:Be};if(r!==i&&je===e.length)return r;throw r!==i&&je<e.length&&We({type:"end"}),function(e,t,r){return new l(l.buildMessage(e,t),e,t,r)}(Re,Be<e.length?e.charAt(Be):null,Be<e.length?$e(Be,Be+1):$e(Be,Be))}(e)}catch(t){throw new i.A("effect:invalid-syntax","Invalid effect syntax",{value:e,error:t})}return t.map((e=>function(e){try{switch(e.name){case"grayscale":case"sepia":case"saturate":case"invert":case"brightness":case"contrast":return function(e){let t=1;return d(e.parameters,1),1===e.parameters.length&&(t=v(e.parameters[0])),new n.yG(e.name,t)}(e);case"opacity":return function(e){let t=1;return d(e.parameters,1),1===e.parameters.length&&(t=v(e.parameters[0])),new n.jm(t)}(e);case"hue-rotate":return function(e){let t=0;return d(e.parameters,1),1===e.parameters.length&&(t=function(e){return function(e){if("quantity"!==e.type||!(0===e.value&&null===e.unit||e.unit&&null!=h[e.unit]))throw new i.A("effect:type-error",`Expected <angle>, Actual: ${m(e)}`,{term:e})}(e),e.value*h[e.unit]||0}(e.parameters[0])),new n.Nd(t)}(e);case"blur":return function(e){let t=0;return d(e.parameters,1),1===e.parameters.length&&(t=g(e.parameters[0]),y(t,e.parameters[0])),new n.Fk(t)}(e);case"drop-shadow":return function(e){const t=[];let r=null;for(const s of e.parameters)if("color"===s.type){if(t.length&&Object.freeze(t),r)throw new i.A("effect:type-error","Accepts only one color",{});r=b(s)}else{const e=g(s);if(Object.isFrozen(t))throw new i.A("effect:type-error","<length> parameters not consecutive",{lengths:t});t.push(e),3===t.length&&y(e,s)}if(t.length<2||t.length>3)throw new i.A("effect:type-error",`Expected <length>{2,3}, Actual: <length>{${t.length}}`,{lengths:t});return new n.$b(t[0],t[1],t[2]||0,r||T("black"))}(e);case"bloom":return function(e){let t=1,r=0,i=0;return d(e.parameters,3),e.parameters[0]&&(t=v(e.parameters[0])),e.parameters[1]&&(r=g(e.parameters[1]),y(r,e.parameters[1])),e.parameters[2]&&(i=v(e.parameters[2])),new n.bv(t,r,i)}(e)}}catch(t){throw t.details.filter=e,t}throw new i.A("effect:unknown-effect",`Effect '${e.name}' is not supported`,{effect:e})}(e)))}function d(e,t){if(e.length>t)throw new i.A("effect:type-error",`Function supports up to ${t} parameters, Actual: ${e.length}`,{parameters:e})}function m(e){if("color"===e.type)return"<color>";if(e.unit){if(e.unit in f)return"<length>";if(e.unit in h)return"<angle>";if("%"===e.unit)return"<percentage>"}return"<double>"}function y(e,t){if(e<0)throw new i.A("effect:type-error",`Negative values are not allowed, Actual: ${e}`,{term:t})}(function(e,t){function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r})(l,Error),l.prototype.format=function(e){var t="Error: "+this.message;if(this.location){var r,i=null;for(r=0;r<e.length;r++)if(e[r].source===this.location.source){i=e[r].text.split(/\r\n|\n|\r/g);break}var s=this.location.start,o=this.location.source&&"function"==typeof this.location.source.offset?this.location.source.offset(s):s,n=this.location.source+":"+o.line+":"+o.column;if(i){var a=this.location.end,l=u("",o.line.toString().length," "),p=i[s.line-1],c=(s.line===a.line?a.column:p.length+1)-s.column||1;t+="\n --\x3e "+n+"\n"+l+" |\n"+o.line+" | "+p+"\n"+l+" | "+u("",s.column-1," ")+u("",c,"^")}else t+="\n at "+n}return t},l.buildMessage=function(e,t){var r={literal:function(e){return'"'+s(e.text)+'"'},class:function(e){var t=e.parts.map((function(e){return Array.isArray(e)?o(e[0])+"-"+o(e[1]):o(e)}));return"["+(e.inverted?"^":"")+t.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(e){return e.description}};function i(e){return e.charCodeAt(0).toString(16).toUpperCase()}function s(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+i(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+i(e)}))}function o(e){return e.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+i(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+i(e)}))}function n(e){return r[e.type](e)}return"Expected "+function(e){var t,r,i=e.map(n);if(i.sort(),i.length>0){for(t=1,r=1;t<i.length;t++)i[t-1]!==i[t]&&(i[r]=i[t],r++);i.length=r}switch(i.length){case 1:return i[0];case 2:return i[0]+" or "+i[1];default:return i.slice(0,-1).join(", ")+", or "+i[i.length-1]}}(e)+" but "+function(e){return e?'"'+s(e)+'"':"end of input"}(t)+" found."};const h={deg:1,grad:.9,rad:180/Math.PI,turn:360},f={px:1,cm:96/2.54,mm:96/2.54/10,in:96,pc:16,pt:96/72};function v(e){!function(e){if("quantity"!==e.type||null!==e.unit&&"%"!==e.unit)throw new i.A("effect:type-error",`Expected <double> or <percentage>, Actual: ${m(e)}`,{term:e})}(e);const t=e.value;return y(t,e),"%"===e.unit?.01*t:t}function g(e){return function(e){if("quantity"!==e.type||!(0===e.value&&null===e.unit||e.unit&&null!=f[e.unit]))throw new i.A("effect:type-error",`Expected <length>, Actual: ${m(e)}`,{term:e})}(e),e.value*f[e.unit]||0}function b(e){switch(e.colorType){case"hex":return(0,o.qh)(e.value);case"named":return T(e.value);case"function":return function(e){if(d(e.parameters,4),w.test(e.name))return[v(e.parameters[0]),v(e.parameters[1]),v(e.parameters[2]),e.parameters[3]?v(e.parameters[3]):1];if(_.test(e.name))return(0,o.z$)(function(e){return function(e){if("quantity"!==e.type||null!==e.unit)throw new i.A("effect:type-error",`Expected <double>, Actual: ${m(e)}`,{term:e})}(e),y(e.value,e),e.value}(e.parameters[0]),v(e.parameters[1]),v(e.parameters[2]),e.parameters[3]?v(e.parameters[3]):1);throw new i.A("effect:syntax-error",`Invalid color function '${e.name}'`,{colorFunction:e})}(e.value)}}function T(e){if(!(0,o.V6)(e))throw new i.A("effect:unknown-color",`color '${e}' isn't valid`,{namedColor:e});return(0,o.c4)(e)}const w=/^rgba?/i,_=/^hsla?/i;function S(e,t,r){try{return function(e){if(!e||0===e.length)return null;if(function(e){const t=e[0];return!!t&&"scale"in t}(e)){const t=[];for(const r of e)t.push({scale:r.scale,value:M(r.value)});return t}return M(e)}(e)}catch(e){r?.messages?.push(e)}return null}function A(e,t,r,i){try{const i=function(e){const t=p(e);return t?(0,a.dw)(t)?t.map((e=>e.toJSON())):t.map((({scale:e,effects:t})=>({scale:e,value:t.map((e=>e.toJSON()))}))):null}(e);(0,s.sM)(r,i,t)}catch(e){i.messages&&i.messages.push(e)}}function M(e){if(!e?.length)return"";const t=[];for(const r of e){let e=[];switch(r.type){case"grayscale":case"sepia":case"saturate":case"invert":case"brightness":case"contrast":case"opacity":e=[N(r,"amount")];break;case"blur":e=[N(r,"radius","pt")];break;case"hue-rotate":e=[N(r,"angle","deg")];break;case"drop-shadow":e=[N(r,"xoffset","pt"),N(r,"yoffset","pt"),N(r,"blurRadius","pt"),O(r,"color")];break;case"bloom":e=[N(r,"strength"),N(r,"radius","pt"),N(r,"threshold")]}const i=`${r.type}(${e.filter(Boolean).join(" ")})`;p(i),t.push(i)}return t.join(" ")}function N(e,t,r){if(null==e[t])throw new i.A("effect:missing-parameter",`Missing parameter '${t}' in ${e.type} effect`,{effect:e});return r?e[t]+r:""+e[t]}function O(e,t){if(null==e[t])throw new i.A("effect:missing-parameter",`Missing parameter '${t}' in ${e.type} effect`,{effect:e});const r=e[t];return`rgba(${r[0]||0}, ${r[1]||0}, ${r[2]||0}, ${r[3]/255||0})`}},76553:(e,t,r)=>{function i(e){return e&&"getAtOrigin"in e&&"originOf"in e}r.d(t,{H:()=>i})},80754:(e,t,r)=>{r.d(t,{j7:()=>n,kS:()=>l,kd:()=>a,r8:()=>u});var i=r(82799),s=r(16930),o=r(65864);const n={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new i.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:s.A.WebMercator}),minus180Line:new i.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:s.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new i.A({paths:[[[180,-180],[180,180]]],spatialReference:s.A.WGS84}),minus180Line:new i.A({paths:[[[-180,-180],[-180,180]]],spatialReference:s.A.WGS84})}};function a(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const r=u(e);for(const e of r)for(const r of e)r[0]+=t;return e}function u(e){return(0,o.Bi)(e)?e.rings:e.paths}},92071:(e,t,r)=>{r.d(t,{P:()=>b,L:()=>T});var i=r(90237),s=r(69622),o=r(76953),n=r(4718),a=r(35666);class l{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(a.AU),this._values=new Map,this.multipleOriginsSupported=!0}clone(e){const t=new l,r=this._originStores[a.Gr.DEFAULTS];r&&r.forEach(((e,r)=>{t.set(r,(0,n.o8)(e),a.Gr.DEFAULTS)}));for(let r=a.Gr.SERVICE;r<a.AU;r++){const i=this._originStores[r];i&&i.forEach(((i,s)=>{e&&e.has(s)||t.set(s,(0,n.o8)(i),r)}))}return t}get(e,t){const r=void 0===t?this._values:this._originStores[t];return r?r.get(e):void 0}keys(e){const t=null==e?this._values:this._originStores[e];return t?[...t.keys()]:[]}set(e,t,r=a.Gr.USER){let i=this._originStores[r];if(i||(i=new Map,this._originStores[r]=i),i.set(e,t),!this._values.has(e)||this._propertyOriginMap.get(e)<=r){const i=this._values.get(e);return this._values.set(e,t),this._propertyOriginMap.set(e,r),i!==t}return!1}delete(e,t=a.Gr.USER){const r=this._originStores[t];if(!r)return;const i=r.get(e);if(r.delete(e),this._values.has(e)&&this._propertyOriginMap.get(e)===t){this._values.delete(e);for(let r=t-1;r>=0;r--){const t=this._originStores[r];if(t&&t.has(e)){this._values.set(e,t.get(e)),this._propertyOriginMap.set(e,r);break}}}return i}has(e,t){const r=void 0===t?this._values:this._originStores[t];return!!r&&r.has(e)}revert(e,t){for(;t>0&&!this.has(e,t);)--t;const r=this._originStores[t],i=r?.get(e),s=this._values.get(e);return this._values.set(e,i),this._propertyOriginMap.set(e,t),s!==i}originOf(e){return this._propertyOriginMap.get(e)||a.Gr.DEFAULTS}forEach(e){this._values.forEach(e)}}var u=r(45917),p=r(88620),c=r(40608);const d=e=>{let t=class extends e{constructor(...e){super(...e);const t=(0,p.oY)(this),r=t.store,i=new l;t.store=i,(0,o.k)(t,r,i)}read(e,t){(0,u.L)(this,e,t)}getAtOrigin(e,t){const r=m(this),i=(0,a.aB)(t);if("string"==typeof e)return r.get(e,i);const s={};return e.forEach((e=>{s[e]=r.get(e,i)})),s}originOf(e){return(0,a.OL)(this.originIdOf(e))}originIdOf(e){return m(this).originOf(e)}revert(e,t){const r=m(this),i=(0,a.aB)(t),s=(0,p.oY)(this);let o;o="string"==typeof e?"*"===e?r.keys(i):[e]:e,o.forEach((e=>{s.invalidate(e),r.revert(e,i),s.commit(e)}))}};return t=(0,i._)([(0,c.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],t),t};function m(e){return(0,p.oY)(e).store}let y=class extends(d(s.A)){};y=(0,i._)([(0,c.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],y);var h=r(16649),f=r(49422);const v=e=>{let t=class extends e{constructor(...e){super(...e)}clear(e,t="user"){return g(this).delete(e,(0,a.aB)(t))}write(e,t){return(0,f.M)(this,e=e||{},t),e}setAtOrigin(e,t,r){(0,p.oY)(this).setAtOrigin(e,t,(0,a.aB)(r))}removeOrigin(e){const t=g(this),r=(0,a.aB)(e),i=t.keys(r);for(const e of i)t.originOf(e)===r&&t.set(e,t.get(e,r),a.Gr.USER)}updateOrigin(e,t){const r=g(this),i=(0,a.aB)(t),s=(0,h.Jt)(this,e);for(let t=i+1;t<a.AU;++t)r.delete(e,t);r.set(e,s,i)}toJSON(e){return this.write({},e)}};return t=(0,i._)([(0,c.$)("esri.core.MultiOriginJSONSupport.WriteableMultiOriginJSONSupport")],t),t.prototype.toJSON.isDefaultToJSON=!0,t};function g(e){return(0,p.oY)(e).store}const b=e=>{let t=class extends(v(d(e))){constructor(...e){super(...e)}};return t=(0,i._)([(0,c.$)("esri.core.MultiOriginJSONSupport")],t),t};let T=class extends(b(s.A)){};T=(0,i._)([(0,c.$)("esri.core.MultiOriginJSONSupport")],T)},92300:(e,t,r)=>{r.d(t,{V:()=>o,X:()=>s});var i=r(65864);function s(e){return{geometryType:(0,i.$B)(e[0]),geometries:e.map((e=>e.toJSON()))}}function o(e,t,r){const s=(0,i.xD)(t);return e.map((e=>{const t=s.fromJSON(e);return t.spatialReference=r,t}))}},96576:(e,t,r)=>{r.d(t,{A:()=>m});var i,s=r(90237),o=r(4718),n=r(10107),a=(r(44208),r(53966),r(93223)),l=r(40608),u=r(92438),p=r(63988),c=r(49849);let d=i=class extends((0,p.h)(u.A)){constructor(e){super(e),this.description=null,this.label=null,this.symbol=null,this.type="simple"}async collectRequiredFields(e,t){await Promise.all([this.collectSymbolFields(e,t),this.collectVVRequiredFields(e,t)])}async collectSymbolFields(e,t){await Promise.all(this.symbols.map((r=>r.collectRequiredFields(e,t))))}getSymbol(e,t){return this.symbol}async getSymbolAsync(e,t){return this.symbol}get symbols(){return this.symbol?[this.symbol]:[]}getAttributeHash(){return this.visualVariables?.reduce(((e,t)=>e+t.getAttributeHash()),"")??""}getMeshHash(){return this.symbols.reduce(((e,t)=>e+JSON.stringify(t)),"")}get arcadeRequired(){return this.arcadeRequiredForVisualVariables}clone(){return new i({description:this.description,label:this.label,symbol:(0,o.o8)(this.symbol),visualVariables:(0,o.o8)(this.visualVariables),authoringInfo:(0,o.o8)(this.authoringInfo)})}};(0,s._)([(0,n.MZ)({type:String,json:{write:!0}})],d.prototype,"description",void 0),(0,s._)([(0,n.MZ)({type:String,json:{write:!0}})],d.prototype,"label",void 0),(0,s._)([(0,n.MZ)(c.Wp)],d.prototype,"symbol",void 0),(0,s._)([(0,a.e)({simple:"simple"})],d.prototype,"type",void 0),d=i=(0,s._)([(0,l.$)("esri.renderers.SimpleRenderer")],d);const m=d}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4341],{28132:(e,t,r)=>{r.d(t,{A:()=>C});var i=r(90237),s=r(69622),n=r(49186),o=r(44208),a=r(74887),l=r(84952),u=r(10107),c=(r(53966),r(87811),r(40608)),p=r(21325),d=r(20557),y=r(27733),h=r(2272),f=r(20615),m=r(5443),b=r(80893),g=r(61956),_=r(78286),w=r(99199),S=r(97768),v=r(62815),I=r(90708);function x(e,t){return t}function A(e,t,r,i){switch(r){case 0:return M(e,t+i,0);case 1:return"lowerLeft"===e.originPosition?M(e,t+i,1):function({translate:e,scale:t},r,i){return e[i]-r*t[i]}(e,t+i,1)}}function T(e,t,r,i){return 2===r?M(e,t,2):A(e,t,r,i)}function F(e,t,r,i){return 2===r?0===t?0:M(e,t,3):A(e,t,r,i)}function E(e,t,r,i){return 3===r?0===t?0:M(e,t,3):T(e,t,r,i)}function M({translate:e,scale:t},r,i){return e[i]+r*t[i]}class O{constructor(e){this._options=e,this.geometryTypes=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"],this._previousCoordinate=[0,0],this._transform=null,this._applyTransform=x,this._lengths=[],this._currentLengthIndex=0,this._toAddInCurrentPath=0,this._vertexDimension=0,this._mValueOffset=null,this._coordinateBuffer=null,this._coordinateBufferPtr=0,this._attributesConstructor=class{}}createFeatureResult(){return{fields:[],features:[]}}finishFeatureResult(e){if(this._options.applyTransform&&(e.transform=null),this._attributesConstructor=class{},this._coordinateBuffer=null,this._lengths.length=0,!e.hasZ)return;const t=(0,v.N)(e.geometryType,this._options.sourceSpatialReference,e.spatialReference);if(null!=t)for(const r of e.features)t(r.geometry)}createSpatialReference(){return{}}addField(e,t){const r=e.fields;(0,S.Lw)(r),r.push(t);const i=r.map((e=>e.name));this._attributesConstructor=function(){for(const e of i)this[e]=null}}addFeature(e,t){e.features.push(t)}prepareFeatures(e){switch(this._transform=e.transform,this._options.applyTransform&&e.transform&&(this._applyTransform=this._deriveApplyTransform(e)),this._mValueOffset=null,this._vertexDimension=2,e.hasZ&&this._vertexDimension++,e.hasM&&(this._mValueOffset=this._vertexDimension,this._vertexDimension++),e.geometryType){case"esriGeometryPoint":this.addCoordinate=(e,t,r)=>this.addCoordinatePoint(e,t,r),this.createGeometry=e=>this.createPointGeometry(e);break;case"esriGeometryPolygon":this.addCoordinate=(e,t,r)=>this._addCoordinatePolygon(e,t,r),this.createGeometry=e=>this._createPolygonGeometry(e);break;case"esriGeometryPolyline":this.addCoordinate=(e,t,r)=>this._addCoordinatePolyline(e,t,r),this.createGeometry=e=>this._createPolylineGeometry(e);break;case"esriGeometryMultipoint":this.addCoordinate=(e,t,r)=>this._addCoordinateMultipoint(e,t,r),this.createGeometry=e=>this._createMultipointGeometry(e)}}createFeature(){return this._lengths.length=0,this._currentLengthIndex=0,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0,this._coordinateBuffer=null,this._coordinateBufferPtr=0,{attributes:new this._attributesConstructor}}allocateCoordinates(){}addLength(e,t,r){0===this._lengths.length&&(this._toAddInCurrentPath=t),this._lengths.push(t)}addQueryGeometry(e,t){const{queryGeometry:r,queryGeometryType:i}=t,s=this._transform?(0,I.Ch)(r.clone(),r,!1,!1,this._transform):r.clone(),n=(0,I.zv)(s,i,!1,!1);e.queryGeometryType=i,e.queryGeometry={...n}}createPointGeometry(e){const t={x:0,y:0,spatialReference:e.spatialReference};return e.hasZ&&(t.z=0),e.hasM&&(t.m=0),t}addCoordinatePoint(e,t,r){const i=this._transform;switch(t=this._applyTransform(i,t,r,0),r){case 0:e.x=t;break;case 1:e.y=t;break;case 2:"z"in e?e.z=t:e.m=t;break;case 3:e.m=t}}_transformPathLikeValue(e,t){let r=0;t<=1&&(r=this._previousCoordinate[t],this._previousCoordinate[t]+=e);const i=this._transform;return null!==this._mValueOffset&&0===e&&t>0&&!(t%this._mValueOffset)?0:this._applyTransform(i,e,t,r)}_addCoordinatePolyline(e,t,r){this._dehydratedAddPointsCoordinate(e.paths,t,r)}_addCoordinatePolygon(e,t,r){this._dehydratedAddPointsCoordinate(e.rings,t,r)}_addCoordinateMultipoint(e,t,r){0===r&&e.points.push([]);const i=this._transformPathLikeValue(t,r);e.points[e.points.length-1].push(i)}_createPolygonGeometry(e){return{rings:[[]],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_createPolylineGeometry(e){return{paths:[[]],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_createMultipointGeometry(e){return{points:[],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_dehydratedAddPointsCoordinate(e,t,r){0===r&&0==this._toAddInCurrentPath--&&(e.push([]),this._toAddInCurrentPath=this._lengths[++this._currentLengthIndex]-1,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0);const i=this._transformPathLikeValue(t,r),s=e[e.length-1];0===r&&(this._coordinateBufferPtr=0,this._coordinateBuffer=new Array(this._vertexDimension),s.push(this._coordinateBuffer)),this._coordinateBuffer[this._coordinateBufferPtr++]=i}_deriveApplyTransform(e){const{hasZ:t,hasM:r}=e;return t&&r?E:t?T:r?F:A}}var D=r(22671);let P=class extends s.A{constructor(e){super(e),this.dynamicDataSource=null,this.fieldsIndex=null,this.gdbVersion=null,this.infoFor3D=null,this.pbfSupported=!1,this.queryAttachmentsSupported=!1,this.sourceSpatialReference=null,this.url=null}get parsedUrl(){return(0,l.An)(this.url)}async execute(e,t){const r=await this.executeJSON(e,t);return this.featureSetFromJSON(e,r,t)}async executeJSON(e,t){const r=this._normalizeQuery(e),i=null!=e.outStatistics?.[0],s=(0,o.A)("featurelayer-pbf-statistics"),n=(!i||s)&&!0!==e.returnTrueCurves;let a;if(this.pbfSupported&&n)try{a=await async function(e,t,r){const i=(0,h.Dl)(e),s={...r},n=g.A.from(t),o=!n.quantizationParameters,{data:a}=await(0,b.IJ)(i,n,new O({sourceSpatialReference:n.sourceSpatialReference,applyTransform:o}),s);return a}(this.url,r,t)}catch(e){if("query:parsing-pbf"!==e.name)throw e;this.pbfSupported=!1}return this.pbfSupported&&n||(a=await(0,w.e)(this.url,r,t)),this._normalizeFields(a.fields),a}async featureSetFromJSON(e,t,i){if(!this._queryIs3DObjectFormat(e)||null==this.infoFor3D||!t.features)return D.A.fromJSON(t);const{meshFeatureSetFromJSON:s}=await(0,a.qr)(Promise.all([r.e(690),r.e(3030),r.e(36),r.e(5754)]).then(r.bind(r,40050)),i);return s(e,this.infoFor3D,t)}executeForCount(e,t){return(0,f.I)(this.url,this._normalizeQuery(e),t)}executeForExtent(e,t){return async function(e,t,r){const i=(0,h.Dl)(e),s=await(0,b.Jf)(i,g.A.from(t),{...r}),n=s.data.extent;return!n||isNaN(n.xmin)||isNaN(n.ymin)||isNaN(n.xmax)||isNaN(n.ymax)?{count:s.data.count,extent:null}:{count:s.data.count,extent:m.A.fromJSON(n)}}(this.url,this._normalizeQuery(e),t)}executeForIds(e,t){return(0,_.V)(this.url,this._normalizeQuery(e),t)}async executeRelationshipQuery(e,t){const[{default:i},{executeRelationshipQuery:s}]=await(0,a.qr)(Promise.all([Promise.resolve().then(r.bind(r,26591)),r.e(5257).then(r.bind(r,15257))]),t);return e=i.from(e),(this.gdbVersion||this.dynamicDataSource)&&((e=e.clone()).gdbVersion=e.gdbVersion||this.gdbVersion,e.dynamicDataSource=e.dynamicDataSource||this.dynamicDataSource),s(this.url,e,t)}async executeRelationshipQueryForCount(e,t){const[{default:i},{executeRelationshipQueryForCount:s}]=await(0,a.qr)(Promise.all([Promise.resolve().then(r.bind(r,26591)),r.e(5257).then(r.bind(r,15257))]),t);return e=i.from(e),(this.gdbVersion||this.dynamicDataSource)&&((e=e.clone()).gdbVersion=e.gdbVersion||this.gdbVersion,e.dynamicDataSource=e.dynamicDataSource||this.dynamicDataSource),s(this.url,e,t)}async executeAttachmentQuery(e,t){const{executeAttachmentQuery:i,fetchAttachments:s,processAttachmentQueryResult:n}=await(0,a.qr)(r.e(9239).then(r.bind(r,9239)),t),o=(0,h.Dl)(this.url);return n(o,await(this.queryAttachmentsSupported?i(o,e,t):s(o,e,t)))}async executeAttributeBinsQuery(e,t){const{executeAttributeBinsQuery:i}=await(0,a.qr)(Promise.all([r.e(4575),r.e(3103)]).then(r.bind(r,33103)),t);return i(this.parsedUrl,e,t)}async executeTopFeaturesQuery(e,t){const{executeTopFeaturesQuery:i}=await(0,a.qr)(r.e(1273).then(r.bind(r,11273)),t);return i(this.parsedUrl,e,this.sourceSpatialReference,t)}async executeForTopIds(e,t){const{executeForTopIds:i}=await(0,a.qr)(r.e(1277).then(r.bind(r,21277)),t);return i(this.parsedUrl,e,t)}async executeForTopExtents(e,t){const{executeForTopExtents:i}=await(0,a.qr)(r.e(8018).then(r.bind(r,8018)),t);return i(this.parsedUrl,e,t)}async executeForTopCount(e,t){const{executeForTopCount:i}=await(0,a.qr)(r.e(980).then(r.bind(r,10980)),t);return i(this.parsedUrl,e,t)}_normalizeQuery(e){let t=g.A.from(e);t.sourceSpatialReference=t.sourceSpatialReference||this.sourceSpatialReference,(this.gdbVersion||this.dynamicDataSource)&&(t=t===e?t.clone():t,t.gdbVersion=e.gdbVersion||this.gdbVersion,t.dynamicDataSource=e.dynamicDataSource?y.L.from(e.dynamicDataSource):this.dynamicDataSource);const{infoFor3D:r}=this;if(null!=r&&this._queryIs3DObjectFormat(e)){if(t=t===e?t.clone():t,t.formatOf3DObjects=(0,d.Hz)(r),!t.formatOf3DObjects)throw new n.A("query:unsupported-3d-query-formats","Could not find any supported 3D object query format. Only supported formats are 3D_glb and 3D_gltf");if(t.outSpatialReference&&!(0,p.aI)(t.outSpatialReference,this.sourceSpatialReference))throw new n.A("query:unsupported-out-spatial-reference","3D object feature services do not support projection of geometries");if(null==t.outFields||!t.outFields.includes("*")){t=t===e?t.clone():t,null==t.outFields&&(t.outFields=[]);const{originX:i,originY:s,originZ:n,translationX:o,translationY:a,translationZ:l,scaleX:u,scaleY:c,scaleZ:p,rotationX:d,rotationY:y,rotationZ:h,rotationDeg:f}=r.transformFieldRoles;t.outFields.push(i,s,n,o,a,l,u,c,p,d,y,h,f)}}return t}_normalizeFields(e){if(null!=this.fieldsIndex&&null!=e)for(const t of e){const e=this.fieldsIndex.get(t.name);e&&Object.assign(t,e.toJSON())}}_queryIs3DObjectFormat(e){return null!=this.infoFor3D&&!0===e.returnGeometry&&"xyFootprint"!==e.multipatchOption&&!e.outStatistics}};(0,i._)([(0,u.MZ)({type:y.L})],P.prototype,"dynamicDataSource",void 0),(0,i._)([(0,u.MZ)()],P.prototype,"fieldsIndex",void 0),(0,i._)([(0,u.MZ)()],P.prototype,"gdbVersion",void 0),(0,i._)([(0,u.MZ)()],P.prototype,"infoFor3D",void 0),(0,i._)([(0,u.MZ)({readOnly:!0})],P.prototype,"parsedUrl",null),(0,i._)([(0,u.MZ)()],P.prototype,"pbfSupported",void 0),(0,i._)([(0,u.MZ)()],P.prototype,"queryAttachmentsSupported",void 0),(0,i._)([(0,u.MZ)()],P.prototype,"sourceSpatialReference",void 0),(0,i._)([(0,u.MZ)({type:String})],P.prototype,"url",void 0),P=(0,i._)([(0,c.$)("esri.layers.graphics.sources.support.QueryTask")],P);const C=P},32730:(e,t,r)=>{r.d(t,{BI:()=>m,D3:()=>h,XJ:()=>f,lc:()=>y,mX:()=>g,rU:()=>b,tH:()=>I});var i=r(799);const s="__begin__",n="__end__",o=new RegExp(s,"ig"),a=new RegExp(n,"ig"),l=new RegExp("^"+s,"i"),u=new RegExp(n+"$","i"),c='"',p=c+" + ",d=" + "+c;function y(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function h(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function f(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=y(e.labelExpression),t.type="conventional"),t}function m(e){const t=f(e);switch(t.type){case"conventional":return g(t.expression);case"arcade":return t.expression}return null}function b(e){const t=f(e);switch(t.type){case"conventional":return function(e){const t=e?.match(_);return t?.[1].trim()||null}(t.expression);case"arcade":return I(t.expression)}return null}function g(e){let t;return e?(t=(0,i.HC)(e,(e=>s+'$feature["'+e+'"]'+n)),t=l.test(t)?t.replace(l,""):c+t,t=u.test(t)?t.replace(u,""):t+c,t=t.replaceAll(o,p).replaceAll(a,d)):t='""',t}const _=/^\s*\{([^}]+)\}\s*$/i,w=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,S=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,v=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function I(e){if(!e)return null;let t=w.exec(e)||S.exec(e);return t?t[1]||t[3]:(t=v.exec(e),t?t[2]:null)}},32756:(e,t,r)=>{r.d(t,{Rr:()=>l,fY:()=>c,ne:()=>u});var i=r(90237),s=r(93637),n=r(10107),o=(r(44208),r(53966),r(87811),r(40608)),a=r(91880);function l(e,t,r){if(!e)return null;const i=e.find((e=>!!e.field));if(!i)return null;const s=new a.A;return s.read(i,r),[s]}const u={type:[a.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:l},write:{writer:function(e,t,r,i){const n=e.find((e=>!!e.field));n&&(0,s.sM)(r,[n.toJSON()],t)}}}},c=e=>{let t=class extends e{constructor(){super(...arguments),this.orderBy=null}};return(0,i._)([(0,n.MZ)(u)],t.prototype,"orderBy",void 0),t=(0,i._)([(0,o.$)("esri.layers.mixins.OrderedLayer")],t),t}},33143:(e,t,r)=>{r.d(t,{A:()=>y});var i=r(90237),s=r(69540),n=r(25482),o=r(10107),a=(r(44208),r(53966),r(87811),r(36005)),l=r(40608),u=r(43937),c=r(80451),p=r(29005);let d=class extends(s.A.ClonableMixin(n.A)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,c.rS)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,i._)([(0,o.MZ)({json:{write:!0}})],d.prototype,"id",void 0),(0,i._)([(0,o.MZ)({json:{write:!0}})],d.prototype,"name",void 0),(0,i._)([(0,o.MZ)({json:{write:!0}})],d.prototype,"domains",void 0),(0,i._)([(0,a.w)("domains")],d.prototype,"readDomains",null),(0,i._)([(0,u.K)("domains")],d.prototype,"writeDomains",null),(0,i._)([(0,o.MZ)({type:[p.A],json:{write:!0}})],d.prototype,"templates",void 0),d=(0,i._)([(0,l.$)("esri.layers.support.FeatureType")],d);const y=d},33446:(e,t,r)=>{r.d(t,{C:()=>o,m:()=>n});var i=r(49186),s=r(74887);async function n(e,t,r){let n;try{n=await createImageBitmap(e)}catch(e){throw new i.A("request:server",`Unable to load ${t}`,{url:t,error:e})}return(0,s.Te)(r),n}async function o(e,t,r,n,o){let a;try{a=await createImageBitmap(e)}catch(e){throw new i.A("request:server",`Unable to load tile ${t}/${r}/${n}`,{error:e,level:t,row:r,col:n})}return(0,s.Te)(o),a}},38961:(e,t,r)=>{r.d(t,{A:()=>c});var i=r(90237),s=r(5503),n=r(36708),o=r(10107),a=r(40608),l=r(80559);let u=class extends s.A{constructor(e){super(e),this.getCollections=null}initialize(){this.addHandles((0,l.fm)((()=>this._refresh()),n.OH))}destroy(){this.getCollections=null}_refresh(){const e=null!=this.getCollections?this.getCollections():null;if(null==e)return void this.removeAll();let t=0;for(const r of e)null!=r&&(t=this._processCollection(t,r));this.splice(t,this.length)}_createNewInstance(e){return new s.A(e)}_processCollection(e,t){if(!t)return e;const r=this.itemFilterFunction??(e=>!!e);for(const i of t)if(i){if(r(i)){const t=this.indexOf(i,e);t>=0?t!==e&&this.reorder(i,e):this.add(i,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(i);if(Array.isArray(t))for(const r of t)e=this._processCollection(e,r);else e=this._processCollection(e,t)}}return e}};(0,i._)([(0,o.MZ)()],u.prototype,"getCollections",void 0),(0,i._)([(0,o.MZ)()],u.prototype,"getChildrenFunction",void 0),(0,i._)([(0,o.MZ)()],u.prototype,"itemFilterFunction",void 0),u=(0,i._)([(0,a.$)("esri.core.CollectionFlattener")],u);const c=u},39516:(e,t,r)=>{let i;async function s(){return null==i&&(i=r.e(4123).then(r.bind(r,44123)).then((e=>new e.WhereClauseCache(500,500)))),i}async function n(e,t){const r=await s(),i=r.get(e,t);if(null==i)throw r.getError(e,t);return i}function o(e,t){return e||=null,t||=null,"1=1"===e?t??e:"1=1"===t?e??t:e&&t?`(${e}) AND (${t})`:e??t}function a(e,t){return e||=null,t||=null,"1=1"===e||"1=1"===t||e===t?"1=1"===e?e:t:e&&t?`(${e}) OR (${t})`:e??t}r.d(t,{GP:()=>n,IW:()=>a,mA:()=>o})},41366:(e,t,r)=>{r.d(t,{K:()=>d,Q:()=>u});var i=r(90237),s=r(66552),n=r(53966),o=r(10107),a=(r(44208),r(87811),r(93223)),l=r(40608);const u=(0,s.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),c="percent-of-total",p="field",d=e=>{let t=class extends e{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType");const t=!!this.normalizationField,r=null!=this.normalizationTotal;return t||r?(e=t&&p||r&&c||null,t&&r&&n.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==p&&e!==c||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,i._)([(0,o.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],t.prototype,"normalizationField",void 0),(0,i._)([(0,o.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],t.prototype,"normalizationMaxValue",void 0),(0,i._)([(0,o.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],t.prototype,"normalizationMinValue",void 0),(0,i._)([(0,o.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],t.prototype,"normalizationTotal",void 0),(0,i._)([(0,a.e)(u,{name:"parameters.normalizationType"})],t.prototype,"normalizationType",null),t=(0,i._)([(0,l.$)("esri.rest.support.NormalizationBinParametersMixin")],t),t}},46140:(e,t,r)=>{r.d(t,{R:()=>s});var i=r(49186);let s=class e{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new i.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new e(this.major,this.minor,this._context)}static parse(t,r=""){const[s,n]=t.split("."),o=/^\s*\d+\s*$/;if(!s?.match||!o.test(s))throw new i.A((r&&r+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:t});if(!n?.match||!o.test(n))throw new i.A((r&&r+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:t});const a=parseInt(s,10),l=parseInt(n,10);return new e(a,l,r)}}},55674:(e,t,r)=>{r.d(t,{Ad:()=>y,Gj:()=>m,QY:()=>d,lL:()=>b,xR:()=>h});var i=r(66131),s=r(49186),n=(r(44208),r(44729)),o=r(15032),a=r(65864),l=r(95466),u=r(43668),c=r(98623);const p=["geometry","scale","timeProperties"];function d(e,t){if(null!=t)for(const r of p)t.hasArcadeDependency(r)&&e.add(r);return e}function y(e,t){return f.create(e,t,null,["$feature","$view"])}function h(e,t,r){return f.create(e,t,r,["$feature","$view","$config"])}class f{static async create(e,t,r,i){const{arcade:n,Dictionary:o}=await(0,u.l)();let a;try{a=n.parseScript(e)}catch(t){throw new s.A("arcade-bad-expression","Failed to parse arcade script",{script:e,error:t})}const l=n.scriptUsesGeometryEngine(a);l&&await n.enableGeometrySupport(),await n.loadDependentModules(new Set,a,null,!1,l);const c={vars:i.reduce(((e,t)=>({...e,[t]:null})),{}),spatialReference:t,useAsync:!1},p=n.compileScript(a,c);let d=null;null!=r&&(d=new o(r),d.immutable=!0);const y=new o;return y.immutable=!1,y.setField("scale",0),new f(e,n,a,p,t,y,d,o)}constructor(e,t,r,i,s,n,o,a){this.script=e,this._arcade=t,this._syntaxTree=r,this._compiled=i,this._spatialReference=s,this._viewDict=n,this._configDict=o,this._dictionaryCtor=a,this._dependencies=new Map,this._featureReader=new m,this._dependencies.set("geometry",t.scriptTouchesGeometry(this._syntaxTree)),this._dependencies.set("scale",this._arcade.referencesMember(this._syntaxTree,"scale")),this._dependencies.set("timeProperties",this._arcade.scriptUsesViewProperties(this._syntaxTree,["timeProperties"]))}evaluate(e,t){const r=t.$view?.timeZone;if(t.$view){let e;if(this._viewDict.setField("scale",t.$view.scale),null!=t.$view.timeProperties){const{currentStart:s,currentEnd:n}=t.$view.timeProperties;e=new this._dictionaryCtor({currentStart:null!=s?null!=r?i.lY.epochToArcadeDate(s,r):i.lY.unknownEpochToArcadeDate(s):void 0,currentEnd:null!=n?null!=r?i.lY.epochToArcadeDate(n,r):i.lY.unknownEpochToArcadeDate(n):void 0,startIncluded:!0,endIncluded:!0})}this._viewDict.setField("timeProperties",e)}return this._compiled({vars:{$view:this._viewDict,$config:this._configDict,$feature:e},spatialReference:this._spatialReference,timeZone:r})}repurposeFeature(e,t){return this._featureReader.bind(e,t,this._spatialReference),this._featureReader}references(e){return this._dependencies.get(e)??!1}}class m{constructor(){this._boundTarget=null,this._boundSchema={fields:null,fieldsIndex:null,spatialReference:null,get geometryType(){return null},get objectIdField(){return null}},this.arcadeDeclaredClass="esri.arcade.Feature",this._contextTimeZone=null}bind(e,t,r){const i=t??new l.A(b(e.attributes));this._boundTarget=e,this._boundSchema.fields=i.fields,this._boundSchema.fieldsIndex=i,this._boundSchema.spatialReference=r}_getField(e){return this._boundSchema.fieldsIndex.get(e)}get contextTimeZone(){return this._contextTimeZone}set contextTimeZone(e){this._contextTimeZone=e}readArcadeFeature(){return this}hasField(e){return this._boundSchema.fieldsIndex.has(e)}geometry(){if("fromJSON"in this._boundTarget)return this._boundTarget.geometry;const e=(0,a.rS)(this._boundTarget.geometry);if(e){if(!this._boundSchema.spatialReference)throw new Error("InternalError: Expected spatial reference to be defined");e.spatialReference=this._boundSchema.spatialReference}return e}isUnknownDateTimeField(e){return this._boundSchema.fieldsIndex.getTimeZone(e)===c.L5}field(e,t=!0){const r=this._getField(e);if(r)switch(r.type){case"date-only":case"esriFieldTypeDateOnly":return n.n.fromReader(this._boundTarget.attributes[r.name]);case"time-only":case"esriFieldTypeTimeOnly":return o.k.fromReader(this._boundTarget.attributes[r.name]);case"esriFieldTypeTimestampOffset":case"timestamp-offset":return i.lY.fromReaderAsTimeStampOffset(this._boundTarget.attributes[r.name]);case"date":case"esriFieldTypeDate":{const t=this._boundTarget.attributes[r.name];return this.isUnknownDateTimeField(e)?i.lY.unknownEpochToArcadeDate(t):i.lY.epochToArcadeDate(t,this.contextTimeZone??c.qU)}default:return this._boundTarget.attributes[r.name]}if(t)throw new Error(`Field ${e} does not exist`);return null}setField(e,t){throw new Error("Unable to update feature attribute values, feature is readonly")}keys(){return this._boundSchema.fieldsIndex.fields.map((e=>e.name))}castToText(e=!1){return JSON.stringify(this._boundTarget)}gdbVersion(){return null}fullSchema(){return this._boundSchema}castAsJson(e=null){return{attributes:this._boundTarget.attributes,geometry:!0===e?.keepGeometryType?this.geometry():this.geometry()?.toJSON()??null}}castAsJsonAsync(e=null,t=null){return Promise.resolve(this.castAsJson(t))}}function b(e){const t=[];for(const r in e)t.push({name:r,alias:r,type:"string"==typeof e[r]?"esriFieldTypeString":"esriFieldTypeDouble"});return t}},58501:(e,t,r)=>{r.d(t,{q:()=>s});var i=r(62815);function s(e,t,r){if(!r?.features||!r.hasZ)return;const s=(0,i.N)(r.geometryType,t,e.outSpatialReference);if(null!=s)for(const e of r.features)s(e.geometry)}},60410:(e,t,r)=>{r.d(t,{A:()=>se});var i,s=r(90237),n=r(13874),o=r(78888),a=r(5503),l=r(49186),u=r(44208),c=r(4902),p=r(4718),d=r(92474),y=r(53966),h=r(92071),f=r(39516),m=r(84952),b=r(10107),g=r(79901),_=r(36005),w=r(40608),S=r(43937),v=r(56507),I=r(35666),x=r(88620),A=r(5443),T=r(16930),F=r(50498),E=r(28132),M=r(32756),O=r(15426),D=r(33143),P=r(20437),C=r(95466),L=r(30524),R=r(46499),Z=r(39383),j=r(37352),q=r(91880),V=r(45067),G=r(22453),N=r(27733),B=r(49053),$=r(41214),k=r(2272),z=r(54546),Q=r(61956),J=r(30291),U=r(33910);function K(e){return"esriSMS"===e?.type}function Y(e,t,r){const i=this.originIdOf(t)>=(0,I.aB)(r.origin);return{ignoreOrigin:!0,allowNull:i,enabled:!!r&&"map-image"===r.layer?.type&&(r.writeSublayerStructure||i)}}function H(e,t,r){return{enabled:!!r&&"tile"===r.layer?.type&&(r.origin&&this.originIdOf(t)>=(0,I.aB)(r.origin)||this._isOverridden(t))}}function X(e,t,r){return{ignoreOrigin:!0,enabled:r&&r.writeSublayerStructure||!1}}function W(e,t,r){return{ignoreOrigin:!0,enabled:!!r?.writeSublayerStructure&&this.originIdOf(t)>I.Gr.SERVICE}}function ee(e,t,r){return{ignoreOrigin:!0,enabled:!!r&&(r.writeSublayerStructure||this.originIdOf(t)>=(0,I.aB)(r.origin))}}let te=0;const re=new Set(["layer","parent","loaded","loadStatus","loadError","loadWarnings"]);let ie=class extends((0,h.P)(c.A.IdentifiableMixin(d.A))){static{i=this}constructor(e){super(e),this.capabilities=void 0,this.maxScaleRange={minScale:0,maxScale:0},this.fields=null,this.fullExtent=null,this.geometryType=null,this.globalIdField=null,this.isTable=!1,this.legendEnabled=!0,this.objectIdField=null,this.parent=null,this.popupEnabled=!0,this.popupTemplate=null,this.relationships=null,this.sourceJSON=null,this.spatialReference=null,this.title=null,this.typeIdField=null,this.type="sublayer",this.types=null,this._lastParsedUrl=null}async load(e){return this.addResolvingPromise((async()=>{const{layer:t,url:r}=this;if(!t&&!r)throw new l.A("sublayer:missing-layer","Sublayer can't be loaded without being part of a layer",{sublayer:this});const i=t?await t.fetchSublayerInfo(this,e):(await(0,o.A)(r,{responseType:"json",query:{f:"json"},...e})).data;i&&(this.sourceJSON=i,this.read({layerDefinition:i},{origin:"service",layer:t,url:(0,k.Dl)(r)}))})()),this}readCapabilities(e,t){t=t.layerDefinition||t;const{attachment:r,operations:{supportsQuery:i,supportsQueryAttachments:s},query:{supportsFormatPBF:n,supportsOrderBy:o,supportsPagination:a},data:{supportsAttachment:l},queryRelated:u}=(0,G.S)(t,this.url);return{attachment:{supportsOrderByFields:r?.supportsOrderByFields??!1,supportsResize:r?.supportsResize??!1},exportMap:{supportsModification:!!t.canModifyLayer},operations:{supportsQuery:i,supportsQueryAttachments:s},data:{supportsAttachment:l},query:{supportsFormatPBF:n,supportsOrderBy:o,supportsPagination:a},queryRelated:u}}get defaultPopupTemplate(){return this.createPopupTemplate()}set definitionExpression(e){this._setAndNotifyLayer("definitionExpression",e)}get effectiveScaleRange(){const{minScale:e,maxScale:t}=this;return{minScale:e,maxScale:t}}readMaxScaleRange(e,t){return{minScale:(t=t.layerDefinition||t).minScale??0,maxScale:t.maxScale??0}}get fieldsIndex(){return new C.A(this.fields||[])}set floorInfo(e){this._setAndNotifyLayer("floorInfo",e)}readGlobalIdFieldFromService(e,t){if((t=t.layerDefinition||t).globalIdField)return t.globalIdField;if(t.fields)for(const e of t.fields)if("esriFieldTypeGlobalID"===e.type)return e.name}get id(){return this._get("id")??te++}set id(e){this._get("id")!==e&&(!1!==this.layer?.capabilities?.exportMap?.supportsDynamicLayers?this._set("id",e):this._logLockedError("id","capability not available 'layer.capabilities.exportMap.supportsDynamicLayers'"))}readIsTable(e,t){return"Table"===t.type}set labelingInfo(e){this._setAndNotifyLayer("labelingInfo",e)}writeLabelingInfo(e,t,r,i){e&&e.length&&(t.layerDefinition={drawingInfo:{labelingInfo:e.map((e=>e.write({},i)))}})}set labelsVisible(e){this._setAndNotifyLayer("labelsVisible",e)}set layer(e){this._set("layer",e),this.sublayers?.forEach((t=>t.layer=e))}set listMode(e){this._set("listMode",e)}set minScale(e){this._setAndNotifyLayer("minScale",e)}readMinScale(e,t){return t.minScale||t.layerDefinition?.minScale||0}set maxScale(e){this._setAndNotifyLayer("maxScale",e)}readMaxScale(e,t){return t.maxScale||t.layerDefinition?.maxScale||0}readObjectIdFieldFromService(e,t){if((t=t.layerDefinition||t).objectIdField)return t.objectIdField;const r=t.fields?.find((e=>"esriFieldTypeOID"===e.type));return r?.name}set opacity(e){this._setAndNotifyLayer("opacity",e)}readOpacity(e,t){const{layerDefinition:r}=t;return 1-.01*(r?.transparency??r?.drawingInfo?.transparency??0)}writeOpacity(e,t,r,i){t.layerDefinition={drawingInfo:{transparency:100-100*e}}}set orderBy(e){this._setAndNotifyLayer("orderBy",e)}writeParent(e,t){this.parent&&this.parent!==this.layer?t.parentLayerId=(0,v.Vr)(this.parent.id):t.parentLayerId=-1}get queryTask(){if(!this.layer)return null;const{capabilities:e,fieldsIndex:t,layer:r,url:i}=this,{spatialReference:s}=r,n="gdbVersion"in r?r.gdbVersion:void 0,o=(0,u.A)("featurelayer-pbf")&&e?.query.supportsFormatPBF;return new E.A({fieldsIndex:t,gdbVersion:n,pbfSupported:o,queryAttachmentsSupported:e?.operations?.supportsQueryAttachments??!1,sourceSpatialReference:s,url:i})}set renderer(e){if((0,L.yp)(e,this.fieldsIndex),e)for(const t of e.symbols)if((0,U.wk)(t)){y.A.getLogger(this).warn("Sublayer renderer should use 2D symbols");break}this._setAndNotifyLayer("renderer",e)}get source(){return this._get("source")||new B.f({mapLayerId:this.id})}set source(e){this._setAndNotifyLayer("source",e)}set sublayers(e){this._handleSublayersChange(e,this._get("sublayers")),this._set("sublayers",e)}castSublayers(e){return(0,v.dp)(a.A.ofType(i),e)}writeSublayers(e,t,r){this.sublayers?.length&&(t[r]=this.sublayers.map((e=>e.id)).toArray().reverse())}readTitle(e,t){return t.layerDefinition?.name??t.name}readTypeIdField(e,t){let r=(t=t.layerDefinition||t).typeIdField;if(r&&t.fields){r=r.toLowerCase();const e=t.fields.find((e=>e.name.toLowerCase()===r));e&&(r=e.name)}return r}get url(){const e=this.layer?.parsedUrl??this._lastParsedUrl,t=this.source;if(!e)return null;if(this._lastParsedUrl=e,"map-layer"===t?.type)return`${e.path}/${t.mapLayerId}`;const r={layer:JSON.stringify({source:this.source})};return`${e.path}/dynamicLayer?${(0,m.x0)(r)}`}set url(e){this._overrideIfSome("url",e)}set visible(e){this._setAndNotifyLayer("visible",e)}writeVisible(e,t,r,i){t[r]=this.getAtOrigin("defaultVisibility","service")||e}clone(){const{store:e}=(0,x.oY)(this),t=new i;return(0,x.oY)(t).store=e.clone(re),this.commitProperty("url"),t._lastParsedUrl=this._lastParsedUrl,t}createPopupTemplate(e){return(0,J.tn)(this,e)}createQuery(){return new Q.A({returnGeometry:!0,where:this.definitionExpression||"1=1"})}async createFeatureLayer(){if(this.hasOwnProperty("sublayers"))return null;const e=(await Promise.all([r.e(9953),r.e(3029),r.e(8506),r.e(3600),r.e(3186)]).then(r.bind(r,13600))).default,{layer:t,url:i}=this;let s;if(i&&this.originIdOf("url")>I.Gr.SERVICE)s=new e({url:i});else{if(!t?.parsedUrl)throw new l.A("createFeatureLayer:missing-information","Cannot create a FeatureLayer without a url or a parent layer");{const r=t.parsedUrl;s=new e({url:r.path}),r&&this.source&&("map-layer"===this.source.type?s.layerId=this.source.mapLayerId:s.dynamicDataSource=this.source)}}return null!=t?.refreshInterval&&(s.refreshInterval=t.refreshInterval),this.definitionExpression&&(s.definitionExpression=this.definitionExpression),this.floorInfo&&(s.floorInfo=(0,p.o8)(this.floorInfo)),this.originIdOf("labelingInfo")>I.Gr.SERVICE&&(s.labelingInfo=(0,p.o8)(this.labelingInfo)),this.originIdOf("labelsVisible")>I.Gr.DEFAULTS&&(s.labelsVisible=this.labelsVisible),this.originIdOf("legendEnabled")>I.Gr.DEFAULTS&&(s.legendEnabled=this.legendEnabled),this.originIdOf("visible")>I.Gr.DEFAULTS&&(s.visible=this.visible),this.originIdOf("minScale")>I.Gr.DEFAULTS&&(s.minScale=this.minScale),this.originIdOf("maxScale")>I.Gr.DEFAULTS&&(s.maxScale=this.maxScale),this.originIdOf("opacity")>I.Gr.DEFAULTS&&(s.opacity=this.opacity),this.originIdOf("popupTemplate")>I.Gr.DEFAULTS&&(s.popupTemplate=(0,p.o8)(this.popupTemplate)),this.originIdOf("renderer")>I.Gr.SERVICE&&(s.renderer=(0,p.o8)(this.renderer)),"data-layer"===this.source?.type&&(s.dynamicDataSource=this.source.clone()),this.originIdOf("title")>I.Gr.DEFAULTS&&(s.title=this.title),"map-image"===t?.type&&t.originIdOf("customParameters")>I.Gr.DEFAULTS&&(s.customParameters=t.customParameters),"tile"===t?.type&&t.originIdOf("customParameters")>I.Gr.DEFAULTS&&(s.customParameters=t.customParameters),s}getField(e){return this.fieldsIndex.get(e)}getFeatureType(e){return(0,O.xd)(this.types,this.typeIdField,e)}getFieldDomain(e,t){const r=t?.feature,i=this.getFeatureType(r);if(i){const t=i.domains&&i.domains[e];if(t&&"inherited"!==t.type)return t}return this._getLayerDomain(e)}async queryAttachments(e,t){await this.load(),e=z.A.from(e);const r=this.capabilities;if(!r?.data?.supportsAttachment)throw new l.A("queryAttachments:not-supported","this layer doesn't support attachments");const{attachmentTypes:i,objectIds:s,globalIds:n,num:o,size:a,start:u,where:c}=e;if(!r?.operations?.supportsQueryAttachments&&(i?.length>0||n?.length>0||a?.length>0||o||u||c))throw new l.A("queryAttachments:option-not-supported","when 'capabilities.operations.supportsQueryAttachments' is false, only objectIds is supported",e);if(!(s?.length||n?.length||c))throw new l.A("queryAttachments:invalid-query","'objectIds', 'globalIds', or 'where' are required to perform attachment query",e);return!r?.attachment?.supportsOrderByFields&&e.orderByFields?.length&&((e=e.clone()).orderByFields=null),this.queryTask.executeAttachmentQuery(e,t)}async queryFeatureCount(e=this.createQuery(),t){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new l.A("queryFeatureCount:not-supported","this layer doesn't support queries.");if(!this.url)throw new l.A("queryFeatureCount:not-supported","this layer has no url.");const r=this.layer?.apiKey;return await this.queryTask.executeForCount(e,{...t,query:{...this.layer?.customParameters,token:r}})}async queryFeatures(e=this.createQuery(),t){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new l.A("queryFeatures:not-supported","this layer doesn't support queries.");if(!this.url)throw new l.A("queryFeatures:not-supported","this layer has no url.");const r=await this.queryTask.execute(e,{...t,query:{...this.layer?.customParameters,token:this.layer?.apiKey}});if(r?.features)for(const e of r.features)e.sourceLayer=this;return r}async queryObjectIds(e=this.createQuery(),t){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new l.A("queryObjectIds:not-supported","this layer doesn't support queries.");if(!this.url)throw new l.A("queryObjectIds:not-supported","this layer has no url.");const r=this.layer?.apiKey;return await this.queryTask.executeForIds(e,{...t,query:{...this.layer?.customParameters,token:r}})}async queryRelatedFeatures(e,t){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new l.A("queryRelatedFeatures:not-supported","this layer doesn't support queries.");if(!this.url)throw new l.A("queryRelatedFeatures:not-supported","this layer has no url.");const r=this.layer?.apiKey;return await this.queryTask.executeRelationshipQuery(e,{...t,query:{...this.layer?.customParameters,token:r}})}async queryRelatedFeaturesCount(e,t){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new l.A("queryRelatedFeaturesCount:not-supported","this layer doesn't support queries.");if(!this.capabilities.queryRelated.supportsCount)throw new l.A("queryRelatedFeaturesCount:not-supported","this layer doesn't support query related counts.");if(!this.url)throw new l.A("queryRelatedFeaturesCount:not-supported","this layer has no url.");const r=this.layer?.apiKey;return await this.queryTask.executeRelationshipQueryForCount(e,{...t,query:{...this.layer?.customParameters,token:r}})}toExportImageJSON(e){const t={id:this.id,source:this.source?.toJSON()||{mapLayerId:this.id,type:"mapLayer"}},r=(0,f.mA)(e,this.definitionExpression);null!=r&&(t.definitionExpression=r);const i=["renderer","labelingInfo","opacity","labelsVisible"].reduce(((e,t)=>(e[t]=this.originIdOf(t),e)),{}),s=Object.keys(i).some((e=>i[e]>I.Gr.SERVICE));if(s){const e=t.drawingInfo={};if(i.renderer>I.Gr.SERVICE&&(e.renderer=this.renderer?this.renderer.toJSON():null),i.labelsVisible>I.Gr.SERVICE&&(e.showLabels=this.labelsVisible),this.labelsVisible&&i.labelingInfo>I.Gr.SERVICE)if(this.labelingInfo){!this.loaded&&this.labelingInfo?.some((e=>!e.labelPlacement))&&y.A.getLogger(this).warnOnce(`A Sublayer (title: ${this.title}, id: ${this.id}) has an undefined 'labelPlacement' and so labels cannot be displayed. Either define a valid 'labelPlacement' or call Sublayer.load() to use a default value based on geometry type.`,{sublayer:this});let t=this.labelingInfo;null!=this.geometryType&&(t=(0,Z.z)(this.labelingInfo,F.gy.toJSON(this.geometryType))),e.showLabels=!0,e.labelingInfo=t.filter((e=>e.labelPlacement)).map((e=>e.toJSON({origin:"service",layer:this.layer})))}else e.showLabels=!1;i.opacity>I.Gr.SERVICE&&(e.transparency=100-100*this.opacity),this._assignDefaultSymbolColors(e.renderer)}return(this.layer?.capabilities?.exportMap?.supportsSublayerOrderBy??!1)&&this.originIdOf("orderBy")>I.Gr.SERVICE&&(t.orderBy=this.orderBy?.map((e=>e.toJSON()))??null),t}_assignDefaultSymbolColors(e){this._forEachSimpleMarkerSymbols(e,(e=>{e.color||"esriSMSX"!==e.style&&"esriSMSCross"!==e.style||(e.outline?.color?e.color=e.outline.color:e.color=[0,0,0,0])}))}_forEachSimpleMarkerSymbols(e,t){if(e){const r=("uniqueValueInfos"in e?e.uniqueValueInfos:"classBreakInfos"in e?e.classBreakInfos:null)??[];for(const e of r)K(e.symbol)&&t(e.symbol);"symbol"in e&&K(e.symbol)&&t(e.symbol),"defaultSymbol"in e&&K(e.defaultSymbol)&&t(e.defaultSymbol)}}_setAndNotifyLayer(e,t){const r=this.layer,i=this._get(e);let s,n;switch(e){case"definitionExpression":case"floorInfo":s="supportsSublayerDefinitionExpression";break;case"minScale":case"maxScale":case"visible":s="supportsSublayerVisibility";break;case"labelingInfo":case"labelsVisible":case"opacity":case"renderer":case"source":s="supportsDynamicLayers",n="supportsModification";break;case"orderBy":s="supportsSublayerOrderBy",n="supportsModification"}const o=(0,x.oY)(this).getDefaultOrigin();if("service"!==o){if(s&&!1===this.layer?.capabilities?.exportMap?.[s])return void this._logLockedError(e,`capability not available 'layer.capabilities.exportMap.${s}'`);if(n&&!1===this.capabilities?.exportMap[n])return void this._logLockedError(e,`capability not available 'capabilities.exportMap.${n}'`)}"source"!==e||"not-loaded"===this.loadStatus?(this._set(e,t),"service"!==o&&i!==t&&r&&r.emit&&r.emit("sublayer-update",{propertyName:e,target:this})):this._logLockedError(e,"'source' can't be changed after calling sublayer.load()")}_handleSublayersChange(e,t){t&&(t.forEach((e=>{e.parent=null,e.layer=null})),this.removeAllHandles()),e&&(e.forEach((e=>{e.parent=this,e.layer=this.layer})),this.addHandles([e.on("after-add",(({item:e})=>{e.parent=this,e.layer=this.layer})),e.on("after-remove",(({item:e})=>{e.parent=null,e.layer=null})),e.on("before-changes",(e=>{(this.layer?.capabilities?.exportMap?.supportsSublayersChanges??1)||(y.A.getLogger(this).error(new l.A("sublayer:sublayers-non-modifiable","Sublayer can't be added, moved, or removed from the layer's sublayers",{sublayer:this,layer:this.layer})),e.preventDefault())}))]))}_logLockedError(e,t){const{layer:r,declaredClass:i}=this;y.A.getLogger(i).error(new l.A("sublayer:locked",`Property '${String(e)}' can't be changed on Sublayer from the layer '${r?.id}'`,{reason:t,sublayer:this,layer:r}))}_getLayerDomain(e){return this.fieldsIndex.get(e)?.domain??null}static{this.test={isMapImageLayerOverridePolicy:e=>e===W||e===X||e===Y,isTileImageLayerOverridePolicy:e=>e===H}}};(0,s._)([(0,b.MZ)({readOnly:!0})],ie.prototype,"capabilities",void 0),(0,s._)([(0,_.w)("service","capabilities",["layerDefinition.canModifyLayer","layerDefinition.capabilities"])],ie.prototype,"readCapabilities",null),(0,s._)([(0,b.MZ)()],ie.prototype,"defaultPopupTemplate",null),(0,s._)([(0,b.MZ)({type:String,value:null,json:{name:"layerDefinition.definitionExpression",write:{allowNull:!0,overridePolicy:Y}}})],ie.prototype,"definitionExpression",null),(0,s._)([(0,b.MZ)({readOnly:!0})],ie.prototype,"effectiveScaleRange",null),(0,s._)([(0,_.w)("service","maxScaleRange",["minScale","maxScale"])],ie.prototype,"readMaxScaleRange",null),(0,s._)([(0,b.MZ)({type:[P.A],json:{origins:{service:{read:{source:"layerDefinition.fields"}}}}})],ie.prototype,"fields",void 0),(0,s._)([(0,b.MZ)({readOnly:!0})],ie.prototype,"fieldsIndex",null),(0,s._)([(0,b.MZ)({type:j.A,value:null,json:{name:"layerDefinition.floorInfo",read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo",overridePolicy:Y},origins:{"web-scene":{read:!1,write:!1}}}})],ie.prototype,"floorInfo",null),(0,s._)([(0,b.MZ)({type:A.A,json:{read:{source:"layerDefinition.extent"}}})],ie.prototype,"fullExtent",void 0),(0,s._)([(0,b.MZ)({type:F.gy.apiValues,json:{origins:{service:{name:"layerDefinition.geometryType",read:{reader:F.gy.read}}}}})],ie.prototype,"geometryType",void 0),(0,s._)([(0,b.MZ)({type:String})],ie.prototype,"globalIdField",void 0),(0,s._)([(0,_.w)("service","globalIdField",["layerDefinition.globalIdField","layerDefinition.fields"])],ie.prototype,"readGlobalIdFieldFromService",null),(0,s._)([(0,b.MZ)({type:v.jz,json:{write:{ignoreOrigin:!0}}})],ie.prototype,"id",null),(0,s._)([(0,b.MZ)({readOnly:!0})],ie.prototype,"isTable",void 0),(0,s._)([(0,_.w)("service","isTable",["type"])],ie.prototype,"readIsTable",null),(0,s._)([(0,b.MZ)({value:null,type:[R.A],json:{read:{source:"layerDefinition.drawingInfo.labelingInfo"},write:{target:"layerDefinition.drawingInfo.labelingInfo",overridePolicy:W}}})],ie.prototype,"labelingInfo",null),(0,s._)([(0,S.K)("labelingInfo")],ie.prototype,"writeLabelingInfo",null),(0,s._)([(0,b.MZ)({type:Boolean,value:!0,json:{read:{source:"layerDefinition.drawingInfo.showLabels"},write:{target:"layerDefinition.drawingInfo.showLabels",overridePolicy:X}}})],ie.prototype,"labelsVisible",null),(0,s._)([(0,b.MZ)({value:null})],ie.prototype,"layer",null),(0,s._)([(0,b.MZ)({type:String,json:{write:{overridePolicy:H}}})],ie.prototype,"layerItemId",void 0),(0,s._)([(0,b.MZ)({type:Boolean,value:!0,json:{origins:{service:{read:{enabled:!1}}},read:{source:"showLegend"},write:{target:"showLegend",overridePolicy:ee}}})],ie.prototype,"legendEnabled",void 0),(0,s._)([(0,b.MZ)({type:["show","hide","hide-children"],value:"show",json:{read:!1,write:!1,origins:{"web-scene":{read:!0,write:!0}}}})],ie.prototype,"listMode",null),(0,s._)([(0,b.MZ)({type:Number,value:0,json:{write:{overridePolicy:X}}})],ie.prototype,"minScale",null),(0,s._)([(0,_.w)("minScale",["minScale","layerDefinition.minScale"])],ie.prototype,"readMinScale",null),(0,s._)([(0,b.MZ)({type:Number,value:0,json:{write:{overridePolicy:X}}})],ie.prototype,"maxScale",null),(0,s._)([(0,_.w)("maxScale",["maxScale","layerDefinition.maxScale"])],ie.prototype,"readMaxScale",null),(0,s._)([(0,b.MZ)()],ie.prototype,"objectIdField",void 0),(0,s._)([(0,_.w)("service","objectIdField",["layerDefinition.objectIdField","layerDefinition.fields"])],ie.prototype,"readObjectIdFieldFromService",null),(0,s._)([(0,b.MZ)({type:Number,value:1,json:{write:{target:"layerDefinition.drawingInfo.transparency",overridePolicy:X}}})],ie.prototype,"opacity",null),(0,s._)([(0,_.w)("opacity",["layerDefinition.drawingInfo.transparency","layerDefinition.transparency"])],ie.prototype,"readOpacity",null),(0,s._)([(0,S.K)("opacity")],ie.prototype,"writeOpacity",null),(0,s._)([(0,b.MZ)({value:null,type:[q.A],json:{name:"layerDefinition.orderBy",read:{reader:M.Rr}}})],ie.prototype,"orderBy",null),(0,s._)([(0,b.MZ)({json:{type:v.jz,write:{target:"parentLayerId",writerEnsuresNonNull:!0,overridePolicy:X}}})],ie.prototype,"parent",void 0),(0,s._)([(0,S.K)("parent")],ie.prototype,"writeParent",null),(0,s._)([(0,b.MZ)({type:Boolean,value:!0,json:{read:{source:"disablePopup",reader:(e,t)=>!t.disablePopup},write:{target:"disablePopup",overridePolicy:ee,writer(e,t,r){t[r]=!e}}}})],ie.prototype,"popupEnabled",void 0),(0,s._)([(0,b.MZ)({type:n.A,json:{read:{source:"popupInfo"},write:{target:"popupInfo",overridePolicy:ee}}})],ie.prototype,"popupTemplate",void 0),(0,s._)([(0,b.MZ)({readOnly:!0})],ie.prototype,"queryTask",null),(0,s._)([(0,b.MZ)({type:[V.A],readOnly:!0,json:{origins:{service:{read:{source:"layerDefinition.relationships"}}}}})],ie.prototype,"relationships",void 0),(0,s._)([(0,b.MZ)({types:$.Hg,value:null,json:{name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:W},origins:{"web-scene":{types:$.XJ,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:W}}}}})],ie.prototype,"renderer",null),(0,s._)([(0,b.MZ)({types:{key:"type",base:null,typeMap:{"data-layer":N.L,"map-layer":B.f}},cast(e){if(e){if("mapLayerId"in e)return(0,v.PZ)(B.f,e);if("dataSource"in e)return(0,v.PZ)(N.L,e)}return e},json:{name:"layerDefinition.source",write:{overridePolicy:X}}})],ie.prototype,"source",null),(0,s._)([(0,b.MZ)()],ie.prototype,"sourceJSON",void 0),(0,s._)([(0,b.MZ)({type:T.A,json:{origins:{service:{read:{source:"layerDefinition.extent.spatialReference"}}}}})],ie.prototype,"spatialReference",void 0),(0,s._)([(0,b.MZ)({value:null,json:{type:[v.jz],write:{target:"subLayerIds",allowNull:!0,overridePolicy:X}}})],ie.prototype,"sublayers",null),(0,s._)([(0,g.w)("sublayers")],ie.prototype,"castSublayers",null),(0,s._)([(0,S.K)("sublayers")],ie.prototype,"writeSublayers",null),(0,s._)([(0,b.MZ)({type:String,json:{name:"name",write:{overridePolicy:ee}}})],ie.prototype,"title",void 0),(0,s._)([(0,_.w)("service","title",["name","layerDefinition.name"])],ie.prototype,"readTitle",null),(0,s._)([(0,b.MZ)({type:String})],ie.prototype,"typeIdField",void 0),(0,s._)([(0,b.MZ)({json:{read:!1},readOnly:!0,value:"sublayer"})],ie.prototype,"type",void 0),(0,s._)([(0,_.w)("typeIdField",["layerDefinition.typeIdField"])],ie.prototype,"readTypeIdField",null),(0,s._)([(0,b.MZ)({type:[D.A],json:{origins:{service:{read:{source:"layerDefinition.types"}}}}})],ie.prototype,"types",void 0),(0,s._)([(0,b.MZ)({type:String,json:{name:"layerUrl",write:{overridePolicy:H}}})],ie.prototype,"url",null),(0,s._)([(0,b.MZ)({type:Boolean,value:!0,json:{read:{source:"defaultVisibility"},write:{target:"defaultVisibility",overridePolicy:X}}})],ie.prototype,"visible",null),(0,s._)([(0,S.K)("visible")],ie.prototype,"writeVisible",null),ie=i=(0,s._)([(0,w.$)("esri.layers.support.Sublayer")],ie);const se=ie},63389:(e,t,r)=>{r.d(t,{Sk:()=>n,Zx:()=>s,_X:()=>a});var i=r(35666);function s(e,t,r){const i=t.flatten((({sublayers:e})=>e)).length;return i!==e.length||!!e.some((e=>e.originIdOf("minScale")>r||e.originIdOf("maxScale")>r||e.originIdOf("renderer")>r||e.originIdOf("labelingInfo")>r||e.originIdOf("opacity")>r||e.originIdOf("labelsVisible")>r||e.originIdOf("source")>r))||!o(e,t)}function n(e,t,r){return!!e.some((e=>{const t=e.source,s=!t||"map-layer"===t.type&&t.mapLayerId===e.id&&(null==t.gdbVersion||t.gdbVersion===r);e.commitProperty("renderer"),e.commitProperty("labelingInfo"),e.commitProperty("opacity"),e.commitProperty("labelsVisible"),e.commitProperty("orderBy");const n=e.layer?.capabilities?.exportMap?.supportsSublayerOrderBy??!1;return!s||e.originIdOf("renderer")>i.Gr.SERVICE||e.originIdOf("labelingInfo")>i.Gr.SERVICE||e.originIdOf("opacity")>i.Gr.SERVICE||e.originIdOf("labelsVisible")>i.Gr.SERVICE||n&&e.originIdOf("orderBy")>i.Gr.SERVICE}))||!o(e,t)}function o(e,t){if(!e?.length||null==t)return!0;const r=t.slice().reverse().flatten((({sublayers:e})=>e&&e.toArray().reverse())).map((e=>e.id)).toArray();if(e.length>r.length)return!1;let i=0;const s=r.length;for(const{id:t}of e){for(;i<s&&r[i]!==t;)i++;if(i>=s)return!1}return!0}function a(e){return!!e&&e.some((e=>null!=e.minScale||null!=e.layerDefinition?.minScale))}},73681:(e,t,r)=>{r.d(t,{n:()=>l});var i=r(49186),s=r(53966),n=r(46140),o=r(95466),a=r(55674);class l{static async from(e,t,r){const o=e.dictionary_version?n.R.parse(e.dictionary_version):null,c=new Set(e.itemsNames),p={};if(t)for(const e in t)p[e]=t[e];if(e.authoringInfo.configuration)for(const t of e.authoringInfo.configuration)p.hasOwnProperty(t.name)||(p[t.name]=t.value);const d=new Set(e.authoringInfo.symbol);for(const e of Object.keys(r))d.delete(e);d.size&&s.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("missing-fields: fieldMap entries for the following symbol fields are missing",{symbolFields:d});const y=await(0,a.xR)(e.expression,null,p);if(!y)throw new i.A("Unable to create dictionary renderer expression");const h=!o||!o.greaterEqual(4,0);h&&s.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("Dictionary script does not support native field types. Applying fallback",{version:o});const f=new u(r,h);return new l(h,c,y,f)}constructor(e,t,r,i){this._requiresFieldCoercionToString=e,this._itemNames=t,this._compiled=r,this._reader=i}get itemNames(){return this._itemNames}evaluate(e,t,r,i){try{return this._reader.bind(e,r,i),this._compiled.evaluate(this._reader,{$view:{scale:t}})}catch(e){s.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("arcade: dictionary script evaluation failed",{error:e})}return null}createDictionaryFieldsIndex(e){if(!this._requiresFieldCoercionToString)return new o.A(e);const t=e.map((e=>({...e,type:"esriFieldTypeString"})));return new o.A(t)}}class u extends a.Gj{constructor(e,t){super(),this._fieldMap=e,this._requiresFieldCoercionToString=t}_getField(e){const t=this._fieldMap[e]??e;return this._boundSchema.fieldsIndex.get(t)}field(e){if(!this._requiresFieldCoercionToString)return super.field(e,!1);const t=this._getField(e);return null==t?"":""+this._boundTarget.attributes[t.name]}}},81583:(e,t,r)=>{r.d(t,{L:()=>a,g:()=>o});var i=r(60999),s=r(5503),n=r(92474);async function o(e,t){return await e.load(),a(e,t)}async function a(e,t){const r=[],o=(...e)=>{for(const t of e)null!=t&&(Array.isArray(t)?o(...t):s.A.isCollection(t)?t.forEach((e=>o(e))):n.A.isLoadable(t)&&r.push(t))};t(o);let a=null;if(await(0,i.Tj)(r,(async e=>{const t=await(0,i.Ke)(function(e){return"loadAll"in e&&"function"==typeof e.loadAll}(e)?e.loadAll():e.load());!1!==t.ok||a||(a=t)})),a)throw a.error;return e}},91880:(e,t,r)=>{r.d(t,{A:()=>p});var i,s=r(90237),n=r(66552),o=r(25482),a=r(10107),l=(r(44208),r(53966),r(87811),r(40608));const u=new n.J({asc:"ascending",desc:"descending"});let c=class extends o.A{static{i=this}constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new i({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,s._)([(0,a.MZ)({type:String,json:{write:!0}})],c.prototype,"field",void 0),(0,s._)([(0,a.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],c.prototype,"valueExpression",void 0),(0,s._)([(0,a.MZ)({type:u.apiValues,json:{type:u.jsonValues,read:u.read,write:u.write}})],c.prototype,"order",void 0),c=i=(0,s._)([(0,l.$)("esri.layers.support.OrderByInfo")],c);const p=c},91921:(e,t,r)=>{r.d(t,{I:()=>b});var i=r(90237),s=r(5503),n=r(38961),o=r(49186),a=r(53966),l=r(36708),u=r(10107),c=(r(44208),r(87811),r(88620)),p=r(40608),d=r(35666),y=r(60410),h=r(63389);const f=s.A.ofType(y.A);function m(e,t){e&&e.forEach((e=>{t(e),e.sublayers&&e.sublayers.length&&m(e.sublayers,t)}))}const b=e=>{let t=class extends e{constructor(...e){super(...e),this.allSublayers=new n.A({getCollections:()=>[this.sublayers],getChildrenFunction:e=>e.sublayers}),this.sublayersSourceJSON={[d.Gr.SERVICE]:{},[d.Gr.PORTAL_ITEM]:{},[d.Gr.WEB_SCENE]:{},[d.Gr.WEB_MAP]:{},[d.Gr.LINK_CHART]:{}},this.subtables=null,this.addHandles([(0,l.wB)((()=>this.sublayers),((e,t)=>this._handleSublayersChange(e,t)),l.OH),(0,l.wB)((()=>this.subtables),((e,t)=>this._handleSublayersChange(e,t)),l.OH)])}destroy(){this.allSublayers.destroy()}readSublayers(e,t){if(!t||!e)return;const{sublayersSourceJSON:r}=this,i=(0,d.aB)(t.origin);if(i<d.Gr.SERVICE)return;if(r[i]={context:t,visibleLayers:e.visibleLayers||r[i].visibleLayers,layers:e.layers||r[i].layers},i>d.Gr.SERVICE)return;this._set("serviceSublayers",this.createSublayersForOrigin("service").sublayers);const{sublayers:s,origin:n}=this.createSublayersForOrigin("web-document"),o=(0,c.oY)(this);o.setDefaultOrigin(n),this._set("sublayers",new f(s)),o.setDefaultOrigin("user")}findSublayerById(e){return this.allSublayers.find((t=>t.id===e))}createServiceSublayers(){return this.createSublayersForOrigin("service").sublayers}createSublayersForOrigin(e){const t=(0,d.aB)("web-document"===e?"web-map":e);let r=d.Gr.SERVICE,i=this.sublayersSourceJSON[d.Gr.SERVICE].layers,s=this.sublayersSourceJSON[d.Gr.SERVICE].context,n=null;const o=[d.Gr.PORTAL_ITEM,d.Gr.WEB_SCENE,d.Gr.WEB_MAP].filter((e=>e<=t));for(const e of o){const t=this.sublayersSourceJSON[e];(0,h._X)(t.layers)&&(r=e,i=t.layers,s=t.context,t.visibleLayers&&(n={visibleLayers:t.visibleLayers,context:t.context}))}const a=[d.Gr.PORTAL_ITEM,d.Gr.WEB_SCENE,d.Gr.WEB_MAP].filter((e=>e>r&&e<=t));let l=null;for(const e of a){const{layers:t,visibleLayers:r,context:i}=this.sublayersSourceJSON[e];t&&(l={layers:t,context:i}),r&&(n={visibleLayers:r,context:i})}const u=function(e,t){const r=[],i={};return e?(e.forEach((e=>{const s=new y.A;if(s.read(e,t),i[s.id]=s,null!=e.parentLayerId&&-1!==e.parentLayerId){const t=i[e.parentLayerId];t.sublayers||(t.sublayers=[]),t.sublayers.unshift(s)}else r.unshift(s)})),r):r}(i,s),c=new Map,p=new Set;if(l)for(const e of l.layers)c.set(e.id,e);if(n?.visibleLayers)for(const e of n.visibleLayers)p.add(e);return m(u,(e=>{l&&e.read(c.get(e.id),l.context),n&&e.read({defaultVisibility:p.has(e.id)},n.context)})),{origin:(0,d.OL)(r),sublayers:new f({items:u})}}read(e,t){super.read(e,t),this.readSublayers(e,t)}_handleSublayersChange(e,t){t&&(t.forEach((e=>{e.parent=null,e.layer=null})),this.removeHandles("sublayers-owner")),e&&(e.forEach((e=>{e.parent=this,e.layer=this})),this.addHandles([e.on("after-add",(({item:e})=>{e.parent=this,e.layer=this})),e.on("after-remove",(({item:e})=>{e.parent=null,e.layer=null}))],"sublayers-owner"),"tile"===this.type&&this.addHandles(e.on("before-changes",(e=>{a.A.getLogger("esri.layers.TileLayer").error(new o.A("tilelayer:sublayers-non-modifiable","ISublayer can't be added, moved, or removed from the layer's sublayers",{layer:this})),e.preventDefault()})),"sublayers-owner"))}};return(0,i._)([(0,u.MZ)({readOnly:!0})],t.prototype,"allSublayers",void 0),(0,i._)([(0,u.MZ)({readOnly:!0,type:s.A.ofType(y.A)})],t.prototype,"serviceSublayers",void 0),(0,i._)([(0,u.MZ)({value:null,type:f,json:{read:!1,write:{allowNull:!0,ignoreOrigin:!0}}})],t.prototype,"sublayers",void 0),(0,i._)([(0,u.MZ)({readOnly:!0})],t.prototype,"sublayersSourceJSON",void 0),(0,i._)([(0,u.MZ)({type:f,json:{read:{source:"tables"}}})],t.prototype,"subtables",void 0),t=(0,i._)([(0,p.$)("esri.layers.mixins.SublayersOwner")],t),t}},98534:(e,t,r)=>{r.d(t,{V:()=>g});var i=r(90237),s=r(78888),n=r(91869),o=r(74887),a=r(84952),l=r(46140),u=r(10107),c=(r(44208),r(53966),r(87811),r(36005)),p=r(40608),d=r(35666),y=r(5443),h=r(16930),f=r(60694),m=r(10873),b=r(10407);const g=e=>{let t=class extends e{constructor(){super(...arguments),this.capabilities=void 0,this.copyright=null,this.fullExtent=null,this.legendEnabled=!0,this.spatialReference=null,this.version=void 0,this._allLayersAndTablesMap=null}readCapabilities(e,t){const r=t.capabilities&&t.capabilities.split(",").map((e=>e.toLowerCase().trim()));if(!r)return{operations:{supportsExportMap:!1,supportsExportTiles:!1,supportsIdentify:!1,supportsQuery:!1,supportsTileMap:!1},exportMap:null,exportTiles:null};const i=this.type,s="tile"!==i&&!!t.supportsDynamicLayers,n=r.includes("query"),o=r.includes("map"),a=!!t.exportTilesAllowed,u=r.includes("tilemap"),c=r.includes("data"),p="tile"!==i&&(!t.tileInfo||s),d="tile"!==i&&(!t.tileInfo||s),y="tile"!==i,h="tile"!==i&&s&&t.currentVersion>=11.1,f=t.cimVersion?l.R.parse(t.cimVersion):null,m=f?.greaterEqual(1,4)??!1,b=f?.greaterEqual(2,0)??!1;return{operations:{supportsExportMap:o,supportsExportTiles:a,supportsIdentify:n,supportsQuery:c,supportsTileMap:u},exportMap:o?{supportsArcadeExpressionForLabeling:m,supportsCIMSymbols:b,supportsDynamicLayers:s,supportsSublayerOrderBy:h,supportsSublayerDefinitionExpression:d,supportsSublayerVisibility:p,supportsSublayersChanges:y}:null,exportTiles:a?{maxExportTilesCount:+t.maxExportTilesCount}:null}}readVersion(e,t){let r=t.currentVersion;return r||(r=t.hasOwnProperty("capabilities")||t.hasOwnProperty("tables")?10:t.hasOwnProperty("supportedImageFormatTypes")?9.31:9.3),r}async fetchRelatedService(e){const t=this.portalItem;if(!t||!(0,b.bK)(t))return null;this._relatedFeatureServicePromise||(this._relatedFeatureServicePromise=t.fetchRelatedItems({relationshipType:"Service2Service",direction:"reverse"},e).then((e=>e.find((e=>"Feature Service"===e.type))??null),(()=>null)));const r=await this._relatedFeatureServicePromise;return(0,o.Te)(e),r?{itemId:r.id,url:r.url}:null}async fetchSublayerInfo(e,t){const{source:r}=e;if(this?.portalItem&&"tile"===this.type&&"map-layer"===r?.type&&(0,b.bK)(this.portalItem)&&e.originIdOf("url")<d.Gr.SERVICE){const i=await this.fetchRelatedService(t);i&&(e.url=(0,a.fj)(i.url,r.mapLayerId.toString()),e.layerItemId=i.itemId)}const{url:i}=e;let n;if("data-layer"===r.type)n=(await(0,s.A)(i,{responseType:"json",query:{f:"json",...this.customParameters,token:this.apiKey},...t})).data;else if(i&&e.originIdOf("url")>d.Gr.SERVICE)try{const e=await this._fetchAllLayersAndTablesFromService(i),t=(0,f.qg)(i)?.sublayer??r.mapLayerId;n=e.get(t)}catch{}else{let i=e.id;"map-layer"===r?.type&&(i=r.mapLayerId);try{n=(await this.fetchAllLayersAndTables(t)).get(i)}catch{}}return n}async fetchAllLayersAndTables(e){return this._fetchAllLayersAndTablesFromService(this.parsedUrl?.path,e)}async _fetchAllLayersAndTablesFromService(e,t){await this.load(t),this._allLayersAndTablesMap||=new Map;const r=(0,f.qg)(e),i=(0,n.tE)(this._allLayersAndTablesMap,r?.url.path,(()=>(0,s.A)((0,a.fj)(r?.url.path,"/layers"),{responseType:"json",query:{f:"json",...this.customParameters,token:this.apiKey}}).then((e=>{const t=new Map,{layers:r,tables:i}=e.data,s=[...r??[],...i??[]];for(const e of s)t.set(e.id,e);return{result:t}}),(e=>({error:e}))))),l=await i;if((0,o.Te)(t),"result"in l)return l.result;throw l.error}};return(0,i._)([(0,u.MZ)({readOnly:!0})],t.prototype,"capabilities",void 0),(0,i._)([(0,c.w)("service","capabilities",["capabilities","exportTilesAllowed","maxExportTilesCount","supportsDynamicLayers","tileInfo"])],t.prototype,"readCapabilities",null),(0,i._)([(0,u.MZ)({json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),(0,i._)([(0,u.MZ)({type:y.A})],t.prototype,"fullExtent",void 0),(0,i._)([(0,u.MZ)(m.id)],t.prototype,"id",void 0),(0,i._)([(0,u.MZ)({type:Boolean,json:{origins:{service:{read:{enabled:!1}}},read:{source:"showLegend"},write:{target:"showLegend"}}})],t.prototype,"legendEnabled",void 0),(0,i._)([(0,u.MZ)(m.M6)],t.prototype,"popupEnabled",void 0),(0,i._)([(0,u.MZ)({type:h.A})],t.prototype,"spatialReference",void 0),(0,i._)([(0,u.MZ)({readOnly:!0})],t.prototype,"version",void 0),(0,i._)([(0,c.w)("service","version",["currentVersion","capabilities","tables","supportedImageFormatTypes"])],t.prototype,"readVersion",null),t=(0,i._)([(0,p.$)("esri.layers.mixins.ArcGISMapService")],t),t}}}]);