@arcgis/core 4.24.0-next.20220427 → 4.24.0-next.20220430

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 (276) hide show
  1. package/WebMap.js +1 -1
  2. package/analysis/LineOfSightAnalysis.js +1 -1
  3. package/assets/esri/core/workers/RemoteClient.js +1 -1
  4. package/assets/esri/core/workers/chunks/{3a43a2918b44781aaf85.js → 055a0ebf22a82f859474.js} +1 -1
  5. package/assets/esri/core/workers/chunks/{3273b6be43eeb49ee842.js → 0b12ff7b2ed2838afbb8.js} +1 -1
  6. package/assets/esri/core/workers/chunks/0e25548573baf855e394.js +1 -0
  7. package/assets/esri/core/workers/chunks/0edd4c3ca6e7d749d0e5.js +1 -0
  8. package/assets/esri/core/workers/chunks/133f971e72a1a6277ac4.js +1 -0
  9. package/assets/esri/core/workers/chunks/{c388ac33496f004d56f3.js → 135a90ae61f3b3cae91b.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{54f9b1ab9d472bf4baca.js → 1facbda248863cf72cbd.js} +1 -1
  11. package/assets/esri/core/workers/chunks/1fb2d7abe6c8efa84695.js +1 -0
  12. package/assets/esri/core/workers/chunks/2133499e642193f6738f.js +1 -0
  13. package/assets/esri/core/workers/chunks/{dee63bfc108b4e5893a3.js → 2cf3934b3ecabdf207c8.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{3c572629f46e5093223c.js → 30333a95dc0a44e23fb5.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{7afe89eafab00afb31f2.js → 30837d93116f0337972f.js} +1 -1
  16. package/assets/esri/core/workers/chunks/31df729c17470245288c.js +2 -0
  17. package/assets/esri/core/workers/chunks/{c0bf663240df7be68131.js.LICENSE.txt → 31df729c17470245288c.js.LICENSE.txt} +1 -1
  18. package/assets/esri/core/workers/chunks/4130ea1f5a9f197168d7.js +1 -0
  19. package/assets/esri/core/workers/chunks/{417ee7a88575cb8f9aaf.js → 492b65fe99641f5740f0.js} +1 -1
  20. package/assets/esri/core/workers/chunks/4cdd29e1f3a1c7a39af7.js +1 -0
  21. package/assets/esri/core/workers/chunks/{9a0073d43b7dbaeba736.js → 541e644fc77dbe527124.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{5a61a12b2492c6eae592.js → 59e341b2db44351bf557.js} +1 -1
  23. package/assets/esri/core/workers/chunks/{73630d52768e3d932f30.js → 5a10b58533b4116115ac.js} +1 -1
  24. package/assets/esri/core/workers/chunks/5fd787f63362defc984f.js +1 -0
  25. package/assets/esri/core/workers/chunks/682a8f15f352de76df69.js +1 -0
  26. package/assets/esri/core/workers/chunks/6a06635089761ee3e6d4.js +972 -0
  27. package/assets/esri/core/workers/chunks/{ab0c0c29d54f2ed954d6.js → 86b31ae136f931d7884a.js} +1 -1
  28. package/assets/esri/core/workers/chunks/{dc193247a1980360ec4f.js → 8e98ff9404a802352037.js} +1 -1
  29. package/assets/esri/core/workers/chunks/{863cfe35ee640bac103f.js → 94e51fe1c539df6257c2.js} +1 -1
  30. package/assets/esri/core/workers/chunks/{cbe7e6283a427a618d4b.js → 9519a02b9b8db88a3150.js} +1 -1
  31. package/assets/esri/core/workers/chunks/9f3a094aa4b47e4eb046.js +1 -0
  32. package/assets/esri/core/workers/chunks/{50d256bc3b213c8a1b09.js → a0ebf25c9c9a7f839b93.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{d8a992dee594a6a64fde.js → a25f0a195f9217665530.js} +1 -1
  34. package/assets/esri/core/workers/chunks/a59ee7d2b98c85f27dd2.js +1 -0
  35. package/assets/esri/core/workers/chunks/{92ef9b0c61640e0ecbb4.js → a5dbab94697757c87c49.js} +1 -1
  36. package/assets/esri/core/workers/chunks/{147d3ee9aa81d7b2b7fa.js → a6406a248b7b2ed65f35.js} +1 -1
  37. package/assets/esri/core/workers/chunks/{ebdf61eb364ac0856f40.js → acbd0f4d72d1f5d8e4e8.js} +1 -1
  38. package/assets/esri/core/workers/chunks/acc97a210f36bff2d1b0.js +1 -0
  39. package/assets/esri/core/workers/chunks/ad68fe924456d6d7d4f0.js +1 -0
  40. package/assets/esri/core/workers/chunks/b06c949fc7d08e376a5f.js +1 -0
  41. package/assets/esri/core/workers/chunks/b4405e9fe6c0cf7250d3.js +1 -0
  42. package/assets/esri/core/workers/chunks/b97a34d2e7cceef1ac41.js +1 -0
  43. package/assets/esri/core/workers/chunks/bc08fe3b03767bd694c5.js +1 -0
  44. package/assets/esri/core/workers/chunks/c9b09099488d0e719dfb.js +1 -0
  45. package/assets/esri/core/workers/chunks/{4a05d0dfa73ff570e1fa.js → d15e6662d90718411d62.js} +1 -1
  46. package/assets/esri/core/workers/chunks/{b74b9dceabbf7b1aec39.js → d16aac3461af9cee0c29.js} +1 -1
  47. package/assets/esri/core/workers/chunks/{bb678bc2e2fc48112e07.js → d60dd3e1028f714f2258.js} +1 -1
  48. package/assets/esri/core/workers/chunks/{31c1ae0532dd991da63d.js → d6c150c243ca1f6108f9.js} +1 -1
  49. package/assets/esri/core/workers/chunks/{cab6decfcb3f596a3837.js → d8c59b1d73650c060dfb.js} +1 -1
  50. package/assets/esri/core/workers/chunks/{d24339b37cc9316e6d99.js → dcb6e1b33402d7fa455b.js} +1 -1
  51. package/assets/esri/core/workers/chunks/{a8da24116180d708cf81.js → df653bca2b14dffc82d1.js} +1 -1
  52. package/assets/esri/core/workers/chunks/{a3db91d04fe1fca0fe4f.js → e06461703e6f1acfcfdc.js} +1 -1
  53. package/assets/esri/core/workers/chunks/{423e199c2f695e913c0e.js → e3e1d87b8532bf84a18d.js} +1 -1
  54. package/assets/esri/core/workers/chunks/e7744b7e0c16bba93151.js +1 -0
  55. package/assets/esri/core/workers/chunks/ea50effc5c39870dc871.js +1 -0
  56. package/assets/esri/core/workers/chunks/fc4fd9db056579e09bfe.js +1 -0
  57. package/assets/esri/core/workers/chunks/fc9b5f40c5179a8c90de.js +1 -0
  58. package/assets/esri/core/workers/chunks/fd35b69872ac9393924f.js +1 -0
  59. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ar.json +1 -1
  60. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_bg.json +1 -1
  61. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_bs.json +1 -1
  62. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ca.json +1 -1
  63. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_cs.json +1 -1
  64. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_da.json +1 -1
  65. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_de.json +1 -1
  66. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_el.json +1 -1
  67. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_es.json +1 -1
  68. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_et.json +1 -1
  69. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_fi.json +1 -1
  70. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_fr.json +1 -1
  71. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_he.json +1 -1
  72. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_hr.json +1 -1
  73. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_hu.json +1 -1
  74. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_id.json +1 -1
  75. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_it.json +1 -1
  76. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ja.json +1 -1
  77. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ko.json +1 -1
  78. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_lt.json +1 -1
  79. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_lv.json +1 -1
  80. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_nb.json +1 -1
  81. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_nl.json +1 -1
  82. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_pl.json +1 -1
  83. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_pt-BR.json +1 -1
  84. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_pt-PT.json +1 -1
  85. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ro.json +1 -1
  86. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ru.json +1 -1
  87. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_sk.json +1 -1
  88. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_sl.json +1 -1
  89. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_sr.json +1 -1
  90. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_sv.json +1 -1
  91. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_th.json +1 -1
  92. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_tr.json +1 -1
  93. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_uk.json +1 -1
  94. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_vi.json +1 -1
  95. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_zh-CN.json +1 -1
  96. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_zh-HK.json +1 -1
  97. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_zh-TW.json +1 -1
  98. package/assets/esri/widgets/Weather/t9n/Weather_ar.json +1 -1
  99. package/assets/esri/widgets/Weather/t9n/Weather_bg.json +1 -1
  100. package/assets/esri/widgets/Weather/t9n/Weather_bs.json +1 -1
  101. package/assets/esri/widgets/Weather/t9n/Weather_ca.json +1 -1
  102. package/assets/esri/widgets/Weather/t9n/Weather_cs.json +1 -1
  103. package/assets/esri/widgets/Weather/t9n/Weather_da.json +1 -1
  104. package/assets/esri/widgets/Weather/t9n/Weather_de.json +1 -1
  105. package/assets/esri/widgets/Weather/t9n/Weather_el.json +1 -1
  106. package/assets/esri/widgets/Weather/t9n/Weather_es.json +1 -1
  107. package/assets/esri/widgets/Weather/t9n/Weather_et.json +1 -1
  108. package/assets/esri/widgets/Weather/t9n/Weather_fi.json +1 -1
  109. package/assets/esri/widgets/Weather/t9n/Weather_fr.json +1 -1
  110. package/assets/esri/widgets/Weather/t9n/Weather_he.json +1 -1
  111. package/assets/esri/widgets/Weather/t9n/Weather_hr.json +1 -1
  112. package/assets/esri/widgets/Weather/t9n/Weather_hu.json +1 -1
  113. package/assets/esri/widgets/Weather/t9n/Weather_id.json +1 -1
  114. package/assets/esri/widgets/Weather/t9n/Weather_it.json +1 -1
  115. package/assets/esri/widgets/Weather/t9n/Weather_ja.json +1 -1
  116. package/assets/esri/widgets/Weather/t9n/Weather_ko.json +1 -1
  117. package/assets/esri/widgets/Weather/t9n/Weather_lt.json +1 -1
  118. package/assets/esri/widgets/Weather/t9n/Weather_lv.json +1 -1
  119. package/assets/esri/widgets/Weather/t9n/Weather_nb.json +1 -1
  120. package/assets/esri/widgets/Weather/t9n/Weather_nl.json +1 -1
  121. package/assets/esri/widgets/Weather/t9n/Weather_pl.json +1 -1
  122. package/assets/esri/widgets/Weather/t9n/Weather_pt-BR.json +1 -1
  123. package/assets/esri/widgets/Weather/t9n/Weather_pt-PT.json +1 -1
  124. package/assets/esri/widgets/Weather/t9n/Weather_ro.json +1 -1
  125. package/assets/esri/widgets/Weather/t9n/Weather_ru.json +1 -1
  126. package/assets/esri/widgets/Weather/t9n/Weather_sk.json +1 -1
  127. package/assets/esri/widgets/Weather/t9n/Weather_sl.json +1 -1
  128. package/assets/esri/widgets/Weather/t9n/Weather_sr.json +1 -1
  129. package/assets/esri/widgets/Weather/t9n/Weather_sv.json +1 -1
  130. package/assets/esri/widgets/Weather/t9n/Weather_th.json +1 -1
  131. package/assets/esri/widgets/Weather/t9n/Weather_tr.json +1 -1
  132. package/assets/esri/widgets/Weather/t9n/Weather_uk.json +1 -1
  133. package/assets/esri/widgets/Weather/t9n/Weather_vi.json +1 -1
  134. package/assets/esri/widgets/Weather/t9n/Weather_zh-CN.json +1 -1
  135. package/assets/esri/widgets/Weather/t9n/Weather_zh-HK.json +1 -1
  136. package/assets/esri/widgets/Weather/t9n/Weather_zh-TW.json +1 -1
  137. package/chunks/ColorMaterial.glsl.js +4 -4
  138. package/chunks/LineMarker.glsl.js +12 -12
  139. package/chunks/Pattern.glsl.js +17 -17
  140. package/chunks/RibbonLine.glsl.js +34 -34
  141. package/chunks/ShadedColorMaterial.glsl.js +11 -11
  142. package/chunks/index.js +1 -1
  143. package/chunks/sphere.js +1 -1
  144. package/config.js +1 -1
  145. package/core/workers/RemoteClient.js +1 -1
  146. package/core/workers/WorkerHandle.js +1 -1
  147. package/geometry/support/sphere.js +1 -1
  148. package/interfaces.d.ts +74 -20
  149. package/layers/mixins/PortalLayer.js +1 -1
  150. package/layers/support/LercDecoder.js +1 -1
  151. package/package.json +2 -2
  152. package/request.js +1 -1
  153. package/support/elevationInfoUtils.js +1 -1
  154. package/support/revision.js +1 -1
  155. package/symbols/support/previewSymbol2D.js +1 -1
  156. package/views/2d/engine/brushes.js +1 -1
  157. package/views/2d/engine/vectorTiles/TileParser.js +1 -1
  158. package/views/2d/engine/webgl/GraphicDisplayList.js +1 -1
  159. package/views/2d/engine/webgl/Painter.js +1 -1
  160. package/views/2d/engine/webgl/WGLRendererInfo.js +1 -1
  161. package/views/2d/engine/webgl/brushes/WGLBrushDotDensity.js +5 -0
  162. package/views/2d/engine/webgl/brushes/WGLBrushHeatmap.js +5 -0
  163. package/views/2d/engine/webgl/brushes/WGLGeometryBrush.js +1 -1
  164. package/views/2d/engine/webgl/brushes/WGLGeometryBrushFill.js +1 -1
  165. package/views/2d/engine/webgl/brushes/WGLGeometryBrushLabel.js +1 -1
  166. package/views/2d/engine/webgl/brushes/WGLGeometryBrushLine.js +1 -1
  167. package/views/2d/engine/webgl/brushes/WGLGeometryBrushMarker.js +1 -1
  168. package/views/2d/engine/webgl/brushes/WGLGeometryBrushText.js +1 -1
  169. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  170. package/views/2d/engine/webgl/techniques/Technique.js +5 -0
  171. package/views/2d/engine/webgl/techniques/dotDensity/TechniqueDotDensity.js +5 -0
  172. package/views/2d/engine/webgl/techniques/heatmap/TechniqueHeatmap.js +5 -0
  173. package/views/2d/engine/webgl/techniques/utils.js +5 -0
  174. package/views/2d/layers/features/schemaUtils.js +1 -1
  175. package/views/2d/layers/features/support/AttributeStore.js +1 -1
  176. package/views/2d/layers/features/support/GraphicsReader.js +1 -1
  177. package/views/2d/layers/features/tileRenderers/support/WGLFeatureView.js +1 -1
  178. package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
  179. package/views/3d/analysis/Slice/SliceTool.js +1 -1
  180. package/views/3d/camera/constraintUtils/distance.js +1 -1
  181. package/views/3d/camera/constraintUtils/tilt.js +1 -1
  182. package/views/3d/interactive/SnappingVisualizer3D.js +1 -1
  183. package/views/3d/interactive/analysisTools/lineOfSight/LineOfSightTool.js +1 -1
  184. package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DTool.js +1 -1
  185. package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DView.js +1 -1
  186. package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DView.js +1 -1
  187. package/views/3d/layers/I3SMeshView3D.js +1 -1
  188. package/views/3d/layers/I3SMeshWorkerHandle.js +1 -1
  189. package/views/3d/layers/I3SPointsWorkerHandle.js +1 -1
  190. package/views/3d/layers/PointCloudWorkerHandle.js +1 -1
  191. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  192. package/views/3d/layers/i3s/I3SElevationProvider.js +1 -1
  193. package/views/3d/layers/i3s/I3SNode.js +1 -1
  194. package/views/3d/layers/support/HeatmapFeatureProcessor.js +1 -1
  195. package/views/3d/state/controllers/GamepadKeyboardController.js +1 -1
  196. package/views/3d/state/utils/navigationUtils.js +1 -1
  197. package/views/3d/support/PBFDecoder.js +1 -1
  198. package/views/3d/support/geometryUtils/sphere.js +1 -1
  199. package/views/3d/terrain/OverlayManager.js +1 -1
  200. package/views/3d/terrain/OverlayRenderer.js +1 -1
  201. package/views/3d/terrain/PatchRenderData.js +1 -1
  202. package/views/3d/terrain/TerrainSurface.js +1 -1
  203. package/views/3d/terrain/Tile.js +1 -1
  204. package/views/3d/terrain/tileUtils.js +1 -1
  205. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  206. package/views/3d/webgl-engine/collections/Component/IndexRange/ComponentRangeRunLengthEncoded.js +1 -1
  207. package/views/3d/webgl-engine/lib/DrapedHeatmapRenderer.js +1 -1
  208. package/views/3d/webgl-engine/lib/Octree.js +1 -1
  209. package/views/3d/webgl-engine/lib/edgeRendering/EdgeProcessingWorker.js +1 -1
  210. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  211. package/views/3d/webgl-engine/lib/edgeRendering/EdgeWorkerHandle.js +1 -1
  212. package/views/3d/webgl-engine/lib/verticalOffsetUtils.js +1 -1
  213. package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +1 -1
  214. package/views/3d/webgl-engine/shaders/HeatmapTechnique.js +1 -1
  215. package/views/interactive/snapping/FeatureSnappingEngine.js +1 -1
  216. package/views/interactive/snapping/LineSnapper.js +1 -1
  217. package/views/interactive/snapping/ParallelLineSnapper.js +1 -1
  218. package/views/interactive/snapping/RightAngleSnapper.js +1 -1
  219. package/views/interactive/snapping/RightAngleTriangleSnapper.js +1 -1
  220. package/views/interactive/snapping/SnappingManager.js +1 -1
  221. package/views/interactive/snapping/candidates/EdgeSnappingCandidate.js +1 -1
  222. package/views/interactive/snapping/candidates/FeatureSnappingCandidate.js +1 -1
  223. package/views/interactive/snapping/candidates/IntersectionSnappingCandidate.js +1 -1
  224. package/views/interactive/snapping/candidates/LineSnappingCandidate.js +1 -1
  225. package/views/interactive/snapping/candidates/ParallelLineSnappingCandidate.js +1 -1
  226. package/views/interactive/snapping/candidates/RightAngleSnappingCandidate.js +1 -1
  227. package/views/interactive/snapping/candidates/RightAngleTriangleSnappingCandidate.js +1 -1
  228. package/views/interactive/snapping/candidates/SnappingCandidate.js +1 -1
  229. package/views/interactive/snapping/candidates/VertexSnappingCandidate.js +1 -1
  230. package/views/interactive/snapping/featureSources/FeatureCollectionSnappingSource.js +1 -1
  231. package/views/interactive/snapping/featureSources/FeatureServiceSnappingSource.js +1 -1
  232. package/views/interactive/snapping/featureSources/GraphicsSnappingSource.js +1 -1
  233. package/views/interactive/snapping/featureSources/SceneLayerSnappingSource.js +5 -0
  234. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorkerHandle.js +1 -1
  235. package/views/interactive/snapping/featureSources/queryEngineUtils.js +1 -1
  236. package/views/interactive/snapping/featureSources/sceneLayerSource/SceneLayerSnappingSourceWorker.js +5 -0
  237. package/views/interactive/snapping/featureSources/sceneLayerSource/SceneLayerSnappingSourceWorkerHandle.js +5 -0
  238. package/views/interactive/snapping/hints/IntersectionSnappingHint.js +1 -1
  239. package/views/interactive/snapping/hints/LineSnappingHint.js +1 -1
  240. package/views/interactive/snapping/hints/ParallelSnappingHint.js +1 -1
  241. package/views/interactive/snapping/hints/PointSnappingHint.js +1 -1
  242. package/views/interactive/snapping/hints/RightAngleSnappingHint.js +1 -1
  243. package/views/interactive/snapping/hints/SnappingHint.js +1 -1
  244. package/views/interactive/snapping/snappingUtils.js +1 -1
  245. package/views/support/colorUtils.js +1 -1
  246. package/webmap/Bookmark.js +1 -1
  247. package/widgets/AreaMeasurement3D/AreaMeasurement3DViewModel.js +1 -1
  248. package/widgets/DirectLineMeasurement3D/DirectLineMeasurement3DViewModel.js +1 -1
  249. package/widgets/FeatureTable/Grid/Grid.js +2 -2
  250. package/widgets/LineOfSight/LineOfSightViewModel.js +1 -1
  251. package/widgets/Sketch/SketchViewModel.js +1 -1
  252. package/widgets/Slice/SliceViewModel.js +1 -1
  253. package/widgets/support/AnalysisViewModel.js +1 -1
  254. package/widgets/support/InteractiveAnalysisViewModel.js +1 -1
  255. package/assets/esri/core/workers/chunks/2266d6388444ac5d50b3.js +0 -1
  256. package/assets/esri/core/workers/chunks/3f6b17c9d2629ed396da.js +0 -1
  257. package/assets/esri/core/workers/chunks/404f1d7bce014c7e6965.js +0 -1
  258. package/assets/esri/core/workers/chunks/4e4994665549435f51ee.js +0 -1
  259. package/assets/esri/core/workers/chunks/503226c5c612feab4115.js +0 -1
  260. package/assets/esri/core/workers/chunks/528033aa0d663b4d41bf.js +0 -1
  261. package/assets/esri/core/workers/chunks/54af957c5330933805a3.js +0 -1
  262. package/assets/esri/core/workers/chunks/6ef8de3aa9a8d9c22161.js +0 -1
  263. package/assets/esri/core/workers/chunks/72d8b2ad36f0d0a40a0d.js +0 -1
  264. package/assets/esri/core/workers/chunks/756befc4aa3354e1db1d.js +0 -972
  265. package/assets/esri/core/workers/chunks/8a4e2831e8fdde530b21.js +0 -1
  266. package/assets/esri/core/workers/chunks/9b9821772b6cbe189fe0.js +0 -1
  267. package/assets/esri/core/workers/chunks/9c4d41f20c1a94147344.js +0 -1
  268. package/assets/esri/core/workers/chunks/9cfd66ee9e6328b3693a.js +0 -1
  269. package/assets/esri/core/workers/chunks/b548bf032c8af34fe155.js +0 -1
  270. package/assets/esri/core/workers/chunks/bbcae04235830debd814.js +0 -1
  271. package/assets/esri/core/workers/chunks/bc6f5927f07c5993b998.js +0 -1
  272. package/assets/esri/core/workers/chunks/c0bf663240df7be68131.js +0 -2
  273. package/assets/esri/core/workers/chunks/cd9668acbe3babd2b188.js +0 -1
  274. package/assets/esri/core/workers/chunks/d53c7a9ede56be749f2b.js +0 -1
  275. package/assets/esri/core/workers/chunks/e07930ab66f89d215666.js +0 -1
  276. package/assets/esri/core/workers/chunks/f72de828ede4d0c5e9d7.js +0 -1
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.24/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../../core/pbf.js";import{isAborted as t}from"../../../../core/promiseUtils.js";import{loadLibtess as r}from"../../../../geometry/libtess.js";import s from"./Feature.js";import{TriangleIndexBuffer as i}from"./IndexMemoryBuffer.js";import o from"./SourceLayerData.js";import{FillVertexBuffer as n,OutlineVertexBuffer as c,LineVertexBuffer as l,CircleVertexBuffer as a,SymbolVertexBuffer as u}from"./VertexMemoryBuffer.js";import f from"./buckets/CircleBucket.js";import p from"./buckets/FillBucket.js";import h from"./buckets/LineBucket.js";import m from"./buckets/SymbolBucket.js";import{StyleLayerType as _}from"./style/StyleDefinition.js";import{TileClipper as y,SimpleBuilder as d}from"../webgl/TileClipper.js";import{TileStatus as k}from"../../tiling/enums.js";const T=8,g=14,w=5;class B{constructor(t,r,s,i,o){if(this._pbfTiles={},this._tileClippers={},this._client=s,this._tile=r,o){this._styleLayerUIDs=new Set;for(const e of o)this._styleLayerUIDs.add(e)}this._styleRepository=i,this._layers=this._styleRepository.layers;const[n,c,l]=r.tileKey.split("/").map(parseFloat);this._level=n;const a=T+Math.max((this._level-g)*w,0);for(const u of Object.keys(t)){const r=t[u];this._pbfTiles[u]=new e(new Uint8Array(r.protobuff),new DataView(r.protobuff));if(r.refKey){const[e]=r.refKey.split("/").map(parseFloat),t=n-e;if(t>0){const e=(1<<t)-1,r=c&e,s=l&e;this._tileClippers[u]=new y(t,r,s,8,a)}}this._tileClippers[u]||(this._tileClippers[u]=new d)}}_canParseStyleLayer(e){return!this._styleLayerUIDs||this._styleLayerUIDs.has(e)}async parse(e){const t=r(),s=this._initialize(e),{returnedBuckets:i}=s;this._processLayers(s),this._linkReferences(s),this._filterFeatures(s);const o=[],n=new Set,c=(e,t)=>{n.has(e)||(o.push({name:e,repeat:t}),n.add(e))},l={};for(const r of i)r.getResources(r.tileClipper,c,l);if(this._tile.status===k.INVALID)return[];const a=this._fetchResources(o,l,e);return Promise.all([...a,t]).then((()=>this._processFeatures(s.returnedBuckets)))}_initialize(e){return{signal:e&&e.signal,sourceNameToTileData:this._parseTileData(this._pbfTiles),layers:this._layers,zoom:this._level,sourceNameToTileClipper:this._tileClippers,sourceNameToUniqueSourceLayerBuckets:{},sourceNameToUniqueSourceLayers:{},returnedBuckets:[],layerIdToBucket:{},referencerUIDToReferencedId:new Map}}_processLayers(e){const{sourceNameToTileData:t,layers:r,zoom:s,sourceNameToTileClipper:i,sourceNameToUniqueSourceLayerBuckets:o,sourceNameToUniqueSourceLayers:n,returnedBuckets:c,layerIdToBucket:l,referencerUIDToReferencedId:a}=e;for(let u=r.length-1;u>=0;u--){const e=r[u];if(!this._canParseStyleLayer(e.uid)||e.minzoom&&s<Math.floor(e.minzoom)||e.maxzoom&&s>=e.maxzoom||e.type===_.BACKGROUND)continue;if(!t[e.source]||!i[e.source])continue;const f=t[e.source],p=i[e.source],h=e.sourceLayer,m=f[h];if(m){let t=n[e.source];if(t||(t=n[e.source]=new Set),t.add(e.sourceLayer),e.refLayerId)a.set(e.uid,e.refLayerId);else{const t=this._createBucket(e);if(t){t.layerUIDs=[e.uid],t.layerExtent=m.extent,t.tileClipper=p;let r=o[e.source];r||(r=o[e.source]={});let s=r[h];s||(s=r[h]=[]),s.push(t),c.push(t),l[e.id]=t}}}}}_linkReferences(e){const{layerIdToBucket:t,referencerUIDToReferencedId:r}=e;r.forEach(((e,r)=>{t[e=e]&&t[e].layerUIDs.push(r)}))}_filterFeatures(e){const{signal:r,sourceNameToTileData:i,sourceNameToUniqueSourceLayerBuckets:o,sourceNameToUniqueSourceLayers:n}=e,c=10*this._level,l=10*(this._level+1),a=[],u=[];for(const t of Object.keys(n)){n[t].forEach((e=>{a.push(e),u.push(t)}))}for(let f=0;f<a.length;f++){const e=u[f],n=a[f];if(!i[e]||!o[e])continue;const p=i[e][n],h=o[e][n];if(!h||0===h.length)continue;if(t(r))return;const m=p.getData();for(;m.nextTag(2);){const e=m.getMessage(),t=new s(e,p);e.release();const r=t.values;if(r){const e=r._minzoom;if(e&&e>=l)continue;const t=r._maxzoom;if(t&&t<=c)continue}for(const s of h)s.pushFeature(t)}}}_fetchResources(e,t,r){const s=[],i=this._tile.getWorkerTileHandler();let o,n;e.length>0&&(o=i.fetchSprites(e,this._client,r),s.push(o));for(const c in t){const e=t[c];e.size>0&&(n=i.fetchGlyphs(this._tile.tileKey,c,e,this._client,r),s.push(n))}return s}_processFeatures(e){const t=e.filter((e=>e.hasFeatures()||this._canParseStyleLayer(e.layer.uid)));for(const r of t)r.processFeatures(r.tileClipper);return t}_parseTileData(e){const t={};for(const r of Object.keys(e)){const s=e[r],i={};for(;s.next();)switch(s.tag()){case 3:{const e=s.getMessage(),t=new o(e);e.release(),i[t.name]=t;break}default:s.skip()}t[r]=i}return t}_createBucket(e){switch(e.type){case _.BACKGROUND:return null;case _.FILL:return this._createFillBucket(e);case _.LINE:return this._createLineBucket(e);case _.CIRCLE:return this._createCircleBucket(e);case _.SYMBOL:return this._createSymbolBucket(e)}}_createFillBucket(e){return new p(e,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new n(e.fillMaterial.getStride()),new i,new c(e.outlineMaterial.getStride()),new i)}_createLineBucket(e){return new h(e,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new l(e.lineMaterial.getStride()),new i)}_createCircleBucket(e){return new f(e,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new a(e.circleMaterial.getStride()),new i)}_createSymbolBucket(e){const t=this._tile;return new m(e,this._level,new u(e.iconMaterial.getStride()),new i,new u(e.textMaterial.getStride()),new i,t.placementEngine,t.getWorkerTileHandler())}}export{B as default};
5
+ import e from"../../../../core/pbf.js";import{isAborted as t}from"../../../../core/promiseUtils.js";import{loadLibtess as r}from"../../../../geometry/libtess.js";import s from"./Feature.js";import{TriangleIndexBuffer as i}from"./IndexMemoryBuffer.js";import o from"./SourceLayerData.js";import{FillVertexBuffer as n,OutlineVertexBuffer as c,LineVertexBuffer as l,CircleVertexBuffer as a,SymbolVertexBuffer as u}from"./VertexMemoryBuffer.js";import f from"./buckets/CircleBucket.js";import p from"./buckets/FillBucket.js";import h from"./buckets/LineBucket.js";import m from"./buckets/SymbolBucket.js";import{StyleLayerType as _}from"./style/StyleDefinition.js";import{TileClipper as y,SimpleBuilder as d}from"../webgl/TileClipper.js";import{TileStatus as k}from"../../tiling/enums.js";const T=8,g=14,w=5;class B{constructor(t,r,s,i,o){if(this._pbfTiles={},this._tileClippers={},this._client=s,this._tile=r,o){this._styleLayerUIDs=new Set;for(const e of o)this._styleLayerUIDs.add(e)}this._styleRepository=i,this._layers=this._styleRepository.layers;const[n,c,l]=r.tileKey.split("/").map(parseFloat);this._level=n;const a=T+Math.max((this._level-g)*w,0);for(const u of Object.keys(t)){const r=t[u];this._pbfTiles[u]=new e(new Uint8Array(r.protobuff),new DataView(r.protobuff));if(r.refKey){const[e]=r.refKey.split("/").map(parseFloat),t=n-e;if(t>0){const e=(1<<t)-1,r=c&e,s=l&e;this._tileClippers[u]=new y(t,r,s,8,a)}}this._tileClippers[u]||(this._tileClippers[u]=new d)}}_canParseStyleLayer(e){return!this._styleLayerUIDs||this._styleLayerUIDs.has(e)}async parse(e){const t=r(),s=this._initialize(e),{returnedBuckets:i}=s;this._processLayers(s),this._linkReferences(s),this._filterFeatures(s);const o=[],n=new Set,c=(e,t)=>{n.has(e)||(o.push({name:e,repeat:t}),n.add(e))},l={};for(const r of i)r.getResources(r.tileClipper,c,l);if(this._tile.status===k.INVALID)return[];const a=this._fetchResources(o,l,e);return Promise.all([...a,t]).then((()=>this._processFeatures(s.returnedBuckets)))}_initialize(e){return{signal:e&&e.signal,sourceNameToTileData:this._parseTileData(this._pbfTiles),layers:this._layers,zoom:this._level,sourceNameToTileClipper:this._tileClippers,sourceNameToUniqueSourceLayerBuckets:{},sourceNameToUniqueSourceLayers:{},returnedBuckets:[],layerIdToBucket:{},referencerUIDToReferencedId:new Map}}_processLayers(e){const{sourceNameToTileData:t,layers:r,zoom:s,sourceNameToTileClipper:i,sourceNameToUniqueSourceLayerBuckets:o,sourceNameToUniqueSourceLayers:n,returnedBuckets:c,layerIdToBucket:l,referencerUIDToReferencedId:a}=e;for(let u=r.length-1;u>=0;u--){const e=r[u];if(!this._canParseStyleLayer(e.uid)||e.minzoom&&s<Math.floor(e.minzoom)||e.maxzoom&&s>=e.maxzoom||e.type===_.BACKGROUND)continue;if(!t[e.source]||!i[e.source])continue;const f=t[e.source],p=i[e.source],h=e.sourceLayer,m=f[h];if(m){let t=n[e.source];if(t||(t=n[e.source]=new Set),t.add(e.sourceLayer),e.refLayerId)a.set(e.uid,e.refLayerId);else{const t=this._createBucket(e);if(t){t.layerUIDs=[e.uid],t.layerExtent=m.extent,t.tileClipper=p;let r=o[e.source];r||(r=o[e.source]={});let s=r[h];s||(s=r[h]=[]),s.push(t),c.push(t),l[e.id]=t}}}}}_linkReferences(e){const{layerIdToBucket:t,referencerUIDToReferencedId:r}=e;r.forEach(((e,r)=>{t[e]&&t[e].layerUIDs.push(r)}))}_filterFeatures(e){const{signal:r,sourceNameToTileData:i,sourceNameToUniqueSourceLayerBuckets:o,sourceNameToUniqueSourceLayers:n}=e,c=10*this._level,l=10*(this._level+1),a=[],u=[];for(const t of Object.keys(n)){n[t].forEach((e=>{a.push(e),u.push(t)}))}for(let f=0;f<a.length;f++){const e=u[f],n=a[f];if(!i[e]||!o[e])continue;const p=i[e][n],h=o[e][n];if(!h||0===h.length)continue;if(t(r))return;const m=p.getData();for(;m.nextTag(2);){const e=m.getMessage(),t=new s(e,p);e.release();const r=t.values;if(r){const e=r._minzoom;if(e&&e>=l)continue;const t=r._maxzoom;if(t&&t<=c)continue}for(const s of h)s.pushFeature(t)}}}_fetchResources(e,t,r){const s=[],i=this._tile.getWorkerTileHandler();let o,n;e.length>0&&(o=i.fetchSprites(e,this._client,r),s.push(o));for(const c in t){const e=t[c];e.size>0&&(n=i.fetchGlyphs(this._tile.tileKey,c,e,this._client,r),s.push(n))}return s}_processFeatures(e){const t=e.filter((e=>e.hasFeatures()||this._canParseStyleLayer(e.layer.uid)));for(const r of t)r.processFeatures(r.tileClipper);return t}_parseTileData(e){const t={};for(const r of Object.keys(e)){const s=e[r],i={};for(;s.next();)switch(s.tag()){case 3:{const e=s.getMessage(),t=new o(e);e.release(),i[t.name]=t;break}default:s.skip()}t[r]=i}return t}_createBucket(e){switch(e.type){case _.BACKGROUND:return null;case _.FILL:return this._createFillBucket(e);case _.LINE:return this._createLineBucket(e);case _.CIRCLE:return this._createCircleBucket(e);case _.SYMBOL:return this._createSymbolBucket(e)}}_createFillBucket(e){return new p(e,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new n(e.fillMaterial.getStride()),new i,new c(e.outlineMaterial.getStride()),new i)}_createLineBucket(e){return new h(e,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new l(e.lineMaterial.getStride()),new i)}_createCircleBucket(e){return new f(e,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new a(e.circleMaterial.getStride()),new i)}_createSymbolBucket(e){const t=this._tile;return new m(e,this._level,new u(e.iconMaterial.getStride()),new i,new u(e.textMaterial.getStride()),new i,t.placementEngine,t.getWorkerTileHandler())}}export{B as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.24/esri/copyright.txt for details.
4
4
  */
5
- import{WGLDrawPhase as e,WGLGeometryType as t}from"./enums.js";function n(e,t,n,...o){t<e.length?e.splice(t,n,...o):e.push(...o)}const o=new Map;o.set(e.MAP,[t.FILL,t.LINE,t.MARKER,t.TEXT]),o.set(e.LABEL,[t.LABEL]),o.set(e.LABEL_ALPHA,[t.LABEL]);class i{constructor(){this.symbolLevels=[]}replay(e,t,n){for(const o of this.symbolLevels)for(const i of o.zLevels){const o=i.geometryDPInfo.unified;if(o)for(const i of o){const o=e.painter.getGeometryBrush(i.geometryType),r=t.getGeometry(i.geometryType),s={geometryType:i.geometryType,materialKey:i.materialKey,indexFrom:i.indexFrom,indexCount:i.indexCount,target:r};o.prepareState(e,t),o.drawGeometry(e,t,s,n)}}}get empty(){return!this.symbolLevels||0===this.symbolLevels.length}clear(){this.symbolLevels.length=0}addToList(e,t){if(Array.isArray(e))for(const n of e)this._addToList(n,t);else this._addToList(e,t)}removeFromList(e){Array.isArray(e)||(e=[e]);let t=null;for(const n of e)t=this._removeFromList(n);return t}clone(){const e=new i;for(const t of this.symbolLevels)e.symbolLevels.push(t.clone());return e}splitAfter(e){const t=this._getDisplayList(e.symbolLevel,e.zOrder),n=t.length,o=e.indexFrom+e.indexCount;for(let i=0;i<n;++i){const n=t[i];if(n.geometryType===e.geometryType&&o>n.indexFrom&&o<=n.indexFrom+n.indexCount){if(o<n.indexFrom+n.indexCount){const e=new r;e.geometryType=n.geometryType,e.materialKey=n.materialKey,e.indexFrom=o,e.indexCount=n.indexFrom+n.indexCount-o,t.splice(i+1,0,e),n.indexCount=o-n.indexFrom}return i}}}_addToList(e,t){const o=e.symbolLevel,i=e.zOrder,s=this._getDisplayList(o,i),l=null!=t?t:s.length-1,m=l>=0&&l<s.length?s[l]:null;if(null!==m&&m.materialKey===e.materialKey&&m.indexFrom+m.indexCount===e.indexFrom&&m.geometryType===e.geometryType)m.indexCount+=e.indexCount;else{const t=new r;t.indexFrom=e.indexFrom,t.indexCount=e.indexCount,t.materialKey=e.materialKey,t.geometryType=e.geometryType,n(s,l+1,0,t)}}_removeFromList(e){const t=e.symbolLevel,o=e.zOrder,i=this._getDisplayList(t,o),s=i.length;let l;for(let n=0;n<s;++n){const t=i[n];if(e.indexFrom+e.indexCount>t.indexFrom&&e.indexFrom<t.indexFrom+t.indexCount&&t.geometryType===e.geometryType){l=n;break}}if(void 0!==l){const t=i[l];if(e.indexFrom===t.indexFrom)return t.indexCount-=e.indexCount,t.indexFrom+=e.indexCount,0===t.indexCount&&n(i,l,1),l-1;if(e.indexFrom+e.indexCount===t.indexFrom+t.indexCount)return t.indexCount-=e.indexCount,0===t.indexCount?(n(i,l,1),l-1):l;{const o=t.indexFrom,s=e.indexFrom-t.indexFrom,m=e.indexCount,y=t.indexFrom+t.indexCount-(e.indexFrom+e.indexCount);t.indexCount=s;const d=new r;return d.geometryType=t.geometryType,d.materialKey=t.materialKey,d.indexFrom=o+s+m,d.indexCount=y,n(i,l+1,0,d),l}}return null}_getDisplayList(e,t){let n;const o=this.symbolLevels.length;for(let s=0;s<o;s++)if(this.symbolLevels[s].symbolLevel===e){n=this.symbolLevels[s];break}let i;n||(n=new m,n.symbolLevel=e,this.symbolLevels.push(n));const r=n.zLevels.length;for(let s=0;s<r;s++)if(n.zLevels[s].zLevel===t){i=n.zLevels[s];break}return i||(i=new l,i.geometryDPInfo=new s,i.zLevel=t,n.zLevels.push(i)),i.geometryDPInfo.unified||(i.geometryDPInfo.unified=[]),i.geometryDPInfo.unified}getDPInfoType(){return"unified"}}class r{constructor(){this.materialKey=null,this.indexFrom=0,this.indexCount=0}clone(){const e=new r;return e.geometryType=this.geometryType,e.materialKey=this.materialKey,e.indexFrom=this.indexFrom,e.indexCount=this.indexCount,e}}class s{constructor(){this.fill=null,this.line=null,this.marker=null,this.text=null,this.label=null,this.unified=null}clone(){const e=new s;return e.fill=this.fill&&this.fill.map((e=>e.clone())),e.line=this.line&&this.line.map((e=>e.clone())),e.marker=this.marker&&this.marker.map((e=>e.clone())),e.text=this.text&&this.text.map((e=>e.clone())),e.label=this.label&&this.label.map((e=>e.clone())),e.unified=this.unified&&this.unified.map((e=>e.clone())),e}}class l{constructor(){this.geometryDPInfo=new s}clone(){const e=new l;return e.zLevel=this.zLevel,e.geometryDPInfo=this.geometryDPInfo.clone(),e}}class m{constructor(){this.zLevels=[]}clone(){const e=new m;e.symbolLevel=this.symbolLevel;for(const t of this.zLevels)e.zLevels.push(t.clone());return e}}export{i as default};
5
+ import{MaterialKeyBase as e}from"./materialKey/MaterialKey.js";function t(e,t,n,...o){t<e.length?e.splice(t,n,...o):e.push(...o)}class n{constructor(){this.symbolLevels=[]}replay(t,n,o){for(const i of this.symbolLevels)for(const r of i.zLevels){const i=r.geometryDPInfo.unified;if(i)for(const r of i){const{geometryType:i,materialKey:l,indexFrom:s,indexCount:m}=r,y=e.load(l).symbologyType,d=t.painter.getBrush(i,y),u={geometryType:i,materialKey:l,indexFrom:s,indexCount:m,target:n.getGeometry(i)};d.prepareState(t,n),d.drawGeometry(t,n,u,o)}}}get empty(){return!this.symbolLevels||0===this.symbolLevels.length}clear(){this.symbolLevels.length=0}addToList(e,t){if(Array.isArray(e))for(const n of e)this._addToList(n,t);else this._addToList(e,t)}removeFromList(e){Array.isArray(e)||(e=[e]);let t=null;for(const n of e)t=this._removeFromList(n);return t}clone(){const e=new n;for(const t of this.symbolLevels)e.symbolLevels.push(t.clone());return e}splitAfter(e){const t=this._getDisplayList(e.symbolLevel,e.zOrder),n=t.length,i=e.indexFrom+e.indexCount;for(let r=0;r<n;++r){const n=t[r];if(n.geometryType===e.geometryType&&i>n.indexFrom&&i<=n.indexFrom+n.indexCount){if(i<n.indexFrom+n.indexCount){const e=new o;e.geometryType=n.geometryType,e.materialKey=n.materialKey,e.indexFrom=i,e.indexCount=n.indexFrom+n.indexCount-i,t.splice(r+1,0,e),n.indexCount=i-n.indexFrom}return r}}}_addToList(e,n){const i=e.symbolLevel,r=e.zOrder,l=this._getDisplayList(i,r),s=null!=n?n:l.length-1,m=s>=0&&s<l.length?l[s]:null;if(null!==m&&m.materialKey===e.materialKey&&m.indexFrom+m.indexCount===e.indexFrom&&m.geometryType===e.geometryType)m.indexCount+=e.indexCount;else{const n=new o;n.indexFrom=e.indexFrom,n.indexCount=e.indexCount,n.materialKey=e.materialKey,n.geometryType=e.geometryType,t(l,s+1,0,n)}}_removeFromList(e){const n=e.symbolLevel,i=e.zOrder,r=this._getDisplayList(n,i),l=r.length;let s;for(let t=0;t<l;++t){const n=r[t];if(e.indexFrom+e.indexCount>n.indexFrom&&e.indexFrom<n.indexFrom+n.indexCount&&n.geometryType===e.geometryType){s=t;break}}if(void 0!==s){const n=r[s];if(e.indexFrom===n.indexFrom)return n.indexCount-=e.indexCount,n.indexFrom+=e.indexCount,0===n.indexCount&&t(r,s,1),s-1;if(e.indexFrom+e.indexCount===n.indexFrom+n.indexCount)return n.indexCount-=e.indexCount,0===n.indexCount?(t(r,s,1),s-1):s;{const i=n.indexFrom,l=e.indexFrom-n.indexFrom,m=e.indexCount,y=n.indexFrom+n.indexCount-(e.indexFrom+e.indexCount);n.indexCount=l;const d=new o;return d.geometryType=n.geometryType,d.materialKey=n.materialKey,d.indexFrom=i+l+m,d.indexCount=y,t(r,s+1,0,d),s}}return null}_getDisplayList(e,t){let n;const o=this.symbolLevels.length;for(let i=0;i<o;i++)if(this.symbolLevels[i].symbolLevel===e){n=this.symbolLevels[i];break}let s;n||(n=new l,n.symbolLevel=e,this.symbolLevels.push(n));const m=n.zLevels.length;for(let i=0;i<m;i++)if(n.zLevels[i].zLevel===t){s=n.zLevels[i];break}return s||(s=new r,s.geometryDPInfo=new i,s.zLevel=t,n.zLevels.push(s)),s.geometryDPInfo.unified||(s.geometryDPInfo.unified=[]),s.geometryDPInfo.unified}getDPInfoType(){return"unified"}}class o{constructor(){this.materialKey=null,this.indexFrom=0,this.indexCount=0}clone(){const e=new o;return e.geometryType=this.geometryType,e.materialKey=this.materialKey,e.indexFrom=this.indexFrom,e.indexCount=this.indexCount,e}}class i{constructor(){this.fill=null,this.line=null,this.marker=null,this.text=null,this.label=null,this.unified=null}clone(){const e=new i;return e.fill=this.fill&&this.fill.map((e=>e.clone())),e.line=this.line&&this.line.map((e=>e.clone())),e.marker=this.marker&&this.marker.map((e=>e.clone())),e.text=this.text&&this.text.map((e=>e.clone())),e.label=this.label&&this.label.map((e=>e.clone())),e.unified=this.unified&&this.unified.map((e=>e.clone())),e}}class r{constructor(){this.geometryDPInfo=new i}clone(){const e=new r;return e.zLevel=this.zLevel,e.geometryDPInfo=this.geometryDPInfo.clone(),e}}class l{constructor(){this.zLevels=[]}clone(){const e=new l;e.symbolLevel=this.symbolLevel;for(const t of this.zLevels)e.zLevels.push(t.clone());return e}}export{n 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.24/esri/copyright.txt for details.
4
4
  */
5
- import{isSome as e,isNone as t,disposeMaybe as s}from"../../../../core/maybe.js";import{brushes as r}from"../brushes.js";import i from"../vectorTiles/shaders/VTLMaterialManager.js";import{BitBlitRenderer as n}from"./BitBlitRenderer.js";import{WGLGeometryType as o,WGLDrawPhase as a}from"./enums.js";import h from"./MaterialManager.js";import l from"./TextureManager.js";import{WorldExtentClipRenderer as f}from"./WorldExtentClipRenderer.js";import{AnimationEffect as c}from"./effects/AnimationEffect.js";import{BlendEffect as _}from"./effects/BlendEffect.js";import{FeatureEffect as d}from"./effects/FeatureEffect.js";import b from"./effects/HighlightEffect.js";import{HittestEffect as E}from"./effects/HittestEffect.js";import{HittestEffectVTL as p}from"./effects/HittestEffectVTL.js";import{EffectManager as g}from"./effects/post-processing/EffectManager.js";import u from"./painter/RenderPass.js";import{TextureType as T,PixelFormat as m,PixelType as C,TextureSamplingMode as F,TextureWrapMode as M,TargetType as R,DepthStencilTargetType as w,RenderbufferFormat as B,BlendFactor as S,CompareFunction as O}from"../../../webgl/enums.js";import{FramebufferObject as x}from"../../../webgl/FramebufferObject.js";import{Renderbuffer as P}from"../../../webgl/Renderbuffer.js";const N={[o.FILL]:r.fill,[o.LINE]:r.line,[o.MARKER]:r.marker,[o.TEXT]:r.text};class L{constructor(e,t,s){this.context=e,this._blitRenderer=new n,this._worldExtentClipRenderer=new f,this._isClippedToWorldExtent=!1,this._brushCache=new Map,this._vtlMaterialManager=new i,this._blendEffect=new _,this._fboPool=[],this.effects={highlight:new b,hittest:new E,hittestVTL:new p,integrate:new c,insideEffect:new d("inside"),outsideEffect:new d("outside")},this.materialManager=new h(e),this.textureManager=new l(t,s),this._effectsManager=new g}get vectorTilesMaterialManager(){return this._vtlMaterialManager}getRenderTarget(){return this._renderTarget}setRenderTarget(e){this._renderTarget=e}getFbos(e,t){if(e!==this._lastWidth||t!==this._lastHeight){if(this._lastWidth=e,this._lastHeight=t,this._fbos){for(const s in this._fbos)this._fbos[s].resize(e,t);return this._fbos}const s={target:T.TEXTURE_2D,pixelFormat:m.RGBA,dataType:C.UNSIGNED_BYTE,samplingMode:F.NEAREST,wrapMode:M.CLAMP_TO_EDGE,width:e,height:t},r={colorTarget:R.TEXTURE,depthStencilTarget:w.DEPTH_STENCIL_RENDER_BUFFER},i=new P(this.context,{width:e,height:t,internalFormat:B.DEPTH_STENCIL});this._stencilBuf=i,this._fbos={output:new x(this.context,r,s,i),blend:new x(this.context,r,s,i),effect0:new x(this.context,r,s,i)}}return this._fbos}acquireFbo(e,t){let s;s=this._fboPool.length>0?this._fboPool.pop():new x(this.context,{colorTarget:R.TEXTURE,depthStencilTarget:w.DEPTH_STENCIL_RENDER_BUFFER},{target:T.TEXTURE_2D,pixelFormat:m.RGBA,dataType:C.UNSIGNED_BYTE,samplingMode:F.NEAREST,wrapMode:M.CLAMP_TO_EDGE,width:e,height:t},this._stencilBuf);const r=s.descriptor;return r.width===e&&r.height===t||s.resize(e,t),s}releaseFbo(e){this._fboPool.push(e)}getSharedStencilBuffer(){return this._stencilBuf}beforeRenderLayers(t,s=null){const{width:r,height:i}=t.getViewport();this._prevFBO=t.getBoundFramebufferObject();const n=this.getFbos(r,i);if(t.bindFramebuffer(n.output),t.setColorMask(!0,!0,!0,!0),e(s)){const{r:e,g:r,b:i,a:n}=s.color;t.setClearColor(n*e/255,n*r/255,n*i/255,n)}else t.setClearColor(0,0,0,0);t.setDepthWriteEnabled(!0),t.setClearDepth(1),t.clear(t.gl.COLOR_BUFFER_BIT|t.gl.DEPTH_BUFFER_BIT),t.setDepthWriteEnabled(!1)}beforeRenderLayer(e,t,s){const{context:r,blendMode:i,effects:n,requireFBO:o,drawPhase:a}=e;if(o||I(a,i,n,s))r.bindFramebuffer(this._fbos.blend),r.setColorMask(!0,!0,!0,!0),r.setClearColor(0,0,0,0),r.setDepthWriteEnabled(!0),r.setClearDepth(1),r.clear(r.gl.COLOR_BUFFER_BIT|r.gl.DEPTH_BUFFER_BIT),r.setDepthWriteEnabled(!1);else{const e=this._getOutputFBO();r.bindFramebuffer(e)}r.setDepthWriteEnabled(!1),r.setDepthTestEnabled(!1),r.setStencilTestEnabled(!0),r.setClearStencil(t),r.setStencilWriteMask(255),r.clear(r.gl.STENCIL_BUFFER_BIT)}compositeLayer(s,r){const{context:i,blendMode:n,effects:o,requireFBO:h,drawPhase:l}=s;if(h||I(l,n,o,r)){e(o)&&o.length>0&&l===a.MAP&&this._applyEffects(s,o);const h=this._getOutputFBO();i.bindFramebuffer(h),i.setStencilTestEnabled(!1),i.setStencilWriteMask(0),i.setBlendingEnabled(!0),i.setBlendFunctionSeparate(S.ONE,S.ONE_MINUS_SRC_ALPHA,S.ONE,S.ONE_MINUS_SRC_ALPHA),i.setColorMask(!0,!0,!0,!0);const f=t(n)||l===a.HIGHLIGHT?"normal":n;this._blendEffect.draw(s,this._fbos.blend.colorTexture,F.NEAREST,f,r)}}renderLayers(e){if(e.bindFramebuffer(this._prevFBO),!this._fbos)return;const t=this._getOutputFBO();e.setDepthTestEnabled(!1),e.setStencilWriteMask(0),this._isClippedToWorldExtent?(e.setStencilTestEnabled(!0),e.setStencilFunction(O.EQUAL,1,255)):e.setStencilTestEnabled(!1),this.blitTexture(e,t.colorTexture,F.NEAREST)}prepareDisplay(t,s,r){const{context:i}=t;if(i.bindFramebuffer(this._prevFBO),i.setColorMask(!0,!0,!0,!0),e(s)){const{r:e,g:t,b:r,a:n}=s.color;i.setClearColor(n*e/255,n*t/255,n*r/255,n)}else i.setClearColor(0,0,0,0);i.setStencilWriteMask(255),i.setClearStencil(0),i.clear(i.gl.COLOR_BUFFER_BIT|i.gl.STENCIL_BUFFER_BIT),this._isClippedToWorldExtent=this._worldExtentClipRenderer.render(t,r)}dispose(){if(this.materialManager.dispose(),this.textureManager.dispose(),this._blitRenderer=s(this._blitRenderer),this._worldExtentClipRenderer=s(this._worldExtentClipRenderer),this._brushCache&&(this._brushCache.forEach((e=>e.dispose())),this._brushCache.clear(),this._brushCache=null),this._fbos)for(const e in this._fbos)this._fbos[e]&&this._fbos[e].dispose();for(const e of this._fboPool)e.dispose();if(this._fboPool.length=0,this.effects)for(const e in this.effects)this.effects[e]&&this.effects[e].dispose();this._effectsManager.dispose(),this._vtlMaterialManager=s(this._vtlMaterialManager),this._prevFBO=null}getGeometryBrush(e){const t=N[e];let s=this._brushCache.get(t);return void 0===s&&(s=new t,this._brushCache.set(t,s)),this._brushCache.get(t)}renderObject(e,t,s,i){const n=r[s];if(!n)return null;let o=this._brushCache.get(n);void 0===o&&(o=new n,this._brushCache.set(n,o)),o.prepareState(e,t,i),o.draw(e,t,i)}renderObjects(e,t,s,i){const n=r[s];if(!n)return null;let o=this._brushCache.get(n);void 0===o&&(o=new n,this._brushCache.set(n,o)),o.drawMany(e,t,i)}registerRenderPass(e){const t=e.brushes.map((e=>(this._brushCache.has(e)||this._brushCache.set(e,new e),this._brushCache.get(e))));return new u(t,e)}setHighlightOptions(e){this.effects.highlight.setHighlightOptions(e)}blitTexture(e,t,s,r=1){e.setBlendingEnabled(!0),e.setBlendFunctionSeparate(S.ONE,S.ONE_MINUS_SRC_ALPHA,S.ONE,S.ONE_MINUS_SRC_ALPHA),e.setColorMask(!0,!0,!0,!0),this._blitRenderer.render(e,t,s,r)}getPostProcessingEffects(e){return this._effectsManager.getPostProcessingEffects(e)}_getOutputFBO(){return null!=this._renderTarget?this._renderTarget:this._fbos.output}_applyEffects(e,t){const{context:s}=e,r=this._effectsManager.getPostProcessingEffects(t);for(const{postProcessingEffect:i,effect:n}of r)s.bindFramebuffer(this._fbos.blend),i.draw(e,this._fbos.blend,n)}}function I(t,s,r,i){return t!==a.HIGHLIGHT&&(1!==i||e(s)&&"normal"!==s||e(r)&&r.length>0)}export{L as default};
5
+ import{isSome as e,isNone as t,disposeMaybe as s}from"../../../../core/maybe.js";import{brushes as r}from"../brushes.js";import i from"../vectorTiles/shaders/VTLMaterialManager.js";import{BitBlitRenderer as n}from"./BitBlitRenderer.js";import{WGLDrawPhase as o,WGLGeometryType as a,WGLSymbologyType as h}from"./enums.js";import l from"./MaterialManager.js";import f from"./TextureManager.js";import{WorldExtentClipRenderer as c}from"./WorldExtentClipRenderer.js";import{AnimationEffect as _}from"./effects/AnimationEffect.js";import{BlendEffect as d}from"./effects/BlendEffect.js";import{FeatureEffect as b}from"./effects/FeatureEffect.js";import E from"./effects/HighlightEffect.js";import{HittestEffect as p}from"./effects/HittestEffect.js";import{HittestEffectVTL as u}from"./effects/HittestEffectVTL.js";import{EffectManager as g}from"./effects/post-processing/EffectManager.js";import T from"./painter/RenderPass.js";import{TextureType as m,PixelFormat as C,PixelType as M,TextureSamplingMode as F,TextureWrapMode as R,TargetType as w,DepthStencilTargetType as B,RenderbufferFormat as S,BlendFactor as O,CompareFunction as P}from"../../../webgl/enums.js";import{FramebufferObject as x}from"../../../webgl/FramebufferObject.js";import{Renderbuffer as L}from"../../../webgl/Renderbuffer.js";function N(e,t){switch(e){case a.LINE:return r.line;case a.TEXT:return r.text;case a.LABEL:return r.label;case a.FILL:return t===h.DOT_DENSITY?r.dotDensity:r.fill;case a.MARKER:return t===h.HEATMAP?r.heatmap:r.marker}}class D{constructor(e,t,s){this.context=e,this._blitRenderer=new n,this._worldExtentClipRenderer=new c,this._isClippedToWorldExtent=!1,this._brushCache=new Map,this._vtlMaterialManager=new i,this._blendEffect=new d,this._fboPool=[],this.effects={highlight:new E,hittest:new p,hittestVTL:new u,integrate:new _,insideEffect:new b("inside"),outsideEffect:new b("outside")},this.materialManager=new l(e),this.textureManager=new f(t,s),this._effectsManager=new g}get vectorTilesMaterialManager(){return this._vtlMaterialManager}getRenderTarget(){return this._renderTarget}setRenderTarget(e){this._renderTarget=e}getFbos(e,t){if(e!==this._lastWidth||t!==this._lastHeight){if(this._lastWidth=e,this._lastHeight=t,this._fbos){for(const s in this._fbos)this._fbos[s].resize(e,t);return this._fbos}const s={target:m.TEXTURE_2D,pixelFormat:C.RGBA,dataType:M.UNSIGNED_BYTE,samplingMode:F.NEAREST,wrapMode:R.CLAMP_TO_EDGE,width:e,height:t},r={colorTarget:w.TEXTURE,depthStencilTarget:B.DEPTH_STENCIL_RENDER_BUFFER},i=new L(this.context,{width:e,height:t,internalFormat:S.DEPTH_STENCIL});this._stencilBuf=i,this._fbos={output:new x(this.context,r,s,i),blend:new x(this.context,r,s,i),effect0:new x(this.context,r,s,i)}}return this._fbos}acquireFbo(e,t){let s;s=this._fboPool.length>0?this._fboPool.pop():new x(this.context,{colorTarget:w.TEXTURE,depthStencilTarget:B.DEPTH_STENCIL_RENDER_BUFFER},{target:m.TEXTURE_2D,pixelFormat:C.RGBA,dataType:M.UNSIGNED_BYTE,samplingMode:F.NEAREST,wrapMode:R.CLAMP_TO_EDGE,width:e,height:t},this._stencilBuf);const r=s.descriptor;return r.width===e&&r.height===t||s.resize(e,t),s}releaseFbo(e){this._fboPool.push(e)}getSharedStencilBuffer(){return this._stencilBuf}beforeRenderLayers(t,s=null){const{width:r,height:i}=t.getViewport();this._prevFBO=t.getBoundFramebufferObject();const n=this.getFbos(r,i);if(t.bindFramebuffer(n.output),t.setColorMask(!0,!0,!0,!0),e(s)){const{r:e,g:r,b:i,a:n}=s.color;t.setClearColor(n*e/255,n*r/255,n*i/255,n)}else t.setClearColor(0,0,0,0);t.setDepthWriteEnabled(!0),t.setClearDepth(1),t.clear(t.gl.COLOR_BUFFER_BIT|t.gl.DEPTH_BUFFER_BIT),t.setDepthWriteEnabled(!1)}beforeRenderLayer(e,t,s){const{context:r,blendMode:i,effects:n,requireFBO:o,drawPhase:a}=e;if(o||I(a,i,n,s))r.bindFramebuffer(this._fbos.blend),r.setColorMask(!0,!0,!0,!0),r.setClearColor(0,0,0,0),r.setDepthWriteEnabled(!0),r.setClearDepth(1),r.clear(r.gl.COLOR_BUFFER_BIT|r.gl.DEPTH_BUFFER_BIT),r.setDepthWriteEnabled(!1);else{const e=this._getOutputFBO();r.bindFramebuffer(e)}r.setDepthWriteEnabled(!1),r.setDepthTestEnabled(!1),r.setStencilTestEnabled(!0),r.setClearStencil(t),r.setStencilWriteMask(255),r.clear(r.gl.STENCIL_BUFFER_BIT)}compositeLayer(s,r){const{context:i,blendMode:n,effects:a,requireFBO:h,drawPhase:l}=s;if(h||I(l,n,a,r)){e(a)&&a.length>0&&l===o.MAP&&this._applyEffects(s,a);const h=this._getOutputFBO();i.bindFramebuffer(h),i.setStencilTestEnabled(!1),i.setStencilWriteMask(0),i.setBlendingEnabled(!0),i.setBlendFunctionSeparate(O.ONE,O.ONE_MINUS_SRC_ALPHA,O.ONE,O.ONE_MINUS_SRC_ALPHA),i.setColorMask(!0,!0,!0,!0);const f=t(n)||l===o.HIGHLIGHT?"normal":n;this._blendEffect.draw(s,this._fbos.blend.colorTexture,F.NEAREST,f,r)}}renderLayers(e){if(e.bindFramebuffer(this._prevFBO),!this._fbos)return;const t=this._getOutputFBO();e.setDepthTestEnabled(!1),e.setStencilWriteMask(0),this._isClippedToWorldExtent?(e.setStencilTestEnabled(!0),e.setStencilFunction(P.EQUAL,1,255)):e.setStencilTestEnabled(!1),this.blitTexture(e,t.colorTexture,F.NEAREST)}prepareDisplay(t,s,r){const{context:i}=t;if(i.bindFramebuffer(this._prevFBO),i.setColorMask(!0,!0,!0,!0),e(s)){const{r:e,g:t,b:r,a:n}=s.color;i.setClearColor(n*e/255,n*t/255,n*r/255,n)}else i.setClearColor(0,0,0,0);i.setStencilWriteMask(255),i.setClearStencil(0),i.clear(i.gl.COLOR_BUFFER_BIT|i.gl.STENCIL_BUFFER_BIT),this._isClippedToWorldExtent=this._worldExtentClipRenderer.render(t,r)}dispose(){if(this.materialManager.dispose(),this.textureManager.dispose(),this._blitRenderer=s(this._blitRenderer),this._worldExtentClipRenderer=s(this._worldExtentClipRenderer),this._brushCache&&(this._brushCache.forEach((e=>e.dispose())),this._brushCache.clear(),this._brushCache=null),this._fbos)for(const e in this._fbos)this._fbos[e]&&this._fbos[e].dispose();for(const e of this._fboPool)e.dispose();if(this._fboPool.length=0,this.effects)for(const e in this.effects)this.effects[e]&&this.effects[e].dispose();this._effectsManager.dispose(),this._vtlMaterialManager=s(this._vtlMaterialManager),this._prevFBO=null}getBrush(e,t){const s=N(e,t);let r=this._brushCache.get(s);return void 0===r&&(r=new s,this._brushCache.set(s,r)),this._brushCache.get(s)}renderObject(e,t,s,i){const n=r[s];if(!n)return null;let o=this._brushCache.get(n);void 0===o&&(o=new n,this._brushCache.set(n,o)),o.prepareState(e,t,i),o.draw(e,t,i)}renderObjects(e,t,s,i){const n=r[s];if(!n)return null;let o=this._brushCache.get(n);void 0===o&&(o=new n,this._brushCache.set(n,o)),o.drawMany(e,t,i)}registerRenderPass(e){const t=e.brushes.map((e=>(this._brushCache.has(e)||this._brushCache.set(e,new e),this._brushCache.get(e))));return new T(t,e)}setHighlightOptions(e){this.effects.highlight.setHighlightOptions(e)}blitTexture(e,t,s,r=1){e.setBlendingEnabled(!0),e.setBlendFunctionSeparate(O.ONE,O.ONE_MINUS_SRC_ALPHA,O.ONE,O.ONE_MINUS_SRC_ALPHA),e.setColorMask(!0,!0,!0,!0),this._blitRenderer.render(e,t,s,r)}getPostProcessingEffects(e){return this._effectsManager.getPostProcessingEffects(e)}_getOutputFBO(){return null!=this._renderTarget?this._renderTarget:this._fbos.output}_applyEffects(e,t){const{context:s}=e,r=this._effectsManager.getPostProcessingEffects(t);for(const{postProcessingEffect:i,effect:n}of r)s.bindFramebuffer(this._fbos.blend),i.draw(e,this._fbos.blend,n)}}function I(t,s,r,i){return t!==o.HIGHLIGHT&&(1!==i||e(s)&&"normal"!==s||e(r)&&r.length>0)}export{D 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.24/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../../Color.js";import t from"../../../../core/has.js";import{unwrapOr as i,unwrap as s,isSome as a,isNone as o}from"../../../../core/maybe.js";import{pt2px as l}from"../../../../core/screenUtils.js";import{getMetersPerUnitForSR as r}from"../../../../core/unitUtils.js";import{createGaussianKernel as n,generateGradient as d}from"../../../../renderers/support/heatmapUtils.js";import{meterIn as v}from"../../../../renderers/support/lengthUtils.js";import{DOT_DENSITY_MAX_FIELDS as h}from"./definitions.js";import{HeatmapMode as u}from"./enums.js";import{isDefined as p,isNumber as c}from"./Utils.js";import{getWebGLCapabilities as m}from"../../../webgl/capabilities.js";import{ContextType as f}from"../../../webgl/context-util.js";function S(e,t){const i=t.length;if(e<t[0].value||1===i)return t[0].size;for(let s=1;s<i;s++)if(e<t[s].value){const i=(e-t[s-1].value)/(t[s].value-t[s-1].value);return t[s-1].size+i*(t[s].size-t[s-1].size)}return t[i-1].size}function b(e,t,i=0){if(o(t))return e[i+0]=0,e[i+1]=0,e[i+2]=0,void(e[i+3]=0);const{r:s,g:a,b:l,a:r}=t;e[i+0]=s*r/255,e[i+1]=a*r/255,e[i+2]=l*r/255,e[i+3]=r}class y{constructor(){this.symbolLevels=[],this.vvColorValues=new Float32Array(8),this.vvColors=new Float32Array(32),this.vvOpacityValues=new Float32Array(8),this.vvOpacities=new Float32Array(8),this.vvSizeMinMaxValue=new Float32Array(4),this.ddColors=new Float32Array(32),this.ddBackgroundColor=new Float32Array(4),this.ddActiveDots=new Float32Array(8),this.heatmapMode=t("heatmap-kernel-density")?u.KERNEL_DENSITY:u.GAUSSIAN_BLUR,this._vvMaterialParameters={vvSizeEnabled:!1,vvColorEnabled:!1,vvRotationEnabled:!1,vvRotationType:"geographic",vvOpacityEnabled:!1}}getSizeVVFieldStops(e){const t=this._vvSizeFieldStops;switch(t.type){case"static":return t;case"level-dependent":return i(t.levels[e],(()=>{let i=1/0,a=0;for(const s in t.levels){const t=parseFloat(s),o=Math.abs(e-t);o<i&&(i=o,a=t)}if(i===1/0)return{sizes:new Float32Array([0,0,0,0,0,0]),values:new Float32Array([0,0,0,0,0,0])};const o=2**((e-a)/2),l=s(t.levels[a]),r=new Float32Array(l.values);return r[2]*=o,r[3]*=o,{sizes:s(l.sizes),values:r}}))}}get vvMaterialParameters(){return this._vvMaterialParameters}update(e){a(this._vvInfo)&&this._updateVisualVariables(this._vvInfo.vvRanges,e)}setInfo(e,t,i){switch(this._updateEffects(i),this._vvInfo=t,e.type){case"dot-density":this._updateDotDensityInfo(e);break;case"heatmap":this._updateHeatmapInfo(e)}}getVariation(){return{ddDotBlending:this.ddDotBlending,outsideLabelsVisible:this.outsideLabelsVisible,supportsTextureFloat:m("2d").supportsTextureFloat}}getVariationHash(){return(this.ddDotBlending?1:0)|(this.outsideLabelsVisible?1:0)<<1}_updateEffects(e){a(e)?this.outsideLabelsVisible=e.excludedLabelsVisible:this.outsideLabelsVisible=!1}_updateVisualVariables(e,t){const i=this._vvMaterialParameters;if(i.vvOpacityEnabled=!1,i.vvSizeEnabled=!1,i.vvColorEnabled=!1,i.vvRotationEnabled=!1,!e)return;const s=e.size;if(s){if(i.vvSizeEnabled=!0,s.minMaxValue){const e=s.minMaxValue;let i,a;if(p(e.minSize)&&p(e.maxSize))if(c(e.minSize)&&c(e.maxSize))i=l(e.minSize),a=l(e.maxSize);else{const s=t.scale;i=l(S(s,e.minSize.stops)),a=l(S(s,e.maxSize.stops))}this.vvSizeMinMaxValue.set([e.minDataValue,e.maxDataValue,i,a])}if(s.scaleStops&&(this.vvSizeScaleStopsValue=l(S(t.scale,s.scaleStops.stops))),s.unitValue){const e=r(t.spatialReference)/v[s.unitValue.unit];this.vvSizeUnitValueToPixelsRatio=e/t.resolution}s.fieldStops&&(this._vvSizeFieldStops=s.fieldStops)}const a=e.color;a&&(i.vvColorEnabled=!0,this.vvColorValues.set(a.values),this.vvColors.set(a.colors));const o=e.opacity;o&&(i.vvOpacityEnabled=!0,this.vvOpacityValues.set(o.values),this.vvOpacities.set(o.opacities));const n=e.rotation;n&&(i.vvRotationEnabled=!0,i.vvRotationType=n.type)}_updateDotDensityInfo(t){const i=t.attributes;this.ddDotValue=t.dotValue,this.ddDotScale=t.referenceScale,this.ddDotSize=t.dotSize,this.ddDotBlending=t.dotBlendingEnabled,this.ddSeed=t.seed;for(let s=0;s<h;s++){const t=s>=i.length?new e([0,0,0,0]):i[s].color;b(this.ddColors,t,4*s)}for(let e=0;e<8;e++)this.ddActiveDots[e]=e<t.attributes.length?1:0;b(this.ddBackgroundColor,t.backgroundColor)}_updateHeatmapInfo(e){const{blurRadius:t,minPixelIntensity:i,maxPixelIntensity:s,referenceScale:a,field:o,colorStops:l}=e,r=l.map((({color:e})=>e.toString())).join(),v=this.heatmapMode===u.GAUSSIAN_BLUR&&t!==this.heatmapBlurRadius,h=r!==this.heatmapGradientHash;if(this.heatmapBlurRadius=t,this.heatmapMinPixelIntensity=i,this.heatmapPixelIntensityRange=s-i,this.heatmapReferenceScale=a,this.heatmapIsFieldActive=o?1:0,this.heatmapShadingRate=.5,v){const e=m("2d").type===f.WEBGL2?1:4;this.heatmapKernel=n(Float32Array,t,{channels:e,halfKernel:!0})}h&&(this.heatmapGradient=d(l),this.heatmapGradientHash=r)}}export{y as WGLRendererInfo};
5
+ import{unwrapOr as e,unwrap as t,isSome as i}from"../../../../core/maybe.js";import{pt2px as s}from"../../../../core/screenUtils.js";import{getMetersPerUnitForSR as a}from"../../../../core/unitUtils.js";import{meterIn as r}from"../../../../renderers/support/lengthUtils.js";import{isDefined as o,isNumber as l}from"./Utils.js";import{Technique as n}from"./techniques/Technique.js";import{getTechniqueFromRenderer as v}from"./techniques/utils.js";import{getWebGLCapabilities as u}from"../../../webgl/capabilities.js";function c(e,t){const i=t.length;if(e<t[0].value||1===i)return t[0].size;for(let s=1;s<i;s++)if(e<t[s].value){const i=(e-t[s-1].value)/(t[s].value-t[s-1].value);return t[s-1].size+i*(t[s].size-t[s-1].size)}return t[i-1].size}class h{constructor(){this.symbolLevels=[],this.vvColorValues=new Float32Array(8),this.vvColors=new Float32Array(32),this.vvOpacityValues=new Float32Array(8),this.vvOpacities=new Float32Array(8),this.vvSizeMinMaxValue=new Float32Array(4),this._vvMaterialParameters={vvSizeEnabled:!1,vvColorEnabled:!1,vvRotationEnabled:!1,vvRotationType:"geographic",vvOpacityEnabled:!1},this._technique=n}getSizeVVFieldStops(i){const s=this._vvSizeFieldStops;switch(s.type){case"static":return s;case"level-dependent":return e(s.levels[i],(()=>{let e=1/0,a=0;for(const t in s.levels){const s=parseFloat(t),r=Math.abs(i-s);r<e&&(e=r,a=s)}if(e===1/0)return{sizes:new Float32Array([0,0,0,0,0,0]),values:new Float32Array([0,0,0,0,0,0])};const r=2**((i-a)/2),o=t(s.levels[a]),l=new Float32Array(o.values);return l[2]*=r,l[3]*=r,{sizes:t(o.sizes),values:l}}))}}get vvMaterialParameters(){return this._vvMaterialParameters}update(e){i(this._vvInfo)&&this._updateVisualVariables(this._vvInfo.vvRanges,e)}setInfo(e,t,i){this._updateEffects(i),this._vvInfo=t,this._technique=v(e),this.rendererSchema=this._technique.createOrUpdateRendererSchema(this.rendererSchema,e)}getVariation(){return{...this._technique.getVariation(this.rendererSchema),outsideLabelsVisible:this.outsideLabelsVisible,supportsTextureFloat:u("2d").supportsTextureFloat}}getVariationHash(){return this._technique.getVariationHashBit(this.rendererSchema)|(this.outsideLabelsVisible?1:0)<<1}_updateEffects(e){i(e)?this.outsideLabelsVisible=e.excludedLabelsVisible:this.outsideLabelsVisible=!1}_updateVisualVariables(e,t){const i=this._vvMaterialParameters;if(i.vvOpacityEnabled=!1,i.vvSizeEnabled=!1,i.vvColorEnabled=!1,i.vvRotationEnabled=!1,!e)return;const n=e.size;if(n){if(i.vvSizeEnabled=!0,n.minMaxValue){const e=n.minMaxValue;let i,a;if(o(e.minSize)&&o(e.maxSize))if(l(e.minSize)&&l(e.maxSize))i=s(e.minSize),a=s(e.maxSize);else{const r=t.scale;i=s(c(r,e.minSize.stops)),a=s(c(r,e.maxSize.stops))}this.vvSizeMinMaxValue.set([e.minDataValue,e.maxDataValue,i,a])}if(n.scaleStops&&(this.vvSizeScaleStopsValue=s(c(t.scale,n.scaleStops.stops))),n.unitValue){const e=a(t.spatialReference)/r[n.unitValue.unit];this.vvSizeUnitValueToPixelsRatio=e/t.resolution}n.fieldStops&&(this._vvSizeFieldStops=n.fieldStops)}const v=e.color;v&&(i.vvColorEnabled=!0,this.vvColorValues.set(v.values),this.vvColors.set(v.colors));const u=e.opacity;u&&(i.vvOpacityEnabled=!0,this.vvOpacityValues.set(u.values),this.vvOpacities.set(u.opacities));const h=e.rotation;h&&(i.vvRotationEnabled=!0,i.vvRotationType=h.type)}}export{h as WGLRendererInfo};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.24/esri/copyright.txt for details.
4
+ */
5
+ import{disposeMaybe as e,isSome as t,isNone as o}from"../../../../../core/maybe.js";import r from"../../../../../core/RandomLCG.js";import{TEXTURE_BINDING_RENDERER_0 as s,TEXTURE_BINDING_RENDERER_1 as i,TILE_SIZE as n}from"../definitions.js";import{WGLGeometryType as d,WGLSymbologyType as a}from"../enums.js";import l from"./WGLGeometryBrushFill.js";import{assertRendererSchema as _}from"../techniques/utils.js";import{BufferObject as u}from"../../../../webgl/BufferObject.js";import{DataType as m,PrimitiveType as h,TextureType as c,PixelFormat as f,PixelType as T,TextureSamplingMode as p,TextureWrapMode as x,TargetType as w,DepthStencilTargetType as D,RenderbufferFormat as g,Usage as y}from"../../../../webgl/enums.js";import{FramebufferObject as S}from"../../../../webgl/FramebufferObject.js";import{Renderbuffer as E}from"../../../../webgl/Renderbuffer.js";import{Texture as b}from"../../../../webgl/Texture.js";import{VertexArrayObject as F}from"../../../../webgl/VertexArrayObject.js";class O extends l{constructor(){super(...arguments),this._dotTextureSize=0,this._dotTextures=null,this._dotSamplers=new Int32Array([s,i]),this._dotVAO=null,this._dotDesc={vsPath:"dot/dot",fsPath:"dot/dot",attributes:new Map([["a_pos",0]])}}dispose(){super.dispose(),this._disposeTextures(),this._dotFBO=e(this._dotFBO),this._dotVAO=e(this._dotVAO)}getGeometryType(){return d.FILL}supportsSymbology(e){return e===a.DOT_DENSITY}_drawFills(e,o,r,s,i,n){const{passOptions:d}=e;if(t(d)&&"hittest"===d.type)super._drawFills(e,o,r,s,i,n);else{const t=this._drawDotLocations(e,o,r,i,n);this._drawDotDensity(e,o,t)}}_drawDotDensity(e,o,r){const{context:s,painter:i,rendererInfo:n,requestRender:d}=e,a=i.materialManager.getProgram(this._dotDesc);if(t(d)&&!a.isCompiled)return void d();const{rendererSchema:l}=n;_(l,"dot-density");const u=this._createDotDensityMesh(s,this._dotDesc.attributes,{geometry:[{name:"a_pos",count:2,type:m.SHORT,divisor:0,normalized:!1,offset:0,stride:4}]});s.setStencilTestEnabled(!0),s.useProgram(a),a.setUniform1f("u_tileZoomFactor",1),a.setUniform1i("u_texture",this._dotSamplers[0]),a.setUniform1f("u_dotSize",Math.max(l.dotSize,1)),a.setUniform1f("u_pixelRatio",window.devicePixelRatio),this._setSharedUniforms(a,e,o),s.bindTexture(r,this._dotSamplers[0]),s.bindVAO(u),s.drawArrays(h.POINTS,0,262144)}_drawDotLocations(e,t,o,r,s){const{context:i,rendererInfo:d,requiredLevel:a}=e,l=i.getViewport(),{rendererSchema:u}=d;_(u,"dot-density");const{dotScale:c,colors:f,activeDots:T,backgroundColor:p,dotValue:x}=u;i.setViewport(0,0,512,512);const w=i.getBoundFramebufferObject(),D=this._createFBO(i);i.bindFramebuffer(D),i.setClearColor(0,0,0,0),i.clear(i.gl.COLOR_BUFFER_BIT|i.gl.STENCIL_BUFFER_BIT),i.setStencilTestEnabled(!1);const g=1/2**(a-t.key.level),y=n,S=y*window.devicePixelRatio*y*window.devicePixelRatio,E=1/g*(1/g),b=c?e.state.scale/c:1;return o.setUniform1f("u_tileZoomFactor",g),o.setUniform1f("u_tileDotsOverArea",S/(n*window.devicePixelRatio*n*window.devicePixelRatio)),o.setUniformMatrix4fv("u_dotColors",f),o.setUniform4fv("u_isActive",T),o.setUniform4fv("u_dotBackgroundColor",p),o.setUniform1f("u_dotValue",Math.max(1,x*b*E)),this._bindDotDensityTextures(i,o,d,y),i.drawElements(h.TRIANGLES,r,m.UNSIGNED_INT,s),i.setViewport(l.x,l.y,l.width,l.height),i.bindFramebuffer(w),D.colorTexture}_createFBO(e){if(o(this._dotFBO)){const t=512,o=512,r={target:c.TEXTURE_2D,pixelFormat:f.RGBA,dataType:T.UNSIGNED_BYTE,samplingMode:p.NEAREST,wrapMode:x.CLAMP_TO_EDGE,width:t,height:o},s={colorTarget:w.TEXTURE,depthStencilTarget:D.DEPTH_STENCIL_RENDER_BUFFER},i=new E(e,{width:t,height:o,internalFormat:g.DEPTH_STENCIL});this._dotFBO=new S(e,s,r,i)}return this._dotFBO}_disposeTextures(){if(this._dotTextures){for(let e=0;e<this._dotTextures.length;e++)this._dotTextures[e].dispose();this._dotTextures=null}}_bindDotDensityTextures(e,t,o,r){const{rendererSchema:s}=o;_(s,"dot-density");const i=this._createDotDensityTextures(e,r,s.seed);t.setUniform1iv("u_dotTextures",this._dotSamplers);for(let n=0;n<i.length;n++)e.bindTexture(i[n],this._dotSamplers[n])}_createDotDensityMesh(e,t,r){if(o(this._dotVAO)){const o=2,s=new Int16Array(262144*o);for(let e=0;e<512;e++)for(let t=0;t<512;t++)s[o*(t+512*e)]=t,s[o*(t+512*e)+1]=e;const i=u.createVertex(e,y.STATIC_DRAW,s);this._dotVAO=new F(e,t,r,{geometry:i},null)}return this._dotVAO}_createDotDensityTextures(e,t,o){if(this._dotTextureSize===t&&this._seed===o||(this._disposeTextures(),this._dotTextureSize=t,this._seed=o),null===this._dotTextures){const s=new r(o);this._dotTextures=[this._allocDotDensityTexture(e,t,s),this._allocDotDensityTexture(e,t,s)]}return this._dotTextures}_allocDotDensityTexture(e,t,o){const r=new Float32Array(t*t*4);for(let s=0;s<r.length;s++)r[s]=o.getFloat();return new b(e,{wrapMode:x.REPEAT,pixelFormat:f.RGBA,dataType:T.FLOAT,samplingMode:p.NEAREST,width:t,height:t},r)}}export{O 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.24/esri/copyright.txt for details.
4
+ */
5
+ import{disposeMaybe as e}from"../../../../../core/maybe.js";import{WGLSymbologyType as t,HeatmapMode as r}from"../enums.js";import a from"../VertexStream.js";import s from"./WGLGeometryBrushMarker.js";import{assertRendererSchema as u}from"../techniques/utils.js";import{ContextType as i}from"../../../../webgl/context-util.js";import{DataType as n,BlendFactor as l,ClearBufferBit as o,TextureType as m,PixelFormat as c,SizedPixelFormat as h,PixelType as d,TextureSamplingMode as _,TextureWrapMode as p}from"../../../../webgl/enums.js";import{FramebufferObject as f}from"../../../../webgl/FramebufferObject.js";import{Texture as T}from"../../../../webgl/Texture.js";const x={vsPath:"heatmap/heatmapResolve",fsPath:"heatmap/heatmapResolve",attributes:new Map([["a_position",0]])};class R extends s{supportsSymbology(e){return e===t.HEATMAP}dispose(){super.dispose(),this._accumulateOutputTexture=e(this._accumulateOutputTexture),this._accumulateKernelTexture=e(this._accumulateKernelTexture),this._accumulateFramebuffer=e(this._accumulateFramebuffer),this._resolveGradientTexture=e(this._resolveGradientTexture),this._tileQuad=e(this._tileQuad)}_drawMarkers(e,t,r,a,s,u,i){const{context:l}=e,o=l.getBoundFramebufferObject(),m=l.getViewport();this._prepareAccumulatePass(e,t,r,i),l.drawElements(a,s,n.UNSIGNED_INT,u),i||this._drawResolvePass(e,t,o,m)}_prepareAccumulatePass(e,t,a,s){const{context:i,rendererInfo:n,state:m,displayLevel:c}=e,{rendererSchema:h}=n;u(h,"heatmap");const{heatmapMode:d,referenceScale:_,blurRadius:p,isFieldActive:f}=h;this._loadResources(i,h),this._updateResources(i,h);const T=p*(d===r.GAUSSIAN_BLUR?3:1)*(0!==_?_/m.scale:1)*2**(t.key.level-c);a.setUniform1f("u_radius",T),s||(i.bindFramebuffer(this._accumulateFramebuffer),d===r.GAUSSIAN_BLUR&&(i.bindTexture(this._accumulateKernelTexture,7),a.setUniform1i("u_kernelTexture",7)),a.setUniform1f("u_isFieldActive",f),i.setViewport(0,0,this._accumulateFramebuffer.width,this._accumulateFramebuffer.height),i.setBlendingEnabled(!0),i.setBlendFunction(l.ONE,l.ONE),i.setClearColor(0,0,0,0),i.clear(o.COLOR_BUFFER_BIT))}_drawResolvePass(e,t,a,s){const{context:i,painter:n,rendererInfo:o}=e,{rendererSchema:m}=o;u(m,"heatmap");const{heatmapMode:c,blurRadius:h,minPixelIntensity:d,pixelIntensityRange:_}=m,p=n.materialManager.getProgram(x);i.useProgram(p),this._setSharedUniforms(p,e,t),i.bindFramebuffer(a),i.setViewport(0,0,s.width,s.height),i.setBlendFunction(l.ONE,l.ONE_MINUS_SRC_ALPHA),i.bindTexture(this._accumulateOutputTexture,8),i.bindTexture(this._resolveGradientTexture,9),p.setUniform1i("u_texture",8),p.setUniform1i("u_gradient",9),p.setUniform2f("u_pixelIntensityMinAndInvRange",d,1/_),p.setUniform1f("u_densityNormalization",c===r.KERNEL_DENSITY?3/(h*h*Math.PI):1),this._tileQuad.draw()}_loadResources(e,t){const s=e.type===i.WEBGL2,{heatmapMode:u,shadingRate:n}=t;(null!=this._accumulateOutputTexture||(this._accumulateOutputTexture=new T(e,{target:m.TEXTURE_2D,pixelFormat:s?c.RED:c.RGBA,internalFormat:s?h.R32F:c.RGBA,dataType:d.FLOAT,samplingMode:_.LINEAR,wrapMode:p.CLAMP_TO_EDGE,width:Math.round(512*n),height:Math.round(512*n)})),u===r.GAUSSIAN_BLUR)&&(null!=this._accumulateKernelTexture||(this._accumulateKernelTexture=new T(e,{target:m.TEXTURE_2D,pixelFormat:s?c.RED:c.RGBA,internalFormat:s?h.R32F:c.RGBA,dataType:d.FLOAT,samplingMode:_.LINEAR,wrapMode:p.CLAMP_TO_EDGE})));null!=this._accumulateFramebuffer||(this._accumulateFramebuffer=new f(e,{},this._accumulateOutputTexture)),null!=this._resolveGradientTexture||(this._resolveGradientTexture=new T(e,{target:m.TEXTURE_2D,pixelFormat:c.RGBA,dataType:d.UNSIGNED_BYTE,samplingMode:_.LINEAR,wrapMode:p.CLAMP_TO_EDGE})),null!=this._tileQuad||(this._tileQuad=new a(e,[0,0,1,0,0,1,1,1]))}_updateResources(e,t){const{heatmapMode:a,blurRadius:s,kernel:u,gradientHash:n,gradient:l}=t;if(a===r.GAUSSIAN_BLUR&&this._prevBlurRadius!==s){const t=e.type===i.WEBGL2?1:4;this._accumulateKernelTexture.resize(u.length/t,1),this._accumulateKernelTexture.setData(u),this._prevBlurRadius=s}this._prevGradientHash!==n&&(this._resolveGradientTexture.resize(l.length/4,1),this._resolveGradientTexture.setData(l),this._prevGradientHash=n)}}export{R 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.24/esri/copyright.txt for details.
4
4
  */
5
- import{isNone as e,isSome as t}from"../../../../../core/maybe.js";import{MIN_MAX_ZOOM_PRECISION_FACTOR as i,TEXTURE_BINDING_ATTRIBUTE_DATA_0 as s,TEXTURE_BINDING_ATTRIBUTE_DATA_1 as o,TEXTURE_BINDING_ATTRIBUTE_DATA_2 as a,TEXTURE_BINDING_ATTRIBUTE_DATA_3 as r}from"../definitions.js";import n from"./WGLBrush.js";import{BlendFactor as v,CompareFunction as u}from"../../../../webgl/enums.js";class f extends n{constructor(){super(...arguments),this._computeDesc=new Map}prepareState({context:e},t,i){i&&i.includes("hittest")?e.setBlendFunctionSeparate(v.ONE,v.ONE,v.ONE,v.ONE):e.setBlendFunctionSeparate(v.ONE,v.ONE_MINUS_SRC_ALPHA,v.ONE,v.ONE_MINUS_SRC_ALPHA),e.setBlendingEnabled(!0),e.setColorMask(!0,!0,!0,!0),e.setStencilWriteMask(0),e.setStencilTestEnabled(!0),e.setStencilFunction(u.EQUAL,t.stencilRef,255)}draw(t,i,s){const o=this.getGeometryType();i.commit(t);const a=i.getGeometry(o);e(a)||(t.timeline.begin(this.name),t.attributeView.bindTextures(t.context),a.forEachCommand((e=>this.drawGeometry(t,i,e,s))))}_setSharedUniforms(e,n,v){const{displayLevel:u,pixelRatio:f,state:m,passOptions:l}=n;t(l)&&"hittest"===l.type&&(e.setUniform2fv("u_hittestPos",l.position),e.setUniform1f("u_hittestDist",l.distance)),e.setUniform1f("u_pixelRatio",f),e.setUniformMatrix3fv("u_tileMat3",v.transforms.tileMat3),e.setUniformMatrix3fv("u_viewMat3",m.viewMat3),e.setUniformMatrix3fv("u_dvsMat3",v.transforms.dvs),e.setUniformMatrix3fv("u_displayViewMat3",m.displayViewMat3),e.setUniform1f("u_currentZoom",Math.round(u*i)),e.setUniform1i("u_attributeTextureSize",n.attributeView.size),e.setUniform1i("u_attributeData0",s),e.setUniform1i("u_attributeData1",o),e.setUniform1i("u_attributeData2",a),e.setUniform1i("u_attributeData3",r)}_setSizeVVUniforms(e,t,i,s){if(e.vvSizeMinMaxValue&&t.setUniform4fv("u_vvSizeMinMaxValue",i.vvSizeMinMaxValue),e.vvSizeScaleStops&&t.setUniform1f("u_vvSizeScaleStopsValue",i.vvSizeScaleStopsValue),e.vvSizeFieldStops){const e=i.getSizeVVFieldStops(s.key.level);t.setUniform1fv("u_vvSizeFieldStopsValues",e.values),t.setUniform1fv("u_vvSizeFieldStopsSizes",e.sizes)}e.vvSizeUnitValue&&t.setUniform1f("u_vvSizeUnitValueWorldToPixelsRatio",i.vvSizeUnitValueToPixelsRatio)}_setColorAndOpacityVVUniforms(e,t,i){e.vvColor&&(t.setUniform1fv("u_vvColorValues",i.vvColorValues),t.setUniform4fv("u_vvColors",i.vvColors)),e.vvOpacity&&(t.setUniform1fv("u_vvOpacityValues",i.vvOpacityValues),t.setUniform1fv("u_vvOpacities",i.vvOpacities))}_setRotationVVUniforms(e,t,i){e.vvRotation&&t.setUniform1f("u_vvRotationType","geographic"===i.vvMaterialParameters.vvRotationType?0:1)}_getTriangleDesc(e,t,i=["a_pos"]){const s=t.bufferLayouts.geometry,o=i.map((e=>s.findIndex((t=>t.name===e)))),a=`${e}-${o.join("-")}`;let r=this._computeDesc.get(a);if(!r){const e=t.strides,i=t.strides.geometry,n=new Map(t.attributes),v=s.map((e=>({...e}))),u=Math.max(...t.attributes.values()),f={geometry:v};let m=0;for(const t of o){const e=s[t];f.geometry.push({count:e.count,name:e.name+"1",divisor:e.divisor,normalized:e.normalized,offset:i+e.offset,stride:i,type:e.type}),f.geometry.push({count:e.count,name:e.name+"2",divisor:e.divisor,normalized:e.normalized,offset:2*i+e.offset,stride:i,type:e.type}),n.set(e.name+"1",u+ ++m),n.set(e.name+"2",u+ ++m)}r={bufferLayouts:f,attributes:n,strides:e},this._computeDesc.set(a,r)}return r}}export{f as default};
5
+ import{isNone as e,isSome as t}from"../../../../../core/maybe.js";import{MIN_MAX_ZOOM_PRECISION_FACTOR as i,TEXTURE_BINDING_ATTRIBUTE_DATA_0 as s,TEXTURE_BINDING_ATTRIBUTE_DATA_1 as o,TEXTURE_BINDING_ATTRIBUTE_DATA_2 as a,TEXTURE_BINDING_ATTRIBUTE_DATA_3 as r}from"../definitions.js";import n from"./WGLBrush.js";import{MaterialKeyBase as m}from"../materialKey/MaterialKey.js";import{BlendFactor as u,CompareFunction as v}from"../../../../webgl/enums.js";class f extends n{constructor(){super(...arguments),this._computeDesc=new Map}prepareState({context:e},t,i){i&&i.includes("hittest")?e.setBlendFunctionSeparate(u.ONE,u.ONE,u.ONE,u.ONE):e.setBlendFunctionSeparate(u.ONE,u.ONE_MINUS_SRC_ALPHA,u.ONE,u.ONE_MINUS_SRC_ALPHA),e.setBlendingEnabled(!0),e.setColorMask(!0,!0,!0,!0),e.setStencilWriteMask(0),e.setStencilTestEnabled(!0),e.setStencilFunction(v.EQUAL,t.stencilRef,255)}draw(t,i,s){const o=this.getGeometryType();i.commit(t);const a=i.getGeometry(o);e(a)||(t.timeline.begin(this.name),t.attributeView.bindTextures(t.context),a.forEachCommand((e=>{const o=m.load(e.materialKey).symbologyType;this.supportsSymbology(o)&&this.drawGeometry(t,i,e,s)})))}_setSharedUniforms(e,n,m){const{displayLevel:u,pixelRatio:v,state:f,passOptions:l}=n;t(l)&&"hittest"===l.type&&(e.setUniform2fv("u_hittestPos",l.position),e.setUniform1f("u_hittestDist",l.distance)),e.setUniform1f("u_pixelRatio",v),e.setUniformMatrix3fv("u_tileMat3",m.transforms.tileMat3),e.setUniformMatrix3fv("u_viewMat3",f.viewMat3),e.setUniformMatrix3fv("u_dvsMat3",m.transforms.dvs),e.setUniformMatrix3fv("u_displayViewMat3",f.displayViewMat3),e.setUniform1f("u_currentZoom",Math.round(u*i)),e.setUniform1i("u_attributeTextureSize",n.attributeView.size),e.setUniform1i("u_attributeData0",s),e.setUniform1i("u_attributeData1",o),e.setUniform1i("u_attributeData2",a),e.setUniform1i("u_attributeData3",r)}_setSizeVVUniforms(e,t,i,s){if(e.vvSizeMinMaxValue&&t.setUniform4fv("u_vvSizeMinMaxValue",i.vvSizeMinMaxValue),e.vvSizeScaleStops&&t.setUniform1f("u_vvSizeScaleStopsValue",i.vvSizeScaleStopsValue),e.vvSizeFieldStops){const e=i.getSizeVVFieldStops(s.key.level);t.setUniform1fv("u_vvSizeFieldStopsValues",e.values),t.setUniform1fv("u_vvSizeFieldStopsSizes",e.sizes)}e.vvSizeUnitValue&&t.setUniform1f("u_vvSizeUnitValueWorldToPixelsRatio",i.vvSizeUnitValueToPixelsRatio)}_setColorAndOpacityVVUniforms(e,t,i){e.vvColor&&(t.setUniform1fv("u_vvColorValues",i.vvColorValues),t.setUniform4fv("u_vvColors",i.vvColors)),e.vvOpacity&&(t.setUniform1fv("u_vvOpacityValues",i.vvOpacityValues),t.setUniform1fv("u_vvOpacities",i.vvOpacities))}_setRotationVVUniforms(e,t,i){e.vvRotation&&t.setUniform1f("u_vvRotationType","geographic"===i.vvMaterialParameters.vvRotationType?0:1)}_getTriangleDesc(e,t,i=["a_pos"]){const s=t.bufferLayouts.geometry,o=i.map((e=>s.findIndex((t=>t.name===e)))),a=`${e}-${o.join("-")}`;let r=this._computeDesc.get(a);if(!r){const e=t.strides,i=t.strides.geometry,n=new Map(t.attributes),m=s.map((e=>({...e}))),u=Math.max(...t.attributes.values()),v={geometry:m};let f=0;for(const t of o){const e=s[t];v.geometry.push({count:e.count,name:e.name+"1",divisor:e.divisor,normalized:e.normalized,offset:i+e.offset,stride:i,type:e.type}),v.geometry.push({count:e.count,name:e.name+"2",divisor:e.divisor,normalized:e.normalized,offset:2*i+e.offset,stride:i,type:e.type}),n.set(e.name+"1",u+ ++f),n.set(e.name+"2",u+ ++f)}r={bufferLayouts:v,attributes:n,strides:e},this._computeDesc.set(a,r)}return r}}export{f 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.24/esri/copyright.txt for details.
4
4
  */
5
- import{disposeMaybe as e,isSome as t,isNone as o}from"../../../../../core/maybe.js";import r from"../../../../../core/RandomLCG.js";import{TEXTURE_BINDING_RENDERER_0 as i,TEXTURE_BINDING_RENDERER_1 as s,TILE_SIZE as n}from"../definitions.js";import{WGLGeometryType as a,WGLSymbologyType as d}from"../enums.js";import{createProgramDescriptor as l}from"../Utils.js";import _ from"./WGLGeometryBrush.js";import{FillMaterialKey as m}from"../materialKey/MaterialKey.js";import{BufferObject as u}from"../../../../webgl/BufferObject.js";import{PrimitiveType as c,DataType as f,TextureType as T,PixelFormat as h,PixelType as p,TextureSamplingMode as y,TextureWrapMode as x,TargetType as D,DepthStencilTargetType as E,RenderbufferFormat as g,Usage as S}from"../../../../webgl/enums.js";import{FramebufferObject as w}from"../../../../webgl/FramebufferObject.js";import{Renderbuffer as O}from"../../../../webgl/Renderbuffer.js";import{Texture as U}from"../../../../webgl/Texture.js";import{VertexArrayObject as b}from"../../../../webgl/VertexArrayObject.js";const N=e=>{const t={geometry:[{location:0,name:"a_pos",count:2,type:f.SHORT},{location:1,name:"a_id",count:3,type:f.UNSIGNED_BYTE},{location:2,name:"a_bitset",count:1,type:f.UNSIGNED_BYTE},{location:3,name:"a_color",count:4,type:f.UNSIGNED_BYTE,normalized:!0},{location:4,name:"a_aux1",count:4,type:f.UNSIGNED_SHORT},{location:5,name:"a_aux2",count:4,type:f.UNSIGNED_BYTE},{location:6,name:"a_aux3",count:4,type:f.UNSIGNED_BYTE},{location:7,name:"a_zoomRange",count:2,type:f.UNSIGNED_SHORT}]};switch(e.symbologyType){case d.DOT_DENSITY:t.geometry.splice(3,t.geometry.length,{location:3,name:"a_inverseArea",count:1,type:f.FLOAT});break;case d.SIMPLE:case d.OUTLINE_FILL_SIMPLE:t.geometry.splice(7,1),t.geometry.splice(4,1)}return l(e.data,t)};class I extends _{constructor(){super(...arguments),this._dotTextureSize=0,this._dotTextures=null,this._dotSamplers=new Int32Array([i,s]),this._dotVAO=null,this._dotDesc={vsPath:"dot/dot",fsPath:"dot/dot",attributes:new Map([["a_pos",0]])}}dispose(){this._disposeTextures(),this._dotFBO=e(this._dotFBO),this._dotVAO=e(this._dotVAO)}getGeometryType(){return a.FILL}drawGeometry(e,o,r,i){const{context:s,painter:n,rendererInfo:a,requiredLevel:l,passOptions:_,requestRender:u}=e,T=m.load(r.materialKey),h=t(_)&&"hittest"===_.type,p=n.materialManager;let y=c.TRIANGLES,x=N(T);h&&(x=this._getTriangleDesc(r.materialKey,x),y=c.POINTS);const{attributes:D,bufferLayouts:E}=x,g=p.getMaterialProgram(e,T,"materials/fill",D,i);if(t(u)&&!h&&!g.isCompiled)return void u();if(s.useProgram(g),this._setSharedUniforms(g,e,o),g.setUniform2f("u_tileOffset",512*o.key.col,512*o.key.row),T.textureBinding){n.textureManager.bindTextures(s,g,T);const e=1/2**(l-o.key.level);g.setUniform1f("u_zoomFactor",e)}const S=1/e.pixelRatio;g.setUniform1f("u_blur",S),g.setUniform1f("u_antialiasing",S),this._setSizeVVUniforms(T,g,a,o),this._setColorAndOpacityVVUniforms(T,g,a);const w=r.target.getVAO(s,E,D,h);let O=r.indexCount,U=r.indexFrom*Uint32Array.BYTES_PER_ELEMENT;if(h&&(O/=3,U/=3),s.bindVAO(w),T.symbologyType!==d.DOT_DENSITY||h)s.drawElements(y,O,f.UNSIGNED_INT,U);else{const t=this._drawDotLocations(e,o,g,O,U);this._drawDotDensity(e,o,t)}}_drawDotDensity(e,o,r){const{context:i,painter:s,rendererInfo:n,requestRender:a}=e,d=s.materialManager.getProgram(this._dotDesc);if(t(a)&&!d.isCompiled)return void a();const l=this._createDotDensityMesh(i,this._dotDesc.attributes,{geometry:[{name:"a_pos",count:2,type:f.SHORT,divisor:0,normalized:!1,offset:0,stride:4}]});i.setStencilTestEnabled(!0),i.useProgram(d),d.setUniform1f("u_tileZoomFactor",1),d.setUniform1i("u_texture",this._dotSamplers[0]),d.setUniform1f("u_dotSize",Math.max(n.ddDotSize,1)),d.setUniform1f("u_pixelRatio",window.devicePixelRatio),this._setSharedUniforms(d,e,o),i.bindTexture(r,this._dotSamplers[0]),i.bindVAO(l),i.drawArrays(c.POINTS,0,262144)}_drawDotLocations(e,t,o,r,i){const{context:s,rendererInfo:a,requiredLevel:d}=e,l=s.getViewport();s.setViewport(0,0,512,512);const _=s.getBoundFramebufferObject(),m=this._createFBO(s);s.bindFramebuffer(m),s.setClearColor(0,0,0,0),s.clear(s.gl.COLOR_BUFFER_BIT|s.gl.STENCIL_BUFFER_BIT),s.setStencilTestEnabled(!1);const u=1/2**(d-t.key.level),T=n,h=T*window.devicePixelRatio*T*window.devicePixelRatio,p=1/u*(1/u),y=a.ddDotScale?e.state.scale/a.ddDotScale:1;return o.setUniform1f("u_tileZoomFactor",u),o.setUniform1f("u_tileDotsOverArea",h/(n*window.devicePixelRatio*n*window.devicePixelRatio)),o.setUniformMatrix4fv("u_dotColors",a.ddColors),o.setUniform4fv("u_isActive",a.ddActiveDots),o.setUniform4fv("u_dotBackgroundColor",a.ddBackgroundColor),o.setUniform1f("u_dotValue",Math.max(1,a.ddDotValue*y*p)),this._bindDotDensityTextures(s,o,a,T),s.drawElements(c.TRIANGLES,r,f.UNSIGNED_INT,i),s.setViewport(l.x,l.y,l.width,l.height),s.bindFramebuffer(_),m.colorTexture}_createFBO(e){if(o(this._dotFBO)){const t=512,o=512,r={target:T.TEXTURE_2D,pixelFormat:h.RGBA,dataType:p.UNSIGNED_BYTE,samplingMode:y.NEAREST,wrapMode:x.CLAMP_TO_EDGE,width:t,height:o},i={colorTarget:D.TEXTURE,depthStencilTarget:E.DEPTH_STENCIL_RENDER_BUFFER},s=new O(e,{width:t,height:o,internalFormat:g.DEPTH_STENCIL});this._dotFBO=new w(e,i,r,s)}return this._dotFBO}_disposeTextures(){if(this._dotTextures){for(let e=0;e<this._dotTextures.length;e++)this._dotTextures[e].dispose();this._dotTextures=null}}_bindDotDensityTextures(e,t,o,r){const i=this._createDotDensityTextures(e,r,o.ddSeed);t.setUniform1iv("u_dotTextures",this._dotSamplers);for(let s=0;s<i.length;s++)e.bindTexture(i[s],this._dotSamplers[s])}_createDotDensityMesh(e,t,r){if(o(this._dotVAO)){const o=2,i=new Int16Array(262144*o);for(let e=0;e<512;e++)for(let t=0;t<512;t++)i[o*(t+512*e)]=t,i[o*(t+512*e)+1]=e;const s=u.createVertex(e,S.STATIC_DRAW,i);this._dotVAO=new b(e,t,r,{geometry:s},null)}return this._dotVAO}_createDotDensityTextures(e,t,o){if(this._dotTextureSize===t&&this._seed===o||(this._disposeTextures(),this._dotTextureSize=t,this._seed=o),null===this._dotTextures){const i=new r(o);this._dotTextures=[this._allocDotDensityTexture(e,t,i),this._allocDotDensityTexture(e,t,i)]}return this._dotTextures}_allocDotDensityTexture(e,t,o){const r=new Float32Array(t*t*4);for(let i=0;i<r.length;i++)r[i]=o.getFloat();return new U(e,{wrapMode:x.REPEAT,pixelFormat:h.RGBA,dataType:p.FLOAT,samplingMode:y.NEAREST,width:t,height:t},r)}}export{I as default};
5
+ import{isSome as e,unwrapOr as t}from"../../../../../core/maybe.js";import{WGLGeometryType as o,WGLSymbologyType as r}from"../enums.js";import{createProgramDescriptor as a}from"../Utils.js";import i from"./WGLGeometryBrush.js";import{FillMaterialKey as n}from"../materialKey/MaterialKey.js";import{getTechniqueFromMaterialKey as s}from"../techniques/utils.js";import{PrimitiveType as m,DataType as l}from"../../../../webgl/enums.js";function u(e){const t={geometry:[{location:0,name:"a_pos",count:2,type:l.SHORT},{location:1,name:"a_id",count:3,type:l.UNSIGNED_BYTE},{location:2,name:"a_bitset",count:1,type:l.UNSIGNED_BYTE},{location:3,name:"a_color",count:4,type:l.UNSIGNED_BYTE,normalized:!0},{location:4,name:"a_aux1",count:4,type:l.UNSIGNED_SHORT},{location:5,name:"a_aux2",count:4,type:l.UNSIGNED_BYTE},{location:6,name:"a_aux3",count:4,type:l.UNSIGNED_BYTE},{location:7,name:"a_zoomRange",count:2,type:l.UNSIGNED_SHORT}]};switch(e.symbologyType){case r.SIMPLE:case r.OUTLINE_FILL_SIMPLE:t.geometry.splice(7,1),t.geometry.splice(4,1)}return{shader:"materials/fill",vertexLayout:t}}class c extends i{dispose(){}getGeometryType(){return o.FILL}supportsSymbology(e){return e!==r.DOT_DENSITY}drawGeometry(o,r,i,l){const{context:c,painter:y,rendererInfo:p,requiredLevel:_,passOptions:f,requestRender:d}=o,E=n.load(i.materialKey),N=s(E.data),S=e(f)&&"hittest"===f.type,g=y.materialManager,{shader:T,vertexLayout:I,hittestAttributes:U}=t(N.programSpec,u(E));let x=m.TRIANGLES,L=a(E.data,I);S&&(L=this._getTriangleDesc(i.materialKey,L,U),x=m.POINTS);const{attributes:h,bufferLayouts:G}=L,b=g.getMaterialProgram(o,E,T,h,l);if(e(d)&&!S&&!b.isCompiled)return void d();if(c.useProgram(b),this._setSharedUniforms(b,o,r),b.setUniform2f("u_tileOffset",512*r.key.col,512*r.key.row),E.textureBinding){y.textureManager.bindTextures(c,b,E);const e=1/2**(_-r.key.level);b.setUniform1f("u_zoomFactor",e)}const D=1/o.pixelRatio;b.setUniform1f("u_blur",D),b.setUniform1f("u_antialiasing",D),this._setSizeVVUniforms(E,b,p,r),this._setColorAndOpacityVVUniforms(E,b,p);const O=i.target.getVAO(c,G,h,S);let B=i.indexCount,R=i.indexFrom*Uint32Array.BYTES_PER_ELEMENT;S&&(B/=3,R/=3),c.bindVAO(O),this._drawFills(o,r,b,x,B,R)}_drawFills(e,t,o,r,a,i){e.context.drawElements(r,a,l.UNSIGNED_INT,i)}}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.24/esri/copyright.txt for details.
4
4
  */
5
- import{isSome as e}from"../../../../../core/maybe.js";import{WGLGeometryType as t}from"../enums.js";import{createProgramDescriptor as o}from"../Utils.js";import a from"./WGLGeometryBrush.js";import{LabelMaterialKey as n}from"../materialKey/MaterialKey.js";import{DataType as r,CompareFunction as i,PrimitiveType as s}from"../../../../webgl/enums.js";const m=e=>o(e.data,{geometry:[{location:0,name:"a_pos",count:2,type:r.SHORT},{location:1,name:"a_id",count:4,type:r.UNSIGNED_BYTE},{location:2,name:"a_color",count:4,type:r.UNSIGNED_BYTE,normalized:!0},{location:3,name:"a_haloColor",count:4,type:r.UNSIGNED_BYTE,normalized:!0},{location:4,name:"a_texAndSize",count:4,type:r.UNSIGNED_BYTE},{location:5,name:"a_refSymbolAndPlacementOffset",count:4,type:r.UNSIGNED_BYTE},{location:6,name:"a_glyphData",count:4,type:r.UNSIGNED_BYTE},{location:7,name:"a_vertexOffset",count:2,type:r.SHORT},{location:8,name:"a_texCoords",count:2,type:r.UNSIGNED_SHORT}]});class l extends a{dispose(){}getGeometryType(){return t.LABEL}drawGeometry(t,o,a,l){const{context:c,painter:d,state:f,rendererInfo:u,passOptions:p,requestRender:y}=t,_=n.load(a.materialKey),E=e(p)&&"hittest"===p.type,N=_.mapAligned?1:0;if(!N&&Math.abs(o.key.level-Math.round(100*t.displayLevel)/100)>=1)return;const{bufferLayouts:S,attributes:U}=m(_),T=d.materialManager.getMaterialProgram(t,_,"materials/label",U,l);if(e(y)&&!E&&!T.isCompiled)return void y();t.context.setStencilFunction(i.EQUAL,0,255),c.useProgram(T),this._setSharedUniforms(T,t,o),d.textureManager.bindTextures(c,T,_);const G=1===N?f.displayViewMat3:f.displayMat3;this._setSizeVVUniforms(_,T,u,o),T.setUniform1f("u_mapRotation",Math.floor(f.rotation/360*254)),T.setUniform1f("u_mapAligned",N),T.setUniformMatrix3fv("u_displayMat3",G),T.setUniform1f("u_opacity",1),T.setUniform2fv("u_screenSize",t.state.size),T.setUniform1f("u_isHalo",1);const g=a.target.getVAO(c,S,U),I=a.indexFrom*Uint32Array.BYTES_PER_ELEMENT;c.bindVAO(g),c.drawElements(s.TRIANGLES,a.indexCount,r.UNSIGNED_INT,I),T.setUniform1f("u_isHalo",0),c.drawElements(s.TRIANGLES,a.indexCount,r.UNSIGNED_INT,I),c.setStencilTestEnabled(!0),c.setBlendingEnabled(!0)}}export{l as default};
5
+ import{isSome as e}from"../../../../../core/maybe.js";import{WGLGeometryType as t}from"../enums.js";import{createProgramDescriptor as o}from"../Utils.js";import a from"./WGLGeometryBrush.js";import{LabelMaterialKey as n}from"../materialKey/MaterialKey.js";import{DataType as r,CompareFunction as i,PrimitiveType as s}from"../../../../webgl/enums.js";const m=e=>o(e.data,{geometry:[{location:0,name:"a_pos",count:2,type:r.SHORT},{location:1,name:"a_id",count:4,type:r.UNSIGNED_BYTE},{location:2,name:"a_color",count:4,type:r.UNSIGNED_BYTE,normalized:!0},{location:3,name:"a_haloColor",count:4,type:r.UNSIGNED_BYTE,normalized:!0},{location:4,name:"a_texAndSize",count:4,type:r.UNSIGNED_BYTE},{location:5,name:"a_refSymbolAndPlacementOffset",count:4,type:r.UNSIGNED_BYTE},{location:6,name:"a_glyphData",count:4,type:r.UNSIGNED_BYTE},{location:7,name:"a_vertexOffset",count:2,type:r.SHORT},{location:8,name:"a_texCoords",count:2,type:r.UNSIGNED_SHORT}]});class l extends a{dispose(){}getGeometryType(){return t.LABEL}supportsSymbology(e){return!0}drawGeometry(t,o,a,l){const{context:u,painter:p,state:c,rendererInfo:d,passOptions:f,requestRender:y}=t,_=n.load(a.materialKey),E=e(f)&&"hittest"===f.type,N=_.mapAligned?1:0;if(!N&&Math.abs(o.key.level-Math.round(100*t.displayLevel)/100)>=1)return;const{bufferLayouts:S,attributes:U}=m(_),T=p.materialManager.getMaterialProgram(t,_,"materials/label",U,l);if(e(y)&&!E&&!T.isCompiled)return void y();t.context.setStencilFunction(i.EQUAL,0,255),u.useProgram(T),this._setSharedUniforms(T,t,o),p.textureManager.bindTextures(u,T,_);const g=1===N?c.displayViewMat3:c.displayMat3;this._setSizeVVUniforms(_,T,d,o),T.setUniform1f("u_mapRotation",Math.floor(c.rotation/360*254)),T.setUniform1f("u_mapAligned",N),T.setUniformMatrix3fv("u_displayMat3",g),T.setUniform1f("u_opacity",1),T.setUniform2fv("u_screenSize",t.state.size),T.setUniform1f("u_isHalo",1);const G=a.target.getVAO(u,S,U),I=a.indexFrom*Uint32Array.BYTES_PER_ELEMENT;u.bindVAO(G),u.drawElements(s.TRIANGLES,a.indexCount,r.UNSIGNED_INT,I),T.setUniform1f("u_isHalo",0),u.drawElements(s.TRIANGLES,a.indexCount,r.UNSIGNED_INT,I),u.setStencilTestEnabled(!0),u.setBlendingEnabled(!0)}}export{l 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.24/esri/copyright.txt for details.
4
4
  */
5
- import{isSome as e}from"../../../../../core/maybe.js";import{WGLGeometryType as t}from"../enums.js";import{createProgramDescriptor as o}from"../Utils.js";import a from"./WGLGeometryBrush.js";import{LineMaterialKey as n}from"../materialKey/MaterialKey.js";import{DataType as r,PrimitiveType as i}from"../../../../webgl/enums.js";const s=e=>o(e.data,{geometry:[{location:0,name:"a_pos",count:2,type:r.SHORT},{location:1,name:"a_id",count:4,type:r.UNSIGNED_BYTE},{location:2,name:"a_color",count:4,type:r.UNSIGNED_BYTE,normalized:!0},{location:3,name:"a_offsetAndNormal",count:4,type:r.BYTE},{location:4,name:"a_accumulatedDistanceAndHalfWidth",count:2,type:r.UNSIGNED_SHORT},{location:5,name:"a_tlbr",count:4,type:r.UNSIGNED_SHORT},{location:6,name:"a_segmentDirection",count:4,type:r.BYTE},{location:7,name:"a_aux",count:2,type:r.UNSIGNED_SHORT},{location:8,name:"a_zoomRange",count:2,type:r.UNSIGNED_SHORT}]});class m extends a{dispose(){}getGeometryType(){return t.LINE}drawGeometry(t,o,a,m){const{context:l,painter:c,rendererInfo:u,displayLevel:p,passOptions:d,requestRender:y}=t,_=n.load(a.materialKey),f=e(d)&&"hittest"===d.type;let E=s(_),N=i.TRIANGLES;f&&(E=this._getTriangleDesc(a.materialKey,E),N=i.POINTS);const{attributes:g,bufferLayouts:S}=E,T=c.materialManager.getMaterialProgram(t,_,"materials/line",g,m);if(e(y)&&!f&&!T.isCompiled)return void y();const U=1/t.pixelRatio,G=0;l.useProgram(T),this._setSharedUniforms(T,t,o),_.textureBinding&&c.textureManager.bindTextures(l,T,_);const I=2**(p-o.key.level);T.setUniform1f("u_zoomFactor",I),T.setUniform1f("u_blur",G+U),T.setUniform1f("u_antialiasing",U),this._setSizeVVUniforms(_,T,u,o),this._setColorAndOpacityVVUniforms(_,T,u),l.setFaceCullingEnabled(!1);const x=a.target.getVAO(l,S,g,f);let D=a.indexCount,O=a.indexFrom*Uint32Array.BYTES_PER_ELEMENT;f&&(D/=3,O/=3),l.bindVAO(x),l.drawElements(N,D,r.UNSIGNED_INT,O)}}export{m as default};
5
+ import{isSome as e}from"../../../../../core/maybe.js";import{WGLGeometryType as t}from"../enums.js";import{createProgramDescriptor as o}from"../Utils.js";import a from"./WGLGeometryBrush.js";import{LineMaterialKey as n}from"../materialKey/MaterialKey.js";import{DataType as r,PrimitiveType as i}from"../../../../webgl/enums.js";const s=e=>o(e.data,{geometry:[{location:0,name:"a_pos",count:2,type:r.SHORT},{location:1,name:"a_id",count:4,type:r.UNSIGNED_BYTE},{location:2,name:"a_color",count:4,type:r.UNSIGNED_BYTE,normalized:!0},{location:3,name:"a_offsetAndNormal",count:4,type:r.BYTE},{location:4,name:"a_accumulatedDistanceAndHalfWidth",count:2,type:r.UNSIGNED_SHORT},{location:5,name:"a_tlbr",count:4,type:r.UNSIGNED_SHORT},{location:6,name:"a_segmentDirection",count:4,type:r.BYTE},{location:7,name:"a_aux",count:2,type:r.UNSIGNED_SHORT},{location:8,name:"a_zoomRange",count:2,type:r.UNSIGNED_SHORT}]});class m extends a{dispose(){}getGeometryType(){return t.LINE}supportsSymbology(e){return!0}drawGeometry(t,o,a,m){const{context:l,painter:c,rendererInfo:u,displayLevel:p,passOptions:y,requestRender:d}=t,_=n.load(a.materialKey),f=e(y)&&"hittest"===y.type;let E=s(_),N=i.TRIANGLES;f&&(E=this._getTriangleDesc(a.materialKey,E),N=i.POINTS);const{attributes:g,bufferLayouts:S}=E,T=c.materialManager.getMaterialProgram(t,_,"materials/line",g,m);if(e(d)&&!f&&!T.isCompiled)return void d();const U=1/t.pixelRatio,G=0;l.useProgram(T),this._setSharedUniforms(T,t,o),_.textureBinding&&c.textureManager.bindTextures(l,T,_);const I=2**(p-o.key.level);T.setUniform1f("u_zoomFactor",I),T.setUniform1f("u_blur",G+U),T.setUniform1f("u_antialiasing",U),this._setSizeVVUniforms(_,T,u,o),this._setColorAndOpacityVVUniforms(_,T,u),l.setFaceCullingEnabled(!1);const b=a.target.getVAO(l,S,g,f);let x=a.indexCount,D=a.indexFrom*Uint32Array.BYTES_PER_ELEMENT;f&&(x/=3,D/=3),l.bindVAO(b),l.drawElements(N,x,r.UNSIGNED_INT,D)}}export{m 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.24/esri/copyright.txt for details.
4
4
  */
5
- import{disposeMaybe as e,isSome as t}from"../../../../../core/maybe.js";import{WGLGeometryType as a,WGLSymbologyType as r,HeatmapMode as i}from"../enums.js";import{createProgramDescriptor as o}from"../Utils.js";import m from"../VertexStream.js";import n from"./WGLGeometryBrush.js";import{MarkerMaterialKey as s}from"../materialKey/MaterialKey.js";import{ContextType as u}from"../../../../webgl/context-util.js";import{PrimitiveType as l,DataType as p,BlendFactor as h,ClearBufferBit as c,TextureType as _,PixelFormat as d,SizedPixelFormat as f,PixelType as T,TextureSamplingMode as R,TextureWrapMode as A}from"../../../../webgl/enums.js";import{FramebufferObject as E}from"../../../../webgl/FramebufferObject.js";import{Texture as g}from"../../../../webgl/Texture.js";const x={heatmapResolve:{vsPath:"heatmap/heatmapResolve",fsPath:"heatmap/heatmapResolve",attributes:new Map([["a_position",0]])},heatmapAccumulate:{materialPath:"materials/icon/heatmapAccumulate",getProgramDescriptor:e=>o(e.data,{geometry:[{location:0,name:"a_pos",count:2,type:p.SHORT},{location:1,name:"a_vertexOffset",count:2,type:p.SHORT},{location:4,name:"a_id",count:4,type:p.UNSIGNED_BYTE}]})},icon:{materialPath:"materials/icon",getProgramDescriptor:e=>o(e.data,{geometry:[{location:0,name:"a_pos",count:2,type:p.SHORT},{location:1,name:"a_vertexOffset",count:2,type:p.SHORT},{location:2,name:"a_texCoords",count:2,type:p.UNSIGNED_SHORT},{location:3,name:"a_bitSetAndDistRatio",count:2,type:p.UNSIGNED_SHORT},{location:4,name:"a_id",count:4,type:p.UNSIGNED_BYTE},{location:5,name:"a_color",count:4,type:p.UNSIGNED_BYTE,normalized:!0},{location:6,name:"a_outlineColor",count:4,type:p.UNSIGNED_BYTE,normalized:!0},{location:7,name:"a_sizeAndOutlineWidth",count:4,type:p.UNSIGNED_BYTE},{location:8,name:"a_zoomRange",count:2,type:p.UNSIGNED_SHORT}]})}};function y({heatmapMode:e}){return e===i.GAUSSIAN_BLUR?["heatmapKernelTexture"]:[]}class G extends n{dispose(){this._heatmapAccumulateOutputTexture=e(this._heatmapAccumulateOutputTexture),this._heatmapAccumulateKernelTexture=e(this._heatmapAccumulateKernelTexture),this._heatmapAccumulateFramebuffer=e(this._heatmapAccumulateFramebuffer),this._heatmapResolveGradientTexture=e(this._heatmapResolveGradientTexture),this._tileQuad=e(this._tileQuad)}getGeometryType(){return a.MARKER}drawGeometry(e,a,i,o){const{context:m,painter:n,rendererInfo:u,state:h,passOptions:c,requestRender:_}=e,d=s.load(i.materialKey),f=t(c)&&"hittest"===c.type,T=d.symbologyType===r.HEATMAP;if(T){if(o&&o.includes("highlight"))return;const e=y(u);o=o?[...o,...e]:e}let R;if(d.symbologyType===r.HEATMAP)R=x.heatmapAccumulate;else R=x.icon;const{materialPath:A,getProgramDescriptor:E}=R;let g=l.TRIANGLES,G=E(d);f&&(G=T?this._getTriangleDesc(i.materialKey,G):this._getTriangleDesc(i.materialKey,G,["a_vertexOffset","a_texCoords"]),g=l.POINTS);const{attributes:N,bufferLayouts:S}=G,U=n.materialManager.getMaterialProgram(e,d,A,N,o);if(t(_)&&!f&&!U.isCompiled)return void _();m.useProgram(U),d.textureBinding&&n.textureManager.bindTextures(m,U,d,!0),this._setSharedUniforms(U,e,a);const O=d.vvRotation?h.displayViewMat3:h.displayMat3;U.setUniformMatrix3fv("u_displayMat3",O),this._setSizeVVUniforms(d,U,u,a),this._setColorAndOpacityVVUniforms(d,U,u),this._setRotationVVUniforms(d,U,u);const I=i.target.getVAO(m,S,N,f);let M=i.indexCount,b=i.indexFrom*Uint32Array.BYTES_PER_ELEMENT;f&&(M/=3,b/=3),m.bindVAO(I);const B=m.getBoundFramebufferObject(),v=m.getViewport();T&&this._drawHeatmapAccumulate(e,a,U,f),m.drawElements(g,M,p.UNSIGNED_INT,b),T&&!f&&this._drawHeatmapResolve(e,a,B,v)}_drawHeatmapAccumulate(e,t,a,r){const{context:o,rendererInfo:m,state:n,displayLevel:s}=e,{heatmapMode:u,heatmapReferenceScale:l,heatmapBlurRadius:p}=m;this._loadHeatmapResources(o,m),this._updateHeatmapResources(o,m);const _=p*(u===i.GAUSSIAN_BLUR?3:1)*(0!==l?l/n.scale:1)*2**(t.key.level-s);a.setUniform1f("u_heatmapRadius",_),r||(o.bindFramebuffer(this._heatmapAccumulateFramebuffer),u===i.GAUSSIAN_BLUR&&(o.bindTexture(this._heatmapAccumulateKernelTexture,7),a.setUniform1i("u_heatmapKernelTexture",7)),a.setUniform1f("u_heatmapIsFieldActive",m.heatmapIsFieldActive),o.setViewport(0,0,this._heatmapAccumulateFramebuffer.width,this._heatmapAccumulateFramebuffer.height),o.setBlendingEnabled(!0),o.setBlendFunction(h.ONE,h.ONE),o.setClearColor(0,0,0,0),o.clear(c.COLOR_BUFFER_BIT))}_drawHeatmapResolve(e,t,a,r){const{context:o,painter:m,rendererInfo:n}=e,{heatmapMode:s,heatmapBlurRadius:u,heatmapMinPixelIntensity:l,heatmapPixelIntensityRange:p}=n,c=m.materialManager.getProgram(x.heatmapResolve,y(n));o.useProgram(c),this._setSharedUniforms(c,e,t),o.bindFramebuffer(a),o.setViewport(0,0,r.width,r.height),o.setBlendFunction(h.ONE,h.ONE_MINUS_SRC_ALPHA),o.bindTexture(this._heatmapAccumulateOutputTexture,8),o.bindTexture(this._heatmapResolveGradientTexture,9),c.setUniform1i("u_texture",8),c.setUniform1i("u_gradient",9),c.setUniform2f("u_pixelIntensityMinAndInvRange",l,1/p),s===i.KERNEL_DENSITY&&c.setUniform1f("u_densityNormalization",3/(u*u*Math.PI)),this._tileQuad.draw()}_loadHeatmapResources(e,t){const a=e.type===u.WEBGL2,{heatmapMode:r,heatmapShadingRate:o}=t;(null!=this._heatmapAccumulateOutputTexture||(this._heatmapAccumulateOutputTexture=new g(e,{target:_.TEXTURE_2D,pixelFormat:a?d.RED:d.RGBA,internalFormat:a?f.R32F:d.RGBA,dataType:T.FLOAT,samplingMode:R.LINEAR,wrapMode:A.CLAMP_TO_EDGE,width:Math.round(512*o),height:Math.round(512*o)})),r===i.GAUSSIAN_BLUR)&&(null!=this._heatmapAccumulateKernelTexture||(this._heatmapAccumulateKernelTexture=new g(e,{target:_.TEXTURE_2D,pixelFormat:a?d.RED:d.RGBA,internalFormat:a?f.R32F:d.RGBA,dataType:T.FLOAT,samplingMode:R.LINEAR,wrapMode:A.CLAMP_TO_EDGE})));null!=this._heatmapAccumulateFramebuffer||(this._heatmapAccumulateFramebuffer=new E(e,{},this._heatmapAccumulateOutputTexture)),null!=this._heatmapResolveGradientTexture||(this._heatmapResolveGradientTexture=new g(e,{target:_.TEXTURE_2D,pixelFormat:d.RGBA,dataType:T.UNSIGNED_BYTE,samplingMode:R.LINEAR,wrapMode:A.CLAMP_TO_EDGE})),null!=this._tileQuad||(this._tileQuad=new m(e,[0,0,1,0,0,1,1,1]))}_updateHeatmapResources(e,t){const{heatmapMode:a,heatmapBlurRadius:r,heatmapKernel:o,heatmapGradientHash:m,heatmapGradient:n}=t;if(a===i.GAUSSIAN_BLUR&&this._heatmapPrevBlurRadius!==r){const t=e.type===u.WEBGL2?1:4;this._heatmapAccumulateKernelTexture.resize(o.length/t,1),this._heatmapAccumulateKernelTexture.setData(o),this._heatmapPrevBlurRadius=r}this._heatmapPrevGradientHash!==m&&(this._heatmapResolveGradientTexture.resize(n.length/4,1),this._heatmapResolveGradientTexture.setData(n),this._heatmapPrevGradientHash=m)}}export{G as default};
5
+ import{isSome as t,unwrapOr as e}from"../../../../../core/maybe.js";import{WGLGeometryType as o,WGLSymbologyType as a}from"../enums.js";import{createProgramDescriptor as r}from"../Utils.js";import i from"./WGLGeometryBrush.js";import{MarkerMaterialKey as n}from"../materialKey/MaterialKey.js";import{getTechniqueFromMaterialKey as s}from"../techniques/utils.js";import{DataType as m,PrimitiveType as l}from"../../../../webgl/enums.js";const u={shader:"materials/icon",vertexLayout:{geometry:[{location:0,name:"a_pos",count:2,type:m.SHORT},{location:1,name:"a_vertexOffset",count:2,type:m.SHORT},{location:2,name:"a_texCoords",count:2,type:m.UNSIGNED_SHORT},{location:3,name:"a_bitSetAndDistRatio",count:2,type:m.UNSIGNED_SHORT},{location:4,name:"a_id",count:4,type:m.UNSIGNED_BYTE},{location:5,name:"a_color",count:4,type:m.UNSIGNED_BYTE,normalized:!0},{location:6,name:"a_outlineColor",count:4,type:m.UNSIGNED_BYTE,normalized:!0},{location:7,name:"a_sizeAndOutlineWidth",count:4,type:m.UNSIGNED_BYTE},{location:8,name:"a_zoomRange",count:2,type:m.UNSIGNED_SHORT}]},hittestAttributes:["a_vertexOffset","a_texCoords"]};class d extends i{dispose(){}getGeometryType(){return o.MARKER}supportsSymbology(t){return t!==a.HEATMAP}drawGeometry(o,a,i,m){const{context:d,painter:c,rendererInfo:p,state:y,passOptions:_,requestRender:f}=o,E=n.load(i.materialKey),S=s(E.data),N=t(_)&&"hittest"===_.type,{shader:T,vertexLayout:g,hittestAttributes:x}=e(S.programSpec,u);let h=l.TRIANGLES,U=r(E.data,g);N&&(U=this._getTriangleDesc(i.materialKey,U,x),h=l.POINTS);const{attributes:R,bufferLayouts:G}=U,M=c.materialManager.getMaterialProgram(o,E,T,R,m);if(t(f)&&!N&&!M.isCompiled)return void f();d.useProgram(M),E.textureBinding&&c.textureManager.bindTextures(d,M,E,!0),this._setSharedUniforms(M,o,a);const O=E.vvRotation?y.displayViewMat3:y.displayMat3;M.setUniformMatrix3fv("u_displayMat3",O),this._setSizeVVUniforms(E,M,p,a),this._setColorAndOpacityVVUniforms(E,M,p),this._setRotationVVUniforms(E,M,p);const A=i.target.getVAO(d,G,R,N);let I=i.indexCount,b=i.indexFrom*Uint32Array.BYTES_PER_ELEMENT;N&&(I/=3,b/=3),d.bindVAO(A),this._drawMarkers(o,a,M,h,I,b,N)}_drawMarkers(t,e,o,a,r,i,n){t.context.drawElements(a,r,m.UNSIGNED_INT,i)}}export{d 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.24/esri/copyright.txt for details.
4
4
  */
5
- import{isSome as t}from"../../../../../core/maybe.js";import{WGLGeometryType as e}from"../enums.js";import{createProgramDescriptor as o}from"../Utils.js";import a from"./WGLGeometryBrush.js";import{TextMaterialKey as r}from"../materialKey/MaterialKey.js";import{DataType as n,PrimitiveType as i}from"../../../../webgl/enums.js";const s=t=>o(t.data,{geometry:[{location:0,name:"a_pos",count:2,type:n.SHORT},{location:1,name:"a_id",count:4,type:n.UNSIGNED_BYTE},{location:2,name:"a_color",count:4,type:n.UNSIGNED_BYTE,normalized:!0},{location:3,name:"a_haloColor",count:4,type:n.UNSIGNED_BYTE,normalized:!0},{location:4,name:"a_texFontSize",count:4,type:n.UNSIGNED_BYTE},{location:5,name:"a_aux",count:4,type:n.BYTE},{location:6,name:"a_zoomRange",count:2,type:n.UNSIGNED_SHORT},{location:7,name:"a_vertexOffset",count:2,type:n.SHORT},{location:8,name:"a_texCoords",count:2,type:n.UNSIGNED_SHORT}]});class m extends a{dispose(){}getGeometryType(){return e.TEXT}drawGeometry(e,o,a,m){const{context:l,painter:p,rendererInfo:u,state:d,passOptions:_,requestRender:c}=e,y=r.load(a.materialKey),f=t(_)&&"hittest"===_.type,{bufferLayouts:E,attributes:N}=s(y),T=p.materialManager.getMaterialProgram(e,y,"materials/text",N,m);if(t(c)&&!f&&!T.isCompiled)return void c();l.useProgram(T);let S=i.TRIANGLES;f&&(S=i.POINTS),this._setSharedUniforms(T,e,o),p.textureManager.bindTextures(l,T,y),T.setUniformMatrix3fv("u_displayMat3",d.displayMat3),T.setUniformMatrix3fv("u_displayViewMat3",d.displayViewMat3),this._setSizeVVUniforms(y,T,u,o),this._setColorAndOpacityVVUniforms(y,T,u),this._setRotationVVUniforms(y,T,u),T.setUniform1f("u_isHalo",1);const U=a.target.getVAO(l,E,N),x=a.indexFrom*Uint32Array.BYTES_PER_ELEMENT;l.bindVAO(U),l.drawElements(i.TRIANGLES,a.indexCount,n.UNSIGNED_INT,x),T.setUniform1f("u_isHalo",0),l.drawElements(S,a.indexCount,n.UNSIGNED_INT,x)}}export{m as default};
5
+ import{isSome as t}from"../../../../../core/maybe.js";import{WGLGeometryType as e}from"../enums.js";import{createProgramDescriptor as o}from"../Utils.js";import a from"./WGLGeometryBrush.js";import{TextMaterialKey as r}from"../materialKey/MaterialKey.js";import{DataType as n,PrimitiveType as i}from"../../../../webgl/enums.js";const s=t=>o(t.data,{geometry:[{location:0,name:"a_pos",count:2,type:n.SHORT},{location:1,name:"a_id",count:4,type:n.UNSIGNED_BYTE},{location:2,name:"a_color",count:4,type:n.UNSIGNED_BYTE,normalized:!0},{location:3,name:"a_haloColor",count:4,type:n.UNSIGNED_BYTE,normalized:!0},{location:4,name:"a_texFontSize",count:4,type:n.UNSIGNED_BYTE},{location:5,name:"a_aux",count:4,type:n.BYTE},{location:6,name:"a_zoomRange",count:2,type:n.UNSIGNED_SHORT},{location:7,name:"a_vertexOffset",count:2,type:n.SHORT},{location:8,name:"a_texCoords",count:2,type:n.UNSIGNED_SHORT}]});class m extends a{dispose(){}getGeometryType(){return e.TEXT}supportsSymbology(t){return!0}drawGeometry(e,o,a,m){const{context:l,painter:p,rendererInfo:u,state:y,passOptions:d,requestRender:_}=e,c=r.load(a.materialKey),f=t(d)&&"hittest"===d.type,{bufferLayouts:E,attributes:N}=s(c),S=p.materialManager.getMaterialProgram(e,c,"materials/text",N,m);if(t(_)&&!f&&!S.isCompiled)return void _();l.useProgram(S);let T=i.TRIANGLES;f&&(T=i.POINTS),this._setSharedUniforms(S,e,o),p.textureManager.bindTextures(l,S,c),S.setUniformMatrix3fv("u_displayMat3",y.displayMat3),S.setUniformMatrix3fv("u_displayViewMat3",y.displayViewMat3),this._setSizeVVUniforms(c,S,u,o),this._setColorAndOpacityVVUniforms(c,S,u),this._setRotationVVUniforms(c,S,u),S.setUniform1f("u_isHalo",1);const U=a.target.getVAO(l,E,N),x=a.indexFrom*Uint32Array.BYTES_PER_ELEMENT;l.bindVAO(U),l.drawElements(i.TRIANGLES,a.indexCount,n.UNSIGNED_INT,x),S.setUniform1f("u_isHalo",0),l.drawElements(T,a.indexCount,n.UNSIGNED_INT,x)}}export{m as default};