@arcgis/core 5.1.0-next.80 → 5.1.0-next.82

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 (277) hide show
  1. package/analysis/ShadowCast/DiscreteOptions.d.ts +12 -0
  2. package/analysis/ShadowCast/TotalDurationOptions.d.ts +12 -0
  3. package/assets/esri/core/workers/RemoteClient.js +1 -1
  4. package/assets/esri/core/workers/chunks/040884cec4b84dd1bb17.js +1 -0
  5. package/assets/esri/core/workers/chunks/05c5f68e117fc58ae801.js +1 -0
  6. package/assets/esri/core/workers/chunks/074f5e6aaeafca13bf72.js +1 -0
  7. package/assets/esri/core/workers/chunks/{7bd1d624f4f4a11a31e8.js → 086d7cdfa92a649c9f7b.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{0eed2b1b06355ab89013.js → 0c074c46d106ca4d3bad.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{d7324a00ed576e7a37b1.js → 1768f1a7e3caa6074d91.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{85d3475667c503ec4fc6.js → 186bfde8c552e3b42302.js} +1 -1
  11. package/assets/esri/core/workers/chunks/1a35121a0c2595a41fdb.js +1 -0
  12. package/assets/esri/core/workers/chunks/1ab66600579fa4232d7b.js +1 -0
  13. package/assets/esri/core/workers/chunks/{d5fd99ee40bba9b48a54.js → 1e2c0c6d724f7639d4c1.js} +27 -27
  14. package/assets/esri/core/workers/chunks/1e3fe89970c57a883fe5.js +1 -0
  15. package/assets/esri/core/workers/chunks/{824051af00e7a1f05ed0.js → 230e0e43f8e771950397.js} +1 -1
  16. package/assets/esri/core/workers/chunks/26f804c92077c11c626d.js +1 -0
  17. package/assets/esri/core/workers/chunks/28a45bd26eb5c9b3ec7c.js +1 -0
  18. package/assets/esri/core/workers/chunks/38f1a86b8dd9ee684ee5.js +596 -0
  19. package/assets/esri/core/workers/chunks/{c1d4110aa494a1dba3c4.js → 455d08294e0f5c5509ff.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{71fe127734f33d020a44.js → 475394218caaa4cd3e86.js} +1 -1
  21. package/assets/esri/core/workers/chunks/475409026288f0981ce2.js +1 -0
  22. package/assets/esri/core/workers/chunks/4e206957b28253ddc1a3.js +1 -0
  23. package/assets/esri/core/workers/chunks/{87d2021e91d025a2a142.js → 5c7ba4b8a9ec2e2e02b5.js} +1 -1
  24. package/assets/esri/core/workers/chunks/5cc38ac051d3d0557920.js +1 -0
  25. package/assets/esri/core/workers/chunks/{992cd87ba0ab6346f692.js → 64e268ebac0b62076f81.js} +1 -1
  26. package/assets/esri/core/workers/chunks/{003fd7745966fe03510c.js → 65ac73de5bb133c6bf89.js} +1 -1
  27. package/assets/esri/core/workers/chunks/6675d56f49d07a97dc40.js +1 -0
  28. package/assets/esri/core/workers/chunks/{1f82a0f134ea912fc686.js → 66fe1634c6e8f72fc653.js} +1 -1
  29. package/assets/esri/core/workers/chunks/{96b13b6042cdf5833d39.js → 67abbe81c16de26f61d8.js} +1 -1
  30. package/assets/esri/core/workers/chunks/{484d6c1b0fe1633515b7.js → 72f8f4cfa0842d325fb0.js} +1 -1
  31. package/assets/esri/core/workers/chunks/{283d39dfb1625b5a74db.js → 747e258f57f0543c836e.js} +1 -1
  32. package/assets/esri/core/workers/chunks/{dd4f431511edd975a53b.js → 7acf82763aeba44049d0.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{5d8e944b192aad4cf986.js → 7b505112c7e6d9b7a239.js} +1 -1
  34. package/assets/esri/core/workers/chunks/7b8466f892a38a53c600.js +1 -0
  35. package/assets/esri/core/workers/chunks/{6a0352d20596ca3f4b64.js → 88eb1e4320c4ada01711.js} +1 -1
  36. package/assets/esri/core/workers/chunks/{77dd719516138afb1a2a.js → 8af9a78cf316581ea482.js} +1 -1
  37. package/assets/esri/core/workers/chunks/97719271a3e4c9f2b2c9.js +1 -0
  38. package/assets/esri/core/workers/chunks/988e91cc6cf88c34c2de.js +1 -0
  39. package/assets/esri/core/workers/chunks/9c402657f63a4d5668d0.js +1 -0
  40. package/assets/esri/core/workers/chunks/9cac70164d8528c283af.js +1 -0
  41. package/assets/esri/core/workers/chunks/9ea23cd4b2664c08b670.js +1 -0
  42. package/assets/esri/core/workers/chunks/9f51a69b8f1937a8794a.js +1 -0
  43. package/assets/esri/core/workers/chunks/a28124bba6b43efd74cc.js +1 -0
  44. package/assets/esri/core/workers/chunks/ac5999c88c27b49cd760.js +1 -0
  45. package/assets/esri/core/workers/chunks/af762422a65c551dcd54.js +1 -0
  46. package/assets/esri/core/workers/chunks/{056fd7847caaff2c9514.js → af8bc56cf1404afc3028.js} +1 -1
  47. package/assets/esri/core/workers/chunks/b811d62284be95f4beb6.js +1 -0
  48. package/assets/esri/core/workers/chunks/b9e163f4a898e50cc854.js +1 -0
  49. package/assets/esri/core/workers/chunks/{444f0f51b3ee0b9845a5.js → bb2f6b0fcdfb8b158e26.js} +1 -1
  50. package/assets/esri/core/workers/chunks/{3b9100c59a8050f4834e.js → bbc27d9285162696d089.js} +1 -1
  51. package/assets/esri/core/workers/chunks/{5da2051f548c2942e01a.js → bc8a74da48b08309875f.js} +1 -1
  52. package/assets/esri/core/workers/chunks/bd8cb64b6e08839398f3.js +1 -0
  53. package/assets/esri/core/workers/chunks/{026d3fa331caec1ea3d2.js → bf4dd8e50704e4040966.js} +1 -1
  54. package/assets/esri/core/workers/chunks/c19e3f6027b6526de359.js +1 -0
  55. package/assets/esri/core/workers/chunks/c8ef80a7c46d7d2c5172.js +1 -0
  56. package/assets/esri/core/workers/chunks/cbf1a03f54bd8d2a2b47.js +1 -0
  57. package/assets/esri/core/workers/chunks/ce4dfc3a470230ddc9e4.js +1 -0
  58. package/assets/esri/core/workers/chunks/{8ea4584e07ccc85caabd.js → d11de13537b623739e14.js} +1 -1
  59. package/assets/esri/core/workers/chunks/d897412b99b9fba44bb4.js +1 -0
  60. package/assets/esri/core/workers/chunks/d9c3f14eee4db7a7137b.js +1 -0
  61. package/assets/esri/core/workers/chunks/{035dbb0217f83108fa89.js → db86a1119e4e58ecfbda.js} +1 -1
  62. package/assets/esri/core/workers/chunks/dcb7a3ff59677b1cf0f1.js +1 -0
  63. package/assets/esri/core/workers/chunks/{5fe97253f80c797fad7f.js → df8a3d3cac454d42e14d.js} +1 -1
  64. package/assets/esri/core/workers/chunks/dfe1139124fda0d6c059.js +1 -0
  65. package/assets/esri/core/workers/chunks/{8b8f391f27774aec6db9.js → e0b27bceb397482bd0e8.js} +1 -1
  66. package/assets/esri/core/workers/chunks/{fb9e3e7cd532ac4353f1.js → e89dc473f46a5584d2ef.js} +32 -32
  67. package/assets/esri/core/workers/chunks/{01ee18782a50279f907e.js → f4220b6eab0865318033.js} +1 -1
  68. package/assets/esri/core/workers/chunks/{42336e0d1ef88737b078.js → f468c6ea2818a1f97e19.js} +1 -1
  69. package/assets/esri/core/workers/chunks/{3f242f8d092f601c3abf.js → f77d23ee60c876b01e4b.js} +1 -1
  70. package/assets/esri/core/workers/chunks/fce2306a1b31c6680f90.js +1 -0
  71. package/assets/esri/core/workers/chunks/fcf51697c361e0075cc2.js +1 -0
  72. package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core-simd.wasm +0 -0
  73. package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core.wasm +0 -0
  74. package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +15 -0
  75. package/assets/esri/themes/dark/main.css +1 -1
  76. package/assets/esri/themes/light/main.css +1 -1
  77. package/assets/esri/themes/light/view.css +1 -1
  78. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable.json +1 -1
  79. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_en.json +1 -1
  80. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer.json +1 -1
  81. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_en.json +1 -1
  82. package/chunks/ShadowCastVisualize.glsl.js +33 -15
  83. package/chunks/arcgis-knowledge-client-core-simd.js +1 -1
  84. package/chunks/arcgis-knowledge-client-core.js +1 -1
  85. package/config.js +1 -1
  86. package/core/workers/registry.js +1 -1
  87. package/form/elements/inputs/MultipleChoiceInput.d.ts +6 -6
  88. package/form/elements/inputs/MultipleChoiceInput.js +1 -1
  89. package/form/elements/inputs.js +1 -1
  90. package/geometry/SpatialReference.js +1 -1
  91. package/geometry/support/coordsUtils.js +1 -1
  92. package/kernel.js +1 -1
  93. package/layers/BaseDynamicLayer.js +1 -1
  94. package/layers/BaseTileLayer.js +1 -1
  95. package/layers/ElevationLayer.js +1 -1
  96. package/layers/FeatureLayer.d.ts +2 -2
  97. package/layers/FeatureLayer.js +1 -1
  98. package/layers/MapImageLayer.js +1 -1
  99. package/layers/TileLayer.js +1 -1
  100. package/layers/WMSLayer.js +1 -1
  101. package/layers/WMTSLayer.js +1 -1
  102. package/layers/WebTileLayer.js +1 -1
  103. package/layers/graphics/data/QueryEngine.js +1 -1
  104. package/layers/graphics/data/QueryEngineResult.js +1 -1
  105. package/layers/graphics/sources/MemorySource.js +1 -1
  106. package/layers/graphics/sources/geojson/GeoJSONSourceWorker.js +1 -1
  107. package/layers/graphics/sources/support/CSVSourceWorker.js +1 -1
  108. package/layers/graphics/sources/support/MemorySourceWorker.js +1 -1
  109. package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
  110. package/layers/graphics/sources/support/clientSideDefaults.js +1 -1
  111. package/layers/mixins/ArcGISImageService.js +1 -1
  112. package/layers/mixins/FeatureLayerBase.js +1 -1
  113. package/layers/mixins/TiledImagery.js +1 -1
  114. package/layers/support/imageBitmapUtils.js +1 -1
  115. package/layers/support/serviceCapabilitiesUtils.js +1 -1
  116. package/package.json +1 -1
  117. package/request/process.js +1 -1
  118. package/rest/knowledgeGraph/CreateReplicaResponse.d.ts +37 -0
  119. package/rest/knowledgeGraph/CreateReplicaResponse.js +2 -0
  120. package/rest/knowledgeGraph/ReplicaDefinition.d.ts +91 -0
  121. package/rest/knowledgeGraph/ReplicaDefinition.js +2 -0
  122. package/rest/knowledgeGraph/ReplicasInformationResponse.d.ts +24 -0
  123. package/rest/knowledgeGraph/ReplicasInformationResponse.js +2 -0
  124. package/rest/knowledgeGraph/UnregisterReplicaResponse.d.ts +44 -0
  125. package/rest/knowledgeGraph/UnregisterReplicaResponse.js +2 -0
  126. package/rest/knowledgeGraph/wasmInterface/replicaToWasmEncodedFactories.js +2 -0
  127. package/rest/knowledgeGraph/wasmInterface/wasmToReplicaFactories.js +2 -0
  128. package/rest/knowledgeGraphService.d.ts +50 -1
  129. package/rest/knowledgeGraphService.js +1 -1
  130. package/support/revision.js +1 -1
  131. package/views/2d/engine/vectorTiles/RenderBucket.js +1 -1
  132. package/views/2d/engine/vectorTiles/VTLPainter3D.js +1 -1
  133. package/views/2d/engine/vectorTiles/VectorTile.js +1 -1
  134. package/views/2d/engine/vectorTiles/VectorTileContainer.js +1 -1
  135. package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerShader.js +1 -1
  136. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/AFeatureShader.js +1 -1
  137. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/FillShader.js +1 -1
  138. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/LineShader.js +1 -1
  139. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/OutlineFillShader.js +1 -1
  140. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/hittestUtils.js +1 -1
  141. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
  142. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueCircle.js +1 -1
  143. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueFill.js +1 -1
  144. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueLine.js +1 -1
  145. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueSymbol.js +1 -1
  146. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  147. package/views/2d/input/MapViewInputManager.js +1 -1
  148. package/views/2d/layers/BaseDynamicLayerView2D.js +1 -1
  149. package/views/2d/layers/MapImageLayerView2D.js +1 -1
  150. package/views/2d/layers/MediaLayerView2D.js +1 -1
  151. package/views/2d/layers/TileLayerView2D.js +1 -1
  152. package/views/2d/layers/VectorTileLayerView2D.js +1 -1
  153. package/views/2d/layers/WMSLayerView2D.js +1 -1
  154. package/views/2d/layers/WMTSLayerView2D.js +1 -1
  155. package/views/2d/layers/features/layerAdapters/InMemoryLayerAdapter.js +1 -1
  156. package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
  157. package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
  158. package/views/3d/input/SceneInputManager.js +1 -1
  159. package/views/3d/layers/ElevationLayerView3D.js +1 -1
  160. package/views/3d/layers/ImageryTileLayerView3D.js +1 -1
  161. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  162. package/views/3d/layers/IntegratedMesh3DTilesLayerWorker.js +2 -0
  163. package/views/3d/layers/IntegratedMesh3DTilesLayerWorkerHandle.js +2 -0
  164. package/views/3d/layers/TileLayerView3D.js +1 -1
  165. package/views/3d/layers/WMTSLayerView3D.js +1 -1
  166. package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
  167. package/views/3d/layers/graphics/tessellationUtils.js +1 -1
  168. package/views/3d/layers/support/IntegratedMesh3DTilesVertexProcessing.js +2 -0
  169. package/views/3d/layers/support/makeScheduleFunction.js +1 -1
  170. package/views/3d/support/renderInfoUtils/polygon.js +1 -1
  171. package/views/3d/terrain/TerrainData.js +1 -1
  172. package/views/3d/terrain/TerrainSurface.js +1 -1
  173. package/views/3d/terrain/Tile.js +1 -1
  174. package/views/3d/terrain/TileRenderer.js +1 -1
  175. package/views/3d/terrain/terrainUtils.js +1 -1
  176. package/views/3d/webgl-engine/collections/Component/ComponentObject.js +1 -1
  177. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  178. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  179. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterialInitParameters.js +2 -0
  180. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterialRepository.js +1 -1
  181. package/views/3d/webgl-engine/effects/atmosphere/ChapmanAtmosphere.js +1 -1
  182. package/views/3d/webgl-engine/effects/atmosphere/LocalAtmosphere.js +1 -1
  183. package/views/3d/webgl-engine/effects/atmosphere/MarsAtmosphere.js +1 -1
  184. package/views/3d/webgl-engine/effects/clouds/CloudsComposition.js +1 -1
  185. package/views/3d/webgl-engine/effects/clouds/CloudsRenderer.js +1 -1
  186. package/views/3d/webgl-engine/effects/clouds/NoiseTextureAtlas.js +1 -1
  187. package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorNode.js +1 -1
  188. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
  189. package/views/3d/webgl-engine/effects/fog/Fog.js +1 -1
  190. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
  191. package/views/3d/webgl-engine/effects/glow/GlowRenderNode.js +1 -1
  192. package/views/3d/webgl-engine/effects/haze/Haze.js +1 -1
  193. package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
  194. package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.js +1 -1
  195. package/views/3d/webgl-engine/effects/highlight/ShadowHighlightBuffer.js +1 -1
  196. package/views/3d/webgl-engine/effects/magnifier/Magnifier.js +1 -1
  197. package/views/3d/webgl-engine/effects/precipitation/Precipitation.js +1 -1
  198. package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
  199. package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
  200. package/views/3d/webgl-engine/effects/stars/Stars.js +1 -1
  201. package/views/3d/webgl-engine/lib/CutFillComputationRenderNode.js +1 -1
  202. package/views/3d/webgl-engine/lib/CutFillVisualizationRenderNode.js +1 -1
  203. package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
  204. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  205. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  206. package/views/3d/webgl-engine/lib/ShadowCastRenderer.js +1 -1
  207. package/views/3d/webgl-engine/lib/StencilUtils.js +1 -1
  208. package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
  209. package/views/3d/webgl-engine/materials/VisualVariablePassParameters.js +1 -1
  210. package/views/3d/webgl-engine/shaders/ShadowCastAccumulateTechnique.js +1 -1
  211. package/views/3d/webgl-engine/shaders/ShadowCastAccumulateTechniqueConfiguration.js +1 -1
  212. package/views/3d/webgl-engine/shaders/ShadowCastMaskTechnique.js +2 -0
  213. package/views/3d/webgl-engine/shaders/ShadowCastVisualize.glsl.js +1 -1
  214. package/views/3d/webgl-engine/shaders/colorRampParameters.js +2 -0
  215. package/views/VideoView.js +1 -1
  216. package/views/analysis/ElevationProfile/elevationProfileGenerationUtils.js +1 -1
  217. package/views/draw/support/createUtils.js +1 -1
  218. package/views/input/BrowserEventSource.js +1 -1
  219. package/views/input/InputManager.js +1 -1
  220. package/views/input/handlers/LatestPen.js +2 -0
  221. package/views/input/handlers/LatestPointer.js +1 -1
  222. package/views/input/types.d.ts +1 -1
  223. package/views/interactive/Tooltip.js +1 -1
  224. package/views/interactive/editGeometry/EditGeometry.js +1 -1
  225. package/views/support/TextureCompressionWorker.js +1 -1
  226. package/views/support/TextureCompressionWorkerHandle.js +1 -1
  227. package/views/support/unnormalizationUtils.js +2 -0
  228. package/views/webgl/RenderingContext.js +1 -1
  229. package/views/webgl/Texture.js +1 -1
  230. package/views/webgl/renderState.js +1 -1
  231. package/widgets/BatchAttributeForm/templates/support/hashElementTemplate.js +1 -1
  232. package/widgets/ElevationProfile/support/profileUtils.js +1 -1
  233. package/widgets/FeatureTable.js +1 -1
  234. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  235. package/widgets/OrientedImageryViewer/css.js +1 -1
  236. package/widgets/OrientedImageryViewer.js +1 -1
  237. package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
  238. package/assets/esri/core/workers/chunks/05c3146d87d917606193.js +0 -1
  239. package/assets/esri/core/workers/chunks/0b77c124b743067e4155.js +0 -1
  240. package/assets/esri/core/workers/chunks/11241781baaed346af52.js +0 -1
  241. package/assets/esri/core/workers/chunks/1d9560eb8b21b9e76616.js +0 -1
  242. package/assets/esri/core/workers/chunks/2c87c3112a43db8624f6.js +0 -1
  243. package/assets/esri/core/workers/chunks/2da62687ff678b690839.js +0 -1
  244. package/assets/esri/core/workers/chunks/3a58708217a9c11836ab.js +0 -1
  245. package/assets/esri/core/workers/chunks/3bbf684ee2484eb44c9f.js +0 -1
  246. package/assets/esri/core/workers/chunks/49fb9c47070641bce9a9.js +0 -1
  247. package/assets/esri/core/workers/chunks/4eed175277eb0df3c821.js +0 -1
  248. package/assets/esri/core/workers/chunks/4f9d027055f3a616173c.js +0 -1
  249. package/assets/esri/core/workers/chunks/5417308eba30e668b1ee.js +0 -1
  250. package/assets/esri/core/workers/chunks/62b3e933f548ce354b99.js +0 -1
  251. package/assets/esri/core/workers/chunks/63381d81adce0a0d2089.js +0 -1
  252. package/assets/esri/core/workers/chunks/6dbddf5ab1867ac2ac80.js +0 -1
  253. package/assets/esri/core/workers/chunks/6e70e922331704b92a08.js +0 -1
  254. package/assets/esri/core/workers/chunks/7c7c11c0fde8b63e330b.js +0 -1
  255. package/assets/esri/core/workers/chunks/7f55eef696e9ed717bfc.js +0 -1
  256. package/assets/esri/core/workers/chunks/89dbea6f436d45a3b185.js +0 -1
  257. package/assets/esri/core/workers/chunks/8f6f5dad52747d252aac.js +0 -596
  258. package/assets/esri/core/workers/chunks/99c189e1de2b1f14799b.js +0 -1
  259. package/assets/esri/core/workers/chunks/9aa6b32cb65fbaa93218.js +0 -1
  260. package/assets/esri/core/workers/chunks/9d216e30d04ea21fc8a2.js +0 -1
  261. package/assets/esri/core/workers/chunks/9d434360dfce1e49b7b9.js +0 -1
  262. package/assets/esri/core/workers/chunks/a5d8d6f3c0c8de474efd.js +0 -1
  263. package/assets/esri/core/workers/chunks/a809b811121099a87a98.js +0 -1
  264. package/assets/esri/core/workers/chunks/c02ba921c0a32d2021e3.js +0 -1
  265. package/assets/esri/core/workers/chunks/c3c19b62d948d53118a8.js +0 -1
  266. package/assets/esri/core/workers/chunks/c46a4adea39636a96d03.js +0 -1
  267. package/assets/esri/core/workers/chunks/c5507480344176fad241.js +0 -1
  268. package/assets/esri/core/workers/chunks/c6030271bd6d39b6e1db.js +0 -1
  269. package/assets/esri/core/workers/chunks/d1a7d13e1d48abcd7bf1.js +0 -1
  270. package/assets/esri/core/workers/chunks/dcbc4072c18278c2b67d.js +0 -1
  271. package/assets/esri/core/workers/chunks/e610d24539a675fb054b.js +0 -1
  272. package/assets/esri/core/workers/chunks/ecb7ede6a8e6c05e4c6c.js +0 -1
  273. package/assets/esri/core/workers/chunks/f227b34cce6843df0fb6.js +0 -1
  274. package/assets/esri/core/workers/chunks/fb5a2205f05afc396119.js +0 -1
  275. package/request/ImageWithType.js +0 -2
  276. package/views/3d/layers/support/fetchTile.js +0 -2
  277. package/views/interactive/editGeometry/unnormalizationHelper.js +0 -2
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{prefersReducedMotion as e}from"../../../../core/a11yUtils.js";import has from"../../../../core/has.js";import{identity as t,translate as s,rotate as r,scale as a}from"../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as i}from"../../../../core/libs/gl-matrix-2/factories/mat3f32.js";import{tileSizeInTileUnits as o}from"./constants.js";import{CircleRenderBucket as n,SymbolRenderBucket as h,LineRenderBucket as l,FillRenderBucket as c}from"./RenderBucket.js";import{fadeDuration as d}from"./decluttering/config.js";import{TiledDisplayObject as u}from"../webgl/TiledDisplayObject.js";import y from"../webgl/util/Fader.js";const m=null;class p extends u{constructor(t,s,r,a,i,n,h,l=null){super(t,s,r,a,i,n,o,o),this.styleRepository=h,this._owner=l,this.type="vector-tile",this._referenced=1,this._hasSymbolBuckets=!1,this._usedMemory=256,this.layerData=new Map,this.status="loading",this.allSymbolsFadingOut=!1,this.lastOpacityUpdate=0,this.symbols=new Map,this.isCoverage=!1,this.neededForCoverage=!1,this.decluttered=!1,this.parentTile=null,this.childrenTiles=new Set,this.featureIndex=null,this.triangleCount=0,this._processed=!1,this.id=t.id;const c="TileHandler3D"===this._owner?.type?1:0,d=e()?0:has("mapview-transitions-duration")??300;this.fader=y.create(c,d)}get styleLayerUIDs(){return Array.from(this.layerData.keys())}get hasSymbolBuckets(){return this._hasSymbolBuckets}get isFading(){return this._hasSymbolBuckets&&performance.now()-this.lastOpacityUpdate<d}get isHoldingForFade(){return this._hasSymbolBuckets&&(!this.allSymbolsFadingOut||performance.now()-this.lastOpacityUpdate<d)}get wasRequested(){return"errored"===this.status||"loaded"===this.status||"reloading"===this.status}setData(e){this.changeDataImpl(e),this.requestRender(),this.ready(),this._processed=!0}deleteLayerData(e){let t=!1;for(const s of e){const e=this.layerData.get(s);e&&(this._usedMemory-=e.usedMemory,3===e.type&&this.symbols.delete(s)&&(t=!0),e.destroy(),this.layerData.delete(s))}this._owner?.updateTileSize(this),t&&(this.featureIndex?.clear(),this.emit("symbols-changed")),this.requestRender()}processed(){return this._processed}hasData(){return this.layerData.size>0}hasFeatures(){const e=this.layerData.values();for(const t of e)if(t.hasData())return!0;return!1}dispose(){"unloaded"!==this.status&&(p._destroyRenderBuckets(this.layerData),this.layerData.clear(),this.featureIndex=null,this._usedMemory=0,this.destroy(),this.status="unloaded")}release(){0===--this._referenced&&(this._owner?.onDisposeTile(this),this.dispose(),this.stage=null)}retain(){++this._referenced}get usedMemory(){return this._usedMemory}get usedMemoryPerReference(){return this._usedMemory/(this._referenced||1)}changeDataImpl(e){this.featureIndex?.clear();let t=!1;if(e){const{bucketsWithData:s,emptyBuckets:r}=e,a=this._createRenderBuckets(s);if(r&&r.byteLength>0){const e=new Uint32Array(r);for(const t of e)this._deleteLayerData(t)}for(const[e,i]of a)this._deleteLayerData(e),3===i.type&&(this.symbols.set(e,i.symbols),t=!0),this._usedMemory+=i.usedMemory,this.layerData.set(e,i);this._owner?.updateTileSize(this)}this._hasSymbolBuckets=!1;for(const s of this.layerData.values())3===s.type&&(this._hasSymbolBuckets=!0);t&&this.emit("symbols-changed")}attachWithContext(e){this.stage={context:e,trashDisplayObject(e){e.processDetach()},untrashDisplayObject:()=>!1}}setTransform(e){super.setTransform(e);const i=this.resolution/(e.resolution*e.pixelRatio),o=this.width/this.rangeX*i,n=this.height/this.rangeY*i,h=[0,0];e.toScreen(h,[this.x,this.y]);const l=this.transforms.tileUnitsToPixels;t(l),s(l,l,h),r(l,l,Math.PI*e.rotation/180),a(l,l,[o,n,1])}_createTransforms(){return{displayViewScreenMat3:i(),tileMat3:i(),tileUnitsToPixels:i()}}static _destroyRenderBuckets(e){if(!e)return;const t=new Set;for(const s of e.values())t.has(s)||(s.destroy(),t.add(s));e.clear()}_createRenderBuckets(e){const t=new Map,s=new Map;for(const r of e){const e=this._deserializeBucket(r,s);for(const s of e.layerUIDs)t.set(s,e)}return t}_deserializeBucket(e,t){let s=t.get(e);if(s)return s;switch(new Uint32Array(e)[0]){case 1:s=new c(e,this.styleRepository);break;case 2:s=new l(e,this.styleRepository);break;case 3:s=new h(e,this.styleRepository,this);break;case 4:s=new n(e,this.styleRepository)}return t.set(e,s),s}_deleteLayerData(e){if(!this.layerData.has(e))return;const t=this.layerData.get(e);this._usedMemory-=t.usedMemory,t.destroy(),this.layerData.delete(e)}}export{p as VectorTile,m as tracer};
2
+ import{prefersReducedMotion as e}from"../../../../core/a11yUtils.js";import has from"../../../../core/has.js";import{identity as t,translate as s,rotate as r,scale as a}from"../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as i}from"../../../../core/libs/gl-matrix-2/factories/mat3f32.js";import{tileSizeInTileUnits as o}from"./constants.js";import{CircleRenderBucket as h,SymbolRenderBucket as n,LineRenderBucket as l,FillRenderBucket as c}from"./RenderBucket.js";import{fadeDuration as d}from"./decluttering/config.js";import{TiledDisplayObject as y}from"../webgl/TiledDisplayObject.js";import u from"../webgl/util/Fader.js";const p=null;class m extends y{constructor(t,s,r,a,i,h,n,l=null){super(t,s,r,a,i,h,o,o),this.styleRepository=n,this._owner=l,this.type="vector-tile",this._referenced=1,this._hasSymbolBuckets=!1,this._usedMemory=256,this.layerData=new Map,this.layerDataToDispose=new Map,this.status="loading",this.allSymbolsFadingOut=!1,this.lastOpacityUpdate=0,this.symbols=new Map,this.isCoverage=!1,this.neededForCoverage=!1,this.decluttered=!1,this.parentTile=null,this.childrenTiles=new Set,this.featureIndex=null,this.triangleCount=0,this._processed=!1,this.id=t.id;const c="TileHandler3D"===this._owner?.type?1:0,d=e()?0:has("mapview-transitions-duration")??300;this.fader=u.create(c,d)}get styleLayerUIDs(){return Array.from(this.layerData.keys())}get hasSymbolBuckets(){return this._hasSymbolBuckets}get isFading(){return this._hasSymbolBuckets&&performance.now()-this.lastOpacityUpdate<d}get isHoldingForFade(){return this._hasSymbolBuckets&&(!this.allSymbolsFadingOut||performance.now()-this.lastOpacityUpdate<d)}get wasRequested(){return"errored"===this.status||"loaded"===this.status||"reloading"===this.status}setData(e){this.changeDataImpl(e),this.requestRender(),this.ready(),this._processed=!0}deleteLayerData(e){let t=!1;for(const s of e){const e=this.layerData.get(s);e&&(3===e.type&&this.symbols.delete(s)&&(t=!0),this.layerDataToDispose.set(s,e),this.layerData.delete(s),this.requestRender())}this._owner?.updateTileSize(this),t&&(this.featureIndex?.clear(),this.emit("symbols-changed")),this.requestRender()}processed(){return this._processed}hasData(){return this.layerData.size>0}hasFeatures(){const e=this.layerData.values();for(const t of e)if(t.hasData())return!0;return!1}disposeLayerData(){for(const[e,t]of this.layerDataToDispose)this._usedMemory-=t.usedMemory,t.destroy();this.layerDataToDispose.clear()}dispose(){"unloaded"!==this.status&&(m._destroyRenderBuckets(this.layerData),m._destroyRenderBuckets(this.layerDataToDispose),this.layerData.clear(),this.featureIndex=null,this._usedMemory=0,this.destroy(),this.status="unloaded")}release(){0===--this._referenced&&(this._owner?.onDisposeTile(this),this.dispose(),this.stage=null)}retain(){++this._referenced}get usedMemory(){return this._usedMemory}get usedMemoryPerReference(){return this._usedMemory/(this._referenced||1)}changeDataImpl(e){this.featureIndex?.clear();let t=!1;if(e){const{bucketsWithData:s,emptyBuckets:r}=e,a=this._createRenderBuckets(s);if(r&&r.byteLength>0){const e=new Uint32Array(r);for(const t of e)this._deleteLayerData(t)}for(const[e,i]of a)this._deleteLayerData(e),3===i.type&&(this.symbols.set(e,i.symbols),t=!0),this._usedMemory+=i.usedMemory,this.layerData.set(e,i);this._owner?.updateTileSize(this)}this._hasSymbolBuckets=!1;for(const s of this.layerData.values())3===s.type&&(this._hasSymbolBuckets=!0);t&&this.emit("symbols-changed")}attachWithContext(e){this.stage={context:e,trashDisplayObject(e){e.processDetach()},untrashDisplayObject:()=>!1}}setTransform(e){super.setTransform(e);const i=this.resolution/(e.resolution*e.pixelRatio),o=this.width/this.rangeX*i,h=this.height/this.rangeY*i,n=[0,0];e.toScreen(n,[this.x,this.y]);const l=this.transforms.tileUnitsToPixels;t(l),s(l,l,n),r(l,l,Math.PI*e.rotation/180),a(l,l,[o,h,1])}_createTransforms(){return{displayViewScreenMat3:i(),tileMat3:i(),tileUnitsToPixels:i()}}static _destroyRenderBuckets(e){if(!e)return;const t=new Set;for(const s of e.values())t.has(s)||(s.destroy(),t.add(s));e.clear()}_createRenderBuckets(e){const t=new Map,s=new Map;for(const r of e){const e=this._deserializeBucket(r,s);for(const s of e.layerUIDs)t.set(s,e)}return t}_deserializeBucket(e,t){let s=t.get(e);if(s)return s;switch(new Uint32Array(e)[0]){case 1:s=new c(e,this.styleRepository);break;case 2:s=new l(e,this.styleRepository);break;case 3:s=new n(e,this.styleRepository,this);break;case 4:s=new h(e,this.styleRepository)}return t.set(e,s),s}_deleteLayerData(e){if(!this.layerData.has(e))return;const t=this.layerData.get(e);this.layerDataToDispose.set(e,t),this.layerData.delete(e),this.requestRender()}}export{m as VectorTile,p as tracer};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{create as e}from"../../../../geometry/support/aaBoundingRect.js";import t from"../../../../layers/support/TileInfo.js";import{tileSizeInTileUnits as s,tileSizeInPixels as r}from"./constants.js";import{SymbolFader as i}from"./decluttering/SymbolFader.js";import{writeOpacityToBuffers as o}from"./decluttering/util.js";import{RenderableTile as l}from"../webgl/RenderableTile.js";import n from"../webgl/TileContainer.js";import{simplePipelineState as a}from"../webgl/shaderGraph/utils.js";import{VTLTechniquesRepo as d}from"../webgl/shaderGraph/techniques/vectorTiles/VTLTechniques.js";import h from"../../tiling/TileCoverage.js";import c from"../../tiling/TileKey.js";const u=1e-6;function y(e,t){if(e){const s=e.getLayoutProperty("visibility");if(!s||1!==s.getValue()&&(void 0===e.minzoom||e.minzoom<t+u)&&(void 0===e.maxzoom||e.maxzoom>=t-u))return!0}return!1}class m extends n{constructor(e){super(e),this._backgroundTiles=[],this._techniques=new d,this._computeDisplayInfoView(e),this._techniques.startup()}destroy(){super.destroy(),this.removeAllChildren(),this._spriteMosaic?.dispose(),this._spriteMosaic=null,this._glyphMosaic?.dispose(),this._glyphMosaic=null,null!=this._symbolFader&&(this._symbolFader.clear(),this._symbolFader=null);const e=this.stage?.context;e&&this._techniques.shutdown(e),this._styleRepository=null,this._backgroundTiles=[]}get fading(){return this._symbolFader?.fading??!1}get symbolFader(){return this._symbolFader}get symbolRepository(){return this._symbolFader?.symbolRepository}setStyleResources(e,t,r,l){if(this._spriteMosaic=e,this._glyphMosaic=t,this._styleRepository=r,this.tilingScheme=l,this._computeDisplayInfoView(l),null==this._symbolFader){const e=(e,t)=>{e.allSymbolsFadingOut=!0,e.lastOpacityUpdate=t,o(e,t,!0),e.decluttered=!0,e.requestRender()};this._symbolFader=new i("vector-tile",this._styleRepository,e,this.children,s)}this._symbolFader.styleRepository=r}setSpriteMosaic(e){this._spriteMosaic?.dispose(),this._spriteMosaic=e}deleteStyleLayers(e){null!=this._symbolFader&&this._symbolFader.deleteStyleLayers(e)}createRenderParams(e){return{...super.createRenderParams(e),renderPass:null,styleLayer:null,styleLayerUID:-1,glyphMosaic:this._glyphMosaic,spriteMosaic:this._spriteMosaic}}doRender(e){const{drawPhase:t}=e,s=1===t||64===t;this.visible&&s&&void 0!==this._spriteMosaic&&super.doRender(e)}addChild(e){return super.addChild(e),null!=this._symbolFader?this._symbolFader.addTile(e):e.decluttered=!0,this.requestRender(),e}removeChild(e){return null!=this._symbolFader&&this._symbolFader.removeTile(e),this.requestRender(),super.removeChild(e)}renderChildren(e){const{drawPhase:t}=e;64!==t?this._doRender(e):super.renderChildren(e)}removeAllChildren(){for(let e=0;e<this.children.length;e++){const t=this.children[e];null!=this._symbolFader&&this._symbolFader.removeTile(t),t.dispose()}super.removeAllChildren()}getStencilTarget(){return this.children.filter(e=>e.neededForCoverage&&e.hasData())}restartDeclutter(){null!=this._symbolFader&&this._symbolFader.restartDeclutter()}_doRender(e){const{context:t,painter:s,state:r}=e,i=this._styleRepository;if(!i)return;const o=i.layers,l=this._displayInfo.scaleToZoom(r.scale);super.renderChildren(e),i.backgroundBucketIds.length>0&&(e.renderPass="background",this._renderBackgroundLayers(e,i.backgroundBucketIds,l)),1===e.drawPhase&&this._fade(l,r);const n=this.children.filter(e=>e.visible&&e.hasData());if(n&&0!==n.length){for(const e of n)e.triangleCount=0;if(1===e.drawPhase)for(const e of n)e.fader.fade()<1&&this.requestRender();t.setClearDepth(1),t.clear(256),s.setPipelineState({color:{write:[!0,!0,!0,!0],blendMode:"composite"},stencil:{write:!1,test:{compare:514,op:{fail:7680,zFail:7680,zPass:7681},mask:255}},depth:{write:!1,test:515}}),e.renderPass="translucent";for(let t=0;t<o.length;t++)this._renderStyleLayer(o[t],e,n);t.bindVAO(null),s.setPipelineState(a);for(const e of n)e.debugInfo.display.triangleCount=e.triangleCount}else t.bindVAO(null)}_fade(e,t){null!=this._symbolFader&&(this._symbolFader.update(e,t)||this.requestRender())}_renderStyleLayer(e,t,s){const{displayLevel:r,renderPass:i}=t;if(void 0===e)return;const o=e.getLayoutProperty("visibility");if(o&&1===o.getValue())return;switch(e.type){case 0:return;case 1:case 2:case 4:case 3:if("translucent"!==i)return}if(s=3===e.type?s.filter(e=>e.decluttered):s.filter(e=>e.neededForCoverage),3!==e.type&&(0===s.length||void 0!==e.minzoom&&e.minzoom>=r+u||void 0!==e.maxzoom&&e.maxzoom<r-u))return;const l=e.uid;t.styleLayerUID=l,t.styleLayer=e;const n=this._techniques.getTechnique(e.type);null!=n&&n.render(t,{tiles:s})}_renderBackgroundLayers(t,i,o){const{state:n}=t,a=this._styleRepository;let d=!1;for(const e of i){const t=a.getLayerById(e);if(t&&0===t.type&&y(a.getLayerById(e),o)){d=!0;break}}if(!d)return;const u=this.tilingScheme,m=u.getTileCoverage(t.state,0,!0,"smallest"),{spans:p,lodInfo:f}=m,{level:g}=f,_=e(),b=[],F=this._backgroundTiles;let R,v=0;for(const{row:h,colFrom:y,colTo:C}of p)for(let t=y;t<=C;t++){if(v<F.length)R=F[v],R.key.set(g,h,f.normalizeCol(t),f.getWorldForColumn(t)),u.getTileBounds(_,R.key,!1),R.x=_[0],R.y=_[3],R.resolution=u.getTileResolution(g);else{const i=new c(g,h,f.normalizeCol(t),f.getWorldForColumn(t)),o=u.getTileBounds(e(),i),n=u.getTileResolution(g);R=new l(i,n,o[0],o[3],r,r,s,s),F.push(R)}R.setTransform(n),b.push(R),v++}const T=this._techniques.getTechnique(0);for(const e of i){const s=a.getLayerById(e);0===s.type&&y(s,o)&&(t.styleLayerUID=s.uid,t.styleLayer=s,T.render(t,{tiles:b}))}h.pool.release(m)}_computeDisplayInfoView(e){let s=e.tileInfo.lods[0].scale;const i=Math.max(25,e.tileInfo.lods.length),o=[];for(let t=0;t<=i;t++)o.push(s),s/=2;this._displayInfo=t.create({scales:o,size:r,spatialReference:e.spatialReference,numLODs:i})}}export{m as VectorTileContainer};
2
+ import{create as e}from"../../../../geometry/support/aaBoundingRect.js";import t from"../../../../layers/support/TileInfo.js";import{tileSizeInTileUnits as s,tileSizeInPixels as r}from"./constants.js";import{SymbolFader as i}from"./decluttering/SymbolFader.js";import{writeOpacityToBuffers as o}from"./decluttering/util.js";import{RenderableTile as l}from"../webgl/RenderableTile.js";import n from"../webgl/TileContainer.js";import{simplePipelineState as a}from"../webgl/shaderGraph/utils.js";import{VTLTechniquesRepo as d}from"../webgl/shaderGraph/techniques/vectorTiles/VTLTechniques.js";import h from"../../tiling/TileCoverage.js";import c from"../../tiling/TileKey.js";const u=1e-6;function y(e,t){if(e){const s=e.getLayoutProperty("visibility");if(!s||1!==s.getValue()&&(void 0===e.minzoom||e.minzoom<t+u)&&(void 0===e.maxzoom||e.maxzoom>=t-u))return!0}return!1}class m extends n{constructor(e){super(e),this._backgroundTiles=[],this._techniques=new d,this._computeDisplayInfoView(e),this._techniques.startup()}destroy(){super.destroy(),this.removeAllChildren(),this._spriteMosaic?.dispose(),this._spriteMosaic=null,this._glyphMosaic?.dispose(),this._glyphMosaic=null,null!=this._symbolFader&&(this._symbolFader.clear(),this._symbolFader=null);const e=this.stage?.context;e&&this._techniques.shutdown(e),this._styleRepository=null,this._backgroundTiles=[]}get fading(){return this._symbolFader?.fading??!1}get symbolFader(){return this._symbolFader}get symbolRepository(){return this._symbolFader?.symbolRepository}setStyleResources(e,t,r,l){if(this._spriteMosaic=e,this._glyphMosaic=t,this._styleRepository=r,this.tilingScheme=l,this._computeDisplayInfoView(l),null==this._symbolFader){const e=(e,t)=>{e.allSymbolsFadingOut=!0,e.lastOpacityUpdate=t,o(e,t,!0),e.decluttered=!0,e.requestRender()};this._symbolFader=new i("vector-tile",this._styleRepository,e,this.children,s)}this._symbolFader.styleRepository=r}setSpriteMosaic(e){this._spriteMosaic?.dispose(),this._spriteMosaic=e}deleteStyleLayers(e){null!=this._symbolFader&&this._symbolFader.deleteStyleLayers(e)}createRenderParams(e){return{...super.createRenderParams(e),renderPass:null,styleLayer:null,styleLayerUID:-1,glyphMosaic:this._glyphMosaic,spriteMosaic:this._spriteMosaic}}doRender(e){const{drawPhase:t}=e,s=1===t||64===t;this.visible&&s&&void 0!==this._spriteMosaic&&super.doRender(e)}addChild(e){return super.addChild(e),null!=this._symbolFader?this._symbolFader.addTile(e):e.decluttered=!0,this.requestRender(),e}removeChild(e){return null!=this._symbolFader&&this._symbolFader.removeTile(e),this.requestRender(),super.removeChild(e)}renderChildren(e){const{drawPhase:t}=e;64!==t?this._doRender(e):super.renderChildren(e)}removeAllChildren(){for(let e=0;e<this.children.length;e++){const t=this.children[e];null!=this._symbolFader&&this._symbolFader.removeTile(t),t.dispose()}super.removeAllChildren()}getStencilTarget(){return this.children.filter(e=>e.neededForCoverage&&e.hasData())}restartDeclutter(){null!=this._symbolFader&&this._symbolFader.restartDeclutter()}_doRender(e){const{context:t,painter:s,state:r}=e,i=this._styleRepository;if(!i)return;const o=i.layers,l=this._displayInfo.scaleToZoom(r.scale);this.children.forEach(e=>e.disposeLayerData()),super.renderChildren(e),i.backgroundBucketIds.length>0&&(e.renderPass="background",this._renderBackgroundLayers(e,i.backgroundBucketIds,l)),1===e.drawPhase&&this._fade(l,r);const n=this.children.filter(e=>e.visible&&e.hasData());if(n&&0!==n.length){for(const e of n)e.triangleCount=0;if(1===e.drawPhase)for(const e of n)e.fader.fade()<1&&this.requestRender();t.setClearDepth(1),t.clear(256),s.setPipelineState({color:{write:[!0,!0,!0,!0],blendMode:"composite"},stencil:{write:!1,test:{compare:514,op:{fail:7680,zFail:7680,zPass:7681},mask:255}},depth:{write:!1,test:515}}),e.renderPass="translucent";for(let t=0;t<o.length;t++)this._renderStyleLayer(o[t],e,n);t.bindVAO(null),s.setPipelineState(a);for(const e of n)e.debugInfo.display.triangleCount=e.triangleCount}else t.bindVAO(null)}_fade(e,t){null!=this._symbolFader&&(this._symbolFader.update(e,t)||this.requestRender())}_renderStyleLayer(e,t,s){const{displayLevel:r,renderPass:i}=t;if(void 0===e)return;const o=e.getLayoutProperty("visibility");if(o&&1===o.getValue())return;switch(e.type){case 0:return;case 1:case 2:case 4:case 3:if("translucent"!==i)return}if(s=3===e.type?s.filter(e=>e.decluttered):s.filter(e=>e.neededForCoverage),3!==e.type&&(0===s.length||void 0!==e.minzoom&&e.minzoom>=r+u||void 0!==e.maxzoom&&e.maxzoom<r-u))return;const l=e.uid;t.styleLayerUID=l,t.styleLayer=e;const n=this._techniques.getTechnique(e.type);null!=n&&n.render(t,{tiles:s})}_renderBackgroundLayers(t,i,o){const{state:n}=t,a=this._styleRepository;let d=!1;for(const e of i){const t=a.getLayerById(e);if(t&&0===t.type&&y(a.getLayerById(e),o)){d=!0;break}}if(!d)return;const u=this.tilingScheme,m=u.getTileCoverage(t.state,0,!0,"smallest"),{spans:p,lodInfo:f}=m,{level:g}=f,_=e(),b=[],F=this._backgroundTiles;let R,v=0;for(const{row:h,colFrom:y,colTo:C}of p)for(let t=y;t<=C;t++){if(v<F.length)R=F[v],R.key.set(g,h,f.normalizeCol(t),f.getWorldForColumn(t)),u.getTileBounds(_,R.key,!1),R.x=_[0],R.y=_[3],R.resolution=u.getTileResolution(g);else{const i=new c(g,h,f.normalizeCol(t),f.getWorldForColumn(t)),o=u.getTileBounds(e(),i),n=u.getTileResolution(g);R=new l(i,n,o[0],o[3],r,r,s,s),F.push(R)}R.setTransform(n),b.push(R),v++}const T=this._techniques.getTechnique(0);for(const e of i){const s=a.getLayerById(e);0===s.type&&y(s,o)&&(t.styleLayerUID=s.uid,t.styleLayer=s,T.render(t,{tiles:b}))}h.pool.release(m)}_computeDisplayInfoView(e){let s=e.tileInfo.lods[0].scale;const i=Math.max(25,e.tileInfo.lods.length),o=[];for(let t=0;t<=i;t++)o.push(s),s/=2;this._displayInfo=t.create({scales:o,size:r,spatialReference:e.spatialReference,numLODs:i})}}export{m as VectorTileContainer};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as t,__param as e}from"tslib";import{location as i,option as o,uniform as s,texture as l,input as r,ComputeVertexInput as a}from"../../GraphShaderModule.js";import{Vec3 as p,min as u,max as n,Float as d,Mat3 as m,Vec4 as y,ifElse as h,lessThan as c,equal as x,texture2D as v,clamp as V,abs as f,mix as w,distance as S,greaterThan as b,Vec2 as g,negate as C,step as M,Sampler2D as z}from"../../graph/glsl.js";import{MarkerConstants as _}from"./markerConstants.js";import{AFeatureShader as R,FeatureVertexInput as j,FeatureFragmentInput as U}from"../shaders/AFeatureShader.js";import{c256ToRad as N,softEdgeRatio as D}from"../shaders/constants.js";import{distPointTriangle as T,xyToBarycentric as F,inTriangle as O,failHittest as k}from"../shaders/hittestUtils.js";import{MosaicInfo as q}from"../shaders/MosaicInfo.js";import{getBit as A,getBitBool as P,rgba2float as I}from"../shaders/utils.js";import{VisualVariableColor as H}from"../shaders/VisualVariableColor.js";import{VisualVariableOpacity as G}from"../shaders/VisualVariableOpacity.js";import{VisualVariableRotation as L}from"../shaders/VisualVariableRotation.js";import{VisualVariableSizeMinMaxValue as B}from"../shaders/VisualVariableSizeMinMaxValue.js";import{VisualVariableSizeScaleStops as E}from"../shaders/VisualVariableSizeScaleStops.js";import{VisualVariableSizeStops as J}from"../shaders/VisualVariableSizeStops.js";import{VisualVariableSizeUnitValue as K}from"../shaders/VisualVariableSizeUnitValue.js";import{getVisualVariableOpacity as Q,getVisualVariableColor as W,getVisualVariableSize as X,getVisualVariableRotation as Y}from"../shaders/vvUtils.js";class Z extends j{}t([i(3,y)],Z.prototype,"color",void 0),t([i(4,y)],Z.prototype,"outlineColor",void 0),t([i(5,g)],Z.prototype,"offset",void 0),t([i(6,g)],Z.prototype,"textureUV",void 0),t([i(7,y)],Z.prototype,"sizing",void 0),t([i(8,d)],Z.prototype,"placementAngle",void 0),t([i(9,d)],Z.prototype,"sdfDecodeCoeff",void 0),t([i(10,g)],Z.prototype,"zoomRange",void 0);class $ extends a{}t([i(11,g)],$.prototype,"offsetNextVertex1",void 0),t([i(12,g)],$.prototype,"offsetNextVertex2",void 0),t([i(13,g)],$.prototype,"textureUVNextVertex1",void 0),t([i(14,g)],$.prototype,"textureUVNextVertex2",void 0);class tt extends U{}function et(t,e,i,o){return e.multiply(t.x).add(i.multiply(t.y)).add(o.multiply(t.z))}function it(t){return t.multiply(t).divide(128)}class ot extends R{constructor(){super(...arguments),this.type="MarkerShader",this.computeAttributes={offset:["offsetNextVertex1","offsetNextVertex2"],textureUV:["textureUVNextVertex1","textureUVNextVertex2"]}}vertex(t,e){const i=it(t.sizing.x),o=it(t.sizing.y),s=it(t.sizing.z),l=t.placementAngle,r=A(t.bitset,_.bitset.isSDF),a=A(t.bitset,_.bitset.isMapAligned),h=A(t.bitset,_.bitset.scaleSymbolsProportionally),c=P(t.bitset,_.bitset.colorLocked),x=Q(this,t.id),v=W(this,t.id,t.color,c).multiply(x),V=this.view.displayViewScreenMat3.multiply(new p(t.pos.xy,1)),f=X(this,t.id,s).divide(s),w=i.multiply(f),S=t.offset.xy.multiply(f);let b=o.multiply(h.multiply(f.subtract(1)).add(1));b=u(b,n(w.subtract(.99),new d(0)));const g=n(b,new d(1)),C=u(b,new d(1)),M=m.fromRotation(l.multiply(N)),z=Y(this,t.id),R=this._getViewRotationMatrix(a).multiply(z).multiply(M).multiply(new p(S.xy,0)),j=this.clip(t.id,t.zoomRange),U=new y(V.xy.add(R.xy),j,1),D=t.textureUV.divide(this.mosaicInfo.size),T=t.outlineColor.multiply(C),F=A(t.bitset,_.bitset.overrideOutlineColor),O=t.sdfDecodeCoeff.multiply(w);return{glPosition:U,color:v,textureUV:D,outlineColor:T,outlineSize:g,distanceToPx:O,isSDF:r,overrideOutlineColor:F,...this.maybeRunHittest(t,e,{pos:t.pos,size:w,sizeCorrection:f,isMapAligned:a,vvRotationMat3:z,placementMat3:M,outlineSize:g,distanceToPx:O,isSDF:r})}}fragment(t){const e=this._getColor(t.textureUV,t);return this.getFragmentOutput(e,t)}hittest(t,e,i){return h(c(i.size,this.hittestRequest.smallSymbolSizeThreshold),this._hittestSmallMarker(t,e,i),this._hittestMarker(t,e,i))}_getViewRotationMatrix(t){const e=this.view.displayViewMat3,i=this.view.displayMat3,o=new d(1).subtract(t);return e.multiply(t).add(i.multiply(o))}_getViewScreenMatrix(t){const e=this.view.viewMat3.multiply(this.view.tileMat3),i=this.view.tileMat3,o=new d(1).subtract(t);return e.multiply(t).add(i.multiply(o))}_getColor(t,e){return h(x(e.isSDF,new d(1)),this._getSDFColor(t,e),this._getSpriteColor(t,e))}_getSpriteColor(t,e){return v(this.mosaicTexture,t).multiply(e.color)}_getSDFColor(t,e){const i=v(this.mosaicTexture,t),o=new d(.5).subtract(I(i)).multiply(e.distanceToPx).multiply(D),s=V(new d(.5).subtract(o),new d(0),new d(1)),l=e.color.multiply(s);let r=e.outlineSize;this.highlight&&(r=n(r,e.overrideOutlineColor.multiply(4)));const a=r.multiply(.5),p=f(o).subtract(a),u=V(new d(.5).subtract(p),new d(0),new d(1)),m=w(e.outlineColor,e.color,e.overrideOutlineColor).multiply(u);return new d(1).subtract(m.a).multiply(l).add(m)}_hittestSmallMarker(t,e,i){const{position:o,distance:s,smallSymbolDistance:l}=this.hittestRequest,r=s.subtract(l),{viewMat3:a,tileMat3:u}=this.view,n=a.multiply(u).multiply(new p(i.pos,1)).xy,d=i.size.multiply(.5);return S(n,o).subtract(d).add(r)}_hittestMarker(t,e,i){const{pos0:o,pos1:s,pos2:l}=this.computeHittestTriangle(t,e,i),r=this.hittestRequest.position,a=this.hittestRequest.distance,p=T(r,o,s,l);return h(b(p,a),p,this._hittestSamples(o,s,l,t,e,i))}computeHittestTriangle(t,e,i){const{pos:o,sizeCorrection:s,isMapAligned:l}=i,r=new p(t.offset.multiply(s),0),a=new p(e.offsetNextVertex1.multiply(s),0),u=new p(e.offsetNextVertex2.multiply(s),0),{viewMat3:n,tileMat3:d}=this.view,m=n.multiply(d).multiply(new p(o,1)),y=this._getViewScreenMatrix(l).multiply(i.vvRotationMat3).multiply(i.placementMat3);return{pos0:m.add(y.multiply(r)).xy,pos1:m.add(y.multiply(a)).xy,pos2:m.add(y.multiply(u)).xy}}_hittestSamples(t,e,i,o,s,l){const{outlineSize:r,isSDF:a,distanceToPx:p}=l,u=this.hittestRequest.position,n=this.hittestRequest.distance,m=F(u.add(new g(C(n),C(n))),t,e,i),h=F(u.add(new g(0,C(n))),t,e,i),c=F(u.add(new g(n,C(n))),t,e,i),x=F(u.add(new g(C(n),0)),t,e,i),v=F(u,t,e,i),V=F(u.add(new g(n,0)),t,e,i),f=F(u.add(new g(C(n),n)),t,e,i),w=F(u.add(new g(0,n)),t,e,i),S=F(u.add(new g(n,n)),t,e,i),b=o.textureUV.divide(this.mosaicInfo.size),z=s.textureUVNextVertex1.divide(this.mosaicInfo.size),_=s.textureUVNextVertex2.divide(this.mosaicInfo.size),R={color:new y(1),outlineColor:new y(1),overrideOutlineColor:new d(1),outlineSize:r,distanceToPx:p,isSDF:a};let j=new d(0);return j=j.add(O(m).multiply(this._getColor(et(m,b,z,_),R).a)),j=j.add(O(h).multiply(this._getColor(et(h,b,z,_),R).a)),j=j.add(O(c).multiply(this._getColor(et(c,b,z,_),R).a)),j=j.add(O(x).multiply(this._getColor(et(x,b,z,_),R).a)),j=j.add(O(v).multiply(this._getColor(et(v,b,z,_),R).a)),j=j.add(O(V).multiply(this._getColor(et(V,b,z,_),R).a)),j=j.add(O(f).multiply(this._getColor(et(f,b,z,_),R).a)),j=j.add(O(w).multiply(this._getColor(et(w,b,z,_),R).a)),j=j.add(O(S).multiply(this._getColor(et(S,b,z,_),R).a)),M(j,new d(.05)).multiply(k(this.hittestRequest))}}t([o(H)],ot.prototype,"visualVariableColor",void 0),t([o(G)],ot.prototype,"visualVariableOpacity",void 0),t([o(L)],ot.prototype,"visualVariableRotation",void 0),t([o(B)],ot.prototype,"visualVariableSizeMinMaxValue",void 0),t([o(E)],ot.prototype,"visualVariableSizeScaleStops",void 0),t([o(J)],ot.prototype,"visualVariableSizeStops",void 0),t([o(K)],ot.prototype,"visualVariableSizeUnitValue",void 0),t([s(q)],ot.prototype,"mosaicInfo",void 0),t([l(z)],ot.prototype,"mosaicTexture",void 0),t([e(0,r(Z)),e(1,r($))],ot.prototype,"vertex",null),t([e(0,r(tt))],ot.prototype,"fragment",null);export{tt as MarkerFragmentInput,ot as MarkerShader,Z as MarkerVertexInput};
2
+ import{__decorate as t,__param as e}from"tslib";import{location as i,option as o,uniform as s,texture as r,input as l,ComputeVertexInput as a}from"../../GraphShaderModule.js";import{Vec3 as p,min as n,max as u,Float as d,Mat3 as m,Vec4 as y,ifElse as h,lessThan as c,greaterThan as x,equal as v,texture2D as V,clamp as f,abs as w,mix as S,distance as b,Vec2 as g,negate as C,step as M,Sampler2D as z}from"../../graph/glsl.js";import{MarkerConstants as _}from"./markerConstants.js";import{AFeatureShader as R,FeatureVertexInput as j,FeatureFragmentInput as U}from"../shaders/AFeatureShader.js";import{c256ToRad as N,softEdgeRatio as T}from"../shaders/constants.js";import{isRectHittest as D,hittestScreenRect as q,distPointTriangle as F,xyToBarycentric as O,inTriangle as k,failHittest as A}from"../shaders/hittestUtils.js";import{MosaicInfo as P}from"../shaders/MosaicInfo.js";import{getBit as I,getBitBool as H,rgba2float as G}from"../shaders/utils.js";import{VisualVariableColor as L}from"../shaders/VisualVariableColor.js";import{VisualVariableOpacity as B}from"../shaders/VisualVariableOpacity.js";import{VisualVariableRotation as E}from"../shaders/VisualVariableRotation.js";import{VisualVariableSizeMinMaxValue as J}from"../shaders/VisualVariableSizeMinMaxValue.js";import{VisualVariableSizeScaleStops as K}from"../shaders/VisualVariableSizeScaleStops.js";import{VisualVariableSizeStops as Q}from"../shaders/VisualVariableSizeStops.js";import{VisualVariableSizeUnitValue as W}from"../shaders/VisualVariableSizeUnitValue.js";import{getVisualVariableOpacity as X,getVisualVariableColor as Y,getVisualVariableSize as Z,getVisualVariableRotation as $}from"../shaders/vvUtils.js";class tt extends j{}t([i(3,y)],tt.prototype,"color",void 0),t([i(4,y)],tt.prototype,"outlineColor",void 0),t([i(5,g)],tt.prototype,"offset",void 0),t([i(6,g)],tt.prototype,"textureUV",void 0),t([i(7,y)],tt.prototype,"sizing",void 0),t([i(8,d)],tt.prototype,"placementAngle",void 0),t([i(9,d)],tt.prototype,"sdfDecodeCoeff",void 0),t([i(10,g)],tt.prototype,"zoomRange",void 0);class et extends a{}t([i(11,g)],et.prototype,"offsetNextVertex1",void 0),t([i(12,g)],et.prototype,"offsetNextVertex2",void 0),t([i(13,g)],et.prototype,"textureUVNextVertex1",void 0),t([i(14,g)],et.prototype,"textureUVNextVertex2",void 0);class it extends U{}function ot(t,e,i,o){return e.multiply(t.x).add(i.multiply(t.y)).add(o.multiply(t.z))}function st(t){return t.multiply(t).divide(128)}class rt extends R{constructor(){super(...arguments),this.type="MarkerShader",this.computeAttributes={offset:["offsetNextVertex1","offsetNextVertex2"],textureUV:["textureUVNextVertex1","textureUVNextVertex2"]}}vertex(t,e){const i=st(t.sizing.x),o=st(t.sizing.y),s=st(t.sizing.z),r=t.placementAngle,l=I(t.bitset,_.bitset.isSDF),a=I(t.bitset,_.bitset.isMapAligned),h=I(t.bitset,_.bitset.scaleSymbolsProportionally),c=H(t.bitset,_.bitset.colorLocked),x=X(this,t.id),v=Y(this,t.id,t.color,c).multiply(x),V=this.view.displayViewScreenMat3.multiply(new p(t.pos.xy,1)),f=Z(this,t.id,s).divide(s),w=i.multiply(f),S=t.offset.xy.multiply(f);let b=o.multiply(h.multiply(f.subtract(1)).add(1));b=n(b,u(w.subtract(.99),new d(0)));const g=u(b,new d(1)),C=n(b,new d(1)),M=m.fromRotation(r.multiply(N)),z=$(this,t.id),R=this._getViewRotationMatrix(a).multiply(z).multiply(M).multiply(new p(S.xy,0)),j=this.clip(t.id,t.zoomRange),U=new y(V.xy.add(R.xy),j,1),T=t.textureUV.divide(this.mosaicInfo.size),D=t.outlineColor.multiply(C),q=I(t.bitset,_.bitset.overrideOutlineColor),F=t.sdfDecodeCoeff.multiply(w);return{glPosition:U,color:v,textureUV:T,outlineColor:D,outlineSize:g,distanceToPx:F,isSDF:l,overrideOutlineColor:q,...this.maybeRunHittest(t,e,{pos:t.pos,size:w,sizeCorrection:f,isMapAligned:a,vvRotationMat3:z,placementMat3:M,outlineSize:g,distanceToPx:F,isSDF:l})}}fragment(t){const e=this._getColor(t.textureUV,t);return this.getFragmentOutput(e,t)}hittest(t,e,i){const{pos0:o,pos1:s,pos2:r}=this.computeHittestTriangle(t,e,i),l=D(this.hittestRequest);return h(l,()=>{const{tlbr:t}=this.hittestRequest;return q(o,s,r,t)},()=>{const o=h(c(i.size,this.hittestRequest.smallSymbolSizeThreshold),this._hittestSmallMarker(t,e,i),this._hittestMarker(t,e,i));return h(x(o,this.hittestRequest.distance),new d(0),new d(1))})}_getViewRotationMatrix(t){const e=this.view.displayViewMat3,i=this.view.displayMat3,o=new d(1).subtract(t);return e.multiply(t).add(i.multiply(o))}_getViewScreenMatrix(t){const e=this.view.viewMat3.multiply(this.view.tileMat3),i=this.view.tileMat3,o=new d(1).subtract(t);return e.multiply(t).add(i.multiply(o))}_getColor(t,e){return h(v(e.isSDF,new d(1)),this._getSDFColor(t,e),this._getSpriteColor(t,e))}_getSpriteColor(t,e){return V(this.mosaicTexture,t).multiply(e.color)}_getSDFColor(t,e){const i=V(this.mosaicTexture,t),o=new d(.5).subtract(G(i)).multiply(e.distanceToPx).multiply(T),s=f(new d(.5).subtract(o),new d(0),new d(1)),r=e.color.multiply(s);let l=e.outlineSize;this.highlight&&(l=u(l,e.overrideOutlineColor.multiply(4)));const a=l.multiply(.5),p=w(o).subtract(a),n=f(new d(.5).subtract(p),new d(0),new d(1)),m=S(e.outlineColor,e.color,e.overrideOutlineColor).multiply(n);return new d(1).subtract(m.a).multiply(r).add(m)}_hittestSmallMarker(t,e,i){const{position:o,distance:s,smallSymbolDistance:r}=this.hittestRequest,l=s.subtract(r),{viewMat3:a,tileMat3:n}=this.view,u=a.multiply(n).multiply(new p(i.pos,1)).xy,d=i.size.multiply(.5);return b(u,o).subtract(d).add(l)}_hittestMarker(t,e,i){const{pos0:o,pos1:s,pos2:r}=this.computeHittestTriangle(t,e,i),l=this.hittestRequest.position,a=this.hittestRequest.distance,p=F(l,o,s,r);return h(x(p,a),p,this._hittestSamples(o,s,r,t,e,i))}computeHittestTriangle(t,e,i){const{pos:o,sizeCorrection:s,isMapAligned:r}=i,l=new p(t.offset.multiply(s),0),a=new p(e.offsetNextVertex1.multiply(s),0),n=new p(e.offsetNextVertex2.multiply(s),0),{viewMat3:u,tileMat3:d}=this.view,m=u.multiply(d).multiply(new p(o,1)),y=this._getViewScreenMatrix(r).multiply(i.vvRotationMat3).multiply(i.placementMat3);return{pos0:m.add(y.multiply(l)).xy,pos1:m.add(y.multiply(a)).xy,pos2:m.add(y.multiply(n)).xy}}_hittestSamples(t,e,i,o,s,r){const{outlineSize:l,isSDF:a,distanceToPx:p}=r,n=this.hittestRequest.position,u=this.hittestRequest.distance,m=O(n.add(new g(C(u),C(u))),t,e,i),h=O(n.add(new g(0,C(u))),t,e,i),c=O(n.add(new g(u,C(u))),t,e,i),x=O(n.add(new g(C(u),0)),t,e,i),v=O(n,t,e,i),V=O(n.add(new g(u,0)),t,e,i),f=O(n.add(new g(C(u),u)),t,e,i),w=O(n.add(new g(0,u)),t,e,i),S=O(n.add(new g(u,u)),t,e,i),b=o.textureUV.divide(this.mosaicInfo.size),z=s.textureUVNextVertex1.divide(this.mosaicInfo.size),_=s.textureUVNextVertex2.divide(this.mosaicInfo.size),R={color:new y(1),outlineColor:new y(1),overrideOutlineColor:new d(1),outlineSize:l,distanceToPx:p,isSDF:a};let j=new d(0);return j=j.add(k(m).multiply(this._getColor(ot(m,b,z,_),R).a)),j=j.add(k(h).multiply(this._getColor(ot(h,b,z,_),R).a)),j=j.add(k(c).multiply(this._getColor(ot(c,b,z,_),R).a)),j=j.add(k(x).multiply(this._getColor(ot(x,b,z,_),R).a)),j=j.add(k(v).multiply(this._getColor(ot(v,b,z,_),R).a)),j=j.add(k(V).multiply(this._getColor(ot(V,b,z,_),R).a)),j=j.add(k(f).multiply(this._getColor(ot(f,b,z,_),R).a)),j=j.add(k(w).multiply(this._getColor(ot(w,b,z,_),R).a)),j=j.add(k(S).multiply(this._getColor(ot(S,b,z,_),R).a)),M(j,new d(.05)).multiply(A(this.hittestRequest))}}t([o(L)],rt.prototype,"visualVariableColor",void 0),t([o(B)],rt.prototype,"visualVariableOpacity",void 0),t([o(E)],rt.prototype,"visualVariableRotation",void 0),t([o(J)],rt.prototype,"visualVariableSizeMinMaxValue",void 0),t([o(K)],rt.prototype,"visualVariableSizeScaleStops",void 0),t([o(Q)],rt.prototype,"visualVariableSizeStops",void 0),t([o(W)],rt.prototype,"visualVariableSizeUnitValue",void 0),t([s(P)],rt.prototype,"mosaicInfo",void 0),t([r(z)],rt.prototype,"mosaicTexture",void 0),t([e(0,l(tt)),e(1,l(et))],rt.prototype,"vertex",null),t([e(0,l(it))],rt.prototype,"fragment",null);export{it as MarkerFragmentInput,rt as MarkerShader,tt as MarkerVertexInput};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as t}from"tslib";import{maxHighlightReasons as e}from"../../../definitions.js";import{GraphShaderModule as i,FragmentOutput as s,location as o,define as r,option as h,uniform as l,texture as a,VertexInput as n,ComputeVertexInput as u,FragmentInput as g}from"../../GraphShaderModule.js";import{Float as p,float as d,step as m,Vec4 as c,Vec3 as y,ifElse as w,greaterThan as b,equal as x,Vec2 as v}from"../../graph/glsl.js";import{EntityStorage as f,EntityStorageTextures as H}from"./EntityStorage.js";import{isRectHittest as C,hittestScreenRect as V}from"./hittestUtils.js";import{ShaderHighlight as D}from"./ShaderHighlight.js";import{ShaderHittest as T}from"./ShaderHittest.js";import{getFilterBit as A,getHighlightBit as R,getBit as j,uvToClip as _}from"./utils.js";import{ViewInfo as F}from"./ViewInfo.js";class S extends n{}t([o(0,y)],S.prototype,"id",void 0),t([o(1,p)],S.prototype,"bitset",void 0),t([o(2,v)],S.prototype,"pos",void 0);class q extends u{}t([o(14,v)],q.prototype,"nextPos1",void 0),t([o(15,v)],q.prototype,"nextPos2",void 0);class P extends g{}class k extends i{clip(t,e){let i=new p(0);const s=this.getFilterFlags(t);if(i=i.add(d(2).multiply(d(1).subtract(A(s,0)))),this.inside?i=i.add(d(2).multiply(d(1).subtract(A(s,1)))):this.outside?i=i.add(d(2).multiply(A(s,1))):this.highlight&&(i=i.add(d(2).multiply(d(1).subtract(this._checkHighlight(s))))),null!=e){const t=new p(1).subtract(m(e.x,this.view.currentZoom)),s=m(e.y,this.view.currentZoom);i=i.add(new p(2).multiply(t.add(s)))}return i}getFragmentOutput(t,e,i=new p(1/255)){const o=new s;return o.fragColor=this._maybeWriteHittest(e)??this._maybeHighlight(t,i)??t,o}_maybeHighlight(t,e){return this.highlight?new c(t.rgb,m(e,t.a)):null}_checkHighlight(t){let i=this._checkHighlightBit(t,0);for(let s=1;s<e;s++)i=i.add(this._checkHighlightBit(t,s));return m(new p(.1),i.add(this.highlight.highlightAll))}_checkHighlightBit(t,e){return R(t,e).multiply(j(this.highlight.activeReasons,e))}computeHittestTriangle(t,e,i){const{viewMat3:s,tileMat3:o}=this.view,r=s.multiply(o),{nextPos1:h,nextPos2:l}=e;return{pos0:r.multiply(new y(t.pos,1)).xy,pos1:r.multiply(new y(h,1)).xy,pos2:r.multiply(new y(l,1)).xy}}maybeRunHittest(t,e,i){if(null==this.hittestRequest)return null;const s=C(this.hittestRequest),o=w(s,()=>{const{pos0:s,pos1:o,pos2:r}=this.computeHittestTriangle(t,e,i),{tlbr:h}=this.hittestRequest;return V(s,o,r,h)},()=>{const s=this.hittest(t,e,i);return w(b(s,this.hittestRequest.distance),new p(0),new p(1))});let r=w(x(o,new p(1)),new p(0),new p(2));const h=this.getAttributeDataCoords(t.id),l=_(h);r=r.add(this.clip(t.id,t.zoomRange));const a=new c(new p(1/255),0,0,0);return{glPointSize:new p(1),glPosition:new c(l,r,1),color:a}}_maybeWriteHittest(t){return null!=this.hittestRequest?t.color:null}getAttributeDataCoords(t){return this.storage.getAttributeDataCoords(t)}getVVData(t){return this.storageTextures.getVVData(this.getAttributeDataCoords(t))}getFilterFlags(t){return this.storageTextures.getFilterFlags(this.getAttributeDataCoords(t))}getLocalTimeOrigin(t){return this.storageTextures.getLocalTimeOrigin(this.getAttributeDataCoords(t))}getSizeValue(t){return this.storageTextures.getSizeValue(this.getAttributeDataCoords(t))}getColorValue(t){return this.storageTextures.getColorValue(this.getAttributeDataCoords(t))}getOpacityValue(t){return this.storageTextures.getOpacityValue(this.getAttributeDataCoords(t))}getRotationValue(t){return this.storageTextures.getRotationValue(this.getAttributeDataCoords(t))}}t([r],k.prototype,"inside",void 0),t([r],k.prototype,"outside",void 0),t([h(D)],k.prototype,"highlight",void 0),t([l(f)],k.prototype,"storage",void 0),t([a(H)],k.prototype,"storageTextures",void 0),t([l(F)],k.prototype,"view",void 0),t([h(T)],k.prototype,"hittestRequest",void 0);export{k as AFeatureShader,q as BaseHittestVertexInput,P as FeatureFragmentInput,S as FeatureVertexInput};
2
+ import{__decorate as t}from"tslib";import{maxHighlightReasons as e}from"../../../definitions.js";import{GraphShaderModule as i,FragmentOutput as o,location as r,define as s,option as a,uniform as l,texture as h,VertexInput as g,ComputeVertexInput as u,FragmentInput as n}from"../../GraphShaderModule.js";import{Float as p,float as d,step as m,Vec4 as c,Vec3 as y,ifElse as w,equal as b,Vec2 as x}from"../../graph/glsl.js";import{EntityStorage as v,EntityStorageTextures as f}from"./EntityStorage.js";import{ShaderHighlight as C}from"./ShaderHighlight.js";import{ShaderHittest as H}from"./ShaderHittest.js";import{getFilterBit as V,getHighlightBit as D,getBit as A,uvToClip as T}from"./utils.js";import{ViewInfo as _}from"./ViewInfo.js";class j extends g{}t([r(0,y)],j.prototype,"id",void 0),t([r(1,p)],j.prototype,"bitset",void 0),t([r(2,x)],j.prototype,"pos",void 0);class R extends u{}t([r(14,x)],R.prototype,"nextPos1",void 0),t([r(15,x)],R.prototype,"nextPos2",void 0);class F extends n{}class S extends i{clip(t,e){let i=new p(0);const o=this.getFilterFlags(t);if(i=i.add(d(2).multiply(d(1).subtract(V(o,0)))),this.inside?i=i.add(d(2).multiply(d(1).subtract(V(o,1)))):this.outside?i=i.add(d(2).multiply(V(o,1))):this.highlight&&(i=i.add(d(2).multiply(d(1).subtract(this._checkHighlight(o))))),null!=e){const t=new p(1).subtract(m(e.x,this.view.currentZoom)),o=m(e.y,this.view.currentZoom);i=i.add(new p(2).multiply(t.add(o)))}return i}getFragmentOutput(t,e,i=new p(1/255)){const r=new o;return r.fragColor=this._maybeWriteHittest(e)??this._maybeHighlight(t,i)??t,r}_maybeHighlight(t,e){return this.highlight?new c(t.rgb,m(e,t.a)):null}_checkHighlight(t){let i=this._checkHighlightBit(t,0);for(let o=1;o<e;o++)i=i.add(this._checkHighlightBit(t,o));return m(new p(.1),i.add(this.highlight.highlightAll))}_checkHighlightBit(t,e){return D(t,e).multiply(A(this.highlight.activeReasons,e))}computeHittestTriangle(t,e,i){const{viewMat3:o,tileMat3:r}=this.view,s=o.multiply(r),{nextPos1:a,nextPos2:l}=e;return{pos0:s.multiply(new y(t.pos,1)).xy,pos1:s.multiply(new y(a,1)).xy,pos2:s.multiply(new y(l,1)).xy}}maybeRunHittest(t,e,i){if(null==this.hittestRequest)return null;const o=this.hittest(t,e,i);let r=w(b(o,new p(1)),new p(0),new p(2));const s=this.getAttributeDataCoords(t.id),a=T(s);r=r.add(this.clip(t.id,t.zoomRange));const l=new c(new p(1/255),0,0,0);return{glPointSize:new p(1),glPosition:new c(a,r,1),color:l}}_maybeWriteHittest(t){return null!=this.hittestRequest?t.color:null}getAttributeDataCoords(t){return this.storage.getAttributeDataCoords(t)}getVVData(t){return this.storageTextures.getVVData(this.getAttributeDataCoords(t))}getFilterFlags(t){return this.storageTextures.getFilterFlags(this.getAttributeDataCoords(t))}getLocalTimeOrigin(t){return this.storageTextures.getLocalTimeOrigin(this.getAttributeDataCoords(t))}getSizeValue(t){return this.storageTextures.getSizeValue(this.getAttributeDataCoords(t))}getColorValue(t){return this.storageTextures.getColorValue(this.getAttributeDataCoords(t))}getOpacityValue(t){return this.storageTextures.getOpacityValue(this.getAttributeDataCoords(t))}getRotationValue(t){return this.storageTextures.getRotationValue(this.getAttributeDataCoords(t))}}t([s],S.prototype,"inside",void 0),t([s],S.prototype,"outside",void 0),t([a(C)],S.prototype,"highlight",void 0),t([l(v)],S.prototype,"storage",void 0),t([h(f)],S.prototype,"storageTextures",void 0),t([l(_)],S.prototype,"view",void 0),t([a(H)],S.prototype,"hittestRequest",void 0);export{S as AFeatureShader,R as BaseHittestVertexInput,F as FeatureFragmentInput,j as FeatureVertexInput};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as t,__param as o}from"tslib";import{location as r,option as e,input as i}from"../../GraphShaderModule.js";import{Vec3 as s,Vec4 as l,Float as p,Vec2 as a}from"../../graph/glsl.js";import{AFeatureShader as m,BaseHittestVertexInput as n,FeatureFragmentInput as u,FeatureVertexInput as h}from"./AFeatureShader.js";import{hittestFill as y}from"./hittestUtils.js";import{VisualVariableColor as c}from"./VisualVariableColor.js";import{VisualVariableOpacity as d}from"./VisualVariableOpacity.js";import{getVisualVariableOpacity as v,getVisualVariableColor as f}from"./vvUtils.js";class g extends h{}t([r(3,l)],g.prototype,"color",void 0),t([r(4,a)],g.prototype,"zoomRange",void 0);class x extends m{constructor(){super(...arguments),this.type="FillShader",this.computeAttributes={pos:["nextPos1","nextPos2"]}}vertex(t,o){const r=v(this,t.id),e=f(this,t.id,t.color).multiply(r),i=this.view.displayViewScreenMat3.multiply(new s(t.pos.xy,1)),p=this.clip(t.id,t.zoomRange);return{glPosition:new l(i.xy,p,1),color:e,...this.maybeRunHittest(t,o,null)}}fragment(t){return this.getFragmentOutput(t.color,t,new p(0))}hittest(t,o){return y(this,t,o)}}t([e(c)],x.prototype,"visualVariableColor",void 0),t([e(d)],x.prototype,"visualVariableOpacity",void 0),t([o(0,i(g)),o(1,i(n))],x.prototype,"vertex",null),t([o(0,i(u))],x.prototype,"fragment",null);export{x as FillShader,g as FillVertexInput};
2
+ import{__decorate as t,__param as e}from"tslib";import{location as o,option as r,input as s}from"../../GraphShaderModule.js";import{Vec3 as i,Vec4 as l,Float as p,ifElse as n,greaterThan as a,Vec2 as u}from"../../graph/glsl.js";import{AFeatureShader as m,BaseHittestVertexInput as h,FeatureFragmentInput as c,FeatureVertexInput as d}from"./AFeatureShader.js";import{isRectHittest as y,hittestFill as v,hittestScreenRect as f}from"./hittestUtils.js";import{VisualVariableColor as g}from"./VisualVariableColor.js";import{VisualVariableOpacity as x}from"./VisualVariableOpacity.js";import{getVisualVariableOpacity as b,getVisualVariableColor as j}from"./vvUtils.js";class w extends d{}t([o(3,l)],w.prototype,"color",void 0),t([o(4,u)],w.prototype,"zoomRange",void 0);class V extends m{constructor(){super(...arguments),this.type="FillShader",this.computeAttributes={pos:["nextPos1","nextPos2"]}}vertex(t,e){const o=b(this,t.id),r=j(this,t.id,t.color).multiply(o),s=this.view.displayViewScreenMat3.multiply(new i(t.pos.xy,1)),p=this.clip(t.id,t.zoomRange);return{glPosition:new l(s.xy,p,1),color:r,...this.maybeRunHittest(t,e,null)}}fragment(t){return this.getFragmentOutput(t.color,t,new p(0))}hittest(t,e){const{pos0:o,pos1:r,pos2:s}=this.computeHittestTriangle(t,e,null),i=y(this.hittestRequest);return n(i,()=>{const{tlbr:t}=this.hittestRequest;return f(o,r,s,t)},()=>{const o=v(this,t,e);return n(a(o,this.hittestRequest.distance),new p(0),new p(1))})}}t([r(g)],V.prototype,"visualVariableColor",void 0),t([r(x)],V.prototype,"visualVariableOpacity",void 0),t([e(0,s(w)),e(1,s(h))],V.prototype,"vertex",null),t([e(0,s(c))],V.prototype,"fragment",null);export{V as FillShader,w as FillVertexInput};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as t,__param as i}from"tslib";import{location as o,uniform as e,option as l,input as r,UniformGroup as a}from"../../GraphShaderModule.js";import{step as s,min as n,length as p,clamp as u,Float as m,max as d,Vec3 as y,Vec4 as c,Vec2 as f}from"../../graph/glsl.js";import{AFeatureShader as h,BaseHittestVertexInput as v,FeatureVertexInput as V,FeatureFragmentInput as b}from"./AFeatureShader.js";import{thinLineWidthFactor as w,thinLineHalfWidth as S,epsilon as g}from"./constants.js";import{distPointSegment as x}from"./hittestUtils.js";import{VisualVariableColor as j}from"./VisualVariableColor.js";import{VisualVariableOpacity as z}from"./VisualVariableOpacity.js";import{VisualVariableSizeMinMaxValue as W}from"./VisualVariableSizeMinMaxValue.js";import{VisualVariableSizeScaleStops as M}from"./VisualVariableSizeScaleStops.js";import{VisualVariableSizeStops as C}from"./VisualVariableSizeStops.js";import{VisualVariableSizeUnitValue as H}from"./VisualVariableSizeUnitValue.js";import{getVisualVariableColor as R,getVisualVariableOpacity as O,hasVisualVariableSize as U,getVisualVariableSize as P}from"./vvUtils.js";class q extends V{}t([o(3,c)],q.prototype,"color",void 0),t([o(4,f)],q.prototype,"offset",void 0),t([o(5,f)],q.prototype,"normal",void 0),t([o(6,m)],q.prototype,"halfWidth",void 0),t([o(7,m)],q.prototype,"referenceHalfWidth",void 0),t([o(8,f)],q.prototype,"zoomRange",void 0);class A extends b{}class F extends a{}function T(t){return d(new m(w).multiply(s(t,new m(S))),new m(1))}function D(t,i){const{halfWidth:o,normal:e}=t,l=T(o),r=p(e).multiply(o);return u(l.multiply(o.subtract(r)).divide(i.add(l).subtract(new m(1))),new m(0),new m(1))}function G(t,i){const{id:o,halfWidth:e,referenceHalfWidth:l}=i;if(U(t)){const i=new m(2).multiply(l),r=P(t,o,i);return new m(.5).multiply(e.divide(d(l,new m(g)))).multiply(r)}return e}function L(t,i){const{id:o,offset:e,pos:l,normal:r,zoomRange:a}=i,{displayViewScreenMat3:n,displayViewMat3:p}=t.view,u=R(t,o,i.color),f=O(t,o),h=G(t,i),v=new m(.5).multiply(t.antialiasingControls.antialiasing),V=d(h.add(v),new m(.45)).add(new m(.1).multiply(v)),b=T(V).multiply(V).multiply(e),w=p.multiply(new y(b,new m(0))),S=n.multiply(new y(l,new m(1))).add(w),g=new m(2).multiply(s(h,new m(0))).add(t.clip(o,a)),x=new c(S.xy,g,1);return{color:u,opacity:f,halfWidth:V,normal:r,scaledOffset:b,scaledHalfWidth:h,glPosition:new c(x.xy,g,1)}}function k(t,i){const{opacity:o,color:e}=t,l=D(t,i);return o.multiply(e).multiply(l)}t([e(m)],F.prototype,"antialiasing",void 0),t([e(m)],F.prototype,"blur",void 0);class B extends h{constructor(){super(...arguments),this.type="LineShader",this.computeAttributes={pos:["nextPos1","nextPos2"]}}vertex(t,i){const o=L(this,t);return{...o,...this.maybeRunHittest(t,i,o.halfWidth)}}fragment(t){const i=k(t,this.antialiasingControls.blur);return this.getFragmentOutput(i,t)}hittest(t,i,o){const{pos0:e,pos1:l,pos2:r}=this.computeHittestTriangle(t,i,null),{distance:a,smallSymbolDistance:p,smallSymbolSizeThreshold:u}=this.hittestRequest,m=s(o,u.multiply(.5)).multiply(a.subtract(p)),d=this.hittestRequest.position;return n(x(d,e,l),x(d,e,r)).subtract(o).add(m)}}t([e(F)],B.prototype,"antialiasingControls",void 0),t([l(j)],B.prototype,"visualVariableColor",void 0),t([l(z)],B.prototype,"visualVariableOpacity",void 0),t([l(W)],B.prototype,"visualVariableSizeMinMaxValue",void 0),t([l(M)],B.prototype,"visualVariableSizeScaleStops",void 0),t([l(C)],B.prototype,"visualVariableSizeStops",void 0),t([l(H)],B.prototype,"visualVariableSizeUnitValue",void 0),t([i(0,r(q)),i(1,r(v))],B.prototype,"vertex",null),t([i(0,r(A))],B.prototype,"fragment",null);export{F as AntialiasingControls,A as LineFragmentInput,B as LineShader,q as LineVertexInput,D as getLineAntialiasing,k as getLineFragmentColor,T as getLineThinFactor,L as getLineVertexData};
2
+ import{__decorate as t,__param as i}from"tslib";import{location as e,uniform as o,option as l,input as r,UniformGroup as a}from"../../GraphShaderModule.js";import{step as s,min as n,ifElse as p,greaterThan as u,Float as m,length as d,clamp as y,max as c,Vec3 as f,Vec4 as h,Vec2 as v}from"../../graph/glsl.js";import{AFeatureShader as w,BaseHittestVertexInput as b,FeatureVertexInput as V,FeatureFragmentInput as S}from"./AFeatureShader.js";import{thinLineWidthFactor as g,thinLineHalfWidth as x,epsilon as j}from"./constants.js";import{isRectHittest as z,distPointSegment as W,hittestScreenRect as M}from"./hittestUtils.js";import{VisualVariableColor as R}from"./VisualVariableColor.js";import{VisualVariableOpacity as C}from"./VisualVariableOpacity.js";import{VisualVariableSizeMinMaxValue as H}from"./VisualVariableSizeMinMaxValue.js";import{VisualVariableSizeScaleStops as O}from"./VisualVariableSizeScaleStops.js";import{VisualVariableSizeStops as U}from"./VisualVariableSizeStops.js";import{VisualVariableSizeUnitValue as q}from"./VisualVariableSizeUnitValue.js";import{getVisualVariableColor as P,getVisualVariableOpacity as A,hasVisualVariableSize as F,getVisualVariableSize as T}from"./vvUtils.js";class D extends V{}t([e(3,h)],D.prototype,"color",void 0),t([e(4,v)],D.prototype,"offset",void 0),t([e(5,v)],D.prototype,"normal",void 0),t([e(6,m)],D.prototype,"halfWidth",void 0),t([e(7,m)],D.prototype,"referenceHalfWidth",void 0),t([e(8,v)],D.prototype,"zoomRange",void 0);class G extends S{}class L extends a{}function k(t){return c(new m(g).multiply(s(t,new m(x))),new m(1))}function B(t,i){const{halfWidth:e,normal:o}=t,l=k(e),r=d(o).multiply(e);return y(l.multiply(e.subtract(r)).divide(i.add(l).subtract(new m(1))),new m(0),new m(1))}function E(t,i){const{id:e,halfWidth:o,referenceHalfWidth:l}=i;if(F(t)){const i=new m(2).multiply(l),r=T(t,e,i);return new m(.5).multiply(o.divide(c(l,new m(j)))).multiply(r)}return o}function I(t,i){const{id:e,offset:o,pos:l,normal:r,zoomRange:a}=i,{displayViewScreenMat3:n,displayViewMat3:p}=t.view,u=P(t,e,i.color),d=A(t,e),y=E(t,i),v=new m(.5).multiply(t.antialiasingControls.antialiasing),w=c(y.add(v),new m(.45)).add(new m(.1).multiply(v)),b=k(w).multiply(w).multiply(o),V=p.multiply(new f(b,new m(0))),S=n.multiply(new f(l,new m(1))).add(V),g=new m(2).multiply(s(y,new m(0))).add(t.clip(e,a)),x=new h(S.xy,g,1);return{color:u,opacity:d,halfWidth:w,normal:r,scaledOffset:b,scaledHalfWidth:y,glPosition:new h(x.xy,g,1)}}function J(t,i){const{opacity:e,color:o}=t,l=B(t,i);return e.multiply(o).multiply(l)}t([o(m)],L.prototype,"antialiasing",void 0),t([o(m)],L.prototype,"blur",void 0);class K extends w{constructor(){super(...arguments),this.type="LineShader",this.computeAttributes={pos:["nextPos1","nextPos2"]}}vertex(t,i){const e=I(this,t);return{...e,...this.maybeRunHittest(t,i,e.halfWidth)}}fragment(t){const i=J(t,this.antialiasingControls.blur);return this.getFragmentOutput(i,t)}hittest(t,i,e){const{pos0:o,pos1:l,pos2:r}=this.computeHittestTriangle(t,i,null),a=z(this.hittestRequest),{distance:d,smallSymbolDistance:y,smallSymbolSizeThreshold:c,tlbr:f}=this.hittestRequest,h=s(e,c.multiply(.5)).multiply(d.subtract(y)),v=this.hittestRequest.position,w=n(W(v,o,l),W(v,o,r)).subtract(e).add(h);return p(a,M(o,l,r,f),p(u(w,d),new m(0),new m(1)))}}t([o(L)],K.prototype,"antialiasingControls",void 0),t([l(R)],K.prototype,"visualVariableColor",void 0),t([l(C)],K.prototype,"visualVariableOpacity",void 0),t([l(H)],K.prototype,"visualVariableSizeMinMaxValue",void 0),t([l(O)],K.prototype,"visualVariableSizeScaleStops",void 0),t([l(U)],K.prototype,"visualVariableSizeStops",void 0),t([l(q)],K.prototype,"visualVariableSizeUnitValue",void 0),t([i(0,r(D)),i(1,r(b))],K.prototype,"vertex",null),t([i(0,r(G))],K.prototype,"fragment",null);export{L as AntialiasingControls,G as LineFragmentInput,K as LineShader,D as LineVertexInput,B as getLineAntialiasing,J as getLineFragmentColor,k as getLineThinFactor,I as getLineVertexData};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as t,__param as o}from"tslib";import{location as i,uniform as e,option as r,input as s}from"../../GraphShaderModule.js";import{greaterThan as a,Float as l,ifElse as p,Vec3 as n,Vec4 as u,Vec2 as m}from"../../graph/glsl.js";import{AFeatureShader as d,BaseHittestVertexInput as c,FeatureVertexInput as f}from"./AFeatureShader.js";import{bitsetTypeFillOutline as y,bitsetOutlineUsesColorVV as v}from"./constants.js";import{hittestFill as h,failHittest as V}from"./hittestUtils.js";import{getLineFragmentColor as S,getLineVertexData as b,AntialiasingControls as j,LineFragmentInput as x}from"./LineShader.js";import{getBit as g,getBitBool as w}from"./utils.js";import{VisualVariableColor as z}from"./VisualVariableColor.js";import{VisualVariableOpacity as M}from"./VisualVariableOpacity.js";import{VisualVariableSizeMinMaxValue as O}from"./VisualVariableSizeMinMaxValue.js";import{VisualVariableSizeScaleStops as C}from"./VisualVariableSizeScaleStops.js";import{VisualVariableSizeStops as P}from"./VisualVariableSizeStops.js";import{VisualVariableSizeUnitValue as U}from"./VisualVariableSizeUnitValue.js";import{getVisualVariableOpacity as W,getVisualVariableColor as F}from"./vvUtils.js";class R extends f{}t([i(3,m)],R.prototype,"offset",void 0),t([i(4,u)],R.prototype,"color",void 0),t([i(5,m)],R.prototype,"normal",void 0),t([i(6,l)],R.prototype,"halfWidth",void 0),t([i(7,l)],R.prototype,"referenceHalfWidth",void 0),t([i(8,m)],R.prototype,"zoomRange",void 0);class A extends x{}function H(t,o,i){const{id:e,bitset:r}=o,s=g(r,y),m=a(s,new l(.5)),d=b(t,o),c=p(m,d.halfWidth,new l(0)),f=W(t,e),h=F(t,e,o.color),V=p(m,p(w(r,v),h,o.color),h.multiply(f)),S=t.view.displayViewScreenMat3.multiply(new n(o.pos.xy,1)),j=t.clip(o.id),x=new u(S.xy,j,1),z=p(m,d.glPosition,x),M=i&&t.maybeRunHittest(o,i,m);return{isOutline:s,color:V,opacity:new l(1),halfWidth:c,normal:d.normal,glPosition:z,...M}}class q extends d{constructor(){super(...arguments),this.computeAttributes={pos:["nextPos1","nextPos2"]}}}t([e(j)],q.prototype,"antialiasingControls",void 0),t([r(z)],q.prototype,"visualVariableColor",void 0),t([r(M)],q.prototype,"visualVariableOpacity",void 0),t([r(O)],q.prototype,"visualVariableSizeMinMaxValue",void 0),t([r(C)],q.prototype,"visualVariableSizeScaleStops",void 0),t([r(P)],q.prototype,"visualVariableSizeStops",void 0),t([r(U)],q.prototype,"visualVariableSizeUnitValue",void 0);class G extends q{constructor(){super(...arguments),this.type="OutlineFillShader"}vertex(t,o){return H(this,t,o)}fragment(t){const{color:o,isOutline:i}=t,e=a(i,new l(.5)),r=S(t,this.antialiasingControls.blur),s=p(e,r,o),n=p(e,new l(1/255),new l(0));return this.getFragmentOutput(s,t,n)}hittest(t,o,i){return p(i,V(this.hittestRequest),h(this,t,o))}}t([o(0,s(R)),o(1,s(c))],G.prototype,"vertex",null),t([o(0,s(A))],G.prototype,"fragment",null);export{q as AOutlineFillShader,A as OutlineFillFragmentInput,G as OutlineFillShader,R as OutlineFillVertexInput,H as getOutlineFillVertexData};
2
+ import{__decorate as t,__param as o}from"tslib";import{location as i,uniform as e,option as r,input as s}from"../../GraphShaderModule.js";import{greaterThan as a,Float as l,ifElse as p,Vec3 as n,Vec4 as u,Vec2 as m}from"../../graph/glsl.js";import{AFeatureShader as c,BaseHittestVertexInput as d,FeatureVertexInput as h}from"./AFeatureShader.js";import{bitsetTypeFillOutline as f,bitsetOutlineUsesColorVV as y}from"./constants.js";import{isRectHittest as v,failHittest as V,hittestFill as S,hittestScreenRect as b}from"./hittestUtils.js";import{getLineFragmentColor as j,getLineVertexData as x,AntialiasingControls as g,LineFragmentInput as w}from"./LineShader.js";import{getBit as z,getBitBool as M}from"./utils.js";import{VisualVariableColor as O}from"./VisualVariableColor.js";import{VisualVariableOpacity as R}from"./VisualVariableOpacity.js";import{VisualVariableSizeMinMaxValue as q}from"./VisualVariableSizeMinMaxValue.js";import{VisualVariableSizeScaleStops as C}from"./VisualVariableSizeScaleStops.js";import{VisualVariableSizeStops as P}from"./VisualVariableSizeStops.js";import{VisualVariableSizeUnitValue as U}from"./VisualVariableSizeUnitValue.js";import{getVisualVariableOpacity as W,getVisualVariableColor as F}from"./vvUtils.js";class H extends h{}t([i(3,m)],H.prototype,"offset",void 0),t([i(4,u)],H.prototype,"color",void 0),t([i(5,m)],H.prototype,"normal",void 0),t([i(6,l)],H.prototype,"halfWidth",void 0),t([i(7,l)],H.prototype,"referenceHalfWidth",void 0),t([i(8,m)],H.prototype,"zoomRange",void 0);class A extends w{}function G(t,o,i){const{id:e,bitset:r}=o,s=z(r,f),m=a(s,new l(.5)),c=x(t,o),d=p(m,c.halfWidth,new l(0)),h=W(t,e),v=F(t,e,o.color),V=p(m,p(M(r,y),v,o.color),v.multiply(h)),S=t.view.displayViewScreenMat3.multiply(new n(o.pos.xy,1)),b=t.clip(o.id),j=new u(S.xy,b,1),g=p(m,c.glPosition,j),w=i&&t.maybeRunHittest(o,i,m);return{isOutline:s,color:V,opacity:new l(1),halfWidth:d,normal:c.normal,glPosition:g,...w}}class L extends c{constructor(){super(...arguments),this.computeAttributes={pos:["nextPos1","nextPos2"]}}}t([e(g)],L.prototype,"antialiasingControls",void 0),t([r(O)],L.prototype,"visualVariableColor",void 0),t([r(R)],L.prototype,"visualVariableOpacity",void 0),t([r(q)],L.prototype,"visualVariableSizeMinMaxValue",void 0),t([r(C)],L.prototype,"visualVariableSizeScaleStops",void 0),t([r(P)],L.prototype,"visualVariableSizeStops",void 0),t([r(U)],L.prototype,"visualVariableSizeUnitValue",void 0);class T extends L{constructor(){super(...arguments),this.type="OutlineFillShader"}vertex(t,o){return G(this,t,o)}fragment(t){const{color:o,isOutline:i}=t,e=a(i,new l(.5)),r=j(t,this.antialiasingControls.blur),s=p(e,r,o),n=p(e,new l(1/255),new l(0));return this.getFragmentOutput(s,t,n)}hittest(t,o,i){const{pos0:e,pos1:r,pos2:s}=this.computeHittestTriangle(t,o,null),n=v(this.hittestRequest);return p(n,()=>{const{tlbr:t}=this.hittestRequest;return b(e,r,s,t)},()=>{const e=p(i,V(this.hittestRequest),S(this,t,o));return p(a(e,this.hittestRequest.distance),new l(0),new l(1))})}}t([o(0,s(H)),o(1,s(d))],T.prototype,"vertex",null),t([o(0,s(A))],T.prototype,"fragment",null);export{L as AOutlineFillShader,A as OutlineFillFragmentInput,T as OutlineFillShader,H as OutlineFillVertexInput,G as getOutlineFillVertexData};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{clamp as t,Float as y,length as n,distance as u,Vec3 as r,and as x,greaterThan as e,lessThan as i,cond as l,not as c,Mat3 as s,abs as a,step as d,dot as o,normalize as w,equal as b,greaterThanEqual as p,Vec2 as m,min as f,max as v,or as j,ifElse as g,lessThanEqual as h}from"../../graph/glsl.js";import{epsilonHitTest as z}from"./constants.js";import{cross2 as M}from"./utils.js";function P(t,y){return o(t,w(y))}function q(r,x,e){const i=e.subtract(x),l=P(r.subtract(x),i),c=t(l.divide(n(i)),new y(0),new y(1));return u(r,x.add(c.multiply(e.subtract(x))))}function R(t){const n=a(t);return d(n.x.add(n.y).add(n.z),new y(1.05))}function k(t,n,u,x){const e=new s(u.x.multiply(x.y).subtract(x.x.multiply(u.y)),x.x.multiply(n.y).subtract(n.x.multiply(x.y)),n.x.multiply(u.y).subtract(u.x.multiply(n.y)),u.y.subtract(x.y),x.y.subtract(n.y),n.y.subtract(u.y),x.x.subtract(u.x),n.x.subtract(x.x),u.x.subtract(n.x)),i=n.x.multiply(u.y.subtract(x.y)),l=u.x.multiply(x.y.subtract(n.y)),c=x.x.multiply(n.y.subtract(u.y)),a=i.add(l).add(c);return new y(1).divide(a).multiply(e.multiply(new r(1,t)))}function A(t,n,u,r){return b(R(k(t,n,u,r)),new y(1))}function B(t,n,u,r){const s=u.subtract(n),a=r.subtract(n),d=M(s,a),o=x(i(d,new y(z)),e(d,new y(-z)));return l([x(c(o),A(t.xy,n,u,r)),new y(-1)],[!0,()=>{const y=q(t,n,u),x=q(t,u,r),e=q(t,r,n);return f(f(y,x),e)}])}function C(t){return t.distance.add(1)}function D(t,y,n){const{viewMat3:u,tileMat3:x}=t.view,e=u.multiply(x),i=e.multiply(new r(y.pos,1)),l=e.multiply(new r(n.nextPos1,1)),c=e.multiply(new r(n.nextPos2,1));return B(t.hittestRequest.position,i.xy,l.xy,c.xy)}function E(t,y,n){return u(t,n).subtract(y)}function F(t,n,u,r){const e=t.x,i=t.y,l=n.x,s=n.y,a=u.x,d=u.y,o=r.x,w=r.y,m=o.subtract(a),f=e.subtract(a),v=l.subtract(e),j=w.subtract(d),z=i.subtract(d),M=s.subtract(i),P=j.multiply(v).subtract(m.multiply(M)),q=m.multiply(z).subtract(j.multiply(f)).divide(P),R=v.multiply(z).subtract(M.multiply(f)).divide(P),k=x(c(b(P,new y(0))),x(x(p(q,new y(0)),h(q,new y(1))),x(p(R,new y(0)),h(R,new y(1)))));return g(k,new y(1),new y(0))}function G(t,y,n,u,r){return x(x(p(t.x,y),p(t.y,n)),x(i(t.x,u),h(t.y,r)))}function H(t,n,u,r){const x=r.xy,i=r.zw,l=new m(i.x,x.y),c=new m(x.x,i.y),s=f(x.x,i.x),a=f(x.y,i.y),d=v(x.x,i.x),o=v(x.y,i.y),w=G(t.xy,s,a,d,o),b=G(n.xy,s,a,d,o),p=G(u.xy,s,a,d,o),h=j(w,b),z=F(x,l,t.xy,n.xy).add(F(l,i,t.xy,n.xy)).add(F(c,i,t.xy,n.xy)).add(F(c,x,t.xy,n.xy)),M=j(h,e(z,new y(0))),P=j(w,p),q=F(x,l,t.xy,u.xy).add(F(l,i,t.xy,u.xy)).add(F(c,i,t.xy,u.xy)).add(F(c,x,t.xy,u.xy)),R=j(P,e(q,new y(0))),k=j(b,p),A=F(x,l,n.xy,u.xy).add(F(l,i,n.xy,u.xy)).add(F(c,i,n.xy,u.xy)).add(F(c,x,n.xy,u.xy)),B=j(k,e(A,new y(0)));return g(j(M,R,B),new y(1),new y(0))}function I(t){return x(x(p(t.tlbr.x,new y(0)),p(t.tlbr.x,new y(0))),x(p(t.tlbr.y,new y(0)),p(t.tlbr.y,new y(0))))}export{q as distPointSegment,B as distPointTriangle,C as failHittest,D as hittestFill,E as hittestMarker,H as hittestScreenRect,R as inTriangle,I as isRectHittest,G as pointInRect,P as projectScalar,F as segmentIntersects,k as xyToBarycentric};
2
+ import{clamp as t,Float as y,length as n,distance as u,Vec3 as r,and as x,greaterThan as e,lessThan as i,cond as l,not as c,Mat3 as s,abs as a,step as d,greaterThanEqual as o,Vec2 as w,min as b,max as p,or as m,ifElse as f,dot as v,normalize as j,equal as g,lessThanEqual as h}from"../../graph/glsl.js";import{epsilonHitTest as z}from"./constants.js";import{cross2 as M}from"./utils.js";function P(t,y){return v(t,j(y))}function q(r,x,e){const i=e.subtract(x),l=P(r.subtract(x),i),c=t(l.divide(n(i)),new y(0),new y(1));return u(r,x.add(c.multiply(e.subtract(x))))}function R(t){const n=a(t);return d(n.x.add(n.y).add(n.z),new y(1.05))}function k(t,n,u,x){const e=new s(u.x.multiply(x.y).subtract(x.x.multiply(u.y)),x.x.multiply(n.y).subtract(n.x.multiply(x.y)),n.x.multiply(u.y).subtract(u.x.multiply(n.y)),u.y.subtract(x.y),x.y.subtract(n.y),n.y.subtract(u.y),x.x.subtract(u.x),n.x.subtract(x.x),u.x.subtract(n.x)),i=n.x.multiply(u.y.subtract(x.y)),l=u.x.multiply(x.y.subtract(n.y)),c=x.x.multiply(n.y.subtract(u.y)),a=i.add(l).add(c);return new y(1).divide(a).multiply(e.multiply(new r(1,t)))}function A(t,n,u,r){return g(R(k(t,n,u,r)),new y(1))}function B(t,n,u,r){const s=u.subtract(n),a=r.subtract(n),d=M(s,a),o=x(i(d,new y(z)),e(d,new y(-z)));return l([x(c(o),A(t.xy,n,u,r)),new y(-1)],[!0,()=>{const y=q(t,n,u),x=q(t,u,r),e=q(t,r,n);return b(b(y,x),e)}])}function C(t){return t.distance.add(1)}function D(t,y,n){const{viewMat3:u,tileMat3:x}=t.view,e=u.multiply(x),i=e.multiply(new r(y.pos,1)),l=e.multiply(new r(n.nextPos1,1)),c=e.multiply(new r(n.nextPos2,1));return B(t.hittestRequest.position,i.xy,l.xy,c.xy)}function E(t,y,n){return u(t,n).subtract(y)}function F(t,n,u,r){const e=t.x,i=t.y,l=n.x,s=n.y,a=u.x,d=u.y,w=r.x,b=r.y,p=w.subtract(a),m=e.subtract(a),v=l.subtract(e),j=b.subtract(d),z=i.subtract(d),M=s.subtract(i),P=j.multiply(v).subtract(p.multiply(M)),q=p.multiply(z).subtract(j.multiply(m)).divide(P),R=v.multiply(z).subtract(M.multiply(m)).divide(P),k=x(c(g(P,new y(0))),x(x(o(q,new y(0)),h(q,new y(1))),x(o(R,new y(0)),h(R,new y(1)))));return f(k,new y(1),new y(0))}function G(t,y,n,u,r){return x(x(o(t.x,y),o(t.y,n)),x(i(t.x,u),h(t.y,r)))}function H(t,n,u,r){const x=r.xy,i=r.zw,l=new w(i.x,x.y),c=new w(x.x,i.y),s=b(x.x,i.x),a=b(x.y,i.y),d=p(x.x,i.x),o=p(x.y,i.y),v=G(t.xy,s,a,d,o),j=G(n.xy,s,a,d,o),g=G(u.xy,s,a,d,o),h=m(v,j),z=F(x,l,t.xy,n.xy).add(F(l,i,t.xy,n.xy)).add(F(c,i,t.xy,n.xy)).add(F(c,x,t.xy,n.xy)),M=m(h,e(z,new y(0))),P=m(v,g),q=F(x,l,t.xy,u.xy).add(F(l,i,t.xy,u.xy)).add(F(c,i,t.xy,u.xy)).add(F(c,x,t.xy,u.xy)),R=m(P,e(q,new y(0))),k=m(j,g),A=F(x,l,n.xy,u.xy).add(F(l,i,n.xy,u.xy)).add(F(c,i,n.xy,u.xy)).add(F(c,x,n.xy,u.xy)),B=m(k,e(A,new y(0)));return f(m(M,R,B),new y(1),new y(0))}function I(t){return x(x(o(t.tlbr.x,new y(0)),o(t.tlbr.x,new y(0))),x(o(t.tlbr.y,new y(0)),o(t.tlbr.y,new y(0))))}export{q as distPointSegment,B as distPointTriangle,C as failHittest,D as hittestFill,E as hittestMarker,H as hittestScreenRect,R as inTriangle,I as isRectHittest,G as pointInRect,P as projectScalar,F as segmentIntersects,k as xyToBarycentric};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as t,__param as e}from"tslib";import{minMaxZoomPrecisionFactor as i,labelPlacementOffsetPadding as o}from"../../../definitions.js";import{location as s,option as l,uniform as r,texture as a,define as n,input as d,ComputeVertexInput as p}from"../../GraphShaderModule.js";import{mod as u,Float as y,floor as m,step as c,and as f,lessThan as v,greaterThanEqual as h,Vec3 as w,Mat3 as x,Vec2 as b,ifElse as V,equal as S,greaterThan as g,Bool as z,Vec4 as R,texture2D as j,smoothstep as A,Int as C,bitRShift as O,bitAnd as M,Sampler2D as T}from"../../graph/glsl.js";import{AFeatureShader as P,FeatureVertexInput as L,FeatureFragmentInput as H}from"../shaders/AFeatureShader.js";import{bitsetTextIsBackground as N,bitsetTextIsMapAligned as U}from"../shaders/constants.js";import{distPointTriangle as _,failHittest as k}from"../shaders/hittestUtils.js";import{MosaicInfo as D}from"../shaders/MosaicInfo.js";import{getBit as I}from"../shaders/utils.js";import{VisualVariableColor as B}from"../shaders/VisualVariableColor.js";import{VisualVariableOpacity as q}from"../shaders/VisualVariableOpacity.js";import{VisualVariableRotation as E}from"../shaders/VisualVariableRotation.js";import{VisualVariableSizeMinMaxValue as F}from"../shaders/VisualVariableSizeMinMaxValue.js";import{VisualVariableSizeScaleStops as W}from"../shaders/VisualVariableSizeScaleStops.js";import{VisualVariableSizeStops as G}from"../shaders/VisualVariableSizeStops.js";import{VisualVariableSizeUnitValue as Z}from"../shaders/VisualVariableSizeUnitValue.js";import{getVisualVariableSize as J,getVisualVariableRotation as K}from"../shaders/vvUtils.js";const Q=360/254;class X extends L{}t([s(3,R)],X.prototype,"color",void 0),t([s(4,b)],X.prototype,"offset",void 0),t([s(5,b)],X.prototype,"textureUV",void 0),t([s(6,R)],X.prototype,"fontAndReferenceSize",void 0),t([s(7,R)],X.prototype,"outlineColor",void 0),t([s(8,R)],X.prototype,"haloColor",void 0),t([s(9,b)],X.prototype,"outlineAndHaloSize",void 0),t([s(10,b)],X.prototype,"zoomRange",void 0),t([s(11,y)],X.prototype,"clipAngle",void 0),t([s(12,R)],X.prototype,"referenceSymbol",void 0),t([s(15,y)],X.prototype,"visibility",void 0);class Y extends p{}t([s(13,b)],Y.prototype,"offsetNextVertex1",void 0),t([s(14,b)],Y.prototype,"offsetNextVertex2",void 0);class $ extends H{}class tt extends P{constructor(){super(...arguments),this.type="TextShader",this.computeAttributes={offset:["offsetNextVertex1","offsetNextVertex2"]},this.textRenderPassType=0,this.isBackgroundPass=!1,this.isLabel=!1}clipLabel(t,e){const{clipAngle:o,zoomRange:s,visibility:l}=t,r=o.multiply(Q),a=u(r.subtract(this.view.rotation),new y(360));let n=new y(0);const d=m(this.view.currentZoom.multiply(i)).divide(i),p=s.x,w=s.y,x=new y(1).subtract(c(p,d)).multiply(2),b=new y(f(h(a,new y(90)),v(a,new y(270)))).multiply(2),V=new y(2).multiply(new y(1).subtract(c(d,w)));return n=n.add(e.multiply(x)),n=n.add(e.multiply(b)),n=n.add(V),l&&(n=n.add(l)),n}vertex(t,e){const i=I(t.bitset,N),s=new y(1).subtract(i);let l=t.fontAndReferenceSize[0];const r=t.fontAndReferenceSize[1],a=t.fontAndReferenceSize[2],n=t.fontAndReferenceSize[3];let d=l.divide(a);const p=1===this.textRenderPassType?t.outlineColor:2===this.textRenderPassType?t.haloColor:this._getVertexColor(t),u=this.view.displayViewScreenMat3.multiply(new w(t.pos,1));let m=t.offset,c=new y(1),f=x.identity(),v=new b(0);if(this.isLabel){if(!t.referenceSymbol)throw new Error("InternalError: Optional attribute 'referenceSymbol' expected for labels");const e=t.referenceSymbol,i=e.xy,s=e.z,l=this._unpackDirection(e.w),r=J(this,t.id,s).divide(2),a=l.multiply(r.add(o));v=i.add(a),m=m.add(v)}else{c=J(this,t.id,r).divide(r),l=l.multiply(c),d=d.multiply(c),m=m.multiply(c),f=K(this,t.id),m=f.multiply(new w(m,0)).xy}const h=I(t.bitset,U),j=this._getViewRotationMatrix(h).multiply(new w(m,0));let A=this.isLabel?this.clipLabel(t,h):this.clip(t.id,t.zoomRange);A=this.isBackgroundPass?A.add(s.multiply(2)):A.add(i.multiply(2));let C=new y(0);if(1===this.textRenderPassType){A=A.add(V(S(t.outlineAndHaloSize.x,new y(0)),new y(2),new y(0)));C=new y(t.outlineAndHaloSize.x).divide(d).divide(n)}if(2===this.textRenderPassType){const e=t.outlineAndHaloSize.x,i=new y(t.outlineAndHaloSize.y);A=A.add(V(S(i,new y(0)),new y(2),new y(0)));C=i.add(e).divide(d).divide(n)}const O=this.isLabel?g(A,new y(1)):new z(!1);return{glPosition:new R(u.xy.add(j.xy),A,1),color:p,size:d,textureUV:t.textureUV.divide(this.mosaicInfo.size),antialiasingWidth:new y(.315).divide(a.divide(n)).multiply(a).divide(l).divide(this.view.pixelRatio),outlineDistanceOffset:C,...this.maybeRunHittest(t,e,{vvSizeAdjustment:c,vvRotation:f,labelOffset:v,labelClipped:O})}}_getViewRotationMatrix(t){const e=this.view.displayViewMat3,i=this.view.displayMat3,o=new y(1).subtract(t);return e.multiply(t).add(i.multiply(o))}fragment(t){const e=new y(2/8),i=new y(1).subtract(e),o=j(this.mosaicTexture,t.textureUV).a;let s=i.subtract(t.outlineDistanceOffset);this.highlight&&(s=s.divide(2));const l=t.antialiasingWidth,r=A(s.subtract(l),s.add(l),o);return this.getFragmentOutput(t.color.multiply(r),t)}computeHittestTriangle(t,e,{vvSizeAdjustment:i,vvRotation:o,labelOffset:s}){let l,r,a;this.isLabel?(l=new w(t.offset.add(s),0),r=new w(e.offsetNextVertex1.add(s),0),a=new w(e.offsetNextVertex2.add(s),0)):(l=o.multiply(new w(t.offset.multiply(i),0)),r=o.multiply(new w(e.offsetNextVertex1.multiply(i),0)),a=o.multiply(new w(e.offsetNextVertex2.multiply(i),0)));const{viewMat3:n,tileMat3:d}=this.view,p=n.multiply(d).multiply(new w(t.pos,1));return{pos0:p.add(d.multiply(l)).xy,pos1:p.add(d.multiply(r)).xy,pos2:p.add(d.multiply(a)).xy}}hittest(t,e,{vvSizeAdjustment:i,vvRotation:o,labelOffset:s,labelClipped:l}){const{pos0:r,pos1:a,pos2:n}=this.computeHittestTriangle(t,e,{vvSizeAdjustment:i,vvRotation:o,labelOffset:s}),d=_(this.hittestRequest.position,r.xy,a.xy,n.xy);return this.isLabel?V(l,k(this.hittestRequest),d):d}_unpackDirection(t){const e=new C(t),i=O(e,new C(2)),o=M(e,new C(3));return new b(new y(i).subtract(1),new y(o).subtract(1))}_getVertexColor(t){let e=t.color;if(this.visualVariableColor){const i=this.getColorValue(t.id);e=this.visualVariableColor.getColor(i,t.color,new z(!1))}if(this.visualVariableOpacity){const i=this.getOpacityValue(t.id),o=this.visualVariableOpacity.getOpacity(i);e=e.multiply(o)}return e}}t([l(B)],tt.prototype,"visualVariableColor",void 0),t([l(q)],tt.prototype,"visualVariableOpacity",void 0),t([l(E)],tt.prototype,"visualVariableRotation",void 0),t([l(F)],tt.prototype,"visualVariableSizeMinMaxValue",void 0),t([l(W)],tt.prototype,"visualVariableSizeScaleStops",void 0),t([l(G)],tt.prototype,"visualVariableSizeStops",void 0),t([l(Z)],tt.prototype,"visualVariableSizeUnitValue",void 0),t([r(D)],tt.prototype,"mosaicInfo",void 0),t([a(T)],tt.prototype,"mosaicTexture",void 0),t([n],tt.prototype,"textRenderPassType",void 0),t([n],tt.prototype,"isBackgroundPass",void 0),t([n],tt.prototype,"isLabel",void 0),t([e(0,d(X)),e(1,d(Y))],tt.prototype,"vertex",null),t([e(0,d($))],tt.prototype,"fragment",null);export{$ as TextFragmentInput,tt as TextShader,X as TextVertexInput};
2
+ import{__decorate as t,__param as e}from"tslib";import{minMaxZoomPrecisionFactor as i,labelPlacementOffsetPadding as o}from"../../../definitions.js";import{location as s,option as l,uniform as r,texture as a,define as n,input as d,ComputeVertexInput as p}from"../../GraphShaderModule.js";import{mod as u,Float as y,floor as m,step as c,and as h,lessThan as f,greaterThanEqual as v,Vec3 as w,Mat3 as b,Vec2 as x,ifElse as V,equal as S,greaterThan as R,Bool as g,Vec4 as z,texture2D as j,smoothstep as A,Int as C,bitRShift as O,bitAnd as M,Sampler2D as T}from"../../graph/glsl.js";import{AFeatureShader as L,FeatureVertexInput as P,FeatureFragmentInput as H}from"../shaders/AFeatureShader.js";import{bitsetTextIsBackground as N,bitsetTextIsMapAligned as U}from"../shaders/constants.js";import{isRectHittest as q,distPointTriangle as _,failHittest as k,hittestScreenRect as D}from"../shaders/hittestUtils.js";import{MosaicInfo as I}from"../shaders/MosaicInfo.js";import{getBit as B}from"../shaders/utils.js";import{VisualVariableColor as E}from"../shaders/VisualVariableColor.js";import{VisualVariableOpacity as F}from"../shaders/VisualVariableOpacity.js";import{VisualVariableRotation as W}from"../shaders/VisualVariableRotation.js";import{VisualVariableSizeMinMaxValue as G}from"../shaders/VisualVariableSizeMinMaxValue.js";import{VisualVariableSizeScaleStops as Z}from"../shaders/VisualVariableSizeScaleStops.js";import{VisualVariableSizeStops as J}from"../shaders/VisualVariableSizeStops.js";import{VisualVariableSizeUnitValue as K}from"../shaders/VisualVariableSizeUnitValue.js";import{getVisualVariableSize as Q,getVisualVariableRotation as X}from"../shaders/vvUtils.js";const Y=360/254;class $ extends P{}t([s(3,z)],$.prototype,"color",void 0),t([s(4,x)],$.prototype,"offset",void 0),t([s(5,x)],$.prototype,"textureUV",void 0),t([s(6,z)],$.prototype,"fontAndReferenceSize",void 0),t([s(7,z)],$.prototype,"outlineColor",void 0),t([s(8,z)],$.prototype,"haloColor",void 0),t([s(9,x)],$.prototype,"outlineAndHaloSize",void 0),t([s(10,x)],$.prototype,"zoomRange",void 0),t([s(11,y)],$.prototype,"clipAngle",void 0),t([s(12,z)],$.prototype,"referenceSymbol",void 0),t([s(15,y)],$.prototype,"visibility",void 0);class tt extends p{}t([s(13,x)],tt.prototype,"offsetNextVertex1",void 0),t([s(14,x)],tt.prototype,"offsetNextVertex2",void 0);class et extends H{}class it extends L{constructor(){super(...arguments),this.type="TextShader",this.computeAttributes={offset:["offsetNextVertex1","offsetNextVertex2"]},this.textRenderPassType=0,this.isBackgroundPass=!1,this.isLabel=!1}clipLabel(t,e){const{clipAngle:o,zoomRange:s,visibility:l}=t,r=o.multiply(Y),a=u(r.subtract(this.view.rotation),new y(360));let n=new y(0);const d=m(this.view.currentZoom.multiply(i)).divide(i),p=s.x,w=s.y,b=new y(1).subtract(c(p,d)).multiply(2),x=new y(h(v(a,new y(90)),f(a,new y(270)))).multiply(2),V=new y(2).multiply(new y(1).subtract(c(d,w)));return n=n.add(e.multiply(b)),n=n.add(e.multiply(x)),n=n.add(V),l&&(n=n.add(l)),n}vertex(t,e){const i=B(t.bitset,N),s=new y(1).subtract(i);let l=t.fontAndReferenceSize[0];const r=t.fontAndReferenceSize[1],a=t.fontAndReferenceSize[2],n=t.fontAndReferenceSize[3];let d=l.divide(a);const p=1===this.textRenderPassType?t.outlineColor:2===this.textRenderPassType?t.haloColor:this._getVertexColor(t),u=this.view.displayViewScreenMat3.multiply(new w(t.pos,1));let m=t.offset,c=new y(1),h=b.identity(),f=new x(0);if(this.isLabel){if(!t.referenceSymbol)throw new Error("InternalError: Optional attribute 'referenceSymbol' expected for labels");const e=t.referenceSymbol,i=e.xy,s=e.z,l=this._unpackDirection(e.w),r=Q(this,t.id,s).divide(2),a=l.multiply(r.add(o));f=i.add(a),m=m.add(f)}else{c=Q(this,t.id,r).divide(r),l=l.multiply(c),d=d.multiply(c),m=m.multiply(c),h=X(this,t.id),m=h.multiply(new w(m,0)).xy}const v=B(t.bitset,U),j=this._getViewRotationMatrix(v).multiply(new w(m,0));let A=this.isLabel?this.clipLabel(t,v):this.clip(t.id,t.zoomRange);A=this.isBackgroundPass?A.add(s.multiply(2)):A.add(i.multiply(2));let C=new y(0);if(1===this.textRenderPassType){A=A.add(V(S(t.outlineAndHaloSize.x,new y(0)),new y(2),new y(0)));C=new y(t.outlineAndHaloSize.x).divide(d).divide(n)}if(2===this.textRenderPassType){const e=t.outlineAndHaloSize.x,i=new y(t.outlineAndHaloSize.y);A=A.add(V(S(i,new y(0)),new y(2),new y(0)));C=i.add(e).divide(d).divide(n)}const O=this.isLabel?R(A,new y(1)):new g(!1);return{glPosition:new z(u.xy.add(j.xy),A,1),color:p,size:d,textureUV:t.textureUV.divide(this.mosaicInfo.size),antialiasingWidth:new y(.315).divide(a.divide(n)).multiply(a).divide(l).divide(this.view.pixelRatio),outlineDistanceOffset:C,...this.maybeRunHittest(t,e,{vvSizeAdjustment:c,vvRotation:h,labelOffset:f,labelClipped:O})}}_getViewRotationMatrix(t){const e=this.view.displayViewMat3,i=this.view.displayMat3,o=new y(1).subtract(t);return e.multiply(t).add(i.multiply(o))}fragment(t){const e=new y(2/8),i=new y(1).subtract(e),o=j(this.mosaicTexture,t.textureUV).a;let s=i.subtract(t.outlineDistanceOffset);this.highlight&&(s=s.divide(2));const l=t.antialiasingWidth,r=A(s.subtract(l),s.add(l),o);return this.getFragmentOutput(t.color.multiply(r),t)}computeHittestTriangle(t,e,{vvSizeAdjustment:i,vvRotation:o,labelOffset:s}){let l,r,a;this.isLabel?(l=new w(t.offset.add(s),0),r=new w(e.offsetNextVertex1.add(s),0),a=new w(e.offsetNextVertex2.add(s),0)):(l=o.multiply(new w(t.offset.multiply(i),0)),r=o.multiply(new w(e.offsetNextVertex1.multiply(i),0)),a=o.multiply(new w(e.offsetNextVertex2.multiply(i),0)));const{viewMat3:n,tileMat3:d}=this.view,p=n.multiply(d).multiply(new w(t.pos,1));return{pos0:p.add(d.multiply(l)).xy,pos1:p.add(d.multiply(r)).xy,pos2:p.add(d.multiply(a)).xy}}hittest(t,e,i){const{vvSizeAdjustment:o,vvRotation:s,labelOffset:l,labelClipped:r}=i,a=q(this.hittestRequest),{pos0:n,pos1:d,pos2:p}=this.computeHittestTriangle(t,e,{vvSizeAdjustment:o,vvRotation:s,labelOffset:l});return V(a,()=>{const{tlbr:t}=this.hittestRequest;return this.isLabel?V(r,k(this.hittestRequest),D(n,d,p,t)):D(n,d,p,t)},()=>{const t=_(this.hittestRequest.position,n,d,p),e=this.isLabel?V(r,k(this.hittestRequest),t):t;return V(R(e,this.hittestRequest.distance),new y(0),new y(1))})}_unpackDirection(t){const e=new C(t),i=O(e,new C(2)),o=M(e,new C(3));return new x(new y(i).subtract(1),new y(o).subtract(1))}_getVertexColor(t){let e=t.color;if(this.visualVariableColor){const i=this.getColorValue(t.id);e=this.visualVariableColor.getColor(i,t.color,new g(!1))}if(this.visualVariableOpacity){const i=this.getOpacityValue(t.id),o=this.visualVariableOpacity.getOpacity(i);e=e.multiply(o)}return e}}t([l(E)],it.prototype,"visualVariableColor",void 0),t([l(F)],it.prototype,"visualVariableOpacity",void 0),t([l(W)],it.prototype,"visualVariableRotation",void 0),t([l(G)],it.prototype,"visualVariableSizeMinMaxValue",void 0),t([l(Z)],it.prototype,"visualVariableSizeScaleStops",void 0),t([l(J)],it.prototype,"visualVariableSizeStops",void 0),t([l(K)],it.prototype,"visualVariableSizeUnitValue",void 0),t([r(I)],it.prototype,"mosaicInfo",void 0),t([a(T)],it.prototype,"mosaicTexture",void 0),t([n],it.prototype,"textRenderPassType",void 0),t([n],it.prototype,"isBackgroundPass",void 0),t([n],it.prototype,"isLabel",void 0),t([e(0,d($)),e(1,d(tt))],it.prototype,"vertex",null),t([e(0,d(et))],it.prototype,"fragment",null);export{et as TextFragmentInput,it as TextShader,$ as TextVertexInput};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{simplePipelineState as e}from"../../utils.js";import{Technique as t}from"../Technique.js";import{VTLShaderCircle as s}from"../shaders/vector-tiles/VTLShaderCircle.js";class l extends t{constructor(){super(...arguments),this.type=39,this._mesh=null,this.shaders={circle:new s}}shutdown(){this._mesh&&(this._mesh.destroy(),this._mesh=null)}render(t,s){const{context:l,displayLevel:i,drawPhase:r,painter:n,requiredLevel:a,spriteMosaic:o,state:c,styleLayer:u,styleLayerUID:h}=t,{tiles:d}=s;if(!d.some(e=>e.layerData.get(h)?.circleIndexCount??!1))return;const p=u,{circleMaterial:f}=p,m=1.2,y=p.getPaintValue("circle-translate",i),M={transform:{dvsMat:null,displayMat:1===p.getPaintValue("circle-translate-anchor",i)?c.displayMat3:c.displayViewMat3},config:{circleTranslation:y,depth:p.z,antialiasingWidth:m,tileOpacity:1},radius:null,radiusMix:null,blur:null,blurMix:null,opacity:null,opacityMix:null,strokeOpacity:null,strokeOpacityMix:null,strokeWidth:null,strokeWidthMix:null,color:null,colorMix:null,strokeColor:null,strokeColorMix:null};let x=-1;for(const g of d){if(!g.layerData.has(h))continue;if(M.transform.dvsMat=g.transforms.displayViewScreenMat3,g.key.level!==x){x=g.key.level;const e=f.getUniforms();for(const t of e){const e=t.getValue(p,i,x,o);t.name in M&&(M[t.name]={value:e})}}const t=g.layerData.get(h);if(!t.circleIndexCount)continue;if(this._mesh=t.getMesh(l),!this._mesh)continue;const s=a!==g.key.level?514:516,c=a!==g.key.level?g.stencilRef:255;M.config.tileOpacity=1===r?g.fader.value():1,n.setPipelineState({...e,stencil:{write:!1,test:{compare:s,op:{fail:7680,zFail:7680,zPass:7681},mask:255}}});const u={shader:this.shaders.circle,uniforms:M,textures:null,defines:null,optionalAttributes:f.getUsedAttributes(),useComputeBuffer:!1,precisionFactors:f.getPrecisionFactors()};n.submitDrawMeshUntyped(l,u,this._mesh,{stencilRef:c}),g.triangleCount+=t.circleIndexCount/3}}}export{l as VTLTechniqueCircle};
2
+ import{simplePipelineState as e}from"../../utils.js";import{Technique as t}from"../Technique.js";import{VTLShaderCircle as l}from"../shaders/vector-tiles/VTLShaderCircle.js";class s extends t{constructor(){super(...arguments),this.type=39,this._mesh=null,this.shaders={circle:new l}}shutdown(){this._mesh=null}render(t,l){const{context:s,displayLevel:i,drawPhase:r,painter:n,requiredLevel:a,spriteMosaic:o,state:c,styleLayer:u,styleLayerUID:d}=t,{tiles:h}=l;if(!h.some(e=>e.layerData.get(d)?.circleIndexCount??!1))return;const p=u,{circleMaterial:f}=p,y=1.2,m=p.getPaintValue("circle-translate",i),M={transform:{dvsMat:null,displayMat:1===p.getPaintValue("circle-translate-anchor",i)?c.displayMat3:c.displayViewMat3},config:{circleTranslation:m,depth:p.z,antialiasingWidth:y,tileOpacity:1},radius:null,radiusMix:null,blur:null,blurMix:null,opacity:null,opacityMix:null,strokeOpacity:null,strokeOpacityMix:null,strokeWidth:null,strokeWidthMix:null,color:null,colorMix:null,strokeColor:null,strokeColorMix:null};let x=-1;for(const g of h){if(!g.layerData.has(d))continue;if(M.transform.dvsMat=g.transforms.displayViewScreenMat3,g.key.level!==x){x=g.key.level;const e=f.getUniforms();for(const t of e){const e=t.getValue(p,i,x,o);t.name in M&&(M[t.name]={value:e})}}const t=g.layerData.get(d);if(!t.circleIndexCount||t.isDestroyed)continue;if(this._mesh=t.getMesh(s),!this._mesh)continue;const l=a!==g.key.level?514:516,c=a!==g.key.level?g.stencilRef:255;M.config.tileOpacity=1===r?g.fader.value():1,n.setPipelineState({...e,stencil:{write:!1,test:{compare:l,op:{fail:7680,zFail:7680,zPass:7681},mask:255}}});const u={shader:this.shaders.circle,uniforms:M,textures:null,defines:null,optionalAttributes:f.getUsedAttributes(),useComputeBuffer:!1,precisionFactors:f.getPrecisionFactors()};n.submitDrawMeshUntyped(s,u,this._mesh,{stencilRef:c}),g.triangleCount+=t.circleIndexCount/3}}}export{s as VTLTechniqueCircle};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{getDefinesKey as t}from"../../../../vectorTiles/shaders/vtlMaterialUtils.js";import{vtlTextureBindingUnitSprites as e,vtlHighResCutoff as i}from"../../../definitions.js";import{Technique as l}from"../Technique.js";import{VTLShaderFill as s}from"../shaders/vector-tiles/VTLShaderFill.js";import{VTLShaderOutline as a}from"../shaders/vector-tiles/VTLShaderOutline.js";const n=1/65536;class o extends l{constructor(){super(...arguments),this.type=40,this._fillMesh=null,this._outlineMesh=null,this.shaders={fill:new s,outline:new a}}shutdown(){this._fillMesh&&(this._fillMesh.destroy(),this._fillMesh=null),this._outlineMesh&&(this._outlineMesh.destroy(),this._outlineMesh=null)}render(t,e){const{displayLevel:i,is3D:l,renderPass:s,spriteMosaic:a,styleLayer:n,styleLayerUID:o}=t,{tiles:r}=e;let u=!1;for(const D of r)if(D.layerData.has(o)){const t=D.layerData.get(o);if(t.fillIndexCount>0||t.outlineIndexCount>0){u=!0;break}}if(!u)return;const c=n,f=c.getPaintProperty("fill-pattern"),p=void 0!==f,h=p&&f.isDataDriven;let d;if(p&&!h){const t=f.getValue(i);d=a.getMosaicItemPosition(t,!0)}const y=!p&&c.getPaintValue("fill-antialias",i);let M=!l||p,g=1;if(!p){const t=c.getPaintProperty("fill-color"),e=c.getPaintProperty("fill-opacity");if(!t?.isDataDriven&&!e?.isDataDriven){const t=c.getPaintValue("fill-color",i);g=c.getPaintValue("fill-opacity",i)*t[3],g<1&&(M=!0)}}if((c.hasDataDrivenColor||c.hasDataDrivenOpacity)&&(M=!0),M&&"opaque"===s)return;const m=c.getPaintValue("fill-translate",i),v=c.getPaintValue("fill-translate-anchor",i);("opaque"===s&&!M||"translucent"===s&&M)&&this._drawFill(t,o,c,r,m,v,p,d,h);const x=!c.hasDataDrivenOutlineColor&&c.outlineUsesFillColor&&g<1;y&&"translucent"===s&&!x&&this._drawOutline(t,o,c,r,m,v)}_drawFill(l,s,a,o,r,u,c,f,p){if(c&&!p&&null==f)return;const{context:h,displayLevel:d,drawPhase:y,state:M,painter:g,pixelRatio:m,spriteMosaic:v}=l,x=m>i?2:1,D=a.fillMaterial,P={transform:{dvsMat:null,displayMat:1===u?M.displayMat3:M.displayViewMat3},config:{depth:a.z+n,fillTranslation:r,tileOpacity:1},patternOptions:p||c&&null!=f?{mosaicSize:[0,0],patternFactor:1,tlbr:[0,0,0,0]}:null,color:null,opacity:null,colorMix:null,opacityMix:null},_={patternTexture:null},w=c?1:0,O=D.key+t({hasPattern:c});if(null!=f){const{page:t,tl:i,br:l}=f,s=i[0],a=l[1],n=l[0],o=i[1],r=v.getPageSize(t);null!=r&&(v.bind(h,9729,t,e),P.patternOptions={mosaicSize:[r[0],r[1]],patternFactor:1,tlbr:[s,a,n,o]},_.patternTexture={texture:v.getTexture(t),unit:e})}let V=-1;for(const t of o){if(!t.layerData.has(s))continue;if(t.key.level!==V){V=t.key.level;const e=D.getUniforms();for(const t of e){const e=t.getValue(a,d,V,v);P[t.name]={value:e}}if(c&&null!=P.patternOptions){const e=Math.max(2**(Math.round(d)-t.key.level),1),i=t.rangeX/(x*t.width*e);P.patternOptions.patternFactor=i}}const i=t.layerData.get(s);if(this._fillMesh=i.getMesh(h,{value:0}),!this._fillMesh)continue;const{transform:l,config:n}=P;l.dvsMat=t.transforms.displayViewScreenMat3,n.tileOpacity=1===y?t.fader.value():1;const o={shader:this.shaders.fill,uniforms:P,textures:_,defines:{fillType:w},optionalAttributes:D.getUsedAttributes(),useComputeBuffer:!1,precisionFactors:D.getPrecisionFactors(),materialKey:O};if(p){const l=P.patternOptions,s=i.patternMap;if(!s||null==l)continue;let a=0;for(const[i,n]of s){const s=v.getPageSize(i);null!=s&&(v.bind(h,9729,i,e),l.mosaicSize=s,_.patternTexture={texture:v.getTexture(i),unit:e},g.submitDrawMeshUntyped(h,o,this._fillMesh,{stencilRef:t.stencilRef,parts:[a++]}))}}else g.submitDrawMeshUntyped(h,o,this._fillMesh,{stencilRef:t.stencilRef});t.triangleCount+=i.fillIndexCount/3}}_drawOutline(t,e,i,l,s,a){const{context:o,displayLevel:r,drawPhase:u,state:c,spriteMosaic:f,painter:p,pixelRatio:h}=t,d=i.outlineMaterial,y=d.key,M=.75/h,g={transform:{dvsMat3:null,displayMat3:1===a?c.displayMat3:c.displayViewMat3},config:{depth:i.z+n,fillTranslation:s,outlineWidth:M,tileOpacity:1},color:null,opacity:null,colorMix:null,opacityMix:null};let m=-1;for(const n of l){if(!n.layerData.has(e))continue;if(n.key.level!==m){m=n.key.level;const t=d.getUniforms();for(const e of t){const t=e.getValue(i,r,m,f);e.name in g&&(g[e.name]={value:t})}}const t=n.layerData.get(e);if(this._outlineMesh=t.getMesh(o,{value:1}),null==this._outlineMesh)continue;const{transform:l,config:s}=g;l.dvsMat3=n.transforms.displayViewScreenMat3,s.tileOpacity=1===u?n.fader.value():1;const a={shader:this.shaders.outline,uniforms:g,textures:{},defines:{},optionalAttributes:d.getUsedAttributes(),useComputeBuffer:!1,precisionFactors:d.getPrecisionFactors(),materialKey:y};p.submitDrawMeshUntyped(o,a,this._outlineMesh,{stencilRef:n.stencilRef}),n.triangleCount+=t.outlineIndexCount/3}}}export{o as VTLTechniqueFill};
2
+ import{getDefinesKey as t}from"../../../../vectorTiles/shaders/vtlMaterialUtils.js";import{vtlTextureBindingUnitSprites as e,vtlHighResCutoff as i}from"../../../definitions.js";import{Technique as l}from"../Technique.js";import{VTLShaderFill as n}from"../shaders/vector-tiles/VTLShaderFill.js";import{VTLShaderOutline as a}from"../shaders/vector-tiles/VTLShaderOutline.js";const s=1/65536;class o extends l{constructor(){super(...arguments),this.type=40,this._fillMesh=null,this._outlineMesh=null,this.shaders={fill:new n,outline:new a}}shutdown(){this._fillMesh=null,this._outlineMesh=null}render(t,e){const{displayLevel:i,is3D:l,renderPass:n,spriteMosaic:a,styleLayer:s,styleLayerUID:o}=t,{tiles:r}=e;let u=!1;for(const D of r)if(D.layerData.has(o)){const t=D.layerData.get(o);if(t.fillIndexCount>0||t.outlineIndexCount>0){u=!0;break}}if(!u)return;const c=s,f=c.getPaintProperty("fill-pattern"),p=void 0!==f,d=p&&f.isDataDriven;let h;if(p&&!d){const t=f.getValue(i);h=a.getMosaicItemPosition(t,!0)}const y=!p&&c.getPaintValue("fill-antialias",i);let M=!l||p,g=1;if(!p){const t=c.getPaintProperty("fill-color"),e=c.getPaintProperty("fill-opacity");if(!t?.isDataDriven&&!e?.isDataDriven){const t=c.getPaintValue("fill-color",i);g=c.getPaintValue("fill-opacity",i)*t[3],g<1&&(M=!0)}}if((c.hasDataDrivenColor||c.hasDataDrivenOpacity)&&(M=!0),M&&"opaque"===n)return;const m=c.getPaintValue("fill-translate",i),v=c.getPaintValue("fill-translate-anchor",i);("opaque"===n&&!M||"translucent"===n&&M)&&this._drawFill(t,o,c,r,m,v,p,h,d);const x=!c.hasDataDrivenOutlineColor&&c.outlineUsesFillColor&&g<1;y&&"translucent"===n&&!x&&this._drawOutline(t,o,c,r,m,v)}_drawFill(l,n,a,o,r,u,c,f,p){if(c&&!p&&null==f)return;const{context:d,displayLevel:h,drawPhase:y,state:M,painter:g,pixelRatio:m,spriteMosaic:v}=l,x=m>i?2:1,D=a.fillMaterial,P={transform:{dvsMat:null,displayMat:1===u?M.displayMat3:M.displayViewMat3},config:{depth:a.z+s,fillTranslation:r,tileOpacity:1},patternOptions:p||c&&null!=f?{mosaicSize:[0,0],patternFactor:1,tlbr:[0,0,0,0]}:null,color:null,opacity:null,colorMix:null,opacityMix:null},w={patternTexture:null},_=c?1:0,O=D.key+t({hasPattern:c});if(null!=f){const{page:t,tl:i,br:l}=f,n=i[0],a=l[1],s=l[0],o=i[1],r=v.getPageSize(t);null!=r&&(v.bind(d,9729,t,e),P.patternOptions={mosaicSize:[r[0],r[1]],patternFactor:1,tlbr:[n,a,s,o]},w.patternTexture={texture:v.getTexture(t),unit:e})}let V=-1;for(const t of o){if(!t.layerData.has(n))continue;if(t.key.level!==V){V=t.key.level;const e=D.getUniforms();for(const t of e){const e=t.getValue(a,h,V,v);P[t.name]={value:e}}if(c&&null!=P.patternOptions){const e=Math.max(2**(Math.round(h)-t.key.level),1),i=t.rangeX/(x*t.width*e);P.patternOptions.patternFactor=i}}const i=t.layerData.get(n);if(i.isDestroyed||0===i.fillIndexCount)continue;if(this._fillMesh=i.getMesh(d,{value:0}),!this._fillMesh)continue;const{transform:l,config:s}=P;l.dvsMat=t.transforms.displayViewScreenMat3,s.tileOpacity=1===y?t.fader.value():1;const o={shader:this.shaders.fill,uniforms:P,textures:w,defines:{fillType:_},optionalAttributes:D.getUsedAttributes(),useComputeBuffer:!1,precisionFactors:D.getPrecisionFactors(),materialKey:O};if(p){const l=P.patternOptions,n=i.patternMap;if(!n||null==l)continue;let a=0;for(const[i,s]of n){const n=v.getPageSize(i);null!=n&&(v.bind(d,9729,i,e),l.mosaicSize=n,w.patternTexture={texture:v.getTexture(i),unit:e},g.submitDrawMeshUntyped(d,o,this._fillMesh,{stencilRef:t.stencilRef,parts:[a++]}))}}else g.submitDrawMeshUntyped(d,o,this._fillMesh,{stencilRef:t.stencilRef});t.triangleCount+=i.fillIndexCount/3}}_drawOutline(t,e,i,l,n,a){const{context:o,displayLevel:r,drawPhase:u,state:c,spriteMosaic:f,painter:p,pixelRatio:d}=t,h=i.outlineMaterial,y=h.key,M=.75/d,g={transform:{dvsMat3:null,displayMat3:1===a?c.displayMat3:c.displayViewMat3},config:{depth:i.z+s,fillTranslation:n,outlineWidth:M,tileOpacity:1},color:null,opacity:null,colorMix:null,opacityMix:null};let m=-1;for(const s of l){if(!s.layerData.has(e))continue;if(s.key.level!==m){m=s.key.level;const t=h.getUniforms();for(const e of t){const t=e.getValue(i,r,m,f);e.name in g&&(g[e.name]={value:t})}}const t=s.layerData.get(e);if(t.isDestroyed||0===t.outlineIndexCount)continue;if(this._outlineMesh=t.getMesh(o,{value:1}),null==this._outlineMesh)continue;const{transform:l,config:n}=g;l.dvsMat3=s.transforms.displayViewScreenMat3,n.tileOpacity=1===u?s.fader.value():1;const a={shader:this.shaders.outline,uniforms:g,textures:{},defines:{},optionalAttributes:h.getUsedAttributes(),useComputeBuffer:!1,precisionFactors:h.getPrecisionFactors(),materialKey:y};p.submitDrawMeshUntyped(o,a,this._outlineMesh,{stencilRef:s.stencilRef}),s.triangleCount+=t.outlineIndexCount/3}}}export{o as VTLTechniqueFill};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{getDefinesKey as e}from"../../../../vectorTiles/shaders/vtlMaterialUtils.js";import{vtlTextureBindingUnitSprites as t}from"../../../definitions.js";import{Technique as i}from"../Technique.js";import{VTLShaderLine as s}from"../shaders/vector-tiles/VTLShaderLine.js";class n extends i{constructor(){super(...arguments),this.type=41,this._mesh=null,this.shaders={line:new s}}shutdown(){this._mesh&&(this._mesh.destroy(),this._mesh=null)}render(i,s){const{context:n,displayLevel:l,drawPhase:a,is3D:o,painter:r,pixelRatio:u,spriteMosaic:c,state:p,styleLayer:f,styleLayerUID:d}=i,{tiles:h}=s;if(!h.some(e=>e.layerData.get(d)?.lineIndexCount??!1))return;const m=f,y=m.lineMaterial,g=m.getPaintValue("line-translate",l),M=m.getPaintValue("line-translate-anchor",l),x=1/u,v={layerInfo:{displayViewMat3:p.displayViewMat3,displayMat3:1===M?p.displayMat3:p.displayViewMat3,lineTranslation:g,depth:m.z,antialiasing:x},tileInfo:{dvsMat3:null,zoomFactor:1,tileOpacity:1},page:null,color:null,width:null,opacity:null,blur:null,offset:null,colorMix:null,widthMix:null,opacityMix:null,blurMix:null,offsetMix:null,tlbr:null},w=m.getPaintProperty("line-pattern"),P=void 0!==w,D=P&&w.isDataDriven;let T,V;if(P&&!D){const e=w.getValue(l);T=c.getMosaicItemPosition(e)}let b=!1;if(!P){const e=m.getPaintProperty("line-dasharray");if(V=void 0!==e,b=V&&e.isDataDriven,V&&!b){const t=e.getValue(l),i=m.getDashKey(t,m.getLayoutValue("line-cap",l));if(T=c.getMosaicItemPosition(i),null==T)return}}const z=P?1:V?2:0,I=y.key+e({lineType:z}),_={pageTexture:null};if(null!=T){const{page:e}=T,i=c.getPageSize(e);if(null!=i){c.bind(n,9729,e,t);const s={mosaicSize:[i[0],i[1]]};_.pageTexture={texture:c.getTexture(e),unit:t},v.page=s}}o||r.setPipelineState({color:{write:[!0,!0,!0,!0],blendMode:"composite"},stencil:{write:!1,test:{compare:514,op:{fail:7680,zFail:7680,zPass:7681},mask:255}},depth:{write:!1,test:515}});const{tileInfo:S}=v;let L=-1;for(const e of h){if(!e.layerData.has(d))continue;if(S.dvsMat3=e.transforms.displayViewScreenMat3,e.key.level!==L){L=e.key.level;const t=y.getUniforms();for(const e of t){const t=e.getValue(m,l,L,c);e.name in v&&(v[e.name]={value:t})}}const i=2**(l-L)/u;S.zoomFactor=i;const s=e.layerData.get(d);if(!s.lineIndexCount)continue;if(this._mesh=s.getMesh(n),!this._mesh)continue;S.tileOpacity=1===a?e.fader.value():1;const o={shader:this.shaders.line,uniforms:v,textures:_,defines:{lineType:z},optionalAttributes:y.getUsedAttributes(),useComputeBuffer:!1,precisionFactors:y.getPrecisionFactors(),materialKey:I};if(D||b){const i=s.patternMap;if(!i)continue;let l=0;for(const s of i.keys()){const i=c.getPageSize(s);null!=i&&(c.bind(n,9729,s,t),v.page={mosaicSize:[i[0],i[1]]},_.pageTexture={texture:c.getTexture(s),unit:t},r.submitDrawMeshUntyped(n,o,this._mesh,{stencilRef:e.stencilRef,parts:[l++]}))}}else r.submitDrawMeshUntyped(n,o,this._mesh,{stencilRef:e.stencilRef});e.triangleCount+=s.lineIndexCount/3}}}export{n as VTLTechniqueLine};
2
+ import{getDefinesKey as e}from"../../../../vectorTiles/shaders/vtlMaterialUtils.js";import{vtlTextureBindingUnitSprites as t}from"../../../definitions.js";import{Technique as i}from"../Technique.js";import{VTLShaderLine as s}from"../shaders/vector-tiles/VTLShaderLine.js";class n extends i{constructor(){super(...arguments),this.type=41,this._mesh=null,this.shaders={line:new s}}shutdown(){this._mesh=null}render(i,s){const{context:n,displayLevel:l,drawPhase:a,is3D:o,painter:r,pixelRatio:u,spriteMosaic:c,state:p,styleLayer:f,styleLayerUID:d}=i,{tiles:h}=s;if(!h.some(e=>e.layerData.get(d)?.lineIndexCount??!1))return;const y=f,m=y.lineMaterial,g=y.getPaintValue("line-translate",l),M=y.getPaintValue("line-translate-anchor",l),x=1/u,v={layerInfo:{displayViewMat3:p.displayViewMat3,displayMat3:1===M?p.displayMat3:p.displayViewMat3,lineTranslation:g,depth:y.z,antialiasing:x},tileInfo:{dvsMat3:null,zoomFactor:1,tileOpacity:1},page:null,color:null,width:null,opacity:null,blur:null,offset:null,colorMix:null,widthMix:null,opacityMix:null,blurMix:null,offsetMix:null,tlbr:null},w=y.getPaintProperty("line-pattern"),P=void 0!==w,D=P&&w.isDataDriven;let T,V;if(P&&!D){const e=w.getValue(l);T=c.getMosaicItemPosition(e)}let b=!1;if(!P){const e=y.getPaintProperty("line-dasharray");if(V=void 0!==e,b=V&&e.isDataDriven,V&&!b){const t=e.getValue(l),i=y.getDashKey(t,y.getLayoutValue("line-cap",l));if(T=c.getMosaicItemPosition(i),null==T)return}}const z=P?1:V?2:0,I=m.key+e({lineType:z}),S={pageTexture:null};if(null!=T){const{page:e}=T,i=c.getPageSize(e);if(null!=i){c.bind(n,9729,e,t);const s={mosaicSize:[i[0],i[1]]};S.pageTexture={texture:c.getTexture(e),unit:t},v.page=s}}o||r.setPipelineState({color:{write:[!0,!0,!0,!0],blendMode:"composite"},stencil:{write:!1,test:{compare:514,op:{fail:7680,zFail:7680,zPass:7681},mask:255}},depth:{write:!1,test:515}});const{tileInfo:L}=v;let U=-1;for(const e of h){if(!e.layerData.has(d))continue;if(L.dvsMat3=e.transforms.displayViewScreenMat3,e.key.level!==U){U=e.key.level;const t=m.getUniforms();for(const e of t){const t=e.getValue(y,l,U,c);e.name in v&&(v[e.name]={value:t})}}const i=2**(l-U)/u;L.zoomFactor=i;const s=e.layerData.get(d);if(!s.lineIndexCount||s.isDestroyed)continue;if(this._mesh=s.getMesh(n),!this._mesh)continue;L.tileOpacity=1===a?e.fader.value():1;const o={shader:this.shaders.line,uniforms:v,textures:S,defines:{lineType:z},optionalAttributes:m.getUsedAttributes(),useComputeBuffer:!1,precisionFactors:m.getPrecisionFactors(),materialKey:I};if(D||b){const i=s.patternMap;if(!i)continue;let l=0;for(const s of i.keys()){const i=c.getPageSize(s);null!=i&&(c.bind(n,9729,s,t),v.page={mosaicSize:[i[0],i[1]]},S.pageTexture={texture:c.getTexture(s),unit:t},r.submitDrawMeshUntyped(n,o,this._mesh,{stencilRef:e.stencilRef,parts:[l++]}))}}else r.submitDrawMeshUntyped(n,o,this._mesh,{stencilRef:e.stencilRef});e.triangleCount+=s.lineIndexCount/3}}}export{n as VTLTechniqueLine};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{fadeDuration as e}from"../../../../vectorTiles/decluttering/config.js";import{getDefinesKey as t}from"../../../../vectorTiles/shaders/vtlMaterialUtils.js";import{vtlTextureBindingUnitSprites as i,vtlTextureBindingUnitGlyphs as a}from"../../../definitions.js";import{degToByte as l}from"../../../GeometryUtils.js";import{Technique as s}from"../Technique.js";import{VTLShaderIcon as n}from"../shaders/vector-tiles/VTLShaderIcon.js";import{VTLShaderText as o}from"../shaders/vector-tiles/VTLShaderText.js";const r=1/65536;class c extends s{constructor(){super(...arguments),this.type=42,this._iconMesh=null,this._textMesh=null,this.shaders={icon:new n,text:new o}}shutdown(){this._iconMesh&&(this._iconMesh.destroy(),this._iconMesh=null),this._textMesh&&(this._textMesh.destroy(),this._textMesh=null)}render(e,t){const{painter:i}=e,a=e.styleLayer,{tiles:l}=t,s=i.getPipelineState();this._setRenderState(e),this._drawIcons(e,a,l),this._drawText(e,a,l),i.setPipelineState(s)}_drawIcons(t,i,a){const{context:s,displayLevel:n,drawPhase:o,spriteMosaic:r,state:c,styleLayerUID:u}=t,h=i.iconMaterial;let p,g=!1;for(const e of a)if(e.layerData.has(u)&&(p=e.layerData.get(u),p.iconPerPageElementsMap.size>0)){g=!0;break}if(!g)return;const y=i.getPaintValue("icon-translate",n),d=i.getPaintValue("icon-translate-anchor",n);let f=i.getLayoutValue("icon-rotation-alignment",n);2===f&&(f=0===i.getLayoutValue("symbol-placement",n)?1:0);const m=0===f,M=i.getLayoutValue("icon-keep-upright",n)&&m,x=p.isIconSDF,P={transform:{dvsMat3:null,displayViewMat3:0===f?c.displayViewMat3:c.displayMat3,displayMat3:1===d?c.displayMat3:c.displayViewMat3,mapRotation:l(c.rotation)},config:{depth:i.z,iconTranslation:y,level:10*n,keepUpright:M?1:0,fadeDuration:e/1e3,isStencilPass:t.stencilSymbols?1:0,time:null,tileOpacity:1},page:{mosaicSize:null},color:null,opacity:null,haloBlur:null,haloColor:null,haloWidth:null,size:null,colorMix:null,opacityMix:null,haloBlurMix:null,haloColorMix:null,haloWidthMix:null,sizeMix:null};let v=-1;for(const e of a){if(!e.layerData.has(u))continue;if(e.key.level!==v){v=e.key.level;const t=h.getUniforms();for(const e of t){const t=e.getValue(i,n,v,r);P[e.name]={value:t}}}if(p=e.layerData.get(u),0===p.iconPerPageElementsMap.size)continue;if(this._iconMesh=p.getMesh(s,{value:0}),!this._iconMesh)continue;p.updateOpacityInfo(),P.transform.dvsMat3=e.transforms.displayViewScreenMat3,P.config.time=(performance.now()-p.lastOpacityUpdate)/1e3,P.config.tileOpacity=1===o?e.fader.value():1;let a=0;for(const[i,l]of p.iconPerPageElementsMap)this._renderIconRange(t,h,l,i,e,P,this._iconMesh,x,a++)}}_drawText(t,i,a){const{context:s,displayLevel:n,drawPhase:o,glyphMosaic:c,spriteMosaic:u,pixelRatio:h,state:p,styleLayerUID:g,requestRender:y,allowDelayedRender:d}=t,f=i.textMaterial;let m,M=!1;for(const e of a)if(e.layerData.has(g)&&(m=e.layerData.get(g),m.glyphPerPageElementsMap.size>0)){M=!0;break}if(!M)return;const x=i.getPaintProperty("text-opacity");if(x&&!x.isDataDriven&&0===x.getValue(n))return;const P=i.getPaintProperty("text-color"),v=P&&P.getValue(n),w=!P||P.isDataDriven||v&&4===v.length&&v[3]>0,D=i.getPaintProperty("text-halo-width"),_=i.getPaintProperty("text-halo-color"),V=_&&_.getValue(n),S=(!D||D.isDataDriven||D.getValue(n)>0)&&(!_||_.isDataDriven||V&&4===V.length&&V[3]>0);if(!w&&!S)return;const z=24/8;let T=i.getLayoutValue("text-rotation-alignment",n);2===T&&(T=0===i.getLayoutValue("symbol-placement",n)?1:0);const b=0===T,R=i.getLayoutValue("text-keep-upright",n)&&b,U=.8*z/h;this._glyphTextureSize||(this._glyphTextureSize=[c.width/4,c.height/4]);const k=i.getPaintValue("text-translate",n),L=i.getPaintValue("text-translate-anchor",n);if(d&&null!=y)return void y();const I={transform:{dvsMat3:null,displayViewMat3:0===T?p.displayViewMat3:p.displayMat3,displayMat3:1===L?p.displayMat3:p.displayViewMat3,mapRotation:l(p.rotation)},config:{depth:i.z+r,textTranslation:k,keepUpright:R?1:0,level:10*n,fadeDuration:e/1e3,antialiasingWidth:U,time:null,halo:null,isStencilPass:t.stencilSymbols?1:0,tileOpacity:1},page:{mosaicSize:null},size:null,color:null,haloColor:null,opacity:null,haloWidth:null,haloBlur:null,sizeMix:null,colorMix:null,haloColorMix:null,opacityMix:null,haloWidthMix:null,haloBlurMix:null};let C=-1;for(const e of a){if(!e.layerData.has(g))continue;if(e.key.level!==C){C=e.key.level;const t=f.getUniforms();for(const e of t){const t=e.getValue(i,n,C,u);e.name in I&&(I[e.name]={value:t})}}if(m=e.layerData.get(g),0===m.glyphPerPageElementsMap.size)continue;if(I.transform.dvsMat3=e.transforms.displayViewScreenMat3,I.config.time=(performance.now()-m.lastOpacityUpdate)/1e3,I.config.tileOpacity=1===o?e.fader.value():1,this._textMesh=m.getMesh(s,{value:1}),!this._textMesh)continue;m.updateOpacityInfo();let a=0;m.glyphPerPageElementsMap.forEach((i,l)=>{this._renderGlyphRange(t,i,l,S,w,e,I,f,this._textMesh,a++)})}}_renderIconRange(e,a,l,s,n,o,r,c,u){const{context:h,is3D:p,painter:g,spriteMosaic:y}=e,d={iconType:c?1:0},f=a.key+t(d);y.bind(h,9729,s,i),o.page={mosaicSize:[y.getWidth(s)/4,y.getHeight(s)/4]};const m={shader:this.shaders.icon,uniforms:o,textures:{pageTexture:{texture:y.getTexture(s),unit:i}},defines:d,optionalAttributes:a.getUsedAttributes(),useComputeBuffer:!1,precisionFactors:a.getPrecisionFactors(),materialKey:f};g.submitDrawMeshUntyped(h,m,r,{stencilRef:p?n.stencilRef:255,parts:[u]}),n.triangleCount+=l[1]/3}_renderGlyphRange(e,t,i,l,s,n,o,r,c,u){const{context:h,is3D:p,painter:g,glyphMosaic:y}=e;y.bind(h,9729,i,a),o.page={mosaicSize:this._glyphTextureSize};const d={shader:this.shaders.text,uniforms:o,textures:{pageTexture:{texture:y.getTexture(h,i),unit:a}},defines:null,optionalAttributes:r.getUsedAttributes(),useComputeBuffer:!1,precisionFactors:r.getPrecisionFactors(),materialKey:r.key};l&&(o.config.halo=1,g.submitDrawMeshUntyped(h,d,c,{stencilRef:p?n.stencilRef:255,parts:[u]}),n.triangleCount+=t[1]/3),s&&(o.config.halo=0,g.submitDrawMeshUntyped(h,d,c,{stencilRef:p?n.stencilRef:255,parts:[u]}),n.triangleCount+=t[1]/3)}_setRenderState(e){const{is3D:t,painter:i,stencilSymbols:a}=e;i.setPipelineState({color:{write:[!a,!a,!a,!a],blendMode:a?"none":"composite"},stencil:{write:!!a&&{mask:255},test:{compare:a?519:t?514:516,op:{fail:7680,zFail:7680,zPass:7681},mask:255}},depth:{write:!1,test:515}})}}export{c as VTLTechniqueSymbol};
2
+ import{fadeDuration as e}from"../../../../vectorTiles/decluttering/config.js";import{getDefinesKey as t}from"../../../../vectorTiles/shaders/vtlMaterialUtils.js";import{vtlTextureBindingUnitSprites as i,vtlTextureBindingUnitGlyphs as a}from"../../../definitions.js";import{degToByte as l}from"../../../GeometryUtils.js";import{Technique as n}from"../Technique.js";import{VTLShaderIcon as s}from"../shaders/vector-tiles/VTLShaderIcon.js";import{VTLShaderText as o}from"../shaders/vector-tiles/VTLShaderText.js";const r=1/65536;class c extends n{constructor(){super(...arguments),this.type=42,this._iconMesh=null,this._textMesh=null,this.shaders={icon:new s,text:new o}}shutdown(){this._iconMesh=null,this._textMesh=null}render(e,t){const{painter:i}=e,a=e.styleLayer,{tiles:l}=t,n=i.getPipelineState();this._setRenderState(e),this._drawIcons(e,a,l),this._drawText(e,a,l),i.setPipelineState(n)}_drawIcons(t,i,a){const{context:n,displayLevel:s,drawPhase:o,spriteMosaic:r,state:c,styleLayerUID:u}=t,p=i.iconMaterial;let h,g=!1;for(const e of a)if(e.layerData.has(u)&&(h=e.layerData.get(u),h.iconPerPageElementsMap.size>0)){g=!0;break}if(!g)return;const y=i.getPaintValue("icon-translate",s),d=i.getPaintValue("icon-translate-anchor",s);let f=i.getLayoutValue("icon-rotation-alignment",s);2===f&&(f=0===i.getLayoutValue("symbol-placement",s)?1:0);const m=0===f,M=i.getLayoutValue("icon-keep-upright",s)&&m,x=h.isIconSDF,P={transform:{dvsMat3:null,displayViewMat3:0===f?c.displayViewMat3:c.displayMat3,displayMat3:1===d?c.displayMat3:c.displayViewMat3,mapRotation:l(c.rotation)},config:{depth:i.z,iconTranslation:y,level:10*s,keepUpright:M?1:0,fadeDuration:e/1e3,isStencilPass:t.stencilSymbols?1:0,time:null,tileOpacity:1},page:{mosaicSize:null},color:null,opacity:null,haloBlur:null,haloColor:null,haloWidth:null,size:null,colorMix:null,opacityMix:null,haloBlurMix:null,haloColorMix:null,haloWidthMix:null,sizeMix:null};let D=-1;for(const e of a){if(!e.layerData.has(u))continue;if(e.key.level!==D){D=e.key.level;const t=p.getUniforms();for(const e of t){const t=e.getValue(i,s,D,r);P[e.name]={value:t}}}if(h=e.layerData.get(u),0===h.iconPerPageElementsMap.size||h.isDestroyed)continue;if(this._iconMesh=h.getMesh(n,{value:0}),!this._iconMesh)continue;h.updateOpacityInfo(),P.transform.dvsMat3=e.transforms.displayViewScreenMat3,P.config.time=(performance.now()-h.lastOpacityUpdate)/1e3,P.config.tileOpacity=1===o?e.fader.value():1;let a=0;for(const[i,l]of h.iconPerPageElementsMap)this._renderIconRange(t,p,l,i,e,P,this._iconMesh,x,a++)}}_drawText(t,i,a){const{context:n,displayLevel:s,drawPhase:o,glyphMosaic:c,spriteMosaic:u,pixelRatio:p,state:h,styleLayerUID:g,requestRender:y,allowDelayedRender:d}=t,f=i.textMaterial;let m,M=!1;for(const e of a)if(e.layerData.has(g)&&(m=e.layerData.get(g),m.glyphPerPageElementsMap.size>0)){M=!0;break}if(!M)return;const x=i.getPaintProperty("text-opacity");if(x&&!x.isDataDriven&&0===x.getValue(s))return;const P=i.getPaintProperty("text-color"),D=P&&P.getValue(s),v=!P||P.isDataDriven||D&&4===D.length&&D[3]>0,w=i.getPaintProperty("text-halo-width"),V=i.getPaintProperty("text-halo-color"),_=V&&V.getValue(s),S=(!w||w.isDataDriven||w.getValue(s)>0)&&(!V||V.isDataDriven||_&&4===_.length&&_[3]>0);if(!v&&!S)return;const z=24/8;let T=i.getLayoutValue("text-rotation-alignment",s);2===T&&(T=0===i.getLayoutValue("symbol-placement",s)?1:0);const b=0===T,R=i.getLayoutValue("text-keep-upright",s)&&b,U=.8*z/p;this._glyphTextureSize||(this._glyphTextureSize=[c.width/4,c.height/4]);const k=i.getPaintValue("text-translate",s),L=i.getPaintValue("text-translate-anchor",s);if(d&&null!=y)return void y();const I={transform:{dvsMat3:null,displayViewMat3:0===T?h.displayViewMat3:h.displayMat3,displayMat3:1===L?h.displayMat3:h.displayViewMat3,mapRotation:l(h.rotation)},config:{depth:i.z+r,textTranslation:k,keepUpright:R?1:0,level:10*s,fadeDuration:e/1e3,antialiasingWidth:U,time:null,halo:null,isStencilPass:t.stencilSymbols?1:0,tileOpacity:1},page:{mosaicSize:null},size:null,color:null,haloColor:null,opacity:null,haloWidth:null,haloBlur:null,sizeMix:null,colorMix:null,haloColorMix:null,opacityMix:null,haloWidthMix:null,haloBlurMix:null};let C=-1;for(const e of a){if(!e.layerData.has(g))continue;if(e.key.level!==C){C=e.key.level;const t=f.getUniforms();for(const e of t){const t=e.getValue(i,s,C,u);e.name in I&&(I[e.name]={value:t})}}if(m=e.layerData.get(g),0===m.glyphPerPageElementsMap.size||m.isDestroyed)continue;if(I.transform.dvsMat3=e.transforms.displayViewScreenMat3,I.config.time=(performance.now()-m.lastOpacityUpdate)/1e3,I.config.tileOpacity=1===o?e.fader.value():1,this._textMesh=m.getMesh(n,{value:1}),!this._textMesh)continue;m.updateOpacityInfo();let a=0;m.glyphPerPageElementsMap.forEach((i,l)=>{this._renderGlyphRange(t,i,l,S,v,e,I,f,this._textMesh,a++)})}}_renderIconRange(e,a,l,n,s,o,r,c,u){const{context:p,is3D:h,painter:g,spriteMosaic:y}=e,d={iconType:c?1:0},f=a.key+t(d);y.bind(p,9729,n,i),o.page={mosaicSize:[y.getWidth(n)/4,y.getHeight(n)/4]};const m={shader:this.shaders.icon,uniforms:o,textures:{pageTexture:{texture:y.getTexture(n),unit:i}},defines:d,optionalAttributes:a.getUsedAttributes(),useComputeBuffer:!1,precisionFactors:a.getPrecisionFactors(),materialKey:f};g.submitDrawMeshUntyped(p,m,r,{stencilRef:h?s.stencilRef:255,parts:[u]}),s.triangleCount+=l[1]/3}_renderGlyphRange(e,t,i,l,n,s,o,r,c,u){const{context:p,is3D:h,painter:g,glyphMosaic:y}=e;y.bind(p,9729,i,a),o.page={mosaicSize:this._glyphTextureSize};const d={shader:this.shaders.text,uniforms:o,textures:{pageTexture:{texture:y.getTexture(p,i),unit:a}},defines:null,optionalAttributes:r.getUsedAttributes(),useComputeBuffer:!1,precisionFactors:r.getPrecisionFactors(),materialKey:r.key};l&&(o.config.halo=1,g.submitDrawMeshUntyped(p,d,c,{stencilRef:h?s.stencilRef:255,parts:[u]}),s.triangleCount+=t[1]/3),n&&(o.config.halo=0,g.submitDrawMeshUntyped(p,d,c,{stencilRef:h?s.stencilRef:255,parts:[u]}),s.triangleCount+=t[1]/3)}_setRenderState(e){const{is3D:t,painter:i,stencilSymbols:a}=e;i.setPipelineState({color:{write:[!a,!a,!a,!a],blendMode:a?"none":"composite"},stencil:{write:!!a&&{mask:255},test:{compare:a?519:t?514:516,op:{fail:7680,zFail:7680,zPass:7681},mask:255}},depth:{write:!1,test:515}})}}export{c as VTLTechniqueSymbol};