@arcgis/core 4.23.0-next.20220128 → 4.23.0-next.20220202

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 (288) hide show
  1. package/Graphic.js +1 -1
  2. package/TimeExtent.js +1 -1
  3. package/assets/esri/core/workers/RemoteClient.js +1 -1
  4. package/assets/esri/core/workers/chunks/01a10fe5ad6941b0ee8c.js +1 -0
  5. package/assets/esri/core/workers/chunks/{7a5f5acfbd4ca1a5c1f3.js → 06116433eb6e669f146b.js} +1 -1
  6. package/assets/esri/core/workers/chunks/09a05d778b6fac710828.js +1 -0
  7. package/assets/esri/core/workers/chunks/{83d00afae4406ec78bc9.js → 0c6be307709523eb8a05.js} +1 -1
  8. package/assets/esri/core/workers/chunks/0e215fa28a0448169132.js +1 -0
  9. package/assets/esri/core/workers/chunks/{391e96192d1ec4e55ce2.js → 101b4f02f0572afb666f.js} +1 -1
  10. package/assets/esri/core/workers/chunks/11750e96065b4d7b926b.js +1 -0
  11. package/assets/esri/core/workers/chunks/{929c9b7cdab7c4ca3d87.js → 17c51f5a13f471e6656a.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{ed0bcc66fb1e0ee75a4b.js → 1f34957ef42e5b5977d0.js} +1 -1
  13. package/assets/esri/core/workers/chunks/2f4e425be3a3bdfd8d29.js +1 -0
  14. package/assets/esri/core/workers/chunks/34bed896b68993cabaa1.js +1 -0
  15. package/assets/esri/core/workers/chunks/3e1679b01429fd73cffe.js +1 -0
  16. package/assets/esri/core/workers/chunks/{99619fcb772807c74f3b.js → 444829a840b8ded16fd7.js} +1 -1
  17. package/assets/esri/core/workers/chunks/467b5faa1c90d9821609.js +1 -0
  18. package/assets/esri/core/workers/chunks/49353182a16218a84251.js +1 -0
  19. package/assets/esri/core/workers/chunks/4bfc2eeb0738c393d8ec.js +1 -0
  20. package/assets/esri/core/workers/chunks/4de996ebc432f5e149bc.js +1 -0
  21. package/assets/esri/core/workers/chunks/{422537fc3df707bb62c9.js → 5038935db9b1ebe61d02.js} +1 -1
  22. package/assets/esri/core/workers/chunks/50976921acf7bd636123.js +1 -0
  23. package/assets/esri/core/workers/chunks/50ef2622fd0d9a241979.js +1 -0
  24. package/assets/esri/core/workers/chunks/{5790d171072b3c7d108f.js → 53aa2ab4e569c994a32d.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{7903a3e2e0faff0f86c0.js → 56657f890e0f79f5d2ad.js} +1 -1
  26. package/assets/esri/core/workers/chunks/{db3c729ce0c0b2690dc9.js → 574e33f28c106d607fe3.js} +1 -1
  27. package/assets/esri/core/workers/chunks/{952980635afc7ec81804.js → 5b02ba8ed152dba53155.js} +1 -1
  28. package/assets/esri/core/workers/chunks/60c06d1bb3f8a26cb5ac.js +1 -0
  29. package/assets/esri/core/workers/chunks/{c2253a9f29c1aabb2b75.js → 66c47983e93071de28b1.js} +1 -1
  30. package/assets/esri/core/workers/chunks/6be326edd9829781d926.js +1 -0
  31. package/assets/esri/core/workers/chunks/70d6bb3c7112cb702389.js +1 -0
  32. package/assets/esri/core/workers/chunks/{5bcb3240b3c005e5fe72.js → 7215af7810d15e89aa5a.js} +1 -1
  33. package/assets/esri/core/workers/chunks/7509c1693ffedc0fa018.js +1 -0
  34. package/assets/esri/core/workers/chunks/76c1d663f6d3f935c87f.js +1 -0
  35. package/assets/esri/core/workers/chunks/7ccbb923f113b3e21545.js +1 -0
  36. package/assets/esri/core/workers/chunks/810a763373d7f78ae398.js +1 -0
  37. package/assets/esri/core/workers/chunks/82194fec53054c37061f.js +1 -0
  38. package/assets/esri/core/workers/chunks/82c59a71b7f087148089.js +1 -0
  39. package/assets/esri/core/workers/chunks/84eee02122b56a22d49e.js +1 -0
  40. package/assets/esri/core/workers/chunks/{dd13772a5e2eccc6a2bc.js → 8598f762f15ca68d52b7.js} +1 -1
  41. package/assets/esri/core/workers/chunks/{3c673495e5f507c4a9e5.js → 88458dcaff8edc50620c.js} +1 -1
  42. package/assets/esri/core/workers/chunks/{5ec98f4ddac707d0fbd1.js → 88815d533808aabb1fa9.js} +1 -1
  43. package/assets/esri/core/workers/chunks/{0463ba46df855a92b9c0.js → 8941f09329d9d39fb2fe.js} +1 -1
  44. package/assets/esri/core/workers/chunks/{655b55ac0cd533d7e9d7.js → 8ad5dc818dc73f4b9a76.js} +1 -1
  45. package/assets/esri/core/workers/chunks/8e96cddb069b643d864a.js +1 -0
  46. package/assets/esri/core/workers/chunks/{f2124f4d0f2b8a91f0ea.js → 90c5edcd8a609224ce55.js} +1 -1
  47. package/assets/esri/core/workers/chunks/9230b20eba4304d421b4.js +1 -0
  48. package/assets/esri/core/workers/chunks/{bac9fc90e6756e211160.js → 94d9951509c0db09547a.js} +1 -1
  49. package/assets/esri/core/workers/chunks/996d6ae7f2e2273f9bce.js +1 -0
  50. package/assets/esri/core/workers/chunks/{37c03cfc19086ce631c6.js → 9bd603ec98d24cd918e9.js} +1 -1
  51. package/assets/esri/core/workers/chunks/{c1135cb02ec46c491459.js → 9ce961bc390202c87941.js} +1 -1
  52. package/assets/esri/core/workers/chunks/9d4a35d4a85db80c4071.js +1 -0
  53. package/assets/esri/core/workers/chunks/9f0ad28e66862ba971a3.js +1 -0
  54. package/assets/esri/core/workers/chunks/{b3f5e91116112b0b612a.js → 9fd47b8fe25657ac0237.js} +1 -1
  55. package/assets/esri/core/workers/chunks/{b9e9cb354822c6d995a4.js → a276e60209f3d877a8d0.js} +1 -1
  56. package/assets/esri/core/workers/chunks/{aeaa1667c2d9f1b3366b.js → a85ed251d3d3668e474f.js} +1 -1
  57. package/assets/esri/core/workers/chunks/{44f0c3663b293afbd172.js → acf10f747215e9ff54dc.js} +1 -1
  58. package/assets/esri/core/workers/chunks/{69fd99b7c76e9992ccf3.js → b32bf9808cb4be3a6bd0.js} +1 -1
  59. package/assets/esri/core/workers/chunks/b3dc80ddbfa81026e937.js +1 -0
  60. package/assets/esri/core/workers/chunks/b548e6b3add4154ac4e6.js +1 -0
  61. package/assets/esri/core/workers/chunks/b6c55bdd8c957b062bc1.js +1 -0
  62. package/assets/esri/core/workers/chunks/{9d77467aa71d345fc1b6.js → bcc01bbffaa3bb5f60a8.js} +1 -1
  63. package/assets/esri/core/workers/chunks/{1f8c6a179e39fd4c5e6f.js → bd152e8b43cc4a6844dd.js} +1 -1
  64. package/assets/esri/core/workers/chunks/{0d02c6ad1f4688bfa374.js → bf7c44644fe7b0aa60cf.js} +1 -1
  65. package/assets/esri/core/workers/chunks/c0dc5882362479794224.js +1 -0
  66. package/assets/esri/core/workers/chunks/c8b574a76807f4ea7a70.js +1 -0
  67. package/assets/esri/core/workers/chunks/d09a0b2dc3a6fc10fa41.js +1 -0
  68. package/assets/esri/core/workers/chunks/{ec10151a2a95e95a0bb5.js → d304fe0ac836afd46e3d.js} +1 -1
  69. package/assets/esri/core/workers/chunks/{37a7bd30352b1309b8f8.js → d3f05b8e4bd53eb1eb9d.js} +1 -1
  70. package/assets/esri/core/workers/chunks/{be588873c16770ceb9ef.js → d46b511bbb83e68f1ece.js} +1 -1
  71. package/assets/esri/core/workers/chunks/{17de7a324dfa7f57ad5d.js → d780e946149b1c3d1246.js} +1 -1
  72. package/assets/esri/core/workers/chunks/d80bcf5ed1f54e0c4f5a.js +1 -0
  73. package/assets/esri/core/workers/chunks/{8cbb04a9065aa3756638.js → dc04a8ba6c770bdc2bd4.js} +1 -1
  74. package/assets/esri/core/workers/chunks/{89820b200ee44e678af5.js → dd891a98105904f8a06b.js} +1 -1
  75. package/assets/esri/core/workers/chunks/e5ab037c2a90411c453b.js +1 -0
  76. package/assets/esri/core/workers/chunks/ef2df21e1af3aa7ced29.js +1 -0
  77. package/assets/esri/core/workers/chunks/f5a7281ae24e837efc61.js +1 -0
  78. package/assets/esri/core/workers/chunks/{ff6abdc72076f3994659.js → f7150547d7e3259a0f29.js} +1 -1
  79. package/assets/esri/core/workers/chunks/{2c607d30ff8ca1b61286.js → fe0c3b7c9b428d9c3f25.js} +1 -1
  80. package/assets/esri/images/portal/mediaservice16.png +0 -0
  81. package/assets/esri/libs/vxl/vxlLayer.wasm +0 -0
  82. package/assets/esri/widgets/Directions/t9n/Directions.json +1 -1
  83. package/assets/esri/widgets/Directions/t9n/Directions_ar.json +1 -1
  84. package/assets/esri/widgets/Directions/t9n/Directions_bg.json +1 -1
  85. package/assets/esri/widgets/Directions/t9n/Directions_bs.json +1 -1
  86. package/assets/esri/widgets/Directions/t9n/Directions_ca.json +1 -1
  87. package/assets/esri/widgets/Directions/t9n/Directions_cs.json +1 -1
  88. package/assets/esri/widgets/Directions/t9n/Directions_da.json +1 -1
  89. package/assets/esri/widgets/Directions/t9n/Directions_de.json +1 -1
  90. package/assets/esri/widgets/Directions/t9n/Directions_el.json +1 -1
  91. package/assets/esri/widgets/Directions/t9n/Directions_en.json +1 -1
  92. package/assets/esri/widgets/Directions/t9n/Directions_es.json +1 -1
  93. package/assets/esri/widgets/Directions/t9n/Directions_et.json +1 -1
  94. package/assets/esri/widgets/Directions/t9n/Directions_fi.json +1 -1
  95. package/assets/esri/widgets/Directions/t9n/Directions_fr.json +1 -1
  96. package/assets/esri/widgets/Directions/t9n/Directions_he.json +1 -1
  97. package/assets/esri/widgets/Directions/t9n/Directions_hr.json +1 -1
  98. package/assets/esri/widgets/Directions/t9n/Directions_hu.json +1 -1
  99. package/assets/esri/widgets/Directions/t9n/Directions_id.json +1 -1
  100. package/assets/esri/widgets/Directions/t9n/Directions_it.json +1 -1
  101. package/assets/esri/widgets/Directions/t9n/Directions_ja.json +1 -1
  102. package/assets/esri/widgets/Directions/t9n/Directions_ko.json +1 -1
  103. package/assets/esri/widgets/Directions/t9n/Directions_lt.json +1 -1
  104. package/assets/esri/widgets/Directions/t9n/Directions_lv.json +1 -1
  105. package/assets/esri/widgets/Directions/t9n/Directions_nb.json +1 -1
  106. package/assets/esri/widgets/Directions/t9n/Directions_nl.json +1 -1
  107. package/assets/esri/widgets/Directions/t9n/Directions_pl.json +1 -1
  108. package/assets/esri/widgets/Directions/t9n/Directions_pt-BR.json +1 -1
  109. package/assets/esri/widgets/Directions/t9n/Directions_pt-PT.json +1 -1
  110. package/assets/esri/widgets/Directions/t9n/Directions_ro.json +1 -1
  111. package/assets/esri/widgets/Directions/t9n/Directions_ru.json +1 -1
  112. package/assets/esri/widgets/Directions/t9n/Directions_sk.json +1 -1
  113. package/assets/esri/widgets/Directions/t9n/Directions_sl.json +1 -1
  114. package/assets/esri/widgets/Directions/t9n/Directions_sr.json +1 -1
  115. package/assets/esri/widgets/Directions/t9n/Directions_sv.json +1 -1
  116. package/assets/esri/widgets/Directions/t9n/Directions_th.json +1 -1
  117. package/assets/esri/widgets/Directions/t9n/Directions_tr.json +1 -1
  118. package/assets/esri/widgets/Directions/t9n/Directions_uk.json +1 -1
  119. package/assets/esri/widgets/Directions/t9n/Directions_vi.json +1 -1
  120. package/assets/esri/widgets/Directions/t9n/Directions_zh-CN.json +1 -1
  121. package/assets/esri/widgets/Directions/t9n/Directions_zh-HK.json +1 -1
  122. package/assets/esri/widgets/Directions/t9n/Directions_zh-TW.json +1 -1
  123. package/chunks/Heatmap.glsl.js +10 -0
  124. package/chunks/HeatmapDensity.glsl.js +21 -0
  125. package/core/maybe.js +1 -1
  126. package/core/promiseUtils.js +1 -1
  127. package/interfaces.d.ts +455 -45
  128. package/layers/RouteLayer.d.ts +4 -0
  129. package/layers/RouteLayer.js +1 -1
  130. package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
  131. package/layers/graphics/data/optimizedFeatureQueryEngineAdapter.js +1 -1
  132. package/layers/graphics/featureConversionUtils.js +1 -1
  133. package/layers/mixins/ArcGISImageService.js +1 -1
  134. package/layers/support/rasterFunctions/vectorFieldUtils.js +1 -1
  135. package/package.json +1 -1
  136. package/portal/PortalItem.js +1 -1
  137. package/renderers/support/rendererConversion.js +1 -1
  138. package/rest/support/DirectionLine.d.ts +4 -0
  139. package/rest/support/DirectionPoint.d.ts +4 -0
  140. package/rest/support/FeatureSet.js +1 -1
  141. package/rest/support/RouteInfo.d.ts +4 -0
  142. package/rest/support/RouteInfo.js +1 -1
  143. package/rest/support/RouteSolveResult.d.ts +4 -0
  144. package/support/featureFlags.js +1 -1
  145. package/support/revision.js +1 -1
  146. package/symbols/TextSymbol3DLayer.js +1 -1
  147. package/symbols/support/Symbol3DHalo.js +1 -1
  148. package/symbols/support/Symbol3DTextBackground.js +5 -0
  149. package/views/2d/engine/RasterVFContainer.js +5 -0
  150. package/views/2d/engine/RasterVFDisplayObject.js +1 -1
  151. package/views/2d/engine/flow/AnimatedFlowView2D.js +1 -1
  152. package/views/2d/engine/webgl/AttributeStoreView.js +1 -1
  153. package/views/2d/engine/webgl/brushes/raster/BrushVectorField.js +1 -1
  154. package/views/2d/engine/webgl/cpuMapped/Buffer.js +1 -1
  155. package/views/2d/engine/webgl/mesh/templates/WGLBaseTextTemplate.js +1 -1
  156. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  157. package/views/2d/layers/ImageryLayerView2D.js +1 -1
  158. package/views/2d/layers/ImageryTileLayerView2D.js +1 -1
  159. package/views/2d/layers/RouteLayerView2D.js +1 -1
  160. package/views/2d/layers/features/processors/HeatmapProcessor.js +1 -1
  161. package/views/2d/layers/features/processors/SymbolProcessor.js +1 -1
  162. package/views/2d/layers/features/support/AttributeStore.js +1 -1
  163. package/views/2d/layers/features/support/ClusterStore.js +1 -1
  164. package/views/2d/layers/features/support/FeatureSetReaderJSON.js +1 -1
  165. package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
  166. package/views/2d/layers/imagery/ImageryTileView2D.js +1 -1
  167. package/views/2d/layers/imagery/ImageryVFStrategy.js +5 -0
  168. package/views/2d/layers/imagery/ImageryView2D.js +1 -1
  169. package/views/2d/layers/imagery/VectorFieldTileView2D.js +1 -1
  170. package/views/2d/layers/imagery/VectorFieldView2D.js +5 -0
  171. package/views/3d/environment/ChapmanAtmosphere.js +1 -1
  172. package/views/3d/environment/CloudsComposition.js +1 -1
  173. package/views/3d/environment/CloudsGenerator.js +1 -1
  174. package/views/3d/environment/EnvironmentRenderer.js +1 -1
  175. package/views/3d/environment/Fog.js +1 -1
  176. package/views/3d/environment/NoiseTextureAtlas.js +1 -1
  177. package/views/3d/environment/PanoramicAtmosphere.js +1 -1
  178. package/views/3d/environment/Precipitation.js +1 -1
  179. package/views/3d/environment/SimpleAtmosphere.js +1 -1
  180. package/views/3d/environment/Stars.js +1 -1
  181. package/views/3d/interactive/analysisTools/lineOfSight/LineOfSightTool.js +1 -1
  182. package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
  183. package/views/3d/layers/I3SMeshView3D.js +1 -1
  184. package/views/3d/layers/VoxelLayerView3D.js +1 -1
  185. package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
  186. package/views/3d/layers/graphics/Graphics3DWebStyleSymbol.js +1 -1
  187. package/views/3d/layers/graphics/labelPlacement.js +1 -1
  188. package/views/3d/layers/i3s/I3SCrossfadeHelper.js +1 -1
  189. package/views/3d/layers/i3s/I3SIndex.js +1 -1
  190. package/views/3d/layers/i3s/I3SMaterialUtil.js +1 -1
  191. package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
  192. package/views/3d/layers/i3s/PointRenderer.js +1 -1
  193. package/views/3d/layers/support/HeatmapFeatureProcessor.js +1 -1
  194. package/views/3d/support/LaserLineRenderer.js +1 -1
  195. package/views/3d/terrain/OverlayRenderer.js +1 -1
  196. package/views/3d/terrain/TerrainRenderer.js +1 -1
  197. package/views/3d/terrain/TileRenderer.js +1 -1
  198. package/views/3d/webgl-engine/core/renderPasses/RenderPass.js +1 -1
  199. package/views/3d/webgl-engine/lib/CompositingHelper.js +1 -1
  200. package/views/3d/webgl-engine/lib/DrapedHeatmapRenderer.js +5 -0
  201. package/views/3d/webgl-engine/lib/HighlightHelper.js +1 -1
  202. package/views/3d/webgl-engine/lib/RenderingContext.js +1 -1
  203. package/views/3d/webgl-engine/lib/SSAOHelper.js +1 -1
  204. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  205. package/views/3d/webgl-engine/lib/ShadowCastRenderer.js +1 -1
  206. package/views/3d/webgl-engine/lib/ShadowHighlightHelper.js +1 -1
  207. package/views/3d/webgl-engine/lib/SmaaRenderPass.js +1 -1
  208. package/views/3d/webgl-engine/lib/TextRenderParameters.js +1 -1
  209. package/views/3d/webgl-engine/lib/TextRenderer.js +1 -1
  210. package/views/3d/webgl-engine/lib/Texture.js +1 -1
  211. package/views/3d/webgl-engine/lib/edgeRendering/EdgeRenderer.js +1 -1
  212. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  213. package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +5 -0
  214. package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
  215. package/views/3d/webgl-engine/shaders/Heatmap.glsl.js +5 -0
  216. package/views/3d/webgl-engine/shaders/HeatmapDensity.glsl.js +5 -0
  217. package/views/3d/webgl-engine/shaders/HeatmapDensityTechnique.js +5 -0
  218. package/views/3d/webgl-engine/shaders/HeatmapTechnique.js +5 -0
  219. package/views/draw/support/Box.js +1 -1
  220. package/views/draw/support/GraphicMover.js +1 -1
  221. package/views/draw/support/HighlightHelper.js +5 -0
  222. package/views/draw/support/Reshape.js +1 -1
  223. package/views/draw/support/layerUtils.js +1 -1
  224. package/webdoc/support/{Thumbnail.js → SlideThumbnail.js} +1 -1
  225. package/webmap/Bookmark.js +1 -1
  226. package/webmap/Version.js +1 -1
  227. package/webscene/Slide.js +1 -1
  228. package/webscene/Version.js +1 -1
  229. package/webscene/support/SlideVisibleLayer.js +1 -1
  230. package/widgets/Bookmarks/BookmarksViewModel.js +1 -1
  231. package/widgets/Bookmarks.js +1 -1
  232. package/widgets/Directions/DirectionsViewModel.js +1 -1
  233. package/widgets/Directions/support/directionsUtils.js +1 -1
  234. package/widgets/Directions/support/resources.js +1 -1
  235. package/widgets/Directions.js +1 -1
  236. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  237. package/widgets/FeatureTable/Grid/Grid.js +1 -1
  238. package/widgets/FeatureTable/support/FeatureStore.js +1 -1
  239. package/widgets/FeatureTable.js +1 -1
  240. package/widgets/Sketch/SketchViewModel.js +1 -1
  241. package/widgets/Sketch.js +1 -1
  242. package/widgets/TimeSlider.js +1 -1
  243. package/widgets/Widget.js +1 -1
  244. package/widgets/support/vnodeCache.js +5 -0
  245. package/widgets/support/widgetUtils.js +1 -1
  246. package/assets/esri/core/workers/chunks/0453fad5cb819797b4f6.js +0 -1
  247. package/assets/esri/core/workers/chunks/0cd0a6eef51fc5b9ea61.js +0 -1
  248. package/assets/esri/core/workers/chunks/0d684f16f37d5dc385dd.js +0 -1
  249. package/assets/esri/core/workers/chunks/16b6d0f8378582c051c3.js +0 -1
  250. package/assets/esri/core/workers/chunks/1877ab1b6a115dbba1c5.js +0 -1
  251. package/assets/esri/core/workers/chunks/1b2a961f776a0b57e57a.js +0 -1
  252. package/assets/esri/core/workers/chunks/1b3fd66577b19aa5f2b6.js +0 -1
  253. package/assets/esri/core/workers/chunks/1c733b7db092a2a88ef3.js +0 -1
  254. package/assets/esri/core/workers/chunks/27474b007988855bea9d.js +0 -1
  255. package/assets/esri/core/workers/chunks/357033117dfe61eb81ea.js +0 -1
  256. package/assets/esri/core/workers/chunks/483d5d8593d96d0f0b15.js +0 -1
  257. package/assets/esri/core/workers/chunks/4ba6de8aa7e2960bad49.js +0 -1
  258. package/assets/esri/core/workers/chunks/4be35af7d6babbfe9d84.js +0 -1
  259. package/assets/esri/core/workers/chunks/5457962a70bd3c557a75.js +0 -1
  260. package/assets/esri/core/workers/chunks/57856b4a9b8784a69844.js +0 -1
  261. package/assets/esri/core/workers/chunks/57b349d1dbc0bed75b79.js +0 -1
  262. package/assets/esri/core/workers/chunks/5d11b97b667921d67ae7.js +0 -1
  263. package/assets/esri/core/workers/chunks/5dbe555a5a662ff3d9ce.js +0 -1
  264. package/assets/esri/core/workers/chunks/64b7e8d812ea8fcf269e.js +0 -1
  265. package/assets/esri/core/workers/chunks/75d812955a473d0e8960.js +0 -1
  266. package/assets/esri/core/workers/chunks/96f148a556a2418038de.js +0 -1
  267. package/assets/esri/core/workers/chunks/9876a1bae350795fab36.js +0 -1
  268. package/assets/esri/core/workers/chunks/a8692bffb76444c34760.js +0 -1
  269. package/assets/esri/core/workers/chunks/ba762bcfd74af0bb8218.js +0 -1
  270. package/assets/esri/core/workers/chunks/c093dff4592832ac0973.js +0 -1
  271. package/assets/esri/core/workers/chunks/c984b3040e120e502b11.js +0 -1
  272. package/assets/esri/core/workers/chunks/cdbc005eebec1503b99d.js +0 -1
  273. package/assets/esri/core/workers/chunks/d1fe53b597351dc58305.js +0 -1
  274. package/assets/esri/core/workers/chunks/e218bde41ffbcc5194f5.js +0 -1
  275. package/assets/esri/core/workers/chunks/e287f49184d076af17e2.js +0 -1
  276. package/assets/esri/core/workers/chunks/e93dfdede0532a89ffa5.js +0 -1
  277. package/assets/esri/core/workers/chunks/e9e5196b44b6923be1a3.js +0 -1
  278. package/assets/esri/core/workers/chunks/ea595b0df5050eda2a13.js +0 -1
  279. package/assets/esri/core/workers/chunks/eb82ff10cef2bde6e57f.js +0 -1
  280. package/assets/esri/core/workers/chunks/ee6e0db58dc64410e687.js +0 -1
  281. package/assets/esri/core/workers/chunks/f0a9f161805fc7a30fc5.js +0 -1
  282. package/assets/esri/core/workers/chunks/fc7e31d87555beb63291.js +0 -1
  283. package/assets/esri/core/workers/chunks/fff6b0338f06dad0c45d.js +0 -1
  284. package/views/2d/layers/imagery/ImageryGraphicsView2D.js +0 -5
  285. package/widgets/Directions/support/CostSummary.js +0 -5
  286. package/widgets/Directions/support/RouteSection.js +0 -5
  287. package/widgets/Directions/support/RouteSections.js +0 -5
  288. package/widgets/Directions/support/maneuverUtils.js +0 -5
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../chunks/tslib.es6.js";import"../../geometry.js";import t from"../../Graphic.js";import{read as r,rasterRendererTypes as i,websceneRasterRendererTypes as s}from"../../rasterRenderers.js";import n from"../../request.js";import a from"../../core/Error.js";import{strict as o}from"../../core/jsonMap.js";import{clone as l}from"../../core/lang.js";import u from"../../core/Logger.js";import{isSome as p,isNone as c,unwrap as m}from"../../core/maybe.js";import{when as d}from"../../core/promiseUtils.js";import{urlToObject as h}from"../../core/urlUtils.js";import{aliasOf as f}from"../../core/accessorSupport/decorators/aliasOf.js";import{ensureClass as y,Integer as g,ensureNumber as R}from"../../core/accessorSupport/ensureType.js";import{property as v,ensureRange as x}from"../../core/accessorSupport/decorators/property.js";import{reader as b}from"../../core/accessorSupport/decorators/reader.js";import{subclass as S}from"../../core/accessorSupport/decorators/subclass.js";import{writer as I}from"../../core/accessorSupport/decorators/writer.js";import{opacity as _,url as w}from"../support/commonProperties.js";import F from"../support/DimensionalDefinition.js";import{ExportImageServiceParameters as O}from"../support/ExportImageServiceParameters.js";import D from"../support/Field.js";import P from"../support/FieldsIndex.js";import{isSupportedRendererType as T}from"../support/imageryRendererUtils.js";import j from"../support/MosaicRule.js";import N from"../support/PixelBlock.js";import{interpolationKebab as C,noDataInterpretationKebab as M}from"../support/rasterEnums.js";import J from"../support/RasterFunction.js";import q from"../support/RasterInfo.js";import V from"../support/RasterJobHandler.js";import{decode as A,getFormat as z}from"../support/rasterFormats/RasterCodec.js";import{uvComponentToVector as E}from"../support/rasterFunctions/vectorFieldUtils.js";import{getSupportedRendererTypes as Q,getDefaultBandCombination as U,createDefaultRenderer as H,normalizeRendererJSON as L}from"../../renderers/support/rasterRendererHelper.js";import k from"../../renderers/support/RasterSymbolizer.js";import{computeAngles as B,computePixelSpaceLocations as G,computeHistograms as W,computeStatisticsHistograms as X,getImageSpatialReferenceQueryParameter as Y,getSamples as K,identify as $}from"../../rest/imageService.js";import"../../core/unitUtils.js";import"../../kernel.js";import"../../rest/query/support/AttachmentInfo.js";import"../../rest/support/AttachmentQuery.js";import{executeForCount as Z}from"../../rest/query/executeForCount.js";import ee from"../../geometry/Extent.js";import"../../geometry/Geometry.js";import"../../geometry/Multipoint.js";import te from"../../geometry/Point.js";import re from"../../geometry/Polygon.js";import"../../geometry/Polyline.js";import"../../geometry/support/normalizeUtils.js";import"../support/arcgisLayerUrl.js";import"../../core/pbf.js";import"../../geometry/support/spatialReferenceUtils.js";import ie from"../../rest/support/Query.js";import{executeForIds as se}from"../../rest/query/executeForIds.js";import{executeQueryJSON as ne}from"../../rest/query/executeQueryJSON.js";import"../../core/has.js";import"../graphics/featureConversionUtils.js";import ae from"../../rest/support/FeatureSet.js";import"../../rest/support/RelationshipQuery.js";import"../../rest/support/TopFeaturesQuery.js";import oe from"../../rest/support/ImageAngleParameters.js";import le from"../../rest/support/ImageHistogramParameters.js";import ue from"../../rest/support/ImageIdentifyParameters.js";import pe from"../../rest/support/ImagePixelLocationParameters.js";import ce from"../../rest/support/ImageSampleParameters.js";import{createStreamlinesMesh as me}from"../../views/2d/engine/flow/dataUtils.js";import de from"../../geometry/SpatialReference.js";const he=u.getLogger("esri.layers.mixins.ArcGISImageService"),fe=o()({U1:"u1",U2:"u2",U4:"u4",U8:"u8",S8:"s8",U16:"u16",S16:"s16",U32:"u32",S32:"s32",F32:"f32",F64:"f64",C64:"c64",C128:"c128",UNKNOWN:"unknown"}),ye=new Set(["png","png8","png24","png32","jpg","bmp","gif","jpgpng","lerc","tiff"]),ge=x(R,{min:0,max:255});function Re(e){if(!e)return null;const t=JSON.stringify(e).match(/"rasterFunction":"(.*?")/gi),r=null==t?void 0:t.map((e=>e.replace('"rasterFunction":"',"").replace('"',"")));return r?r.join("/"):null}const ve=o=>{let u=class extends o{constructor(){super(...arguments),this._functionRasterInfos={},this._rasterJobHandler={instance:null,refCount:0,connectionPromise:null},this._symbolizer=null,this._defaultServiceMosaicRule=null,this._serviceSourceType=null,this._serviceSupportsMosaicRule=null,this.rasterAttributeTableFieldPrefix="Raster.",this.adjustAspectRatio=null,this.bandCount=null,this.bandIds=void 0,this.capabilities=null,this.compressionQuality=void 0,this.compressionTolerance=.01,this.copyright=null,this.definitionExpression=null,this.exportImageServiceParameters=null,this.rasterInfo=null,this.fields=null,this.fullExtent=null,this.hasMultidimensions=!1,this.imageMaxHeight=4100,this.imageMaxWidth=4100,this.interpolation=void 0,this.minScale=0,this.maxScale=0,this.multidimensionalInfo=null,this.noData=null,this.noDataInterpretation=void 0,this.objectIdField=null,this.geometryType="polygon",this.typeIdField=null,this.types=[],this.pixelSizeX=null,this.pixelSizeY=null,this.pixelFilter=null,this.raster=void 0,this.viewId=void 0,this.renderer=null,this.rasterAttributeTable=null,this.rasterFunctionInfos=null,this.serviceDataType=null,this.spatialReference=null,this.pixelType=null,this.serviceRasterInfo=null,this.sourceJSON=null,this.url=null,this.version=null}initialize(){this._set("exportImageServiceParameters",new O({layer:this}))}readDefaultServiceMosaicRule(e,t){return this._serviceSupportsMosaicRule?j.fromJSON(t):null}readServiceSourceType(e,t){return this._isMosaicDataset(t)?"mosaic-dataset":"raster-dataset"}readServiceSupportsMosaicRule(e,t){return this._isMosaicRuleSupported(t)}get rasterFunctionNamesIndex(){const e=new Map;return!this.rasterFunctionInfos||p(this.rasterFunctionInfos)&&this.rasterFunctionInfos.length<1||p(this.rasterFunctionInfos)&&this.rasterFunctionInfos.forEach((t=>{e.set(t.name.toLowerCase().replace(/ /gi,"_"),t.name)})),e}readBandIds(e,t){if(Array.isArray(e)&&e.length>0&&e.every((e=>"number"==typeof e)))return e}readCapabilities(e,t){return this._readCapabilities(t)}writeCompressionQuality(e,t,r){null!=e&&"lerc"!==this.format&&(t[r]=e)}writeCompressionTolerance(e,t,r){"lerc"===this.format&&null!=e&&(t[r]=e)}get fieldsIndex(){return this.fields?new P(this.fields):null}set format(e){e&&ye.has(e.toLowerCase())&&this._set("format",e.toLowerCase())}readFormat(e,t){return"esriImageServiceDataTypeVector-UV"===t.serviceDataType||"esriImageServiceDataTypeVector-MagDir"===t.serviceDataType||null!=this.pixelFilter?"lerc":"jpgpng"}readMinScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}readMaxScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}set mosaicRule(e){let t=e;t&&t.mosaicMethod&&(t=j.fromJSON({...t.toJSON(),mosaicMethod:t.mosaicMethod,mosaicOperation:t.mosaicOperation})),this._set("mosaicRule",t)}readMosaicRule(e,t){const r=e||t.mosaicRule;return r?j.fromJSON(r):this._isMosaicRuleSupported(t)?j.fromJSON(t):null}writeMosaicRule(e,t,r){let i=this.mosaicRule;const s=this.definitionExpression;i?s&&s!==i.where&&(i=i.clone(),i.where=s):s&&(i=new j({where:s})),this._isValidCustomizedMosaicRule(i)&&(t[r]=i.toJSON())}writeNoData(e,t,r){null!=e&&"number"==typeof e&&(t[r]=ge(e))}readObjectIdField(e,t){if(!e){const r=t.fields.filter((e=>"esriFieldTypeOID"===e.type||"oid"===e.type));e=r&&r[0]&&r[0].name}return e}get parsedUrl(){return this.url?h(this.url):null}readRenderer(e,t,i){var s,n;const a=null==t||null==(s=t.layerDefinition)||null==(n=s.drawingInfo)?void 0:n.renderer,o=r(a,i);return null==o?null:("vector-field"===o.type&&t.symbolTileSize&&!a.symbolTileSize&&(o.symbolTileSize=t.symbolTileSize),T(o)||he.warn("ArcGISImageService","Imagery layer doesn't support given renderer type."),o)}writeRenderer(e,t,r){t.layerDefinition=t.layerDefinition||{},t.layerDefinition.drawingInfo=t.layerDefinition.drawingInfo||{},t.layerDefinition.drawingInfo.renderer=e.toJSON(),"vector-field"===e.type&&(t.symbolTileSize=e.symbolTileSize)}get rasterFields(){const e=this.rasterAttributeTableFieldPrefix||"Raster.",t=new D({name:"Raster.ItemPixelValue",alias:"Item Pixel Value",domain:null,editable:!1,length:50,type:"string"}),r=new D({name:"Raster.ServicePixelValue",alias:"Service Pixel Value",domain:null,editable:!1,length:50,type:"string"}),i=new D({name:"Raster.ServicePixelValue.Raw",alias:"Raw Service Pixel Value",domain:null,editable:!1,length:50,type:"string"});let s=this.fields?l(this.fields):[];s.push(r),this.capabilities.operations.supportsQuery&&this.fields&&this.fields.length>0&&s.push(t),this.version>=10.4&&p(this.rasterFunctionInfos)&&this.rasterFunctionInfos.some((e=>"none"===e.name.toLowerCase()))&&s.push(i),p(this.rasterFunctionInfos)&&this.rasterFunctionInfos.filter((e=>"none"!==e.name.toLowerCase())).forEach((e=>{s.push(new D({name:"Raster.ServicePixelValue."+e.name,alias:e.name,domain:null,editable:!1,length:50,type:"string"}))})),null==this.pixelFilter||"esriImageServiceDataTypeVector-UV"!==this.serviceDataType&&"esriImageServiceDataTypeVector-MagDir"!==this.serviceDataType||(s.push(new D({name:"Raster.Magnitude",alias:"Magnitude",domain:null,editable:!1,type:"double"})),s.push(new D({name:"Raster.Direction",alias:"Direction",domain:null,editable:!1,type:"double"})));const n=this.rasterInfo.attributeTable&&this.rasterInfo.attributeTable.fields||null;if(n&&n.length>0){const t=n.filter((e=>"esriFieldTypeOID"!==e.type&&"value"!==e.name.toLowerCase())).map((t=>{const r=l(t);return r.name=e+t.name,r}));s=s.concat(t)}return s}set renderingRule(e){let t=e;t&&t.rasterFunction&&(t=J.fromJSON({...t.toJSON(),rasterFunction:t.rasterFunction,rasterFunctionArguments:t.rasterFunctionArguments})),this._set("renderingRule",t)}readRenderingRule(e,t){const r=t.rasterFunctionInfos;return t.renderingRule||r&&r.length&&"None"!==r[0].name?this._isRFTJson(t.renderingRule)?J.fromJSON({rasterFunctionDefinition:t.renderingRule}):J.fromJSON(t.renderingRule||{rasterFunctionInfos:t.rasterFunctionInfos}):null}writeRenderingRule(e,t,r){const i=e.toJSON();i.rasterFunctionDefinition?t[r]=i.rasterFunctionDefinition:t[r]=i}readSpatialReference(e,t){const r=e||t.extent.spatialReference;return r?de.fromJSON(r):null}readPixelType(e){return fe.fromJSON(e)||e}writePixelType(e,t,r){(c(this.serviceRasterInfo)||this.pixelType!==this.serviceRasterInfo.pixelType)&&(t[r]=fe.toJSON(e))}readVersion(e,t){let r=t.currentVersion;return r||(r=t.hasOwnProperty("fields")||t.hasOwnProperty("timeInfo")?10:9.3),r}applyFilter(e){let t=e;return this.pixelFilter&&(t=this._clonePixelData(e),this.pixelFilter(t)),t}async applyRenderer(e,t){let r=e;if(!this._isPicture()&&this.renderer&&this._symbolizer&&!this.pixelFilter){const i=JSON.stringify(this._cachedRendererJson)!==JSON.stringify(this.renderer.toJSON()),s=this._rasterJobHandler.instance,{bandIds:n}=this;if(s){i&&(this._symbolizer.bind(),await s.updateSymbolizer(this._symbolizer,t),this._cachedRendererJson=this.renderer.toJSON());const a=await s.symbolize({bandIds:n,...e},t);r={extent:e.extent,pixelBlock:a}}else r={extent:e.extent,pixelBlock:this._symbolizer.symbolize({bandIds:n,...e})}}return r}destroy(){this._shutdownJobHandler()}increaseRasterJobHandlerUsage(){this._rasterJobHandler.refCount++}decreaseRasterJobHandlerUsage(){this._rasterJobHandler.refCount--,this._rasterJobHandler.refCount<=0&&this._shutdownJobHandler()}async computeAngles(e,t){if(await this._fetchCapabilities(null==t?void 0:t.signal),!this.capabilities.operations.supportsComputeAngles)throw new a("imagery-layer:compute-angles","this operation is not supported on the input image service");return e=y(oe,e).clone(),B(this.url,e,this._getRequestOptions(t))}async computePixelSpaceLocations(e,t){if(await this._fetchCapabilities(null==t?void 0:t.signal),!this.capabilities.operations.supportsComputePixelLocation)throw new a("imagery-layer:compute-pixel-space-locations","this operation is not supported on the input image service");return e=y(pe,e).clone(),G(this.url,e,this._getRequestOptions(t))}async computeHistograms(e,t){if(await this._fetchCapabilities(null==t?void 0:t.signal),!this.capabilities.operations.supportsComputeHistograms)throw new a("imagery-layer:compute-histograms","this operation is not supported on the input image service");e=y(le,e).clone();const{raster:r,mosaicRule:i,renderingRule:s}=this;return s&&null==e.renderingRule&&(e.renderingRule=s),i&&null==e.mosaicRule&&(e.mosaicRule=i),r&&null==e.raster&&(e.raster=r),W(this.url,e,this._getRequestOptions(t))}async computeStatisticsHistograms(e,t){if(await this._fetchCapabilities(null==t?void 0:t.signal),!this.capabilities.operations.supportsComputeStatisticsHistograms)throw new a("imagery-layer:compute-statistics-histograms","this operation is not supported on the input image service");e=y(le,e).clone();const{raster:r,mosaicRule:i,renderingRule:s}=this;return s&&null==e.renderingRule&&(e.renderingRule=s),i&&null==e.mosaicRule&&(e.mosaicRule=i),r&&null==e.raster&&(e.raster=r),X(this.url,e,this._getRequestOptions(t))}getField(e){const{fieldsIndex:t}=this;return p(t)?t.get(e):void 0}getFieldDomain(e,t){const r=this.getField(e);return r?r.domain:null}fetchImage(e,t,r,i={}){if(null==e||null==t||null==r)return Promise.reject(new a("imagery-layer:fetch-image","Insufficient parameters for requesting an image. A valid extent, width and height values are required."));const s=this.renderer||this._symbolizer?this.generateRasterInfo(this.renderingRule,{signal:i.signal}):null;return d(s).then((s=>{s&&(this.rasterInfo=s);const n={imageServiceParameters:this.getExportImageServiceParameters(e,t,r,i.timeExtent),imageProps:{extent:e,width:t,height:r,format:this.format},requestAsImageElement:i.requestAsImageElement&&!this.pixelFilter||!1,signal:i.signal};return this._requestArrayBuffer(n)}))}fetchKeyProperties(e){return n(this.parsedUrl.path+"/keyProperties",{query:this._getQueryParams({renderingRule:this.version>=10.3?null==e?void 0:e.renderingRule:null})}).then((e=>e.data))}fetchRasterAttributeTable(e){return this.version<10.1?Promise.reject(new a("#fetchRasterAttributeTable()","Failed to get rasterAttributeTable")):n(this.parsedUrl.path+"/rasterAttributeTable",{query:this._getQueryParams({renderingRule:this.version>=10.3?null==e?void 0:e.renderingRule:null})}).then((e=>ae.fromJSON(e.data)))}async getCatalogItemRasterInfo(e,t){const r=n(this.parsedUrl.path+"/"+e+"/info",{query:this._getQueryParams(),...t}).then((e=>e.data)),i=n(this.parsedUrl.path+"/"+e+"/info/keyProperties",{query:this._getQueryParams(),...t}).then((e=>e.data)).catch((()=>{})),s=await Promise.all([r,i]);if(!s[0])return;const a=ee.fromJSON(s[0].extent),o=s[0].statistics?s[0].statistics.map((e=>({min:e[0],max:e[1],avg:e[2],stddev:e[3]}))):null;return new q({bandCount:s[0].bandCount,extent:a,spatialReference:a.sr,pixelSize:new te({x:s[0].pixelSizeX,y:s[0].pixelSizeY,spatialReference:a.sr}),pixelType:s[0].pixelType.toLowerCase(),statistics:o,histograms:s[0].histograms,keyProperties:s[1]||{}})}async getCatalogItemICSInfo(e,t){const{data:r}=await n(this.parsedUrl.path+"/"+e+"/info/ics",{query:this._getQueryParams(),...t}),i=r&&r.ics;if(!i)return;let s=null;try{s=(await n(this.parsedUrl.path+"/"+e+"/info",{query:this._getQueryParams(),...t})).data.extent}catch{}if(!s||!s.spatialReference)return{ics:i,icsToPixelTransform:null,icsExtent:null,northDirection:null};const a=this.version>=10.7?n(this.parsedUrl.path+"/"+e+"/info/icstopixel",{query:this._getQueryParams(),...t}).then((e=>e.data)).catch((()=>({}))):{},o=s.spatialReference,l={geometries:JSON.stringify({geometryType:"esriGeometryEnvelope",geometries:[s]}),inSR:o.wkid||JSON.stringify(o),outSR:"0:"+e},u=n(this.parsedUrl.path+"/project",{query:this._getQueryParams(l),...t}).then((e=>e.data)).catch((()=>({}))),p=5,c=(s.xmin+s.xmax)/2,m=(s.ymax-s.ymin)/(p+1),d=s.ymin+m,h=[];for(let n=0;n<p;n++)h.push({x:c,y:d+m*n});const f={geometries:JSON.stringify({geometryType:"esriGeometryPoint",geometries:h}),inSR:o.wkid||JSON.stringify(o),outSR:"0:"+e},y=n(this.parsedUrl.path+"/project",{query:this._getQueryParams(f),...t}).then((e=>e.data)).catch((()=>({}))),g=await Promise.all([a,u,y]);let R=g[0].ipxf;if(null==R){var v,x,b;const e=null==(v=i.geodataXform)?void 0:v.xf_0;"topup"===(null==e||null==(x=e.name)?void 0:x.toLowerCase())&&6===(null==e||null==(b=e.coefficients)?void 0:b.length)&&(R={affine:{name:"ics [sensor: Frame] to pixel (column, row) transformation",coefficients:e.coefficients,cellsizeRatio:0,type:"GeometricXform"}})}const S=ee.fromJSON(g[1]&&g[1].geometries&&g[1].geometries[0]);S&&(S.spatialReference=new de({wkid:0,imageCoordinateSystem:i}));const I=g[2].geometries?g[2].geometries.filter((e=>null!=e&&null!=e.x&&null!=e.y&&"NaN"!==e.x&&"NaN"!==e.y)):[],_=I.length;if(_<3)return{ics:i,icsToPixelTransform:R,icsExtent:S,northDirection:null};let w=0,F=0,O=0,D=0;for(let n=0;n<_;n++)w+=I[n].x,F+=I[n].y,O+=I[n].x*I[n].x,D+=I[n].x*I[n].y;const P=(_*D-w*F)/(_*O-w*w);let T=0;const j=I[p-1].x>I[0].x,N=I[p-1].y>I[0].y;return P===1/0?T=N?90:270:0===P?T=j?0:180:P>0?T=j?180*Math.atan(P)/Math.PI:180*Math.atan(P)/Math.PI+180:P<0&&(T=N?180+180*Math.atan(P)/Math.PI:360+180*Math.atan(P)/Math.PI),{ics:i,icsToPixelTransform:R,icsExtent:S,northDirection:T}}async generateRasterInfo(e,t){var r;if((!e||"none"===(null==e||null==(r=e.functionName)?void 0:r.toLowerCase())||this._isVectorFieldResampleFunction(e))&&p(this.serviceRasterInfo))return this.serviceRasterInfo;const i=Re(e);if(this._functionRasterInfos[i])return this._functionRasterInfos[i];const s=this._generateRasterInfo(e,t);this._functionRasterInfos[i]=s;try{return await s}catch{return this._functionRasterInfos[i]=null,null}}getExportImageServiceParameters(e,t,r,i){var s;e=e.clone().shiftCentralMeridian();const n=Y(e.spatialReference,this.parsedUrl.path);p(this.serviceRasterInfo)&&this.pixelType!==this.serviceRasterInfo.pixelType&&(this.exportImageServiceParameters.pixelType=this.pixelType);const a=this.exportImageServiceParameters.toJSON(),{bandIds:o,noData:l}=a;let{renderingRule:u}=a;const c=!this.renderer||"raster-stretch"===this.renderer.type;if(null!=o&&o.length&&this._hasRenderingRule(this.renderingRule)&&c){const e={rasterFunction:"ExtractBand",rasterFunctionArguments:{BandIds:o}};if("Stretch"===u.rasterFunction)e.rasterFunctionArguments.Raster=u.rasterFunctionArguments.Raster,u.rasterFunctionArguments.Raster=e;else if("Colormap"===u.rasterFunction){const t=u.rasterFunctionArguments.Raster;"Stretch"===(null==t?void 0:t.rasterFunction)?(e.rasterFunctionArguments.Raster=t.rasterFunctionArguments.Raster,t.rasterFunctionArguments.Raster=e):(e.rasterFunctionArguments.Raster=t,u.rasterFunctionArguments.Raster=e)}else e.rasterFunctionArguments.Raster=u,u=e;a.bandIds=void 0}else a.bandIds=null==o?void 0:o.join(",");l instanceof Array&&l.length>0&&(a.noData=l.join(","));const m=this._serviceSupportsMosaicRule?this._combineMosaicRuleWithTimeExtent(this.exportImageServiceParameters.mosaicRule,i):null;a.mosaicRule=m&&JSON.stringify(m),a.renderingRule=u&&null!=(s=u)&&s.rasterFunctionDefinition?JSON.stringify(u.rasterFunctionDefinition):JSON.stringify(u);const d={};if(i){const{start:e,end:t}=i.toJSON();e&&t&&e===t?d.time=""+e:null==e&&null==t||(d.time=`${null==e?"null":e},${null==t?"null":t}`)}return{bbox:e.xmin+","+e.ymin+","+e.xmax+","+e.ymax,bboxSR:n,imageSR:n,size:t+","+r,...a,...d}}async getSamples(e,t){if(await this._fetchCapabilities(null==t?void 0:t.signal),!this.capabilities.operations.supportsGetSamples)throw new a("imagery-layer:get-samples","getSamples operation is not supported on the input image service");e=y(ce,e).clone();const{raster:r}=this;return r&&null==e.raster&&(e.raster=r),K(this.url,e,this._getRequestOptions(t))}async identify(e,t){if(await this._fetchCapabilities(null==t?void 0:t.signal),!this.capabilities.operations.supportsIdentify)throw new a("imagery-layer:query-rasters","query operation is not supported on the input image service");e=y(ue,e).clone();const{raster:r,mosaicRule:i,renderingRule:s}=this;if(s&&null==e.renderingRule&&(e.renderingRule=s),i&&null==e.mosaicRule){const t=this._combineMosaicRuleWithTimeExtent(i,e.timeExtent);e.mosaicRule=m(t)}return r&&null==e.raster&&(e.raster=r),$(this.url,e,this._getRequestOptions(t))}createQuery(){const e=new ie;return e.outFields=["*"],e.returnGeometry=!0,e.where=this.definitionExpression||"1=1",e}async queryRasters(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),ne(this.url,e,t)}async queryObjectIds(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),se(this.url,e,t)}async queryRasterCount(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),Z(this.url,e,t)}async queryVisibleRasters(e,t){if(!e)throw new a("imagery-layer: query-visible-rasters","missing query parameter");const{pixelSize:r,returnDomainValues:i,returnTopmostRaster:s,showNoDataRecords:n}=t||{pixelSize:null,returnDomainValues:!1,returnTopmostRaster:!1,showNoDataRecords:!1};let o=!1,l=null,u=null;const m="raster.servicepixelvalue",d=this.rasterFunctionNamesIndex;if(p(e.outFields)&&(o=e.outFields.some((e=>-1===e.toLowerCase().indexOf(m))),this.version>=10.4)){const t=e.outFields.filter((e=>e.toLowerCase().indexOf(m)>-1&&e.length>m.length)).map((e=>{const t=e.slice(m.length+1);return[this._updateRenderingRulesFunctionName(t,d),t]}));l=t.map((e=>new J({functionName:e[0]}))),u=t.map((e=>e[1])),0===l.length?this.renderingRule?(l.push(this.renderingRule),u.push(this.renderingRule.functionName)):l=null:this.renderingRule&&!l.some((e=>e.functionName===this.renderingRule.functionName))&&(l.push(this.renderingRule),u.push(this.renderingRule.functionName))}const h=c(e.outSpatialReference)||e.outSpatialReference.equals(this.spatialReference),f=e.timeExtent||this.timeExtent,y=this._combineMosaicRuleWithTimeExtent(this.exportImageServiceParameters.mosaicRule,f),g=this._getQueryParams({geometry:e.geometry,timeExtent:f,mosaicRule:y,renderingRule:this.version<10.4?this.renderingRule:null,renderingRules:l,pixelSize:r,returnCatalogItems:o,returnGeometry:h,raster:this.raster,maxItemCount:s?1:null});delete g.f;const R=new ue(g);try{var v,x;await this.generateRasterInfo(this.renderingRule);const r=await $(this.url,R,{signal:null==t?void 0:t.signal,query:{...this.customParameters}}),s=e.outFields,a=r.value.toLowerCase().indexOf("nodata")>-1;if(!(o&&!h&&(null==r||null==(v=r.catalogItems)?void 0:v.features.length)&&(n||!a)))return this._processVisibleRastersResponse(r,{returnDomainValues:i,templateRRFunctionNames:u,showNoDataRecords:n,templateFields:s});const l=this.objectIdField||"ObjectId",c=r.catalogItems.features,m=c.map((e=>{var t;return null==(t=e.attributes)?void 0:t[l]})),d=new ie({objectIds:m,returnGeometry:!0,outSpatialReference:e.outSpatialReference,outFields:[l]}),f=await this.queryRasters(d);return null!=f&&null!=(x=f.features)&&x.length&&f.features.forEach((t=>{c.forEach((r=>{r.attributes[l]===t.attributes[l]&&(r.geometry=new re(t.geometry),p(e.outSpatialReference)&&(r.geometry.spatialReference=e.outSpatialReference))}))})),this._processVisibleRastersResponse(r,{returnDomainValues:i,templateRRFunctionNames:u,showNoDataRecords:n,templateFields:s})}catch{throw new a("imagery-layer:query-visible-rasters","encountered error when querying visible rasters")}}async fetchVariableStatisticsHistograms(e,t){const r=n(this.parsedUrl.path+"/statistics",{query:this._getQueryParams({variable:e}),signal:t}).then((e=>{var t;return null==(t=e.data)?void 0:t.statistics})),i=n(this.parsedUrl.path+"/histograms",{query:this._getQueryParams({variable:e}),signal:t}).then((e=>{var t;return null==(t=e.data)?void 0:t.histograms})),s=await Promise.all([r,i]);return s[0]&&s[0].forEach((e=>{e.avg=e.mean,e.stddev=e.standardDeviation})),{statistics:s[0]||null,histograms:s[1]||null}}async createStreamlinesMesh(e,t){const r=this._rasterJobHandler.instance;return r?r.createStreamlinesMesh(e,t):me(e.rendererSettings,e.flowData,p(t.signal)?t.signal:(new AbortController).signal)}async _fetchService(e){await this._fetchServiceInfo(e),p(this.serviceRasterInfo)&&!this.rasterInfo&&(this.rasterInfo=this.serviceRasterInfo);const t=this.sourceJSON,r=p(this.serviceRasterInfo)?Promise.resolve(this.serviceRasterInfo):this._fetchAuxiliaryRasterInfo({serviceInfo:t,signal:e}).then((e=>(this._set("serviceRasterInfo",e),e))),i=this._hasRenderingRule(this.renderingRule)?this.generateRasterInfo(this.renderingRule,{signal:e}):null,s=this._getRasterFunctionInfos();return Promise.all([r,i,s]).then((e=>{e[1]?this._set("rasterInfo",e[1]):this._set("rasterInfo",e[0]),e[2]&&this._set("rasterFunctionInfos",e[2]),this.renderer&&!this._isSupportedRenderer(this.renderer)&&(this.renderer=null,he.warn("ArcGISImageService","Switching to the default renderer. Renderer applied is not valid for this Imagery Layer")),this._configDefaultRenderer(),this.watch("renderer",(()=>this._configDefaultRenderer())),this.watch("renderingRule",(e=>{(this.renderer||this._symbolizer||this.popupEnabled&&this.popupTemplate)&&this.generateRasterInfo(e).then((e=>{e&&(this.rasterInfo=e)}))}));const t=p(this.serviceRasterInfo)&&this.serviceRasterInfo.multidimensionalInfo;t&&this._updateMultidimensionalDefinition(t)}))}_combineMosaicRuleWithTimeExtent(e,t){const r=this.timeInfo;if(c(e)||c(this.multidimensionalInfo)||c(t)||c(null==r?void 0:r.startField))return e;const{startField:i}=r;var s;if(e=e.clone(),"mosaic-dataset"===this._serviceSourceType)return e.multidimensionalDefinition=null==(s=e.multidimensionalDefinition)?void 0:s.filter((e=>e.dimensionName!==i)),this._cleanupMultidimensionalDefinition(e);e.multidimensionalDefinition=e.multidimensionalDefinition||[];const n=e.multidimensionalDefinition.filter((e=>e.dimensionName===i)),a=p(t.start)?t.start.getTime():null,o=p(t.end)?t.end.getTime():null,l=null==a||null==o||a===o,u=l?[a||o]:[[a,o]],m=this.version>=10.8;if(n.length)n.forEach((e=>{e.dimensionName===i&&(m?(e.dimensionName=null,e.isSlice=null,e.values=null):(e.isSlice=l,e.values=u))}));else if(!m){const t=e.multidimensionalDefinition.filter((e=>null!=e.variableName&&null==e.dimensionName));t.length?t.forEach((e=>{e.dimensionName=i,e.isSlice=l,e.values=u})):e.multidimensionalDefinition.push(new F({variableName:"",dimensionName:i,isSlice:l,values:u}))}return this._cleanupMultidimensionalDefinition(e)}_cleanupMultidimensionalDefinition(e){return c(e)?null:(e.multidimensionalDefinition&&(e.multidimensionalDefinition=e.multidimensionalDefinition.filter((e=>!(!e.variableName&&!e.dimensionName))),0===e.multidimensionalDefinition.length&&(e.multidimensionalDefinition=null)),"mosaic-dataset"!==this._serviceSourceType&&null==e.multidimensionalDefinition?null:e)}async _prepareForQuery(e,t){var r;if(await this._fetchCapabilities(null==(r=t)?void 0:r.signal),!this.capabilities.operations.supportsQuery)throw new a("imagery-layer:query-rasters","query operation is not supported on the input image service");return e=p(e)?y(ie,e):this.createQuery(),t=this._getRequestOptions(t),this.raster&&(t.query={...t.query,raster:this.raster}),{query:e,requestOptions:t}}async _initJobHandler(){if(null!=this._rasterJobHandler.connectionPromise)return this._rasterJobHandler.connectionPromise;const e=new V;this._rasterJobHandler.connectionPromise=e.initialize().then((()=>{this._rasterJobHandler.instance=e}),(()=>null)),await this._rasterJobHandler.connectionPromise}_shutdownJobHandler(){this._rasterJobHandler.instance&&this._rasterJobHandler.instance.destroy(),this._rasterJobHandler.instance=null,this._rasterJobHandler.connectionPromise=null,this._rasterJobHandler.refCount=0}_isSupportedRenderer(e){const{rasterInfo:t,renderingRule:r}=this;return"unique-value"===e.type&&this._hasRenderingRule(r)&&1===t.bandCount&&["u8","s8"].includes(t.pixelType)||Q(this.rasterInfo).includes(this.renderer.type)}async _fetchCapabilities(e){return this.capabilities||await this._fetchServiceInfo(e),this.capabilities}async _fetchServiceInfo(e){var t;let r=this.sourceJSON;if(!r){const{data:t,ssl:i}=await n(this.parsedUrl.path,{query:this._getQueryParams(),signal:e});r=t,this.sourceJSON=r,i&&(this.url=this.url.replace(/^http:/i,"https:"))}if((null==(t=r.capabilities)?void 0:t.toLowerCase().split(",").map((e=>e.trim())).indexOf("tilesonly"))>-1)throw new a("imagery-layer:fetch-service-info","use ImageryTileLayer to open tiles-only image services");this.read(r,{origin:"service",url:this.parsedUrl})}_isMosaicDataset(e){var t;return e.serviceSourceType?"esriImageServiceSourceTypeMosaicDataset"===e.serviceSourceType:(null==(t=e.fields)?void 0:t.length)>0}_isMosaicRuleSupported(e){var t;if(!e)return!1;const r=this._isMosaicDataset(e),i=e.currentVersion>=10.71&&e.hasMultidimensions&&e.timeInfo&&!(e.objectIdField&&(null==(t=e.fields)?void 0:t.length)>1);return r||i}_isVectorFieldResampleFunction(e){if(!p(e))return!1;const{functionName:t,functionArguments:r}=e,i="resample"===(null==t?void 0:t.toLowerCase()),s=(null==r?void 0:r.ResampleType)||(null==r?void 0:r.resampleType);return i&&(7===s||10===s)}_isPicture(){return!this.format||this.format.indexOf("jpg")>-1||this.format.indexOf("png")>-1}_configDefaultRenderer(){if(!this._isPicture()&&!this.pixelFilter){if(!this.bandIds&&this.rasterInfo.bandCount>=3){const e=U(this.rasterInfo);!e||3===this.rasterInfo.bandCount&&0===e[0]&&1===e[1]&&2===e[2]||(this.bandIds=e)}var e,t;if(!this.renderer)this.renderer=H(this.rasterInfo,{bandIds:this.bandIds,variableName:this.renderingRule?null:null==(e=this.mosaicRule)||null==(t=e.multidimensionalDefinition)?void 0:t[0].variableName});this._symbolizer?(this._symbolizer.rendererJSON=L(this.renderer.toJSON()),this._symbolizer.rasterInfo=this.rasterInfo):this._symbolizer=new k({rendererJSON:this.renderer.toJSON(),rasterInfo:this.rasterInfo}),this._symbolizer.bind().success||(this._symbolizer=null)}}_clonePixelData(e){return null==e?e:{extent:e.extent&&e.extent.clone(),pixelBlock:p(e.pixelBlock)&&e.pixelBlock.clone()}}_getQueryParams(e){p(null==e?void 0:e.renderingRule)&&"string"!=typeof e.renderingRule&&(e.renderingRule=this._getRenderingRuleString(e.renderingRule));const{raster:t,viewId:r}=this;return{raster:t,viewId:r,f:"json",...e,...this.customParameters}}_getRequestOptions(e){return{...e,query:{...null==e?void 0:e.query,...this.customParameters}}}_decodePixelBlock(e,t,r){return this._rasterJobHandler.instance?this._rasterJobHandler.instance.decode({data:e,options:t}):A(e,t,r)}async _fetchMultidimensionalInfo(e){var t;const r=await n(this.parsedUrl.path+"/multidimensionalInfo",{query:this._getQueryParams(),signal:e}).then((e=>{var t;return null==(t=e.data)?void 0:t.multidimensionalInfo}));return null!=(t=r.variables)&&t.length&&r.variables.forEach((e=>{var t;null!=(t=e.statistics)&&t.length&&e.statistics.forEach((e=>{e.avg=e.mean,e.stddev=e.standardDeviation}))})),r}async _getRasterFunctionInfos(e){const t=this.sourceJSON.rasterFunctionInfos;if(this.serviceRasterInfo)return t;if(t&&this.version>=10.3){var r;if(1===t.length&&"none"===t[0].name.toLowerCase())return t;return null==(r=(await n(this.parsedUrl.path+"/rasterFunctionInfos",{query:this._getQueryParams(),signal:e})).data)?void 0:r.rasterFunctionInfos}return null}async _fetchAuxiliaryRasterInfo(e){const t=e&&e.serviceInfo;if(!t)return Promise.reject(new a("imagery-layer:fetch-metadata","valid serviceInfo is required"));const r=e.signal,i=!!(t.hasRasterAttributeTable&&this.version>=10.1)&&n(this.parsedUrl.path+"/rasterAttributeTable",{query:this._getQueryParams({renderingRule:this.version>=10.1?null==e?void 0:e.renderingRule:null}),signal:r}).then((e=>ae.fromJSON(e.data))).catch((()=>null)),s=!!(t.hasColormap&&this.version>=10.1)&&n(this.parsedUrl.path+"/colormap",{query:this._getQueryParams({renderingRule:this.version>=10.6?null==e?void 0:e.renderingRule:null}),signal:r}).then((e=>{var t;return null==(t=e.data)?void 0:t.colormap})),o=!!(t.hasHistograms&&this.version>=10.1)&&n(this.parsedUrl.path+"/histograms",{query:this._getQueryParams({renderingRule:this.version>=10.1?null==e?void 0:e.renderingRule:null}),signal:r}).then((e=>{var t;return null==(t=e.data)?void 0:t.histograms})),l=this.version>=10.3&&n(this.parsedUrl.path+"/keyProperties",{query:this._getQueryParams({renderingRule:null==e?void 0:e.renderingRule}),signal:r}).then((e=>e.data)).catch((()=>{})),u=!!(t.hasMultidimensions&&this.version>=10.3)&&this._fetchMultidimensionalInfo(),p=await Promise.all([i,s,o,l,u]);let c=null;if(t.minValues&&t.minValues.length===t.bandCount){c=[];for(let e=0;e<t.minValues.length;e++)c.push({min:t.minValues[e],max:t.maxValues[e],avg:t.meanValues[e],stddev:t.stdvValues[e]})}const m=Math.ceil((t.extent.xmax-t.extent.xmin)/t.pixelSizeX-.1),d=Math.ceil((t.extent.ymax-t.extent.ymin)/t.pixelSizeY-.1),h=de.fromJSON(t.spatialReference||t.extent.spatialReference);return new q({width:m,height:d,bandCount:t.bandCount,extent:ee.fromJSON(t.extent),spatialReference:h,pixelSize:new te({x:t.pixelSizeX,y:t.pixelSizeY,spatialReference:h}),pixelType:t.pixelType.toLowerCase(),statistics:c,attributeTable:p[0]||null,colormap:p[1]||null,histograms:p[2]||null,keyProperties:p[3]||{},multidimensionalInfo:p[4]||null})}async _requestArrayBuffer(e){var t;const{imageProps:r,requestAsImageElement:i,signal:s}=e;if(i&&!this.pixelFilter&&(null==(t=r.format)?void 0:t.indexOf("png"))>-1){return{imageElement:(await n(this.parsedUrl.path+"/exportImage",{responseType:"image",query:this._getQueryParams({f:"image",...e.imageServiceParameters}),signal:s})).data,params:r}}const o=this._initJobHandler(),l=n(this.parsedUrl.path+"/exportImage",{responseType:"array-buffer",query:this._getQueryParams({f:"image",...e.imageServiceParameters}),signal:s}),u=(await Promise.all([l,o]))[0].data,p=r.format||"jpgpng";let c=p;if("bsq"!==c&&"bip"!==c&&(c=z(u)),!c)throw new a("imagery-layer:fetch-image","unsupported format signature "+String.fromCharCode.apply(null,new Uint8Array(u)));const m={signal:s},d="gif"===p||"bmp"===p||p.indexOf("png")>-1&&("png"===c||"jpg"===c)?A(u,{useCanvas:!0,...r},m):this._decodePixelBlock(u,{width:r.width,height:r.height,planes:null,pixelType:null,noDataValue:null,format:p},m);return{pixelData:{pixelBlock:await d,extent:r.extent},params:r}}async _generateRasterInfo(e,t){const{data:r}=await n(this.parsedUrl.path,{query:this._getQueryParams({renderingRule:e}),...t});return await this._fetchAuxiliaryRasterInfo({serviceInfo:r,renderingRule:e,...t})}_isValidCustomizedMosaicRule(e){var t;return e&&JSON.stringify(e.toJSON())!==JSON.stringify(null==(t=this._defaultServiceMosaicRule)?void 0:t.toJSON())}_updateMultidimensionalDefinition(e){if(this._isValidCustomizedMosaicRule(this.mosaicRule))return;const t=e.variables[0].dimensions,r="",i=[];for(const s in t)if(t.hasOwnProperty(s)){const e=t[s],n=e.extent;let a=!0,o=[n[0]];e.hasRanges&&!0===e.hasRanges?(a=!1,o=[e.values[0]]):"stdz"===e.name.toLowerCase()&&Math.abs(n[1])<=Math.abs(n[0])&&(o=[n[1]]),i.push(new F({variableName:r,dimensionName:t[s].name,isSlice:a,values:o}))}if(i.length>0){this.mosaicRule=this.mosaicRule||new j;const e=this.mosaicRule.multidimensionalDefinition;(!e||e&&e.length<=0)&&(this.mosaicRule.multidimensionalDefinition=i)}}_formatAttributeValue(e,t){if("string"==typeof e){const r=this.popupTemplate&&this.popupTemplate.fieldInfos,i=this._getFieldInfo(r,t),s=i&&i.format;if(s){let t,r;return e.trim().indexOf(",")>-1?(t=",",r=t+" ",this._formatDelimitedString(e,t,r,s)):e.trim().indexOf(" ")>-1?(t=r=" ",this._formatDelimitedString(e,t,r,s)):this._formatNumberFromString(e,s)}}return e}_getFieldInfo(e,t){if(!e||!e.length||!t)return;const r=t.toLowerCase();let i;return e.some((e=>!(!e.fieldName||e.fieldName.toLowerCase()!==r&&e.fieldName.toLowerCase()!==r.replace(/ /g,"_"))&&(i=e,!0))),i}_formatDelimitedString(e,t,r,i){return e&&t&&r&&i?e.trim().split(t).map((e=>this._formatNumberFromString(e,i))).join(r):e}_formatNumberFromString(e,t){if(!e||!t)return e;const r=Number(e);return isNaN(r)?e:t.format(r)}_processVisibleRastersResponse(e,r){r=r||{};const i=e.value,{templateRRFunctionNames:s,showNoDataRecords:n,returnDomainValues:a,templateFields:o}=r,l=e.processedValues;let u=e.catalogItems&&e.catalogItems.features,c=e.properties&&e.properties.Values&&e.properties.Values.map((e=>e.replace(/ /gi,", ")))||[];const m=this.objectIdField||"ObjectId",d="string"==typeof i&&i.toLowerCase().indexOf("nodata")>-1,h=[];if(i&&!u&&!d){const e={};e[m]=0;c=[i],u=[new t(this.fullExtent,null,e)]}if(!u)return[];let f,y,g;this._updateResponseFieldNames(u,o),d&&!n&&(u=[]);for(let t=0;t<u.length;t++){if(f=u[t],null!=i){if(y=c[t],g=this.renderingRule&&l&&l.length>0&&s&&s.length>0&&s.indexOf(this.renderingRule.functionName)>-1?l[s.indexOf(this.renderingRule.functionName)]:i,"nodata"===y.toLowerCase()&&!n)continue;const e="Raster.ItemPixelValue",r="Raster.ServicePixelValue";f.attributes[e]=this._formatAttributeValue(y,e),f.attributes[r]=this._formatAttributeValue(g,r),this._updateFeatureWithMagDirValues(f,y);const a=this.fields&&this.fields.length>0;let o=this.renderingRule&&p(this.serviceRasterInfo)&&this.serviceRasterInfo.attributeTable?a?y:i:g;this.renderingRule||(o=a?y:i),this._updateFeatureWithRasterAttributeTableValues(f,o)}if(f.sourceLayer=f.layer=this,a&&this._updateFeatureWithDomainValues(f),s&&l&&s.length===l.length)for(let e=0;e<s.length;e++){const t="Raster.ServicePixelValue."+s[e];f.attributes[t]=this._formatAttributeValue(l[e],t)}h.push(u[t])}return h}_updateFeatureWithRasterAttributeTableValues(e,t){const r=this.rasterInfo&&this.rasterInfo.attributeTable||p(this.serviceRasterInfo)&&this.serviceRasterInfo.attributeTable,i=r&&r.features;if(!i)return;const s=r.fields,n=s.map((e=>e.name)).filter((e=>"value"===e.toLowerCase())),a=n&&n[0];if(!a)return;const o=i.filter((e=>e.attributes[a]===(null!=t?parseInt(t,10):null)));o&&o[0]&&s.forEach((t=>{const r=this.rasterAttributeTableFieldPrefix+t.name;e.attributes[r]=this._formatAttributeValue(o[0].attributes[t.name],r)}))}_updateFeatureWithMagDirValues(e,t){if("esriImageServiceDataTypeVector-UV"!==this.serviceDataType&&"esriImageServiceDataTypeVector-MagDir"!==this.serviceDataType)return;const r=t.split(/,\s*/).map((e=>parseFloat(e))),i=r.map((e=>[e])),s=r.map((e=>({minValue:e,maxValue:e,noDataValue:null}))),n=new N({height:1,width:1,pixelType:"f32",pixels:i,statistics:s});null!=this.pixelFilter&&this.pixelFilter({pixelBlock:n,extent:new ee(0,0,0,0,this.spatialReference)});const a="esriImageServiceDataTypeVector-MagDir"===this.serviceDataType?[n.pixels[0][0],n.pixels[1][0]]:E([n.pixels[0][0],n.pixels[1][0]]);e.attributes["Raster.Magnitude"]=a[0],e.attributes["Raster.Direction"]=a[1]}_updateFeatureWithDomainValues(e){const t=this.fields&&this.fields.filter((e=>e.domain&&"coded-value"===e.domain.type));null!=t&&t.forEach((t=>{const r=e.attributes[t.name];if(null!=r){const i=t.domain.codedValues.filter((e=>e.code===r))[0];i&&(e.attributes[t.name]=i.name)}}))}_updateResponseFieldNames(e,t){if(!t||t.length<1)return;const r=this.fieldsIndex;p(r)&&e.forEach((e=>{if(e&&e.attributes)for(const i of t)if(r.has(i)){const t=r.get(i).name;t!==i&&(e.attributes[i]=e.attributes[t],delete e.attributes[t])}}))}_getRenderingRuleString(e){if(this._hasRenderingRule(e)){var t;let r=e.toJSON();return r=null!=(t=r.rasterFunctionDefinition)?t:r,(r.thumbnail||r.thumbnailEx)&&(r.thumbnail=r.thumbnailEx=null),JSON.stringify(r)}return null}_hasRenderingRule(e){return e&&e.functionName&&"none"!==e.functionName.toLowerCase()}_updateRenderingRulesFunctionName(e,t){if(!e||e.length<1)return;if("Raw"===e)return e.replace("Raw","None");const r=e.toLowerCase().replace(/ /gi,"_");return t.has(r)?t.get(r):e}_isRFTJson(e){return e&&e.name&&e.arguments&&e.function&&e.hasOwnProperty("functionType")}_readCapabilities(e){const t=e.capabilities?e.capabilities.toLowerCase().split(",").map((e=>e.trim())):["image","catalog"],{currentVersion:r,advancedQueryCapabilities:i,maxRecordCount:s}=e,n=t.indexOf("image")>-1,a="esriImageServiceDataTypeElevation"===e.serviceDataType,o=!!(e.spatialReference||e.extent&&e.extent.spatialReference),l=t.includes("edit");return{data:{supportsAttachment:!1},operations:{supportsComputeHistograms:n,supportsExportImage:n,supportsIdentify:n,supportsMeasure:t.indexOf("mensuration")>-1&&o,supportsDownload:t.indexOf("download")>-1,supportsQuery:t.indexOf("catalog")>-1&&e.fields&&e.fields.length>0,supportsGetSamples:r>=10.2&&n,supportsProject:r>=10.3&&n,supportsComputeStatisticsHistograms:r>=10.4&&n,supportsQueryBoundary:r>=10.6&&n,supportsCalculateVolume:r>=10.7&&a,supportsComputePixelLocation:r>=10.7&&t.indexOf("catalog")>-1,supportsComputeAngles:r>=10.91,supportsAdd:l,supportsDelete:l,supportsEditing:l,supportsUpdate:l,supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsChangeTracking:!1,supportsQueryAttachments:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsExceedsLimitStatistics:!1},query:{maxRecordCount:s,maxRecordCountFactor:void 0,supportsStatistics:!(null==i||!i.supportsStatistics),supportsOrderBy:!(null==i||!i.supportsOrderBy),supportsDistinct:!(null==i||!i.supportsDistinct),supportsPagination:!(null==i||!i.supportsPagination),supportsStandardizedQueriesOnly:!(null==i||!i.useStandardizedQueries),supportsPercentileStatistics:!(null==i||!i.supportsPercentileStatistics),supportsCentroid:!(null==i||!i.supportsReturningGeometryCentroid),supportsDistance:!(null==i||!i.supportsQueryWithDistance),supportsExtent:!(null==i||!i.supportsReturningQueryExtent),supportsGeometryProperties:!(null==i||!i.supportsReturningGeometryProperties),supportsHavingClause:!(null==i||!i.supportsHavingClause),supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsMaxRecordCountFactor:!1,supportsSqlExpression:!1,supportsTopFeaturesQuery:!1,supportsQueryByOthers:!1,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!1,supportsCacheHint:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},standardMaxRecordCount:void 0,tileMaxRecordCount:void 0}}}};return e([v()],u.prototype,"_functionRasterInfos",void 0),e([v()],u.prototype,"_rasterJobHandler",void 0),e([v()],u.prototype,"_symbolizer",void 0),e([v({dependsOn:["_serviceSupportsMosaicRule"]})],u.prototype,"_defaultServiceMosaicRule",void 0),e([b("_defaultServiceMosaicRule",["defaultMosaicMethod"])],u.prototype,"readDefaultServiceMosaicRule",null),e([v()],u.prototype,"_cachedRendererJson",void 0),e([v({readOnly:!0})],u.prototype,"_serviceSourceType",void 0),e([b("_serviceSourceType",["serviceSourceType","fields"])],u.prototype,"readServiceSourceType",null),e([v({readOnly:!0})],u.prototype,"_serviceSupportsMosaicRule",void 0),e([b("_serviceSupportsMosaicRule",["currentVersion","fields"])],u.prototype,"readServiceSupportsMosaicRule",null),e([v()],u.prototype,"rasterAttributeTableFieldPrefix",void 0),e([v({readOnly:!0})],u.prototype,"rasterFunctionNamesIndex",null),e([v()],u.prototype,"adjustAspectRatio",void 0),e([v({readOnly:!0}),f("serviceRasterInfo.bandCount")],u.prototype,"bandCount",void 0),e([v({type:[g],json:{write:!0}})],u.prototype,"bandIds",void 0),e([b("bandIds")],u.prototype,"readBandIds",null),e([v({readOnly:!0,json:{read:!1}})],u.prototype,"capabilities",void 0),e([b("service","capabilities",["capabilities","currentVersion","serviceDataType"])],u.prototype,"readCapabilities",null),e([v({type:Number})],u.prototype,"compressionQuality",void 0),e([I("compressionQuality")],u.prototype,"writeCompressionQuality",null),e([v({type:Number})],u.prototype,"compressionTolerance",void 0),e([I("compressionTolerance")],u.prototype,"writeCompressionTolerance",null),e([v({json:{read:{source:"copyrightText"}}})],u.prototype,"copyright",void 0),e([v({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],u.prototype,"definitionExpression",void 0),e([v({readOnly:!0,constructOnly:!0})],u.prototype,"exportImageServiceParameters",void 0),e([v()],u.prototype,"rasterInfo",void 0),e([v({readOnly:!0,type:[D]})],u.prototype,"fields",void 0),e([v({readOnly:!0})],u.prototype,"fieldsIndex",null),e([v({type:["png","png8","png24","png32","jpg","bmp","gif","jpgpng","lerc","tiff"],json:{write:!0}})],u.prototype,"format",null),e([b("service","format",["serviceDataType"])],u.prototype,"readFormat",null),e([v({type:ee})],u.prototype,"fullExtent",void 0),e([v({readOnly:!0})],u.prototype,"hasMultidimensions",void 0),e([v({json:{read:{source:"maxImageHeight"}}})],u.prototype,"imageMaxHeight",void 0),e([v({json:{read:{source:"maxImageWidth"}}})],u.prototype,"imageMaxWidth",void 0),e([v({type:String,json:{type:C.jsonValues,read:C.read,write:C.write}})],u.prototype,"interpolation",void 0),e([v()],u.prototype,"minScale",void 0),e([b("service","minScale")],u.prototype,"readMinScale",null),e([v()],u.prototype,"maxScale",void 0),e([b("service","maxScale")],u.prototype,"readMaxScale",null),e([v({type:j})],u.prototype,"mosaicRule",null),e([b("mosaicRule",["mosaicRule","defaultMosaicMethod"])],u.prototype,"readMosaicRule",null),e([I("mosaicRule")],u.prototype,"writeMosaicRule",null),e([v({readOnly:!0}),f("serviceRasterInfo.multidimensionalInfo")],u.prototype,"multidimensionalInfo",void 0),e([v({json:{type:g}})],u.prototype,"noData",void 0),e([I("noData")],u.prototype,"writeNoData",null),e([v({type:String,json:{type:M.jsonValues,read:M.read,write:M.write}})],u.prototype,"noDataInterpretation",void 0),e([v({type:String,readOnly:!0,json:{read:{source:["fields"]}}})],u.prototype,"objectIdField",void 0),e([b("objectIdField")],u.prototype,"readObjectIdField",null),e([v({})],u.prototype,"geometryType",void 0),e([v({})],u.prototype,"typeIdField",void 0),e([v({})],u.prototype,"types",void 0),e([v({readOnly:!0})],u.prototype,"parsedUrl",null),e([v({readOnly:!0}),f("serviceRasterInfo.pixelSize.x")],u.prototype,"pixelSizeX",void 0),e([v({readOnly:!0}),f("serviceRasterInfo.pixelSize.y")],u.prototype,"pixelSizeY",void 0),e([v({type:Function})],u.prototype,"pixelFilter",void 0),e([v()],u.prototype,"raster",void 0),e([v()],u.prototype,"viewId",void 0),e([v({types:i,json:{name:"layerDefinition.drawingInfo.renderer",origins:{"web-scene":{types:s,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type&&"animated-flow"!==e.type})}}}}})],u.prototype,"renderer",void 0),e([b("renderer")],u.prototype,"readRenderer",null),e([I("renderer")],u.prototype,"writeRenderer",null),e([v(_)],u.prototype,"opacity",void 0),e([v({readOnly:!0}),f("serviceRasterInfo.attributeTable")],u.prototype,"rasterAttributeTable",void 0),e([v({readOnly:!0})],u.prototype,"rasterFields",null),e([v({constructOnly:!0})],u.prototype,"rasterFunctionInfos",void 0),e([v({type:J})],u.prototype,"renderingRule",null),e([b("renderingRule",["renderingRule","rasterFunctionInfos"])],u.prototype,"readRenderingRule",null),e([I("renderingRule")],u.prototype,"writeRenderingRule",null),e([v()],u.prototype,"serviceDataType",void 0),e([v({readOnly:!0,type:de})],u.prototype,"spatialReference",void 0),e([b("spatialReference",["spatialReference","extent"])],u.prototype,"readSpatialReference",null),e([v({json:{type:fe.jsonValues}})],u.prototype,"pixelType",void 0),e([b("pixelType")],u.prototype,"readPixelType",null),e([I("pixelType")],u.prototype,"writePixelType",null),e([v({constructOnly:!0,type:q})],u.prototype,"serviceRasterInfo",void 0),e([v()],u.prototype,"sourceJSON",void 0),e([v(w)],u.prototype,"url",void 0),e([v({readOnly:!0})],u.prototype,"version",void 0),e([b("version",["currentVersion","fields","timeInfo"])],u.prototype,"readVersion",null),u=e([S("esri.layers.mixins.ArcGISImageService")],u),u};export{ve as ArcGISImageService};
5
+ import{_ as e}from"../../chunks/tslib.es6.js";import"../../geometry.js";import t from"../../Graphic.js";import{read as r,rasterRendererTypes as i,websceneRasterRendererTypes as s}from"../../rasterRenderers.js";import n from"../../request.js";import a from"../../core/Error.js";import{strict as o}from"../../core/jsonMap.js";import{clone as l}from"../../core/lang.js";import u from"../../core/Logger.js";import{isSome as p,isNone as c,unwrap as m}from"../../core/maybe.js";import{when as d}from"../../core/promiseUtils.js";import{urlToObject as h}from"../../core/urlUtils.js";import{aliasOf as f}from"../../core/accessorSupport/decorators/aliasOf.js";import{ensureClass as y,Integer as g,ensureNumber as R}from"../../core/accessorSupport/ensureType.js";import{property as v,ensureRange as x}from"../../core/accessorSupport/decorators/property.js";import{reader as b}from"../../core/accessorSupport/decorators/reader.js";import{subclass as S}from"../../core/accessorSupport/decorators/subclass.js";import{writer as I}from"../../core/accessorSupport/decorators/writer.js";import{opacity as w,url as _}from"../support/commonProperties.js";import F from"../support/DimensionalDefinition.js";import{ExportImageServiceParameters as O}from"../support/ExportImageServiceParameters.js";import D from"../support/Field.js";import P from"../support/FieldsIndex.js";import{isSupportedRendererType as T}from"../support/imageryRendererUtils.js";import j from"../support/MosaicRule.js";import N from"../support/PixelBlock.js";import{interpolationKebab as C,noDataInterpretationKebab as M}from"../support/rasterEnums.js";import J from"../support/RasterFunction.js";import q from"../support/RasterInfo.js";import V from"../support/RasterJobHandler.js";import{decode as A,getFormat as z}from"../support/rasterFormats/RasterCodec.js";import{uvComponentToVector as E}from"../support/rasterFunctions/vectorFieldUtils.js";import{getSupportedRendererTypes as Q,getDefaultBandCombination as U,createDefaultRenderer as H,normalizeRendererJSON as L}from"../../renderers/support/rasterRendererHelper.js";import k from"../../renderers/support/RasterSymbolizer.js";import{computeAngles as B,computePixelSpaceLocations as G,computeHistograms as W,computeStatisticsHistograms as X,getImageSpatialReferenceQueryParameter as Y,getSamples as K,identify as $}from"../../rest/imageService.js";import"../../core/unitUtils.js";import"../../kernel.js";import"../../rest/query/support/AttachmentInfo.js";import"../../rest/support/AttachmentQuery.js";import{executeForCount as Z}from"../../rest/query/executeForCount.js";import ee from"../../geometry/Extent.js";import"../../geometry/Geometry.js";import"../../geometry/Multipoint.js";import te from"../../geometry/Point.js";import re from"../../geometry/Polygon.js";import"../../geometry/Polyline.js";import"../../geometry/support/normalizeUtils.js";import"../support/arcgisLayerUrl.js";import"../../core/pbf.js";import"../../geometry/support/spatialReferenceUtils.js";import ie from"../../rest/support/Query.js";import{executeForIds as se}from"../../rest/query/executeForIds.js";import{executeQueryJSON as ne}from"../../rest/query/executeQueryJSON.js";import"../../core/has.js";import"../graphics/featureConversionUtils.js";import ae from"../../rest/support/FeatureSet.js";import"../../rest/support/RelationshipQuery.js";import"../../rest/support/TopFeaturesQuery.js";import oe from"../../rest/support/ImageAngleParameters.js";import le from"../../rest/support/ImageHistogramParameters.js";import ue from"../../rest/support/ImageIdentifyParameters.js";import pe from"../../rest/support/ImagePixelLocationParameters.js";import ce from"../../rest/support/ImageSampleParameters.js";import{createStreamlinesMesh as me}from"../../views/2d/engine/flow/dataUtils.js";import de from"../../geometry/SpatialReference.js";const he=u.getLogger("esri.layers.mixins.ArcGISImageService"),fe=o()({U1:"u1",U2:"u2",U4:"u4",U8:"u8",S8:"s8",U16:"u16",S16:"s16",U32:"u32",S32:"s32",F32:"f32",F64:"f64",C64:"c64",C128:"c128",UNKNOWN:"unknown"}),ye=new Set(["png","png8","png24","png32","jpg","bmp","gif","jpgpng","lerc","tiff"]),ge=x(R,{min:0,max:255});function Re(e){if(!e)return null;const t=JSON.stringify(e).match(/"rasterFunction":"(.*?")/gi),r=null==t?void 0:t.map((e=>e.replace('"rasterFunction":"',"").replace('"',"")));return r?r.join("/"):null}const ve=o=>{let u=class extends o{constructor(){super(...arguments),this._functionRasterInfos={},this._rasterJobHandler={instance:null,refCount:0,connectionPromise:null},this._defaultServiceMosaicRule=null,this._serviceSourceType=null,this._serviceSupportsMosaicRule=null,this.rasterAttributeTableFieldPrefix="Raster.",this.adjustAspectRatio=null,this.bandCount=null,this.bandIds=void 0,this.capabilities=null,this.compressionQuality=void 0,this.compressionTolerance=.01,this.copyright=null,this.definitionExpression=null,this.exportImageServiceParameters=null,this.rasterInfo=null,this.fields=null,this.fullExtent=null,this.hasMultidimensions=!1,this.imageMaxHeight=4100,this.imageMaxWidth=4100,this.interpolation=void 0,this.minScale=0,this.maxScale=0,this.multidimensionalInfo=null,this.noData=null,this.noDataInterpretation=void 0,this.objectIdField=null,this.geometryType="polygon",this.typeIdField=null,this.types=[],this.pixelSizeX=null,this.pixelSizeY=null,this.pixelFilter=null,this.raster=void 0,this.viewId=void 0,this.renderer=null,this.symbolizer=null,this.rasterAttributeTable=null,this.rasterFunctionInfos=null,this.serviceDataType=null,this.spatialReference=null,this.pixelType=null,this.serviceRasterInfo=null,this.sourceJSON=null,this.url=null,this.version=null}initialize(){this._set("exportImageServiceParameters",new O({layer:this}))}readDefaultServiceMosaicRule(e,t){return this._serviceSupportsMosaicRule?j.fromJSON(t):null}readServiceSourceType(e,t){return this._isMosaicDataset(t)?"mosaic-dataset":"raster-dataset"}readServiceSupportsMosaicRule(e,t){return this._isMosaicRuleSupported(t)}get rasterFunctionNamesIndex(){const e=new Map;return!this.rasterFunctionInfos||p(this.rasterFunctionInfos)&&this.rasterFunctionInfos.length<1||p(this.rasterFunctionInfos)&&this.rasterFunctionInfos.forEach((t=>{e.set(t.name.toLowerCase().replace(/ /gi,"_"),t.name)})),e}readBandIds(e,t){if(Array.isArray(e)&&e.length>0&&e.every((e=>"number"==typeof e)))return e}readCapabilities(e,t){return this._readCapabilities(t)}writeCompressionQuality(e,t,r){null!=e&&"lerc"!==this.format&&(t[r]=e)}writeCompressionTolerance(e,t,r){"lerc"===this.format&&null!=e&&(t[r]=e)}get fieldsIndex(){return this.fields?new P(this.fields):null}set format(e){e&&ye.has(e.toLowerCase())&&this._set("format",e.toLowerCase())}readFormat(e,t){return"esriImageServiceDataTypeVector-UV"===t.serviceDataType||"esriImageServiceDataTypeVector-MagDir"===t.serviceDataType||null!=this.pixelFilter?"lerc":"jpgpng"}readMinScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}readMaxScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}set mosaicRule(e){let t=e;t&&t.mosaicMethod&&(t=j.fromJSON({...t.toJSON(),mosaicMethod:t.mosaicMethod,mosaicOperation:t.mosaicOperation})),this._set("mosaicRule",t)}readMosaicRule(e,t){const r=e||t.mosaicRule;return r?j.fromJSON(r):this._isMosaicRuleSupported(t)?j.fromJSON(t):null}writeMosaicRule(e,t,r){let i=this.mosaicRule;const s=this.definitionExpression;i?s&&s!==i.where&&(i=i.clone(),i.where=s):s&&(i=new j({where:s})),this._isValidCustomizedMosaicRule(i)&&(t[r]=i.toJSON())}writeNoData(e,t,r){null!=e&&"number"==typeof e&&(t[r]=ge(e))}readObjectIdField(e,t){if(!e){const r=t.fields.filter((e=>"esriFieldTypeOID"===e.type||"oid"===e.type));e=r&&r[0]&&r[0].name}return e}get parsedUrl(){return this.url?h(this.url):null}readRenderer(e,t,i){var s,n;const a=null==t||null==(s=t.layerDefinition)||null==(n=s.drawingInfo)?void 0:n.renderer,o=r(a,i);return null==o?null:("vector-field"===o.type&&t.symbolTileSize&&!a.symbolTileSize&&(o.symbolTileSize=t.symbolTileSize),T(o)||he.warn("ArcGISImageService","Imagery layer doesn't support given renderer type."),o)}writeRenderer(e,t,r){t.layerDefinition=t.layerDefinition||{},t.layerDefinition.drawingInfo=t.layerDefinition.drawingInfo||{},t.layerDefinition.drawingInfo.renderer=e.toJSON(),"vector-field"===e.type&&(t.symbolTileSize=e.symbolTileSize)}get rasterFields(){const e=this.rasterAttributeTableFieldPrefix||"Raster.",t=new D({name:"Raster.ItemPixelValue",alias:"Item Pixel Value",domain:null,editable:!1,length:50,type:"string"}),r=new D({name:"Raster.ServicePixelValue",alias:"Service Pixel Value",domain:null,editable:!1,length:50,type:"string"}),i=new D({name:"Raster.ServicePixelValue.Raw",alias:"Raw Service Pixel Value",domain:null,editable:!1,length:50,type:"string"});let s=this.fields?l(this.fields):[];s.push(r),this.capabilities.operations.supportsQuery&&this.fields&&this.fields.length>0&&s.push(t),this.version>=10.4&&p(this.rasterFunctionInfos)&&this.rasterFunctionInfos.some((e=>"none"===e.name.toLowerCase()))&&s.push(i),p(this.rasterFunctionInfos)&&this.rasterFunctionInfos.filter((e=>"none"!==e.name.toLowerCase())).forEach((e=>{s.push(new D({name:"Raster.ServicePixelValue."+e.name,alias:e.name,domain:null,editable:!1,length:50,type:"string"}))})),null==this.pixelFilter||"esriImageServiceDataTypeVector-UV"!==this.serviceDataType&&"esriImageServiceDataTypeVector-MagDir"!==this.serviceDataType||(s.push(new D({name:"Raster.Magnitude",alias:"Magnitude",domain:null,editable:!1,type:"double"})),s.push(new D({name:"Raster.Direction",alias:"Direction",domain:null,editable:!1,type:"double"})));const n=this.rasterInfo.attributeTable&&this.rasterInfo.attributeTable.fields||null;if(n&&n.length>0){const t=n.filter((e=>"esriFieldTypeOID"!==e.type&&"value"!==e.name.toLowerCase())).map((t=>{const r=l(t);return r.name=e+t.name,r}));s=s.concat(t)}return s}set renderingRule(e){let t=e;t&&t.rasterFunction&&(t=J.fromJSON({...t.toJSON(),rasterFunction:t.rasterFunction,rasterFunctionArguments:t.rasterFunctionArguments})),this._set("renderingRule",t)}readRenderingRule(e,t){const r=t.rasterFunctionInfos;return t.renderingRule||r&&r.length&&"None"!==r[0].name?this._isRFTJson(t.renderingRule)?J.fromJSON({rasterFunctionDefinition:t.renderingRule}):J.fromJSON(t.renderingRule||{rasterFunctionInfos:t.rasterFunctionInfos}):null}writeRenderingRule(e,t,r){const i=e.toJSON();i.rasterFunctionDefinition?t[r]=i.rasterFunctionDefinition:t[r]=i}readSpatialReference(e,t){const r=e||t.extent.spatialReference;return r?de.fromJSON(r):null}readPixelType(e){return fe.fromJSON(e)||e}writePixelType(e,t,r){(c(this.serviceRasterInfo)||this.pixelType!==this.serviceRasterInfo.pixelType)&&(t[r]=fe.toJSON(e))}readVersion(e,t){let r=t.currentVersion;return r||(r=t.hasOwnProperty("fields")||t.hasOwnProperty("timeInfo")?10:9.3),r}applyFilter(e){let t=e;return this.pixelFilter&&(t=this._clonePixelData(e),this.pixelFilter(t)),t}async applyRenderer(e,t){let r=e;if(!this._isPicture()&&this.renderer&&this.symbolizer&&!this.pixelFilter){const i=JSON.stringify(this._cachedRendererJson)!==JSON.stringify(this.renderer.toJSON()),s=this._rasterJobHandler.instance,{bandIds:n}=this;if(s){i&&(this.symbolizer.bind(),await s.updateSymbolizer(this.symbolizer,t),this._cachedRendererJson=this.renderer.toJSON());const a=await s.symbolize({bandIds:n,...e},t);r={extent:e.extent,pixelBlock:a}}else r={extent:e.extent,pixelBlock:this.symbolizer.symbolize({bandIds:n,...e})}}return r}destroy(){this._shutdownJobHandler()}increaseRasterJobHandlerUsage(){this._rasterJobHandler.refCount++}decreaseRasterJobHandlerUsage(){this._rasterJobHandler.refCount--,this._rasterJobHandler.refCount<=0&&this._shutdownJobHandler()}async computeAngles(e,t){if(await this._fetchCapabilities(null==t?void 0:t.signal),!this.capabilities.operations.supportsComputeAngles)throw new a("imagery-layer:compute-angles","this operation is not supported on the input image service");return e=y(oe,e).clone(),B(this.url,e,this._getRequestOptions(t))}async computePixelSpaceLocations(e,t){if(await this._fetchCapabilities(null==t?void 0:t.signal),!this.capabilities.operations.supportsComputePixelLocation)throw new a("imagery-layer:compute-pixel-space-locations","this operation is not supported on the input image service");return e=y(pe,e).clone(),G(this.url,e,this._getRequestOptions(t))}async computeHistograms(e,t){if(await this._fetchCapabilities(null==t?void 0:t.signal),!this.capabilities.operations.supportsComputeHistograms)throw new a("imagery-layer:compute-histograms","this operation is not supported on the input image service");e=y(le,e).clone();const{raster:r,mosaicRule:i,renderingRule:s}=this;return s&&null==e.renderingRule&&(e.renderingRule=s),i&&null==e.mosaicRule&&(e.mosaicRule=i),r&&null==e.raster&&(e.raster=r),W(this.url,e,this._getRequestOptions(t))}async computeStatisticsHistograms(e,t){if(await this._fetchCapabilities(null==t?void 0:t.signal),!this.capabilities.operations.supportsComputeStatisticsHistograms)throw new a("imagery-layer:compute-statistics-histograms","this operation is not supported on the input image service");e=y(le,e).clone();const{raster:r,mosaicRule:i,renderingRule:s}=this;return s&&null==e.renderingRule&&(e.renderingRule=s),i&&null==e.mosaicRule&&(e.mosaicRule=i),r&&null==e.raster&&(e.raster=r),X(this.url,e,this._getRequestOptions(t))}getField(e){const{fieldsIndex:t}=this;return p(t)?t.get(e):void 0}getFieldDomain(e,t){const r=this.getField(e);return r?r.domain:null}fetchImage(e,t,r,i={}){if(null==e||null==t||null==r)return Promise.reject(new a("imagery-layer:fetch-image","Insufficient parameters for requesting an image. A valid extent, width and height values are required."));const s=this.renderer||this.symbolizer?this.generateRasterInfo(this.renderingRule,{signal:i.signal}):null;return d(s).then((s=>{s&&(this.rasterInfo=s);const n={imageServiceParameters:this.getExportImageServiceParameters(e,t,r,i.timeExtent),imageProps:{extent:e,width:t,height:r,format:this.format},requestAsImageElement:i.requestAsImageElement&&!this.pixelFilter||!1,signal:i.signal};return this._requestArrayBuffer(n)}))}fetchKeyProperties(e){return n(this.parsedUrl.path+"/keyProperties",{query:this._getQueryParams({renderingRule:this.version>=10.3?null==e?void 0:e.renderingRule:null})}).then((e=>e.data))}fetchRasterAttributeTable(e){return this.version<10.1?Promise.reject(new a("#fetchRasterAttributeTable()","Failed to get rasterAttributeTable")):n(this.parsedUrl.path+"/rasterAttributeTable",{query:this._getQueryParams({renderingRule:this.version>=10.3?null==e?void 0:e.renderingRule:null})}).then((e=>ae.fromJSON(e.data)))}async getCatalogItemRasterInfo(e,t){const r=n(this.parsedUrl.path+"/"+e+"/info",{query:this._getQueryParams(),...t}).then((e=>e.data)),i=n(this.parsedUrl.path+"/"+e+"/info/keyProperties",{query:this._getQueryParams(),...t}).then((e=>e.data)).catch((()=>{})),s=await Promise.all([r,i]);if(!s[0])return;const a=ee.fromJSON(s[0].extent),o=s[0].statistics?s[0].statistics.map((e=>({min:e[0],max:e[1],avg:e[2],stddev:e[3]}))):null;return new q({bandCount:s[0].bandCount,extent:a,spatialReference:a.sr,pixelSize:new te({x:s[0].pixelSizeX,y:s[0].pixelSizeY,spatialReference:a.sr}),pixelType:s[0].pixelType.toLowerCase(),statistics:o,histograms:s[0].histograms,keyProperties:s[1]||{}})}async getCatalogItemICSInfo(e,t){const{data:r}=await n(this.parsedUrl.path+"/"+e+"/info/ics",{query:this._getQueryParams(),...t}),i=r&&r.ics;if(!i)return;let s=null;try{s=(await n(this.parsedUrl.path+"/"+e+"/info",{query:this._getQueryParams(),...t})).data.extent}catch{}if(!s||!s.spatialReference)return{ics:i,icsToPixelTransform:null,icsExtent:null,northDirection:null};const a=this.version>=10.7?n(this.parsedUrl.path+"/"+e+"/info/icstopixel",{query:this._getQueryParams(),...t}).then((e=>e.data)).catch((()=>({}))):{},o=s.spatialReference,l={geometries:JSON.stringify({geometryType:"esriGeometryEnvelope",geometries:[s]}),inSR:o.wkid||JSON.stringify(o),outSR:"0:"+e},u=n(this.parsedUrl.path+"/project",{query:this._getQueryParams(l),...t}).then((e=>e.data)).catch((()=>({}))),p=5,c=(s.xmin+s.xmax)/2,m=(s.ymax-s.ymin)/(p+1),d=s.ymin+m,h=[];for(let n=0;n<p;n++)h.push({x:c,y:d+m*n});const f={geometries:JSON.stringify({geometryType:"esriGeometryPoint",geometries:h}),inSR:o.wkid||JSON.stringify(o),outSR:"0:"+e},y=n(this.parsedUrl.path+"/project",{query:this._getQueryParams(f),...t}).then((e=>e.data)).catch((()=>({}))),g=await Promise.all([a,u,y]);let R=g[0].ipxf;if(null==R){var v,x,b;const e=null==(v=i.geodataXform)?void 0:v.xf_0;"topup"===(null==e||null==(x=e.name)?void 0:x.toLowerCase())&&6===(null==e||null==(b=e.coefficients)?void 0:b.length)&&(R={affine:{name:"ics [sensor: Frame] to pixel (column, row) transformation",coefficients:e.coefficients,cellsizeRatio:0,type:"GeometricXform"}})}const S=ee.fromJSON(g[1]&&g[1].geometries&&g[1].geometries[0]);S&&(S.spatialReference=new de({wkid:0,imageCoordinateSystem:i}));const I=g[2].geometries?g[2].geometries.filter((e=>null!=e&&null!=e.x&&null!=e.y&&"NaN"!==e.x&&"NaN"!==e.y)):[],w=I.length;if(w<3)return{ics:i,icsToPixelTransform:R,icsExtent:S,northDirection:null};let _=0,F=0,O=0,D=0;for(let n=0;n<w;n++)_+=I[n].x,F+=I[n].y,O+=I[n].x*I[n].x,D+=I[n].x*I[n].y;const P=(w*D-_*F)/(w*O-_*_);let T=0;const j=I[p-1].x>I[0].x,N=I[p-1].y>I[0].y;return P===1/0?T=N?90:270:0===P?T=j?0:180:P>0?T=j?180*Math.atan(P)/Math.PI:180*Math.atan(P)/Math.PI+180:P<0&&(T=N?180+180*Math.atan(P)/Math.PI:360+180*Math.atan(P)/Math.PI),{ics:i,icsToPixelTransform:R,icsExtent:S,northDirection:T}}async generateRasterInfo(e,t){var r;if((!e||"none"===(null==e||null==(r=e.functionName)?void 0:r.toLowerCase())||this._isVectorFieldResampleFunction(e))&&p(this.serviceRasterInfo))return this.serviceRasterInfo;const i=Re(e);if(this._functionRasterInfos[i])return this._functionRasterInfos[i];const s=this._generateRasterInfo(e,t);this._functionRasterInfos[i]=s;try{return await s}catch{return this._functionRasterInfos[i]=null,null}}getExportImageServiceParameters(e,t,r,i){var s;e=e.clone().shiftCentralMeridian();const n=Y(e.spatialReference,this.parsedUrl.path);p(this.serviceRasterInfo)&&this.pixelType!==this.serviceRasterInfo.pixelType&&(this.exportImageServiceParameters.pixelType=this.pixelType);const a=this.exportImageServiceParameters.toJSON(),{bandIds:o,noData:l}=a;let{renderingRule:u}=a;const c=!this.renderer||"raster-stretch"===this.renderer.type;if(null!=o&&o.length&&this._hasRenderingRule(this.renderingRule)&&c){const e={rasterFunction:"ExtractBand",rasterFunctionArguments:{BandIds:o}};if("Stretch"===u.rasterFunction)e.rasterFunctionArguments.Raster=u.rasterFunctionArguments.Raster,u.rasterFunctionArguments.Raster=e;else if("Colormap"===u.rasterFunction){const t=u.rasterFunctionArguments.Raster;"Stretch"===(null==t?void 0:t.rasterFunction)?(e.rasterFunctionArguments.Raster=t.rasterFunctionArguments.Raster,t.rasterFunctionArguments.Raster=e):(e.rasterFunctionArguments.Raster=t,u.rasterFunctionArguments.Raster=e)}else e.rasterFunctionArguments.Raster=u,u=e;a.bandIds=void 0}else a.bandIds=null==o?void 0:o.join(",");l instanceof Array&&l.length>0&&(a.noData=l.join(","));const m=this._serviceSupportsMosaicRule?this._combineMosaicRuleWithTimeExtent(this.exportImageServiceParameters.mosaicRule,i):null;a.mosaicRule=m&&JSON.stringify(m),a.renderingRule=u&&null!=(s=u)&&s.rasterFunctionDefinition?JSON.stringify(u.rasterFunctionDefinition):JSON.stringify(u);const d={};if(i){const{start:e,end:t}=i.toJSON();e&&t&&e===t?d.time=""+e:null==e&&null==t||(d.time=`${null==e?"null":e},${null==t?"null":t}`)}return{bbox:e.xmin+","+e.ymin+","+e.xmax+","+e.ymax,bboxSR:n,imageSR:n,size:t+","+r,...a,...d}}async getSamples(e,t){if(await this._fetchCapabilities(null==t?void 0:t.signal),!this.capabilities.operations.supportsGetSamples)throw new a("imagery-layer:get-samples","getSamples operation is not supported on the input image service");e=y(ce,e).clone();const{raster:r}=this;return r&&null==e.raster&&(e.raster=r),K(this.url,e,this._getRequestOptions(t))}async identify(e,t){if(await this._fetchCapabilities(null==t?void 0:t.signal),!this.capabilities.operations.supportsIdentify)throw new a("imagery-layer:query-rasters","query operation is not supported on the input image service");e=y(ue,e).clone();const{raster:r,mosaicRule:i,renderingRule:s}=this;if(s&&null==e.renderingRule&&(e.renderingRule=s),i&&null==e.mosaicRule){const t=this._combineMosaicRuleWithTimeExtent(i,e.timeExtent);e.mosaicRule=m(t)}return r&&null==e.raster&&(e.raster=r),$(this.url,e,this._getRequestOptions(t))}createQuery(){const e=new ie;return e.outFields=["*"],e.returnGeometry=!0,e.where=this.definitionExpression||"1=1",e}async queryRasters(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),ne(this.url,e,t)}async queryObjectIds(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),se(this.url,e,t)}async queryRasterCount(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),Z(this.url,e,t)}async queryVisibleRasters(e,t){if(!e)throw new a("imagery-layer: query-visible-rasters","missing query parameter");const{pixelSize:r,returnDomainValues:i,returnTopmostRaster:s,showNoDataRecords:n}=t||{pixelSize:null,returnDomainValues:!1,returnTopmostRaster:!1,showNoDataRecords:!1};let o=!1,l=null,u=null;const m="raster.servicepixelvalue",d=this.rasterFunctionNamesIndex;if(p(e.outFields)&&(o=e.outFields.some((e=>-1===e.toLowerCase().indexOf(m))),this.version>=10.4)){const t=e.outFields.filter((e=>e.toLowerCase().indexOf(m)>-1&&e.length>m.length)).map((e=>{const t=e.slice(m.length+1);return[this._updateRenderingRulesFunctionName(t,d),t]}));l=t.map((e=>new J({functionName:e[0]}))),u=t.map((e=>e[1])),0===l.length?this.renderingRule?(l.push(this.renderingRule),u.push(this.renderingRule.functionName)):l=null:this.renderingRule&&!l.some((e=>e.functionName===this.renderingRule.functionName))&&(l.push(this.renderingRule),u.push(this.renderingRule.functionName))}const h=c(e.outSpatialReference)||e.outSpatialReference.equals(this.spatialReference),f=e.timeExtent||this.timeExtent,y=this._combineMosaicRuleWithTimeExtent(this.exportImageServiceParameters.mosaicRule,f),g=this._getQueryParams({geometry:e.geometry,timeExtent:f,mosaicRule:y,renderingRule:this.version<10.4?this.renderingRule:null,renderingRules:l,pixelSize:r,returnCatalogItems:o,returnGeometry:h,raster:this.raster,maxItemCount:s?1:null});delete g.f;const R=new ue(g);try{var v,x;await this.generateRasterInfo(this.renderingRule);const r=await $(this.url,R,{signal:null==t?void 0:t.signal,query:{...this.customParameters}}),s=e.outFields,a=r.value.toLowerCase().indexOf("nodata")>-1;if(!(o&&!h&&(null==r||null==(v=r.catalogItems)?void 0:v.features.length)&&(n||!a)))return this._processVisibleRastersResponse(r,{returnDomainValues:i,templateRRFunctionNames:u,showNoDataRecords:n,templateFields:s});const l=this.objectIdField||"ObjectId",c=r.catalogItems.features,m=c.map((e=>{var t;return null==(t=e.attributes)?void 0:t[l]})),d=new ie({objectIds:m,returnGeometry:!0,outSpatialReference:e.outSpatialReference,outFields:[l]}),f=await this.queryRasters(d);return null!=f&&null!=(x=f.features)&&x.length&&f.features.forEach((t=>{c.forEach((r=>{r.attributes[l]===t.attributes[l]&&(r.geometry=new re(t.geometry),p(e.outSpatialReference)&&(r.geometry.spatialReference=e.outSpatialReference))}))})),this._processVisibleRastersResponse(r,{returnDomainValues:i,templateRRFunctionNames:u,showNoDataRecords:n,templateFields:s})}catch{throw new a("imagery-layer:query-visible-rasters","encountered error when querying visible rasters")}}async fetchVariableStatisticsHistograms(e,t){const r=n(this.parsedUrl.path+"/statistics",{query:this._getQueryParams({variable:e}),signal:t}).then((e=>{var t;return null==(t=e.data)?void 0:t.statistics})),i=n(this.parsedUrl.path+"/histograms",{query:this._getQueryParams({variable:e}),signal:t}).then((e=>{var t;return null==(t=e.data)?void 0:t.histograms})),s=await Promise.all([r,i]);return s[0]&&s[0].forEach((e=>{e.avg=e.mean,e.stddev=e.standardDeviation})),{statistics:s[0]||null,histograms:s[1]||null}}async createStreamlinesMesh(e,t){const r=this._rasterJobHandler.instance;return r?r.createStreamlinesMesh(e,t):me(e.rendererSettings,e.flowData,p(t.signal)?t.signal:(new AbortController).signal)}async _fetchService(e){await this._fetchServiceInfo(e),p(this.serviceRasterInfo)&&!this.rasterInfo&&(this.rasterInfo=this.serviceRasterInfo);const t=this.sourceJSON,r=p(this.serviceRasterInfo)?Promise.resolve(this.serviceRasterInfo):this._fetchAuxiliaryRasterInfo({serviceInfo:t,signal:e}).then((e=>(this._set("serviceRasterInfo",e),e))),i=this._hasRenderingRule(this.renderingRule)?this.generateRasterInfo(this.renderingRule,{signal:e}):null,s=this._getRasterFunctionInfos();return Promise.all([r,i,s]).then((e=>{e[1]?this._set("rasterInfo",e[1]):this._set("rasterInfo",e[0]),e[2]&&this._set("rasterFunctionInfos",e[2]),this.renderer&&!this._isSupportedRenderer(this.renderer)&&(this.renderer=null,he.warn("ArcGISImageService","Switching to the default renderer. Renderer applied is not valid for this Imagery Layer")),this._configDefaultRenderer(),this.watch("renderer",(()=>this._configDefaultRenderer())),this.watch("renderingRule",(e=>{(this.renderer||this.symbolizer||this.popupEnabled&&this.popupTemplate)&&this.generateRasterInfo(e).then((e=>{e&&(this.rasterInfo=e)}))}));const t=p(this.serviceRasterInfo)&&this.serviceRasterInfo.multidimensionalInfo;t&&this._updateMultidimensionalDefinition(t)}))}_combineMosaicRuleWithTimeExtent(e,t){const r=this.timeInfo;if(c(e)||c(this.multidimensionalInfo)||c(t)||c(null==r?void 0:r.startField))return e;const{startField:i}=r;var s;if(e=e.clone(),"mosaic-dataset"===this._serviceSourceType)return e.multidimensionalDefinition=null==(s=e.multidimensionalDefinition)?void 0:s.filter((e=>e.dimensionName!==i)),this._cleanupMultidimensionalDefinition(e);e.multidimensionalDefinition=e.multidimensionalDefinition||[];const n=e.multidimensionalDefinition.filter((e=>e.dimensionName===i)),a=p(t.start)?t.start.getTime():null,o=p(t.end)?t.end.getTime():null,l=null==a||null==o||a===o,u=l?[a||o]:[[a,o]],m=this.version>=10.8;if(n.length)n.forEach((e=>{e.dimensionName===i&&(m?(e.dimensionName=null,e.isSlice=null,e.values=null):(e.isSlice=l,e.values=u))}));else if(!m){const t=e.multidimensionalDefinition.filter((e=>null!=e.variableName&&null==e.dimensionName));t.length?t.forEach((e=>{e.dimensionName=i,e.isSlice=l,e.values=u})):e.multidimensionalDefinition.push(new F({variableName:"",dimensionName:i,isSlice:l,values:u}))}return this._cleanupMultidimensionalDefinition(e)}_cleanupMultidimensionalDefinition(e){return c(e)?null:(e.multidimensionalDefinition&&(e.multidimensionalDefinition=e.multidimensionalDefinition.filter((e=>!(!e.variableName&&!e.dimensionName))),0===e.multidimensionalDefinition.length&&(e.multidimensionalDefinition=null)),"mosaic-dataset"!==this._serviceSourceType&&null==e.multidimensionalDefinition?null:e)}async _prepareForQuery(e,t){var r;if(await this._fetchCapabilities(null==(r=t)?void 0:r.signal),!this.capabilities.operations.supportsQuery)throw new a("imagery-layer:query-rasters","query operation is not supported on the input image service");return e=p(e)?y(ie,e):this.createQuery(),t=this._getRequestOptions(t),this.raster&&(t.query={...t.query,raster:this.raster}),{query:e,requestOptions:t}}async _initJobHandler(){if(null!=this._rasterJobHandler.connectionPromise)return this._rasterJobHandler.connectionPromise;const e=new V;this._rasterJobHandler.connectionPromise=e.initialize().then((()=>{this._rasterJobHandler.instance=e}),(()=>null)),await this._rasterJobHandler.connectionPromise}_shutdownJobHandler(){this._rasterJobHandler.instance&&this._rasterJobHandler.instance.destroy(),this._rasterJobHandler.instance=null,this._rasterJobHandler.connectionPromise=null,this._rasterJobHandler.refCount=0}_isSupportedRenderer(e){const{rasterInfo:t,renderingRule:r}=this;return"unique-value"===e.type&&this._hasRenderingRule(r)&&1===t.bandCount&&["u8","s8"].includes(t.pixelType)||Q(this.rasterInfo).includes(this.renderer.type)}async _fetchCapabilities(e){return this.capabilities||await this._fetchServiceInfo(e),this.capabilities}async _fetchServiceInfo(e){var t;let r=this.sourceJSON;if(!r){const{data:t,ssl:i}=await n(this.parsedUrl.path,{query:this._getQueryParams(),signal:e});r=t,this.sourceJSON=r,i&&(this.url=this.url.replace(/^http:/i,"https:"))}if((null==(t=r.capabilities)?void 0:t.toLowerCase().split(",").map((e=>e.trim())).indexOf("tilesonly"))>-1)throw new a("imagery-layer:fetch-service-info","use ImageryTileLayer to open tiles-only image services");this.read(r,{origin:"service",url:this.parsedUrl})}_isMosaicDataset(e){var t;return e.serviceSourceType?"esriImageServiceSourceTypeMosaicDataset"===e.serviceSourceType:(null==(t=e.fields)?void 0:t.length)>0}_isMosaicRuleSupported(e){var t;if(!e)return!1;const r=this._isMosaicDataset(e),i=e.currentVersion>=10.71&&e.hasMultidimensions&&e.timeInfo&&!(e.objectIdField&&(null==(t=e.fields)?void 0:t.length)>1);return r||i}_isVectorFieldResampleFunction(e){if(!p(e))return!1;const{functionName:t,functionArguments:r}=e,i="resample"===(null==t?void 0:t.toLowerCase()),s=(null==r?void 0:r.ResampleType)||(null==r?void 0:r.resampleType);return i&&(7===s||10===s)}_isPicture(){return!this.format||this.format.indexOf("jpg")>-1||this.format.indexOf("png")>-1}_configDefaultRenderer(){if(!this._isPicture()&&!this.pixelFilter){if(!this.bandIds&&this.rasterInfo.bandCount>=3){const e=U(this.rasterInfo);!e||3===this.rasterInfo.bandCount&&0===e[0]&&1===e[1]&&2===e[2]||(this.bandIds=e)}var e,t;if(!this.renderer)this.renderer=H(this.rasterInfo,{bandIds:this.bandIds,variableName:this.renderingRule?null:null==(e=this.mosaicRule)||null==(t=e.multidimensionalDefinition)?void 0:t[0].variableName});this.symbolizer?(this.symbolizer.rendererJSON=L(this.renderer.toJSON()),this.symbolizer.rasterInfo=this.rasterInfo):this.symbolizer=new k({rendererJSON:this.renderer.toJSON(),rasterInfo:this.rasterInfo}),this.symbolizer.bind().success||(this.symbolizer=null)}}_clonePixelData(e){return null==e?e:{extent:e.extent&&e.extent.clone(),pixelBlock:p(e.pixelBlock)&&e.pixelBlock.clone()}}_getQueryParams(e){p(null==e?void 0:e.renderingRule)&&"string"!=typeof e.renderingRule&&(e.renderingRule=this._getRenderingRuleString(e.renderingRule));const{raster:t,viewId:r}=this;return{raster:t,viewId:r,f:"json",...e,...this.customParameters}}_getRequestOptions(e){return{...e,query:{...null==e?void 0:e.query,...this.customParameters}}}_decodePixelBlock(e,t,r){return this._rasterJobHandler.instance?this._rasterJobHandler.instance.decode({data:e,options:t}):A(e,t,r)}async _fetchMultidimensionalInfo(e){var t;const r=await n(this.parsedUrl.path+"/multidimensionalInfo",{query:this._getQueryParams(),signal:e}).then((e=>{var t;return null==(t=e.data)?void 0:t.multidimensionalInfo}));return null!=(t=r.variables)&&t.length&&r.variables.forEach((e=>{var t;null!=(t=e.statistics)&&t.length&&e.statistics.forEach((e=>{e.avg=e.mean,e.stddev=e.standardDeviation}))})),r}async _getRasterFunctionInfos(e){const t=this.sourceJSON.rasterFunctionInfos;if(this.serviceRasterInfo)return t;if(t&&this.version>=10.3){var r;if(1===t.length&&"none"===t[0].name.toLowerCase())return t;return null==(r=(await n(this.parsedUrl.path+"/rasterFunctionInfos",{query:this._getQueryParams(),signal:e})).data)?void 0:r.rasterFunctionInfos}return null}async _fetchAuxiliaryRasterInfo(e){const t=e&&e.serviceInfo;if(!t)return Promise.reject(new a("imagery-layer:fetch-metadata","valid serviceInfo is required"));const r=e.signal,i=!!(t.hasRasterAttributeTable&&this.version>=10.1)&&n(this.parsedUrl.path+"/rasterAttributeTable",{query:this._getQueryParams({renderingRule:this.version>=10.1?null==e?void 0:e.renderingRule:null}),signal:r}).then((e=>ae.fromJSON(e.data))).catch((()=>null)),s=!!(t.hasColormap&&this.version>=10.1)&&n(this.parsedUrl.path+"/colormap",{query:this._getQueryParams({renderingRule:this.version>=10.6?null==e?void 0:e.renderingRule:null}),signal:r}).then((e=>{var t;return null==(t=e.data)?void 0:t.colormap})),o=!!(t.hasHistograms&&this.version>=10.1)&&n(this.parsedUrl.path+"/histograms",{query:this._getQueryParams({renderingRule:this.version>=10.1?null==e?void 0:e.renderingRule:null}),signal:r}).then((e=>{var t;return null==(t=e.data)?void 0:t.histograms})),l=this.version>=10.3&&n(this.parsedUrl.path+"/keyProperties",{query:this._getQueryParams({renderingRule:null==e?void 0:e.renderingRule}),signal:r}).then((e=>e.data)).catch((()=>{})),u=!!(t.hasMultidimensions&&this.version>=10.3)&&this._fetchMultidimensionalInfo(),p=await Promise.all([i,s,o,l,u]);let c=null;if(t.minValues&&t.minValues.length===t.bandCount){c=[];for(let e=0;e<t.minValues.length;e++)c.push({min:t.minValues[e],max:t.maxValues[e],avg:t.meanValues[e],stddev:t.stdvValues[e]})}const m=Math.ceil((t.extent.xmax-t.extent.xmin)/t.pixelSizeX-.1),d=Math.ceil((t.extent.ymax-t.extent.ymin)/t.pixelSizeY-.1),h=de.fromJSON(t.spatialReference||t.extent.spatialReference);return new q({width:m,height:d,bandCount:t.bandCount,extent:ee.fromJSON(t.extent),spatialReference:h,pixelSize:new te({x:t.pixelSizeX,y:t.pixelSizeY,spatialReference:h}),pixelType:t.pixelType.toLowerCase(),statistics:c,attributeTable:p[0]||null,colormap:p[1]||null,histograms:p[2]||null,keyProperties:p[3]||{},multidimensionalInfo:p[4]||null})}async _requestArrayBuffer(e){var t;const{imageProps:r,requestAsImageElement:i,signal:s}=e;if(i&&!this.pixelFilter&&(null==(t=r.format)?void 0:t.indexOf("png"))>-1){return{imageElement:(await n(this.parsedUrl.path+"/exportImage",{responseType:"image",query:this._getQueryParams({f:"image",...e.imageServiceParameters}),signal:s})).data,params:r}}const o=this._initJobHandler(),l=n(this.parsedUrl.path+"/exportImage",{responseType:"array-buffer",query:this._getQueryParams({f:"image",...e.imageServiceParameters}),signal:s}),u=(await Promise.all([l,o]))[0].data,p=r.format||"jpgpng";let c=p;if("bsq"!==c&&"bip"!==c&&(c=z(u)),!c)throw new a("imagery-layer:fetch-image","unsupported format signature "+String.fromCharCode.apply(null,new Uint8Array(u)));const m={signal:s},d="gif"===p||"bmp"===p||p.indexOf("png")>-1&&("png"===c||"jpg"===c)?A(u,{useCanvas:!0,...r},m):this._decodePixelBlock(u,{width:r.width,height:r.height,planes:null,pixelType:null,noDataValue:null,format:p},m);return{pixelData:{pixelBlock:await d,extent:r.extent},params:r}}async _generateRasterInfo(e,t){const{data:r}=await n(this.parsedUrl.path,{query:this._getQueryParams({renderingRule:e}),...t});return await this._fetchAuxiliaryRasterInfo({serviceInfo:r,renderingRule:e,...t})}_isValidCustomizedMosaicRule(e){var t;return e&&JSON.stringify(e.toJSON())!==JSON.stringify(null==(t=this._defaultServiceMosaicRule)?void 0:t.toJSON())}_updateMultidimensionalDefinition(e){if(this._isValidCustomizedMosaicRule(this.mosaicRule))return;const t=e.variables[0].dimensions,r="",i=[];for(const s in t)if(t.hasOwnProperty(s)){const e=t[s],n=e.extent;let a=!0,o=[n[0]];e.hasRanges&&!0===e.hasRanges?(a=!1,o=[e.values[0]]):"stdz"===e.name.toLowerCase()&&Math.abs(n[1])<=Math.abs(n[0])&&(o=[n[1]]),i.push(new F({variableName:r,dimensionName:t[s].name,isSlice:a,values:o}))}if(i.length>0){this.mosaicRule=this.mosaicRule||new j;const e=this.mosaicRule.multidimensionalDefinition;(!e||e&&e.length<=0)&&(this.mosaicRule.multidimensionalDefinition=i)}}_formatAttributeValue(e,t){if("string"==typeof e){const r=this.popupTemplate&&this.popupTemplate.fieldInfos,i=this._getFieldInfo(r,t),s=i&&i.format;if(s){let t,r;return e.trim().indexOf(",")>-1?(t=",",r=t+" ",this._formatDelimitedString(e,t,r,s)):e.trim().indexOf(" ")>-1?(t=r=" ",this._formatDelimitedString(e,t,r,s)):this._formatNumberFromString(e,s)}}return e}_getFieldInfo(e,t){if(!e||!e.length||!t)return;const r=t.toLowerCase();let i;return e.some((e=>!(!e.fieldName||e.fieldName.toLowerCase()!==r&&e.fieldName.toLowerCase()!==r.replace(/ /g,"_"))&&(i=e,!0))),i}_formatDelimitedString(e,t,r,i){return e&&t&&r&&i?e.trim().split(t).map((e=>this._formatNumberFromString(e,i))).join(r):e}_formatNumberFromString(e,t){if(!e||!t)return e;const r=Number(e);return isNaN(r)?e:t.format(r)}_processVisibleRastersResponse(e,r){r=r||{};const i=e.value,{templateRRFunctionNames:s,showNoDataRecords:n,returnDomainValues:a,templateFields:o}=r,l=e.processedValues;let u=e.catalogItems&&e.catalogItems.features,c=e.properties&&e.properties.Values&&e.properties.Values.map((e=>e.replace(/ /gi,", ")))||[];const m=this.objectIdField||"ObjectId",d="string"==typeof i&&i.toLowerCase().indexOf("nodata")>-1,h=[];if(i&&!u&&!d){const e={};e[m]=0;c=[i],u=[new t(this.fullExtent,null,e)]}if(!u)return[];let f,y,g;this._updateResponseFieldNames(u,o),d&&!n&&(u=[]);for(let t=0;t<u.length;t++){if(f=u[t],null!=i){if(y=c[t],g=this.renderingRule&&l&&l.length>0&&s&&s.length>0&&s.indexOf(this.renderingRule.functionName)>-1?l[s.indexOf(this.renderingRule.functionName)]:i,"nodata"===y.toLowerCase()&&!n)continue;const e="Raster.ItemPixelValue",r="Raster.ServicePixelValue";f.attributes[e]=this._formatAttributeValue(y,e),f.attributes[r]=this._formatAttributeValue(g,r),this._updateFeatureWithMagDirValues(f,y);const a=this.fields&&this.fields.length>0;let o=this.renderingRule&&p(this.serviceRasterInfo)&&this.serviceRasterInfo.attributeTable?a?y:i:g;this.renderingRule||(o=a?y:i),this._updateFeatureWithRasterAttributeTableValues(f,o)}if(f.sourceLayer=f.layer=this,a&&this._updateFeatureWithDomainValues(f),s&&l&&s.length===l.length)for(let e=0;e<s.length;e++){const t="Raster.ServicePixelValue."+s[e];f.attributes[t]=this._formatAttributeValue(l[e],t)}h.push(u[t])}return h}_updateFeatureWithRasterAttributeTableValues(e,t){const r=this.rasterInfo&&this.rasterInfo.attributeTable||p(this.serviceRasterInfo)&&this.serviceRasterInfo.attributeTable,i=r&&r.features;if(!i)return;const s=r.fields,n=s.map((e=>e.name)).filter((e=>"value"===e.toLowerCase())),a=n&&n[0];if(!a)return;const o=i.filter((e=>e.attributes[a]===(null!=t?parseInt(t,10):null)));o&&o[0]&&s.forEach((t=>{const r=this.rasterAttributeTableFieldPrefix+t.name;e.attributes[r]=this._formatAttributeValue(o[0].attributes[t.name],r)}))}_updateFeatureWithMagDirValues(e,t){if("esriImageServiceDataTypeVector-UV"!==this.serviceDataType&&"esriImageServiceDataTypeVector-MagDir"!==this.serviceDataType)return;const r=t.split(/,\s*/).map((e=>parseFloat(e))),i=r.map((e=>[e])),s=r.map((e=>({minValue:e,maxValue:e,noDataValue:null}))),n=new N({height:1,width:1,pixelType:"f32",pixels:i,statistics:s});null!=this.pixelFilter&&this.pixelFilter({pixelBlock:n,extent:new ee(0,0,0,0,this.spatialReference)});const a="esriImageServiceDataTypeVector-MagDir"===this.serviceDataType?[n.pixels[0][0],n.pixels[1][0]]:E([n.pixels[0][0],n.pixels[1][0]]);e.attributes["Raster.Magnitude"]=a[0],e.attributes["Raster.Direction"]=a[1]}_updateFeatureWithDomainValues(e){const t=this.fields&&this.fields.filter((e=>e.domain&&"coded-value"===e.domain.type));null!=t&&t.forEach((t=>{const r=e.attributes[t.name];if(null!=r){const i=t.domain.codedValues.filter((e=>e.code===r))[0];i&&(e.attributes[t.name]=i.name)}}))}_updateResponseFieldNames(e,t){if(!t||t.length<1)return;const r=this.fieldsIndex;p(r)&&e.forEach((e=>{if(e&&e.attributes)for(const i of t)if(r.has(i)){const t=r.get(i).name;t!==i&&(e.attributes[i]=e.attributes[t],delete e.attributes[t])}}))}_getRenderingRuleString(e){if(this._hasRenderingRule(e)){var t;let r=e.toJSON();return r=null!=(t=r.rasterFunctionDefinition)?t:r,(r.thumbnail||r.thumbnailEx)&&(r.thumbnail=r.thumbnailEx=null),JSON.stringify(r)}return null}_hasRenderingRule(e){return e&&e.functionName&&"none"!==e.functionName.toLowerCase()}_updateRenderingRulesFunctionName(e,t){if(!e||e.length<1)return;if("Raw"===e)return e.replace("Raw","None");const r=e.toLowerCase().replace(/ /gi,"_");return t.has(r)?t.get(r):e}_isRFTJson(e){return e&&e.name&&e.arguments&&e.function&&e.hasOwnProperty("functionType")}_readCapabilities(e){const t=e.capabilities?e.capabilities.toLowerCase().split(",").map((e=>e.trim())):["image","catalog"],{currentVersion:r,advancedQueryCapabilities:i,maxRecordCount:s}=e,n=t.indexOf("image")>-1,a="esriImageServiceDataTypeElevation"===e.serviceDataType,o=!!(e.spatialReference||e.extent&&e.extent.spatialReference),l=t.includes("edit");return{data:{supportsAttachment:!1},operations:{supportsComputeHistograms:n,supportsExportImage:n,supportsIdentify:n,supportsMeasure:t.indexOf("mensuration")>-1&&o,supportsDownload:t.indexOf("download")>-1,supportsQuery:t.indexOf("catalog")>-1&&e.fields&&e.fields.length>0,supportsGetSamples:r>=10.2&&n,supportsProject:r>=10.3&&n,supportsComputeStatisticsHistograms:r>=10.4&&n,supportsQueryBoundary:r>=10.6&&n,supportsCalculateVolume:r>=10.7&&a,supportsComputePixelLocation:r>=10.7&&t.indexOf("catalog")>-1,supportsComputeAngles:r>=10.91,supportsAdd:l,supportsDelete:l,supportsEditing:l,supportsUpdate:l,supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsChangeTracking:!1,supportsQueryAttachments:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsExceedsLimitStatistics:!1},query:{maxRecordCount:s,maxRecordCountFactor:void 0,supportsStatistics:!(null==i||!i.supportsStatistics),supportsOrderBy:!(null==i||!i.supportsOrderBy),supportsDistinct:!(null==i||!i.supportsDistinct),supportsPagination:!(null==i||!i.supportsPagination),supportsStandardizedQueriesOnly:!(null==i||!i.useStandardizedQueries),supportsPercentileStatistics:!(null==i||!i.supportsPercentileStatistics),supportsCentroid:!(null==i||!i.supportsReturningGeometryCentroid),supportsDistance:!(null==i||!i.supportsQueryWithDistance),supportsExtent:!(null==i||!i.supportsReturningQueryExtent),supportsGeometryProperties:!(null==i||!i.supportsReturningGeometryProperties),supportsHavingClause:!(null==i||!i.supportsHavingClause),supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsMaxRecordCountFactor:!1,supportsSqlExpression:!1,supportsTopFeaturesQuery:!1,supportsQueryByOthers:!1,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!1,supportsCacheHint:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},standardMaxRecordCount:void 0,tileMaxRecordCount:void 0}}}};return e([v()],u.prototype,"_functionRasterInfos",void 0),e([v()],u.prototype,"_rasterJobHandler",void 0),e([v({dependsOn:["_serviceSupportsMosaicRule"]})],u.prototype,"_defaultServiceMosaicRule",void 0),e([b("_defaultServiceMosaicRule",["defaultMosaicMethod"])],u.prototype,"readDefaultServiceMosaicRule",null),e([v()],u.prototype,"_cachedRendererJson",void 0),e([v({readOnly:!0})],u.prototype,"_serviceSourceType",void 0),e([b("_serviceSourceType",["serviceSourceType","fields"])],u.prototype,"readServiceSourceType",null),e([v({readOnly:!0})],u.prototype,"_serviceSupportsMosaicRule",void 0),e([b("_serviceSupportsMosaicRule",["currentVersion","fields"])],u.prototype,"readServiceSupportsMosaicRule",null),e([v()],u.prototype,"rasterAttributeTableFieldPrefix",void 0),e([v({readOnly:!0})],u.prototype,"rasterFunctionNamesIndex",null),e([v()],u.prototype,"adjustAspectRatio",void 0),e([v({readOnly:!0}),f("serviceRasterInfo.bandCount")],u.prototype,"bandCount",void 0),e([v({type:[g],json:{write:!0}})],u.prototype,"bandIds",void 0),e([b("bandIds")],u.prototype,"readBandIds",null),e([v({readOnly:!0,json:{read:!1}})],u.prototype,"capabilities",void 0),e([b("service","capabilities",["capabilities","currentVersion","serviceDataType"])],u.prototype,"readCapabilities",null),e([v({type:Number})],u.prototype,"compressionQuality",void 0),e([I("compressionQuality")],u.prototype,"writeCompressionQuality",null),e([v({type:Number})],u.prototype,"compressionTolerance",void 0),e([I("compressionTolerance")],u.prototype,"writeCompressionTolerance",null),e([v({json:{read:{source:"copyrightText"}}})],u.prototype,"copyright",void 0),e([v({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],u.prototype,"definitionExpression",void 0),e([v({readOnly:!0,constructOnly:!0})],u.prototype,"exportImageServiceParameters",void 0),e([v()],u.prototype,"rasterInfo",void 0),e([v({readOnly:!0,type:[D]})],u.prototype,"fields",void 0),e([v({readOnly:!0})],u.prototype,"fieldsIndex",null),e([v({type:["png","png8","png24","png32","jpg","bmp","gif","jpgpng","lerc","tiff"],json:{write:!0}})],u.prototype,"format",null),e([b("service","format",["serviceDataType"])],u.prototype,"readFormat",null),e([v({type:ee})],u.prototype,"fullExtent",void 0),e([v({readOnly:!0})],u.prototype,"hasMultidimensions",void 0),e([v({json:{read:{source:"maxImageHeight"}}})],u.prototype,"imageMaxHeight",void 0),e([v({json:{read:{source:"maxImageWidth"}}})],u.prototype,"imageMaxWidth",void 0),e([v({type:String,json:{type:C.jsonValues,read:C.read,write:C.write}})],u.prototype,"interpolation",void 0),e([v()],u.prototype,"minScale",void 0),e([b("service","minScale")],u.prototype,"readMinScale",null),e([v()],u.prototype,"maxScale",void 0),e([b("service","maxScale")],u.prototype,"readMaxScale",null),e([v({type:j})],u.prototype,"mosaicRule",null),e([b("mosaicRule",["mosaicRule","defaultMosaicMethod"])],u.prototype,"readMosaicRule",null),e([I("mosaicRule")],u.prototype,"writeMosaicRule",null),e([v({readOnly:!0}),f("serviceRasterInfo.multidimensionalInfo")],u.prototype,"multidimensionalInfo",void 0),e([v({json:{type:g}})],u.prototype,"noData",void 0),e([I("noData")],u.prototype,"writeNoData",null),e([v({type:String,json:{type:M.jsonValues,read:M.read,write:M.write}})],u.prototype,"noDataInterpretation",void 0),e([v({type:String,readOnly:!0,json:{read:{source:["fields"]}}})],u.prototype,"objectIdField",void 0),e([b("objectIdField")],u.prototype,"readObjectIdField",null),e([v({})],u.prototype,"geometryType",void 0),e([v({})],u.prototype,"typeIdField",void 0),e([v({})],u.prototype,"types",void 0),e([v({readOnly:!0})],u.prototype,"parsedUrl",null),e([v({readOnly:!0}),f("serviceRasterInfo.pixelSize.x")],u.prototype,"pixelSizeX",void 0),e([v({readOnly:!0}),f("serviceRasterInfo.pixelSize.y")],u.prototype,"pixelSizeY",void 0),e([v({type:Function})],u.prototype,"pixelFilter",void 0),e([v()],u.prototype,"raster",void 0),e([v()],u.prototype,"viewId",void 0),e([v({types:i,json:{name:"layerDefinition.drawingInfo.renderer",origins:{"web-scene":{types:s,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type&&"animated-flow"!==e.type})}}}}})],u.prototype,"renderer",void 0),e([b("renderer")],u.prototype,"readRenderer",null),e([I("renderer")],u.prototype,"writeRenderer",null),e([v()],u.prototype,"symbolizer",void 0),e([v(w)],u.prototype,"opacity",void 0),e([v({readOnly:!0}),f("serviceRasterInfo.attributeTable")],u.prototype,"rasterAttributeTable",void 0),e([v({readOnly:!0})],u.prototype,"rasterFields",null),e([v({constructOnly:!0})],u.prototype,"rasterFunctionInfos",void 0),e([v({type:J})],u.prototype,"renderingRule",null),e([b("renderingRule",["renderingRule","rasterFunctionInfos"])],u.prototype,"readRenderingRule",null),e([I("renderingRule")],u.prototype,"writeRenderingRule",null),e([v()],u.prototype,"serviceDataType",void 0),e([v({readOnly:!0,type:de})],u.prototype,"spatialReference",void 0),e([b("spatialReference",["spatialReference","extent"])],u.prototype,"readSpatialReference",null),e([v({json:{type:fe.jsonValues}})],u.prototype,"pixelType",void 0),e([b("pixelType")],u.prototype,"readPixelType",null),e([I("pixelType")],u.prototype,"writePixelType",null),e([v({constructOnly:!0,type:q})],u.prototype,"serviceRasterInfo",void 0),e([v()],u.prototype,"sourceJSON",void 0),e([v(_)],u.prototype,"url",void 0),e([v({readOnly:!0})],u.prototype,"version",void 0),e([b("version",["currentVersion","fields","timeInfo"])],u.prototype,"readVersion",null),u=e([S("esri.layers.mixins.ArcGISImageService")],u),u};export{ve as ArcGISImageService};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{JSONMap as t}from"../../../core/jsonMap.js";import{isSome as e}from"../../../core/maybe.js";import n from"../PixelBlock.js";import{isValidPixelBlock as r}from"./pixelUtils.js";const o=new Map;o.set("meter-per-second",1),o.set("kilometer-per-hour",.277778),o.set("knots",.514444),o.set("feet-per-second",.3048),o.set("mile-per-hour",.44704);const a=180/Math.PI,s=5,i=new t({esriMetersPerSecond:"meter-per-second",esriKilometersPerHour:"kilometer-per-hour",esriKnots:"knots",esriFeetPerSecond:"feet-per-second",esriMilesPerHour:"mile-per-hour"});function h(t,e){return o.get(t)/o.get(e)||1}function l(t){return(450-t)%360}function c(t,e="geographic"){const[n,r]=t,o=Math.sqrt(n*n+r*r);let s=Math.atan2(r,n)*a;return s=(360+s)%360,"geographic"===e&&(s=l(s)),[o,s]}function u(t,e="geographic"){let n=t[1];"geographic"===e&&(n=l(n)),n%=360;const r=t[0];return[r*Math.cos(n/a),r*Math.sin(n/a)]}function f(t,e,o="geographic",a=1){if(!r(t))return t;const{pixels:s,width:i,height:h}=t,l=i*h,f=s[0],p=s[1],m=n.createEmptyBand(t.pixelType,l),M=n.createEmptyBand(t.pixelType,l);let x=0;for(let n=0;n<h;n++)for(let t=0;t<i;t++)"vector-uv"===e?([m[x],M[x]]=c([f[x],p[x]],o),m[x]*=a):([m[x],M[x]]=u([f[x],p[x]],o),m[x]*=a,M[x]*=a),x++;const d=new n({pixelType:t.pixelType,width:t.width,height:t.height,mask:t.mask,validPixelCount:t.validPixelCount,maskIsAlpha:t.maskIsAlpha,pixels:[m,M]});return d.updateStatistics(),d}function p(t,e,n=1){if(1===n||!r(t))return t;const o=t.clone(),{pixels:a,width:s,height:i}=o,h=a[0],l=a[1];let c=0;for(let r=0;r<i;r++)for(let t=0;t<s;t++)"vector-uv"===e?(h[c]*=n,l[c]*=n):h[c]*=n,c++;return o.updateStatistics(),o}function m(t,n,r,o,a){if(!e(a)||!a.spatialReference.equals(t.spatialReference))return{extent:t,width:n,height:r,resolution:t.width/n};const s=a.xmin,i=a.ymax;o=Math.max(o||0,30);const h=Math.ceil(n*(1/o)),l=Math.ceil(r*(1/o)),c=((t.xmax-t.xmin)/h+(t.ymax-t.ymin)/l)/2;return t.xmin=s+Math.floor((t.xmin-s)/c)*c,t.xmax=s+Math.ceil((t.xmax-s)/c)*c,t.ymin=i+Math.floor((t.ymin-i)/c)*c,t.ymax=i+Math.ceil((t.ymax-i)/c)*c,{extent:t,width:Math.round(t.width/c),height:Math.round(t.height/c),resolution:c}}const M=x(0,0,0);function x(t=0,e=0,n=Math.PI,r=!0){r&&(n=(2*Math.PI-n)%(2*Math.PI));const o=r?-1:1,a=13*o,s=-7*o,i=-2*o,h=-16*o,l=29,[c,u]=g(0,e+a,n,l),[f,p]=g(t-5.5,e+s,n,l),[m,M]=g(t+5.5,e+s,n,l),[x,d]=g(t-1.5,e+i,n,l),[k,w]=g(t+1.5,e+i,n,l),[y,P]=g(t-1.5,e+h,n,l),[b,I]=g(t+1.5,e+h,n,l);return[c,u,f,p,x,d,k,w,m,M,y,P,b,I]}function d(t=0,e=Math.PI,n=!0){n&&(e=(2*Math.PI-e)%(2*Math.PI));const r=10,o=n?-1:1,a=5*o,i=20*o,h=25*o,l=45,c=0,u=0,f=2,p=0,m=f*o;let[M,x]=[c+r/2,u-i],[d,k]=[M+f,x],[w,y]=[d-p,k+m],[P,b]=[c-r/2,u-h],[I,v]=[P+p,b-m],A=Math.ceil(t/s),_=Math.floor(A/10);A-=8*_;const U=[],S=[];for(let s=0;s<A/2;s++,_--){_<=0&&A%2==1&&s===(A-1)/2&&(P=c,I=P+p,b=(b+x)/2,v=b-m);const[t,n]=g(P,b,e,l);if(_>0){const[r,o]=g(d,b,e,l),[a,s]=g(M,x,e,l);U.push(r),U.push(o),U.push(t),U.push(n),U.push(a),U.push(s)}else{const[r,o]=g(d,k,e,l),[a,s]=g(w,y,e,l),[i,h]=g(I,v,e,l);S.push(t),S.push(n),S.push(i),S.push(h),S.push(a),S.push(s),S.push(r),S.push(o)}b+=a,x+=a,k+=a,y+=a,v+=a}const[D,F]=g(c+r/2,u+i,e,l),j=r/2+f,[N,T]=g(c+j,u+i,e,l),[q,B]=g(c+r/2,u-h,e,l),[E,J]=g(c+j,u-h,e,l);return{pennants:U,barbs:S,shaft:[D,F,N,T,q,B,E,J]}}function g(t,e,n,r=1){const o=Math.sqrt(t*t+e*e)/r,a=(2*Math.PI+Math.atan2(e,t))%(2*Math.PI);return[o,(2*Math.PI+a-n)%(2*Math.PI)]}const k=[0,1,3,6,10,16,21,27,33,40,47,55,63],w=[0,.5,1,1.5,2],y=[0,.25,.5,1,1.5,2,2.5,3,3.5,4];function P(t,e,n,r){const o=h(r||"knots",n);let a;for(a=1;a<e.length;a++)if(a===e.length-1){if(t<e[a]*o)break}else if(t<=e[a]*o)break;return Math.min(a-1,e.length-2)}function b(t,e,n,r,o){let a=0;switch(e){case"beaufort_kn":a=P(t,k,"knots",n);break;case"beaufort_km":a=P(t,k,"kilometer-per-hour",n);break;case"beaufort_ft":a=P(t,k,"feet-per-second",n);break;case"beaufort_m":a=P(t,k,"meter-per-second",n);break;case"classified_arrow":a=P(t,o,r,n);break;case"ocean_current_m":a=P(t,w,"meter-per-second",n);break;case"ocean_current_kn":a=P(t,y,"knots",n)}return a}function I(t,e){const{style:n,inputUnit:r,outputUnit:o,breakValues:a}=e,s=i.fromJSON(r),h=i.fromJSON(o),l=7*6,c=15;let u=0,f=0;const{width:p,height:m,mask:x}=t,d=t.pixels[0],g=t.pixels[1],k=x?x.filter((t=>t>0)).length:p*m,w=new Float32Array(k*l),y=new Uint32Array(c*k);for(let i=0;i<m;i++)for(let t=0;t<p;t++){const e=i*p+t;if(!x||x[i*p+t]){var P;const r=null!=(P=(g[e]+360)%360/180*Math.PI)?P:2*Math.PI*Math.random(),o=b(d[e],n,s,h,a);for(let n=0;n<M.length;n+=2)w[u++]=(t+.5)/p,w[u++]=(i+.5)/m,w[u++]=M[n],w[u++]=M[n+1]+r,w[u++]=o,w[u++]=d[e];const c=7*(u/l-1);y[f++]=c,y[f++]=c+1,y[f++]=c+2,y[f++]=c+0,y[f++]=c+4,y[f++]=c+3,y[f++]=c+0,y[f++]=c+2,y[f++]=c+3,y[f++]=c+2,y[f++]=c+5,y[f++]=c+3,y[f++]=c+5,y[f++]=c+6,y[f++]=c+3}}return{vertexData:w,indexData:y}}const v=[];function A(t,e){if(0===v.length)for(let s=0;s<30;s++)v.push(d(5*s,0));const n=h(i.fromJSON(e.inputUnit),"knots"),{width:r,height:o,mask:a}=t,l=t.pixels[0],c=t.pixels[1],u=6,f=[],p=[];let m=0,M=0;for(let i=0;i<o;i++)for(let t=0;t<r;t++){const e=i*r+t,h=l[e]*n;if((!a||a[i*r+t])&&h>=s){var x;const n=null!=(x=(c[e]+360)%360/180*Math.PI)?x:2*Math.PI*Math.random(),{pennants:a,barbs:s,shaft:l}=v[Math.min(Math.floor(h/5),29)];if(a.length+s.length===0)continue;let d=f.length/u;const g=(t+.5)/r,k=(i+.5)/o;for(let t=0;t<a.length;t+=2)f[m++]=g,f[m++]=k,f[m++]=a[t],f[m++]=a[t+1]+n,f[m++]=0,f[m++]=h;for(let t=0;t<s.length;t+=2)f[m++]=g,f[m++]=k,f[m++]=s[t],f[m++]=s[t+1]+n,f[m++]=0,f[m++]=h;for(let t=0;t<l.length;t+=2)f[m++]=g,f[m++]=k,f[m++]=l[t],f[m++]=l[t+1]+n,f[m++]=0,f[m++]=h;for(let t=0;t<a.length/6;t++)p[M++]=d,p[M++]=d+1,p[M++]=d+2,d+=3;for(let t=0;t<s.length/8;t++)p[M++]=d,p[M++]=d+1,p[M++]=d+2,p[M++]=d+1,p[M++]=d+2,p[M++]=d+3,d+=4;p[M++]=d+0,p[M++]=d+1,p[M++]=d+2,p[M++]=d+1,p[M++]=d+3,p[M++]=d+2,d+=4}}return{vertexData:new Float32Array(f),indexData:new Uint32Array(p)}}function _(t,e){const n=4*6;let r=0,o=0;const{width:a,height:i,mask:h}=t,l=t.pixels[0],c=[],u=[],f="wind_speed"===e.style?s:Number.MAX_VALUE;for(let s=0;s<i;s++)for(let t=0;t<a;t++){const e=s*a+t;if((!h||h[s*a+t])&&l[e]<f){for(let n=0;n<4;n++)c[r++]=(t+.5)/a,c[r++]=(s+.5)/i,c[r++]=n<2?-.5:.5,c[r++]=n%2==0?-.5:.5,c[r++]=0,c[r++]=l[e];const h=4*(r/n-1);u[o++]=h,u[o++]=h+1,u[o++]=h+2,u[o++]=h+1,u[o++]=h+2,u[o++]=h+3}}return{vertexData:new Float32Array(c),indexData:new Uint32Array(u)}}function U(t,e){return"simple_scalar"===e.style?_(t,e):"wind_speed"===e.style?A(t,e):I(t,e)}function S(t,e,r,o=[0,0],a=.5){const{width:s,height:i,mask:h}=t,[l,f]=t.pixels,[p,m]=o,M=Math.round((s-p)/r),x=Math.round((i-m)/r),d=M*x,g=new Float32Array(d),k=new Float32Array(d),w=new Uint8Array(d),y="vector-uv"===e;for(let n=0;n<x;n++)for(let t=0;t<M;t++){let e=0;const o=n*M+t,x=Math.max(0,n*r+m),d=Math.max(0,t*r+p),P=Math.min(i,x+r),b=Math.min(s,d+r);for(let t=x;t<P;t++)for(let n=d;n<b;n++){const r=t*s+n;if(!h||h[r]){e++;const t=y?[l[r],f[r]]:[l[r],(360+f[r])%360],[n,a]=y?t:u(t);g[o]+=n,k[o]+=a}}if(e>=(P-x)*(b-d)*(1-a)){w[o]=1;const[t,n]=c([g[o]/e,k[o]/e]);g[o]=t,k[o]=n}else w[o]=0,g[o]=0,k[o]=0}const P=new n({width:M,height:x,pixels:[g,k],mask:w});return P.updateStatistics(),P}export{f as convertVectorFieldData,p as convertVectorFieldUnit,U as createVFMesh,_ as createVFMeshScalar,h as getUnitConversionFactor,S as sampleVectorField,m as snapImageToSymbolTile,i as unitKebabDict,c as uvComponentToVector};
5
+ import{JSONMap as t}from"../../../core/jsonMap.js";import{isSome as e}from"../../../core/maybe.js";import n from"../PixelBlock.js";import{isValidPixelBlock as r}from"./pixelUtils.js";const o=new Map;o.set("meter-per-second",1),o.set("kilometer-per-hour",.277778),o.set("knots",.514444),o.set("feet-per-second",.3048),o.set("mile-per-hour",.44704);const a=180/Math.PI,s=5,i=new t({esriMetersPerSecond:"meter-per-second",esriKilometersPerHour:"kilometer-per-hour",esriKnots:"knots",esriFeetPerSecond:"feet-per-second",esriMilesPerHour:"mile-per-hour"});function h(t,e){return o.get(t)/o.get(e)||1}function l(t){return(450-t)%360}function c(t,e="geographic"){const[n,r]=t,o=Math.sqrt(n*n+r*r);let s=Math.atan2(r,n)*a;return s=(360+s)%360,"geographic"===e&&(s=l(s)),[o,s]}function u(t,e="geographic"){let n=t[1];"geographic"===e&&(n=l(n)),n%=360;const r=t[0];return[r*Math.cos(n/a),r*Math.sin(n/a)]}function f(t,e,o="geographic",a=1){if(!r(t))return t;const{pixels:s,width:i,height:h}=t,l=i*h,f=s[0],p=s[1],m=n.createEmptyBand(t.pixelType,l),M=n.createEmptyBand(t.pixelType,l);let d=0;for(let n=0;n<h;n++)for(let t=0;t<i;t++)"vector-uv"===e?([m[d],M[d]]=c([f[d],p[d]],o),m[d]*=a):([m[d],M[d]]=u([f[d],p[d]],o),m[d]*=a,M[d]*=a),d++;const x=new n({pixelType:t.pixelType,width:t.width,height:t.height,mask:t.mask,validPixelCount:t.validPixelCount,maskIsAlpha:t.maskIsAlpha,pixels:[m,M]});return x.updateStatistics(),x}function p(t,e,n=1){if(1===n||!r(t))return t;const o=t.clone(),{pixels:a,width:s,height:i}=o,h=a[0],l=a[1];let c=0;for(let r=0;r<i;r++)for(let t=0;t<s;t++)"vector-uv"===e?(h[c]*=n,l[c]*=n):h[c]*=n,c++;return o.updateStatistics(),o}function m(t,n,r,o,a){if(!e(a)||!a.spatialReference.equals(t.spatialReference))return{extent:t,width:Math.round(n/o),height:Math.round(r/o),resolution:t.width/n};const s=a.xmin,i=a.ymax;o=Math.max(o||0,30);const h=(t.xmax-t.xmin)/n*o,l=(t.ymax-t.ymin)/r*o,c=(h+l)/2;return t.xmin=s+Math.floor((t.xmin-s)/h)*h,t.xmax=s+Math.ceil((t.xmax-s)/h)*h,t.ymin=i+Math.floor((t.ymin-i)/l)*l,t.ymax=i+Math.ceil((t.ymax-i)/l)*l,{extent:t,width:Math.round(t.width/h),height:Math.round(t.height/l),resolution:c}}const M=d(0,0,0);function d(t=0,e=0,n=Math.PI,r=!0){r&&(n=(2*Math.PI-n)%(2*Math.PI));const o=r?-1:1,a=13*o,s=-7*o,i=-2*o,h=-16*o,l=21.75,[c,u]=g(0,e+a,n,l),[f,p]=g(t-5.5,e+s,n,l),[m,M]=g(t+5.5,e+s,n,l),[d,x]=g(t-1.5,e+i,n,l),[k,w]=g(t+1.5,e+i,n,l),[y,P]=g(t-1.5,e+h,n,l),[b,I]=g(t+1.5,e+h,n,l);return[c,u,f,p,d,x,k,w,m,M,y,P,b,I]}function x(t=0,e=Math.PI,n=!0){n&&(e=(2*Math.PI-e)%(2*Math.PI));const r=10,o=n?-1:1,a=5*o,i=20*o,h=25*o,l=45,c=0,u=0,f=2,p=0,m=f*o;let[M,d]=[c+r/2,u-i],[x,k]=[M+f,d],[w,y]=[x-p,k+m],[P,b]=[c-r/2,u-h],[I,v]=[P+p,b-m],A=Math.ceil(t/s),_=Math.floor(A/10);A-=8*_;const U=[],S=[];for(let s=0;s<A/2;s++,_--){_<=0&&A%2==1&&s===(A-1)/2&&(P=c,I=P+p,b=(b+d)/2,v=b-m);const[t,n]=g(P,b,e,l);if(_>0){const[r,o]=g(x,b,e,l),[a,s]=g(M,d,e,l);U.push(r),U.push(o),U.push(t),U.push(n),U.push(a),U.push(s)}else{const[r,o]=g(x,k,e,l),[a,s]=g(w,y,e,l),[i,h]=g(I,v,e,l);S.push(t),S.push(n),S.push(i),S.push(h),S.push(a),S.push(s),S.push(r),S.push(o)}b+=a,d+=a,k+=a,y+=a,v+=a}const[D,F]=g(c+r/2,u+i,e,l),j=r/2+f,[N,J]=g(c+j,u+i,e,l),[O,T]=g(c+r/2,u-h,e,l),[q,B]=g(c+j,u-h,e,l);return{pennants:U,barbs:S,shaft:[D,F,N,J,O,T,q,B]}}function g(t,e,n,r=1){const o=Math.sqrt(t*t+e*e)/r,a=(2*Math.PI+Math.atan2(e,t))%(2*Math.PI);return[o,(2*Math.PI+a-n)%(2*Math.PI)]}const k=[0,1,3,6,10,16,21,27,33,40,47,55,63],w=[0,.5,1,1.5,2],y=[0,.25,.5,1,1.5,2,2.5,3,3.5,4];function P(t,e,n,r){const o=h(r||"knots",n);let a;for(a=1;a<e.length;a++)if(a===e.length-1){if(t<e[a]*o)break}else if(t<=e[a]*o)break;return Math.min(a-1,e.length-2)}function b(t,e,n,r,o){let a=0;switch(e){case"beaufort_kn":a=P(t,k,"knots",n);break;case"beaufort_km":a=P(t,k,"kilometer-per-hour",n);break;case"beaufort_ft":a=P(t,k,"feet-per-second",n);break;case"beaufort_m":a=P(t,k,"meter-per-second",n);break;case"classified_arrow":a=P(t,o,r,n);break;case"ocean_current_m":a=P(t,w,"meter-per-second",n);break;case"ocean_current_kn":a=P(t,y,"knots",n)}return a}function I(t,e){const{style:n,inputUnit:r,outputUnit:o,breakValues:a}=e,s=i.fromJSON(r),h=i.fromJSON(o),l=7*6,c=15;let u=0,f=0;const{width:p,height:m,mask:d}=t,x=t.pixels[0],g=t.pixels[1],k=d?d.filter((t=>t>0)).length:p*m,w=new Float32Array(k*l),y=new Uint32Array(c*k);for(let i=0;i<m;i++)for(let t=0;t<p;t++){const e=i*p+t;if(!d||d[i*p+t]){var P;const r=null!=(P=(g[e]+360)%360/180*Math.PI)?P:2*Math.PI*Math.random(),o=b(x[e],n,s,h,a);for(let n=0;n<M.length;n+=2)w[u++]=(t+.5)/p,w[u++]=(i+.5)/m,w[u++]=M[n],w[u++]=M[n+1]+r,w[u++]=o,w[u++]=x[e];const c=7*(u/l-1);y[f++]=c,y[f++]=c+1,y[f++]=c+2,y[f++]=c+0,y[f++]=c+4,y[f++]=c+3,y[f++]=c+0,y[f++]=c+2,y[f++]=c+3,y[f++]=c+2,y[f++]=c+5,y[f++]=c+3,y[f++]=c+5,y[f++]=c+6,y[f++]=c+3}}return{vertexData:w,indexData:y}}const v=[];function A(t,e){if(0===v.length)for(let s=0;s<30;s++)v.push(x(5*s,0));const n=h(i.fromJSON(e.inputUnit),"knots"),{width:r,height:o,mask:a}=t,l=t.pixels[0],c=t.pixels[1],u=6,f=[],p=[];let m=0,M=0;for(let i=0;i<o;i++)for(let t=0;t<r;t++){const e=i*r+t,h=l[e]*n;if((!a||a[i*r+t])&&h>=s){var d;const n=null!=(d=(c[e]+360)%360/180*Math.PI)?d:2*Math.PI*Math.random(),{pennants:a,barbs:s,shaft:l}=v[Math.min(Math.floor(h/5),29)];if(a.length+s.length===0)continue;let x=f.length/u;const g=(t+.5)/r,k=(i+.5)/o;for(let t=0;t<a.length;t+=2)f[m++]=g,f[m++]=k,f[m++]=a[t],f[m++]=a[t+1]+n,f[m++]=0,f[m++]=h;for(let t=0;t<s.length;t+=2)f[m++]=g,f[m++]=k,f[m++]=s[t],f[m++]=s[t+1]+n,f[m++]=0,f[m++]=h;for(let t=0;t<l.length;t+=2)f[m++]=g,f[m++]=k,f[m++]=l[t],f[m++]=l[t+1]+n,f[m++]=0,f[m++]=h;for(let t=0;t<a.length/6;t++)p[M++]=x,p[M++]=x+1,p[M++]=x+2,x+=3;for(let t=0;t<s.length/8;t++)p[M++]=x,p[M++]=x+1,p[M++]=x+2,p[M++]=x+1,p[M++]=x+2,p[M++]=x+3,x+=4;p[M++]=x+0,p[M++]=x+1,p[M++]=x+2,p[M++]=x+1,p[M++]=x+3,p[M++]=x+2,x+=4}}return{vertexData:new Float32Array(f),indexData:new Uint32Array(p)}}function _(t,e){const n=4*6;let r=0,o=0;const{width:a,height:l,mask:c}=t,u=t.pixels[0],f=[],p=[],m=h(i.fromJSON(e.inputUnit),"knots"),M="wind_speed"===e.style?s:Number.MAX_VALUE;for(let s=0;s<l;s++)for(let t=0;t<a;t++){const e=u[s*a+t]*m;if((!c||c[s*a+t])&&e<M){for(let n=0;n<4;n++)f[r++]=(t+.5)/a,f[r++]=(s+.5)/l,f[r++]=n<2?-.5:.5,f[r++]=n%2==0?-.5:.5,f[r++]=0,f[r++]=e;const i=4*(r/n-1);p[o++]=i,p[o++]=i+1,p[o++]=i+2,p[o++]=i+1,p[o++]=i+2,p[o++]=i+3}}return{vertexData:new Float32Array(f),indexData:new Uint32Array(p)}}function U(t,e){return"simple_scalar"===e.style?_(t,e):"wind_speed"===e.style?A(t,e):I(t,e)}function S(t,e,r,o=[0,0],a=.5){const{width:s,height:i,mask:h}=t,[l,f]=t.pixels,[p,m]=o,M=Math.round((s-p)/r),d=Math.round((i-m)/r),x=M*d,g=new Float32Array(x),k=new Float32Array(x),w=new Uint8Array(x),y="vector-uv"===e;for(let n=0;n<d;n++)for(let t=0;t<M;t++){let e=0;const o=n*M+t,d=Math.max(0,n*r+m),x=Math.max(0,t*r+p),P=Math.min(i,d+r),b=Math.min(s,x+r);for(let t=d;t<P;t++)for(let n=x;n<b;n++){const r=t*s+n;if(!h||h[r]){e++;const t=y?[l[r],f[r]]:[l[r],(360+f[r])%360],[n,a]=y?t:u(t);g[o]+=n,k[o]+=a}}if(e>=(P-d)*(b-x)*(1-a)){w[o]=1;const[t,n]=c([g[o]/e,k[o]/e]);g[o]=t,k[o]=n}else w[o]=0,g[o]=0,k[o]=0}const P=new n({width:M,height:d,pixels:[g,k],mask:w});return P.updateStatistics(),P}export{f as convertVectorFieldData,p as convertVectorFieldUnit,U as createVFMesh,_ as createVFMeshScalar,h as getUnitConversionFactor,S as sampleVectorField,m as snapImageToSymbolTile,i as unitKebabDict,c as uvComponentToVector};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/core",
3
- "version": "4.23.0-next.20220128",
3
+ "version": "4.23.0-next.20220202",
4
4
  "homepage": "https://js.arcgis.com",
