@arcgis/core 4.23.0-next.20220131 → 4.23.0-next.20220205

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 (402) hide show
  1. package/Graphic.js +1 -1
  2. package/TimeExtent.js +1 -1
  3. package/assets/components/assets/calcite-date-picker/nls/pt-BR.json +31 -0
  4. package/assets/components/assets/calcite-date-picker/nls/pt-PT.json +3 -3
  5. package/assets/components/assets/calcite-icon/clipboard16.json +1 -0
  6. package/assets/components/assets/calcite-icon/clipboard24.json +1 -0
  7. package/assets/components/assets/calcite-icon/clipboard32.json +1 -0
  8. package/assets/components/assets/calcite-icon/folders16.json +1 -0
  9. package/assets/components/assets/calcite-icon/folders24.json +1 -0
  10. package/assets/components/assets/calcite-icon/folders32.json +1 -0
  11. package/assets/components/assets/calcite-icon/initiative16.json +1 -0
  12. package/assets/components/assets/calcite-icon/initiative24.json +1 -0
  13. package/assets/components/assets/calcite-icon/initiative32.json +1 -0
  14. package/assets/components/assets/calcite-icon/initiativeTemplate16.json +1 -0
  15. package/assets/components/assets/calcite-icon/initiativeTemplate24.json +1 -0
  16. package/assets/components/assets/calcite-icon/initiativeTemplate32.json +1 -0
  17. package/assets/components/assets/calcite-icon/multipleVariables16.json +1 -0
  18. package/assets/components/assets/calcite-icon/multipleVariables24.json +1 -0
  19. package/assets/components/assets/calcite-icon/multipleVariables32.json +1 -0
  20. package/assets/components/assets/calcite-icon/paletteCheck16.json +1 -0
  21. package/assets/components/assets/calcite-icon/paletteCheck24.json +1 -0
  22. package/assets/components/assets/calcite-icon/paletteCheck32.json +1 -0
  23. package/assets/components/assets/calcite-icon/pentagon16.json +1 -0
  24. package/assets/components/assets/calcite-icon/pentagon24.json +1 -0
  25. package/assets/components/assets/calcite-icon/pentagon32.json +1 -0
  26. package/assets/components/assets/calcite-icon/puzzlePiece16.json +1 -0
  27. package/assets/components/assets/calcite-icon/puzzlePiece24.json +1 -0
  28. package/assets/components/assets/calcite-icon/puzzlePiece32.json +1 -0
  29. package/assets/components/assets/calcite-icon/ribbonRosette16.json +1 -0
  30. package/assets/components/assets/calcite-icon/ribbonRosette24.json +1 -0
  31. package/assets/components/assets/calcite-icon/ribbonRosette32.json +1 -0
  32. package/assets/components/assets/calcite-icon/speechBubbleExclamation16.json +1 -0
  33. package/assets/components/assets/calcite-icon/speechBubbleExclamation24.json +1 -0
  34. package/assets/components/assets/calcite-icon/speechBubbleExclamation32.json +1 -0
  35. package/assets/components/assets/calcite-icon/survey16.json +1 -0
  36. package/assets/components/assets/calcite-icon/survey24.json +1 -0
  37. package/assets/components/assets/calcite-icon/survey32.json +1 -0
  38. package/assets/esri/core/workers/RemoteClient.js +1 -1
  39. package/assets/esri/core/workers/chunks/{7a5f5acfbd4ca1a5c1f3.js → 06116433eb6e669f146b.js} +1 -1
  40. package/assets/esri/core/workers/chunks/0a4401a148c3cb73d6ff.js +1 -0
  41. package/assets/esri/core/workers/chunks/{83d00afae4406ec78bc9.js → 0c6be307709523eb8a05.js} +1 -1
  42. package/assets/esri/core/workers/chunks/{e0c8d61c7a85ce15499a.js → 0d9adefd00c44585be2e.js} +1 -1
  43. package/assets/esri/core/workers/chunks/{44f0c3663b293afbd172.js → 0e09691edb44641de5f0.js} +1 -1
  44. package/assets/esri/core/workers/chunks/0e215fa28a0448169132.js +1 -0
  45. package/assets/esri/core/workers/chunks/{391e96192d1ec4e55ce2.js → 101b4f02f0572afb666f.js} +1 -1
  46. package/assets/esri/core/workers/chunks/{db3c729ce0c0b2690dc9.js → 1180ffd523c6292bc04e.js} +1 -1
  47. package/assets/esri/core/workers/chunks/{826c983100569586b61f.js → 1571e8213feb518ff100.js} +1 -1
  48. package/assets/esri/core/workers/chunks/{929c9b7cdab7c4ca3d87.js → 17c51f5a13f471e6656a.js} +1 -1
  49. package/assets/esri/core/workers/chunks/{37c03cfc19086ce631c6.js → 18a8b9e2f6bd89827189.js} +1 -1
  50. package/assets/esri/core/workers/chunks/{ed0bcc66fb1e0ee75a4b.js → 1f34957ef42e5b5977d0.js} +1 -1
  51. package/assets/esri/core/workers/chunks/236de5f0476f6080ee62.js +1 -0
  52. package/assets/esri/core/workers/chunks/288ca064cd0472439276.js +1 -0
  53. package/assets/esri/core/workers/chunks/29aa6046534a43d7ce19.js +1 -0
  54. package/assets/esri/core/workers/chunks/2e1291cd831592216446.js +1 -0
  55. package/assets/esri/core/workers/chunks/{68a59ce98177d8513337.js → 3403cb53e4e60923c5fc.js} +1 -1
  56. package/assets/esri/core/workers/chunks/34bed896b68993cabaa1.js +1 -0
  57. package/assets/esri/core/workers/chunks/{99619fcb772807c74f3b.js → 444829a840b8ded16fd7.js} +1 -1
  58. package/assets/esri/core/workers/chunks/467b5faa1c90d9821609.js +1 -0
  59. package/assets/esri/core/workers/chunks/49353182a16218a84251.js +1 -0
  60. package/assets/esri/core/workers/chunks/{fc046a15466c25d081ff.js → 4a2e93b12d60e8d92491.js} +1 -1
  61. package/assets/esri/core/workers/chunks/4de996ebc432f5e149bc.js +1 -0
  62. package/assets/esri/core/workers/chunks/50976921acf7bd636123.js +1 -0
  63. package/assets/esri/core/workers/chunks/5144ef135e0deb48c7bf.js +1 -0
  64. package/assets/esri/core/workers/chunks/584bbb675ed225f68171.js +1 -0
  65. package/assets/esri/core/workers/chunks/5a90d121ba79613cc2aa.js +1 -0
  66. package/assets/esri/core/workers/chunks/5b286f3f3deea10bdd91.js +1 -0
  67. package/assets/esri/core/workers/chunks/{0463ba46df855a92b9c0.js → 65ccd204ec3053687a77.js} +1 -1
  68. package/assets/esri/core/workers/chunks/{1f8c6a179e39fd4c5e6f.js → 6a2b8d6a9bada45ab66d.js} +1 -1
  69. package/assets/esri/core/workers/chunks/6be326edd9829781d926.js +1 -0
  70. package/assets/esri/core/workers/chunks/6ea99a6e21b09674f6b3.js +1 -0
  71. package/assets/esri/core/workers/chunks/{5bcb3240b3c005e5fe72.js → 7215af7810d15e89aa5a.js} +1 -1
  72. package/assets/esri/core/workers/chunks/7509c1693ffedc0fa018.js +1 -0
  73. package/assets/esri/core/workers/chunks/7b0b75878370b3475fe5.js +1 -0
  74. package/assets/esri/core/workers/chunks/{bfedd6ebff817c9b31c0.js → 7b618c449d793aacd874.js} +1 -1
  75. package/assets/esri/core/workers/chunks/{2460f3b6ada6ae900dec.js → 7c0ff01f081c7e9050d2.js} +1 -1
  76. package/assets/esri/core/workers/chunks/806a7db0084214a53c79.js +1 -0
  77. package/assets/esri/core/workers/chunks/{8fa0a14165d43ffe87a5.js → 8325b577f52936f86cff.js} +1 -1
  78. package/assets/esri/core/workers/chunks/84d8e77d78d0d5134083.js +1 -0
  79. package/assets/esri/core/workers/chunks/{dd13772a5e2eccc6a2bc.js → 8598f762f15ca68d52b7.js} +1 -1
  80. package/assets/esri/core/workers/chunks/85b1ae51da3689bccf92.js +1 -0
  81. package/assets/esri/core/workers/chunks/873b0cbd343dc71755ed.js +1 -0
  82. package/assets/esri/core/workers/chunks/8804b8489eeab888275b.js +1 -0
  83. package/assets/esri/core/workers/chunks/{5ec98f4ddac707d0fbd1.js → 88815d533808aabb1fa9.js} +1 -1
  84. package/assets/esri/core/workers/chunks/8c8c0ecdf44fdbb56000.js +1 -0
  85. package/assets/esri/core/workers/chunks/{f2124f4d0f2b8a91f0ea.js → 90c5edcd8a609224ce55.js} +1 -1
  86. package/assets/esri/core/workers/chunks/{bac9fc90e6756e211160.js → 94d9951509c0db09547a.js} +1 -1
  87. package/assets/esri/core/workers/chunks/996d6ae7f2e2273f9bce.js +1 -0
  88. package/assets/esri/core/workers/chunks/{c1135cb02ec46c491459.js → 9ce961bc390202c87941.js} +1 -1
  89. package/assets/esri/core/workers/chunks/9fbc7d2e0326be41b382.js +1 -0
  90. package/assets/esri/core/workers/chunks/a363fb40096679b011f6.js +1 -0
  91. package/assets/esri/core/workers/chunks/a41522b0a853b85c8269.js +1 -0
  92. package/assets/esri/core/workers/chunks/a763c11d2b02b3ec36ad.js +1 -0
  93. package/assets/esri/core/workers/chunks/{aeaa1667c2d9f1b3366b.js → a85ed251d3d3668e474f.js} +1 -1
  94. package/assets/esri/core/workers/chunks/{69fd99b7c76e9992ccf3.js → b32bf9808cb4be3a6bd0.js} +1 -1
  95. package/assets/esri/core/workers/chunks/b33a6fbbc8de2969b1ca.js +1 -0
  96. package/assets/esri/core/workers/chunks/b548e6b3add4154ac4e6.js +1 -0
  97. package/assets/esri/core/workers/chunks/b6c55bdd8c957b062bc1.js +1 -0
  98. package/assets/esri/core/workers/chunks/b90509b2088fd444fc39.js +1 -0
  99. package/assets/esri/core/workers/chunks/{b9e9cb354822c6d995a4.js → bea473dba8e57617a71d.js} +1 -1
  100. package/assets/esri/core/workers/chunks/{0d02c6ad1f4688bfa374.js → bf7c44644fe7b0aa60cf.js} +1 -1
  101. package/assets/esri/core/workers/chunks/c1a70f025e90d97fac6d.js +1 -0
  102. package/assets/esri/core/workers/chunks/{d72488db62fcf39447b6.js → c23d965a55215168a1a2.js} +1 -1
  103. package/assets/esri/core/workers/chunks/c3192cfe115ce354ffbc.js +1 -0
  104. package/assets/esri/core/workers/chunks/c3d768801f2f6cb9d5d0.js +1 -0
  105. package/assets/esri/core/workers/chunks/d09a0b2dc3a6fc10fa41.js +1 -0
  106. package/assets/esri/core/workers/chunks/d21526570300597aa6ae.js +1 -0
  107. package/assets/esri/core/workers/chunks/d2ffb0f21363c0d3d2a9.js +1 -0
  108. package/assets/esri/core/workers/chunks/{ec10151a2a95e95a0bb5.js → d304fe0ac836afd46e3d.js} +1 -1
  109. package/assets/esri/core/workers/chunks/{37a7bd30352b1309b8f8.js → d3f05b8e4bd53eb1eb9d.js} +1 -1
  110. package/assets/esri/core/workers/chunks/{17de7a324dfa7f57ad5d.js → d780e946149b1c3d1246.js} +1 -1
  111. package/assets/esri/core/workers/chunks/dc037f1496bb4aa40d10.js +1 -0
  112. package/assets/esri/core/workers/chunks/{8cbb04a9065aa3756638.js → dc04a8ba6c770bdc2bd4.js} +1 -1
  113. package/assets/esri/core/workers/chunks/dd5a71818a989a6edb00.js +1 -0
  114. package/assets/esri/core/workers/chunks/{89820b200ee44e678af5.js → dd891a98105904f8a06b.js} +1 -1
  115. package/assets/esri/core/workers/chunks/e17edd48179d41ddf1e7.js +1 -0
  116. package/assets/esri/core/workers/chunks/e323086de328a164f7f0.js +1 -0
  117. package/assets/esri/core/workers/chunks/ea50a6a994e5ee578d97.js +1 -0
  118. package/assets/esri/core/workers/chunks/{655b55ac0cd533d7e9d7.js → ecf074743183c1749581.js} +1 -1
  119. package/assets/esri/core/workers/chunks/f067b4fc65b835437afd.js +1 -0
  120. package/assets/esri/core/workers/chunks/f0e5c82e9c4fbe3c9d0a.js +1 -0
  121. package/assets/esri/core/workers/chunks/f96b24c075771d028e20.js +1 -0
  122. package/assets/esri/core/workers/chunks/{5790d171072b3c7d108f.js → f9a6de00c628538f07f6.js} +1 -1
  123. package/assets/esri/core/workers/chunks/{2c607d30ff8ca1b61286.js → fe0c3b7c9b428d9c3f25.js} +1 -1
  124. package/assets/esri/core/workers/chunks/{49a1a633bb0d93764aae.js → fffea9587ec14c6d34e8.js} +1 -1
  125. package/assets/esri/themes/base/_mixins.scss +1 -1
  126. package/assets/esri/themes/base/widgets/_Directions.scss +0 -6
  127. package/assets/esri/themes/base/widgets/_Legend.scss +8 -7
  128. package/assets/esri/themes/dark/main.css +1 -1
  129. package/assets/esri/themes/dark-blue/main.css +1 -1
  130. package/assets/esri/themes/dark-green/main.css +1 -1
  131. package/assets/esri/themes/dark-purple/main.css +1 -1
  132. package/assets/esri/themes/dark-red/main.css +1 -1
  133. package/assets/esri/themes/light/main.css +1 -1
  134. package/assets/esri/themes/light/view.css +1 -1
  135. package/assets/esri/themes/light-blue/main.css +1 -1
  136. package/assets/esri/themes/light-green/main.css +1 -1
  137. package/assets/esri/themes/light-purple/main.css +1 -1
  138. package/assets/esri/themes/light-red/main.css +1 -1
  139. package/assets/esri/widgets/Directions/t9n/Directions.json +1 -1
  140. package/assets/esri/widgets/Directions/t9n/Directions_ar.json +1 -1
  141. package/assets/esri/widgets/Directions/t9n/Directions_bg.json +1 -1
  142. package/assets/esri/widgets/Directions/t9n/Directions_bs.json +1 -1
  143. package/assets/esri/widgets/Directions/t9n/Directions_ca.json +1 -1
  144. package/assets/esri/widgets/Directions/t9n/Directions_cs.json +1 -1
  145. package/assets/esri/widgets/Directions/t9n/Directions_da.json +1 -1
  146. package/assets/esri/widgets/Directions/t9n/Directions_de.json +1 -1
  147. package/assets/esri/widgets/Directions/t9n/Directions_el.json +1 -1
  148. package/assets/esri/widgets/Directions/t9n/Directions_en.json +1 -1
  149. package/assets/esri/widgets/Directions/t9n/Directions_es.json +1 -1
  150. package/assets/esri/widgets/Directions/t9n/Directions_et.json +1 -1
  151. package/assets/esri/widgets/Directions/t9n/Directions_fi.json +1 -1
  152. package/assets/esri/widgets/Directions/t9n/Directions_fr.json +1 -1
  153. package/assets/esri/widgets/Directions/t9n/Directions_he.json +1 -1
  154. package/assets/esri/widgets/Directions/t9n/Directions_hr.json +1 -1
  155. package/assets/esri/widgets/Directions/t9n/Directions_hu.json +1 -1
  156. package/assets/esri/widgets/Directions/t9n/Directions_id.json +1 -1
  157. package/assets/esri/widgets/Directions/t9n/Directions_it.json +1 -1
  158. package/assets/esri/widgets/Directions/t9n/Directions_ja.json +1 -1
  159. package/assets/esri/widgets/Directions/t9n/Directions_ko.json +1 -1
  160. package/assets/esri/widgets/Directions/t9n/Directions_lt.json +1 -1
  161. package/assets/esri/widgets/Directions/t9n/Directions_lv.json +1 -1
  162. package/assets/esri/widgets/Directions/t9n/Directions_nb.json +1 -1
  163. package/assets/esri/widgets/Directions/t9n/Directions_nl.json +1 -1
  164. package/assets/esri/widgets/Directions/t9n/Directions_pl.json +1 -1
  165. package/assets/esri/widgets/Directions/t9n/Directions_pt-BR.json +1 -1
  166. package/assets/esri/widgets/Directions/t9n/Directions_pt-PT.json +1 -1
  167. package/assets/esri/widgets/Directions/t9n/Directions_ro.json +1 -1
  168. package/assets/esri/widgets/Directions/t9n/Directions_ru.json +1 -1
  169. package/assets/esri/widgets/Directions/t9n/Directions_sk.json +1 -1
  170. package/assets/esri/widgets/Directions/t9n/Directions_sl.json +1 -1
  171. package/assets/esri/widgets/Directions/t9n/Directions_sr.json +1 -1
  172. package/assets/esri/widgets/Directions/t9n/Directions_sv.json +1 -1
  173. package/assets/esri/widgets/Directions/t9n/Directions_th.json +1 -1
  174. package/assets/esri/widgets/Directions/t9n/Directions_tr.json +1 -1
  175. package/assets/esri/widgets/Directions/t9n/Directions_uk.json +1 -1
  176. package/assets/esri/widgets/Directions/t9n/Directions_vi.json +1 -1
  177. package/assets/esri/widgets/Directions/t9n/Directions_zh-CN.json +1 -1
  178. package/assets/esri/widgets/Directions/t9n/Directions_zh-HK.json +1 -1
  179. package/assets/esri/widgets/Directions/t9n/Directions_zh-TW.json +1 -1
  180. package/chunks/Fog.glsl.js +12 -24
  181. package/chunks/Heatmap.glsl.js +10 -0
  182. package/chunks/HeatmapDensity.glsl.js +21 -0
  183. package/chunks/Precipitation.glsl.js +2 -2
  184. package/core/maybe.js +1 -1
  185. package/core/promiseUtils.js +1 -1
  186. package/interfaces.d.ts +2432 -231
  187. package/layers/ImageryTileLayer.js +1 -1
  188. package/layers/graphics/data/optimizedFeatureQueryEngineAdapter.js +1 -1
  189. package/layers/graphics/featureConversionUtils.js +1 -1
  190. package/layers/mixins/ArcGISImageService.js +1 -1
  191. package/layers/support/imageryRendererUtils.js +1 -1
  192. package/layers/support/rasterFunctions/pixelUtils.js +1 -1
  193. package/layers/support/rasterFunctions/vectorFieldUtils.js +1 -1
  194. package/package.json +2 -2
  195. package/rasterRenderers.js +1 -1
  196. package/renderers/DictionaryRenderer.js +1 -1
  197. package/renderers/FlowRenderer.d.ts +4 -0
  198. package/renderers/FlowRenderer.js +5 -0
  199. package/renderers/support/DictionaryLoader.js +5 -0
  200. package/renderers/support/RasterSymbolizer.js +1 -1
  201. package/renderers/support/rasterRendererHelper.js +1 -1
  202. package/renderers/support/rendererConversion.js +1 -1
  203. package/rest/geoprocessor/GPOptions.js +1 -1
  204. package/rest/print.js +1 -1
  205. package/rest/support/DirectionLine.js +1 -1
  206. package/rest/support/DirectionPoint.js +1 -1
  207. package/rest/support/FeatureSet.js +1 -1
  208. package/rest/support/LegendLayer.js +1 -1
  209. package/rest/support/LinearUnit.js +1 -1
  210. package/rest/support/PointBarrier.js +1 -1
  211. package/rest/support/PolygonBarrier.js +1 -1
  212. package/rest/support/PolylineBarrier.js +1 -1
  213. package/rest/support/RasterData.js +1 -1
  214. package/smartMapping/raster/renderers/flow.js +5 -0
  215. package/smartMapping/raster/support/utils.js +1 -1
  216. package/support/basemapUtils.js +1 -1
  217. package/support/featureFlags.js +1 -1
  218. package/support/revision.js +1 -1
  219. package/symbols/TextSymbol3DLayer.js +1 -1
  220. package/symbols/cim/effects/EffectArrow.js +1 -1
  221. package/symbols/support/Symbol3DHalo.js +1 -1
  222. package/symbols/support/Symbol3DTextBackground.js +5 -0
  223. package/symbols/support/previewSymbol2D.js +1 -1
  224. package/symbols/support/svgUtils.js +1 -1
  225. package/tasks/Geoprocessor.js +1 -1
  226. package/views/2d/FrameTask.js +1 -1
  227. package/views/2d/ViewState.js +1 -1
  228. package/views/2d/constraints/GeometryConstraint.js +1 -1
  229. package/views/2d/engine/BitmapTileContainer.js +1 -1
  230. package/views/2d/engine/DisplayObject.js +1 -1
  231. package/views/2d/engine/RasterTileContainer.js +1 -1
  232. package/views/2d/engine/RasterVFContainer.js +5 -0
  233. package/views/2d/engine/RasterVFDisplayObject.js +1 -1
  234. package/views/2d/engine/RasterVFTileContainer.js +1 -1
  235. package/views/2d/engine/Stage.js +1 -1
  236. package/views/2d/engine/flow/BrushFlow.js +1 -1
  237. package/views/2d/engine/flow/FlowDisplayData.js +1 -1
  238. package/views/2d/engine/flow/FlowGLResources.js +1 -1
  239. package/views/2d/engine/flow/FlowStyle.js +1 -1
  240. package/views/2d/engine/flow/FlowView2D.js +5 -0
  241. package/views/2d/engine/flow/dataUtils.js +1 -1
  242. package/views/2d/engine/flow/flowRendererUtils.js +5 -0
  243. package/views/2d/engine/webgl/AttributeStoreView.js +1 -1
  244. package/views/2d/engine/webgl/brushes/raster/BrushVectorField.js +1 -1
  245. package/views/2d/engine/webgl/cpuMapped/Buffer.js +1 -1
  246. package/views/2d/engine/webgl/mesh/templates/WGLBaseTextTemplate.js +1 -1
  247. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  248. package/views/2d/engine/webgl/util/Matcher.js +1 -1
  249. package/views/2d/input/handlers/DragPan.js +1 -1
  250. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  251. package/views/2d/layers/ImageryLayerView2D.js +1 -1
  252. package/views/2d/layers/ImageryTileLayerView2D.js +1 -1
  253. package/views/2d/layers/KMLLayerView2D.js +1 -1
  254. package/views/2d/layers/LayerView2D.js +1 -1
  255. package/views/2d/layers/MapImageLayerView2D.js +1 -1
  256. package/views/2d/layers/TileLayerView2D.js +1 -1
  257. package/views/2d/layers/WMSLayerView2D.js +1 -1
  258. package/views/2d/layers/WMTSLayerView2D.js +1 -1
  259. package/views/2d/layers/features/Pipeline.js +1 -1
  260. package/views/2d/layers/features/createSymbolSchema.js +5 -0
  261. package/views/2d/layers/features/processors/HeatmapProcessor.js +1 -1
  262. package/views/2d/layers/features/processors/SymbolProcessor.js +1 -1
  263. package/views/2d/layers/features/schemaUtils.js +1 -1
  264. package/views/2d/layers/features/support/AttributeStore.js +1 -1
  265. package/views/2d/layers/features/support/ClusterStore.js +1 -1
  266. package/views/2d/layers/features/support/FeatureSetReaderJSON.js +1 -1
  267. package/views/2d/layers/features/tileRenderers/SymbolTileRenderer.js +1 -1
  268. package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
  269. package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
  270. package/views/2d/layers/imagery/ImageryTileView2D.js +1 -1
  271. package/views/2d/layers/imagery/ImageryVFStrategy.js +5 -0
  272. package/views/2d/layers/imagery/ImageryView2D.js +1 -1
  273. package/views/2d/layers/imagery/VectorFieldTileView2D.js +1 -1
  274. package/views/2d/layers/imagery/VectorFieldView2D.js +5 -0
  275. package/views/2d/layers/support/FeatureCommandQueue.js +1 -1
  276. package/views/2d/navigation/MapViewNavigation.js +1 -1
  277. package/views/2d/navigation/actions/Pan.js +1 -1
  278. package/views/2d/viewpointUtils.js +1 -1
  279. package/views/3d/environment/EnvironmentRenderer.js +1 -1
  280. package/views/3d/environment/Fog.js +1 -1
  281. package/views/3d/environment/Precipitation.js +1 -1
  282. package/views/3d/environment/PrecipitationTechnique.js +1 -1
  283. package/views/3d/environment/SceneViewEnvironment.js +1 -1
  284. package/views/3d/environment/SimpleAtmosphere.js +1 -1
  285. package/views/3d/environment/weather.js +1 -1
  286. package/views/3d/interactive/analysisTools/lineOfSight/LineOfSightTool.js +1 -1
  287. package/views/3d/layerViewModuleImportUtils.js +1 -1
  288. package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
  289. package/views/3d/layers/GraphicsLayerView3D.js +1 -1
  290. package/views/3d/layers/IRouteLayerView3D.js +4 -0
  291. package/views/3d/layers/RouteLayerView3D.js +5 -0
  292. package/views/3d/layers/VectorTileLayerView3D.js +1 -1
  293. package/views/3d/layers/VoxelLayerView3D.js +1 -1
  294. package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
  295. package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
  296. package/views/3d/layers/graphics/Graphics3DWebStyleSymbol.js +1 -1
  297. package/views/3d/layers/graphics/GraphicsProcessor.js +1 -1
  298. package/views/3d/layers/graphics/Labeler.js +1 -1
  299. package/views/3d/layers/graphics/graphicUtils.js +1 -1
  300. package/views/3d/layers/graphics/labelPlacement.js +1 -1
  301. package/views/3d/layers/support/HeatmapFeatureProcessor.js +1 -1
  302. package/views/3d/terrain/OverlayRenderer.js +1 -1
  303. package/views/3d/terrain/terrainUtils.js +1 -1
  304. package/views/3d/webgl-engine/lib/DrapedHeatmapRenderer.js +5 -0
  305. package/views/3d/webgl-engine/lib/TextRenderParameters.js +1 -1
  306. package/views/3d/webgl-engine/lib/TextRenderer.js +1 -1
  307. package/views/3d/webgl-engine/lib/TextTexture.js +1 -1
  308. package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +5 -0
  309. package/views/3d/webgl-engine/shaders/Heatmap.glsl.js +5 -0
  310. package/views/3d/webgl-engine/shaders/HeatmapDensity.glsl.js +5 -0
  311. package/views/3d/webgl-engine/shaders/HeatmapDensityTechnique.js +5 -0
  312. package/views/3d/webgl-engine/shaders/HeatmapTechnique.js +5 -0
  313. package/views/MapView.js +1 -1
  314. package/views/ToolViewManager.js +1 -1
  315. package/views/View.js +1 -1
  316. package/views/draw/support/Box.js +1 -1
  317. package/views/draw/support/GraphicMover.js +1 -1
  318. package/views/draw/support/HighlightHelper.js +5 -0
  319. package/views/draw/support/Reshape.js +1 -1
  320. package/views/draw/support/layerUtils.js +1 -1
  321. package/views/interactive/InteractiveToolBase.js +1 -1
  322. package/views/support/WatchUpdatingTracking.js +1 -1
  323. package/views/support/projectionUtils.js +1 -1
  324. package/views/webgl/RenderingContext.js +1 -1
  325. package/views/webgl/enums.js +1 -1
  326. package/widgets/BasemapGallery/BasemapGalleryViewModel.js +1 -1
  327. package/widgets/BasemapGallery/support/BasemapGalleryItem.js +1 -1
  328. package/widgets/BasemapToggle/BasemapToggleViewModel.js +1 -1
  329. package/widgets/BasemapToggle.js +1 -1
  330. package/widgets/Directions/support/resources.js +1 -1
  331. package/widgets/Directions.js +1 -1
  332. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  333. package/widgets/FeatureTable/Grid/Grid.js +1 -1
  334. package/widgets/FeatureTable/support/FeatureStore.js +1 -1
  335. package/widgets/FeatureTable.js +1 -1
  336. package/widgets/Legend/styles/Card.js +1 -1
  337. package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
  338. package/widgets/Legend/support/sizeRampUtils.js +1 -1
  339. package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
  340. package/widgets/Sketch/SketchViewModel.js +1 -1
  341. package/widgets/Sketch.js +1 -1
  342. package/widgets/TimeSlider.js +1 -1
  343. package/widgets/Weather/WeatherViewModel.js +1 -1
  344. package/widgets/Weather.js +1 -1
  345. package/widgets/Widget.js +1 -1
  346. package/widgets/support/InteractiveAnalysisViewModel.js +1 -1
  347. package/widgets/support/vnodeCache.js +5 -0
  348. package/widgets/support/widgetUtils.js +1 -1
  349. package/assets/esri/core/workers/chunks/0453fad5cb819797b4f6.js +0 -1
  350. package/assets/esri/core/workers/chunks/0c15d77d8e817cf45a9a.js +0 -1
  351. package/assets/esri/core/workers/chunks/0cd0a6eef51fc5b9ea61.js +0 -1
  352. package/assets/esri/core/workers/chunks/0d684f16f37d5dc385dd.js +0 -1
  353. package/assets/esri/core/workers/chunks/16b6d0f8378582c051c3.js +0 -1
  354. package/assets/esri/core/workers/chunks/1877ab1b6a115dbba1c5.js +0 -1
  355. package/assets/esri/core/workers/chunks/197ec52641aed20029c6.js +0 -1
  356. package/assets/esri/core/workers/chunks/1b2a961f776a0b57e57a.js +0 -1
  357. package/assets/esri/core/workers/chunks/1b3fd66577b19aa5f2b6.js +0 -1
  358. package/assets/esri/core/workers/chunks/1c733b7db092a2a88ef3.js +0 -1
  359. package/assets/esri/core/workers/chunks/2629adf79e7fd9f25f07.js +0 -1
  360. package/assets/esri/core/workers/chunks/27474b007988855bea9d.js +0 -1
  361. package/assets/esri/core/workers/chunks/2b25fc7945a187c2bb9d.js +0 -1
  362. package/assets/esri/core/workers/chunks/34b59d7099904dcb28b5.js +0 -1
  363. package/assets/esri/core/workers/chunks/422537fc3df707bb62c9.js +0 -1
  364. package/assets/esri/core/workers/chunks/483d5d8593d96d0f0b15.js +0 -1
  365. package/assets/esri/core/workers/chunks/4ba6de8aa7e2960bad49.js +0 -1
  366. package/assets/esri/core/workers/chunks/4be35af7d6babbfe9d84.js +0 -1
  367. package/assets/esri/core/workers/chunks/5457962a70bd3c557a75.js +0 -1
  368. package/assets/esri/core/workers/chunks/57856b4a9b8784a69844.js +0 -1
  369. package/assets/esri/core/workers/chunks/57b349d1dbc0bed75b79.js +0 -1
  370. package/assets/esri/core/workers/chunks/5d11b97b667921d67ae7.js +0 -1
  371. package/assets/esri/core/workers/chunks/5dbe555a5a662ff3d9ce.js +0 -1
  372. package/assets/esri/core/workers/chunks/64b7e8d812ea8fcf269e.js +0 -1
  373. package/assets/esri/core/workers/chunks/75d812955a473d0e8960.js +0 -1
  374. package/assets/esri/core/workers/chunks/94515fb3ef38067eeadd.js +0 -1
  375. package/assets/esri/core/workers/chunks/952980635afc7ec81804.js +0 -1
  376. package/assets/esri/core/workers/chunks/96f148a556a2418038de.js +0 -1
  377. package/assets/esri/core/workers/chunks/9876a1bae350795fab36.js +0 -1
  378. package/assets/esri/core/workers/chunks/a1930e4f035bc9aa1ae5.js +0 -1
  379. package/assets/esri/core/workers/chunks/a8692bffb76444c34760.js +0 -1
  380. package/assets/esri/core/workers/chunks/b3f5e91116112b0b612a.js +0 -1
  381. package/assets/esri/core/workers/chunks/ba762bcfd74af0bb8218.js +0 -1
  382. package/assets/esri/core/workers/chunks/be588873c16770ceb9ef.js +0 -1
  383. package/assets/esri/core/workers/chunks/bf6dda4a2af14c4b7716.js +0 -1
  384. package/assets/esri/core/workers/chunks/c2253a9f29c1aabb2b75.js +0 -1
  385. package/assets/esri/core/workers/chunks/c984b3040e120e502b11.js +0 -1
  386. package/assets/esri/core/workers/chunks/cdbc005eebec1503b99d.js +0 -1
  387. package/assets/esri/core/workers/chunks/d04fca5d46cca02500b7.js +0 -1
  388. package/assets/esri/core/workers/chunks/d1fe53b597351dc58305.js +0 -1
  389. package/assets/esri/core/workers/chunks/d98dab12b71912fa397b.js +0 -1
  390. package/assets/esri/core/workers/chunks/dedc333a61081772ca7b.js +0 -1
  391. package/assets/esri/core/workers/chunks/e218bde41ffbcc5194f5.js +0 -1
  392. package/assets/esri/core/workers/chunks/e287f49184d076af17e2.js +0 -1
  393. package/assets/esri/core/workers/chunks/e9e5196b44b6923be1a3.js +0 -1
  394. package/assets/esri/core/workers/chunks/ea595b0df5050eda2a13.js +0 -1
  395. package/assets/esri/core/workers/chunks/eb82ff10cef2bde6e57f.js +0 -1
  396. package/assets/esri/core/workers/chunks/ee6e0db58dc64410e687.js +0 -1
  397. package/assets/esri/core/workers/chunks/f0a9f161805fc7a30fc5.js +0 -1
  398. package/renderers/AnimatedFlowRenderer.d.ts +0 -4
  399. package/renderers/AnimatedFlowRenderer.js +0 -5
  400. package/views/2d/engine/flow/AnimatedFlowView2D.js +0 -5
  401. package/views/2d/engine/flow/animatedFlowRendererUtils.js +0 -5
  402. package/views/2d/layers/imagery/ImageryGraphicsView2D.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 e from"./core/Warning.js";import r from"./renderers/AnimatedFlowRenderer.js";export{default as AnimatedFlowRenderer}from"./renderers/AnimatedFlowRenderer.js";import s from"./renderers/ClassBreaksRenderer.js";export{default as ClassBreaksRenderer}from"./renderers/ClassBreaksRenderer.js";import t from"./renderers/RasterColormapRenderer.js";export{default as RasterColormapRenderer}from"./renderers/RasterColormapRenderer.js";import a from"./renderers/RasterShadedReliefRenderer.js";export{default as RasterShadedReliefRenderer}from"./renderers/RasterShadedReliefRenderer.js";import n from"./renderers/RasterStretchRenderer.js";export{default as RasterStretchRenderer}from"./renderers/RasterStretchRenderer.js";import o from"./renderers/UniqueValueRenderer.js";export{default as UniqueValueRenderer}from"./renderers/UniqueValueRenderer.js";import d from"./renderers/VectorFieldRenderer.js";export{default as VectorFieldRenderer}from"./renderers/VectorFieldRenderer.js";const i={key:"type",base:null,typeMap:{"unique-value":o,"class-breaks":s,"raster-colormap":t,"raster-stretch":n,"vector-field":d,"raster-shaded-relief":a,"animated-flow":r}},l={...i,typeMap:{...i.typeMap}};delete l.typeMap["vector-field"],delete l.typeMap["animated-flow"];const f={uniqueValue:o,classBreaks:s,rasterStretch:n,rasterColormap:t,vectorField:d,rasterShadedRelief:a,animatedFlow:r};function p(e){return e&&f[e.type]||null}function u(r,s){if(!r)return null;if("classBreaks"===r.type&&r.classificationMethod){const e=r.authoringInfo||{classificationMethod:""};e.classificationMethod=r.classificationMethod,r.authoringInfo=e}"vectorField"===r.type&&r.visualVariables&&!Array.isArray(r.visualVariables)&&(r.visualVariables=[r.visualVariables]);const t=p(r);if(t){const e=new t;return e.read(r,s),e}return s&&s.messages&&r&&s.messages.push(new e("renderer:unsupported","Renderers of type '"+(r.type||"unknown")+"' are not supported",{definition:r,context:s})),null}function m(e,r){return u(e,r)}export{m as fromJSON,i as rasterRendererTypes,u as read,l as websceneRasterRendererTypes};