5
5
  "description": "ArcGIS API for JavaScript: A complete 2D and 3D mapping and data visualization API",
6
6
  "keywords": [
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../chunks/tslib.es6.js";import{getAssetUrl as t}from"../assets.js";import i from"../core/Error.js";import{JSONSupportMixin as r}from"../core/JSONSupport.js";import{clone as o,fixJson as a}from"../core/lang.js";import s from"../core/Loadable.js";import{isSome as n}from"../core/maybe.js";import{isDataProtocol as l,makeAbsolute as p}from"../core/urlUtils.js";import{property as c}from"../core/accessorSupport/decorators/property.js";import{ensureClass as d}from"../core/accessorSupport/ensureType.js";import{reader as u}from"../core/accessorSupport/decorators/reader.js";import{subclass as m}from"../core/accessorSupport/decorators/subclass.js";import h from"../geometry/Extent.js";import y from"./Portal.js";import g from"./PortalItemResource.js";import f from"./PortalRating.js";var v;let w=v=class extends(r(s)){constructor(e){super(e),this.access=null,this.accessInformation=null,this.apiKey=null,this.applicationProxies=null,this.avgRating=null,this.categories=null,this.created=null,this.culture=null,this.description=null,this.extent=null,this.groupCategories=null,this.id=null,this.itemControl=null,this.licenseInfo=null,this.modified=null,this.name=null,this.numComments=null,this.numRatings=null,this.numViews=null,this.owner=null,this.ownerFolder=null,this.portal=null,this.screenshots=null,this.size=null,this.snippet=null,this.sourceJSON=null,this.tags=null,this.title=null,this.type=null,this.typeKeywords=null,this.url=null}static from(e){return d(v,e)}destroy(){this.portal=null}get displayName(){const e=this.type,t=this.typeKeywords||[];let i=e;return"Feature Service"===e||"Feature Collection"===e?i=t.indexOf("Table")>-1?"Table":t.indexOf("Route Layer")>-1?"Route Layer":t.indexOf("Markup")>-1?"Markup":"Feature Layer":"Image Service"===e?i=t.indexOf("Elevation 3D Layer")>-1?"Elevation Layer":t.indexOf("Tiled Imagery")>-1?"Tiled Imagery Layer":"Imagery Layer":"Scene Service"===e?i="Scene Layer":"Scene Package"===e?i="Scene Layer Package":"Stream Service"===e?i="Feature Layer":"Geoprocessing Service"===e&&this.portal&&this.portal.isPortal?i=t.indexOf("Web Tool")>-1?"Tool":"Geoprocessing Service":"Geocoding Service"===e?i="Locator":"Geoenrichment Service"===e?i="GeoEnrichment Service":"Microsoft Powerpoint"===e?i="Microsoft PowerPoint":"GeoJson"===e?i="GeoJSON":"Globe Service"===e?i="Globe Layer":"Vector Tile Service"===e?i="Tile Layer":"netCDF"===e?i="NetCDF":"Map Service"===e?i=-1===t.indexOf("Spatiotemporal")&&(t.indexOf("Hosted Service")>-1||t.indexOf("Tiled")>-1)&&-1===t.indexOf("Relational")?"Tile Layer":"Map Image Layer":e&&e.toLowerCase().indexOf("add in")>-1?i=e.replace(/(add in)/gi,"Add-In"):"datastore catalog service"===e?i="Big Data File Share":"Compact Tile Package"===e?i="Tile Package (tpkx)":"OGCFeatureServer"===e?i="OGC Feature Layer":"web mapping application"===e&&t.indexOf("configurableApp")>-1&&(i="Instant App"),i}readExtent(e){return e&&e.length?new h(e[0][0],e[0][1],e[1][0],e[1][1]):null}get iconUrl(){const e=this.type&&this.type.toLowerCase()||"",i=this.typeKeywords||[],r="esri/images/portal/",o="16";let a,s=!1,n=!1,l=!1,p=!1,c=!1,d=!1;return e.indexOf("service")>0||"feature collection"===e||"kml"===e||"wms"===e||"wmts"===e||"wfs"===e?(s=i.indexOf("Hosted Service")>-1,"feature service"===e||"feature collection"===e||"kml"===e||"wfs"===e?(n=i.indexOf("Table")>-1,l=i.indexOf("Route Layer")>-1,p=i.indexOf("Markup")>-1,c=-1!==i.indexOf("Spatiotemporal"),d=-1!==i.indexOf("UtilityNetwork"),a=c&&n?"spatiotemporaltable":n?"table":l?"routelayer":p?"markup":c?"spatiotemporal":s?"featureshosted":d?"utilitynetwork":"features"):a="map service"===e||"wms"===e||"wmts"===e?s||i.indexOf("Tiled")>-1||"wmts"===e?"maptiles":"mapimages":"scene service"===e?i.indexOf("Line")>-1?"sceneweblayerline":i.indexOf("3DObject")>-1?"sceneweblayermultipatch":i.indexOf("Point")>-1?"sceneweblayerpoint":i.indexOf("IntegratedMesh")>-1?"sceneweblayermesh":i.indexOf("PointCloud")>-1?"sceneweblayerpointcloud":i.indexOf("Polygon")>-1?"sceneweblayerpolygon":i.indexOf("Building")>-1?"sceneweblayerbuilding":i.indexOf("Voxel")>-1?"sceneweblayervoxel":"sceneweblayer":"image service"===e?i.indexOf("Elevation 3D Layer")>-1?"elevationlayer":i.indexOf("Tiled Imagery")>-1?"tiledimagerylayer":"imagery":"stream service"===e?"streamlayer":"vector tile service"===e?"vectortile":"datastore catalog service"===e?"datastorecollection":"geocoding service"===e?"geocodeservice":"geoprocessing service"===e&&i.indexOf("Web Tool")>-1&&this.portal&&this.portal.isPortal?"tool":"layers"):a="web map"===e||"cityengine web scene"===e?"maps":"web scene"===e?i.indexOf("ViewingMode-Local")>-1?"webscenelocal":"websceneglobal":"web mapping application"===e&&i.indexOf("configurableApp")>-1?"instantapps":"web mapping application"===e||"mobile application"===e||"application"===e||"operation view"===e||"desktop application"===e?"apps":"map document"===e||"map package"===e||"published map"===e||"scene document"===e||"globe document"===e||"basemap package"===e||"mobile basemap package"===e||"mobile map package"===e||"project package"===e||"project template"===e||"pro map"===e||"layout"===e||"layer"===e&&i.indexOf("ArcGIS Pro")>-1||"explorer map"===e&&i.indexOf("Explorer Document")?"mapsgray":"service definition"===e||"csv"===e||"shapefile"===e||"cad drawing"===e||"geojson"===e||"360 vr experience"===e||"netcdf"===e||"administrative report"===e?"datafiles":"explorer add in"===e||"desktop add in"===e||"windows viewer add in"===e||"windows viewer configuration"===e?"appsgray":"arcgis pro add in"===e||"arcgis pro configuration"===e?"addindesktop":"rule package"===e||"file geodatabase"===e||"sqlite geodatabase"===e||"csv collection"===e||"kml collection"===e||"windows mobile package"===e||"map template"===e||"desktop application template"===e||"gml"===e||"arcpad package"===e||"code sample"===e||"form"===e||"document link"===e||"earth configuration"===e||"operations dashboard add in"===e||"rules package"===e||"image"===e||"workflow manager package"===e||"explorer map"===e&&i.indexOf("Explorer Mapping Application")>-1||i.indexOf("Document")>-1?"datafilesgray":"network analysis service"===e||"geoprocessing service"===e||"geodata service"===e||"geometry service"===e||"geoprocessing package"===e||"locator package"===e||"geoprocessing sample"===e||"workflow manager service"===e?"toolsgray":"layer"===e||"layer package"===e||"explorer layer"===e?"layersgray":"scene package"===e?"scenepackage":"mobile scene package"===e?"mobilescenepackage":"tile package"===e||"compact tile package"===e?"tilepackage":"task file"===e?"taskfile":"report template"===e?"report-template":"statistical data collection"===e?"statisticaldatacollection":"insights workbook"===e?"workbook":"insights model"===e?"insightsmodel":"insights page"===e?"insightspage":"insights theme"===e?"insightstheme":"hub initiative"===e?"hubinitiative":"hubpage"===e?"hubpage":"hub event"===e?"hubevent":"hub site application"===e?"hubsite":"relational database connection"===e?"relationaldatabaseconnection":"big data file share"===e?"datastorecollection":"image collection"===e?"imagecollection":"style"===e?"style":"desktop style"===e?"desktopstyle":"dashboard"===e?"dashboard":"raster function template"===e?"rasterprocessingtemplate":"vector tile package"===e?"vectortilepackage":"ortho mapping project"===e?"orthomappingproject":"ortho mapping template"===e?"orthomappingtemplate":"solution"===e?"solutions":"geopackage"===e?"geopackage":"deep learning package"===e?"deeplearningpackage":"real time analytic"===e?"realtimeanalytics":"big data analytic"===e?"bigdataanalytics":"feed"===e?"feed":"excalibur imagery project"===e?"excaliburimageryproject":"notebook"===e?"notebook":"storymap"===e?"storymap":"survey123 add in"===e?"survey123addin":"mission"===e?"mission":"mission report"===e?"missionreport":"quickcapture project"===e?"quickcaptureproject":"pro report"===e?"proreport":"urban model"===e?"urbanmodel":"web experience"===e?"experiencebuilder":"web experience template"===e?"webexperiencetemplate":"workflow"===e?"workflow":"insights script"===e?"insightsscript":"kernel gateway connection"===e?"kernelgatewayconnection":"hub initiative template"===e?"hubinitiativetemplate":"storymap theme"===e?"storymaptheme":"knowledge graph"===e?"knowledgegraph":"native application"===e?"nativeapp":"native application installer"===e?"nativeappinstaller":"link chart"===e?"linkchart":"investigation"===e?"investigation":"ogcfeatureserver"===e?"features":"pro project"===e?"proproject":"insights workbook package"===e?"insightsworkbookpackage":"apache parquet"===e?"apacheparquet":"maps",a?t(r+a+o+".png"):null}get isLayer(){return["Map Service","Feature Service","Feature Collection","Scene Service","Image Service","Stream Service","Vector Tile Service","WMTS","WMS"].indexOf(this.type)>-1}get itemUrl(){const e=this.get("portal.restUrl");return e?e+"/content/items/"+this.id:null}get thumbnailUrl(){const e=this.itemUrl,t=this.thumbnail;return e&&t?this.portal._normalizeUrl(`${e}/info/${t}?f=json`):null}get userItemUrl(){const e=this.get("portal.restUrl");if(!e)return null;const t=this.owner||this.get("portal.user.username");if(!t)return null;return`${e}/content/users/${this.ownerFolder?`${t}/${this.ownerFolder}`:t}/items/${this.id}`}load(e){this.portal||(this.portal=y.getDefault());const t=this.portal.load(e).then((()=>this.sourceJSON?this.sourceJSON:this.id&&this.itemUrl?this.portal._request(this.itemUrl,{signal:n(e)?e.signal:null,query:{token:this.apiKey}}):{})).then((e=>{this.sourceJSON=e,this.read(e)}));return this.addResolvingPromise(t),Promise.resolve(this)}addRating(e){const t={method:"post",query:{}};return e instanceof f&&(e=e.rating),isNaN(e)||"number"!=typeof e||(t.query.rating=e),this.portal._request(this.itemUrl+"/addRating",t).then((()=>new f({rating:e,created:new Date})))}clone(){const e={access:this.access,accessInformation:this.accessInformation,applicationProxies:o(this.applicationProxies),avgRating:this.avgRating,categories:o(this.categories),created:o(this.created),culture:this.culture,description:this.description,extent:o(this.extent),groupCategories:o(this.groupCategories),id:this.id,itemControl:this.itemControl,licenseInfo:this.licenseInfo,modified:o(this.modified),name:this.name,numComments:this.numComments,numRatings:this.numRatings,numViews:this.numViews,owner:this.owner,ownerFolder:this.ownerFolder,portal:this.portal,screenshots:o(this.screenshots),size:this.size,snippet:this.snippet,tags:o(this.tags),thumbnail:this.thumbnail,title:this.title,type:this.type,typeKeywords:o(this.typeKeywords),url:this.url};return this.loaded&&(e.loadStatus="loaded"),new v({sourceJSON:this.sourceJSON}).set(e)}createPostQuery(){const e=this.toJSON();for(const t in e)"tags"===t&&null!==e[t]&&(e[t]=e[t].join(", ")),"typeKeywords"===t&&null!==e[t]&&(e[t]=e[t].join(", ")),"extent"===t&&e[t]&&(e[t]=JSON.stringify(e[t]));return e}deleteRating(){return this.portal._request(this.itemUrl+"/deleteRating",{method:"post"}).then((()=>{}))}fetchData(e="json",t){return this.portal._request(this.itemUrl+"/data",{responseType:e,...t,query:{token:this.apiKey}})}fetchRating(e){return this.portal._request(this.itemUrl+"/rating",{query:{token:this.apiKey},...e}).then((e=>null!=e.rating?(e.created=new Date(e.created),new f(e)):null))}fetchRelatedItems(e,t){return this.portal._requestToTypedArray(this.itemUrl+"/relatedItems",{query:{...e,token:this.apiKey},...t},v)}getThumbnailUrl(e){let t=this.thumbnailUrl;return t&&e&&(t+=`&w=${e}`),t}reload(){return this.portal._request(this.itemUrl,{cacheBust:!0,query:{token:this.apiKey}}).then((e=>(this.sourceJSON=e,this.read(e),this)))}update(e){return this.id?this.load().then((()=>this.portal._signIn())).then((()=>{const t=e&&e.data,i={method:"post"};i.query=this.createPostQuery();for(const e in i.query)null===i.query[e]&&(i.query[e]="");return i.query.clearEmptyFields=!0,null!=t&&("string"==typeof t?i.query.text=t:"object"==typeof t&&(i.query.text=JSON.stringify(t))),this.portal._request(`${this.userItemUrl}/update`,i).then((()=>this.reload()))})):Promise.reject(new i("portal:item-does-not-exist","The item does not exist yet and cannot be updated"))}updateThumbnail(e){return this.id?this.load().then((()=>this.portal._signIn())).then((()=>{const t=e.thumbnail,i=e.filename,r={method:"post"};if("string"==typeof t)l(t)?r.query={data:t}:r.query={url:p(t)},n(i)&&(r.query.filename=i);else{const e=new FormData;n(i)?e.append("file",t,i):e.append("file",t),r.body=e}return this.portal._request(`${this.userItemUrl}/updateThumbnail`,r).then((()=>this.reload()))})):Promise.reject(new i("portal:item-does-not-exist","The item does not exist yet and cannot be updated"))}async fetchResources(e={},t){return(await import("./support/resourceUtils.js")).fetchResources(this,e,t)}async addResource(e,t,i){const r=await import("./support/resourceUtils.js");return e.portalItem=this,r.addOrUpdateResource(e,"add",t,i)}async removeResource(e,t){const r=await import("./support/resourceUtils.js");if(e.portalItem&&e.portalItem.itemUrl!==this.itemUrl)throw new i("removeresource:portal-item-mismatch","The portal item associated with the provided resource does not match the item");return r.removeResource(this,e,t)}async removeAllResources(e){return(await import("./support/resourceUtils.js")).removeAllResources(this,e)}resourceFromPath(e){return new g({portalItem:this,path:e})}toJSON(){const e=this.extent,t={created:this.created&&this.created.getTime(),description:this.description,extent:e&&[[e.xmin,e.ymin],[e.xmax,e.ymax]],id:this.id,modified:this.modified&&this.modified.getTime(),name:this.name,owner:this.owner,ownerFolder:this.ownerFolder,snippet:this.snippet,tags:this.tags,thumbnail:this.thumbnail,title:this.title,type:this.type,typeKeywords:this.typeKeywords,url:this.url};return a(t)}static fromJSON(e){if(!e)return null;if(e.declaredClass)throw new Error("JSON object is already hydrated");return new v({sourceJSON:e})}_getPostQuery(){const e=this.toJSON();for(const t in e)"tags"===t&&null!==e[t]&&(e[t]=e[t].join(", ")),"typeKeywords"===t&&null!==e[t]&&(e[t]=e[t].join(", ")),"extent"===t&&e[t]&&(e[t]=JSON.stringify(e[t]));return e}};e([c({type:["private","shared","org","public"]})],w.prototype,"access",void 0),e([c()],w.prototype,"accessInformation",void 0),e([c({type:String})],w.prototype,"apiKey",void 0),e([c({json:{read:{source:"appProxies"}}})],w.prototype,"applicationProxies",void 0),e([c()],w.prototype,"avgRating",void 0),e([c()],w.prototype,"categories",void 0),e([c({type:Date})],w.prototype,"created",void 0),e([c()],w.prototype,"culture",void 0),e([c()],w.prototype,"description",void 0),e([c({readOnly:!0})],w.prototype,"displayName",null),e([c({type:h})],w.prototype,"extent",void 0),e([u("extent")],w.prototype,"readExtent",null),e([c()],w.prototype,"groupCategories",void 0),e([c({readOnly:!0})],w.prototype,"iconUrl",null),e([c()],w.prototype,"id",void 0),e([c({readOnly:!0})],w.prototype,"isLayer",null),e([c()],w.prototype,"itemControl",void 0),e([c({readOnly:!0})],w.prototype,"itemUrl",null),e([c()],w.prototype,"licenseInfo",void 0),e([c({type:Date})],w.prototype,"modified",void 0),e([c()],w.prototype,"name",void 0),e([c()],w.prototype,"numComments",void 0),e([c()],w.prototype,"numRatings",void 0),e([c()],w.prototype,"numViews",void 0),e([c()],w.prototype,"owner",void 0),e([c()],w.prototype,"ownerFolder",void 0),e([c({type:y})],w.prototype,"portal",void 0),e([c()],w.prototype,"screenshots",void 0),e([c()],w.prototype,"size",void 0),e([c()],w.prototype,"snippet",void 0),e([c()],w.prototype,"sourceJSON",void 0),e([c()],w.prototype,"tags",void 0),e([c()],w.prototype,"thumbnail",void 0),e([c({readOnly:!0})],w.prototype,"thumbnailUrl",null),e([c()],w.prototype,"title",void 0),e([c()],w.prototype,"type",void 0),e([c()],w.prototype,"typeKeywords",void 0),e([c()],w.prototype,"url",void 0),e([c({readOnly:!0})],w.prototype,"userItemUrl",null),w=v=e([m("esri.portal.PortalItem")],w);const b=w;export{b as default};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import{getAssetUrl as t}from"../assets.js";import i from"../core/Error.js";import{JSONSupportMixin as r}from"../core/JSONSupport.js";import{clone as o,fixJson as a}from"../core/lang.js";import s from"../core/Loadable.js";import{isSome as n}from"../core/maybe.js";import{isDataProtocol as l,makeAbsolute as p}from"../core/urlUtils.js";import{property as c}from"../core/accessorSupport/decorators/property.js";import{ensureClass as d}from"../core/accessorSupport/ensureType.js";import{reader as u}from"../core/accessorSupport/decorators/reader.js";import{subclass as m}from"../core/accessorSupport/decorators/subclass.js";import h from"../geometry/Extent.js";import y from"./Portal.js";import g from"./PortalItemResource.js";import f from"./PortalRating.js";var v;let w=v=class extends(r(s)){constructor(e){super(e),this.access=null,this.accessInformation=null,this.apiKey=null,this.applicationProxies=null,this.avgRating=null,this.categories=null,this.created=null,this.culture=null,this.description=null,this.extent=null,this.groupCategories=null,this.id=null,this.itemControl=null,this.licenseInfo=null,this.modified=null,this.name=null,this.numComments=null,this.numRatings=null,this.numViews=null,this.owner=null,this.ownerFolder=null,this.portal=null,this.screenshots=null,this.size=null,this.snippet=null,this.sourceJSON=null,this.tags=null,this.title=null,this.type=null,this.typeKeywords=null,this.url=null}static from(e){return d(v,e)}destroy(){this.portal=null}get displayName(){const e=this.type,t=this.typeKeywords||[];let i=e;return"Feature Service"===e||"Feature Collection"===e?i=t.indexOf("Table")>-1?"Table":t.indexOf("Route Layer")>-1?"Route Layer":t.indexOf("Markup")>-1?"Markup":"Feature Layer":"Image Service"===e?i=t.indexOf("Elevation 3D Layer")>-1?"Elevation Layer":t.indexOf("Tiled Imagery")>-1?"Tiled Imagery Layer":"Imagery Layer":"Scene Service"===e?i="Scene Layer":"Media Service"===e?i="Media Layer":"Scene Package"===e?i="Scene Layer Package":"Stream Service"===e?i="Feature Layer":"Geoprocessing Service"===e&&this.portal&&this.portal.isPortal?i=t.indexOf("Web Tool")>-1?"Tool":"Geoprocessing Service":"Geocoding Service"===e?i="Locator":"Geoenrichment Service"===e?i="GeoEnrichment Service":"Microsoft Powerpoint"===e?i="Microsoft PowerPoint":"GeoJson"===e?i="GeoJSON":"Globe Service"===e?i="Globe Layer":"Vector Tile Service"===e?i="Tile Layer":"netCDF"===e?i="NetCDF":"Map Service"===e?i=-1===t.indexOf("Spatiotemporal")&&(t.indexOf("Hosted Service")>-1||t.indexOf("Tiled")>-1)&&-1===t.indexOf("Relational")?"Tile Layer":"Map Image Layer":e&&e.toLowerCase().indexOf("add in")>-1?i=e.replace(/(add in)/gi,"Add-In"):"datastore catalog service"===e?i="Big Data File Share":"Compact Tile Package"===e?i="Tile Package (tpkx)":"OGCFeatureServer"===e?i="OGC Feature Layer":"web mapping application"===e&&t.indexOf("configurableApp")>-1&&(i="Instant App"),i}readExtent(e){return e&&e.length?new h(e[0][0],e[0][1],e[1][0],e[1][1]):null}get iconUrl(){const e=this.type&&this.type.toLowerCase()||"",i=this.typeKeywords||[],r="esri/images/portal/",o="16";let a,s=!1,n=!1,l=!1,p=!1,c=!1,d=!1;return e.indexOf("service")>0||"feature collection"===e||"kml"===e||"wms"===e||"wmts"===e||"wfs"===e?(s=i.indexOf("Hosted Service")>-1,"feature service"===e||"feature collection"===e||"kml"===e||"wfs"===e?(n=i.indexOf("Table")>-1,l=i.indexOf("Route Layer")>-1,p=i.indexOf("Markup")>-1,c=-1!==i.indexOf("Spatiotemporal"),d=-1!==i.indexOf("UtilityNetwork"),a=c&&n?"spatiotemporaltable":n?"table":l?"routelayer":p?"markup":c?"spatiotemporal":s?"featureshosted":d?"utilitynetwork":"features"):a="map service"===e||"wms"===e||"wmts"===e?s||i.indexOf("Tiled")>-1||"wmts"===e?"maptiles":"mapimages":"scene service"===e?i.indexOf("Line")>-1?"sceneweblayerline":i.indexOf("3DObject")>-1?"sceneweblayermultipatch":i.indexOf("Point")>-1?"sceneweblayerpoint":i.indexOf("IntegratedMesh")>-1?"sceneweblayermesh":i.indexOf("PointCloud")>-1?"sceneweblayerpointcloud":i.indexOf("Polygon")>-1?"sceneweblayerpolygon":i.indexOf("Building")>-1?"sceneweblayerbuilding":i.indexOf("Voxel")>-1?"sceneweblayervoxel":"sceneweblayer":"image service"===e?i.indexOf("Elevation 3D Layer")>-1?"elevationlayer":i.indexOf("Tiled Imagery")>-1?"tiledimagerylayer":"imagery":"stream service"===e?"streamlayer":"media service"===e?"mediaservice":"vector tile service"===e?"vectortile":"datastore catalog service"===e?"datastorecollection":"geocoding service"===e?"geocodeservice":"geoprocessing service"===e&&i.indexOf("Web Tool")>-1&&this.portal&&this.portal.isPortal?"tool":"layers"):a="web map"===e||"cityengine web scene"===e?"maps":"web scene"===e?i.indexOf("ViewingMode-Local")>-1?"webscenelocal":"websceneglobal":"web mapping application"===e&&i.indexOf("configurableApp")>-1?"instantapps":"web mapping application"===e||"mobile application"===e||"application"===e||"operation view"===e||"desktop application"===e?"apps":"map document"===e||"map package"===e||"published map"===e||"scene document"===e||"globe document"===e||"basemap package"===e||"mobile basemap package"===e||"mobile map package"===e||"project package"===e||"project template"===e||"pro map"===e||"layout"===e||"layer"===e&&i.indexOf("ArcGIS Pro")>-1||"explorer map"===e&&i.indexOf("Explorer Document")?"mapsgray":"service definition"===e||"csv"===e||"shapefile"===e||"cad drawing"===e||"geojson"===e||"360 vr experience"===e||"netcdf"===e||"administrative report"===e?"datafiles":"explorer add in"===e||"desktop add in"===e||"windows viewer add in"===e||"windows viewer configuration"===e?"appsgray":"arcgis pro add in"===e||"arcgis pro configuration"===e?"addindesktop":"rule package"===e||"file geodatabase"===e||"sqlite geodatabase"===e||"csv collection"===e||"kml collection"===e||"windows mobile package"===e||"map template"===e||"desktop application template"===e||"gml"===e||"arcpad package"===e||"code sample"===e||"form"===e||"document link"===e||"earth configuration"===e||"operations dashboard add in"===e||"rules package"===e||"image"===e||"workflow manager package"===e||"explorer map"===e&&i.indexOf("Explorer Mapping Application")>-1||i.indexOf("Document")>-1?"datafilesgray":"network analysis service"===e||"geoprocessing service"===e||"geodata service"===e||"geometry service"===e||"geoprocessing package"===e||"locator package"===e||"geoprocessing sample"===e||"workflow manager service"===e?"toolsgray":"layer"===e||"layer package"===e||"explorer layer"===e?"layersgray":"scene package"===e?"scenepackage":"mobile scene package"===e?"mobilescenepackage":"tile package"===e||"compact tile package"===e?"tilepackage":"task file"===e?"taskfile":"report template"===e?"report-template":"statistical data collection"===e?"statisticaldatacollection":"insights workbook"===e?"workbook":"insights model"===e?"insightsmodel":"insights page"===e?"insightspage":"insights theme"===e?"insightstheme":"hub initiative"===e?"hubinitiative":"hubpage"===e?"hubpage":"hub event"===e?"hubevent":"hub site application"===e?"hubsite":"relational database connection"===e?"relationaldatabaseconnection":"big data file share"===e?"datastorecollection":"image collection"===e?"imagecollection":"style"===e?"style":"desktop style"===e?"desktopstyle":"dashboard"===e?"dashboard":"raster function template"===e?"rasterprocessingtemplate":"vector tile package"===e?"vectortilepackage":"ortho mapping project"===e?"orthomappingproject":"ortho mapping template"===e?"orthomappingtemplate":"solution"===e?"solutions":"geopackage"===e?"geopackage":"deep learning package"===e?"deeplearningpackage":"real time analytic"===e?"realtimeanalytics":"big data analytic"===e?"bigdataanalytics":"feed"===e?"feed":"excalibur imagery project"===e?"excaliburimageryproject":"notebook"===e?"notebook":"storymap"===e?"storymap":"survey123 add in"===e?"survey123addin":"mission"===e?"mission":"mission report"===e?"missionreport":"quickcapture project"===e?"quickcaptureproject":"pro report"===e?"proreport":"urban model"===e?"urbanmodel":"web experience"===e?"experiencebuilder":"web experience template"===e?"webexperiencetemplate":"workflow"===e?"workflow":"insights script"===e?"insightsscript":"kernel gateway connection"===e?"kernelgatewayconnection":"hub initiative template"===e?"hubinitiativetemplate":"storymap theme"===e?"storymaptheme":"knowledge graph"===e?"knowledgegraph":"native application"===e?"nativeapp":"native application installer"===e?"nativeappinstaller":"link chart"===e?"linkchart":"investigation"===e?"investigation":"ogcfeatureserver"===e?"features":"pro project"===e?"proproject":"insights workbook package"===e?"insightsworkbookpackage":"apache parquet"===e?"apacheparquet":"maps",a?t(r+a+o+".png"):null}get isLayer(){return["Map Service","Feature Service","Feature Collection","Scene Service","Image Service","Stream Service","Vector Tile Service","WMTS","WMS"].indexOf(this.type)>-1}get itemUrl(){const e=this.get("portal.restUrl");return e?e+"/content/items/"+this.id:null}get thumbnailUrl(){const e=this.itemUrl,t=this.thumbnail;return e&&t?this.portal._normalizeUrl(`${e}/info/${t}?f=json`):null}get userItemUrl(){const e=this.get("portal.restUrl");if(!e)return null;const t=this.owner||this.get("portal.user.username");if(!t)return null;return`${e}/content/users/${this.ownerFolder?`${t}/${this.ownerFolder}`:t}/items/${this.id}`}load(e){this.portal||(this.portal=y.getDefault());const t=this.portal.load(e).then((()=>this.sourceJSON?this.sourceJSON:this.id&&this.itemUrl?this.portal._request(this.itemUrl,{signal:n(e)?e.signal:null,query:{token:this.apiKey}}):{})).then((e=>{this.sourceJSON=e,this.read(e)}));return this.addResolvingPromise(t),Promise.resolve(this)}addRating(e){const t={method:"post",query:{}};return e instanceof f&&(e=e.rating),isNaN(e)||"number"!=typeof e||(t.query.rating=e),this.portal._request(this.itemUrl+"/addRating",t).then((()=>new f({rating:e,created:new Date})))}clone(){const e={access:this.access,accessInformation:this.accessInformation,applicationProxies:o(this.applicationProxies),avgRating:this.avgRating,categories:o(this.categories),created:o(this.created),culture:this.culture,description:this.description,extent:o(this.extent),groupCategories:o(this.groupCategories),id:this.id,itemControl:this.itemControl,licenseInfo:this.licenseInfo,modified:o(this.modified),name:this.name,numComments:this.numComments,numRatings:this.numRatings,numViews:this.numViews,owner:this.owner,ownerFolder:this.ownerFolder,portal:this.portal,screenshots:o(this.screenshots),size:this.size,snippet:this.snippet,tags:o(this.tags),thumbnail:this.thumbnail,title:this.title,type:this.type,typeKeywords:o(this.typeKeywords),url:this.url};return this.loaded&&(e.loadStatus="loaded"),new v({sourceJSON:this.sourceJSON}).set(e)}createPostQuery(){const e=this.toJSON();for(const t in e)"tags"===t&&null!==e[t]&&(e[t]=e[t].join(", ")),"typeKeywords"===t&&null!==e[t]&&(e[t]=e[t].join(", ")),"extent"===t&&e[t]&&(e[t]=JSON.stringify(e[t]));return e}deleteRating(){return this.portal._request(this.itemUrl+"/deleteRating",{method:"post"}).then((()=>{}))}fetchData(e="json",t){return this.portal._request(this.itemUrl+"/data",{responseType:e,...t,query:{token:this.apiKey}})}fetchRating(e){return this.portal._request(this.itemUrl+"/rating",{query:{token:this.apiKey},...e}).then((e=>null!=e.rating?(e.created=new Date(e.created),new f(e)):null))}fetchRelatedItems(e,t){return this.portal._requestToTypedArray(this.itemUrl+"/relatedItems",{query:{...e,token:this.apiKey},...t},v)}getThumbnailUrl(e){let t=this.thumbnailUrl;return t&&e&&(t+=`&w=${e}`),t}reload(){return this.portal._request(this.itemUrl,{cacheBust:!0,query:{token:this.apiKey}}).then((e=>(this.sourceJSON=e,this.read(e),this)))}update(e){return this.id?this.load().then((()=>this.portal._signIn())).then((()=>{const t=e&&e.data,i={method:"post"};i.query=this.createPostQuery();for(const e in i.query)null===i.query[e]&&(i.query[e]="");return i.query.clearEmptyFields=!0,null!=t&&("string"==typeof t?i.query.text=t:"object"==typeof t&&(i.query.text=JSON.stringify(t))),this.portal._request(`${this.userItemUrl}/update`,i).then((()=>this.reload()))})):Promise.reject(new i("portal:item-does-not-exist","The item does not exist yet and cannot be updated"))}updateThumbnail(e){return this.id?this.load().then((()=>this.portal._signIn())).then((()=>{const t=e.thumbnail,i=e.filename,r={method:"post"};if("string"==typeof t)l(t)?r.query={data:t}:r.query={url:p(t)},n(i)&&(r.query.filename=i);else{const e=new FormData;n(i)?e.append("file",t,i):e.append("file",t),r.body=e}return this.portal._request(`${this.userItemUrl}/updateThumbnail`,r).then((()=>this.reload()))})):Promise.reject(new i("portal:item-does-not-exist","The item does not exist yet and cannot be updated"))}async fetchResources(e={},t){return(await import("./support/resourceUtils.js")).fetchResources(this,e,t)}async addResource(e,t,i){const r=await import("./support/resourceUtils.js");return e.portalItem=this,r.addOrUpdateResource(e,"add",t,i)}async removeResource(e,t){const r=await import("./support/resourceUtils.js");if(e.portalItem&&e.portalItem.itemUrl!==this.itemUrl)throw new i("removeresource:portal-item-mismatch","The portal item associated with the provided resource does not match the item");return r.removeResource(this,e,t)}async removeAllResources(e){return(await import("./support/resourceUtils.js")).removeAllResources(this,e)}resourceFromPath(e){return new g({portalItem:this,path:e})}toJSON(){const e=this.extent,t={created:this.created&&this.created.getTime(),description:this.description,extent:e&&[[e.xmin,e.ymin],[e.xmax,e.ymax]],id:this.id,modified:this.modified&&this.modified.getTime(),name:this.name,owner:this.owner,ownerFolder:this.ownerFolder,snippet:this.snippet,tags:this.tags,thumbnail:this.thumbnail,title:this.title,type:this.type,typeKeywords:this.typeKeywords,url:this.url};return a(t)}static fromJSON(e){if(!e)return null;if(e.declaredClass)throw new Error("JSON object is already hydrated");return new v({sourceJSON:e})}_getPostQuery(){const e=this.toJSON();for(const t in e)"tags"===t&&null!==e[t]&&(e[t]=e[t].join(", ")),"typeKeywords"===t&&null!==e[t]&&(e[t]=e[t].join(", ")),"extent"===t&&e[t]&&(e[t]=JSON.stringify(e[t]));return e}};e([c({type:["private","shared","org","public"]})],w.prototype,"access",void 0),e([c()],w.prototype,"accessInformation",void 0),e([c({type:String})],w.prototype,"apiKey",void 0),e([c({json:{read:{source:"appProxies"}}})],w.prototype,"applicationProxies",void 0),e([c()],w.prototype,"avgRating",void 0),e([c()],w.prototype,"categories",void 0),e([c({type:Date})],w.prototype,"created",void 0),e([c()],w.prototype,"culture",void 0),e([c()],w.prototype,"description",void 0),e([c({readOnly:!0})],w.prototype,"displayName",null),e([c({type:h})],w.prototype,"extent",void 0),e([u("extent")],w.prototype,"readExtent",null),e([c()],w.prototype,"groupCategories",void 0),e([c({readOnly:!0})],w.prototype,"iconUrl",null),e([c()],w.prototype,"id",void 0),e([c({readOnly:!0})],w.prototype,"isLayer",null),e([c()],w.prototype,"itemControl",void 0),e([c({readOnly:!0})],w.prototype,"itemUrl",null),e([c()],w.prototype,"licenseInfo",void 0),e([c({type:Date})],w.prototype,"modified",void 0),e([c()],w.prototype,"name",void 0),e([c()],w.prototype,"numComments",void 0),e([c()],w.prototype,"numRatings",void 0),e([c()],w.prototype,"numViews",void 0),e([c()],w.prototype,"owner",void 0),e([c()],w.prototype,"ownerFolder",void 0),e([c({type:y})],w.prototype,"portal",void 0),e([c()],w.prototype,"screenshots",void 0),e([c()],w.prototype,"size",void 0),e([c()],w.prototype,"snippet",void 0),e([c()],w.prototype,"sourceJSON",void 0),e([c()],w.prototype,"tags",void 0),e([c()],w.prototype,"thumbnail",void 0),e([c({readOnly:!0})],w.prototype,"thumbnailUrl",null),e([c()],w.prototype,"title",void 0),e([c()],w.prototype,"type",void 0),e([c()],w.prototype,"typeKeywords",void 0),e([c()],w.prototype,"url",void 0),e([c({readOnly:!0})],w.prototype,"userItemUrl",null),w=v=e([m("esri.portal.PortalItem")],w);const b=w;export{b as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import"../../core/has.js";import r from"../../core/Error.js";import{isNone as e}from"../../core/maybe.js";import{to3D as n}from"../../symbols/support/symbolConversion.js";function o(r){return e(r)||"simple"===r.type||"unique-value"===r.type||"class-breaks"===r.type||"dictionary"===r.type}function s(n){if(e(n))return null;if(!o(n))return new r("renderer-conversion-3d:unsupported-renderer",`Unsupported renderer of type '${n.type||n.declaredClass}'`,{renderer:n});switch(n.type){case"simple":return u(n);case"unique-value":return l(n);case"class-breaks":return i(n);case"dictionary":return null}return null}function t(e,n){if(!n)return null;let o;if(o=Array.isArray(n)?n:[n],o.length>0){const n=o.map((r=>r.details.symbol.type||r.details.symbol.declaredClass)).filter((r=>!!r));n.sort();const s=[];return n.forEach(((r,e)=>{0!==e&&r===n[e-1]||s.push(r)})),new r("renderer-conversion-3d:unsupported-symbols",`Renderer contains symbols (${s.join(", ")}) which are not supported in 3D`,{renderer:e,symbolErrors:o})}return null}function u(r){return t(r,n(r.symbol).error)}function l(r){const e=r.uniqueValueInfos.map((r=>n(r.symbol).error)).filter((r=>!!r)),o=n(r.defaultSymbol);return o.error&&e.unshift(o.error),t(r,e)}function i(r){const e=r.classBreakInfos.map((r=>n(r.symbol).error)).filter((r=>!!r)),o=n(r.defaultSymbol);return o.error&&e.unshift(o.error),t(r,e)}export{o as isSupportedRenderer3D,s as validateTo3D};
5
+ import"../../core/has.js";import r from"../../core/Error.js";import{isNone as e}from"../../core/maybe.js";import{to3D as n}from"../../symbols/support/symbolConversion.js";function o(r){return e(r)||"simple"===r.type||"unique-value"===r.type||"class-breaks"===r.type||"dictionary"===r.type||"heatmap"===r.type}function t(n){if(e(n))return null;if(!o(n))return new r("renderer-conversion-3d:unsupported-renderer",`Unsupported renderer of type '${n.type||n.declaredClass}'`,{renderer:n});switch(n.type){case"simple":return u(n);case"unique-value":return l(n);case"class-breaks":return i(n);case"dictionary":case"heatmap":return null}return null}function s(e,n){if(!n)return null;let o;if(o=Array.isArray(n)?n:[n],o.length>0){const n=o.map((r=>r.details.symbol.type||r.details.symbol.declaredClass)).filter((r=>!!r));n.sort();const t=[];return n.forEach(((r,e)=>{0!==e&&r===n[e-1]||t.push(r)})),new r("renderer-conversion-3d:unsupported-symbols",`Renderer contains symbols (${t.join(", ")}) which are not supported in 3D`,{renderer:e,symbolErrors:o})}return null}function u(r){return s(r,n(r.symbol).error)}function l(r){const e=r.uniqueValueInfos.map((r=>n(r.symbol).error)).filter((r=>!!r)),o=n(r.defaultSymbol);return o.error&&e.unshift(o.error),s(r,e)}function i(r){const e=r.classBreakInfos.map((r=>n(r.symbol).error)).filter((r=>!!r)),o=n(r.defaultSymbol);return o.error&&e.unshift(o.error),s(r,e)}export{o as isSupportedRenderer3D,t as validateTo3D};
@@ -0,0 +1,4 @@
1
+ import "../../interfaces";
2
+
3
+ import DirectionLine = __esri.DirectionLine;
4
+ export default DirectionLine;
@@ -0,0 +1,4 @@
1
+ import "../../interfaces";
2
+
3
+ import DirectionPoint = __esri.DirectionPoint;
4
+ export default DirectionPoint;
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../chunks/tslib.es6.js";import{geometryTypes as t}from"../../geometry.js";import r from"../../Graphic.js";import{JSONMap as o}from"../../core/jsonMap.js";import{JSONSupport as s}from"../../core/JSONSupport.js";import{clone as i}from"../../core/lang.js";import{isSome as n,unwrap as p}from"../../core/maybe.js";import{property as a}from"../../core/accessorSupport/decorators/property.js";import"../../core/accessorSupport/ensureType.js";import{reader as l}from"../../core/accessorSupport/decorators/reader.js";import{subclass as y}from"../../core/accessorSupport/decorators/subclass.js";import{writer as m}from"../../core/accessorSupport/decorators/writer.js";import u from"../../geometry/SpatialReference.js";import{fromJSON as c,isPolygon as f}from"../../geometry/support/jsonUtils.js";import h from"../../layers/support/Field.js";var d;const g=new o({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let j=d=class extends s{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const o=u.fromJSON(t.spatialReference),s=[];for(let i=0;i<e.length;i++){const t=e[i],p=r.fromJSON(t),a=t.geometry&&t.geometry.spatialReference;n(p.geometry)&&!a&&(p.geometry.spatialReference=o),s.push(p)}return s}writeGeometryType(e,t,r,o){if(e)return void g.write(e,t,r,o);const{features:s}=this;if(s)for(const i of s)if(i&&n(i.geometry))return void g.write(i.geometry.type,t,r,o)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,o=c(e);return!r&&t.spatialReference&&(o.spatialReference=u.fromJSON(t.spatialReference)),o}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const o of r)if(o&&n(o.geometry)&&o.geometry.spatialReference)return void(t.spatialReference=o.geometry.spatialReference.toJSON())}clone(){return new d(this.cloneProperties())}cloneProperties(){return i({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 o=t.features[r];if(o.geometry){const t=e&&e[r];o.geometry=t&&t.toJSON()||o.geometry}}return t}quantize(e){const{scale:[t,r],translate:[o,s]}=e,i=e=>Math.round((e-o)/t),n=e=>Math.round((s-e)/r),a=this.features,l=this._getQuantizationFunction(this.geometryType,i,n);for(let y=0,m=a.length;y<m;y++)l(p(a[y].geometry))||(a.splice(y,1),y--,m--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[o,s],scale:[i,p]}=r,a=e=>e*i+o,l=e=>s-e*p,y=this._getHydrationFunction(e,a,l);for(const{geometry:m}of t)n(m)&&y(m);return this.transform=null,this}_quantizePoints(e,t,r){let o,s;const i=[];for(let n=0,p=e.length;n<p;n++){const p=e[n];if(n>0){const e=t(p[0]),n=r(p[1]);e===o&&n===s||(i.push([e-o,n-s]),o=e,s=n)}else o=t(p[0]),s=r(p[1]),i.push([o,s])}return i.length>0?i: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 o=f(e)?e.rings:e.paths,s=[];for(let i=0,n=o.length;i<n;i++){const e=o[i],n=this._quantizePoints(e,t,r);n&&s.push(n)}return s.length>0?(f(e)?e.rings=s:e.paths=s,e):null}:"multipoint"===e?e=>{const o=this._quantizePoints(e.points,t,r);return o.length>0?(e.points=o,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y)}:"polyline"===e||"polygon"===e?e=>{const o=f(e)?e.rings:e.paths;let s,i;for(let n=0,p=o.length;n<p;n++){const e=o[n];for(let o=0,n=e.length;o<n;o++){const n=e[o];o>0?(s+=n[0],i+=n[1]):(s=n[0],i=n[1]),n[0]=t(s),n[1]=r(i)}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax)}:"multipoint"===e?e=>{const o=e.points;let s,i;for(let n=0,p=o.length;n<p;n++){const e=o[n];n>0?(s+=e[0],i+=e[1]):(s=e[0],i=e[1]),e[0]=t(s),e[1]=r(i)}}:void 0}};e([a({type:String,json:{write:!0}})],j.prototype,"displayFieldName",void 0),e([a({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],j.prototype,"exceededTransferLimit",void 0),e([a({type:[r],json:{write:!0}})],j.prototype,"features",void 0),e([l("features")],j.prototype,"readFeatures",null),e([a({type:[h],json:{write:!0}})],j.prototype,"fields",void 0),e([a({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],j.prototype,"geometryType",void 0),e([m("geometryType")],j.prototype,"writeGeometryType",null),e([a({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],j.prototype,"hasM",void 0),e([a({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],j.prototype,"hasZ",void 0),e([a({types:t,json:{write:!0}})],j.prototype,"queryGeometry",void 0),e([l("queryGeometry")],j.prototype,"readQueryGeometry",null),e([a({type:u,json:{write:!0}})],j.prototype,"spatialReference",void 0),e([m("spatialReference")],j.prototype,"writeSpatialReference",null),e([a({json:{write:!0}})],j.prototype,"transform",void 0),j=d=e([y("esri.rest.support.FeatureSet")],j),j.prototype.toJSON.isDefaultToJSON=!0;const x=j;export{x as default};
5
+ import{_ as e}from"../../chunks/tslib.es6.js";import{geometryTypes as t}from"../../geometry.js";import r from"../../Graphic.js";import{JSONMap as o}from"../../core/jsonMap.js";import{JSONSupport as s}from"../../core/JSONSupport.js";import{clone as i}from"../../core/lang.js";import{isSome as n,unwrap as a}from"../../core/maybe.js";import{property as p}from"../../core/accessorSupport/decorators/property.js";import"../../core/accessorSupport/ensureType.js";import{reader as l}from"../../core/accessorSupport/decorators/reader.js";import{subclass as y}from"../../core/accessorSupport/decorators/subclass.js";import{writer as m}from"../../core/accessorSupport/decorators/writer.js";import c from"../../geometry/SpatialReference.js";import{fromJSON as u,isPolygon as f}from"../../geometry/support/jsonUtils.js";import h from"../../layers/support/Field.js";var d;const g=new o({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let j=d=class extends s{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const o=c.fromJSON(t.spatialReference),s=[];for(let i=0;i<e.length;i++){const t=e[i],a=r.fromJSON(t),p=t.geometry&&t.geometry.spatialReference;n(a.geometry)&&!p&&(a.geometry.spatialReference=o);const l=t.aggregateGeometries,y=a.aggregateGeometries;if(l&&n(y))for(const e in y){const t=y[e],r=l[e],s=null==r?void 0:r.spatialReference;n(t)&&!s&&(t.spatialReference=o)}s.push(a)}return s}writeGeometryType(e,t,r,o){if(e)return void g.write(e,t,r,o);const{features:s}=this;if(s)for(const i of s)if(i&&n(i.geometry))return void g.write(i.geometry.type,t,r,o)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,o=u(e);return!r&&t.spatialReference&&(o.spatialReference=c.fromJSON(t.spatialReference)),o}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const o of r)if(o&&n(o.geometry)&&o.geometry.spatialReference)return void(t.spatialReference=o.geometry.spatialReference.toJSON())}clone(){return new d(this.cloneProperties())}cloneProperties(){return i({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 o=t.features[r];if(o.geometry){const t=e&&e[r];o.geometry=t&&t.toJSON()||o.geometry}}return t}quantize(e){const{scale:[t,r],translate:[o,s]}=e,i=e=>Math.round((e-o)/t),n=e=>Math.round((s-e)/r),p=this.features,l=this._getQuantizationFunction(this.geometryType,i,n);for(let y=0,m=p.length;y<m;y++)l(a(p[y].geometry))||(p.splice(y,1),y--,m--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[o,s],scale:[i,a]}=r,p=e=>e*i+o,l=e=>s-e*a,y=this._getHydrationFunction(e,p,l);for(const{geometry:m}of t)n(m)&&y(m);return this.transform=null,this}_quantizePoints(e,t,r){let o,s;const i=[];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===o&&n===s||(i.push([e-o,n-s]),o=e,s=n)}else o=t(a[0]),s=r(a[1]),i.push([o,s])}return i.length>0?i: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 o=f(e)?e.rings:e.paths,s=[];for(let i=0,n=o.length;i<n;i++){const e=o[i],n=this._quantizePoints(e,t,r);n&&s.push(n)}return s.length>0?(f(e)?e.rings=s:e.paths=s,e):null}:"multipoint"===e?e=>{const o=this._quantizePoints(e.points,t,r);return o.length>0?(e.points=o,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y)}:"polyline"===e||"polygon"===e?e=>{const o=f(e)?e.rings:e.paths;let s,i;for(let n=0,a=o.length;n<a;n++){const e=o[n];for(let o=0,n=e.length;o<n;o++){const n=e[o];o>0?(s+=n[0],i+=n[1]):(s=n[0],i=n[1]),n[0]=t(s),n[1]=r(i)}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax)}:"multipoint"===e?e=>{const o=e.points;let s,i;for(let n=0,a=o.length;n<a;n++){const e=o[n];n>0?(s+=e[0],i+=e[1]):(s=e[0],i=e[1]),e[0]=t(s),e[1]=r(i)}}:void 0}};e([p({type:String,json:{write:!0}})],j.prototype,"displayFieldName",void 0),e([p({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],j.prototype,"exceededTransferLimit",void 0),e([p({type:[r],json:{write:!0}})],j.prototype,"features",void 0),e([l("features")],j.prototype,"readFeatures",null),e([p({type:[h],json:{write:!0}})],j.prototype,"fields",void 0),e([p({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],j.prototype,"geometryType",void 0),e([m("geometryType")],j.prototype,"writeGeometryType",null),e([p({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],j.prototype,"hasM",void 0),e([p({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],j.prototype,"hasZ",void 0),e([p({types:t,json:{write:!0}})],j.prototype,"queryGeometry",void 0),e([l("queryGeometry")],j.prototype,"readQueryGeometry",null),e([p({type:c,json:{write:!0}})],j.prototype,"spatialReference",void 0),e([m("spatialReference")],j.prototype,"writeSpatialReference",null),e([p({json:{write:!0}})],j.prototype,"transform",void 0),j=d=e([y("esri.rest.support.FeatureSet")],j),j.prototype.toJSON.isDefaultToJSON=!0;const x=j;export{x as default};
@@ -0,0 +1,4 @@
1
+ import "../../interfaces";
2
+
3
+ import RouteInfo = __esri.RouteInfo;
4
+ export default RouteInfo;
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../../chunks/tslib.es6.js";import e from"../../PopupTemplate.js";import{symbolTypes as i}from"../../symbols.js";import{JSONSupport as s}from"../../core/JSONSupport.js";import{isSome as a,unwrap as l}from"../../core/maybe.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{reader as r}from"../../core/accessorSupport/decorators/reader.js";import{subclass as n}from"../../core/accessorSupport/decorators/subclass.js";import u from"../../geometry/Polyline.js";import{getTimezoneOffset as p,getPrefixedProperties as m}from"../route/utils.js";import d from"./RouteSettings.js";import{fromJSON as b}from"../../symbols/support/jsonUtils.js";var T;let f=T=class extends s{constructor(t){super(t),this.analysisSettings=null,this.endTime=null,this.endTimeOffset=null,this.firstStopId=null,this.geometry=null,this.lastStopId=null,this.messages=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.startTime=null,this.startTimeOffset=null,this.stopCount=null,this.symbol=null,this.totalCosts=null,this.totalDistance=null,this.totalDuration=null,this.totalLateDuration=null,this.totalViolations=null,this.totalWait=null,this.totalWaitDuration=null,this.version="1.0.0"}readEndTime(t,e){return a(e.attributes.EndTimeUTC)?new Date(e.attributes.EndTimeUTC):null}readEndTimeOffset(t,e){return p(e.attributes.EndTime,e.attributes.EndTimeUTC)}readStartTime(t,e){return a(e.attributes.StartTimeUTC)?new Date(e.attributes.StartTimeUTC):null}readStartTimeOffset(t,e){return p(e.attributes.StartTime,e.attributes.StartTimeUTC)}readTotalCosts(t,e){return m(e.attributes,"Total_")}readTotalViolations(t,e){return m(e.attributes,"TotalViolation_")}readTotalWait(t,e){return m(e.attributes,"TotalWait_")}static fromPortalJSON(t){var i,s,l,o,r,n;return new T({analysisSettings:a(t.attributes.AnalysisSettings)?d.fromJSON(JSON.parse(t.attributes.AnalysisSettings)):null,endTime:a(t.attributes.EndTime)?new Date(t.attributes.EndTime):null,endTimeOffset:null!=(i=t.attributes.EndUTCOffset)?i:null,geometry:u.fromJSON(t.geometry),messages:a(t.attributes.Messages)?JSON.parse(t.attributes.Messages):null,name:t.attributes.RouteName,objectId:t.attributes.__OBJECTID,popupTemplate:a(t.popupInfo)?e.fromJSON(t.popupInfo):null,startTime:a(t.attributes.StartTime)?new Date(t.attributes.StartTime):null,startTimeOffset:null!=(s=t.attributes.StartUTCOffset)?s:null,symbol:a(t.symbol)?b(t.symbol):null,totalCosts:a(t.attributes.TotalCosts)?JSON.parse(t.attributes.TotalCosts):null,totalDistance:null!=(l=t.attributes.TotalMeters)?l:null,totalDuration:null!=(o=t.attributes.TotalMinutes)?o:null,totalLateDuration:null!=(r=t.attributes.TotalLateMinutes)?r:null,totalWaitDuration:null!=(n=t.attributes.TotalWaitMinutes)?n:null,version:t.attributes.Version})}toPortalJSON(){return{geometry:a(this.geometry)?this.geometry.toJSON():null,attributes:{__OBJECTID:l(this.objectId),AnalysisSettings:a(this.analysisSettings)?JSON.stringify(this.analysisSettings.toJSON()):null,EndTime:a(this.endTime)?this.endTime.getTime():null,EndUTCOffset:this.endTimeOffset,Messages:a(this.messages)?JSON.stringify(this.messages):null,RouteName:l(this.name),StartTime:a(this.startTime)?this.startTime.getTime():null,StartUTCOffset:this.startTimeOffset,TotalCosts:a(this.totalCosts)?JSON.stringify(this.totalCosts):null,TotalLateMinutes:this.totalLateDuration,TotalMeters:this.totalDistance,TotalMinutes:this.totalDuration,TotalWaitMinutes:this.totalWaitDuration,Version:l(this.version)},symbol:a(this.symbol)?this.symbol.toJSON():null,popupInfo:a(this.popupTemplate)?this.popupTemplate.toJSON():null}}};f.fields=[{name:"__OBJECTID",alias:"OBJECTID",type:"esriFieldTypeOID",editable:!1,nullable:!1,domain:null},{name:"RouteName",alias:"Route Name",type:"esriFieldTypeString",length:1024,editable:!0,nullable:!0,visible:!0,domain:null},{name:"TotalMinutes",alias:"Total Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"TotalMeters",alias:"Total Meters",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"TotalLateMinutes",alias:"Total Late Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!1},{name:"TotalWaitMinutes",alias:"Total Wait Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!1},{name:"TotalCosts",alias:"Total Costs",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"StartTime",alias:"Start Time",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!0},{name:"StartUTCOffset",alias:"Start Time: Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"EndTime",alias:"End Time",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!0},{name:"EndUTCOffset",alias:"End Time: Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"Messages",alias:"Analysis Messages",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"AnalysisSettings",alias:"Analysis Settings",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"Version",alias:"Version",type:"esriFieldTypeString",length:16,editable:!0,nullable:!0,visible:!0,domain:null}],f.popupInfo={title:"Route Details",fieldInfos:[{fieldName:"RouteName",label:"Route Name",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"TotalMinutes",label:"Total Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TotalMeters",label:"Total Meters",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TotalLateMinutes",label:"Total Late Minutes",isEditable:!1,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TotalWaitMinutes",label:"Total Wait Minutes",isEditable:!1,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TotalCosts",label:"Total Costs",isEditable:!1,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"StartTime",label:"Start Time",isEditable:!1,tooltip:"",visible:!0,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"StartUTCOffset",label:"Start Time: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"EndTime",label:"End Time",isEditable:!1,tooltip:"",visible:!0,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"EndUTCOffset",label:"End Time: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Messages",label:"Analysis Messages",isEditable:!1,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"SolverSettings",isEditable:!1,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"Version",label:"Version",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},t([o({json:{read:!1}})],f.prototype,"analysisSettings",void 0),t([o()],f.prototype,"endTime",void 0),t([r("endTime",["attributes.EndTimeUTC"])],f.prototype,"readEndTime",null),t([o()],f.prototype,"endTimeOffset",void 0),t([r("endTimeOffset",["attributes.EndTime","attributes.EndTimeUTC"])],f.prototype,"readEndTimeOffset",null),t([o({json:{read:{source:"attributes.FirstStopID"}}})],f.prototype,"firstStopId",void 0),t([o({type:u})],f.prototype,"geometry",void 0),t([o({json:{read:{source:"attributes.LastStopID"}}})],f.prototype,"lastStopId",void 0),t([o({json:{read:!1}})],f.prototype,"messages",void 0),t([o({json:{read:{source:"attributes.Name"}}})],f.prototype,"name",void 0),t([o({json:{read:{source:"attributes.ObjectID"}}})],f.prototype,"objectId",void 0),t([o({type:e,json:{read:!1}})],f.prototype,"popupTemplate",void 0),t([o()],f.prototype,"startTime",void 0),t([r("startTime",["attributes.StartTimeUTC"])],f.prototype,"readStartTime",null),t([o()],f.prototype,"startTimeOffset",void 0),t([r("startTimeOffset",["attributes.StartTime","attributes.StartTimeUTC"])],f.prototype,"readStartTimeOffset",null),t([o({json:{read:{source:"attributes.StopCount"}}})],f.prototype,"stopCount",void 0),t([o({types:i,json:{read:!1}})],f.prototype,"symbol",void 0),t([o()],f.prototype,"totalCosts",void 0),t([r("totalCosts",["attributes"])],f.prototype,"readTotalCosts",null),t([o({json:{read:!1}})],f.prototype,"totalDistance",void 0),t([o({json:{read:!1}})],f.prototype,"totalDuration",void 0),t([o({json:{read:!1}})],f.prototype,"totalLateDuration",void 0),t([o()],f.prototype,"totalViolations",void 0),t([r("totalViolations",["attributes"])],f.prototype,"readTotalViolations",null),t([o()],f.prototype,"totalWait",void 0),t([r("totalWait",["attributes"])],f.prototype,"readTotalWait",null),t([o({json:{read:!1}})],f.prototype,"totalWaitDuration",void 0),t([o({json:{read:!1}})],f.prototype,"version",void 0),f=T=t([n("esri.layers.support.RouteInfo")],f);const y=f;export{y as default};
5
+ import{_ as t}from"../../chunks/tslib.es6.js";import e from"../../PopupTemplate.js";import{symbolTypes as i}from"../../symbols.js";import{JSONSupport as s}from"../../core/JSONSupport.js";import{isSome as a,unwrap as l}from"../../core/maybe.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{reader as r}from"../../core/accessorSupport/decorators/reader.js";import{subclass as n}from"../../core/accessorSupport/decorators/subclass.js";import u from"../../geometry/Polyline.js";import{getTimezoneOffset as p,getPrefixedProperties as m}from"../route/utils.js";import d from"./RouteSettings.js";import{fromJSON as b}from"../../symbols/support/jsonUtils.js";var T;let f=T=class extends s{constructor(t){super(t),this.analysisSettings=null,this.endTime=null,this.endTimeOffset=null,this.firstStopId=null,this.geometry=null,this.lastStopId=null,this.messages=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.startTime=null,this.startTimeOffset=null,this.stopCount=null,this.symbol=null,this.totalCosts=null,this.totalDistance=null,this.totalDuration=null,this.totalLateDuration=null,this.totalViolations=null,this.totalWait=null,this.totalWaitDuration=null,this.version="1.0.0"}readEndTime(t,e){return a(e.attributes.EndTimeUTC)?new Date(e.attributes.EndTimeUTC):null}readEndTimeOffset(t,e){return p(e.attributes.EndTime,e.attributes.EndTimeUTC)}readStartTime(t,e){return a(e.attributes.StartTimeUTC)?new Date(e.attributes.StartTimeUTC):null}readStartTimeOffset(t,e){return p(e.attributes.StartTime,e.attributes.StartTimeUTC)}readTotalCosts(t,e){return m(e.attributes,"Total_")}readTotalViolations(t,e){return m(e.attributes,"TotalViolation_")}readTotalWait(t,e){return m(e.attributes,"TotalWait_")}static fromPortalJSON(t){var i,s,l,o,r,n;return new T({analysisSettings:a(t.attributes.AnalysisSettings)?d.fromJSON(JSON.parse(t.attributes.AnalysisSettings)):null,endTime:a(t.attributes.EndTime)?new Date(t.attributes.EndTime):null,endTimeOffset:null!=(i=t.attributes.EndUTCOffset)?i:null,geometry:u.fromJSON(t.geometry),messages:a(t.attributes.Messages)?JSON.parse(t.attributes.Messages):null,name:t.attributes.RouteName,objectId:t.attributes.__OBJECTID,popupTemplate:a(t.popupInfo)?e.fromJSON(t.popupInfo):null,startTime:a(t.attributes.StartTime)?new Date(t.attributes.StartTime):null,startTimeOffset:null!=(s=t.attributes.StartUTCOffset)?s:null,symbol:a(t.symbol)?b(t.symbol):null,totalCosts:a(t.attributes.TotalCosts)?JSON.parse(t.attributes.TotalCosts):null,totalDistance:null!=(l=t.attributes.TotalMeters)?l:null,totalDuration:null!=(o=t.attributes.TotalMinutes)?o:null,totalLateDuration:null!=(r=t.attributes.TotalLateMinutes)?r:null,totalWaitDuration:null!=(n=t.attributes.TotalWaitMinutes)?n:null,version:t.attributes.Version})}toPortalJSON(){return{geometry:a(this.geometry)?this.geometry.toJSON():null,attributes:{__OBJECTID:l(this.objectId),AnalysisSettings:a(this.analysisSettings)?JSON.stringify(this.analysisSettings.toJSON()):null,EndTime:a(this.endTime)?this.endTime.getTime():null,EndUTCOffset:this.endTimeOffset,Messages:a(this.messages)?JSON.stringify(this.messages):null,RouteName:l(this.name),StartTime:a(this.startTime)?this.startTime.getTime():null,StartUTCOffset:this.startTimeOffset,TotalCosts:a(this.totalCosts)?JSON.stringify(this.totalCosts):null,TotalLateMinutes:this.totalLateDuration,TotalMeters:this.totalDistance,TotalMinutes:this.totalDuration,TotalWaitMinutes:this.totalWaitDuration,Version:l(this.version)},symbol:a(this.symbol)?this.symbol.toJSON():null,popupInfo:a(this.popupTemplate)?this.popupTemplate.toJSON():null}}};f.fields=[{name:"__OBJECTID",alias:"OBJECTID",type:"esriFieldTypeOID",editable:!1,nullable:!1,domain:null},{name:"RouteName",alias:"Route Name",type:"esriFieldTypeString",length:1024,editable:!0,nullable:!0,visible:!0,domain:null},{name:"TotalMinutes",alias:"Total Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"TotalMeters",alias:"Total Meters",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"TotalLateMinutes",alias:"Total Late Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!1},{name:"TotalWaitMinutes",alias:"Total Wait Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!1},{name:"TotalCosts",alias:"Total Costs",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"StartTime",alias:"Start Time",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!0},{name:"StartUTCOffset",alias:"Start Time: Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"EndTime",alias:"End Time",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!0},{name:"EndUTCOffset",alias:"End Time: Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"Messages",alias:"Analysis Messages",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"AnalysisSettings",alias:"Analysis Settings",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"Version",alias:"Version",type:"esriFieldTypeString",length:16,editable:!0,nullable:!0,visible:!0,domain:null}],f.popupInfo={title:"Route Details",fieldInfos:[{fieldName:"RouteName",label:"Route Name",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"TotalMinutes",label:"Total Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TotalMeters",label:"Total Meters",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TotalLateMinutes",label:"Total Late Minutes",isEditable:!1,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TotalWaitMinutes",label:"Total Wait Minutes",isEditable:!1,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TotalCosts",label:"Total Costs",isEditable:!1,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"StartTime",label:"Start Time",isEditable:!1,tooltip:"",visible:!0,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"StartUTCOffset",label:"Start Time: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"EndTime",label:"End Time",isEditable:!1,tooltip:"",visible:!0,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"EndUTCOffset",label:"End Time: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Messages",label:"Analysis Messages",isEditable:!1,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"SolverSettings",isEditable:!1,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"Version",label:"Version",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},t([o({json:{read:!1}})],f.prototype,"analysisSettings",void 0),t([o()],f.prototype,"endTime",void 0),t([r("endTime",["attributes.EndTimeUTC"])],f.prototype,"readEndTime",null),t([o()],f.prototype,"endTimeOffset",void 0),t([r("endTimeOffset",["attributes.EndTime","attributes.EndTimeUTC"])],f.prototype,"readEndTimeOffset",null),t([o({json:{read:{source:"attributes.FirstStopID"}}})],f.prototype,"firstStopId",void 0),t([o({type:u})],f.prototype,"geometry",void 0),t([o({json:{read:{source:"attributes.LastStopID"}}})],f.prototype,"lastStopId",void 0),t([o({json:{read:!1}})],f.prototype,"messages",void 0),t([o({json:{read:{source:"attributes.Name"}}})],f.prototype,"name",void 0),t([o({json:{read:{source:"attributes.ObjectID"}}})],f.prototype,"objectId",void 0),t([o({type:e,json:{read:!1}})],f.prototype,"popupTemplate",void 0),t([o()],f.prototype,"startTime",void 0),t([r("startTime",["attributes.StartTimeUTC"])],f.prototype,"readStartTime",null),t([o()],f.prototype,"startTimeOffset",void 0),t([r("startTimeOffset",["attributes.StartTime","attributes.StartTimeUTC"])],f.prototype,"readStartTimeOffset",null),t([o({json:{read:{source:"attributes.StopCount"}}})],f.prototype,"stopCount",void 0),t([o({types:i,json:{read:!1}})],f.prototype,"symbol",void 0),t([o()],f.prototype,"totalCosts",void 0),t([r("totalCosts",["attributes"])],f.prototype,"readTotalCosts",null),t([o({json:{read:!1}})],f.prototype,"totalDistance",void 0),t([o({json:{read:!1}})],f.prototype,"totalDuration",void 0),t([o({json:{read:!1}})],f.prototype,"totalLateDuration",void 0),t([o()],f.prototype,"totalViolations",void 0),t([r("totalViolations",["attributes"])],f.prototype,"readTotalViolations",null),t([o()],f.prototype,"totalWait",void 0),t([r("totalWait",["attributes"])],f.prototype,"readTotalWait",null),t([o({json:{read:!1}})],f.prototype,"totalWaitDuration",void 0),t([o({json:{read:!1}})],f.prototype,"version",void 0),f=T=t([n("esri.rest.support.RouteInfo")],f);const y=f;export{y as default};
@@ -0,0 +1,4 @@
1
+ import "../../interfaces";
2
+
3
+ import supportRouteSolveResult = __esri.supportRouteSolveResult;
4
+ export default supportRouteSolveResult;
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import e from"../core/has.js";const r=()=>!!e("enable-feature:force-wosr"),a=()=>!!e("enable-feature:direct-3d-object-feature-layer-display"),t=()=>!!e("enable-feature:precipitation");export{a as enableDirect3DObjectFeatureLayerDisplay,t as enablePrecipitation,r as enableWebStyleForceWOSR};
5
+ import e from"../core/has.js";const r=()=>!!e("enable-feature:force-wosr"),a=()=>!!e("enable-feature:direct-3d-object-feature-layer-display"),t=()=>!!e("enable-feature:precipitation"),o=()=>!!e("enable-feature:text-backgrounds-3d");export{a as enableDirect3DObjectFeatureLayerDisplay,t as enablePrecipitation,o as enableTextBackgrounds3D,r as enableWebStyleForceWOSR};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- const e="20220128",a="ae1460a2a0d9d5de33b7ea4e9735e8918e0cf028";export{e as buildDate,a as commitHash};
5
+ const b="20220202",c="ec42815fca85b0dd4b56e790bbbdfe5ccff4337d";export{b as buildDate,c as commitHash};