5
+ import e from"./core/Warning.js";import r from"./renderers/ClassBreaksRenderer.js";export{default as ClassBreaksRenderer}from"./renderers/ClassBreaksRenderer.js";import s from"./renderers/FlowRenderer.js";export{default as FlowRenderer}from"./renderers/FlowRenderer.js";import t from"./renderers/RasterColormapRenderer.js";export{default as RasterColormapRenderer}from"./renderers/RasterColormapRenderer.js";import a from"./renderers/RasterShadedReliefRenderer.js";export{default as RasterShadedReliefRenderer}from"./renderers/RasterShadedReliefRenderer.js";import n from"./renderers/RasterStretchRenderer.js";export{default as RasterStretchRenderer}from"./renderers/RasterStretchRenderer.js";import o from"./renderers/UniqueValueRenderer.js";export{default as UniqueValueRenderer}from"./renderers/UniqueValueRenderer.js";import d from"./renderers/VectorFieldRenderer.js";export{default as VectorFieldRenderer}from"./renderers/VectorFieldRenderer.js";const l={key:"type",base:null,typeMap:{"unique-value":o,"class-breaks":r,"raster-colormap":t,"raster-stretch":n,"vector-field":d,"raster-shaded-relief":a,flow:s}},i={...l,typeMap:{...l.typeMap}};delete i.typeMap["vector-field"],delete i.typeMap.flow;const f={uniqueValue:o,classBreaks:r,rasterStretch:n,rasterColormap:t,vectorField:d,rasterShadedRelief:a,flowRenderer:s};function p(e){return e&&f[e.type]||null}function u(r,s){if(!r)return null;if("classBreaks"===r.type&&r.classificationMethod){const e=r.authoringInfo||{classificationMethod:""};e.classificationMethod=r.classificationMethod,r.authoringInfo=e}"vectorField"===r.type&&r.visualVariables&&!Array.isArray(r.visualVariables)&&(r.visualVariables=[r.visualVariables]);const t=p(r);if(t){const e=new t;return e.read(r,s),e}return s&&s.messages&&r&&s.messages.push(new e("renderer:unsupported","Renderers of type '"+(r.type||"unknown")+"' are not supported",{definition:r,context:s})),null}function R(e,r){return u(e,r)}export{R as fromJSON,l as rasterRendererTypes,u as read,i as websceneRasterRendererTypes};
@@ -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 s from"../Color.js";import t from"../request.js";import r from"../core/Error.js";import{clone as i}from"../core/lang.js";import o from"../core/Logger.js";import n from"../core/LRUCache.js";import{isSome as a}from"../core/maybe.js";import{isAbortError as l}from"../core/promiseUtils.js";import{numericHash as c}from"../core/string.js";import{property as p}from"../core/accessorSupport/decorators/property.js";import"../core/accessorSupport/ensureType.js";import{subclass as m}from"../core/accessorSupport/decorators/subclass.js";import{writer as u}from"../core/accessorSupport/decorators/writer.js";import{collectArcadeFieldNames as f}from"../layers/support/fieldUtils.js";import h from"./Renderer.js";import{VisualVariablesMixin as y}from"./mixins/VisualVariablesMixin.js";import{loadArcade as d,createDictionaryExpression as g}from"../support/arcadeOnDemand.js";import b from"../symbols/CIMSymbol.js";var _;const j=o.getLogger("esri.renderers.DictionaryRenderer"),w={type:"CIMSimpleLineCallout",lineSymbol:{type:"CIMLineSymbol",symbolLayers:[{type:"CIMSolidStroke",width:.5,color:[0,0,0,255]}]}};let S=_=class extends(y(h)){constructor(e){super(e),this._ongoingRequests=new Map,this._symbolCache=new n(100),this.config=null,this.fieldMap=null,this.scaleExpression=null,this.scaleExpressionTitle=null,this.url=null,this.type="dictionary"}writeData(e,s){e&&(s.scalingExpressionInfo={expression:e,returnType:"number"})}writeVisualVariables(e,s,t,r){null!=r&&r.origin||super.writeVisualVariables(e,s,t,r)}clone(){return new _({config:i(this.config),scaleExpression:this.scaleExpression,scaleExpressionTitle:this.scaleExpressionTitle,fieldMap:i(this.fieldMap),url:i(this.url),visualVariables:i(this.visualVariables)})}async getSymbolAsync(e,t){let r;this._dictionaryPromise||(this._dictionaryPromise=this.fetchResources(t));try{r=await this._dictionaryPromise}catch(d){if(l(d))return this._dictionaryPromise=null,null}const i={};if(this.fieldMap)for(const s of this._symbolFields){const t=this.fieldMap[s];if(t&&null!==e.attributes[t]&&void 0!==e.attributes[t]){const r=""+e.attributes[t];i[s]=r}else i[s]=""}const o=r(i,t);if(!o||"string"!=typeof o)return null;const n=c(o).toString(),p=this._symbolCache.get(n);if(p)return p.catch((()=>{this._symbolCache.pop(n)})),p;const m=o.split(";"),u=[],f=[];for(const a of m)if(a&&0!==a.length)if(-1===a.indexOf("po:"))if(-1!==a.indexOf("|")){for(const e of a.split("|"))if(this._itemNames.has(e)){u.push(e);break}}else this._itemNames.has(a)&&u.push(a);else{const e=a.substr(3).split("|");if(3===e.length){const t=e[0],r=e[1];let i=e[2];if("DashTemplate"===r)i=i.split(" ").map((e=>Number(e)));else if("Color"===r){const e=new s(i).toRgba();i=[e[0],e[1],e[2],255*e[3]]}else i=Number(i);f.push({primitiveName:t,propertyName:r,value:i})}}const h=!a(e.geometry)||!e.geometry.hasZ&&"point"===e.geometry.type,y=this._cimPartsToCIMSymbol(u,f,h,t);return this._symbolCache.put(n,y,1),y}async collectRequiredFields(e,s){await this.collectVVRequiredFields(e,s),this.scaleExpression&&await f(e,s,this.scaleExpression);for(const t in this.fieldMap){const r=this.fieldMap[t];s.has(r)&&e.add(r)}}get arcadeRequired(){return!0}async fetchResources(e){if(this._dictionaryPromise)return this._dictionaryPromise;if(!this.url)return void j.error("no valid URL!");const s=a(e)?e.abortOptions:null,i=t(this.url+"/resources/styles/dictionary-info.json",{responseType:"json",query:{f:"json"},...s}),[{data:o}]=await Promise.all([i,d()]);if(!o)throw this._dictionaryPromise=null,new r("esri.renderers.DictionaryRenderer","Bad dictionary data!");const n=o.expression,l=o.authoringInfo;this._refSymbolUrlTemplate=this.url+"/"+o.cimRefTemplateUrl,this._itemNames=new Set(o.itemsNames),this._symbolFields=l.symbol;const c={};if(this.config){const e=this.config;for(const s in e)c[s]=e[s]}if(l.configuration)for(const t of l.configuration)c.hasOwnProperty(t.name)||(c[t.name]=t.value);const p=[];if(a(e)&&e.fields&&this.fieldMap)for(const t of this._symbolFields){const s=this.fieldMap[t],r=e.fields.filter((e=>e.name===s));r.length>0&&p.push({...r[0],name:t})}return this._dictionaryPromise=g(n,a(e)?e.spatialReference:null,p,c).then((e=>{const s={scale:0};return(t,r)=>{const i=e.repurposeFeature({geometry:null,attributes:t});return s.scale=a(r)?r.scale:void 0,e.evaluate({$feature:i,$view:s})}})).catch((e=>(j.error("Creating dictinoary expression failed:",e),null))),this._dictionaryPromise}getSymbol(){return null}getSymbols(){return[]}getAttributeHash(){return this.visualVariables&&this.visualVariables.reduce(((e,s)=>e+s.getAttributeHash()),"")}getMeshHash(){return`${this.url}-${JSON.stringify(this.fieldMap)}`}getSymbolFields(){return this._symbolFields}async _getSymbolPart(e,s){if(this._ongoingRequests.has(e))return this._ongoingRequests.get(e).then((e=>e.data));const r=this._refSymbolUrlTemplate.replace(/\{itemName\}/gi,e),i=t(r,{responseType:"json",query:{f:"json"},...s});this._ongoingRequests.set(e,i);try{return(await i).data}catch(o){return this._ongoingRequests.delete(e),Promise.reject(o)}}_combineSymbolParts(e,s,t){if(!e||0===e.length)return null;const r={...e[0]};if(e.length>1){r.symbolLayers=[];for(const s of e){const e=s;r.symbolLayers.unshift(...e.symbolLayers)}}return t&&(r.callout=w),{type:"CIMSymbolReference",symbol:r,primitiveOverrides:s}}async _cimPartsToCIMSymbol(e,s,t,r){const i=new Array(e.length);for(let n=0;n<e.length;n++)i[n]=this._getSymbolPart(e[n],r);const o=await Promise.all(i);return new b({data:this._combineSymbolParts(o,s,t)})}};e([p({type:Object,json:{read:{source:"configuration"},write:{target:"configuration"}}})],S.prototype,"config",void 0),e([p({type:Object,json:{write:!0}})],S.prototype,"fieldMap",void 0),e([p({type:String,json:{read:{source:"scalingExpressionInfo.expression"},write:!0}})],S.prototype,"scaleExpression",void 0),e([u("scaleExpression")],S.prototype,"writeData",null),e([p({type:String,json:{read:{source:"scalingExpressionInfo.title"},write:{target:"scalingExpressionInfo.title",overridePolicy(e){return{enabled:!!e&&!!this.scaleExpression}}}}})],S.prototype,"scaleExpressionTitle",void 0),e([p({type:String,json:{write:!0}})],S.prototype,"url",void 0),e([u("visualVariables")],S.prototype,"writeVisualVariables",null),S=_=e([m("esri.renderers.DictionaryRenderer")],S);const x=S;export{x as default};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import{clone as r}from"../core/lang.js";import{property as s}from"../core/accessorSupport/decorators/property.js";import"../core/accessorSupport/ensureType.js";import{subclass as i}from"../core/accessorSupport/decorators/subclass.js";import{writer as t}from"../core/accessorSupport/decorators/writer.js";import{collectArcadeFieldNames as o}from"../layers/support/fieldUtils.js";import l from"./Renderer.js";import{VisualVariablesMixin as a}from"./mixins/VisualVariablesMixin.js";import{DictionaryLoader as n}from"./support/DictionaryLoader.js";var p;let c=p=class extends(a(l)){constructor(e){super(e),this.config=null,this.fieldMap=null,this.scaleExpression=null,this.scaleExpressionTitle=null,this.url=null,this.type="dictionary"}get _loader(){return new n(this.url,this.config,this.fieldMap)}writeData(e,r){e&&(r.scalingExpressionInfo={expression:e,returnType:"number"})}writeVisualVariables(e,r,s,i){null!=i&&i.origin||super.writeVisualVariables(e,r,s,i)}clone(){return new p({config:r(this.config),scaleExpression:this.scaleExpression,scaleExpressionTitle:this.scaleExpressionTitle,fieldMap:r(this.fieldMap),url:r(this.url),visualVariables:r(this.visualVariables)})}async getSymbolAsync(e,r){return this._loader.getSymbolAsync(e,r)}async collectRequiredFields(e,r){await this.collectVVRequiredFields(e,r),this.scaleExpression&&await o(e,r,this.scaleExpression);for(const s in this.fieldMap){const i=this.fieldMap[s];r.has(i)&&e.add(i)}}get arcadeRequired(){return!0}getSymbol(){return null}getSymbols(){return[]}getAttributeHash(){return this.visualVariables&&this.visualVariables.reduce(((e,r)=>e+r.getAttributeHash()),"")}getMeshHash(){return`${this.url}-${JSON.stringify(this.fieldMap)}`}getSymbolFields(){return this._loader.getSymbolFields()}};e([s({type:n})],c.prototype,"_loader",null),e([s({type:Object,json:{read:{source:"configuration"},write:{target:"configuration"}}})],c.prototype,"config",void 0),e([s({type:Object,json:{write:!0}})],c.prototype,"fieldMap",void 0),e([s({type:String,json:{read:{source:"scalingExpressionInfo.expression"},write:!0}})],c.prototype,"scaleExpression",void 0),e([t("scaleExpression")],c.prototype,"writeData",null),e([s({type:String,json:{read:{source:"scalingExpressionInfo.title"},write:{target:"scalingExpressionInfo.title",overridePolicy(e){return{enabled:!!e&&!!this.scaleExpression}}}}})],c.prototype,"scaleExpressionTitle",void 0),e([s({type:String,json:{write:!0}})],c.prototype,"url",void 0),e([t("visualVariables")],c.prototype,"writeVisualVariables",null),c=p=e([i("esri.renderers.DictionaryRenderer")],c);const u=c;export{u as default};
@@ -0,0 +1,4 @@
1
+ import "../interfaces";
2
+
3
+ import FlowRenderer = __esri.FlowRenderer;
4
+ export default FlowRenderer;
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
+ */
5
+ import{_ as o}from"../chunks/tslib.es6.js";import t from"../Color.js";import{JSONMap as e}from"../core/jsonMap.js";import{JSONSupport as r}from"../core/JSONSupport.js";import{toPt as s}from"../core/screenUtils.js";import{property as i}from"../core/accessorSupport/decorators/property.js";import"../core/arrayUtils.js";import"../core/has.js";import"../core/accessorSupport/ensureType.js";import{enumeration as p}from"../core/accessorSupport/decorators/enumeration.js";import{subclass as n}from"../core/accessorSupport/decorators/subclass.js";import{VisualVariablesMixin as a}from"./mixins/VisualVariablesMixin.js";import l from"./support/AuthoringInfo.js";var m;const c=new e({flow_from:"flow-from",flow_to:"flow-to"});let h=m=class extends(a(r)){constructor(o){super(o),this.density=.8,this.color=new t([255,255,255,1]),this.maxPathLength=200,this.trailWidth=1.5,this.flowSpeed=10,this.trailLength=100,this.smoothing=0,this.flowRepresentation="flow-from",this.type="flow",this.authoringInfo=null}clone(){const{density:o,maxPathLength:t,trailWidth:e,flowSpeed:r,trailLength:s,smoothing:i,flowRepresentation:p,authoringInfo:n}=this,a=this.color.clone(),l=(this.visualVariables||[]).map((o=>o.clone()));return new m({density:o,color:a,maxPathLength:t,trailWidth:e,flowSpeed:r,trailLength:s,smoothing:i,flowRepresentation:p,visualVariables:l,authoringInfo:n})}getSymbol(o,t){}async getSymbolAsync(o,t){}getSymbols(){return[]}};o([i({type:Number,json:{write:!0}})],h.prototype,"density",void 0),o([i({type:t,json:{write:{allowNull:!0}}})],h.prototype,"color",void 0),o([i({type:Number,cast:s,json:{write:!0}})],h.prototype,"maxPathLength",void 0),o([i({type:Number,cast:s,json:{write:!0}})],h.prototype,"trailWidth",void 0),o([i({type:Number,json:{write:!0}})],h.prototype,"flowSpeed",void 0),o([i({type:Number,json:{write:!0}})],h.prototype,"trailLength",void 0),o([i({type:Number,cast:s,json:{write:!1}})],h.prototype,"smoothing",void 0),o([i({type:c.apiValues,json:{type:c.jsonValues,read:{reader:c.read},write:{writer:c.write}}})],h.prototype,"flowRepresentation",void 0),o([p({flowRenderer:"flow"})],h.prototype,"type",void 0),o([i({type:l,json:{write:!0}})],h.prototype,"authoringInfo",void 0),h=m=o([n("esri.renderers.FlowRenderer")],h);const f=h;export{f as default};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
+ */
5
+ import e from"../../Color.js";import t from"../../request.js";import s from"../../core/Error.js";import o from"../../core/Logger.js";import i from"../../core/LRUCache.js";import{isSome as r}from"../../core/maybe.js";import{isAbortError as n}from"../../core/promiseUtils.js";import{numericHash as l}from"../../core/string.js";import{loadArcade as a,createDictionaryExpression as c}from"../../support/arcadeOnDemand.js";import m from"../../symbols/CIMSymbol.js";const h=o.getLogger("esri.renderers.support.DictionaryLoader"),f={type:"CIMSimpleLineCallout",lineSymbol:{type:"CIMLineSymbol",symbolLayers:[{type:"CIMSolidStroke",width:.5,color:[0,0,0,255]}]}};class u{constructor(e,t,s){this.config=null,this.fieldMap=null,this.url=null,this._ongoingRequests=new Map,this._symbolCache=new i(100),this.url=e,this.config=t,this.fieldMap=s}getSymbolFields(){return this._symbolFields}async getSymbolAsync(t,s){let o;this._dictionaryPromise||(this._dictionaryPromise=this.fetchResources(s));try{o=await this._dictionaryPromise}catch(d){if(n(d))return this._dictionaryPromise=null,null}const i={};if(this.fieldMap)for(const e of this._symbolFields){const s=this.fieldMap[e];if(s&&null!=t.attributes[s]){const o=""+t.attributes[s];i[e]=o}else i[e]=""}const a=o(i,s);if(!a||"string"!=typeof a)return null;const c=l(a).toString(),m=this._symbolCache.get(c);if(m)return m.catch((()=>{this._symbolCache.pop(c)})),m;const h=a.split(";"),f=[],u=[];for(const r of h)if(r)if(r.includes("po:")){const t=r.substr(3).split("|");if(3===t.length){const s=t[0],o=t[1];let i=t[2];if("DashTemplate"===o)i=i.split(" ").map((e=>Number(e)));else if("Color"===o){const t=new e(i).toRgba();i=[t[0],t[1],t[2],255*t[3]]}else i=Number(i);u.push({primitiveName:s,propertyName:o,value:i})}}else if(r.includes("|")){for(const e of r.split("|"))if(this._itemNames.has(e)){f.push(e);break}}else this._itemNames.has(r)&&f.push(r);const y=!r(t.geometry)||!t.geometry.hasZ&&"point"===t.geometry.type,p=this._cimPartsToCIMSymbol(f,u,y,s);return this._symbolCache.put(c,p,1),p}async fetchResources(e){if(this._dictionaryPromise)return this._dictionaryPromise;if(!this.url)return void h.error("no valid URL!");const o=r(e)?e.abortOptions:null,i=t(this.url+"/resources/styles/dictionary-info.json",{responseType:"json",query:{f:"json"},...o}),[{data:n}]=await Promise.all([i,a()]);if(!n)throw this._dictionaryPromise=null,new s("esri.renderers.DictionaryRenderer","Bad dictionary data!");const l=n.expression,m=n.authoringInfo;this._refSymbolUrlTemplate=this.url+"/"+n.cimRefTemplateUrl,this._itemNames=new Set(n.itemsNames),this._symbolFields=m.symbol;const f={};if(this.config){const e=this.config;for(const t in e)f[t]=e[t]}if(m.configuration)for(const t of m.configuration)f.hasOwnProperty(t.name)||(f[t.name]=t.value);const u=[];if(r(e)&&e.fields&&this.fieldMap)for(const t of this._symbolFields){const s=this.fieldMap[t],o=e.fields.filter((e=>e.name===s));o.length>0&&u.push({...o[0],name:t})}return this._dictionaryPromise=c(l,r(e)?e.spatialReference:null,u,f).then((e=>{const t={scale:0};return(s,o)=>{const i=e.repurposeFeature({geometry:null,attributes:s});return t.scale=r(o)?o.scale:void 0,e.evaluate({$feature:i,$view:t})}})).catch((e=>(h.error("Creating dictinoary expression failed:",e),null))),this._dictionaryPromise}async _cimPartsToCIMSymbol(e,t,s,o){const i=new Array(e.length);for(let n=0;n<e.length;n++)i[n]=this._getSymbolPart(e[n],o);const r=await Promise.all(i);return new m({data:this._combineSymbolParts(r,t,s)})}async _getSymbolPart(e,s){if(this._ongoingRequests.has(e))return this._ongoingRequests.get(e).then((e=>e.data));const o=this._refSymbolUrlTemplate.replace(/\{itemName\}/gi,e),i=t(o,{responseType:"json",query:{f:"json"},...s});this._ongoingRequests.set(e,i);try{return(await i).data}catch(r){return this._ongoingRequests.delete(e),Promise.reject(r)}}_combineSymbolParts(e,t,s){if(!e||0===e.length)return null;const o={...e[0]};if(e.length>1){o.symbolLayers=[];for(const t of e){const e=t;o.symbolLayers.unshift(...e.symbolLayers)}}return s&&(o.callout=f),{type:"CIMSymbolReference",symbol:o,primitiveOverrides:t}}}export{u as DictionaryLoader};
@@ -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{toHSV as t}from"../../core/colorUtils.js";import{JSONSupport as r}from"../../core/JSONSupport.js";import s from"../../core/Logger.js";import{unwrap as o,isSome as a}from"../../core/maybe.js";import{property as i}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{subclass as n}from"../../core/accessorSupport/decorators/subclass.js";import l from"../../layers/support/RasterInfo.js";import{isValidPixelBlock as u,extractBands as c,stretch as p,colorize as m,remapColor as h,lookupPixels as f,createStretchLUT as d,createColormapLUT as g,createHistogramEqualizationLUT as y,estimateStatisticsHistograms as S}from"../../layers/support/rasterFunctions/pixelUtils.js";import{hillshade as b,tintHillshade as x,calculateHillshadeParams as v}from"../../layers/support/rasterFunctions/surfaceUtils.js";import{convertColorRampToColormap as k}from"./colorRampUtils.js";const C=s.getLogger("esri.renderers.support.RasterSymbolizer");function _(e,t){const{attributeTable:r,bandCount:s}=e;if(!a(r)||s>1)return!1;if(t){if(null==r.fields.find((e=>e.name.toLowerCase()===t.toLowerCase())))return!1}return!0}function O(e){return"elevation"===e.dataType}function R(e){const{bandCount:t,colormap:r}=e;return a(r)&&r.length&&1===t}const L={u1:[0,1],u2:[0,3],u4:[0,15],u8:[0,255],s8:[-128,127],u16:[0,65535],s16:[-32768,32767],u32:[0,4294967295],s32:[-2147483648,2147483647],f32:[-34e38,34e38],f64:[-Number.MAX_VALUE,Number.MAX_VALUE]};let I=class extends r{constructor(e){super(e)}bind(){const{rendererJSON:e}=this;if(!e)return{success:!1};let t;switch(this.lookup={rendererJSON:{}},e.type){case"uniqueValue":t={success:this._updateUVRenderer(e)};break;case"rasterColormap":t={success:this._updateColormapRenderer(e)};break;case"rasterStretch":t={success:this._updateStretchRenderer(e)};break;case"classBreaks":t={success:this._updateClassBreaksRenderer(e)};break;case"rasterShadedRelief":t={success:this._updateShadedReliefRenderer(e)};break;case"vectorField":t={success:this._updateVectorFieldRenderer()};break;case"animatedFlow":t=this._updateAnimatedFlowRenderer()}return t}symbolize(e){let t=e&&e.pixelBlock;if(!V(t))return t;if(e.simpleStretchParams&&"rasterStretch"===this.rendererJSON.type)return this.simpleStretch(t,e.simpleStretchParams);try{let r;switch(t.pixels.length>3&&(t=c(t,[0,1,2])),this.rendererJSON.type){case"uniqueValue":case"rasterColormap":r=this._symbolizeColormap(t);break;case"classBreaks":r=this._symbolizeClassBreaks(t);break;case"rasterStretch":r=this._symbolizeStretch(t,e.bandIds);break;case"rasterShadedRelief":{const{extent:s}=e,o=s.spatialReference.isGeographic,a={x:(s.xmax-s.xmin)/t.width,y:(s.ymax-s.ymin)/t.height};r=this._symbolizeShadedRelief(t,{isGCS:o,resolution:a});break}}return r}catch(r){return C.error("symbolize",r.message),t}}simpleStretch(e,t){if(!V(e))return e;try{return e.pixels.length>3&&(e=c(e,[0,1,2])),p(e,t)}catch(r){return C.error("symbolize",r.message),e}}generateWebGLParameters(e){if(["uniqueValue","rasterColormap","classBreaks"].indexOf(this.rendererJSON.type)>-1){var t;const{indexedColormap:e,offset:r}=(null==(t=this.lookup)?void 0:t.colormapLut)||{};return{colormap:e,colormapOffset:r,type:"lut"}}const{pixelBlock:r,isGCS:s,resolution:o,bandIds:a}=e,{rendererJSON:i}=this;return"rasterStretch"===i.type?this._generateStretchWebGLParams(r,i,a):"rasterShadedRelief"===i.type?this._generateShadedReliefWebGLParams(i,s,o):"vectorField"===i.type?this._generateVectorFieldWebGLParams(i):null}_isLUTChanged(e){if(!this.lookup||!this.lookup.rendererJSON)return!0;if("colorRamp"in this.rendererJSON){const t=this.rendererJSON.colorRamp;return e?JSON.stringify(t)!==JSON.stringify(this.lookup.rendererJSON.colorRamp):(this.rendererJSON,this.lookup.rendererJSON,JSON.stringify(this.rendererJSON)!==JSON.stringify(this.lookup.rendererJSON))}return JSON.stringify(this.rendererJSON)!==JSON.stringify(this.lookup.rendererJSON)}_symbolizeColormap(e){if(this._isLUTChanged()){if(!this.bind().success)return e}return m(e,this.lookup.colormapLut)}_symbolizeClassBreaks(e){const t=this.rasterInfo.pixelType,r=["u8","u16","s8","s16"].indexOf(t)>-1;if(this._isLUTChanged()){if(!this.bind().success)return e}return r?m(e,this.lookup.colormapLut):h(e,this.lookup.remapLut)}_symbolizeStretch(e,t){const{pixelType:r,bandCount:s}=this.rasterInfo,a=this.rendererJSON,i=["u8","u16","s8","s16"].indexOf(r)>-1;let n,l;const{dra:u}=a,c=a.useGamma?a.gamma:null;if("histogramEqualization"===a.stretchType){const r=u?null:this.lookup.histogramLut,s=this._getStretchCutoff(a,e,t,!r),o=p(e,{...s,gamma:c});l=f(o,{lut:u?s.histogramLut:r,offset:0})}else if(i){var h,g;if(u){const s=this._getStretchCutoff(a,e,t);n=d({pixelType:r,...s,gamma:c})}else if(this._isLUTChanged()){if(!this.bind().success)return e;n=this.lookup?this.lookup.stretchLut:null}else n=this.lookup?this.lookup.stretchLut:null;if(!n)return e;s>1&&(null==t?void 0:t.length)===(null==(h=o(e))?void 0:h.pixels.length)&&(null==(g=n)?void 0:g.lut.length)===s&&(n={lut:t.map((e=>n.lut[e])),offset:n.offset}),l=f(e,n)}else{const r=this._getStretchCutoff(a,e,t);l=p(e,{...r,gamma:c})}if(a.colorRamp){if(this._isLUTChanged(!0)){if(!this.bind().success)return e}l=m(l,this.lookup.colormapLut)}return l}_symbolizeShadedRelief(e,t){var r,s;const a=this.rendererJSON,i={...a,...t},n=b(e,i);if(!a.colorRamp)return n;let l;if(this._isLUTChanged(!0)){if(!this.bind().success)return n;l=this.lookup?this.lookup.hsvMap:null}else l=this.lookup?this.lookup.hsvMap:null;if(!l)return n;const u=null!=(r=null==(s=o(this.rasterInfo.statistics))?void 0:s[0])?r:{min:0,max:8e3};return x(n,e,l,u),n}_updateVectorFieldRenderer(){const{bandCount:e,dataType:t}=this.rasterInfo;return 2===e&&("vector-magdir"===t||"vector-uv"===t)}_updateAnimatedFlowRenderer(){const{bandCount:e,dataType:t}=this.rasterInfo;return 2===e&&("vector-magdir"===t||"vector-uv"===t)?{success:!0}:{success:!1,error:`Unsupported data type "${t}"; AnimatedFlowRenderer only supports "vector-magdir" and "vector-uv".`}}_updateUVRenderer(e){const{bandCount:t,attributeTable:r,pixelType:s}=this.rasterInfo,o=e.field1;if(!o)return!1;const a=e.defaultSymbol,i=1===t&&["u8","s8"].includes(s);if(!_(this.rasterInfo,o)&&!i)return!1;const n=[];if(r){const t=r.fields.filter((e=>"value"===e.name.toLowerCase()))[0];if(!t)return!1;r.features.forEach((r=>{var s;const i=e.uniqueValueInfos.filter((e=>String(e.value)===String(r.attributes[o])))[0],l=null==i||null==(s=i.symbol)?void 0:s.color;l?n.push([r.attributes[t.name]].concat(l)):a&&n.push([r.attributes[t.name]].concat(a.color))}))}else{if("value"!==o.toLowerCase())return!1;e.uniqueValueInfos.forEach((e=>{var t;const r=null==e||null==(t=e.symbol)?void 0:t.color;r?n.push([parseInt(""+e.value,10)].concat(r)):a&&n.push([parseInt(""+e.value,10)].concat(a.color))}))}if(0===n.length)return!1;const l=g({colormap:n});return this.lookup={rendererJSON:e,colormapLut:l},this.canRenderInWebGL=!0,!0}_updateColormapRenderer(e){if(!R(this.rasterInfo))return!1;const t=e.colormapInfos.map((e=>[e.value].concat(e.color))).sort(((e,t)=>e[0]-t[0]));if(!t||0===t.length)return!1;const r=g({colormap:t});return this.lookup={rendererJSON:e,colormapLut:r},this.canRenderInWebGL=!0,!0}_updateShadedReliefRenderer(e){if(!O(this.rasterInfo))return!1;if(e.colorRamp){const r=k(e.colorRamp,256,!0),s=g({colormap:r}),o=[],a=s.indexedColormap;for(let e=0;e<a.length;e+=4){const r=t({r:a[e],g:a[e+1],b:a[e+2]});o.push([r.h/60,r.s/100,255*r.v/100])}this.lookup={rendererJSON:e,colormapLut:s,hsvMap:o}}else this.lookup=null;return this.canRenderInWebGL=!0,!0}_updateClassBreaksRenderer(e){const t=this.rasterInfo.pixelType,r=["u8","u16","s8","s16"].indexOf(t)>-1,s=e.classBreakInfos;if(null==s||!s.length)return!1;const o=s.sort(((e,t)=>e.classMaxValue-t.classMaxValue)),a=o[o.length-1];let i=e.minValue;if(!r){const t=[];for(let e=0;e<o.length;e++){var n;t.push({value:null!=(n=o[e].classMinValue)?n:i,mappedColor:o[e].symbol.color}),i=o[e].classMaxValue}return t.push({value:a.classMaxValue,mappedColor:a.symbol.color}),this.lookup={rendererJSON:e,remapLut:t},this.canRenderInWebGL=!1,!0}const l=[];i=Math.floor(e.minValue);for(let c=0;c<o.length;c++){const e=o[c];for(let t=i;t<e.classMaxValue;t++)l.push([t].concat(e.symbol.color));i=Math.ceil(e.classMaxValue)}a.classMaxValue===i&&l.push([a.classMaxValue].concat(a.symbol.color));const u=g({colormap:l,fillUnspecified:!1});return this.lookup={rendererJSON:e,colormapLut:u},this.canRenderInWebGL=!0,!0}_isHistogramRequired(e){return"percentClip"===e||"histogramEqualization"===e}_isValidRasterStatistics(e){return a(e)&&e.length>0&&null!=e[0].min&&null!=e[0].max}_updateStretchRenderer(e){var t;let{stretchType:r,dra:s}=e;if(!("none"===r||null!=(t=e.statistics)&&t.length||this._isValidRasterStatistics(this.rasterInfo.statistics)||s))return!1;const a=o(e.histograms||this.rasterInfo.histograms);!this._isHistogramRequired(e.stretchType)||null!=a&&a.length||s||(r="minMax");const{gamma:i,useGamma:n,colorRamp:l}=e,u=this.rasterInfo.pixelType,c=!s&&["u8","u16","s8","s16"].indexOf(u)>-1;if("histogramEqualization"===r){const t=a.map((e=>y(e)));this.lookup={rendererJSON:e,histogramLut:t}}else if(c){const t=this._getStretchCutoff(e),r=d({pixelType:u,...t,gamma:n?i:null});this.lookup={rendererJSON:e,stretchLut:r}}if(l){const t=k(l,256,!0);this.lookup||(this.lookup={rendererJSON:e}),this.lookup.colormapLut=g({colormap:t}),this.lookup.rendererJSON=e}return this.canRenderInWebGL=!0,!0}_getStretchCutoff(e,t=null,r,s){var i,n,l;let u,c,p=e.stretchType;var m;if(e.dra)if("minMax"===p&&a(t)&&t.statistics)u=t.statistics.map((e=>[e.minValue,e.maxValue,0,0]));else{const e=S(t);u=a(e)?e.statistics:null,c=a(e)?e.histograms:null}else u=(null==(m=e.statistics)?void 0:m.length)>0?e.statistics:o(this.rasterInfo.statistics),c=e.histograms||o(this.rasterInfo.histograms);!this._isHistogramRequired(p)||null!=(i=c)&&i.length||(p="minMax");const h=(null==(n=u)?void 0:n.length)||(null==(l=c)?void 0:l.length)||this.rasterInfo.bandCount,f=[],d=[];let g,b,x,v,k,C,_,O,R,I,V,N;switch(u&&!Array.isArray(u[0])&&(u=u.map((e=>[e.min,e.max,e.avg,e.stddev]))),p){case"none":{const e=L[this.rasterInfo.pixelType]||L.f32;for(O=0;O<h;O++)f[O]=e[0],d[O]=e[1]}break;case"minMax":for(O=0;O<h;O++)f[O]=u[O][0],d[O]=u[O][1];break;case"standardDeviation":for(O=0;O<h;O++)f[O]=u[O][2]-e.numberOfStandardDeviations*u[O][3],d[O]=u[O][2]+e.numberOfStandardDeviations*u[O][3],f[O]<u[O][0]&&(f[O]=u[O][0]),d[O]>u[O][1]&&(d[O]=u[O][1]);break;case"histogramEqualization":for(O=0;O<h;O++)f[O]=c[O].min,d[O]=c[O].max;break;case"percentClip":for(O=0;O<c.length;O++){for(g=c[O],k=new Uint32Array(g.size),v=[...g.counts],v.length>=20&&(v[0]=v[1]=v[2]=v[v.length-1]=v[v.length-2]=0),x=0,b=(g.max-g.min)/g.size,_=-.5===g.min&&1===b?.5:0,R=0;R<g.size;R++)x+=v[R],k[R]=x;for(C=(e.minPercent||0)*x/100,R=0;R<g.size;R++)if(k[R]>C){f[O]=g.min+b*(R+_);break}for(C=(1-(e.maxPercent||0)/100)*x,R=g.size-2;R>=0;R--)if(k[R]<C){d[O]=g.min+b*(R+2-_);break}}break;default:for(O=0;O<h;O++)f[O]=u[O][0],d[O]=u[O][1]}"histogramEqualization"===p?(V=c[0].size||256,I=0,s&&(N=c.map((e=>y(e))))):(V=e.max||255,I=e.min||0);const T={minCutOff:f,maxCutOff:d,outMax:V,outMin:I,histogramLut:N};return this._getSelectedBandCutoffs(T,r)}_getSelectedBandCutoffs(e,t){if(null==t||0===t.length)return e;const r=Math.max.apply(null,t),{minCutOff:s,maxCutOff:o,outMin:a,outMax:i,histogramLut:n}=e;return s.length===t.length||s.length<=r?e:{minCutOff:t.map((e=>s[e])),maxCutOff:t.map((e=>o[e])),histogramLut:n?t.map((e=>n[e])):null,outMin:a,outMax:i}}_generateStretchWebGLParams(e,t,r){let s=null,o=null;const i=this.lookup&&this.lookup.colormapLut;t.colorRamp&&i&&(s=i.indexedColormap,o=i.offset),"histogramEqualization"===t.stretchType&&(t={...t,stretchType:"minMax"});const{gamma:n}=t,l=!!(t.useGamma&&n&&n.some((e=>1!==e))),{minCutOff:u,maxCutOff:c,outMin:p,outMax:m}=this._getStretchCutoff(t,e,r);let h=0;a(e)&&(h=e.getPlaneCount(),2===h&&((e=e.clone()).statistics=[e.statistics[0]],e.pixels=[e.pixels[0]]));const f=Math.min(3,(null==r?void 0:r.length)||h||this.rasterInfo.bandCount),d=new Float32Array(f),g=s||l?1:255;let y;for(y=0;y<f;y++)d[y]=(m-p)/(c[y]-u[y])/g;const S=new Float32Array(f);if(l)for(y=0;y<f;y++)n[y]>1?n[y]>2?S[y]=6.5+(n[y]-2)**2.5:S[y]=6.5+100*(2-n[y])**4:S[y]=1;return{bandCount:f,outMin:p/g,outMax:m/g,minCutOff:u,maxCutOff:c,factor:d,useGamma:l,gamma:l?n:[1,1,1],gammaCorrection:l?S:[1,1,1],colormap:s,colormapOffset:o,stretchType:t.stretchType,type:"stretch"}}_generateShadedReliefWebGLParams(e,t,r){var s,a,i;let n=null,l=null;const u=this.lookup&&this.lookup.colormapLut;e.colorRamp&&u&&(n=u.indexedColormap,l=u.offset);const c={...e,isGCS:t,resolution:r},p=v(c),m=null==(s=o(this.rasterInfo.statistics))?void 0:s[0];return{...p,minValue:null!=(a=null==m?void 0:m.min)?a:0,maxValue:null!=(i=null==m?void 0:m.max)?i:8e3,hillshadeType:"traditional"===e.hillshadeType?0:1,type:"hillshade",colormap:n,colormapOffset:l}}_generateVectorFieldWebGLParams(e){var t,r,s,o,i,n;const{style:l,inputUnit:u,outputUnit:c,visualVariables:p,symbolTileSize:m,flowRepresentation:h}=e;let f;const d=null!=(t=null==p?void 0:p.find((e=>"sizeInfo"===e.type)))?t:{type:"sizeInfo",field:"Magnitude",maxDataValue:null==(r=this.rasterInfo.statistics)?void 0:r[0].max,maxSize:.8*m,minDataValue:null==(s=this.rasterInfo.statistics)?void 0:s[0].min,minSize:.2*m},g=d?d.minDataValue:null==(o=this.rasterInfo.statistics)?void 0:o[0].min,y=d?d.maxDataValue:null==(i=this.rasterInfo.statistics)?void 0:i[0].max,S=a(d.maxSize)&&a(d.minSize)?[d.minSize/m,d.maxSize/m]:[.2,.8];if("wind_speed"===l||"simple_scalar"===l){const e=(S[0]+S[1])/2;S[0]=S[1]=e}const b=a(g)&&a(y)?[g,y]:null;if("classified_arrow"===l)if(a(g)&&a(y)&&a(d)){f=[];const e=(d.maxDataValue-d.minDataValue)/5;for(let t=0;t<6;t++)f.push(d.minDataValue+e*t)}else f=[0,1e-6,3.5,7,10.5,14];const x="flow_to"===h===("ocean_current_kn"===l||"ocean_current_m"===l)?0:Math.PI,v=null==p?void 0:p.find((e=>"rotationInfo"===e.type));return{breakValues:f,dataRange:b,inputUnit:u,outputUnit:c,symbolTileSize:m,symbolPercentRange:S,style:l||"single_arrow",rotation:x,rotationType:(null==(n=this.rasterInfo.storageInfo)?void 0:n.tileInfo)&&"vector-uv"===this.rasterInfo.dataType?"geographic":(null==v?void 0:v.rotationType)||e.rotationType,type:"vectorField"}}};function V(e){return u(e)&&0!==e.validPixelCount}e([i({json:{write:!0}})],I.prototype,"rendererJSON",void 0),e([i({type:l,json:{write:!0}})],I.prototype,"rasterInfo",void 0),e([i({json:{write:!0}})],I.prototype,"lookup",void 0),e([i()],I.prototype,"canRenderInWebGL",void 0),I=e([n("esri.renderers.support.RasterSymbolizer")],I);const N=I;export{N as default};
5
+ import{_ as e}from"../../chunks/tslib.es6.js";import{toHSV as t}from"../../core/colorUtils.js";import{JSONSupport as r}from"../../core/JSONSupport.js";import s from"../../core/Logger.js";import{unwrap as o,isSome as a}from"../../core/maybe.js";import{property as i}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{subclass as n}from"../../core/accessorSupport/decorators/subclass.js";import l from"../../layers/support/RasterInfo.js";import{isValidPixelBlock as u,extractBands as c,stretch as p,colorize as d,remapColor as h,lookupPixels as m,createStretchLUT as f,createColormapLUT as g,createHistogramEqualizationLUT as y,estimateStatisticsHistograms as b}from"../../layers/support/rasterFunctions/pixelUtils.js";import{hillshade as S,tintHillshade as v,calculateHillshadeParams as x}from"../../layers/support/rasterFunctions/surfaceUtils.js";import{convertColorRampToColormap as k}from"./colorRampUtils.js";const R=s.getLogger("esri.renderers.support.RasterSymbolizer");function C(e,t){const{attributeTable:r,bandCount:s}=e;if(!a(r)||s>1)return!1;if(t){if(null==r.fields.find((e=>e.name.toLowerCase()===t.toLowerCase())))return!1}return!0}function _(e){return"elevation"===e.dataType}function O(e){const{bandCount:t,colormap:r}=e;return a(r)&&r.length&&1===t}const I={u1:[0,1],u2:[0,3],u4:[0,15],u8:[0,255],s8:[-128,127],u16:[0,65535],s16:[-32768,32767],u32:[0,4294967295],s32:[-2147483648,2147483647],f32:[-34e38,34e38],f64:[-Number.MAX_VALUE,Number.MAX_VALUE]};let L=class extends r{constructor(e){super(e)}bind(){const{rendererJSON:e}=this;if(!e)return{success:!1};let t;switch(this.lookup={rendererJSON:{}},e.type){case"uniqueValue":t=this._updateUVRenderer(e);break;case"rasterColormap":t=this._updateColormapRenderer(e);break;case"rasterStretch":t=this._updateStretchRenderer(e);break;case"classBreaks":t=this._updateClassBreaksRenderer(e);break;case"rasterShadedRelief":t=this._updateShadedReliefRenderer(e);break;case"vectorField":t=this._updateVectorFieldRenderer();break;case"flowRenderer":t=this._updateFlowRenderer()}return t}symbolize(e){let t=e&&e.pixelBlock;if(!V(t))return t;if(e.simpleStretchParams&&"rasterStretch"===this.rendererJSON.type)return this.simpleStretch(t,e.simpleStretchParams);try{let r;switch(t.pixels.length>3&&(t=c(t,[0,1,2])),this.rendererJSON.type){case"uniqueValue":case"rasterColormap":r=this._symbolizeColormap(t);break;case"classBreaks":r=this._symbolizeClassBreaks(t);break;case"rasterStretch":r=this._symbolizeStretch(t,e.bandIds);break;case"rasterShadedRelief":{const{extent:s}=e,o=s.spatialReference.isGeographic,a={x:(s.xmax-s.xmin)/t.width,y:(s.ymax-s.ymin)/t.height};r=this._symbolizeShadedRelief(t,{isGCS:o,resolution:a});break}}return r}catch(r){return R.error("symbolize",r.message),t}}simpleStretch(e,t){if(!V(e))return e;try{return e.pixels.length>3&&(e=c(e,[0,1,2])),p(e,t)}catch(r){return R.error("symbolize",r.message),e}}generateWebGLParameters(e){if(["uniqueValue","rasterColormap","classBreaks"].indexOf(this.rendererJSON.type)>-1){var t;const{indexedColormap:e,offset:r}=(null==(t=this.lookup)?void 0:t.colormapLut)||{};return{colormap:e,colormapOffset:r,type:"lut"}}const{pixelBlock:r,isGCS:s,resolution:o,bandIds:a}=e,{rendererJSON:i}=this;return"rasterStretch"===i.type?this._generateStretchWebGLParams(r,i,a):"rasterShadedRelief"===i.type?this._generateShadedReliefWebGLParams(i,s,o):"vectorField"===i.type?this._generateVectorFieldWebGLParams(i):null}_isLUTChanged(e){if(!this.lookup||!this.lookup.rendererJSON)return!0;if("colorRamp"in this.rendererJSON){const t=this.rendererJSON.colorRamp;return e?JSON.stringify(t)!==JSON.stringify(this.lookup.rendererJSON.colorRamp):(this.rendererJSON,this.lookup.rendererJSON,JSON.stringify(this.rendererJSON)!==JSON.stringify(this.lookup.rendererJSON))}return JSON.stringify(this.rendererJSON)!==JSON.stringify(this.lookup.rendererJSON)}_symbolizeColormap(e){if(this._isLUTChanged()){if(!this.bind().success)return e}return d(e,this.lookup.colormapLut)}_symbolizeClassBreaks(e){const t=this.rasterInfo.pixelType,r=["u8","u16","s8","s16"].indexOf(t)>-1;if(this._isLUTChanged()){if(!this.bind().success)return e}return r?d(e,this.lookup.colormapLut):h(e,this.lookup.remapLut)}_symbolizeStretch(e,t){const{pixelType:r,bandCount:s}=this.rasterInfo,a=this.rendererJSON,i=["u8","u16","s8","s16"].indexOf(r)>-1;let n,l;const{dra:u}=a,c=a.useGamma?a.gamma:null;if("histogramEqualization"===a.stretchType){const r=u?null:this.lookup.histogramLut,s=this._getStretchCutoff(a,e,t,!r),o=p(e,{...s,gamma:c});l=m(o,{lut:u?s.histogramLut:r,offset:0})}else if(i){var h,g;if(u){const s=this._getStretchCutoff(a,e,t);n=f({pixelType:r,...s,gamma:c})}else if(this._isLUTChanged()){if(!this.bind().success)return e;n=this.lookup?this.lookup.stretchLut:null}else n=this.lookup?this.lookup.stretchLut:null;if(!n)return e;s>1&&(null==t?void 0:t.length)===(null==(h=o(e))?void 0:h.pixels.length)&&(null==(g=n)?void 0:g.lut.length)===s&&(n={lut:t.map((e=>n.lut[e])),offset:n.offset}),l=m(e,n)}else{const r=this._getStretchCutoff(a,e,t);l=p(e,{...r,gamma:c})}if(a.colorRamp){if(this._isLUTChanged(!0)){if(!this.bind().success)return e}l=d(l,this.lookup.colormapLut)}return l}_symbolizeShadedRelief(e,t){var r,s;const a=this.rendererJSON,i={...a,...t},n=S(e,i);if(!a.colorRamp)return n;let l;if(this._isLUTChanged(!0)){if(!this.bind().success)return n;l=this.lookup?this.lookup.hsvMap:null}else l=this.lookup?this.lookup.hsvMap:null;if(!l)return n;const u=null!=(r=null==(s=o(this.rasterInfo.statistics))?void 0:s[0])?r:{min:0,max:8e3};return v(n,e,l,u),n}_isVectorFieldData(){const{bandCount:e,dataType:t}=this.rasterInfo;return 2===e&&("vector-magdir"===t||"vector-uv"===t)}_updateVectorFieldRenderer(){return this._isVectorFieldData()?{success:!0}:{success:!1,error:`Unsupported data type "${this.rasterInfo.dataType}"; VectorFieldRenderer only supports "vector-magdir" and "vector-uv".`}}_updateFlowRenderer(){return this._isVectorFieldData()?{success:!0}:{success:!1,error:`Unsupported data type "${this.rasterInfo.dataType}"; FlowRenderer only supports "vector-magdir" and "vector-uv".`}}_updateUVRenderer(e){const{bandCount:t,attributeTable:r,pixelType:s}=this.rasterInfo,o=e.field1;if(!o)return{success:!1,error:"Unsupported renderer; missing UniqueValueRenderer.field."};const a=e.defaultSymbol,i=1===t&&["u8","s8"].includes(s);if(!C(this.rasterInfo,o)&&!i)return{success:!1,error:"Unsupported data; UniqueValueRenderer is only supported on single band data with a valid raster attribute table."};const n=[];if(r){const t=r.fields.filter((e=>"value"===e.name.toLowerCase()))[0];if(!t)return{success:!1,error:"Unsupported data; the data's raster attribute table does not have a value field."};r.features.forEach((r=>{var s;const i=e.uniqueValueInfos.filter((e=>String(e.value)===String(r.attributes[o])))[0],l=null==i||null==(s=i.symbol)?void 0:s.color;l?n.push([r.attributes[t.name]].concat(l)):a&&n.push([r.attributes[t.name]].concat(a.color))}))}else{if("value"!==o.toLowerCase())return{success:!1,error:'Unsupported renderer; UniqueValueRenderer.field must be "Value" when raster attribute table is not availalbe.'};e.uniqueValueInfos.forEach((e=>{var t;const r=null==e||null==(t=e.symbol)?void 0:t.color;r?n.push([parseInt(""+e.value,10)].concat(r)):a&&n.push([parseInt(""+e.value,10)].concat(a.color))}))}if(0===n.length)return{success:!1,error:"Invalid UniqueValueRenderer. Cannot find matching records in the raster attribute table."};const l=g({colormap:n});return this.lookup={rendererJSON:e,colormapLut:l},this.canRenderInWebGL=!0,{success:!0}}_updateColormapRenderer(e){if(!O(this.rasterInfo))return{success:!1,error:"Unsupported data; the data source does not have a colormap."};const t=e.colormapInfos.map((e=>[e.value].concat(e.color))).sort(((e,t)=>e[0]-t[0]));if(!t||0===t.length)return{success:!1,error:"Unsupported renderer; ColormapRenderer must have meaningful colormapInfos."};const r=g({colormap:t});return this.lookup={rendererJSON:e,colormapLut:r},this.canRenderInWebGL=!0,{success:!0}}_updateShadedReliefRenderer(e){if(!_(this.rasterInfo))return{success:!1,error:`Unsupported data type "${this.rasterInfo.dataType}"; ShadedReliefRenderer only supports "elevation".`};if(e.colorRamp){const r=k(e.colorRamp,256,!0),s=g({colormap:r}),o=[],a=s.indexedColormap;for(let e=0;e<a.length;e+=4){const r=t({r:a[e],g:a[e+1],b:a[e+2]});o.push([r.h/60,r.s/100,255*r.v/100])}this.lookup={rendererJSON:e,colormapLut:s,hsvMap:o}}else this.lookup=null;return this.canRenderInWebGL=!0,{success:!0}}_updateClassBreaksRenderer(e){const t=this.rasterInfo.pixelType,r=["u8","u16","s8","s16"].indexOf(t)>-1,s=e.classBreakInfos;if(null==s||!s.length)return{success:!1,error:"Unsupported renderer; missing or invalid ClassBreaksRenderer.classBreakInfos."};const o=s.sort(((e,t)=>e.classMaxValue-t.classMaxValue)),a=o[o.length-1];let i=e.minValue;if(!r){const t=[];for(let e=0;e<o.length;e++){var n;t.push({value:null!=(n=o[e].classMinValue)?n:i,mappedColor:o[e].symbol.color}),i=o[e].classMaxValue}return t.push({value:a.classMaxValue,mappedColor:a.symbol.color}),this.lookup={rendererJSON:e,remapLut:t},this.canRenderInWebGL=!1,{success:!0}}const l=[];i=Math.floor(e.minValue);for(let c=0;c<o.length;c++){const e=o[c];for(let t=i;t<e.classMaxValue;t++)l.push([t].concat(e.symbol.color));i=Math.ceil(e.classMaxValue)}a.classMaxValue===i&&l.push([a.classMaxValue].concat(a.symbol.color));const u=g({colormap:l,fillUnspecified:!1});return this.lookup={rendererJSON:e,colormapLut:u},this.canRenderInWebGL=!0,{success:!0}}_isHistogramRequired(e){return"percentClip"===e||"histogramEqualization"===e}_isValidRasterStatistics(e){return a(e)&&e.length>0&&null!=e[0].min&&null!=e[0].max}_updateStretchRenderer(e){var t;let{stretchType:r,dra:s}=e;if(!("none"===r||null!=(t=e.statistics)&&t.length||this._isValidRasterStatistics(this.rasterInfo.statistics)||s))return{success:!1,error:"Unsupported renderer; StretchRenderer.statistics is required when dynamic range adjustment is not used."};const a=o(e.histograms||this.rasterInfo.histograms);!this._isHistogramRequired(e.stretchType)||null!=a&&a.length||s||(r="minMax");const{gamma:i,useGamma:n,colorRamp:l}=e,u=this.rasterInfo.pixelType,c=!s&&["u8","u16","s8","s16"].indexOf(u)>-1;if("histogramEqualization"===r){const t=a.map((e=>y(e)));this.lookup={rendererJSON:e,histogramLut:t}}else if(c){const t=this._getStretchCutoff(e),r=f({pixelType:u,...t,gamma:n?i:null});this.lookup={rendererJSON:e,stretchLut:r}}if(l){const t=k(l,256,!0);this.lookup||(this.lookup={rendererJSON:e}),this.lookup.colormapLut=g({colormap:t}),this.lookup.rendererJSON=e}return this.canRenderInWebGL=!0,{success:!0}}_getStretchCutoff(e,t=null,r,s){var i,n,l;let u,c,p=e.stretchType;var d;if(e.dra)if("minMax"===p&&a(t)&&t.statistics)u=t.statistics.map((e=>[e.minValue,e.maxValue,0,0]));else{const e=b(t);u=a(e)?e.statistics:null,c=a(e)?e.histograms:null}else u=(null==(d=e.statistics)?void 0:d.length)>0?e.statistics:o(this.rasterInfo.statistics),c=e.histograms||o(this.rasterInfo.histograms);!this._isHistogramRequired(p)||null!=(i=c)&&i.length||(p="minMax");const h=(null==(n=u)?void 0:n.length)||(null==(l=c)?void 0:l.length)||this.rasterInfo.bandCount,m=[],f=[];let g,S,v,x,k,R,C,_,O,L,V,T;switch(u&&!Array.isArray(u[0])&&(u=u.map((e=>[e.min,e.max,e.avg,e.stddev]))),p){case"none":{const e=I[this.rasterInfo.pixelType]||I.f32;for(_=0;_<h;_++)m[_]=e[0],f[_]=e[1]}break;case"minMax":for(_=0;_<h;_++)m[_]=u[_][0],f[_]=u[_][1];break;case"standardDeviation":for(_=0;_<h;_++)m[_]=u[_][2]-e.numberOfStandardDeviations*u[_][3],f[_]=u[_][2]+e.numberOfStandardDeviations*u[_][3],m[_]<u[_][0]&&(m[_]=u[_][0]),f[_]>u[_][1]&&(f[_]=u[_][1]);break;case"histogramEqualization":for(_=0;_<h;_++)m[_]=c[_].min,f[_]=c[_].max;break;case"percentClip":for(_=0;_<c.length;_++){for(g=c[_],k=new Uint32Array(g.size),x=[...g.counts],x.length>=20&&(x[0]=x[1]=x[2]=x[x.length-1]=x[x.length-2]=0),v=0,S=(g.max-g.min)/g.size,C=-.5===g.min&&1===S?.5:0,O=0;O<g.size;O++)v+=x[O],k[O]=v;for(R=(e.minPercent||0)*v/100,O=0;O<g.size;O++)if(k[O]>R){m[_]=g.min+S*(O+C);break}for(R=(1-(e.maxPercent||0)/100)*v,O=g.size-2;O>=0;O--)if(k[O]<R){f[_]=g.min+S*(O+2-C);break}}break;default:for(_=0;_<h;_++)m[_]=u[_][0],f[_]=u[_][1]}"histogramEqualization"===p?(V=c[0].size||256,L=0,s&&(T=c.map((e=>y(e))))):(V=e.max||255,L=e.min||0);const N={minCutOff:m,maxCutOff:f,outMax:V,outMin:L,histogramLut:T};return this._getSelectedBandCutoffs(N,r)}_getSelectedBandCutoffs(e,t){if(null==t||0===t.length)return e;const r=Math.max.apply(null,t),{minCutOff:s,maxCutOff:o,outMin:a,outMax:i,histogramLut:n}=e;return s.length===t.length||s.length<=r?e:{minCutOff:t.map((e=>s[e])),maxCutOff:t.map((e=>o[e])),histogramLut:n?t.map((e=>n[e])):null,outMin:a,outMax:i}}_generateStretchWebGLParams(e,t,r){let s=null,o=null;const i=this.lookup&&this.lookup.colormapLut;t.colorRamp&&i&&(s=i.indexedColormap,o=i.offset),"histogramEqualization"===t.stretchType&&(t={...t,stretchType:"minMax"});const{gamma:n}=t,l=!!(t.useGamma&&n&&n.some((e=>1!==e))),{minCutOff:u,maxCutOff:c,outMin:p,outMax:d}=this._getStretchCutoff(t,e,r);let h=0;a(e)&&(h=e.getPlaneCount(),2===h&&((e=e.clone()).statistics=[e.statistics[0]],e.pixels=[e.pixels[0]]));const m=Math.min(3,(null==r?void 0:r.length)||h||this.rasterInfo.bandCount),f=new Float32Array(m),g=s||l?1:255;let y;for(y=0;y<m;y++)f[y]=(d-p)/(c[y]-u[y])/g;const b=new Float32Array(m);if(l)for(y=0;y<m;y++)n[y]>1?n[y]>2?b[y]=6.5+(n[y]-2)**2.5:b[y]=6.5+100*(2-n[y])**4:b[y]=1;return{bandCount:m,outMin:p/g,outMax:d/g,minCutOff:u,maxCutOff:c,factor:f,useGamma:l,gamma:l?n:[1,1,1],gammaCorrection:l?b:[1,1,1],colormap:s,colormapOffset:o,stretchType:t.stretchType,type:"stretch"}}_generateShadedReliefWebGLParams(e,t,r){var s,a,i;let n=null,l=null;const u=this.lookup&&this.lookup.colormapLut;e.colorRamp&&u&&(n=u.indexedColormap,l=u.offset);const c={...e,isGCS:t,resolution:r},p=x(c),d=null==(s=o(this.rasterInfo.statistics))?void 0:s[0];return{...p,minValue:null!=(a=null==d?void 0:d.min)?a:0,maxValue:null!=(i=null==d?void 0:d.max)?i:8e3,hillshadeType:"traditional"===e.hillshadeType?0:1,type:"hillshade",colormap:n,colormapOffset:l}}_generateVectorFieldWebGLParams(e){var t,r,s,o,i,n;const{style:l,inputUnit:u,outputUnit:c,visualVariables:p,symbolTileSize:d,flowRepresentation:h}=e;let m;const f=null!=(t=null==p?void 0:p.find((e=>"sizeInfo"===e.type)))?t:{type:"sizeInfo",field:"Magnitude",maxDataValue:null==(r=this.rasterInfo.statistics)?void 0:r[0].max,maxSize:.8*d,minDataValue:null==(s=this.rasterInfo.statistics)?void 0:s[0].min,minSize:.2*d},g=f?f.minDataValue:null==(o=this.rasterInfo.statistics)?void 0:o[0].min,y=f?f.maxDataValue:null==(i=this.rasterInfo.statistics)?void 0:i[0].max,b=a(f.maxSize)&&a(f.minSize)?[f.minSize/d,f.maxSize/d]:[.2,.8];if("wind_speed"===l||"simple_scalar"===l){const e=(b[0]+b[1])/2;b[0]=b[1]=e}const S=a(g)&&a(y)?[g,y]:null;if("classified_arrow"===l)if(a(g)&&a(y)&&a(f)){m=[];const e=(f.maxDataValue-f.minDataValue)/5;for(let t=0;t<6;t++)m.push(f.minDataValue+e*t)}else m=[0,1e-6,3.5,7,10.5,14];const v="flow_to"===h===("ocean_current_kn"===l||"ocean_current_m"===l)?0:Math.PI,x=null==p?void 0:p.find((e=>"rotationInfo"===e.type));return{breakValues:m,dataRange:S,inputUnit:u,outputUnit:c,symbolTileSize:d,symbolPercentRange:b,style:l||"single_arrow",rotation:v,rotationType:(null==(n=this.rasterInfo.storageInfo)?void 0:n.tileInfo)&&"vector-uv"===this.rasterInfo.dataType?"geographic":(null==x?void 0:x.rotationType)||e.rotationType,type:"vectorField"}}};function V(e){return u(e)&&0!==e.validPixelCount}e([i({json:{write:!0}})],L.prototype,"rendererJSON",void 0),e([i({type:l,json:{write:!0}})],L.prototype,"rasterInfo",void 0),e([i({json:{write:!0}})],L.prototype,"lookup",void 0),e([i()],L.prototype,"canRenderInWebGL",void 0),L=e([n("esri.renderers.support.RasterSymbolizer")],L);const T=L;export{T 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 e from"../../Color.js";import"../../rasterRenderers.js";import{isSome as t,unwrap as n}from"../../core/maybe.js";import{getMetersPerUnitForSR as r}from"../../core/unitUtils.js";import l from"../../layers/support/Field.js";import a from"../../layers/support/RasterInfo.js";import o from"./AuthoringInfo.js";import s from"./ClassBreakInfo.js";import{PREDEFINED_JSON_COLOR_RAMPS as i,convertColorRampToColormap as u}from"./colorRampUtils.js";import m from"./UniqueValueInfo.js";import c from"../../rest/support/AlgorithmicColorRamp.js";import f from"../../rest/support/ClassBreaksDefinition.js";import{createGenerateRendererClassBreaks as p}from"../../rest/support/generateRendererUtils.js";import d from"../../rest/support/MultipartColorRamp.js";import b from"../RasterStretchRenderer.js";import h from"../UniqueValueRenderer.js";import v from"../RasterColormapRenderer.js";import y from"../RasterShadedReliefRenderer.js";import g from"../ClassBreaksRenderer.js";import C from"../VectorFieldRenderer.js";const w=.25,x=d.fromJSON({type:"multipart",colorRamps:[{fromColor:[0,0,255],toColor:[0,255,255]},{fromColor:[0,255,255],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,0,0]}]}),M=d.fromJSON(i[0]),R=new Set(["scientific","standard-time","vector-uv","vector-magdir","vector-u","vector-v","vector-magnitude","vector-direction"]);function T(e,n){const{attributeTable:r,colormap:l}=e;if(K(e)){const n=Y(e);if(t(n))return n}if(t(l)){const n=W(e);if(t(n))return n}if(t(r)){const n=O(e);if(t(n))return n}return V(e,n)}function j(e){const t=["raster-stretch"];return F(e)&&t.push("raster-colormap"),z(e)&&t.push("unique-value"),D(e)&&t.push("class-breaks"),U(e)&&t.push("raster-shaded-relief"),K(e)&&t.push("vector-field"),Q(e)&&t.push("animated-flow"),t}function k(e,t,n){const r=["nearest","bilinear","cubic","majority"].find((e=>e===(null==n?void 0:n.toLowerCase())));if("Map"===t)return null!=r?r:"bilinear";if("standard-time"===e.dataType)return null!=r?r:"nearest";return"thematic"===e.dataType||e.attributeTable||e.colormap?"nearest"===r||"majority"===r?r:"nearest":null!=r?r:"bilinear"}function V(e,r){var l,a,o,s;e=I(e,null==r?void 0:r.variableName);const{bandCount:i}=e;let{bandIds:u,stretchType:m}=r||{};null!=(l=u)&&l.some((e=>e>=i))&&(u=null);let c=n(e.statistics),f=n(e.histograms);var p;i>1?(u=null!=(p=u)&&p.length?u:S(e),c=null==c?null:u.map((e=>c[e])),f=null==f?null:u.map((e=>f[e]))):u=[0];null==m&&(m=E(e));let d=!1;switch(m){case"none":d=!1;break;case"percent-clip":d=!(null!=(a=f)&&a.length);break;default:d=!(null!=(o=c)&&o.length)}const{dataType:h}=e,v=1===(null==(s=u)?void 0:s.length)&&R.has(h)?x:null,y=new b({stretchType:m,dynamicRangeAdjustment:d,colorRamp:v,outputMin:0,outputMax:255,gamma:1===u.length?[1]:[1,1,1],useGamma:!1});return"percent-clip"===m?y.maxPercent=y.minPercent=w:"standard-deviation"===m&&(y.numberOfStandardDeviations=2),!d&&(t(e.multidimensionalInfo)||null!=r&&r.includeStatisticsInStretch)&&("percent-clip"===m?y.histograms=f:"min-max"!==m&&"standard-deviation"!==m||(y.statistics=c)),y}function I(e,r){if(null==r)return e;let l=n(e.statistics),o=n(e.histograms);const{multidimensionalInfo:s}=e;if(r&&t(s)){const{statistics:e,histograms:t}=s.variables.find((e=>e.name===r));null!=e&&e.length&&(l=e),null!=t&&t.length&&(o=t)}return a.fromJSON({...e.toJSON(),statistics:l,histograms:o})}function S(e){const t=e.bandCount;if(1===t)return null;if(2===t)return[0];const n=e.keyProperties&&e.keyProperties.BandProperties;let r;if(n&&n.length===t){const{red:e,green:t,blue:l,nir:a}=B(n);null!=e&&null!=t&&null!=l?r=[e,t,l]:null!=a&&null!=e&&null!=t&&(r=[a,e,t])}return!r&&t>=3&&(r=[0,1,2]),r}function L(e,t){var n;const r=e.keyProperties&&e.keyProperties.BandProperties;return(t=null!=(n=t)&&n.length?t:Array.from(Array(e.bandCount).keys())).map((t=>r&&r.length===e.bandCount&&r[t]&&r[t].BandName||"band_"+(t+1)))}function B(e){const t={};for(let r=0;r<e.length;r++){var n;const l=e[r],a=null==(n=l.BandName)?void 0:n.toLowerCase();if("red"===a)t.red=r;else if("green"===a)t.green=r;else if("blue"===a)t.blue=r;else if("nearinfrared"===a||"nearinfrared_1"===a||"nir"===a)t.nir=r;else if(l.WavelengthMax&&l.WavelengthMin){const e=l.WavelengthMin,n=l.WavelengthMax;null==t.blue&&e>=410&&e<=480&&n>=480&&n<=540?t.blue=r:null==t.green&&e>=490&&e<=560&&n>=560&&n<=610?t.green=r:null==t.red&&e>=595&&e<=670&&n>=660&&n<=730?t.red=r:null==t.nir&&e>=700&&e<=860&&n>=800&&n<=950&&(t.nir=r)}}return t}function E(e){let n="percent-clip";const{pixelType:r,dataType:l,histograms:a,statistics:o}=e;return"u8"!==r||"processed"!==l&&t(a)&&t(o)?"u8"===r||"elevation"===l||R.has(l)?n="min-max":t(a)?n="percent-clip":t(o)&&(n="min-max",n="min-max"):n="none",n}function O(n,r,l,a){if(!z(n,r))return null;const{attributeTable:s,statistics:i}=n,c=q(s,r),f=P(s,"red"),p=P(s,"green"),d=P(s,"blue"),b=new o,v=[],y=new Set,g=!!(f&&p&&d);if(t(s))s.features.forEach((t=>{const n=t.attributes[c.name];if(!y.has(t.attributes[c.name])&&null!=n){y.add(n);const r=g&&("single"===f.type||"double"===f.type)&&("single"===p.type||"double"===p.type)&&("single"===d.type||"double"===d.type)&&!s.features.some((e=>e.attributes[f.name]>1||e.attributes[p.name]>1||e.attributes[d.name]>1)),l=r?255:1;v.push(new m({value:t.attributes[c.name],label:t.attributes[c.name]+"",symbol:{type:"simple-fill",style:"solid",outline:null,color:new e(g?[t.attributes[f.name]*l,t.attributes[p.name]*l,t.attributes[d.name]*l,1]:[0,0,0,0])}}))}}));else if(null!=i&&i[0])for(let t=i[0].min;t<=i[0].max;t++)v.push(new m({value:t,label:t.toString(),symbol:{type:"simple-fill",style:"solid",outline:null,color:new e([0,0,0,0])}}));if(v.sort(((e,t)=>e.value&&"string"==typeof e.value.valueOf()?0:e.value>t.value?1:-1)),!g){const t=u(M,v.length);v.forEach(((n,r)=>n.symbol.color=new e(t[r].slice(1,4)))),b.colorRamp=M}if(l||a){const t=l||u(a,v.length).map((e=>e.slice(1)));v.forEach(((n,r)=>n.symbol.color=new e(t[r]))),b.colorRamp=a}return new h({field:c.name,uniqueValueInfos:v,authoringInfo:b})}function q(e,n,r){let a;return t(e)?(a=n?e.fields.find((e=>n.toLowerCase()===e.name.toLowerCase())):N(e.fields),a||(r||(a=e.fields.find((e=>"string"===e.type))),a||(a=P(e,"value")))):a=new l({name:"value"}),a}function N(e){let t;for(let n=0;n<e.length;n++){const r=e[n].name.toLowerCase();if("string"===e[n].type){if(r.startsWith("class")){t=e[n];break}null==t&&(r.endsWith("name")||r.endsWith("type"))&&(t=e[n])}}return t}function P(e,n){return t(e)?e.fields.find((e=>e.name.toLowerCase()===n)):null}function z(e,n){const{attributeTable:r,bandCount:l}=e;if(!t(r)&&G(e))return!0;if(!t(r)||l>1)return!1;if(n){if(null==r.fields.find((e=>e.name.toLowerCase()===n.toLowerCase())))return!1}return!0}function F(e){const{bandCount:n,colormap:r}=e;return t(r)&&r.length&&1===n}function W(e){if(!F(e))return null;let r;const{attributeTable:l,colormap:a}=e;if(t(l)){const e=P(l,"value"),t=q(l,null,!0);"string"===t.type&&(r={},l.features.forEach((n=>{const l=n.attributes;r[l[e.name]]=t?l[t.name]:l[e.name]})))}return v.createFromColormap(n(a),r)}function U(e){return"elevation"===e.dataType}function A(e,t){var n;if(!U(e))return null;const{extent:l}=e,a=l.width*r(l.spatialReference);return t=null!=(n=t)?n:"multi-directional",new y({hillshadeType:t,scalingType:a>5e6?"adjusted":"none"})}function D(e){const{attributeTable:n,bandCount:r}=e;return 1===r&&(t(n)||t(e.histograms))}function J(e,n){e=I(e,null==n?void 0:n.variableName);const{attributeTable:r}=e;if(!D(e))return null;const l=t(e.histograms)?e.histograms[0]:null,a=isFinite(null==n?void 0:n.numClasses)?n.numClasses:5,i=new o({classificationMethod:null==n?void 0:n.classificationMethod,colorRamp:null==n?void 0:n.colorRamp});let m=(null==n?void 0:n.field)||"value";const c=[],d=[],b=1e3,h=t(r),v=h&&r.fields.find((e=>"count"===e.name.toLowerCase())),y=h&&r.fields.find((e=>e.name.toLowerCase()===m.toLowerCase()));if(y){m=y.name;const e=r.features.length;let t=0;r.features.forEach((n=>t+=(v?n.attributes[v.name]:50)/e)),r.features.forEach((n=>{const r=n.attributes[y.name],l=v?n.attributes[v.name]:50;if(l>0){d.push(l);const n=Math.max(1,Math.round(l/e/t*b));for(let e=0;e<n;e++)c.push(r)}}))}else{const{pixelType:t}=e,n=(l.max-l.min)/l.size,a=t.indexOf("s")>-1||t.indexOf("u")>-1,o=a&&1===n?Math.floor(l.min+.5):l.min,s=a&&1===n?Math.floor(l.max-.5):l.max,i=l.size;let u,m=0;l.counts.forEach((e=>m+=e/i)),l.counts.forEach(((e,t)=>{if(e>0){d.push(e);const a=Math.max(1,Math.round(e/i/m*b));u=h?r.features[t].attributes[y.name]:0===t?o:t===i-1?s:l.min+n*(t+.5);for(let e=0;e<a;e++)c.push(u)}}))}const C=(null==n?void 0:n.classificationMethod)||"natural-breaks";let w=null==n?void 0:n.definedInterval;"defined-interval"!==C||w||(w=_(e,y,a));const M=p({values:c,valueFrequency:d,normalizationTotal:null,definition:new f({classificationMethod:C,breakCount:a,definedInterval:w})});let R=null==n?void 0:n.colors;if(!R){const e=(null==n?void 0:n.colorRamp)||x;i.colorRamp=e;const t=u(e,M.classBreaks.length,!0);R=t.map((e=>e.slice(1)))}const T=M.classBreaks.map(((e,t)=>new s({minValue:e.minValue,maxValue:e.maxValue,label:e.label,symbol:{type:"simple-fill",color:R[t]}})));return new g({field:m,classBreakInfos:T,authoringInfo:i})}function _(e,n,r){let l=0,a=0;if(t(e.attributeTable)){const t=e.attributeTable;l=a=t.features[0].attributes[n.name],t.features.forEach((e=>{const t=e.attributes[n.name];t<l&&(l=t),t>a&&(a=t)}))}else if(t(e.histograms)){const t=e.histograms;l=t[0].min,a=t[0].max}return(a-l)/r}function G(e){var t,n,r;return["u8","s8"].indexOf(e.pixelType)>-1&&null!=(null==(t=e.statistics)||null==(n=t[0])?void 0:n.min)&&null!=(null==(r=e.statistics[0])?void 0:r.max)&&1===e.bandCount}function H(t){const n=[];for(let r=0;r<t.length-1;r++)n[r]=new c({algorithm:"hsv",fromColor:t[r],toColor:t[r+1]||new e({r:255,g:255,b:255,a:1})});if(t.length>2){return new d({colorRamps:n})}return n[0]}function K(e){const{dataType:t}=e;return"vector-uv"===t||"vector-magdir"===t}function Q(e){const{dataType:t}=e;return"vector-uv"===t||"vector-magdir"===t}const X=new Map([["m/s","meter-per-second"],["km/h","kilometer-per-hour"],["knots","knots"],["ft/s","feet-per-second"],["mph","mile-per-hour"]]);function Y(e){if(!K(e))return null;let n;if(t(e.statistics)&&e.statistics.length){const t="vector-uv"===e.dataType,{min:r,max:l}=e.statistics[0];n=[{type:"size",field:"Magnitude",minSize:10,maxSize:40,minDataValue:t?Math.min(Math.abs(r),Math.abs(l)):r,maxDataValue:t?Math.max(Math.abs(r),Math.abs(l)):l}]}const r=t(e.multidimensionalInfo)?X.get(e.multidimensionalInfo.variables[0].unit):null,l=new C({visualVariables:n,inputUnit:r,rotationType:"geographic"});return l.visualVariables=[...l.sizeVariables,...l.rotationVariables],l}function Z(e){var t;return{color:null==(t=e.symbolLayers[0].material)?void 0:t.color,type:"esriSFS",style:"esriSFSSolid"}}function $(e){if("uniqueValue"===e.type){var t;const n=e.uniqueValueInfos,r=n[0].symbol;return null!=r&&null!=(t=r.symbolLayers)&&t.length&&(e.uniqueValueInfos=n.map((e=>({value:e.value,label:e.label,symbol:e.symbol?Z(e.symbol):null})))),e}if("classBreaks"===e.type){var n;const t=e.classBreakInfos,r=t[0].symbol;return null!=r&&null!=(n=r.symbolLayers)&&n.length&&(e.classBreakInfos=t.map((e=>({classMinValue:e.classMinValue,classMaxValue:e.classMaxValue,label:e.label,symbol:e.symbol?Z(e.symbol):null})))),e}return e}export{J as createClassBreaksRenderer,H as createColorRamp,W as createColormapRenderer,T as createDefaultRenderer,A as createShadedReliefRenderer,V as createStretchRenderer,O as createUVRenderer,Y as createVectorFieldRenderer,L as getBandNames,q as getClassField,S as getDefaultBandCombination,k as getDefaultInterpolation,_ as getDefinedInterval,P as getField,j as getSupportedRendererTypes,B as getWellKnownBandIndexes,Q as isAnimatedFlowRendererSupported,D as isClassBreaksSupported,F as isColormapRendererSupported,U as isShadedReliefRendererSupported,G as isSingleBand8BitRasterWithStats,z as isUVRendererSupported,K as isVectorFieldRendererSupported,$ as normalizeRendererJSON};
5
+ import e from"../../Color.js";import"../../rasterRenderers.js";import{isSome as t,unwrap as n}from"../../core/maybe.js";import{getMetersPerUnitForSR as r}from"../../core/unitUtils.js";import a from"../../layers/support/Field.js";import l from"../../layers/support/RasterInfo.js";import o from"../FlowRenderer.js";import i from"./AuthoringInfo.js";import s from"./ClassBreakInfo.js";import{PREDEFINED_JSON_COLOR_RAMPS as u,convertColorRampToColormap as m}from"./colorRampUtils.js";import c from"./UniqueValueInfo.js";import f from"../../rest/support/AlgorithmicColorRamp.js";import d from"../../rest/support/ClassBreaksDefinition.js";import{createGenerateRendererClassBreaks as p}from"../../rest/support/generateRendererUtils.js";import b from"../../rest/support/MultipartColorRamp.js";import h from"../RasterStretchRenderer.js";import v from"../UniqueValueRenderer.js";import g from"../RasterColormapRenderer.js";import y from"../RasterShadedReliefRenderer.js";import C from"../ClassBreaksRenderer.js";import w from"../VectorFieldRenderer.js";const x=.25,M=b.fromJSON({type:"multipart",colorRamps:[{fromColor:[0,0,255],toColor:[0,255,255]},{fromColor:[0,255,255],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,0,0]}]}),T=b.fromJSON(u[0]),R=new Set(["scientific","standard-time","vector-uv","vector-magdir","vector-u","vector-v","vector-magnitude","vector-direction"]);function j(e,n){const{attributeTable:r,colormap:a}=e;if(Q(e)){const n=Z(e);if(t(n))return n}if(t(a)){const n=U(e);if(t(n))return n}if(t(r)){const n=q(e);if(t(n))return n}return I(e,n)}function k(e){const t=["raster-stretch"];return W(e)&&t.push("raster-colormap"),z(e)&&t.push("unique-value"),J(e)&&t.push("class-breaks"),A(e)&&t.push("raster-shaded-relief"),Q(e)&&t.push("vector-field"),X(e)&&t.push("flow"),t}function V(e,t,n){const r=["nearest","bilinear","cubic","majority"].find((e=>e===(null==n?void 0:n.toLowerCase())));if("Map"===t)return null!=r?r:"bilinear";if("standard-time"===e.dataType)return null!=r?r:"nearest";return"thematic"===e.dataType||e.attributeTable||e.colormap?"nearest"===r||"majority"===r?r:"nearest":null!=r?r:"bilinear"}function I(e,r){var a,l,o,i;e=S(e,null==r?void 0:r.variableName);const{bandCount:s}=e;let{bandIds:u,stretchType:m}=r||{};null!=(a=u)&&a.some((e=>e>=s))&&(u=null);let c=n(e.statistics),f=n(e.histograms);var d;s>1?(u=null!=(d=u)&&d.length?u:L(e),c=null==c?null:u.map((e=>c[e])),f=null==f?null:u.map((e=>f[e]))):u=[0];null==m&&(m=O(e));let p=!1;switch(m){case"none":p=!1;break;case"percent-clip":p=!(null!=(l=f)&&l.length);break;default:p=!(null!=(o=c)&&o.length)}const{dataType:b}=e,v=1===(null==(i=u)?void 0:i.length)&&R.has(b)?M:null,g=new h({stretchType:m,dynamicRangeAdjustment:p,colorRamp:v,outputMin:0,outputMax:255,gamma:1===u.length?[1]:[1,1,1],useGamma:!1});return"percent-clip"===m?g.maxPercent=g.minPercent=x:"standard-deviation"===m&&(g.numberOfStandardDeviations=2),!p&&(t(e.multidimensionalInfo)||null!=r&&r.includeStatisticsInStretch)&&("percent-clip"===m?g.histograms=f:"min-max"!==m&&"standard-deviation"!==m||(g.statistics=c)),g}function S(e,r){if(null==r)return e;let a=n(e.statistics),o=n(e.histograms);const{multidimensionalInfo:i}=e;if(r&&t(i)){const{statistics:e,histograms:t}=i.variables.find((e=>e.name===r));null!=e&&e.length&&(a=e),null!=t&&t.length&&(o=t)}return l.fromJSON({...e.toJSON(),statistics:a,histograms:o})}function L(e){const t=e.bandCount;if(1===t)return null;if(2===t)return[0];const n=e.keyProperties&&e.keyProperties.BandProperties;let r;if(n&&n.length===t){const{red:e,green:t,blue:a,nir:l}=E(n);null!=e&&null!=t&&null!=a?r=[e,t,a]:null!=l&&null!=e&&null!=t&&(r=[l,e,t])}return!r&&t>=3&&(r=[0,1,2]),r}function B(e,t){var n;const r=e.keyProperties&&e.keyProperties.BandProperties;return(t=null!=(n=t)&&n.length?t:Array.from(Array(e.bandCount).keys())).map((t=>r&&r.length===e.bandCount&&r[t]&&r[t].BandName||"band_"+(t+1)))}function E(e){const t={};for(let r=0;r<e.length;r++){var n;const a=e[r],l=null==(n=a.BandName)?void 0:n.toLowerCase();if("red"===l)t.red=r;else if("green"===l)t.green=r;else if("blue"===l)t.blue=r;else if("nearinfrared"===l||"nearinfrared_1"===l||"nir"===l)t.nir=r;else if(a.WavelengthMax&&a.WavelengthMin){const e=a.WavelengthMin,n=a.WavelengthMax;null==t.blue&&e>=410&&e<=480&&n>=480&&n<=540?t.blue=r:null==t.green&&e>=490&&e<=560&&n>=560&&n<=610?t.green=r:null==t.red&&e>=595&&e<=670&&n>=660&&n<=730?t.red=r:null==t.nir&&e>=700&&e<=860&&n>=800&&n<=950&&(t.nir=r)}}return t}function O(e){let n="percent-clip";const{pixelType:r,dataType:a,histograms:l,statistics:o}=e;return"u8"!==r||"processed"!==a&&t(l)&&t(o)?"u8"===r||"elevation"===a||R.has(a)?n="min-max":t(l)?n="percent-clip":t(o)&&(n="min-max",n="min-max"):n="none",n}function q(n,r,a,l){if(!z(n,r))return null;const{attributeTable:o,statistics:s}=n,u=F(o,r),f=P(o,"red"),d=P(o,"green"),p=P(o,"blue"),b=new i,h=[],g=new Set,y=!!(f&&d&&p);if(t(o))o.features.forEach((t=>{const n=t.attributes[u.name];if(!g.has(t.attributes[u.name])&&null!=n){g.add(n);const r=y&&("single"===f.type||"double"===f.type)&&("single"===d.type||"double"===d.type)&&("single"===p.type||"double"===p.type)&&!o.features.some((e=>e.attributes[f.name]>1||e.attributes[d.name]>1||e.attributes[p.name]>1)),a=r?255:1;h.push(new c({value:t.attributes[u.name],label:t.attributes[u.name]+"",symbol:{type:"simple-fill",style:"solid",outline:null,color:new e(y?[t.attributes[f.name]*a,t.attributes[d.name]*a,t.attributes[p.name]*a,1]:[0,0,0,0])}}))}}));else if(null!=s&&s[0])for(let t=s[0].min;t<=s[0].max;t++)h.push(new c({value:t,label:t.toString(),symbol:{type:"simple-fill",style:"solid",outline:null,color:new e([0,0,0,0])}}));if(h.sort(((e,t)=>e.value&&"string"==typeof e.value.valueOf()?0:e.value>t.value?1:-1)),!y){const t=m(T,h.length);h.forEach(((n,r)=>n.symbol.color=new e(t[r].slice(1,4)))),b.colorRamp=T}if(a||l){const t=a||m(l,h.length).map((e=>e.slice(1)));h.forEach(((n,r)=>n.symbol.color=new e(t[r]))),b.colorRamp=l}return new v({field:u.name,uniqueValueInfos:h,authoringInfo:b})}function F(e,n,r){let l;return t(e)?(l=n?e.fields.find((e=>n.toLowerCase()===e.name.toLowerCase())):N(e.fields),l||(r||(l=e.fields.find((e=>"string"===e.type))),l||(l=P(e,"value")))):l=new a({name:"value"}),l}function N(e){let t;for(let n=0;n<e.length;n++){const r=e[n].name.toLowerCase();if("string"===e[n].type){if(r.startsWith("class")){t=e[n];break}null==t&&(r.endsWith("name")||r.endsWith("type"))&&(t=e[n])}}return t}function P(e,n){return t(e)?e.fields.find((e=>e.name.toLowerCase()===n)):null}function z(e,n){const{attributeTable:r,bandCount:a}=e;if(!t(r)&&H(e))return!0;if(!t(r)||a>1)return!1;if(n){if(null==r.fields.find((e=>e.name.toLowerCase()===n.toLowerCase())))return!1}return!0}function W(e){const{bandCount:n,colormap:r}=e;return t(r)&&r.length&&1===n}function U(e){if(!W(e))return null;let r;const{attributeTable:a,colormap:l}=e;if(t(a)){const e=P(a,"value"),t=F(a,null,!0);"string"===t.type&&(r={},a.features.forEach((n=>{const a=n.attributes;r[a[e.name]]=t?a[t.name]:a[e.name]})))}return g.createFromColormap(n(l),r)}function A(e){return"elevation"===e.dataType}function D(e,t){var n;if(!A(e))return null;const{extent:a}=e,l=a.width*r(a.spatialReference);return t=null!=(n=t)?n:"multi-directional",new y({hillshadeType:t,scalingType:l>5e6?"adjusted":"none"})}function J(e){const{attributeTable:n,bandCount:r}=e;return 1===r&&(t(n)||t(e.histograms))}function _(e,n){e=S(e,null==n?void 0:n.variableName);const{attributeTable:r}=e;if(!J(e))return null;const a=t(e.histograms)?e.histograms[0]:null,l=isFinite(null==n?void 0:n.numClasses)?n.numClasses:5,o=new i({classificationMethod:null==n?void 0:n.classificationMethod,colorRamp:null==n?void 0:n.colorRamp});let u=(null==n?void 0:n.field)||"value";const c=[],f=[],b=1e3,h=t(r),v=h&&r.fields.find((e=>"count"===e.name.toLowerCase())),g=h&&r.fields.find((e=>e.name.toLowerCase()===u.toLowerCase()));if(g){u=g.name;const e=r.features.length;let t=0;r.features.forEach((n=>t+=(v?n.attributes[v.name]:50)/e)),r.features.forEach((n=>{const r=n.attributes[g.name],a=v?n.attributes[v.name]:50;if(a>0){f.push(a);const n=Math.max(1,Math.round(a/e/t*b));for(let e=0;e<n;e++)c.push(r)}}))}else{const{pixelType:t}=e,n=(a.max-a.min)/a.size,l=t.indexOf("s")>-1||t.indexOf("u")>-1,o=l&&1===n?Math.floor(a.min+.5):a.min,i=l&&1===n?Math.floor(a.max-.5):a.max,s=a.size;let u,m=0;a.counts.forEach((e=>m+=e/s)),a.counts.forEach(((e,t)=>{if(e>0){f.push(e);const l=Math.max(1,Math.round(e/s/m*b));u=h?r.features[t].attributes[g.name]:0===t?o:t===s-1?i:a.min+n*(t+.5);for(let e=0;e<l;e++)c.push(u)}}))}const y=(null==n?void 0:n.classificationMethod)||"natural-breaks";let w=null==n?void 0:n.definedInterval;"defined-interval"!==y||w||(w=G(e,g,l));const x=p({values:c,valueFrequency:f,normalizationTotal:null,definition:new d({classificationMethod:y,breakCount:l,definedInterval:w})});let T=null==n?void 0:n.colors;if(!T){const e=(null==n?void 0:n.colorRamp)||M;o.colorRamp=e;const t=m(e,x.classBreaks.length,!0);T=t.map((e=>e.slice(1)))}const R=x.classBreaks.map(((e,t)=>new s({minValue:e.minValue,maxValue:e.maxValue,label:e.label,symbol:{type:"simple-fill",color:T[t]}})));return new C({field:u,classBreakInfos:R,authoringInfo:o})}function G(e,n,r){let a=0,l=0;if(t(e.attributeTable)){const t=e.attributeTable;a=l=t.features[0].attributes[n.name],t.features.forEach((e=>{const t=e.attributes[n.name];t<a&&(a=t),t>l&&(l=t)}))}else if(t(e.histograms)){const t=e.histograms;a=t[0].min,l=t[0].max}return(l-a)/r}function H(e){var t,n,r;return["u8","s8"].indexOf(e.pixelType)>-1&&null!=(null==(t=e.statistics)||null==(n=t[0])?void 0:n.min)&&null!=(null==(r=e.statistics[0])?void 0:r.max)&&1===e.bandCount}function K(t){const n=[];for(let r=0;r<t.length-1;r++)n[r]=new f({algorithm:"hsv",fromColor:t[r],toColor:t[r+1]||new e({r:255,g:255,b:255,a:1})});if(t.length>2){return new b({colorRamps:n})}return n[0]}function Q(e){const{dataType:t}=e;return"vector-uv"===t||"vector-magdir"===t}function X(e){const{dataType:t}=e;return"vector-uv"===t||"vector-magdir"===t}const Y=new Map([["m/s","meter-per-second"],["km/h","kilometer-per-hour"],["knots","knots"],["ft/s","feet-per-second"],["mph","mile-per-hour"]]);function Z(e){if(!Q(e))return null;let n;if(t(e.statistics)&&e.statistics.length&&("vector-magdir"===e.dataType||"vector-uv"===e.dataType)){const{minMagnitude:t,maxMagnitude:r}=ne(e.dataType,e.statistics);n=[{type:"size",field:"Magnitude",minSize:10,maxSize:40,minDataValue:t,maxDataValue:r}]}const r=t(e.multidimensionalInfo)?Y.get(e.multidimensionalInfo.variables[0].unit):null,a=new w({visualVariables:n,inputUnit:r,rotationType:"geographic"});return a.visualVariables=[...a.sizeVariables,...a.rotationVariables],a}function $(e){var t;return{color:null==(t=e.symbolLayers[0].material)?void 0:t.color,type:"esriSFS",style:"esriSFSSolid"}}function ee(e){if("uniqueValue"===e.type){var t;const n=e.uniqueValueInfos,r=n[0].symbol;return null!=r&&null!=(t=r.symbolLayers)&&t.length&&(e.uniqueValueInfos=n.map((e=>({value:e.value,label:e.label,symbol:e.symbol?$(e.symbol):null})))),e}if("classBreaks"===e.type){var n;const t=e.classBreakInfos,r=t[0].symbol;return null!=r&&null!=(n=r.symbolLayers)&&n.length&&(e.classBreakInfos=t.map((e=>({classMinValue:e.classMinValue,classMaxValue:e.classMaxValue,label:e.label,symbol:e.symbol?$(e.symbol):null})))),e}return e}function te(e){if(!X(e))return null;let n;if(t(e.statistics)&&e.statistics.length>0&&("vector-magdir"===e.dataType||"vector-uv"===e.dataType)){const{minMagnitude:t,maxMagnitude:r}=ne(e.dataType,e.statistics);n=[{type:"color",field:"Magnitude",stops:[{value:t,color:"#1020C0"},{value:r,color:"#C02010"}]}]}return new o({visualVariables:n})}function ne(e,t){let n,r;if("vector-magdir"===e)n=t[0].min,r=t[0].max;else{const e=t[0].min,a=t[0].max,l=t[1].min,o=t[1].max;n=0,r=Math.max(Math.abs(e),Math.abs(l),Math.abs(a),Math.abs(o))}return{minMagnitude:n,maxMagnitude:r}}export{_ as createClassBreaksRenderer,K as createColorRamp,U as createColormapRenderer,j as createDefaultRenderer,te as createFlowRenderer,D as createShadedReliefRenderer,I as createStretchRenderer,q as createUVRenderer,Z as createVectorFieldRenderer,B as getBandNames,F as getClassField,L as getDefaultBandCombination,V as getDefaultInterpolation,G as getDefinedInterval,P as getField,k as getSupportedRendererTypes,E as getWellKnownBandIndexes,J as isClassBreaksSupported,W as isColormapRendererSupported,X as isFlowRendererSupported,A as isShadedReliefRendererSupported,H as isSingleBand8BitRasterWithStats,z as isUVRendererSupported,Q as isVectorFieldRendererSupported,ee as normalizeRendererJSON};
@@ -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};
@@ -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 r from"../../core/Accessor.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import{ensureType as t}from"../../core/accessorSupport/ensureType.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";import p from"../../geometry/Extent.js";import c from"../../geometry/SpatialReference.js";let i=class extends r{constructor(){super(...arguments),this.outSpatialReference=null,this.processExtent=null,this.processSpatialReference=null,this.returnFeatureCollection=!1,this.returnM=!1,this.returnZ=!1}};e([o({type:c})],i.prototype,"outSpatialReference",void 0),e([o({type:p})],i.prototype,"processExtent",void 0),e([o({type:c})],i.prototype,"processSpatialReference",void 0),e([o({nonNullable:!0})],i.prototype,"returnFeatureCollection",void 0),e([o({nonNullable:!0})],i.prototype,"returnM",void 0),e([o({nonNullable:!0})],i.prototype,"returnZ",void 0),i=e([s("esri/rest/geoprocessor/GPOptions")],i),i.from=t(i);const n=i;export{n as default};
5
+ import{_ as e}from"../../chunks/tslib.es6.js";import r from"../../core/Accessor.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import{ensureType as t}from"../../core/accessorSupport/ensureType.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";import p from"../../geometry/Extent.js";import c from"../../geometry/SpatialReference.js";let i=class extends r{constructor(){super(...arguments),this.outSpatialReference=null,this.processExtent=null,this.processSpatialReference=null,this.returnFeatureCollection=!1,this.returnM=!1,this.returnZ=!1}};e([o({type:c})],i.prototype,"outSpatialReference",void 0),e([o({type:p})],i.prototype,"processExtent",void 0),e([o({type:c})],i.prototype,"processSpatialReference",void 0),e([o({nonNullable:!0})],i.prototype,"returnFeatureCollection",void 0),e([o({nonNullable:!0})],i.prototype,"returnM",void 0),e([o({nonNullable:!0})],i.prototype,"returnZ",void 0),i=e([s("esri.rest.geoprocessor.GPOptions")],i),i.from=t(i);const n=i;export{n as default};
package/rest/print.js CHANGED
@@ -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"../config.js";import{id as t}from"../kernel.js";import i from"../request.js";import r from"../core/Error.js";import{JSONMap as a}from"../core/jsonMap.js";import{isSome as n}from"../core/maybe.js";import{createScreenPoint as l,pt2px as s,px2pt as o}from"../core/screenUtils.js";import{normalize as u,dataComponents as c}from"../core/urlUtils.js";import y from"../geometry/Polygon.js";import{collectLabelingFields as f}from"../layers/support/fieldUtils.js";import{getSizeRangeAtScale as m}from"../renderers/visualVariables/support/visualVariableUtils.js";import{execute as d}from"./geoprocessor/execute.js";import{submitJob as p}from"./geoprocessor/submitJob.js";import{toJSON as g}from"./support/fileFormat.js";import{toJSON as b}from"./support/layoutTemplate.js";import{getVisibleLayerViews as h,isGroupLayer as w,isScreenshotRequired as S,isBingMapsLayer as x,isCSVLayer as v,isFeatureLayer as D,isGeoJSONLayer as I,isGraphicsLayer as L,isImageryLayer as T,isImageryTileLayer as E,isKMLLayer as M,isMapImageLayer as V,isMapNotesLayer as O,isOpenStreetMapLayer as P,isStreamLayer as F,isTileLayer as N,isVectorTileLayer as R,isWebTileLayer as U,isWMSLayer as J,isWMTSLayer as j,isBlendLayer as A,applyVisualVariables as C,getContextBoundingBox as k,createPolygonLayer as z,createPolylineLayer as $,createPointLayer as K,createMultipointLayer as _}from"./support/printTaskUtils.js";import q from"./support/PrintTemplate.js";import{supportsApiKey as W}from"../support/apiKeyUtils.js";import{getFloorFilterClause as B}from"../views/support/floorFilterUtils.js";const G={Feet:"ft",Kilometers:"km",Meters:"m",Miles:"mi"},Q=new a({esriFeet:"Feet",esriKilometers:"Kilometers",esriMeters:"Meters",esriMiles:"Miles"}),H=new a({esriExecutionTypeSynchronous:"sync",esriExecutionTypeAsynchronous:"async"}),X=new Map;async function Y(e,t,r){const a=ie(e);let n=X.get(a);return Promise.resolve().then((()=>n?{data:n.gpMetadata}:(n={gpServerUrl:a,is11xService:!1,legendLayerNameMap:{},legendLayers:[]},i(a,{query:{f:"json"}})))).then((e=>(n.gpMetadata=e.data,n.cimVersion=n.gpMetadata.cimVersion,n.is11xService=!!n.cimVersion,X.set(a,n),ee(t,n)))).then((i=>{const a=Me(n);let l;const s=e=>"sync"===a?e.results&&e.results[0]&&e.results[0].value:l.fetchResultData("Output_File",null,r).then((e=>e.value));return"async"===a?p(e,i,null,r).then((e=>(l=e,e.waitForJobCompletion({interval:t.updateDelay}).then(s)))):d(e,i,null,r).then(s)}))}async function Z(e){const t=ie(e);return Me(X.get(t))}async function ee(e,t){t=t||{is11xService:!1,legendLayerNameMap:{},legendLayers:[]};const i=e.template||new q;null==i.showLabels&&(i.showLabels=!0);const a=i.exportOptions;let n;const l=b(i.layout);if(a){if(n={dpi:a.dpi},"map_only"===l.toLowerCase()||""===l){const e=a.width,t=a.height;n.outputSize=[e,t]}}const s=i.layoutOptions;let o;if(s){let e,t;"Miles"===s.scalebarUnit||"Kilometers"===s.scalebarUnit?(e="Kilometers",t="Miles"):"Meters"!==s.scalebarUnit&&"Feet"!==s.scalebarUnit||(e="Meters",t="Feet"),o={titleText:s.titleText,authorText:s.authorText,copyrightText:s.copyrightText,customTextElements:s.customTextElements,scaleBarOptions:{metricUnit:Q.toJSON(e),metricLabel:G[e],nonMetricUnit:Q.toJSON(t),nonMetricLabel:G[t]}}}let u=null;null!=s&&s.legendLayers&&(u=s.legendLayers.map((e=>{t.legendLayerNameMap[e.layerId]=e.title;const i={id:e.layerId};return e.subLayerIds&&(i.subLayerIds=e.subLayerIds),i})));const c=await te(e,i,t);if(c.operationalLayers){const e=new RegExp("[\\u4E00-\\u9FFF\\u0E00-\\u0E7F\\u0900-\\u097F\\u3040-\\u309F\\u30A0-\\u30FF\\u31F0-\\u31FF]"),i=/[\u0600-\u06FF]/,a=t=>{const r=t.text,a=t.font,n=a&&a.family&&a.family.toLowerCase();r&&a&&("arial"===n||"arial unicode ms"===n)&&(a.family=e.test(r)?"Arial Unicode MS":"Arial","normal"!==a.style&&i.test(r)&&(a.family="Arial Unicode MS"))},n=()=>{throw new r("print:cim-symbol-unsupported","CIMSymbol is not supported by a print service published from ArcMap")};c.operationalLayers.forEach((e=>{var i,r,l;null!=(i=e.featureCollection)&&i.layers?e.featureCollection.layers.forEach((e=>{var i,r,l,s;if(null!=(i=e.layerDefinition)&&null!=(r=i.drawingInfo)&&null!=(l=r.renderer)&&l.symbol){const i=e.layerDefinition.drawingInfo.renderer;"esriTS"===i.symbol.type?a(i.symbol):"CIMSymbolReference"!==i.symbol.type||t.is11xService||n()}null!=(s=e.featureSet)&&s.features&&e.featureSet.features.forEach((e=>{e.symbol&&("esriTS"===e.symbol.type?a(e.symbol):"CIMSymbolReference"!==e.symbol.type||t.is11xService||n())}))})):!t.is11xService&&null!=(r=e.layerDefinition)&&null!=(l=r.drawingInfo)&&l.renderer&&JSON.stringify(e.layerDefinition.drawingInfo.renderer).includes('"type":"CIMSymbolReference"')&&n()}))}e.outSpatialReference&&(c.mapOptions.spatialReference=e.outSpatialReference.toJSON()),Object.assign(c,{exportOptions:n,layoutOptions:o||{}}),Object.assign(c.layoutOptions,{legendOptions:{operationalLayers:null!=u?u:t.legendLayers.slice()}}),t.legendLayers.length=0,X.set(t.gpServerUrl,t);const y={Web_Map_as_JSON:JSON.stringify(c),Format:g(i.format),Layout_Template:l};return e.extraParameters&&Object.assign(y,e.extraParameters),y}async function te(e,t,i){const r=e.view;let a=r.spatialReference;const l={operationalLayers:await re(r,t,i)};let s=i.ssExtent||e.extent||r.extent;if(a&&a.isWrappable&&(s=s.clone()._normalize(!0),a=s.spatialReference),l.mapOptions={extent:s&&s.toJSON(),spatialReference:a&&a.toJSON(),showAttribution:t.attributionVisible},i.ssExtent=null,r.background&&(l.background=r.background.toJSON()),r.rotation&&(l.mapOptions.rotation=-r.rotation),t.scalePreserved&&(l.mapOptions.scale=t.outScale||r.scale),n(r.timeExtent)){const e=n(r.timeExtent.start)?r.timeExtent.start.getTime():null,t=n(r.timeExtent.end)?r.timeExtent.end.getTime():null;l.mapOptions.time=[e,t]}return l}function ie(e){let t=e;const i=t.lastIndexOf("/GPServer/");return i>0&&(t=t.slice(0,i+9)),t}async function re(e,t,i){const r=[],a={layerView:null,printTemplate:t,view:e};let n=0;t.scalePreserved&&(n=t.outScale||e.scale);const l=h(e,n);for(const s of l){const e=s.layer;if(!e.loaded||w(e))continue;let t;a.layerView=s,t=S(s)?await ge(e,a,i):x(e)?ae(e):v(e)?await ne(e,a,i):D(e)?await se(e,a,i):I(e)?await oe(e,a,i):L(e)?await ue(e,a,i):T(e)?ce(e,i):E(e)?await ye(e,a,i):M(e)?await fe(e,a,i):V(e)?me(e,a,i):O(e)?await de(a,i):P(e)?pe():F(e)?await be(e,a,i):N(e)?he(e,i):R(e)?await we(e,a,i):U(e)?Se(e):J(e)?xe(e):j(e)?ve(e):await ge(e,a,i),t&&(Array.isArray(t)?r.push(...t):(t.id=e.id,t.title=i.legendLayerNameMap[e.id]||e.title,t.opacity=e.opacity,t.minScale=e.minScale||0,t.maxScale=e.maxScale||0,A(e)&&e.blendMode&&"normal"!==e.blendMode&&(t.blendMode=e.blendMode),r.push(t)))}if(n&&r.forEach((e=>{e.minScale=0,e.maxScale=0})),e.graphics&&e.graphics.length){const a=await le(null,e.graphics,t,i);a&&r.push(a)}return r}function ae(e){return{culture:e.culture,key:e.key,type:"BingMaps"+("aerial"===e.style?"Aerial":"hybrid"===e.style?"Hybrid":"Road")}}async function ne(e,t,i){e.legendEnabled&&i.legendLayers.push({id:e.id});const r=t.layerView,a=t.printTemplate;let n;if(!i.is11xService||r.filter){return le(e,await Ee(r),a,i)}return n={type:"CSV"},e.write(n,{origin:"web-map"}),delete n.popupInfo,delete n.layerType,n.showLabels=a.showLabels&&e.labelsVisible,n}async function le(e,t,i,r){let a;const n=z(),l=$(),s=K(),o=_(),u=K();if(u.layerDefinition.name="textLayer",delete u.layerDefinition.drawingInfo,e){if("esri.layers.FeatureLayer"===e.declaredClass||"esri.layers.StreamLayer"===e.declaredClass?n.layerDefinition.name=l.layerDefinition.name=s.layerDefinition.name=o.layerDefinition.name=r.legendLayerNameMap[e.id]||e.get("arcgisProps.title")||e.title:"esri.layers.GraphicsLayer"===e.declaredClass&&(t=e.graphics.items),e.renderer){const t=e.renderer.toJSON();n.layerDefinition.drawingInfo.renderer=t,l.layerDefinition.drawingInfo.renderer=t,s.layerDefinition.drawingInfo.renderer=t,o.layerDefinition.drawingInfo.renderer=t}if(i.showLabels&&e.labelsVisible&&"function"==typeof e.write){var c,m;const t=null==(c=e.write({},{origin:"web-map"}).layerDefinition)||null==(m=c.drawingInfo)?void 0:m.labelingInfo;t&&(a=!0,n.layerDefinition.drawingInfo.labelingInfo=t,l.layerDefinition.drawingInfo.labelingInfo=t,s.layerDefinition.drawingInfo.labelingInfo=t,o.layerDefinition.drawingInfo.labelingInfo=t)}}let d;null!=e&&e.renderer||a||(delete n.layerDefinition.drawingInfo,delete l.layerDefinition.drawingInfo,delete s.layerDefinition.drawingInfo,delete o.layerDefinition.drawingInfo);const p=null==e?void 0:e.fieldsIndex,g=null==e?void 0:e.renderer;if(p){const t=new Set;a&&await f(t,e),g&&"function"==typeof g.collectRequiredFields&&await g.collectRequiredFields(t,p),d=Array.from(t);const i=p.fields.map((e=>e.toJSON()));n.layerDefinition.fields=i,l.layerDefinition.fields=i,s.layerDefinition.fields=i,o.layerDefinition.fields=i}const b=t&&t.length;let h;for(let f=0;f<b;f++){var w;const a=t[f]||t.getItemAt(f);if(!1===a.visible||!a.geometry)continue;if(h=a.toJSON(),h.hasOwnProperty("popupTemplate")&&delete h.popupTemplate,h.geometry&&h.geometry.z&&delete h.geometry.z,h.symbol&&h.symbol.outline&&"esriCLS"===h.symbol.outline.type&&!r.is11xService)continue;!r.is11xService&&h.symbol&&h.symbol.outline&&h.symbol.outline.color&&h.symbol.outline.color[3]&&(h.symbol.outline.color[3]=255);const c=e&&e.renderer&&("valueExpression"in e.renderer&&e.renderer.valueExpression||"hasVisualVariables"in e.renderer&&e.renderer.hasVisualVariables());if(!h.symbol&&e&&e.renderer&&c&&!r.is11xService){const t=e.renderer,i=await t.getSymbolAsync(a);if(!i)continue;h.symbol=i.toJSON(),"hasVisualVariables"in t&&t.hasVisualVariables()&&C(h.symbol,{renderer:t,graphic:a,symbol:i})}if(h.symbol&&(h.symbol.angle||delete h.symbol.angle,Ve(h.symbol)?h.symbol=await Le(h.symbol,r):h.symbol.text&&delete h.attributes),(!i||!i.forceFeatureAttributes)&&null!=(w=d)&&w.length){const e={};d.forEach((t=>{h.attributes&&h.attributes.hasOwnProperty(t)&&(e[t]=h.attributes[t])})),h.attributes=e}"polygon"===a.geometry.type?n.featureSet.features.push(h):"polyline"===a.geometry.type?l.featureSet.features.push(h):"point"===a.geometry.type?h.symbol&&h.symbol.text?u.featureSet.features.push(h):s.featureSet.features.push(h):"multipoint"===a.geometry.type?o.featureSet.features.push(h):"extent"===a.geometry.type&&(h.geometry=y.fromExtent(a.geometry).toJSON(),n.featureSet.features.push(h))}const S=[n,l,o,s,u].filter((e=>e.featureSet.features.length>0));for(const y of S){const e=y.featureSet.features.every((e=>e.symbol));!e||i&&i.forceFeatureAttributes||y.featureSet.features.forEach((e=>{delete e.attributes})),e&&delete y.layerDefinition.drawingInfo,y.layerDefinition.drawingInfo&&y.layerDefinition.drawingInfo.renderer&&await Te(y.layerDefinition.drawingInfo.renderer,r)}return S.length?{featureCollection:{layers:S},showLabels:a}:null}async function se(e,t,i){var r,a;let n;const l=e.renderer,s=parseFloat(i.cimVersion);if(e.featureReduction&&(!i.is11xService||s<2.9)||"dot-density"===(null==l?void 0:l.type)&&(!i.is11xService||s<2.6))return ge(e,t,i);e.legendEnabled&&i.legendLayers.push({id:e.id});const o=t.layerView,{printTemplate:u,view:c}=t,y=l&&("valueExpression"in l&&l.valueExpression||"hasVisualVariables"in l&&l.hasVisualVariables()),f="feature-layer"!==(null==(r=e.source)?void 0:r.type)&&"ogc-feature"!==(null==(a=e.source)?void 0:a.type);if(!i.is11xService&&y||o.filter||f||!l||"field"in l&&null!=l.field&&("string"!=typeof l.field||!e.getField(l.field))){const t=await Ee(o);n=await le(e,t,u,i)}else{var d,p;if(n={id:(g=e.write()).id,title:g.title,opacity:g.opacity,minScale:g.minScale,maxScale:g.maxScale,url:g.url,layerType:g.layerType,customParameters:g.customParameters,layerDefinition:g.layerDefinition},n.showLabels=u.showLabels&&e.labelsVisible,De(n,e),null!=(d=n.layerDefinition)&&null!=(p=d.drawingInfo)&&p.renderer&&(delete n.layerDefinition.minScale,delete n.layerDefinition.maxScale,await Te(n.layerDefinition.drawingInfo.renderer,i),"visualVariables"in l&&l.visualVariables&&l.visualVariables[0])){const e=l.visualVariables[0];if("size"===e.type&&e.maxSize&&"number"!=typeof e.maxSize&&e.minSize&&"number"!=typeof e.minSize){const t=m(e,c.scale);n.layerDefinition.drawingInfo.renderer.visualVariables[0].minSize=t.minSize,n.layerDefinition.drawingInfo.renderer.visualVariables[0].maxSize=t.maxSize}}const t=B(o);t&&(n.layerDefinition||(n.layerDefinition={}),n.layerDefinition.definitionExpression=n.layerDefinition.definitionExpression?`(${n.layerDefinition.definitionExpression}) AND (${t})`:t)}var g;return n}async function oe(e,{layerView:t,printTemplate:i},r){e.legendEnabled&&r.legendLayers.push({id:e.id});return le(e,await Ee(t),i,r)}async function ue(e,{printTemplate:t},i){return le(e,null,t,i)}function ce(e,t){e.legendEnabled&&t.legendLayers.push({id:e.id});const i={layerType:(r=e.write()).layerType,customParameters:r.customParameters};var r;if(i.bandIds=e.bandIds,i.compressionQuality=e.compressionQuality,i.format=e.format,i.interpolation=e.interpolation,(e.mosaicRule||e.definitionExpression)&&(i.mosaicRule=e.exportImageServiceParameters.mosaicRule.toJSON()),e.renderingRule||e.renderer)if(t.is11xService)e.renderingRule&&(i.renderingRule=e.renderingRule.toJSON()),e.renderer&&(i.layerDefinition=i.layerDefinition||{},i.layerDefinition.drawingInfo=i.layerDefinition.drawingInfo||{},i.layerDefinition.drawingInfo.renderer=e.renderer.toJSON());else{const t=e.exportImageServiceParameters.combineRendererWithRenderingRule();t&&(i.renderingRule=t.toJSON())}return De(i,e),i}async function ye(e,t,i){var r;if("animated-flow"===(null==(r=e.renderer)?void 0:r.type))return ge(e,t,i);e.legendEnabled&&i.legendLayers.push({id:e.id});const a={bandIds:(n=e.write()||{}).bandIds,customParameters:n.customParameters,interpolation:n.interpolation,layerDefinition:n.layerDefinition};var n;return a.layerType="ArcGISImageServiceLayer",De(a,e),a}async function fe(e,t,i){const r=t.printTemplate;if(i.is11xService){const t={type:"kml"};return e.write(t,{origin:"web-map"}),delete t.layerType,t.url=u(e.url),t}{const a=[],n=t.layerView;n.allVisibleMapImages.forEach(((t,i)=>{const r={id:`${e.id}_image${i}`,type:"image",title:e.id,minScale:e.minScale||0,maxScale:e.maxScale||0,opacity:e.opacity,extent:t.extent};"data:image/png;base64,"===t.href.substr(0,22)?r.imageData=t.href.substr(22):r.url=t.href,a.push(r)}));const l=[...n.allVisiblePoints.items,...n.allVisiblePolylines.items,...n.allVisiblePolygons.items],s={id:e.id,...await le(null,l,r,i)};return a.push(s),a}}function me(e,{view:t},i){let r;const a={id:e.id,subLayerIds:[]};let n=[];const l=t.scale,s=e=>{const t=0===l,i=0===e.minScale||l<=e.minScale,r=0===e.maxScale||l>=e.maxScale;if(e.visible&&(t||i&&r))if(e.sublayers)e.sublayers.forEach(s);else{const t=e.toExportImageJSON(),i={id:e.id,name:e.title,layerDefinition:{drawingInfo:t.drawingInfo,definitionExpression:t.definitionExpression,source:t.source}};n.unshift(i),a.subLayerIds.push(e.id)}};var o;return e.sublayers&&e.sublayers.forEach(s),n.length&&(n=n.map((({id:e,name:t,layerDefinition:i})=>({id:e,name:t,layerDefinition:i}))),r={layerType:(o=e.write()).layerType,customParameters:o.customParameters},r.layers=n,r.visibleLayers=e.capabilities.exportMap.supportsDynamicLayers?void 0:a.subLayerIds,De(r,e),e.legendEnabled&&i.legendLayers.push(a)),r}async function de({layerView:e,printTemplate:t},i){const r=[],a=e.layer;if(n(a.featureCollections))for(const n of a.featureCollections){const e=await le(n,n.source,t,i);e&&r.push(...e.featureCollection.layers)}else if(n(a.sublayers))for(const n of a.sublayers){const e=await le(null,n.graphics,t,i);e&&r.push(...e.featureCollection.layers)}return{featureCollection:{layers:r}}}function pe(){return{type:"OpenStreetMap"}}async function ge(e,{printTemplate:t,view:i},r){const a={type:"image"},n={format:"png",ignoreBackground:!0,layers:[e],rotation:0},s=r.ssExtent||i.extent.clone();let o=96,u=!0,y=!0;if(t.exportOptions){const e=t.exportOptions;e.dpi>0&&(o=e.dpi),e.width>0&&(u=e.width%2==i.width%2),e.height>0&&(y=e.height%2==i.height%2)}if("map-only"===t.layout&&t.scalePreserved&&(!t.outScale||t.outScale===i.scale)&&96===o&&(!u||!y)&&(n.area={x:0,y:0,width:i.width,height:i.height},u||(n.area.width-=1),y||(n.area.height-=1),!r.ssExtent)){const e=i.toMap(l(n.area.width,n.area.height));s.ymin=e.y,s.xmax=e.x,r.ssExtent=s}a.extent=s.clone()._normalize(!0).toJSON();const f=await i.takeScreenshot(n),{data:m}=c(f.dataUrl);return a.imageData=m,a}async function be(e,{layerView:t,printTemplate:i},r){e.legendEnabled&&r.legendLayers.push({id:e.id});return le(e,await Ee(t),i,r)}function he(e,t){e.legendEnabled&&t.legendLayers.push({id:e.id});const i={layerType:(r=e.write()).layerType,customParameters:r.customParameters};var r;return De(i,e),i}async function we(e,t,i){if(i.is11xService&&e.serviceUrl&&e.styleUrl){const t=Ie(e.styleUrl,e.apiKey),r=Ie(e.serviceUrl,e.apiKey);if(!t&&!r||"2.1.0"!==i.cimVersion){const i={type:"VectorTileLayer"};return i.styleUrl=u(e.styleUrl),i.token=t,r!==t&&(i.additionalTokens=[{url:e.serviceUrl,token:r}]),i}}return ge(e,t,i)}function Se(e){const t={type:"WebTiledLayer",urlTemplate:e.urlTemplate.replace(/\${/g,"{"),credits:e.copyright};return e.subDomains&&e.subDomains.length>0&&(t.subDomains=e.subDomains),t}function xe(e){let t;const i=[],r=e=>{e.visible&&(e.sublayers?e.sublayers.forEach(r):e.name&&i.unshift(e.name))};return e.sublayers&&e.sublayers.forEach(r),i.length&&(t={type:"wms",customLayerParameters:e.customLayerParameters,customParameters:e.customParameters,transparentBackground:e.imageTransparency,visibleLayers:i,url:u(e.url),version:e.version}),t}function ve(e){const t=e.activeLayer;return{type:"wmts",customLayerParameters:e.customLayerParameters,customParameters:e.customParameters,format:t.imageFormat,layer:t.id,style:t.styleId,tileMatrixSet:t.tileMatrixSetId,url:u(e.url)}}function De(e,t){t.url&&(e.url=u(e.url||t.url),e.token=Ie(e.url,t.apiKey))}function Ie(i,r){var a,n;return W(i)&&(r||e.apiKey)?r||e.apiKey:null==(a=t)||null==(n=a.findCredential(i))?void 0:n.token}async function Le(e,t){t.canvas||(t.canvas=document.createElement("canvas"));const r=1024;t.canvas.width=r,t.canvas.height=r;const a=t.canvas.getContext("2d");let n,l;if(e.path){var u;const t=new Path2D(e.path);t.closePath(),a.fillStyle=Array.isArray(e.color)?`rgba(${e.color[0]},${e.color[1]},${e.color[2]},${e.color[3]/255})`:"rgb(0,0,0)",a.fill(t);const i=k(a);if(!i)return null;a.clearRect(0,0,r,r);const o=s(e.size)/Math.max(i.width,i.height);a.scale(o,o);const c=r/o,y=c/2-i.width/2-i.x,f=c/2-i.height/2-i.y;if(a.translate(y,f),Array.isArray(e.color)&&a.fill(t),null!=(u=e.outline)&&u.width&&Array.isArray(e.outline.color)){const r=e.outline;a.lineWidth=s(r.width)/o,a.lineJoin="round",a.strokeStyle=`rgba(${r.color[0]},${r.color[1]},${r.color[2]},${r.color[3]/255})`,a.stroke(t),i.width+=a.lineWidth,i.height+=a.lineWidth}i.width*=o,i.height*=o;const m=a.getImageData(r/2-i.width/2,r/2-i.height/2,Math.ceil(i.width),Math.ceil(i.height));n=m.width,l=m.height,a.canvas.width=n,a.canvas.height=l,a.putImageData(m,0,0)}else{const t="image/svg+xml"===e.contentType?"data:image/svg+xml;base64,"+e.imageData:e.url,r=(await i(t,{responseType:"image"})).data;n=s(e.width),l=s(e.height),a.canvas.width=n,a.canvas.height=l,a.drawImage(r,0,0,a.canvas.width,a.canvas.height)}return{type:"esriPMS",imageData:a.canvas.toDataURL("image/png").substr(22),angle:e.angle,contentType:"image/png",height:o(l),width:o(n),xoffset:e.xoffset,yoffset:e.yoffset}}async function Te(e,t){const i=e.type;if("simple"===i&&Ve(e.symbol))e.symbol=await Le(e.symbol,t);else if("uniqueValue"===i||"classBreaks"===i){Ve(e.defaultSymbol)&&(e.defaultSymbol=await Le(e.defaultSymbol,t));const r=e["uniqueValue"===i?"uniqueValueInfos":"classBreakInfos"];if(r)for(const e of r)Ve(e.symbol)&&(e.symbol=await Le(e.symbol,t))}}async function Ee(e){return e.queryFeatures(e.createQuery()).then((e=>e.features))}function Me(e){return e.gpMetadata&&e.gpMetadata.executionType?H.fromJSON(e.gpMetadata.executionType):"sync"}function Ve(e){return e&&(e.path||"image/svg+xml"===e.contentType||e.url&&e.url.endsWith(".svg"))}export{Y as execute,ee as getGpPrintParams,ie as getGpServerUrl,Z as getMode,X as printCacheMap};
5
+ import e from"../config.js";import{id as t}from"../kernel.js";import i from"../request.js";import r from"../core/Error.js";import{JSONMap as a}from"../core/jsonMap.js";import{isSome as n}from"../core/maybe.js";import{createScreenPoint as l,pt2px as s,px2pt as o}from"../core/screenUtils.js";import{normalize as u,dataComponents as c}from"../core/urlUtils.js";import y from"../geometry/Polygon.js";import{collectLabelingFields as f}from"../layers/support/fieldUtils.js";import{getSizeRangeAtScale as m}from"../renderers/visualVariables/support/visualVariableUtils.js";import{execute as d}from"./geoprocessor/execute.js";import{submitJob as p}from"./geoprocessor/submitJob.js";import{toJSON as g}from"./support/fileFormat.js";import{toJSON as b}from"./support/layoutTemplate.js";import{getVisibleLayerViews as h,isGroupLayer as w,isScreenshotRequired as S,isBingMapsLayer as x,isCSVLayer as v,isFeatureLayer as D,isGeoJSONLayer as I,isGraphicsLayer as L,isImageryLayer as T,isImageryTileLayer as E,isKMLLayer as M,isMapImageLayer as V,isMapNotesLayer as O,isOpenStreetMapLayer as P,isStreamLayer as F,isTileLayer as N,isVectorTileLayer as R,isWebTileLayer as U,isWMSLayer as J,isWMTSLayer as j,isBlendLayer as A,applyVisualVariables as C,getContextBoundingBox as k,createPolygonLayer as z,createPolylineLayer as $,createPointLayer as K,createMultipointLayer as _}from"./support/printTaskUtils.js";import q from"./support/PrintTemplate.js";import{supportsApiKey as W}from"../support/apiKeyUtils.js";import{getFloorFilterClause as B}from"../views/support/floorFilterUtils.js";const G={Feet:"ft",Kilometers:"km",Meters:"m",Miles:"mi"},Q=new a({esriFeet:"Feet",esriKilometers:"Kilometers",esriMeters:"Meters",esriMiles:"Miles"}),H=new a({esriExecutionTypeSynchronous:"sync",esriExecutionTypeAsynchronous:"async"}),X=new Map;async function Y(e,t,r){const a=ie(e);let n=X.get(a);return Promise.resolve().then((()=>n?{data:n.gpMetadata}:(n={gpServerUrl:a,is11xService:!1,legendLayerNameMap:{},legendLayers:[]},i(a,{query:{f:"json"}})))).then((e=>(n.gpMetadata=e.data,n.cimVersion=n.gpMetadata.cimVersion,n.is11xService=!!n.cimVersion,X.set(a,n),ee(t,n)))).then((i=>{const a=Me(n);let l;const s=e=>"sync"===a?e.results&&e.results[0]&&e.results[0].value:l.fetchResultData("Output_File",null,r).then((e=>e.value));return"async"===a?p(e,i,null,r).then((e=>(l=e,e.waitForJobCompletion({interval:t.updateDelay}).then(s)))):d(e,i,null,r).then(s)}))}async function Z(e){const t=ie(e);return Me(X.get(t))}async function ee(e,t){t=t||{is11xService:!1,legendLayerNameMap:{},legendLayers:[]};const i=e.template||new q;null==i.showLabels&&(i.showLabels=!0);const a=i.exportOptions;let n;const l=b(i.layout);if(a){if(n={dpi:a.dpi},"map_only"===l.toLowerCase()||""===l){const e=a.width,t=a.height;n.outputSize=[e,t]}}const s=i.layoutOptions;let o;if(s){let e,t;"Miles"===s.scalebarUnit||"Kilometers"===s.scalebarUnit?(e="Kilometers",t="Miles"):"Meters"!==s.scalebarUnit&&"Feet"!==s.scalebarUnit||(e="Meters",t="Feet"),o={titleText:s.titleText,authorText:s.authorText,copyrightText:s.copyrightText,customTextElements:s.customTextElements,scaleBarOptions:{metricUnit:Q.toJSON(e),metricLabel:G[e],nonMetricUnit:Q.toJSON(t),nonMetricLabel:G[t]}}}let u=null;null!=s&&s.legendLayers&&(u=s.legendLayers.map((e=>{t.legendLayerNameMap[e.layerId]=e.title;const i={id:e.layerId};return e.subLayerIds&&(i.subLayerIds=e.subLayerIds),i})));const c=await te(e,i,t);if(c.operationalLayers){const e=new RegExp("[\\u4E00-\\u9FFF\\u0E00-\\u0E7F\\u0900-\\u097F\\u3040-\\u309F\\u30A0-\\u30FF\\u31F0-\\u31FF]"),i=/[\u0600-\u06FF]/,a=t=>{const r=t.text,a=t.font,n=a&&a.family&&a.family.toLowerCase();r&&a&&("arial"===n||"arial unicode ms"===n)&&(a.family=e.test(r)?"Arial Unicode MS":"Arial","normal"!==a.style&&i.test(r)&&(a.family="Arial Unicode MS"))},n=()=>{throw new r("print:cim-symbol-unsupported","CIMSymbol is not supported by a print service published from ArcMap")};c.operationalLayers.forEach((e=>{var i,r,l;null!=(i=e.featureCollection)&&i.layers?e.featureCollection.layers.forEach((e=>{var i,r,l,s;if(null!=(i=e.layerDefinition)&&null!=(r=i.drawingInfo)&&null!=(l=r.renderer)&&l.symbol){const i=e.layerDefinition.drawingInfo.renderer;"esriTS"===i.symbol.type?a(i.symbol):"CIMSymbolReference"!==i.symbol.type||t.is11xService||n()}null!=(s=e.featureSet)&&s.features&&e.featureSet.features.forEach((e=>{e.symbol&&("esriTS"===e.symbol.type?a(e.symbol):"CIMSymbolReference"!==e.symbol.type||t.is11xService||n())}))})):!t.is11xService&&null!=(r=e.layerDefinition)&&null!=(l=r.drawingInfo)&&l.renderer&&JSON.stringify(e.layerDefinition.drawingInfo.renderer).includes('"type":"CIMSymbolReference"')&&n()}))}e.outSpatialReference&&(c.mapOptions.spatialReference=e.outSpatialReference.toJSON()),Object.assign(c,{exportOptions:n,layoutOptions:o||{}}),Object.assign(c.layoutOptions,{legendOptions:{operationalLayers:null!=u?u:t.legendLayers.slice()}}),t.legendLayers.length=0,X.set(t.gpServerUrl,t);const y={Web_Map_as_JSON:JSON.stringify(c),Format:g(i.format),Layout_Template:l};return e.extraParameters&&Object.assign(y,e.extraParameters),y}async function te(e,t,i){const r=e.view;let a=r.spatialReference;const l={operationalLayers:await re(r,t,i)};let s=i.ssExtent||e.extent||r.extent;if(a&&a.isWrappable&&(s=s.clone()._normalize(!0),a=s.spatialReference),l.mapOptions={extent:s&&s.toJSON(),spatialReference:a&&a.toJSON(),showAttribution:t.attributionVisible},i.ssExtent=null,r.background&&(l.background=r.background.toJSON()),r.rotation&&(l.mapOptions.rotation=-r.rotation),t.scalePreserved&&(l.mapOptions.scale=t.outScale||r.scale),n(r.timeExtent)){const e=n(r.timeExtent.start)?r.timeExtent.start.getTime():null,t=n(r.timeExtent.end)?r.timeExtent.end.getTime():null;l.mapOptions.time=[e,t]}return l}function ie(e){let t=e;const i=t.lastIndexOf("/GPServer/");return i>0&&(t=t.slice(0,i+9)),t}async function re(e,t,i){const r=[],a={layerView:null,printTemplate:t,view:e};let n=0;t.scalePreserved&&(n=t.outScale||e.scale);const l=h(e,n);for(const s of l){const e=s.layer;if(!e.loaded||w(e))continue;let t;a.layerView=s,t=S(s)?await ge(e,a,i):x(e)?ae(e):v(e)?await ne(e,a,i):D(e)?await se(e,a,i):I(e)?await oe(e,a,i):L(e)?await ue(e,a,i):T(e)?ce(e,i):E(e)?await ye(e,a,i):M(e)?await fe(e,a,i):V(e)?me(e,a,i):O(e)?await de(a,i):P(e)?pe():F(e)?await be(e,a,i):N(e)?he(e,i):R(e)?await we(e,a,i):U(e)?Se(e):J(e)?xe(e):j(e)?ve(e):await ge(e,a,i),t&&(Array.isArray(t)?r.push(...t):(t.id=e.id,t.title=i.legendLayerNameMap[e.id]||e.title,t.opacity=e.opacity,t.minScale=e.minScale||0,t.maxScale=e.maxScale||0,A(e)&&e.blendMode&&"normal"!==e.blendMode&&(t.blendMode=e.blendMode),r.push(t)))}if(n&&r.forEach((e=>{e.minScale=0,e.maxScale=0})),e.graphics&&e.graphics.length){const a=await le(null,e.graphics,t,i);a&&r.push(a)}return r}function ae(e){return{culture:e.culture,key:e.key,type:"BingMaps"+("aerial"===e.style?"Aerial":"hybrid"===e.style?"Hybrid":"Road")}}async function ne(e,t,i){e.legendEnabled&&i.legendLayers.push({id:e.id});const r=t.layerView,a=t.printTemplate;let n;if(!i.is11xService||r.filter){return le(e,await Ee(r),a,i)}return n={type:"CSV"},e.write(n,{origin:"web-map"}),delete n.popupInfo,delete n.layerType,n.showLabels=a.showLabels&&e.labelsVisible,n}async function le(e,t,i,r){let a;const n=z(),l=$(),s=K(),o=_(),u=K();if(u.layerDefinition.name="textLayer",delete u.layerDefinition.drawingInfo,e){if("esri.layers.FeatureLayer"===e.declaredClass||"esri.layers.StreamLayer"===e.declaredClass?n.layerDefinition.name=l.layerDefinition.name=s.layerDefinition.name=o.layerDefinition.name=r.legendLayerNameMap[e.id]||e.get("arcgisProps.title")||e.title:"esri.layers.GraphicsLayer"===e.declaredClass&&(t=e.graphics.items),e.renderer){const t=e.renderer.toJSON();n.layerDefinition.drawingInfo.renderer=t,l.layerDefinition.drawingInfo.renderer=t,s.layerDefinition.drawingInfo.renderer=t,o.layerDefinition.drawingInfo.renderer=t}if(i.showLabels&&e.labelsVisible&&"function"==typeof e.write){var c,m;const t=null==(c=e.write({},{origin:"web-map"}).layerDefinition)||null==(m=c.drawingInfo)?void 0:m.labelingInfo;t&&(a=!0,n.layerDefinition.drawingInfo.labelingInfo=t,l.layerDefinition.drawingInfo.labelingInfo=t,s.layerDefinition.drawingInfo.labelingInfo=t,o.layerDefinition.drawingInfo.labelingInfo=t)}}let d;null!=e&&e.renderer||a||(delete n.layerDefinition.drawingInfo,delete l.layerDefinition.drawingInfo,delete s.layerDefinition.drawingInfo,delete o.layerDefinition.drawingInfo);const p=null==e?void 0:e.fieldsIndex,g=null==e?void 0:e.renderer;if(p){const t=new Set;a&&await f(t,e),g&&"function"==typeof g.collectRequiredFields&&await g.collectRequiredFields(t,p),d=Array.from(t);const i=p.fields.map((e=>e.toJSON()));n.layerDefinition.fields=i,l.layerDefinition.fields=i,s.layerDefinition.fields=i,o.layerDefinition.fields=i}const b=t&&t.length;let h;for(let f=0;f<b;f++){var w;const a=t[f]||t.getItemAt(f);if(!1===a.visible||!a.geometry)continue;if(h=a.toJSON(),h.hasOwnProperty("popupTemplate")&&delete h.popupTemplate,h.geometry&&h.geometry.z&&delete h.geometry.z,h.symbol&&h.symbol.outline&&"esriCLS"===h.symbol.outline.type&&!r.is11xService)continue;!r.is11xService&&h.symbol&&h.symbol.outline&&h.symbol.outline.color&&h.symbol.outline.color[3]&&(h.symbol.outline.color[3]=255);const c=e&&e.renderer&&("valueExpression"in e.renderer&&e.renderer.valueExpression||"hasVisualVariables"in e.renderer&&e.renderer.hasVisualVariables());if(!h.symbol&&e&&e.renderer&&c&&!r.is11xService){const t=e.renderer,i=await t.getSymbolAsync(a);if(!i)continue;h.symbol=i.toJSON(),"hasVisualVariables"in t&&t.hasVisualVariables()&&C(h.symbol,{renderer:t,graphic:a,symbol:i})}if(h.symbol&&(h.symbol.angle||delete h.symbol.angle,Ve(h.symbol)?h.symbol=await Le(h.symbol,r):h.symbol.text&&delete h.attributes),(!i||!i.forceFeatureAttributes)&&null!=(w=d)&&w.length){const e={};d.forEach((t=>{h.attributes&&h.attributes.hasOwnProperty(t)&&(e[t]=h.attributes[t])})),h.attributes=e}"polygon"===a.geometry.type?n.featureSet.features.push(h):"polyline"===a.geometry.type?l.featureSet.features.push(h):"point"===a.geometry.type?h.symbol&&h.symbol.text?u.featureSet.features.push(h):s.featureSet.features.push(h):"multipoint"===a.geometry.type?o.featureSet.features.push(h):"extent"===a.geometry.type&&(h.geometry=y.fromExtent(a.geometry).toJSON(),n.featureSet.features.push(h))}const S=[n,l,o,s,u].filter((e=>e.featureSet.features.length>0));for(const y of S){const e=y.featureSet.features.every((e=>e.symbol));!e||i&&i.forceFeatureAttributes||y.featureSet.features.forEach((e=>{delete e.attributes})),e&&delete y.layerDefinition.drawingInfo,y.layerDefinition.drawingInfo&&y.layerDefinition.drawingInfo.renderer&&await Te(y.layerDefinition.drawingInfo.renderer,r)}return S.length?{featureCollection:{layers:S},showLabels:a}:null}async function se(e,t,i){var r,a;let n;const l=e.renderer,s=parseFloat(i.cimVersion);if(e.featureReduction&&(!i.is11xService||s<2.9)||"dot-density"===(null==l?void 0:l.type)&&(!i.is11xService||s<2.6))return ge(e,t,i);e.legendEnabled&&i.legendLayers.push({id:e.id});const o=t.layerView,{printTemplate:u,view:c}=t,y=l&&("valueExpression"in l&&l.valueExpression||"hasVisualVariables"in l&&l.hasVisualVariables()),f="feature-layer"!==(null==(r=e.source)?void 0:r.type)&&"ogc-feature"!==(null==(a=e.source)?void 0:a.type);if(!i.is11xService&&y||o.filter||f||!l||"field"in l&&null!=l.field&&("string"!=typeof l.field||!e.getField(l.field))){const t=await Ee(o);n=await le(e,t,u,i)}else{var d,p;if(n={id:(g=e.write()).id,title:g.title,opacity:g.opacity,minScale:g.minScale,maxScale:g.maxScale,url:g.url,layerType:g.layerType,customParameters:g.customParameters,layerDefinition:g.layerDefinition},n.showLabels=u.showLabels&&e.labelsVisible,De(n,e),null!=(d=n.layerDefinition)&&null!=(p=d.drawingInfo)&&p.renderer&&(delete n.layerDefinition.minScale,delete n.layerDefinition.maxScale,await Te(n.layerDefinition.drawingInfo.renderer,i),"visualVariables"in l&&l.visualVariables&&l.visualVariables[0])){const e=l.visualVariables[0];if("size"===e.type&&e.maxSize&&"number"!=typeof e.maxSize&&e.minSize&&"number"!=typeof e.minSize){const t=m(e,c.scale);n.layerDefinition.drawingInfo.renderer.visualVariables[0].minSize=t.minSize,n.layerDefinition.drawingInfo.renderer.visualVariables[0].maxSize=t.maxSize}}const t=B(o);t&&(n.layerDefinition||(n.layerDefinition={}),n.layerDefinition.definitionExpression=n.layerDefinition.definitionExpression?`(${n.layerDefinition.definitionExpression}) AND (${t})`:t)}var g;return n}async function oe(e,{layerView:t,printTemplate:i},r){e.legendEnabled&&r.legendLayers.push({id:e.id});return le(e,await Ee(t),i,r)}async function ue(e,{printTemplate:t},i){return le(e,null,t,i)}function ce(e,t){e.legendEnabled&&t.legendLayers.push({id:e.id});const i={layerType:(r=e.write()).layerType,customParameters:r.customParameters};var r;if(i.bandIds=e.bandIds,i.compressionQuality=e.compressionQuality,i.format=e.format,i.interpolation=e.interpolation,(e.mosaicRule||e.definitionExpression)&&(i.mosaicRule=e.exportImageServiceParameters.mosaicRule.toJSON()),e.renderingRule||e.renderer)if(t.is11xService)e.renderingRule&&(i.renderingRule=e.renderingRule.toJSON()),e.renderer&&(i.layerDefinition=i.layerDefinition||{},i.layerDefinition.drawingInfo=i.layerDefinition.drawingInfo||{},i.layerDefinition.drawingInfo.renderer=e.renderer.toJSON());else{const t=e.exportImageServiceParameters.combineRendererWithRenderingRule();t&&(i.renderingRule=t.toJSON())}return De(i,e),i}async function ye(e,t,i){var r;if("flow"===(null==(r=e.renderer)?void 0:r.type))return ge(e,t,i);e.legendEnabled&&i.legendLayers.push({id:e.id});const a={bandIds:(n=e.write()||{}).bandIds,customParameters:n.customParameters,interpolation:n.interpolation,layerDefinition:n.layerDefinition};var n;return a.layerType="ArcGISImageServiceLayer",De(a,e),a}async function fe(e,t,i){const r=t.printTemplate;if(i.is11xService){const t={type:"kml"};return e.write(t,{origin:"web-map"}),delete t.layerType,t.url=u(e.url),t}{const a=[],n=t.layerView;n.allVisibleMapImages.forEach(((t,i)=>{const r={id:`${e.id}_image${i}`,type:"image",title:e.id,minScale:e.minScale||0,maxScale:e.maxScale||0,opacity:e.opacity,extent:t.extent};"data:image/png;base64,"===t.href.substr(0,22)?r.imageData=t.href.substr(22):r.url=t.href,a.push(r)}));const l=[...n.allVisiblePoints.items,...n.allVisiblePolylines.items,...n.allVisiblePolygons.items],s={id:e.id,...await le(null,l,r,i)};return a.push(s),a}}function me(e,{view:t},i){let r;const a={id:e.id,subLayerIds:[]};let n=[];const l=t.scale,s=e=>{const t=0===l,i=0===e.minScale||l<=e.minScale,r=0===e.maxScale||l>=e.maxScale;if(e.visible&&(t||i&&r))if(e.sublayers)e.sublayers.forEach(s);else{const t=e.toExportImageJSON(),i={id:e.id,name:e.title,layerDefinition:{drawingInfo:t.drawingInfo,definitionExpression:t.definitionExpression,source:t.source}};n.unshift(i),a.subLayerIds.push(e.id)}};var o;return e.sublayers&&e.sublayers.forEach(s),n.length&&(n=n.map((({id:e,name:t,layerDefinition:i})=>({id:e,name:t,layerDefinition:i}))),r={layerType:(o=e.write()).layerType,customParameters:o.customParameters},r.layers=n,r.visibleLayers=e.capabilities.exportMap.supportsDynamicLayers?void 0:a.subLayerIds,De(r,e),e.legendEnabled&&i.legendLayers.push(a)),r}async function de({layerView:e,printTemplate:t},i){const r=[],a=e.layer;if(n(a.featureCollections))for(const n of a.featureCollections){const e=await le(n,n.source,t,i);e&&r.push(...e.featureCollection.layers)}else if(n(a.sublayers))for(const n of a.sublayers){const e=await le(null,n.graphics,t,i);e&&r.push(...e.featureCollection.layers)}return{featureCollection:{layers:r}}}function pe(){return{type:"OpenStreetMap"}}async function ge(e,{printTemplate:t,view:i},r){const a={type:"image"},n={format:"png",ignoreBackground:!0,layers:[e],rotation:0},s=r.ssExtent||i.extent.clone();let o=96,u=!0,y=!0;if(t.exportOptions){const e=t.exportOptions;e.dpi>0&&(o=e.dpi),e.width>0&&(u=e.width%2==i.width%2),e.height>0&&(y=e.height%2==i.height%2)}if("map-only"===t.layout&&t.scalePreserved&&(!t.outScale||t.outScale===i.scale)&&96===o&&(!u||!y)&&(n.area={x:0,y:0,width:i.width,height:i.height},u||(n.area.width-=1),y||(n.area.height-=1),!r.ssExtent)){const e=i.toMap(l(n.area.width,n.area.height));s.ymin=e.y,s.xmax=e.x,r.ssExtent=s}a.extent=s.clone()._normalize(!0).toJSON();const f=await i.takeScreenshot(n),{data:m}=c(f.dataUrl);return a.imageData=m,a}async function be(e,{layerView:t,printTemplate:i},r){e.legendEnabled&&r.legendLayers.push({id:e.id});return le(e,await Ee(t),i,r)}function he(e,t){e.legendEnabled&&t.legendLayers.push({id:e.id});const i={layerType:(r=e.write()).layerType,customParameters:r.customParameters};var r;return De(i,e),i}async function we(e,t,i){if(i.is11xService&&e.serviceUrl&&e.styleUrl){const t=Ie(e.styleUrl,e.apiKey),r=Ie(e.serviceUrl,e.apiKey);if(!t&&!r||"2.1.0"!==i.cimVersion){const i={type:"VectorTileLayer"};return i.styleUrl=u(e.styleUrl),i.token=t,r!==t&&(i.additionalTokens=[{url:e.serviceUrl,token:r}]),i}}return ge(e,t,i)}function Se(e){const t={type:"WebTiledLayer",urlTemplate:e.urlTemplate.replace(/\${/g,"{"),credits:e.copyright};return e.subDomains&&e.subDomains.length>0&&(t.subDomains=e.subDomains),t}function xe(e){let t;const i=[],r=e=>{e.visible&&(e.sublayers?e.sublayers.forEach(r):e.name&&i.unshift(e.name))};return e.sublayers&&e.sublayers.forEach(r),i.length&&(t={type:"wms",customLayerParameters:e.customLayerParameters,customParameters:e.customParameters,transparentBackground:e.imageTransparency,visibleLayers:i,url:u(e.url),version:e.version}),t}function ve(e){const t=e.activeLayer;return{type:"wmts",customLayerParameters:e.customLayerParameters,customParameters:e.customParameters,format:t.imageFormat,layer:t.id,style:t.styleId,tileMatrixSet:t.tileMatrixSetId,url:u(e.url)}}function De(e,t){t.url&&(e.url=u(e.url||t.url),e.token=Ie(e.url,t.apiKey))}function Ie(i,r){var a,n;return W(i)&&(r||e.apiKey)?r||e.apiKey:null==(a=t)||null==(n=a.findCredential(i))?void 0:n.token}async function Le(e,t){t.canvas||(t.canvas=document.createElement("canvas"));const r=1024;t.canvas.width=r,t.canvas.height=r;const a=t.canvas.getContext("2d");let n,l;if(e.path){var u;const t=new Path2D(e.path);t.closePath(),a.fillStyle=Array.isArray(e.color)?`rgba(${e.color[0]},${e.color[1]},${e.color[2]},${e.color[3]/255})`:"rgb(0,0,0)",a.fill(t);const i=k(a);if(!i)return null;a.clearRect(0,0,r,r);const o=s(e.size)/Math.max(i.width,i.height);a.scale(o,o);const c=r/o,y=c/2-i.width/2-i.x,f=c/2-i.height/2-i.y;if(a.translate(y,f),Array.isArray(e.color)&&a.fill(t),null!=(u=e.outline)&&u.width&&Array.isArray(e.outline.color)){const r=e.outline;a.lineWidth=s(r.width)/o,a.lineJoin="round",a.strokeStyle=`rgba(${r.color[0]},${r.color[1]},${r.color[2]},${r.color[3]/255})`,a.stroke(t),i.width+=a.lineWidth,i.height+=a.lineWidth}i.width*=o,i.height*=o;const m=a.getImageData(r/2-i.width/2,r/2-i.height/2,Math.ceil(i.width),Math.ceil(i.height));n=m.width,l=m.height,a.canvas.width=n,a.canvas.height=l,a.putImageData(m,0,0)}else{const t="image/svg+xml"===e.contentType?"data:image/svg+xml;base64,"+e.imageData:e.url,r=(await i(t,{responseType:"image"})).data;n=s(e.width),l=s(e.height),a.canvas.width=n,a.canvas.height=l,a.drawImage(r,0,0,a.canvas.width,a.canvas.height)}return{type:"esriPMS",imageData:a.canvas.toDataURL("image/png").substr(22),angle:e.angle,contentType:"image/png",height:o(l),width:o(n),xoffset:e.xoffset,yoffset:e.yoffset}}async function Te(e,t){const i=e.type;if("simple"===i&&Ve(e.symbol))e.symbol=await Le(e.symbol,t);else if("uniqueValue"===i||"classBreaks"===i){Ve(e.defaultSymbol)&&(e.defaultSymbol=await Le(e.defaultSymbol,t));const r=e["uniqueValue"===i?"uniqueValueInfos":"classBreakInfos"];if(r)for(const e of r)Ve(e.symbol)&&(e.symbol=await Le(e.symbol,t))}}async function Ee(e){return e.queryFeatures(e.createQuery()).then((e=>e.features))}function Me(e){return e.gpMetadata&&e.gpMetadata.executionType?H.fromJSON(e.gpMetadata.executionType):"sync"}function Ve(e){return e&&(e.path||"image/svg+xml"===e.contentType||e.url&&e.url.endsWith(".svg"))}export{Y as execute,ee as getGpPrintParams,ie as getGpServerUrl,Z as getMode,X as printCacheMap};
@@ -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 t from"../../PopupTemplate.js";import{symbolTypes as i}from"../../symbols.js";import{JSONSupport as o}from"../../core/JSONSupport.js";import{isSome as r,unwrap as l}from"../../core/maybe.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{subclass as n}from"../../core/accessorSupport/decorators/subclass.js";import a from"../../geometry/Polyline.js";import{directionLineTypeJsonMap as p}from"./networkEnums.js";import{fromJSON as d}from"../../symbols/support/jsonUtils.js";var u;let m=u=class extends o{constructor(e){super(e),this.directionLineType=null,this.directionPointId=null,this.distance=null,this.duration=null,this.fromLevel=null,this.geometry=null,this.objectId=null,this.popupTemplate=null,this.routeId=null,this.symbol=null,this.toLevel=null}static fromPortalJSON(e){var i,o,l;return new u({directionLineType:p.fromJSON(e.attributes.DirectionLineType),directionPointId:e.attributes.DirectionPointID,distance:e.attributes.Meters,duration:e.attributes.Minutes,fromLevel:null!=(i=e.attributes.FromLevel)?i:null,geometry:a.fromJSON(e.geometry),objectId:e.attributes.__OBJECTID,popupTemplate:r(e.popupInfo)?t.fromJSON(e.popupInfo):null,routeId:null!=(o=e.attributes.RouteID)?o:null,symbol:r(e.symbol)?d(e.symbol):null,toLevel:null!=(l=e.attributes.ToLevel)?l:null})}toPortalJSON(){const e={geometry:r(this.geometry)?this.geometry.toJSON():null,attributes:{__OBJECTID:l(this.objectId),DirectionLineType:r(this.directionLineType)?p.toJSON(this.directionLineType):null,DirectionPointID:l(this.directionPointId),Meters:l(this.distance),Minutes:l(this.duration)},symbol:r(this.symbol)?this.symbol.toJSON():null,popupInfo:r(this.popupTemplate)?this.popupTemplate.toJSON():null};return r(this.routeId)&&(e.attributes.RouteID=this.routeId),r(this.fromLevel)&&(e.attributes.FromLevel=this.fromLevel),r(this.toLevel)&&(e.attributes.ToLevel=this.toLevel),e}};m.fields=[{name:"__OBJECTID",alias:"OBJECTID",type:"esriFieldTypeOID",editable:!1,nullable:!1,domain:null},{name:"DirectionPointID",alias:"Direction Point ID",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!1},{name:"DirectionLineType",alias:"Line Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriDirectionsLineType",codedValues:[{name:"Unknown",code:0},{name:"Segment",code:1},{name:"Maneuver Segment",code:2},{name:"Restriction violation",code:3},{name:"Scale cost barrier crossing",code:4},{name:"Heavy Traffic",code:5},{name:"Slow Traffic",code:6},{name:"Moderate Traffic",code:7}]}},{name:"Meters",alias:"Length in Meters",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"Minutes",alias:"Duration in Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"FromLevel",alias:"Start from 3D Level",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!1},{name:"ToLevel",alias:"End at 3D Level",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!1}],m.popupInfo={title:"Direction Lines",fieldInfos:[{fieldName:"DirectionLineType",label:"Line Type",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"Meters",label:"Length in Meters",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Minutes",label:"Duration in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"DirectionPointID",label:"Direction Point ID",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"FromLevel",label:"Start from 3D Level",isEditable:!1,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ToLevel",label:"End at 3D Level",isEditable:!1,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},e([s({type:p.apiValues,json:{read:{source:"attributes.DirectionLineType",reader:p.read}}})],m.prototype,"directionLineType",void 0),e([s({json:{read:{source:"attributes.DirectionPointID"}}})],m.prototype,"directionPointId",void 0),e([s({json:{read:{source:"attributes.Meters"}}})],m.prototype,"distance",void 0),e([s({json:{read:{source:"attributes.Minutes"}}})],m.prototype,"duration",void 0),e([s({json:{read:{source:"attributes.FromLevel"}}})],m.prototype,"fromLevel",void 0),e([s({type:a})],m.prototype,"geometry",void 0),e([s({json:{read:{source:"attributes.ObjectID"}}})],m.prototype,"objectId",void 0),e([s({type:t,json:{read:!1}})],m.prototype,"popupTemplate",void 0),e([s({json:{read:{source:"attributes.RouteID"}}})],m.prototype,"routeId",void 0),e([s({types:i,json:{read:!1}})],m.prototype,"symbol",void 0),e([s({json:{read:{source:"attributes.ToLevel"}}})],m.prototype,"toLevel",void 0),m=u=e([n("esri.layers.support.DirectionLine")],m);const c=m;export{c as default};
5
+ import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../PopupTemplate.js";import{symbolTypes as i}from"../../symbols.js";import{JSONSupport as o}from"../../core/JSONSupport.js";import{isSome as r,unwrap as l}from"../../core/maybe.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{subclass as n}from"../../core/accessorSupport/decorators/subclass.js";import a from"../../geometry/Polyline.js";import{directionLineTypeJsonMap as p}from"./networkEnums.js";import{fromJSON as d}from"../../symbols/support/jsonUtils.js";var u;let m=u=class extends o{constructor(e){super(e),this.directionLineType=null,this.directionPointId=null,this.distance=null,this.duration=null,this.fromLevel=null,this.geometry=null,this.objectId=null,this.popupTemplate=null,this.routeId=null,this.symbol=null,this.toLevel=null}static fromPortalJSON(e){var i,o,l;return new u({directionLineType:p.fromJSON(e.attributes.DirectionLineType),directionPointId:e.attributes.DirectionPointID,distance:e.attributes.Meters,duration:e.attributes.Minutes,fromLevel:null!=(i=e.attributes.FromLevel)?i:null,geometry:a.fromJSON(e.geometry),objectId:e.attributes.__OBJECTID,popupTemplate:r(e.popupInfo)?t.fromJSON(e.popupInfo):null,routeId:null!=(o=e.attributes.RouteID)?o:null,symbol:r(e.symbol)?d(e.symbol):null,toLevel:null!=(l=e.attributes.ToLevel)?l:null})}toPortalJSON(){const e={geometry:r(this.geometry)?this.geometry.toJSON():null,attributes:{__OBJECTID:l(this.objectId),DirectionLineType:r(this.directionLineType)?p.toJSON(this.directionLineType):null,DirectionPointID:l(this.directionPointId),Meters:l(this.distance),Minutes:l(this.duration)},symbol:r(this.symbol)?this.symbol.toJSON():null,popupInfo:r(this.popupTemplate)?this.popupTemplate.toJSON():null};return r(this.routeId)&&(e.attributes.RouteID=this.routeId),r(this.fromLevel)&&(e.attributes.FromLevel=this.fromLevel),r(this.toLevel)&&(e.attributes.ToLevel=this.toLevel),e}};m.fields=[{name:"__OBJECTID",alias:"OBJECTID",type:"esriFieldTypeOID",editable:!1,nullable:!1,domain:null},{name:"DirectionPointID",alias:"Direction Point ID",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!1},{name:"DirectionLineType",alias:"Line Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriDirectionsLineType",codedValues:[{name:"Unknown",code:0},{name:"Segment",code:1},{name:"Maneuver Segment",code:2},{name:"Restriction violation",code:3},{name:"Scale cost barrier crossing",code:4},{name:"Heavy Traffic",code:5},{name:"Slow Traffic",code:6},{name:"Moderate Traffic",code:7}]}},{name:"Meters",alias:"Length in Meters",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"Minutes",alias:"Duration in Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"FromLevel",alias:"Start from 3D Level",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!1},{name:"ToLevel",alias:"End at 3D Level",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!1}],m.popupInfo={title:"Direction Lines",fieldInfos:[{fieldName:"DirectionLineType",label:"Line Type",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"Meters",label:"Length in Meters",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Minutes",label:"Duration in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"DirectionPointID",label:"Direction Point ID",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"FromLevel",label:"Start from 3D Level",isEditable:!1,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ToLevel",label:"End at 3D Level",isEditable:!1,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},e([s({type:p.apiValues,json:{read:{source:"attributes.DirectionLineType",reader:p.read}}})],m.prototype,"directionLineType",void 0),e([s({json:{read:{source:"attributes.DirectionPointID"}}})],m.prototype,"directionPointId",void 0),e([s({json:{read:{source:"attributes.Meters"}}})],m.prototype,"distance",void 0),e([s({json:{read:{source:"attributes.Minutes"}}})],m.prototype,"duration",void 0),e([s({json:{read:{source:"attributes.FromLevel"}}})],m.prototype,"fromLevel",void 0),e([s({type:a})],m.prototype,"geometry",void 0),e([s({json:{read:{source:"attributes.ObjectID"}}})],m.prototype,"objectId",void 0),e([s({type:t,json:{read:!1}})],m.prototype,"popupTemplate",void 0),e([s({json:{read:{source:"attributes.RouteID"}}})],m.prototype,"routeId",void 0),e([s({types:i,json:{read:!1}})],m.prototype,"symbol",void 0),e([s({json:{read:{source:"attributes.ToLevel"}}})],m.prototype,"toLevel",void 0),m=u=e([n("esri.rest.support.DirectionLine")],m);const c=m;export{c 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{_ as e}from"../../chunks/tslib.es6.js";import t from"../../PopupTemplate.js";import{symbolTypes as i}from"../../symbols.js";import{JSONSupport as a}from"../../core/JSONSupport.js";import{isSome as l,unwrap as o}from"../../core/maybe.js";import{property as r}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{reader as s}from"../../core/accessorSupport/decorators/reader.js";import{subclass as n}from"../../core/accessorSupport/decorators/subclass.js";import d from"../../geometry/Point.js";import{directionPointTypeJsonMap as m}from"./networkEnums.js";import{fromJSON as p}from"../../symbols/support/jsonUtils.js";var u;let b=u=class extends a{constructor(e){super(e),this.alternateName=null,this.arrivalTime=null,this.arrivalTimeOffset=null,this.azimuth=null,this.branchName=null,this.directionPointType=null,this.displayText=null,this.exitName=null,this.geometry=null,this.intersectingName=null,this.level=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.routeId=null,this.sequence=null,this.shortVoiceInstruction=null,this.stopId=null,this.symbol=null,this.towardName=null,this.voiceInstruction=null}readArrivalTime(e,t){return l(t.attributes.ArrivalTime)?new Date(t.attributes.ArrivalTime):null}static fromPortalJSON(e){var i,a,o,r,s,n,b,c,f,h,v,T,y,g;return new u({alternateName:null!=(i=e.attributes.AlternateName)?i:null,arrivalTime:l(e.attributes.ArrivalTime)?new Date(e.attributes.ArrivalTime):null,arrivalTimeOffset:null!=(a=e.attributes.ArrivalUTCOffset)?a:null,azimuth:null!=(o=e.attributes.Azimuth)?o:null,branchName:null!=(r=e.attributes.BranchName)?r:null,directionPointType:m.fromJSON(e.attributes.DirectionPointType),displayText:null!=(s=e.attributes.DisplayText)?s:null,exitName:null!=(n=e.attributes.ExitName)?n:null,geometry:d.fromJSON(e.geometry),intersectingName:null!=(b=e.attributes.IntersectingName)?b:null,level:null!=(c=e.attributes.Level)?c:null,name:null!=(f=e.attributes.Name)?f:null,objectId:e.attributes.__OBJECTID,popupTemplate:l(e.popupInfo)?t.fromJSON(e.popupInfo):null,routeId:null!=(h=e.attributes.RouteID)?h:null,sequence:e.attributes.Sequence,shortVoiceInstruction:null!=(v=e.attributes.ShortVoiceInstruction)?v:null,stopId:null!=(T=e.attributes.StopID)?T:null,symbol:l(e.symbol)?p(e.symbol):null,towardName:null!=(y=e.attributes.TowardName)?y:null,voiceInstruction:null!=(g=e.attributes.VoiceInstruction)?g:null})}toPortalJSON(){const e={geometry:l(this.geometry)?this.geometry.toJSON():null,attributes:{__OBJECTID:o(this.objectId),DirectionPointType:l(this.directionPointType)?m.toJSON(this.directionPointType):null,Sequence:o(this.sequence),StopID:this.stopId},symbol:l(this.symbol)?this.symbol.toJSON():null,popupInfo:l(this.popupTemplate)?this.popupTemplate.toJSON():null};return l(this.alternateName)&&(e.attributes.AlternateName=this.alternateName),l(this.arrivalTime)&&(e.attributes.ArrivalTime=this.arrivalTime.getTime()),l(this.arrivalTimeOffset)&&(e.attributes.ArrivalUTCOffset=this.arrivalTimeOffset),l(this.azimuth)&&(e.attributes.Azimuth=this.azimuth),l(this.branchName)&&(e.attributes.BranchName=this.branchName),l(this.displayText)&&(e.attributes.DisplayText=this.displayText),l(this.exitName)&&(e.attributes.ExitName=this.exitName),l(this.intersectingName)&&(e.attributes.IntersectingName=this.intersectingName),l(this.level)&&(e.attributes.Level=this.level),l(this.name)&&(e.attributes.Name=this.name),l(this.shortVoiceInstruction)&&(e.attributes.ShortVoiceInstruction=this.shortVoiceInstruction),l(this.towardName)&&(e.attributes.TowardName=this.towardName),l(this.voiceInstruction)&&(e.attributes.VoiceInstruction=this.voiceInstruction),e}};b.fields=[{name:"__OBJECTID",alias:"OBJECTID",type:"esriFieldTypeOID",editable:!1,nullable:!1,domain:null},{name:"Sequence",alias:"Sequence",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"StopID",alias:"Stop ID",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"DirectionPointType",alias:"Directions Item Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriDirectionPointType",codedValues:[{name:"Unknown",code:0},{name:"",code:1},{name:"Arrive at stop",code:50},{name:"Depart at stop",code:51},{name:"Go straight",code:52},{name:"Take ferry",code:100},{name:"Take off ferry",code:101},{name:"Keep center at fork",code:102},{name:"Take roundabout",code:103},{name:"Make U-Turn",code:104},{name:"Pass the door",code:150},{name:"Take stairs",code:151},{name:"",code:152},{name:"Take escalator",code:153},{name:"Take pedestrian ramp",code:154},{name:"Keep left at fork",code:200},{name:"Ramp left",code:201},{name:"Take left-handed roundabout",code:202},{name:"Make left-handed U-Turn",code:203},{name:"Bear left",code:204},{name:"Turn left",code:205},{name:"Make sharp left",code:206},{name:"Turn left, followed by turn left",code:207},{name:"Turn left, followed by turn right",code:208},{name:"Keep right at fork",code:300},{name:"Ramp right",code:301},{name:"Take right-handed roundabout",code:302},{name:"Make right-handed U-Turn",code:303},{name:"Bear right",code:304},{name:"Turn right",code:305},{name:"Make sharp right",code:306},{name:"Turn right, followed by turn left",code:307},{name:"Turn right, followed by turn right",code:308},{name:"Indicates up direction of elevator",code:400},{name:"Indicates up direction of escalator",code:401},{name:"Take up-stairs",code:402},{name:"Indicates down direction of elevator",code:500},{name:"Indicates down direction of escalator",code:501},{name:"Take down-stairs",code:502},{name:"General event",code:1e3},{name:"Landmark",code:1001},{name:"Time zone change",code:1002},{name:"Heavy traffic segment",code:1003},{name:"Scale cost barrier crossing",code:1004},{name:"Administrative Border crossing",code:1005},{name:"Restriction violation",code:1006}]}},{name:"DisplayText",alias:"Text to Display",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"ArrivalTime",alias:"Maneuver Starts at",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!0},{name:"ArrivalUTCOffset",alias:"Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"Azimuth",alias:"Azimuth",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"Name",alias:"Primary Feature Name",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"AlternateName",alias:"Alternative Feature Name",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"ExitName",alias:"Highway Exit Name",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"IntersectingName",alias:"Intersecting Feature Name",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"BranchName",alias:"Signpost Branch Name",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"TowardName",alias:"Signpost Toward Name",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"ShortVoiceInstruction",alias:"Voice Instruction",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"VoiceInstruction",alias:"Voice Full Instruction",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"Level",alias:"3D Logical Level",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0}],b.popupInfo={title:"{Name}",fieldInfos:[{fieldName:"Name",label:"Name",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"RouteName",label:"Route Name",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"Sequence",label:"Sequence",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ArrivalTime",label:"Arrival Time",isEditable:!0,tooltip:"",visible:!0,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"ArrivalUTCOffset",label:"Arrival Time: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"DepartureTime",label:"Departure Time",isEditable:!0,tooltip:"",visible:!0,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"DepartureUTCOffset",label:"Departure Time: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"CurbApproach",label:"Curb Approach",isEditable:!0,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ArrivalCurbApproach",label:"Arrival Curb Approach",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"DepartureCurbApproach",label:"Departure Curb Approach",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Status",label:"Status",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"LocationType",label:"Location Type",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TimeWindowStart",label:"Time Window Start",isEditable:!0,tooltip:"",visible:!1,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"TimeWindowStartUTCOffset",label:"Time Window Start: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TimeWindowEnd",label:"Time Window End",isEditable:!0,tooltip:"",visible:!1,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"TimeWindowEndUTCOffset",label:"Time Window End: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ServiceMinutes",label:"Service Minutes",isEditable:!0,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ServiceMeters",label:"Service Meters",isEditable:!0,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ServiceCosts",label:"Service Costs",isEditable:!0,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"CumulativeMinutes",label:"Cumulative Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"CumulativeMeters",label:"Cumulative Meters",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"CumulativeCosts",label:"Cumulative Costs",isEditable:!0,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"LateMinutes",label:"Minutes Late",isEditable:!1,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"WaitMinutes",label:"Minutes Early",isEditable:!1,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},e([r({json:{read:!1}})],b.prototype,"alternateName",void 0),e([r()],b.prototype,"arrivalTime",void 0),e([s("arrivalTime",["attributes.ArrivalTime"])],b.prototype,"readArrivalTime",null),e([r({json:{read:{source:"attributes.ArrivalUTCOffset"}}})],b.prototype,"arrivalTimeOffset",void 0),e([r({json:{read:{source:"attributes.Azimuth"}}})],b.prototype,"azimuth",void 0),e([r({json:{read:{source:"attributes.BranchName"}}})],b.prototype,"branchName",void 0),e([r({type:m.apiValues,json:{read:{source:"attributes.DirectionPointType",reader:m.read}}})],b.prototype,"directionPointType",void 0),e([r({json:{read:{source:"attributes.DisplayText"}}})],b.prototype,"displayText",void 0),e([r({json:{read:{source:"attributes.ExitName"}}})],b.prototype,"exitName",void 0),e([r({type:d})],b.prototype,"geometry",void 0),e([r({json:{read:!1}})],b.prototype,"intersectingName",void 0),e([r({json:{read:!1}})],b.prototype,"level",void 0),e([r({json:{read:{source:"attributes.Name"}}})],b.prototype,"name",void 0),e([r({json:{read:{source:"attributes.ObjectID"}}})],b.prototype,"objectId",void 0),e([r({type:t,json:{read:!1}})],b.prototype,"popupTemplate",void 0),e([r({json:{read:{source:"attributes.RouteID"}}})],b.prototype,"routeId",void 0),e([r({json:{read:{source:"attributes.Sequence"}}})],b.prototype,"sequence",void 0),e([r({json:{read:!1}})],b.prototype,"shortVoiceInstruction",void 0),e([r({json:{read:{source:"attributes.StopID"}}})],b.prototype,"stopId",void 0),e([r({types:i,json:{read:!1}})],b.prototype,"symbol",void 0),e([r({json:{read:{source:"attributes.TowardName"}}})],b.prototype,"towardName",void 0),e([r({json:{read:!1}})],b.prototype,"voiceInstruction",void 0),b=u=e([n("esri.layers.support.DirectionPoint")],b);const c=b;export{c as default};
5
+ import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../PopupTemplate.js";import{symbolTypes as i}from"../../symbols.js";import{JSONSupport as a}from"../../core/JSONSupport.js";import{isSome as l,unwrap as o}from"../../core/maybe.js";import{property as r}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{reader as s}from"../../core/accessorSupport/decorators/reader.js";import{subclass as n}from"../../core/accessorSupport/decorators/subclass.js";import d from"../../geometry/Point.js";import{directionPointTypeJsonMap as m}from"./networkEnums.js";import{fromJSON as p}from"../../symbols/support/jsonUtils.js";var u;let b=u=class extends a{constructor(e){super(e),this.alternateName=null,this.arrivalTime=null,this.arrivalTimeOffset=null,this.azimuth=null,this.branchName=null,this.directionPointType=null,this.displayText=null,this.exitName=null,this.geometry=null,this.intersectingName=null,this.level=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.routeId=null,this.sequence=null,this.shortVoiceInstruction=null,this.stopId=null,this.symbol=null,this.towardName=null,this.voiceInstruction=null}readArrivalTime(e,t){return l(t.attributes.ArrivalTime)?new Date(t.attributes.ArrivalTime):null}static fromPortalJSON(e){var i,a,o,r,s,n,b,c,f,h,v,T,y,g;return new u({alternateName:null!=(i=e.attributes.AlternateName)?i:null,arrivalTime:l(e.attributes.ArrivalTime)?new Date(e.attributes.ArrivalTime):null,arrivalTimeOffset:null!=(a=e.attributes.ArrivalUTCOffset)?a:null,azimuth:null!=(o=e.attributes.Azimuth)?o:null,branchName:null!=(r=e.attributes.BranchName)?r:null,directionPointType:m.fromJSON(e.attributes.DirectionPointType),displayText:null!=(s=e.attributes.DisplayText)?s:null,exitName:null!=(n=e.attributes.ExitName)?n:null,geometry:d.fromJSON(e.geometry),intersectingName:null!=(b=e.attributes.IntersectingName)?b:null,level:null!=(c=e.attributes.Level)?c:null,name:null!=(f=e.attributes.Name)?f:null,objectId:e.attributes.__OBJECTID,popupTemplate:l(e.popupInfo)?t.fromJSON(e.popupInfo):null,routeId:null!=(h=e.attributes.RouteID)?h:null,sequence:e.attributes.Sequence,shortVoiceInstruction:null!=(v=e.attributes.ShortVoiceInstruction)?v:null,stopId:null!=(T=e.attributes.StopID)?T:null,symbol:l(e.symbol)?p(e.symbol):null,towardName:null!=(y=e.attributes.TowardName)?y:null,voiceInstruction:null!=(g=e.attributes.VoiceInstruction)?g:null})}toPortalJSON(){const e={geometry:l(this.geometry)?this.geometry.toJSON():null,attributes:{__OBJECTID:o(this.objectId),DirectionPointType:l(this.directionPointType)?m.toJSON(this.directionPointType):null,Sequence:o(this.sequence),StopID:this.stopId},symbol:l(this.symbol)?this.symbol.toJSON():null,popupInfo:l(this.popupTemplate)?this.popupTemplate.toJSON():null};return l(this.alternateName)&&(e.attributes.AlternateName=this.alternateName),l(this.arrivalTime)&&(e.attributes.ArrivalTime=this.arrivalTime.getTime()),l(this.arrivalTimeOffset)&&(e.attributes.ArrivalUTCOffset=this.arrivalTimeOffset),l(this.azimuth)&&(e.attributes.Azimuth=this.azimuth),l(this.branchName)&&(e.attributes.BranchName=this.branchName),l(this.displayText)&&(e.attributes.DisplayText=this.displayText),l(this.exitName)&&(e.attributes.ExitName=this.exitName),l(this.intersectingName)&&(e.attributes.IntersectingName=this.intersectingName),l(this.level)&&(e.attributes.Level=this.level),l(this.name)&&(e.attributes.Name=this.name),l(this.shortVoiceInstruction)&&(e.attributes.ShortVoiceInstruction=this.shortVoiceInstruction),l(this.towardName)&&(e.attributes.TowardName=this.towardName),l(this.voiceInstruction)&&(e.attributes.VoiceInstruction=this.voiceInstruction),e}};b.fields=[{name:"__OBJECTID",alias:"OBJECTID",type:"esriFieldTypeOID",editable:!1,nullable:!1,domain:null},{name:"Sequence",alias:"Sequence",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"StopID",alias:"Stop ID",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"DirectionPointType",alias:"Directions Item Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriDirectionPointType",codedValues:[{name:"Unknown",code:0},{name:"",code:1},{name:"Arrive at stop",code:50},{name:"Depart at stop",code:51},{name:"Go straight",code:52},{name:"Take ferry",code:100},{name:"Take off ferry",code:101},{name:"Keep center at fork",code:102},{name:"Take roundabout",code:103},{name:"Make U-Turn",code:104},{name:"Pass the door",code:150},{name:"Take stairs",code:151},{name:"",code:152},{name:"Take escalator",code:153},{name:"Take pedestrian ramp",code:154},{name:"Keep left at fork",code:200},{name:"Ramp left",code:201},{name:"Take left-handed roundabout",code:202},{name:"Make left-handed U-Turn",code:203},{name:"Bear left",code:204},{name:"Turn left",code:205},{name:"Make sharp left",code:206},{name:"Turn left, followed by turn left",code:207},{name:"Turn left, followed by turn right",code:208},{name:"Keep right at fork",code:300},{name:"Ramp right",code:301},{name:"Take right-handed roundabout",code:302},{name:"Make right-handed U-Turn",code:303},{name:"Bear right",code:304},{name:"Turn right",code:305},{name:"Make sharp right",code:306},{name:"Turn right, followed by turn left",code:307},{name:"Turn right, followed by turn right",code:308},{name:"Indicates up direction of elevator",code:400},{name:"Indicates up direction of escalator",code:401},{name:"Take up-stairs",code:402},{name:"Indicates down direction of elevator",code:500},{name:"Indicates down direction of escalator",code:501},{name:"Take down-stairs",code:502},{name:"General event",code:1e3},{name:"Landmark",code:1001},{name:"Time zone change",code:1002},{name:"Heavy traffic segment",code:1003},{name:"Scale cost barrier crossing",code:1004},{name:"Administrative Border crossing",code:1005},{name:"Restriction violation",code:1006}]}},{name:"DisplayText",alias:"Text to Display",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"ArrivalTime",alias:"Maneuver Starts at",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!0},{name:"ArrivalUTCOffset",alias:"Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"Azimuth",alias:"Azimuth",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"Name",alias:"Primary Feature Name",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"AlternateName",alias:"Alternative Feature Name",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"ExitName",alias:"Highway Exit Name",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"IntersectingName",alias:"Intersecting Feature Name",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"BranchName",alias:"Signpost Branch Name",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"TowardName",alias:"Signpost Toward Name",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"ShortVoiceInstruction",alias:"Voice Instruction",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"VoiceInstruction",alias:"Voice Full Instruction",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"Level",alias:"3D Logical Level",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0}],b.popupInfo={title:"{Name}",fieldInfos:[{fieldName:"Name",label:"Name",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"RouteName",label:"Route Name",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"Sequence",label:"Sequence",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ArrivalTime",label:"Arrival Time",isEditable:!0,tooltip:"",visible:!0,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"ArrivalUTCOffset",label:"Arrival Time: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"DepartureTime",label:"Departure Time",isEditable:!0,tooltip:"",visible:!0,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"DepartureUTCOffset",label:"Departure Time: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"CurbApproach",label:"Curb Approach",isEditable:!0,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ArrivalCurbApproach",label:"Arrival Curb Approach",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"DepartureCurbApproach",label:"Departure Curb Approach",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Status",label:"Status",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"LocationType",label:"Location Type",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TimeWindowStart",label:"Time Window Start",isEditable:!0,tooltip:"",visible:!1,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"TimeWindowStartUTCOffset",label:"Time Window Start: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TimeWindowEnd",label:"Time Window End",isEditable:!0,tooltip:"",visible:!1,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"TimeWindowEndUTCOffset",label:"Time Window End: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ServiceMinutes",label:"Service Minutes",isEditable:!0,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ServiceMeters",label:"Service Meters",isEditable:!0,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ServiceCosts",label:"Service Costs",isEditable:!0,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"CumulativeMinutes",label:"Cumulative Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"CumulativeMeters",label:"Cumulative Meters",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"CumulativeCosts",label:"Cumulative Costs",isEditable:!0,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"LateMinutes",label:"Minutes Late",isEditable:!1,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"WaitMinutes",label:"Minutes Early",isEditable:!1,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},e([r({json:{read:!1}})],b.prototype,"alternateName",void 0),e([r()],b.prototype,"arrivalTime",void 0),e([s("arrivalTime",["attributes.ArrivalTime"])],b.prototype,"readArrivalTime",null),e([r({json:{read:{source:"attributes.ArrivalUTCOffset"}}})],b.prototype,"arrivalTimeOffset",void 0),e([r({json:{read:{source:"attributes.Azimuth"}}})],b.prototype,"azimuth",void 0),e([r({json:{read:{source:"attributes.BranchName"}}})],b.prototype,"branchName",void 0),e([r({type:m.apiValues,json:{read:{source:"attributes.DirectionPointType",reader:m.read}}})],b.prototype,"directionPointType",void 0),e([r({json:{read:{source:"attributes.DisplayText"}}})],b.prototype,"displayText",void 0),e([r({json:{read:{source:"attributes.ExitName"}}})],b.prototype,"exitName",void 0),e([r({type:d})],b.prototype,"geometry",void 0),e([r({json:{read:!1}})],b.prototype,"intersectingName",void 0),e([r({json:{read:!1}})],b.prototype,"level",void 0),e([r({json:{read:{source:"attributes.Name"}}})],b.prototype,"name",void 0),e([r({json:{read:{source:"attributes.ObjectID"}}})],b.prototype,"objectId",void 0),e([r({type:t,json:{read:!1}})],b.prototype,"popupTemplate",void 0),e([r({json:{read:{source:"attributes.RouteID"}}})],b.prototype,"routeId",void 0),e([r({json:{read:{source:"attributes.Sequence"}}})],b.prototype,"sequence",void 0),e([r({json:{read:!1}})],b.prototype,"shortVoiceInstruction",void 0),e([r({json:{read:{source:"attributes.StopID"}}})],b.prototype,"stopId",void 0),e([r({types:i,json:{read:!1}})],b.prototype,"symbol",void 0),e([r({json:{read:{source:"attributes.TowardName"}}})],b.prototype,"towardName",void 0),e([r({json:{read:!1}})],b.prototype,"voiceInstruction",void 0),b=u=e([n("esri.rest.support.DirectionPoint")],b);const c=b;export{c 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{_ 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};
@@ -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 r}from"../../chunks/tslib.es6.js";import{JSONSupport as o}from"../../core/JSONSupport.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{subclass as t}from"../../core/accessorSupport/decorators/subclass.js";let e=class extends o{constructor(r){super(r),this.layerId=null,this.subLayerIds=null,this.title=null}};r([s({json:{write:!0}})],e.prototype,"layerId",void 0),r([s({json:{write:!0}})],e.prototype,"subLayerIds",void 0),r([s({json:{write:!0}})],e.prototype,"title",void 0),e=r([t("esri/rest/support/LegendLayer")],e);const p=e;export{p as default};
5
+ import{_ as r}from"../../chunks/tslib.es6.js";import{JSONSupport as o}from"../../core/JSONSupport.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{subclass as t}from"../../core/accessorSupport/decorators/subclass.js";let e=class extends o{constructor(r){super(r),this.layerId=null,this.subLayerIds=null,this.title=null}};r([s({json:{write:!0}})],e.prototype,"layerId",void 0),r([s({json:{write:!0}})],e.prototype,"subLayerIds",void 0),r([s({json:{write:!0}})],e.prototype,"title",void 0),e=r([t("esri.rest.support.LegendLayer")],e);const p=e;export{p 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{_ as r}from"../../chunks/tslib.es6.js";import{JSONMap as s}from"../../core/jsonMap.js";import{JSONSupport as e}from"../../core/JSONSupport.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{subclass as t}from"../../core/accessorSupport/decorators/subclass.js";const i=new s({esriMeters:"meters",esriFeet:"feet",esriKilometers:"kilometers",esriMiles:"miles",esriNauticalMiles:"nautical-miles",esriYards:"yards"},{ignoreUnknown:!1});let p=class extends e{constructor(r){super(r),this.distance=0,this.units=null}};r([o({json:{write:!0}})],p.prototype,"distance",void 0),r([o({json:{read:i.read,write:i.write}})],p.prototype,"units",void 0),p=r([t("esri/rest/support/LinearUnit")],p);const c=p;export{c as default};
5
+ import{_ as r}from"../../chunks/tslib.es6.js";import{JSONMap as s}from"../../core/jsonMap.js";import{JSONSupport as e}from"../../core/JSONSupport.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{subclass as t}from"../../core/accessorSupport/decorators/subclass.js";const i=new s({esriMeters:"meters",esriFeet:"feet",esriKilometers:"kilometers",esriMiles:"miles",esriNauticalMiles:"nautical-miles",esriYards:"yards"},{ignoreUnknown:!1});let p=class extends e{constructor(r){super(r),this.distance=0,this.units=null}};r([o({json:{write:!0}})],p.prototype,"distance",void 0),r([o({json:{read:i.read,write:i.write}})],p.prototype,"units",void 0),p=r([t("esri.rest.support.LinearUnit")],p);const c=p;export{c as default};