@arcgis/core 5.0.0-next.73 → 5.0.0-next.75

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 (304) hide show
  1. package/Color.d.ts +8 -0
  2. package/WebDocument2D.d.ts +5 -30
  3. package/analysis/ElevationProfile/ElevationProfileLineQuery.d.ts +1 -1
  4. package/assets/esri/core/workers/RemoteClient.js +1 -1
  5. package/assets/esri/core/workers/chunks/0b666327e8090a6e6f6a.js +1 -0
  6. package/assets/esri/core/workers/chunks/16a7edb381621085a631.js +1 -0
  7. package/assets/esri/core/workers/chunks/{e246b256347a281c13fd.js → 22288b62da20a7a78a4f.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{7e37a3005f2ad2c0a918.js → 23cf4cbc389d2b50e968.js} +1 -1
  9. package/assets/esri/core/workers/chunks/4750f55a289bc0cf3d77.js +1 -0
  10. package/assets/esri/core/workers/chunks/{935a6dccb88557f98189.js → 76b516b8c110ad983bf6.js} +8 -6
  11. package/assets/esri/core/workers/chunks/a5181292b309b8249bd8.js +1 -0
  12. package/assets/esri/core/workers/chunks/ae733ee050f27f7d8924.js +1 -0
  13. package/assets/esri/core/workers/chunks/{64985e9b6e2edb3ceb37.js → b498db9715a722c52995.js} +45 -58
  14. package/assets/esri/core/workers/chunks/befeca51530bba5e8073.js +1 -0
  15. package/assets/esri/core/workers/chunks/cd788ed111e1e35cf9c8.js +1 -0
  16. package/assets/esri/core/workers/chunks/f35021214e534d5e0446.js +1 -0
  17. package/assets/esri/themes/base/widgets/_FeatureTable.scss +99 -22
  18. package/assets/esri/themes/dark/main.css +1 -1
  19. package/assets/esri/themes/light/main.css +1 -1
  20. package/assets/esri/themes/light/view.css +1 -1
  21. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable.json +1 -1
  22. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ar.json +1 -1
  23. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_bg.json +1 -1
  24. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_bs.json +1 -1
  25. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ca.json +1 -1
  26. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_cs.json +1 -1
  27. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_da.json +1 -1
  28. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_de.json +1 -1
  29. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_el.json +1 -1
  30. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_en.json +1 -1
  31. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_es.json +1 -1
  32. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_et.json +1 -1
  33. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_fi.json +1 -1
  34. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_fr.json +1 -1
  35. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_he.json +1 -1
  36. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_hr.json +1 -1
  37. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_hu.json +1 -1
  38. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_id.json +1 -1
  39. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_it.json +1 -1
  40. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ja.json +1 -1
  41. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ko.json +1 -1
  42. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_lt.json +1 -1
  43. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_lv.json +1 -1
  44. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_nl.json +1 -1
  45. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_no.json +1 -1
  46. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pl.json +1 -1
  47. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pt-BR.json +1 -1
  48. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pt-PT.json +1 -1
  49. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ro.json +1 -1
  50. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ru.json +1 -1
  51. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sk.json +1 -1
  52. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sl.json +1 -1
  53. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sr.json +1 -1
  54. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sv.json +1 -1
  55. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_th.json +1 -1
  56. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_tr.json +1 -1
  57. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_uk.json +1 -1
  58. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_vi.json +1 -1
  59. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-CN.json +1 -1
  60. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-HK.json +1 -1
  61. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-TW.json +1 -1
  62. package/chunks/ComponentShader.glsl.js +1 -1
  63. package/chunks/GlowBlur.glsl.js +2 -3
  64. package/chunks/HUDMaterial.glsl.js +43 -56
  65. package/config.d.ts +6 -8
  66. package/config.js +1 -1
  67. package/core/Collection.d.ts +27 -1
  68. package/core/types.d.ts +0 -23
  69. package/core/urlUtils.d.ts +10 -0
  70. package/geometry/support/MeshTexture.d.ts +0 -2
  71. package/geometry/support/MeshVertexAttributes.d.ts +0 -2
  72. package/identity/IdentityManagerBase.d.ts +3 -6
  73. package/interfaces.d.ts +3 -3
  74. package/kernel.js +1 -1
  75. package/layers/BaseDynamicLayer.d.ts +1 -4
  76. package/layers/BaseElevationLayer.d.ts +3 -6
  77. package/layers/BuildingSceneLayer.d.ts +1 -4
  78. package/layers/CSVLayer.d.ts +1 -4
  79. package/layers/CatalogLayer.d.ts +1 -4
  80. package/layers/DimensionLayer.d.ts +1 -4
  81. package/layers/ElevationLayer.d.ts +3 -6
  82. package/layers/FeatureLayer.d.ts +1 -4
  83. package/layers/GaussianSplatLayer.d.ts +0 -1
  84. package/layers/GeoJSONLayer.d.ts +1 -4
  85. package/layers/GeoRSSLayer.d.ts +1 -4
  86. package/layers/GraphicsLayer.d.ts +1 -4
  87. package/layers/GroupLayer.d.ts +1 -4
  88. package/layers/ImageryLayer.d.ts +1 -4
  89. package/layers/ImageryTileLayer.d.ts +1 -4
  90. package/layers/IntegratedMesh3DTilesLayer.d.ts +1 -4
  91. package/layers/IntegratedMeshLayer.d.ts +1 -4
  92. package/layers/KMLLayer.d.ts +1 -4
  93. package/layers/Layer.d.ts +2 -6
  94. package/layers/LineOfSightLayer.d.ts +1 -4
  95. package/layers/MapImageLayer.d.ts +1 -4
  96. package/layers/MapNotesLayer.d.ts +1 -4
  97. package/layers/MediaLayer.d.ts +1 -4
  98. package/layers/OGCFeatureLayer.d.ts +1 -4
  99. package/layers/OrientedImageryLayer.d.ts +1 -4
  100. package/layers/ParquetLayer.d.ts +1 -4
  101. package/layers/PointCloudLayer.d.ts +1 -4
  102. package/layers/RouteLayer.d.ts +2 -5
  103. package/layers/SceneLayer.d.ts +1 -4
  104. package/layers/SubtypeGroupLayer.d.ts +1 -12
  105. package/layers/TileLayer.d.ts +1 -4
  106. package/layers/UnknownLayer.d.ts +1 -4
  107. package/layers/UnsupportedLayer.d.ts +1 -4
  108. package/layers/VectorTileLayer.d.ts +1 -4
  109. package/layers/VideoLayer.d.ts +1 -4
  110. package/layers/ViewshedLayer.d.ts +1 -4
  111. package/layers/VoxelLayer.d.ts +1 -4
  112. package/layers/WCSLayer.d.ts +1 -4
  113. package/layers/WFSLayer.d.ts +1 -4
  114. package/layers/WMSLayer.d.ts +1 -4
  115. package/layers/WMTSLayer.d.ts +1 -4
  116. package/layers/catalog/CatalogDynamicGroupLayer.d.ts +1 -4
  117. package/layers/catalog/CatalogFootprintLayer.d.ts +1 -4
  118. package/layers/knowledgeGraph/KnowledgeGraphSublayer.d.ts +1 -6
  119. package/layers/mixins/EditBusLayer.d.ts +0 -1
  120. package/layers/mixins/PublishableLayer.d.ts +15 -0
  121. package/layers/support/FeatureFilter.d.ts +0 -1
  122. package/layers/support/MosaicRule.d.ts +0 -4
  123. package/layers/support/PublishingInfo.d.ts +1 -1
  124. package/layers/support/types.d.ts +2 -2
  125. package/layers/types.d.ts +19 -6
  126. package/package.json +1 -1
  127. package/portal/PortalUser.d.ts +1 -1
  128. package/renderers/support/RendererLegendOptions.d.ts +0 -1
  129. package/request/types.d.ts +0 -1
  130. package/rest/support/NormalizationBinParametersMixin.d.ts +18 -20
  131. package/rest/support/PrintTemplate.d.ts +0 -1
  132. package/rest/support/RelationshipQuery.d.ts +1 -10
  133. package/rest/support/types.d.ts +29 -3
  134. package/smartMapping/heuristics/binLevel.d.ts +1 -1
  135. package/smartMapping/heuristics/scaleRange.d.ts +1 -1
  136. package/smartMapping/heuristics/sizeRange.d.ts +1 -1
  137. package/smartMapping/heuristics/types.d.ts +0 -2
  138. package/smartMapping/labels/bins.d.ts +1 -1
  139. package/smartMapping/labels/clusters.d.ts +1 -1
  140. package/smartMapping/popup/clusters.d.ts +1 -1
  141. package/smartMapping/popup/templates.d.ts +1 -1
  142. package/smartMapping/raster/renderers/classBreaks.d.ts +1 -1
  143. package/smartMapping/raster/renderers/colormap.d.ts +1 -1
  144. package/smartMapping/raster/renderers/flow.d.ts +0 -1
  145. package/smartMapping/raster/renderers/rgb.d.ts +1 -1
  146. package/smartMapping/raster/renderers/shadedRelief.d.ts +0 -1
  147. package/smartMapping/raster/renderers/stretch.d.ts +1 -1
  148. package/smartMapping/raster/renderers/uniqueValue.d.ts +0 -1
  149. package/smartMapping/raster/renderers/vectorField.d.ts +0 -1
  150. package/smartMapping/raster/support/utils.d.ts +0 -2
  151. package/smartMapping/renderers/color.d.ts +6 -6
  152. package/smartMapping/renderers/dotDensity.d.ts +0 -1
  153. package/smartMapping/renderers/heatmap.d.ts +1 -1
  154. package/smartMapping/renderers/location.d.ts +0 -1
  155. package/smartMapping/renderers/opacity.d.ts +1 -1
  156. package/smartMapping/renderers/pieChart.d.ts +0 -2
  157. package/smartMapping/renderers/predominance.d.ts +0 -1
  158. package/smartMapping/renderers/relationship.d.ts +0 -1
  159. package/smartMapping/renderers/size.d.ts +4 -6
  160. package/smartMapping/renderers/type.d.ts +9 -5
  161. package/smartMapping/renderers/univariateColorSize.d.ts +2 -2
  162. package/smartMapping/statistics/classBreaks.d.ts +1 -1
  163. package/smartMapping/statistics/heatmapStatistics.d.ts +1 -1
  164. package/smartMapping/statistics/histogram.d.ts +1 -1
  165. package/smartMapping/statistics/predominantCategories.d.ts +1 -1
  166. package/smartMapping/statistics/summaryStatistics.d.ts +1 -1
  167. package/smartMapping/statistics/summaryStatisticsForAge.d.ts +1 -1
  168. package/smartMapping/statistics/support/ageUtils.d.ts +1 -1
  169. package/smartMapping/statistics/types.d.ts +26 -8
  170. package/smartMapping/statistics/uniqueValues.d.ts +1 -1
  171. package/smartMapping/symbology/color.d.ts +4 -4
  172. package/smartMapping/symbology/dotDensity.d.ts +3 -3
  173. package/smartMapping/symbology/flow.d.ts +3 -3
  174. package/smartMapping/symbology/heatmap.d.ts +3 -3
  175. package/smartMapping/symbology/location.d.ts +1 -1
  176. package/smartMapping/symbology/pieChart.d.ts +3 -3
  177. package/smartMapping/symbology/predominance.d.ts +3 -3
  178. package/smartMapping/symbology/relationship.d.ts +3 -3
  179. package/smartMapping/symbology/size.d.ts +1 -1
  180. package/smartMapping/symbology/support/colorRamps.d.ts +1 -1
  181. package/smartMapping/symbology/type.d.ts +3 -3
  182. package/support/revision.js +1 -1
  183. package/symbols/cim/types.d.ts +0 -12
  184. package/symbols/support/symbolUtils.d.ts +1 -1
  185. package/views/2d/MapViewConstraints.d.ts +2 -10
  186. package/views/2d/engine/brushes.js +1 -1
  187. package/views/2d/engine/vectorTiles/GlyphMosaic.js +1 -1
  188. package/views/2d/engine/vectorTiles/MemoryBuffer.js +1 -1
  189. package/views/2d/engine/vectorTiles/RenderBucket.js +1 -1
  190. package/views/2d/engine/vectorTiles/SpriteMosaic.js +1 -1
  191. package/views/2d/engine/vectorTiles/VTLPainter3D.js +1 -1
  192. package/views/2d/engine/vectorTiles/VectorTileContainer.js +1 -1
  193. package/views/2d/engine/vectorTiles/VertexMemoryBuffer.js +1 -1
  194. package/views/2d/engine/vectorTiles/shaders/VTLBackgroundMaterial.js +1 -1
  195. package/views/2d/engine/vectorTiles/shaders/VTLCircleMaterial.js +1 -1
  196. package/views/2d/engine/vectorTiles/shaders/VTLFillMaterial.js +1 -1
  197. package/views/2d/engine/vectorTiles/shaders/VTLLineMaterial.js +1 -1
  198. package/views/2d/engine/vectorTiles/shaders/VTLMaterial.js +1 -1
  199. package/views/2d/engine/vectorTiles/shaders/VTLSymbolMaterial.js +1 -1
  200. package/views/2d/engine/vectorTiles/style/StyleLayer.js +1 -1
  201. package/views/2d/engine/webgl/Painter.js +1 -1
  202. package/views/2d/engine/webgl/RenderingDevice.js +5 -0
  203. package/views/2d/engine/webgl/WGLContainer.js +1 -1
  204. package/views/2d/engine/webgl/meshing/Mesh.js +1 -1
  205. package/views/2d/engine/webgl/number.js +1 -1
  206. package/views/2d/engine/webgl/shaderGraph/graph/glsl.js +1 -1
  207. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderBackground.js +5 -0
  208. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderCircle.js +5 -0
  209. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderFill.js +5 -0
  210. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderIcon.js +5 -0
  211. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderLine.js +5 -0
  212. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderOutline.js +5 -0
  213. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderText.js +5 -0
  214. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueBackground.js +5 -0
  215. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueCircle.js +5 -0
  216. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueFill.js +5 -0
  217. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueLine.js +5 -0
  218. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueSymbol.js +5 -0
  219. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniques.js +5 -0
  220. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  221. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  222. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  223. package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
  224. package/views/3d/layers/i3s/meshUtils.js +1 -1
  225. package/views/3d/state/NearFarHeuristic.js +1 -1
  226. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  227. package/views/3d/webgl-engine/collections/Component/Material/ComponentData.glsl.js +1 -1
  228. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  229. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  230. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexNormal.glsl.js +6 -4
  231. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js +18 -14
  232. package/views/3d/webgl-engine/effects/glow/GlowBlur.glsl.js +1 -1
  233. package/views/3d/webgl-engine/effects/glow/GlowRenderNode.js +1 -1
  234. package/views/3d/webgl-engine/lib/edgeRendering/EdgeShaderTechniqueConfiguration.js +1 -1
  235. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  236. package/views/3d/webgl-engine/shaders/HUDMaterial.glsl.js +1 -1
  237. package/views/3d/webgl-engine/shaders/HUDMaterialTechniqueConfiguration.js +1 -1
  238. package/views/3d/webgl-engine/shaders/sources/edgeRenderer/EdgeUtil.glsl.js +23 -20
  239. package/views/BreakpointsOwner.d.ts +2 -2
  240. package/views/LinkChartView.d.ts +0 -2
  241. package/views/View2D.d.ts +3 -15
  242. package/views/input/types.d.ts +2 -13
  243. package/views/layers/BuildingComponentSublayerView.d.ts +0 -1
  244. package/views/types.d.ts +2 -9
  245. package/views/webgl/RenderingContext.js +1 -1
  246. package/views/webgl/VertexArrayObject.js +1 -1
  247. package/views/webgl/renderState.js +1 -1
  248. package/webdoc/ips/SmoothingProperties.d.ts +1 -1
  249. package/webdoc/ips/SmoothingProperties.js +1 -1
  250. package/widgets/BasemapLayerList/BasemapLayerListVisibleElements.d.ts +10 -10
  251. package/widgets/BasemapLayerList/types.d.ts +6 -1
  252. package/widgets/Bookmarks/BookmarksVisibleElements.d.ts +0 -9
  253. package/widgets/Bookmarks/types.d.ts +0 -4
  254. package/widgets/CatalogLayerList/CatalogLayerListVisibleElements.d.ts +2 -2
  255. package/widgets/CatalogLayerList/types.d.ts +5 -1
  256. package/widgets/Editor/VisibleElements.d.ts +0 -11
  257. package/widgets/ElevationProfile/types.d.ts +1 -1
  258. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  259. package/widgets/FeatureTable/FieldColumn.d.ts +0 -1
  260. package/widgets/FeatureTable/VisibleElements.d.ts +2 -16
  261. package/widgets/FeatureTable/support/AttachmentsViewOptions.d.ts +5 -3
  262. package/widgets/FeatureTable/support/AttachmentsViewOptions.js +1 -1
  263. package/widgets/FeatureTable/support/FeatureStore.js +1 -1
  264. package/widgets/FeatureTable.js +1 -1
  265. package/widgets/Features/FeaturesViewModel.d.ts +3 -27
  266. package/widgets/Features/FeaturesVisibleElements.d.ts +4 -4
  267. package/widgets/LayerList/LayerListViewModel.d.ts +20 -5
  268. package/widgets/LayerList/LayerListVisibleElements.d.ts +10 -12
  269. package/widgets/LayerList/ListItem.d.ts +33 -0
  270. package/widgets/LayerList/ListItemPanel.d.ts +8 -2
  271. package/widgets/LayerList/types.d.ts +58 -15
  272. package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
  273. package/widgets/Popup/PopupVisibleElements.d.ts +6 -6
  274. package/widgets/Popup/types.d.ts +1 -1
  275. package/widgets/ScaleRangeSlider/ScaleRanges.d.ts +1 -1
  276. package/widgets/Sketch/CreateToolVisibilityMap.d.ts +0 -4
  277. package/widgets/Sketch/VisibleElements.d.ts +0 -2
  278. package/widgets/Sketch/types.d.ts +1 -1
  279. package/widgets/TableList/ListItemPanel.d.ts +8 -0
  280. package/widgets/TableList/TableListViewModel.d.ts +9 -14
  281. package/widgets/TableList/TableListVisibleElements.d.ts +9 -11
  282. package/widgets/TableList/types.d.ts +13 -7
  283. package/widgets/support/SnappingControls/VisibleElements.d.ts +0 -4
  284. package/widgets/types.d.ts +1 -9
  285. package/assets/esri/core/workers/chunks/1d8fc0239c907ff5d1e8.js +0 -1
  286. package/assets/esri/core/workers/chunks/562cddaf63985e53ee6e.js +0 -1
  287. package/assets/esri/core/workers/chunks/b899b4e7979c13b99526.js +0 -1
  288. package/assets/esri/core/workers/chunks/d0ae8752419d5b761190.js +0 -1
  289. package/assets/esri/core/workers/chunks/df2ba5f9d57080fca183.js +0 -1
  290. package/assets/esri/core/workers/chunks/ee175fd4ec706f7878c0.js +0 -1
  291. package/assets/esri/core/workers/chunks/fc00d7278b43df813c54.js +0 -1
  292. package/layers/mixins/ScaleRange.d.ts +0 -16
  293. package/views/2d/engine/vectorTiles/shaders/Programs.js +0 -5
  294. package/views/2d/engine/vectorTiles/shaders/VTLMaterialManager.js +0 -5
  295. package/views/2d/engine/vectorTiles/shaders/sources/resolver.js +0 -5
  296. package/views/2d/engine/vectorTiles/shaders/sources/shaderRepository.js +0 -5
  297. package/views/2d/engine/vtlBrushes.js +0 -5
  298. package/views/2d/engine/webgl/brushes/WGLBrushVTLBackground.js +0 -5
  299. package/views/2d/engine/webgl/brushes/WGLBrushVTLCircle.js +0 -5
  300. package/views/2d/engine/webgl/brushes/WGLBrushVTLFill.js +0 -5
  301. package/views/2d/engine/webgl/brushes/WGLBrushVTLLine.js +0 -5
  302. package/views/2d/engine/webgl/brushes/WGLBrushVTLSymbol.js +0 -5
  303. package/views/3d/webgl-engine/effects/glow/GlowPresets.glsl.js +0 -5
  304. package/widgets/FeatureTable/support/FeatureStore.d.ts +0 -1
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{disposeMaybe as e}from"../../../../core/maybe.js";import{vtlBrushes as t}from"../vtlBrushes.js";import l from"./shaders/VTLMaterialManager.js";const s=1e-6;class r{constructor(e,t){this.spriteMosaic=e,this.glyphMosaic=t,this._brushCache={vtlBackground:null,vtlFill:null,vtlLine:null,vtlCircle:null,vtlSymbol:null},this._vtlMaterialManager=new l}dispose(){this._brushCache.vtlBackground?.dispose(),this._brushCache.vtlFill?.dispose(),this._brushCache.vtlLine?.dispose(),this._brushCache.vtlCircle?.dispose(),this._brushCache.vtlSymbol?.dispose(),this._brushCache=null,this._vtlMaterialManager=e(this._vtlMaterialManager),this.spriteMosaic.dispose(),this.glyphMosaic.dispose()}get vectorTilesMaterialManager(){return this._vtlMaterialManager}drawSymbols(e,l,r){const n=r.layers;e.renderPass="translucent";let i=this._brushCache.vtlSymbol;null==i&&(i=new t.vtlSymbol,this._brushCache.vtlSymbol=i),a[0]=l;for(let t=0;t<n.length;t++){const l=n[t];if(3!==l.type)continue;const r=l.getLayoutProperty("visibility");if(r&&1===r.getValue())continue;const o=e.displayLevel;void 0!==l.minzoom&&l.minzoom>o+s||void 0!==l.maxzoom&&l.maxzoom<=o-s||(e.styleLayerUID=l.uid,e.styleLayer=l,i.drawMany(e,a))}a[0]=null}drawBackground(e,l,r){if(0===r.backgroundBucketIds.length)return;const{context:n,displayLevel:i,requiredLevel:o}=e;l.key.level=o,n.setBlendingEnabled(!0),n.setDepthTestEnabled(!1),n.setStencilTestEnabled(!1),e.renderPass="background";let u=this._brushCache.vtlBackground;null==u&&(u=new t.vtlBackground,this._brushCache.vtlBackground=u),a[0]=l,r.backgroundBucketIds.forEach(t=>{const l=r.getLayerById(t);if(0!==l.type)return;const n=l.getLayoutProperty("visibility");n&&1===n.getValue()||void 0!==l.minzoom&&l.minzoom>i+s||void 0!==l.maxzoom&&l.maxzoom<=i-s||(e.styleLayerUID=l.uid,e.styleLayer=l,u.drawMany(e,a))}),a[0]=null}drawTile(e,t,l,s){const{context:r}=e,a=l.layers;r.setBlendingEnabled(!1),r.setDepthTestEnabled(!0),r.setDepthWriteEnabled(!0),r.setDepthFunction(515);const n=a.filter(e=>{if(null!=s&&s!==e.type||!t.layerData.has(e.uid))return!1;const l=e.getLayoutProperty("visibility");return 1!==l?.getValue()});e.renderPass="opaque";for(let i=n.length-1;i>=0;--i)this._renderStyleLayer(n[i],e,t);r.setDepthWriteEnabled(!1),r.setBlendingEnabled(!0),r.setBlendFunctionSeparate(1,771,1,771),e.renderPass="translucent",n.forEach(l=>this._renderStyleLayer(l,e,t)),r.setDepthTestEnabled(!1),r.bindVAO(null)}_renderStyleLayer(e,l,r){const{renderPass:n}=l;let i;switch(e.type){case 0:if("background"!==n)return;i=this._brushCache.vtlBackground,i||(i=new t.vtlBackground,this._brushCache.vtlBackground=i);break;case 1:if("opaque"!==n&&"translucent"!==l.renderPass)return;i=this._brushCache.vtlFill,null==i&&(i=new t.vtlFill,this._brushCache.vtlFill=i);break;case 2:if("translucent"!==n)return;i=this._brushCache.vtlLine,null==i&&(i=new t.vtlLine,this._brushCache.vtlLine=i);break;case 4:if("translucent"!==n)return;i=this._brushCache.vtlCircle,null==i&&(i=new t.vtlCircle,this._brushCache.vtlCircle=i);break;case 3:if("translucent"!==n)return;i=this._brushCache.vtlSymbol,null==i&&(i=new t.vtlSymbol,this._brushCache.vtlSymbol=i)}const{displayLevel:o}=l,{minzoom:u,maxzoom:h}=e;if(void 0!==u&&u>o+s||void 0!==h&&h<=o-s)return;const{context:c}=l;c.setStencilTestEnabled(!1),c.setStencilWriteMask(0),l.styleLayerUID=e.uid,l.styleLayer=e,a[0]=r,i.drawMany(l,a),a[0]=null}}const a=[null];export{r as default};
5
+ import{RenderingDevice as e}from"../webgl/RenderingDevice.js";import{simplePipelineState as t}from"../webgl/shaderGraph/utils.js";import{VTLTechniquesRepo as i}from"../webgl/shaderGraph/techniques/vectorTiles/VTLTechniques.js";const s=1e-6;class n{constructor(s,n){this.spriteMosaic=s,this.glyphMosaic=n,this._vtlTechniques=new i,this._context=null,this._vtlTechniques.startup(),this._renderingDevice=new e,this._pipelineState=t}dispose(){this._vtlTechniques&&this._vtlTechniques.shutdown(this._context),this.spriteMosaic.dispose(),this.glyphMosaic.dispose(),this._renderingDevice.dispose(),this._context=null}drawSymbols(e,t,i){const n=i.layers;e.renderPass="translucent";const a=this._vtlTechniques.getTechnique(3);r[0]=t;for(let l=0;l<n.length;l++){const t=n[l];if(3!==t.type)continue;const i=t.getLayoutProperty("visibility");if(i&&1===i.getValue())continue;const o=e.displayLevel;void 0!==t.minzoom&&t.minzoom>o+s||void 0!==t.maxzoom&&t.maxzoom<=o-s||(e.styleLayerUID=t.uid,e.styleLayer=t,a.render(e,{tiles:r}))}r[0]=null}drawBackground(e,t,i){if(0===i.backgroundBucketIds.length)return;const{displayLevel:n,requiredLevel:a}=e;t.key.level=a,this._renderingDevice.setPipelineState({...this._pipelineState,color:{write:[!0,!0,!0,!0],blendMode:"composite"},stencil:!1,depth:!1}),e.renderPass="background";const l=this._vtlTechniques.getTechnique(0);r[0]=t,i.backgroundBucketIds.forEach(t=>{const a=i.getLayerById(t);if(0!==a.type)return;const o=a.getLayoutProperty("visibility");o&&1===o.getValue()||void 0!==a.minzoom&&a.minzoom>n+s||void 0!==a.maxzoom&&a.maxzoom<=n-s||(e.styleLayerUID=a.uid,e.styleLayer=a,l.render(e,{tiles:r}))}),r[0]=null}drawTile(e,i,s,n){const r=s.layers,{context:a}=e,l=a.getPipelineState(),{depthWrite:o}=l;let c=0,h=1;o&&void 0!==o.zNear&&void 0!==o.zFar&&(c=o.zNear,h=o.zFar),this._pipelineState={...t,color:{write:[!0,!0,!0,!0],blendMode:"none"},depth:{write:{zNear:c,zFar:h},test:515}},this._renderingDevice.setPipelineState(this._pipelineState);const u=r.filter(e=>{if(null!=n&&n!==e.type||!i.layerData.has(e.uid))return!1;const t=e.getLayoutProperty("visibility");return 1!==t?.getValue()});e.renderPass="opaque";for(let t=u.length-1;t>=0;--t)this._renderStyleLayer(u[t],e,i);this._pipelineState={...t,color:{write:[!0,!0,!0,!0],blendMode:"composite"},depth:{write:!1,test:515}},this._renderingDevice.setPipelineState(this._pipelineState),e.renderPass="translucent",u.forEach(t=>this._renderStyleLayer(t,e,i)),this._renderingDevice.setPipelineState({...this._pipelineState,depth:!1}),this._context||(this._context=e.context)}setShader(e){return this._renderingDevice.setShader(e)}setPipelineState(e){return this._renderingDevice.setPipelineState(e)}getPipelineState(){return this._renderingDevice.getPipelineState()}submitDraw(e,t,i){return this._renderingDevice.submitDraw(e,t,i)}submitDrawMesh(e,t,i,s){this._renderingDevice.submitDrawMesh(e,t,i,s)}submitDrawMeshUntyped(e,t,i,s){this._renderingDevice.submitDrawMeshUntyped(e,t,i,s)}updatePipelineState(e){return this._renderingDevice.updatePipelineState(e)}setStencilRef(e,t){return this._renderingDevice.setStencilRef(e,t)}_renderStyleLayer(e,t,i){const{renderPass:n}=t;let a;switch(e.type){case 0:if("background"!==n)return;a=this._vtlTechniques.getTechnique(0);break;case 1:if("opaque"!==n&&"translucent"!==t.renderPass)return;a=this._vtlTechniques.getTechnique(1);break;case 2:if("translucent"!==n)return;a=this._vtlTechniques.getTechnique(2);break;case 4:if("translucent"!==n)return;a=this._vtlTechniques.getTechnique(4);break;case 3:if("translucent"!==n)return;a=this._vtlTechniques.getTechnique(3)}const{displayLevel:l}=t,{minzoom:o,maxzoom:c}=e;void 0!==o&&o>l+s||void 0!==c&&c<=l-s||!a||(this._renderingDevice.setPipelineState({...this._pipelineState,stencil:{write:{mask:0},test:!1}}),t.styleLayerUID=e.uid,t.styleLayer=e,r[0]=i,a.render(t,{tiles:r}),r[0]=null)}}const r=[null];export{n as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{create as e}from"../../../../geometry/support/aaBoundingRect.js";import t from"../../../../layers/support/TileInfo.js";import{tileCoordSize as s,tilePixelSize as r}from"./constants.js";import{SymbolFader as l}from"./decluttering/SymbolFader.js";import{writeOpacityToBuffers as i}from"./decluttering/util.js";import{RenderableTile as o}from"../webgl/RenderableTile.js";import n from"../webgl/TileContainer.js";import a from"../../tiling/TileCoverage.js";import d from"../../tiling/TileKey.js";const c=1e-6;function u(e,t){if(e){const s=e.getLayoutProperty("visibility");if(!s||1!==s.getValue()&&(void 0===e.minzoom||e.minzoom<t+c)&&(void 0===e.maxzoom||e.maxzoom>=t-c))return!0}return!1}class y extends n{constructor(e){super(e),this._backgroundTiles=[],this._computeDisplayInfoView(e)}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),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,o){if(this._spriteMosaic=e,this._glyphMosaic=t,this._styleRepository=r,this.tileInfoView=o,this._computeDisplayInfoView(o),null==this._symbolFader){const e=(e,t)=>{e.allSymbolsFadingOut=!0,e.lastOpacityUpdate=t,i(e,t,!0),e.decluttered=!0,e.requestRender()};this._symbolFader=new l("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,state:s}=e,r=this._styleRepository;if(!r)return;const l=r.layers,i=this._displayInfo.scaleToZoom(s.scale);r.backgroundBucketIds.length>0&&(e.renderPass="background",this._renderBackgroundLayers(e,r.backgroundBucketIds,i)),super.renderChildren(e),1===e.drawPhase&&this._fade(i,s);const o=this.children.filter(e=>e.visible&&e.hasData());if(!o||0===o.length)return t.bindVAO(null),t.setStencilTestEnabled(!0),void t.setBlendingEnabled(!0);for(const n of o)n.triangleCount=0;t.setStencilWriteMask(0),t.setColorMask(!0,!0,!0,!0),t.setStencilOp(7680,7680,7681),t.setStencilTestEnabled(!0),t.setBlendingEnabled(!1),t.setDepthTestEnabled(!0),t.setDepthWriteEnabled(!0),t.setDepthFunction(515),t.setClearDepth(1),t.clear(256),e.renderPass="opaque";for(let n=l.length-1;n>=0;n--)this._renderStyleLayer(l[n],e,o);t.setDepthWriteEnabled(!1),t.setBlendingEnabled(!0),t.setBlendFunctionSeparate(1,771,1,771),e.renderPass="translucent";for(let n=0;n<l.length;n++)this._renderStyleLayer(l[n],e,o);t.bindVAO(null),t.setStencilTestEnabled(!0),t.setBlendingEnabled(!0);for(const n of o)n.debugInfo.display.triangleCount=n.triangleCount}_fade(e,t){null!=this._symbolFader&&(this._symbolFader.update(e,t)||this.requestRender())}_renderStyleLayer(e,t,s){const{displayLevel:r,painter:l,renderPass:i}=t;if(void 0===e)return;const o=e.getLayoutProperty("visibility");if(o&&1===o.getValue())return;let n;switch(e.type){case 0:return;case 1:if("opaque"!==i&&"translucent"!==t.renderPass)return;n="vtlFill";break;case 2:if("translucent"!==i)return;n="vtlLine";break;case 4:if("translucent"!==i)return;n="vtlCircle";break;case 3:if("translucent"!==i)return;n="vtlSymbol"}if(s=3===e.type?s.filter(e=>e.decluttered):s.filter(e=>e.neededForCoverage),"vtlSymbol"!==n&&(0===s.length||void 0!==e.minzoom&&e.minzoom>=r+c||void 0!==e.maxzoom&&e.maxzoom<r-c))return;const a=e.uid;t.styleLayerUID=a,t.styleLayer=e;for(const d of s)if(d.layerData.has(a)){l.renderObjects(t,s,n);break}}_renderBackgroundLayers(t,l,i){const{context:n,painter:c,state:y}=t,h=this._styleRepository;let p=!1;for(const e of l){if(0===h.getLayerById(e).type&&u(h.getLayerById(e),i)){p=!0;break}}if(!p)return;const m=this.tileInfoView,f=m.getTileCoverage(t.state,0,!0,"smallest"),{spans:g,lodInfo:b}=f,{level:_}=b,F=e(),v=[],C=this._backgroundTiles;let R,T=0;for(const{row:a,colFrom:u,colTo:k}of g)for(let t=u;t<=k;t++){if(T<C.length)R=C[T],R.key.set(_,a,b.normalizeCol(t),b.getWorldForColumn(t)),m.getTileBounds(F,R.key,!1),R.x=F[0],R.y=F[3],R.resolution=m.getTileResolution(_);else{const l=new d(_,a,b.normalizeCol(t),b.getWorldForColumn(t)),i=m.getTileBounds(e(),l),n=m.getTileResolution(_);R=new o(l,n,i[0],i[3],r,r,s,s),C.push(R)}R.setTransform(y),v.push(R),T++}n.setStencilWriteMask(0),n.setColorMask(!0,!0,!0,!0),n.setStencilOp(7680,7680,7681),n.setStencilFunction(514,0,255),n.setStencilTestEnabled(!0);for(const e of l){const s=h.getLayerById(e);0===s.type&&u(s,i)&&(t.styleLayerUID=s.uid,t.styleLayer=s,c.renderObjects(t,v,"vtlBackground"))}a.pool.release(f)}_computeDisplayInfoView(e){let s=e.tileInfo.lods[0].scale;const l=Math.max(25,e.tileInfo.lods.length),i=[];for(let t=0;t<=l;t++)i.push(s),s/=2;this._displayInfo=t.create({scales:i,size:r,spatialReference:e.spatialReference,numLODs:l})}}export{y as VectorTileContainer};
5
+ import{create as e}from"../../../../geometry/support/aaBoundingRect.js";import t from"../../../../layers/support/TileInfo.js";import{tileCoordSize as s,tilePixelSize 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 p 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.tileInfoView=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);i.backgroundBucketIds.length>0&&(e.renderPass="background",this._renderBackgroundLayers(e,i.backgroundBucketIds,l)),super.renderChildren(e),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;t.setClearDepth(1),t.clear(256),s.setPipelineState({color:{write:[!0,!0,!0,!0],blendMode:"none"},stencil:{write:!1,test:{compare:514,op:{fail:7680,zFail:7680,zPass:7681},mask:255}},depth:{write:{zNear:0,zFar:1},test:515}}),e.renderPass="opaque";for(let t=o.length-1;t>=0;t--)this._renderStyleLayer(o[t],e,n);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:if("opaque"!==i&&"translucent"!==t.renderPass)return;break;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){if(0===a.getLayerById(e).type&&y(a.getLayerById(e),o)){d=!0;break}}if(!d)return;const u=this.tileInfoView,p=u.getTileCoverage(t.state,0,!0,"smallest"),{spans:m,lodInfo:f}=p,{level:g}=f,_=e(),b=[],F=this._backgroundTiles;let v,w=0;for(const{row:h,colFrom:y,colTo:T}of m)for(let t=y;t<=T;t++){if(w<F.length)v=F[w],v.key.set(g,h,f.normalizeCol(t),f.getWorldForColumn(t)),u.getTileBounds(_,v.key,!1),v.x=_[0],v.y=_[3],v.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);v=new l(i,n,o[0],o[3],r,r,s,s),F.push(v)}v.setTransform(n),b.push(v),w++}const R=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,R.render(t,{tiles:b}))}h.pool.release(p)}_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{p as VectorTileContainer};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{radToByte as t}from"./GeometryUtils.js";import s from"./MemoryBuffer.js";class o extends s{constructor(t){super(t)}add(t,o,r,u,h,a,n,d,e,p,i,c){const M=this.array;let l=s.i1616to32(t,o);M.push(l);const m=31;l=s.i8888to32(Math.round(m*r),Math.round(m*u),Math.round(m*h),Math.round(m*a)),M.push(l),l=s.i8888to32(Math.round(m*n),Math.round(m*d),Math.round(m*e),Math.round(m*p)),M.push(l),l=s.i1616to32(i,0),M.push(l),c&&M.push(...c)}}class r extends s{constructor(t){super(t)}add(t,o,r){const u=this.array;u.push(s.i1616to32(t,o)),r&&u.push(...r)}}class u extends s{constructor(t){super(t)}add(t,o,r,u,h,a,n){const d=this.array,e=this.index;let p=s.i1616to32(t,o);d.push(p);const i=15;return p=s.i8888to32(Math.round(i*r),Math.round(i*u),h,a),d.push(p),n&&d.push(...n),e}}class h extends s{constructor(t){super(t)}add(o,r,u,h,a,n,d,e,p,i,c,M){const l=this.array;let m=s.i1616to32(o,r);l.push(m),m=s.i1616to32(Math.round(8*u),Math.round(8*h)),l.push(m),m=s.i8888to32(a/4,n/4,e,p),l.push(m),m=s.i8888to32(0,t(d),10*i,Math.min(10*c,255)),l.push(m),M&&l.push(...M)}}class a extends s{constructor(t){super(t)}add(t,o,r,u,h){const a=this.array,n=s.i1616to32(2*t+r,2*o+u);a.push(n),h&&a.push(...h)}}export{a as CircleVertexBuffer,r as FillVertexBuffer,o as LineVertexBuffer,u as OutlineVertexBuffer,h as SymbolVertexBuffer};
5
+ import{radToByte as s}from"./GeometryUtils.js";import t from"./MemoryBuffer.js";import{i1616to32 as r,i8888to32 as u,i88to16 as o}from"../webgl/number.js";class h extends t{constructor(s){super(s)}add(s,t,o,h,a,n,d,e,p,c,M,i){const l=this.array;let m=r(s,t);l.push(m);const x=31;m=u(Math.round(x*o),Math.round(x*h),Math.round(x*a),Math.round(x*n)),l.push(m),m=u(Math.round(x*d),Math.round(x*e),Math.round(x*p),Math.round(x*c)),l.push(m),m=r(M,0),l.push(m),i&&l.push(...i)}}class a extends t{constructor(s){super(s)}add(s,t,u){const o=this.array;o.push(r(s,t)),u&&o.push(...u)}}class n extends t{constructor(s){super(s)}add(s,t,o,h,a,n,d){const e=this.array,p=this.index;let c=r(s,t);e.push(c);const M=15;return c=u(Math.round(M*o),Math.round(M*h),a,n),e.push(c),d&&e.push(...d),p}}class d extends t{constructor(s){super(s)}add(t,u,h,a,n,d,e,p,c,M,i,l){const m=this.array;let x=r(t,u);m.push(x),x=r(Math.round(8*h),Math.round(8*a)),m.push(x),x=r(o(n/4,d/4),o(p,c)),m.push(x),x=r(o(0,s(e)),o(10*M,Math.min(10*i,255))),m.push(x),l&&m.push(...l)}}class e extends t{constructor(s){super(s)}add(s,t,u,o,h){const a=this.array,n=r(2*s+u,2*t+o);a.push(n),h&&a.push(...h)}}export{e as CircleVertexBuffer,a as FillVertexBuffer,h as LineVertexBuffer,n as OutlineVertexBuffer,d as SymbolVertexBuffer};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{VTLMaterial as t}from"./VTLMaterial.js";import{DataType as s}from"../../../../webgl/enums.js";import{VertexElementDescriptor as e}from"../../../../webgl/VertexElementDescriptor.js";class T extends t{static{this.ATTRIBUTES=[]}static{this.GEOMETRY_LAYOUT=[new e("a_pos",2,s.BYTE,0,2)]}static{this.ATTRIBUTES_INFO={}}constructor(t){super(t),this.baseGeometryLayout=T.GEOMETRY_LAYOUT,this.attributes=T.ATTRIBUTES,this.attributesInfo=T.ATTRIBUTES_INFO}}export{T as VTLBackgroundMaterial};
5
+ import{VTLMaterial as t}from"./VTLMaterial.js";import{DataType as s}from"../../../../webgl/enums.js";import{VertexElementDescriptor as e}from"../../../../webgl/VertexElementDescriptor.js";class r extends t{static{this.ATTRIBUTES=[]}static{this.GEOMETRY_LAYOUT=[new e("position",2,s.SHORT,0,4)]}static{this.ATTRIBUTES_INFO={}}constructor(t){super(t),this.baseGeometryLayout=r.GEOMETRY_LAYOUT,this.properties=r.ATTRIBUTES,this.propertyInfos=r.ATTRIBUTES_INFO}}export{r as VTLBackgroundMaterial};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{VTLMaterial as e}from"./VTLMaterial.js";import{DataType as r}from"../../../../webgl/enums.js";import{VertexElementDescriptor as t}from"../../../../webgl/VertexElementDescriptor.js";class c extends e{static{this.ATTRIBUTES=["circle-radius","circle-color","circle-opacity","circle-stroke-width","circle-stroke-color","circle-stroke-opacity","circle-blur"]}static{this.GEOMETRY_LAYOUT=[new t("a_pos",2,r.SHORT,0,4)]}static{this.ATTRIBUTES_INFO={"circle-radius":{name:"radius",type:1},"circle-color":{name:"color",type:10},"circle-opacity":{name:"opacity",type:1,precisionFactor:100},"circle-stroke-width":{name:"stroke_width",type:1,precisionFactor:4},"circle-stroke-color":{name:"stroke_color",type:10},"circle-stroke-opacity":{name:"stroke_opacity",type:1,precisionFactor:100},"circle-blur":{name:"blur",type:1,precisionFactor:32}}}constructor(e){super(e),this.baseGeometryLayout=c.GEOMETRY_LAYOUT,this.attributes=c.ATTRIBUTES,this.attributesInfo=c.ATTRIBUTES_INFO}}export{c as VTLCircleMaterial};
5
+ import{VTLMaterial as t}from"./VTLMaterial.js";import{DataType as r}from"../../../../webgl/enums.js";import{VertexElementDescriptor as e}from"../../../../webgl/VertexElementDescriptor.js";class i extends t{static{this.ATTRIBUTES=["circle-radius","circle-color","circle-opacity","circle-stroke-width","circle-stroke-color","circle-stroke-opacity","circle-blur"]}static{this.GEOMETRY_LAYOUT=[new e("position",2,r.SHORT,0,4)]}static{this.ATTRIBUTES_INFO={"circle-radius":{name:"radius",type:1,attribueIdx:[1,8]},"circle-color":{name:"color",type:10,attribueIdx:[2,9]},"circle-opacity":{name:"opacity",type:1,attribueIdx:[3,10],precisionFactor:100},"circle-stroke-width":{name:"strokeWidth",type:1,attribueIdx:[4,11],precisionFactor:4},"circle-stroke-color":{name:"strokeColor",type:10,attribueIdx:[5,12]},"circle-stroke-opacity":{name:"strokeOpacity",type:1,attribueIdx:[6,13],precisionFactor:100},"circle-blur":{name:"blur",type:1,attribueIdx:[7,14],precisionFactor:32}}}constructor(t){super(t),this.baseGeometryLayout=i.GEOMETRY_LAYOUT,this.properties=i.ATTRIBUTES,this.propertyInfos=i.ATTRIBUTES_INFO}}export{i as VTLCircleMaterial};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{VTLMaterial as t}from"./VTLMaterial.js";import{DataType as i}from"../../../../webgl/enums.js";import{VertexElementDescriptor as o}from"../../../../webgl/VertexElementDescriptor.js";class T extends t{static{this.ATTRIBUTES=["fill-color","fill-opacity","fill-pattern"]}static{this.GEOMETRY_LAYOUT=[new o("a_pos",2,i.SHORT,0,4)]}static{this.ATTRIBUTES_INFO={"fill-color":{name:"color",type:10},"fill-opacity":{name:"opacity",type:1,precisionFactor:100},"fill-pattern":{name:"tlbr",type:12,isOptional:!0}}}constructor(t){super(t),this.baseGeometryLayout=T.GEOMETRY_LAYOUT,this.attributes=T.ATTRIBUTES,this.attributesInfo=T.ATTRIBUTES_INFO}}class e extends t{static{this.ATTRIBUTES_OUTLINE=["fill-outline-color","fill-opacity"]}static{this.ATTRIBUTES_FILL=["fill-color","fill-opacity"]}static{this.GEOMETRY_LAYOUT=[new o("a_pos",2,i.SHORT,0,8),new o("a_offset",2,i.BYTE,4,8),new o("a_xnormal",2,i.BYTE,6,8)]}static{this.ATTRIBUTES_INFO_OUTLINE={"fill-outline-color":{name:"color",type:10},"fill-opacity":{name:"opacity",type:1,precisionFactor:100}}}static{this.ATTRIBUTES_INFO_FILL={"fill-color":{name:"color",type:10},"fill-opacity":{name:"opacity",type:1,precisionFactor:100}}}constructor(t,i){super(t),this.baseGeometryLayout=e.GEOMETRY_LAYOUT,this.attributes=i?e.ATTRIBUTES_FILL:e.ATTRIBUTES_OUTLINE,this.attributesInfo=i?e.ATTRIBUTES_INFO_FILL:e.ATTRIBUTES_INFO_OUTLINE}}export{T as VTLFillMaterial,e as VTLOutlineMaterial};
5
+ import{VTLMaterial as t}from"./VTLMaterial.js";import{DataType as i}from"../../../../webgl/enums.js";import{VertexElementDescriptor as o}from"../../../../webgl/VertexElementDescriptor.js";class e extends t{static{this.ATTRIBUTES=["fill-color","fill-opacity","fill-pattern"]}static{this.GEOMETRY_LAYOUT=[new o("position",2,i.SHORT,0,4)]}static{this.ATTRIBUTES_INFO={"fill-color":{name:"color",type:10,attribueIdx:[1,4]},"fill-opacity":{name:"opacity",type:1,precisionFactor:100,attribueIdx:[2,5]},"fill-pattern":{name:"tlbr",type:12,isOptional:!0,attribueIdx:[3,3]}}}constructor(t){super(t),this.baseGeometryLayout=e.GEOMETRY_LAYOUT,this.properties=e.ATTRIBUTES,this.propertyInfos=e.ATTRIBUTES_INFO}}class r extends t{static{this.ATTRIBUTES_OUTLINE=["fill-outline-color","fill-opacity"]}static{this.ATTRIBUTES_FILL=["fill-color","fill-opacity"]}static{this.GEOMETRY_LAYOUT=[new o("position",2,i.SHORT,0,8),new o("offset",2,i.BYTE,4,8),new o("normal",2,i.BYTE,6,8)]}static{this.ATTRIBUTES_INFO_OUTLINE={"fill-outline-color":{name:"color",type:10,attribueIdx:[3,5]},"fill-opacity":{name:"opacity",type:1,precisionFactor:100,attribueIdx:[4,6]}}}static{this.ATTRIBUTES_INFO_FILL={"fill-color":{name:"color",type:10,attribueIdx:[3,5]},"fill-opacity":{name:"opacity",type:1,precisionFactor:100,attribueIdx:[4,6]}}}constructor(t,i){super(t),this.baseGeometryLayout=r.GEOMETRY_LAYOUT,this.properties=i?r.ATTRIBUTES_FILL:r.ATTRIBUTES_OUTLINE,this.propertyInfos=i?r.ATTRIBUTES_INFO_FILL:r.ATTRIBUTES_INFO_OUTLINE}}export{e as VTLFillMaterial,r as VTLOutlineMaterial};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{VTLMaterial as e}from"./VTLMaterial.js";import{DataType as t}from"../../../../webgl/enums.js";import{VertexElementDescriptor as i}from"../../../../webgl/VertexElementDescriptor.js";class a extends e{static{this.ATTRIBUTES=["line-blur","line-color","line-gap-width","line-offset","line-opacity","line-width","line-pattern","line-dasharray"]}static{this.GEOMETRY_LAYOUT=[new i("a_pos",2,t.SHORT,0,16),new i("a_extrude_offset",4,t.BYTE,4,16),new i("a_dir_normal",4,t.BYTE,8,16),new i("a_accumulatedDistance",2,t.UNSIGNED_SHORT,12,16)]}static{this.ATTRIBUTES_INFO={"line-width":{name:"width",type:1,precisionFactor:2},"line-gap-width":{name:"gap_width",type:1,precisionFactor:2},"line-offset":{name:"offset",type:0,precisionFactor:2},"line-color":{name:"color",type:10},"line-opacity":{name:"opacity",type:1,precisionFactor:100},"line-blur":{name:"blur",type:1,precisionFactor:4},"line-pattern":{name:"tlbr",type:12,isOptional:!0},"line-dasharray":{name:"tlbr",type:11,isOptional:!0}}}constructor(e){super(e),this.baseGeometryLayout=a.GEOMETRY_LAYOUT,this.attributes=a.ATTRIBUTES,this.attributesInfo=a.ATTRIBUTES_INFO}}export{a as VTLLineMaterial};
5
+ import{VTLMaterial as t}from"./VTLMaterial.js";import{DataType as e}from"../../../../webgl/enums.js";import{VertexElementDescriptor as i}from"../../../../webgl/VertexElementDescriptor.js";class r extends t{static{this.ATTRIBUTES=["line-color","line-width","line-opacity","line-blur","line-offset","line-pattern","line-dasharray"]}static{this.GEOMETRY_LAYOUT=[new i("position",2,e.SHORT,0,16),new i("extrudeOffset",4,e.BYTE,4,16),new i("directionNormal",4,e.BYTE,8,16),new i("accumulatedDistance",2,e.UNSIGNED_SHORT,12,16)]}static{this.ATTRIBUTES_INFO={"line-color":{name:"color",type:10,attribueIdx:[4,10]},"line-width":{name:"width",type:1,attribueIdx:[5,11],precisionFactor:2},"line-opacity":{name:"opacity",type:1,attribueIdx:[6,12],precisionFactor:100},"line-blur":{name:"blur",type:1,attribueIdx:[7,13],precisionFactor:4},"line-offset":{name:"offset",type:0,attribueIdx:[8,14],precisionFactor:2},"line-pattern":{name:"tlbr",type:12,attribueIdx:[9,9],isOptional:!0},"line-dasharray":{name:"tlbr",type:11,attribueIdx:[9,9],isOptional:!0}}}constructor(t){super(t),this.baseGeometryLayout=r.GEOMETRY_LAYOUT,this.properties=r.ATTRIBUTES,this.propertyInfos=r.ATTRIBUTES_INFO}}export{r as VTLLineMaterial};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import t from"../MemoryBuffer.js";import{DataType as e}from"../../../../webgl/enums.js";import{fromLayouts as o,fromLayout as n}from"../../../../webgl/VertexAttributeLocations.js";import{VertexElementDescriptor as r}from"../../../../webgl/VertexElementDescriptor.js";class s{constructor(t){this._key=t}get key(){return this._key}get type(){return 7&this._key}defines(){return[]}getStride(){return this._geometryLayout||this._buildAttributesInfo(),this._stride}getAttributeLocations(){return this._geometryLayout||this._buildAttributesInfo(),this._locations}get geometryLayout(){return this._geometryLayout||this._buildAttributesInfo(),this._geometryLayout}getEncodingInfos(){return this._propertyEncodingInfo||this._buildAttributesInfo(),this._propertyEncodingInfo}getUniforms(){return this._uniforms||this._buildAttributesInfo(),this._uniforms}getShaderHeader(){return this._shaderHeader||this._buildAttributesInfo(),this._shaderHeader}getShaderMain(){return this._shaderMain||this._buildAttributesInfo(),this._shaderMain}setDataUniforms(t,e,o,n,r){const s=this.getUniforms();for(const a of s){const{name:s,type:i,getValue:c}=a,u=c(o,e,n,r);if(null!==u)switch(i){case"float":t.setUniform1f(s,u);break;case"vec2":t.setUniform2fv(s,u);break;case"vec4":t.setUniform4fv(s,u)}}}encodeAttributes(t,e,o,n){const r=this.attributesInfo,s=this.getEncodingInfos(),a=[];let i=0,c=0;for(const u of Object.keys(s)){const h=s[u],{type:d,precisionFactor:f,isLayout:l}=r[u],y=l?o.getLayoutProperty(u):o.getPaintProperty(u),_=y.interpolator?.getInterpolationRange(e);let m=0;for(const o of h){const{offset:r,bufferElementsToAdd:s}=o;if(s>0){for(let t=0;t<s;t++)a.push(0);i+=c,c=o.bufferElementsToAdd}const u=n??y.getValue(_?_[m]:e,t);switch(d){case 0:case 1:a[i]|=this._encodeByte(u*(f||1),8*r);break;case 2:case 3:a[i]|=this._encodeShort(u*(f||1),8*r);break;case 4:case 5:a[i]|=this._encodeByte(u*(f||1),8*r),a[i]|=this._encodeByte(u*(f||1),8*r+8);break;case 6:case 7:a[i]|=this._encodeShort(u*(f||1),8*r),a[i]|=this._encodeShort(u*(f||1),8*r+16);break;case 8:case 9:a[i]|=this._encodeByte(u*(f||1),8*r),a[i]|=this._encodeByte(u*(f||1),8*r+8),a[i]|=this._encodeByte(u*(f||1),8*r+16),a[i]|=this._encodeByte(u*(f||1),8*r+24);break;case 10:a[i]=this._encodeColor(u);break;case 11:case 12:this._encodePattern(i,a,u);break;default:throw new Error("Unsupported encoding type")}m++}}return a}getAtributeState(t){let e=0;const o=3+2*t;return e|=this._bit(o),e|=this._bit(o+1)<<1,e}static{this._encodingInfo={0:{dataType:e.BYTE,bytesPerElement:1,count:1,normalized:!1},1:{dataType:e.UNSIGNED_BYTE,bytesPerElement:1,count:1,normalized:!1},2:{dataType:e.SHORT,bytesPerElement:2,count:1,normalized:!1},3:{dataType:e.UNSIGNED_SHORT,bytesPerElement:2,count:1,normalized:!1},4:{dataType:e.BYTE,bytesPerElement:1,count:2,normalized:!1},5:{dataType:e.UNSIGNED_BYTE,bytesPerElement:1,count:2,normalized:!1},6:{dataType:e.SHORT,bytesPerElement:2,count:2,normalized:!1},7:{dataType:e.UNSIGNED_SHORT,bytesPerElement:2,count:2,normalized:!1},8:{dataType:e.BYTE,bytesPerElement:1,count:4,normalized:!1},9:{dataType:e.UNSIGNED_BYTE,bytesPerElement:1,count:4,normalized:!1},10:{dataType:e.UNSIGNED_BYTE,bytesPerElement:1,count:4,normalized:!0},11:{dataType:e.UNSIGNED_SHORT,bytesPerElement:2,count:4,normalized:!1},12:{dataType:e.UNSIGNED_SHORT,bytesPerElement:2,count:4,normalized:!1}}}_buildAttributesInfo(){const t=[],o={},{attributesInfo:n,attributes:r}=this,a={};let i=-1,c=-1;for(const e of r){c++;const r=this.getAtributeState(c);if(0===r||3===r)continue;const u=n[e],h=[];o[e]=h;const d=u.type;for(let e=0;e<r;e++){const{dataType:e,bytesPerElement:o,count:n,normalized:r}=s._encodingInfo[d],c=o*n,u=`${e}-${!0===r}`;let f=a[u],l=0;if(!f||f.count+n>4)i++,f={dataIndex:i,count:0,offset:0},4!==n&&(a[u]=f),t.push({location:-1,name:"a_data_"+i,count:n,type:e,normalized:r}),l=Math.ceil(Math.max(c/4,1));else{const e=t[f.dataIndex];e.count+=n;l=Math.ceil(Math.max(e.count*o/4,1))-Math.ceil(Math.max(f.offset/4,1))}h.push({dataIndex:f.dataIndex,offset:f.offset,bufferElementsToAdd:l}),f.offset+=c,f.count+=n}}for(const s of t)switch(s.type){case e.BYTE:case e.UNSIGNED_BYTE:s.count=4;break;case e.SHORT:case e.UNSIGNED_SHORT:s.count+=s.count%2}this._buildVertexBufferLayout(t),this._buildShaderInfo(t,o),this._propertyEncodingInfo=o}_buildVertexBufferLayout(t){const e=this.baseGeometryLayout;let s=e[0].stride;if(0===t.length)this._geometryLayout=e;else{const o=[];let n=s;for(const e of t)s+=a(e.type)*e.count;for(const t of e)o.push(new r(t.name,t.count,t.type,t.offset,s,t.normalized));for(const e of t)o.push(new r(e.name,e.count,e.type,n,s,e.normalized)),n+=a(e.type)*e.count;this._geometryLayout=o}this.opacityLayout?this._locations=o([this._geometryLayout,this.opacityLayout]):this._locations=n(this._geometryLayout),this._stride=s}_buildShaderInfo(t,e){let o="\n",n="\n";const r=[];for(const s of t)o+=`attribute ${this._getType(s.count)} ${s.name};\n`;const{attributesInfo:a,attributes:c}=this;let u=-1;for(const h of c){u++;const{name:t,type:c,precisionFactor:d,isLayout:f}=a[h],l=d&&1!==d?" * "+1/d:"",{bytesPerElement:y,count:_}=s._encodingInfo[c],m=t=>`a_data_${t.dataIndex}${i(_,t.offset,y)}`;switch(this.getAtributeState(u)){case 0:{const e=this._getType(_),s=`u_${t}`;r.push({name:s,type:e,getValue:(t,e,o,n)=>{const r=f?t.getLayoutValue(h,e):t.getPaintValue(h,e);if(11===c){const o=t.getDashKey(r,t.getLayoutValue("line-cap",e)),s=n.getMosaicItemPosition(o,!1);if(null==s)return null;const{tl:a,br:i}=s;return[a[0],i[1],i[0],a[1]]}if(12===c){const t=n.getMosaicItemPosition(r,!h.includes("line-"));if(null==t)return null;const{tl:e,br:o}=t;return[e[0],o[1],o[0],e[1]]}if(10===c){const t=r[3];return[t*r[0],t*r[1],t*r[2],t]}return r}}),o+=`uniform ${e} ${s};\n`,n+=`${e} ${t} = ${s};\n`}break;case 1:{const o=m(e[h][0]);n+=`${this._getType(_)} ${t} = ${o}${l};\n`}break;case 2:{const s=`u_t_${t}`;r.push({name:s,type:"float",getValue:(t,e,o,n)=>(f?t.getLayoutProperty(h):t.getPaintProperty(h)).interpolator.interpolationUniformValue(o,e)}),o+=`uniform float ${s};\n`;const a=m(e[h][0]),i=m(e[h][1]);n+=`${this._getType(_)} ${t} = mix(${a}${l}, ${i}${l}, ${s});\n`}}}this._shaderHeader=o,this._shaderMain=n,this._uniforms=r}_bit(t){return(this._key&1<<t)>>t}_getType(t){switch(t){case 1:return"float";case 2:return"vec2";case 3:return"vec3";case 4:return"vec4"}throw new Error("Invalid count")}_encodeColor(e){const o=255*e[3];return t.i8888to32(e[0]*o,e[1]*o,e[2]*o,o)}_encodePattern(t,e,o){if(!o?.rect)return;const n=2,r=o.rect,s=o.width,a=o.height;e[t]=this._encodeShort(r.x+n,0),e[t]|=this._encodeShort(r.y+n+a,16),e[t+1]=this._encodeShort(r.x+n+s,0),e[t+1]|=this._encodeShort(r.y+n,16)}_encodeByte(t,e){return(255&t)<<e}_encodeShort(t,e){return(65535&t)<<e}}const a=t=>{switch(t){case e.FLOAT:case e.INT:case e.UNSIGNED_INT:return 4;case e.SHORT:case e.UNSIGNED_SHORT:case e.HALF_FLOAT:return 2;case e.BYTE:case e.UNSIGNED_BYTE:return 1}},i=(t,e,o)=>{const n=e/o;if(1===t)switch(n){case 0:return".x";case 1:return".y";case 2:return".z";case 3:return".w"}else if(2===t)switch(n){case 0:return".xy";case 1:return".yz";case 2:return".zw"}else if(3===t)switch(n){case 0:return".xyz";case 1:return".yzw"}return""};export{s as VTLMaterial};
5
+ import{i8888to32 as t}from"../../webgl/number.js";import{sortByAlignment as e}from"../../webgl/shaderGraph/techniques/mesh/AlignedVertexSpec.js";import{DataType as o}from"../../../../webgl/enums.js";import{fromLayouts as r,fromLayout as n}from"../../../../webgl/VertexAttributeLocations.js";import{VertexElementDescriptor as s}from"../../../../webgl/VertexElementDescriptor.js";class i{constructor(t){this._precisionFactors={},this._key=t}get key(){return this._key}get type(){return 7&this._key}defines(){return[]}getStride(){return this._geometryLayout||this._buildMaterialInfo(),this._stride}getAttributeLocations(){return this._geometryLayout||this._buildMaterialInfo(),this._locations}getPrecisionFactors(){return this._precisionFactors||this._buildMaterialInfo(),this._precisionFactors}get geometryLayout(){return this._geometryLayout||this._buildMaterialInfo(),this._geometryLayout}getEncodingInfos(){return this._propertyEncodingInfo||this._buildMaterialInfo(),this._propertyEncodingInfo}getUniforms(){return this._uniforms||this._buildMaterialInfo(),this._uniforms}getUsedAttributes(){return this._usedAttributes||this._buildMaterialInfo(),this._usedAttributes}encodeAttributes(t,e,o,r){const n=this.propertyInfos,s=this.getEncodingInfos(),i=[],a=i.length,c=Math.ceil(this._ddStrideInBytes/4);for(let u=0;u<c;u++)i.push(0);for(const u of Object.keys(s)){const c=s[u],{type:h,precisionFactor:y,isLayout:l}=n[u],d=l?o.getLayoutProperty(u):o.getPaintProperty(u),p=d.interpolator?.getInterpolationRange(e);let _=0;for(const o of c){const{offset:n}=o,s=a+Math.floor(n/4),c=r??d.getValue(p?p[_]:e,t),u=y||1;switch(h){case 0:case 1:i[s]|=this._encodeByte(c*u,0);break;case 2:case 3:i[s]|=this._encodeShort(c*u,0);break;case 4:case 5:i[s]|=this._encodeByte(c*u,0),i[s]|=this._encodeByte(c*u,8);break;case 6:case 7:i[s]|=this._encodeShort(c*u,0),i[s]|=this._encodeShort(c*u,16);break;case 8:case 9:i[s]|=this._encodeByte(c*u,0),i[s]|=this._encodeByte(c*u,8),i[s]|=this._encodeByte(c*u,16),i[s]|=this._encodeByte(c*u,24);break;case 10:i[s]=this._encodeColor(c);break;case 11:case 12:this._encodePattern(s,i,c);break;default:throw new Error("Unsupported encoding type")}_++}}return i}getAtributeState(t){let e=0;const o=3+2*t;return e|=this._bit(o),e|=this._bit(o+1)<<1,e}static{this._encodingInfo={0:{dataType:o.BYTE,bytesPerElement:1,count:1,normalized:!1},1:{dataType:o.UNSIGNED_BYTE,bytesPerElement:1,count:1,normalized:!1},2:{dataType:o.SHORT,bytesPerElement:2,count:1,normalized:!1},3:{dataType:o.UNSIGNED_SHORT,bytesPerElement:2,count:1,normalized:!1},4:{dataType:o.BYTE,bytesPerElement:1,count:2,normalized:!1},5:{dataType:o.UNSIGNED_BYTE,bytesPerElement:1,count:2,normalized:!1},6:{dataType:o.SHORT,bytesPerElement:2,count:2,normalized:!1},7:{dataType:o.UNSIGNED_SHORT,bytesPerElement:2,count:2,normalized:!1},8:{dataType:o.BYTE,bytesPerElement:1,count:4,normalized:!1},9:{dataType:o.UNSIGNED_BYTE,bytesPerElement:1,count:4,normalized:!1},10:{dataType:o.UNSIGNED_BYTE,bytesPerElement:1,count:4,normalized:!0},11:{dataType:o.UNSIGNED_SHORT,bytesPerElement:2,count:4,normalized:!1},12:{dataType:o.UNSIGNED_SHORT,bytesPerElement:2,count:4,normalized:!1}}}_getLayoutElementsForPropertyState(t,e,o){const r=o[t],n=r.name,{count:s,dataType:a,normalized:c}=i._encodingInfo[r.type],{attribueIdx:u,precisionFactor:h}=r,y=h||1,l=[{location:u[0],name:n,propertyName:t,count:s,type:a,normalized:c,precisionFactor:y}];if(this._precisionFactors[n]=y,2===e){const e=`${n}To`;l.push({location:u[1],name:e,propertyName:t,count:s,type:a,normalized:c,precisionFactor:y}),this._precisionFactors[e]=y}return l}_buildMaterialInfo(){const t=[];this._propertyEncodingInfo={};const e={},o=this.properties,r=this.propertyInfos;let n=-1;for(const i of o){n++;const o=r[i].name;e[o]=!1,e[`${o}To`]=!1;const s=this.getAtributeState(n);if(0===s||3===s)continue;const a=this._getLayoutElementsForPropertyState(i,s,r);t.push(...a)}for(const i of t)e[i.name]=!0;const s=u(t);this._buildLayout(s),this._buildShaderUniforms(),this._usedAttributes=e}_buildLayout(t){this.opacityLayout?this._locations=r([this.baseGeometryLayout,this.opacityLayout]):this._locations=n(this.baseGeometryLayout);const e=this.baseGeometryLayout;let o=e[0].stride;const i=[];let u=0;for(const r of t)u+=a(r.type)*r.count;o=c(o+u);for(const r of e)i.push(new s(r.name,r.count,r.type,r.offset,o,r.normalized));let h=0;for(const r of t)i.push(new s(r.name,r.count,r.type,e[0].stride+h,o,r.normalized)),void 0===this._propertyEncodingInfo[r.propertyName]&&(this._propertyEncodingInfo[r.propertyName]=[]),this._propertyEncodingInfo[r.propertyName].push({offset:h}),h+=a(r.type)*r.count;this._ddStrideInBytes=h,this._geometryLayout=i;const y=this._locations;for(const r of t)y.set(r.name,r.location);this._stride=o}_buildShaderUniforms(){const t=[],e=this.properties,o=this.propertyInfos;let r=-1;for(const n of e){r++;const{name:e,type:s,isLayout:i}=o[n];switch(this.getAtributeState(r)){case 0:t.push({name:e,getValue:(t,e,o,r)=>{const a=i?t.getLayoutValue(n,e):t.getPaintValue(n,e);switch(s){case 11:{const o=t.getDashKey(a,t.getLayoutValue("line-cap",e)),n=r.getMosaicItemPosition(o,!1);if(null==n)return null;const{tl:s,br:i}=n;return[s[0],i[1],i[0],s[1]]}case 12:{const t=r.getMosaicItemPosition(a,!n.includes("line-"));if(null==t)return null;const{tl:e,br:o}=t;return[e[0],o[1],o[0],e[1]]}case 10:{const t=a[3];return[t*a[0],t*a[1],t*a[2],t]}default:return a}}});break;case 2:{const o=`${e}Mix`;t.push({name:o,getValue:(t,e,o,r)=>(i?t.getLayoutProperty(n):t.getPaintProperty(n)).interpolator.interpolationUniformValue(o,e)})}}}this._uniforms=t}_bit(t){return(this._key&1<<t)>>t}_encodeColor(e){const o=255*e[3];return t(e[0]*o,e[1]*o,e[2]*o,o)}_encodePattern(t,e,o){if(!o?.rect)return;const r=2,n=o.rect,s=o.width,i=o.height;e[t]=this._encodeShort(n.x+r,0),e[t]|=this._encodeShort(n.y+r+i,16),e[t+1]=this._encodeShort(n.x+r+s,0),e[t+1]|=this._encodeShort(n.y+r,16)}_encodeByte(t,e){return(255&t)<<e}_encodeShort(t,e){return(65535&t)<<e}}const a=t=>{switch(t){case o.FLOAT:case o.INT:case o.UNSIGNED_INT:return 4;case o.SHORT:case o.UNSIGNED_SHORT:case o.HALF_FLOAT:return 2;case o.BYTE:case o.UNSIGNED_BYTE:return 1}},c=t=>t+3&-4;function u(t){const o=e(t),r=[];let n=0;for(const e of o)r.push({...e,offset:n}),n+=a(e.type)*e.count;return r}export{i as VTLMaterial};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{VTLMaterial as t}from"./VTLMaterial.js";import{DataType as o}from"../../../../webgl/enums.js";import{VertexElementDescriptor as e}from"../../../../webgl/VertexElementDescriptor.js";const i=[new e("a_pos",2,o.SHORT,0,16),new e("a_vertexOffset",2,o.SHORT,4,16),new e("a_texAngleRange",4,o.UNSIGNED_BYTE,8,16),new e("a_levelInfo",4,o.UNSIGNED_BYTE,12,16)],a=[new e("a_opacityInfo",1,o.UNSIGNED_BYTE,0,1)];class c extends t{static{this.ATTRIBUTES=["icon-color","icon-opacity","icon-halo-blur","icon-halo-color","icon-halo-width","icon-size"]}static{this.ATTRIBUTES_INFO={"icon-color":{name:"color",type:10},"icon-opacity":{name:"opacity",type:1,precisionFactor:100},"icon-halo-color":{name:"halo_color",type:10},"icon-halo-width":{name:"halo_width",type:1,precisionFactor:4},"icon-halo-blur":{name:"halo_blur",type:1,precisionFactor:4},"icon-size":{name:"size",type:1,precisionFactor:32,isLayout:!0}}}constructor(t){super(t),this.baseGeometryLayout=i,this.opacityLayout=a,this.attributes=c.ATTRIBUTES,this.attributesInfo=c.ATTRIBUTES_INFO}}class r extends t{static{this.ATTRIBUTES=["text-color","text-opacity","text-halo-blur","text-halo-color","text-halo-width","text-size"]}static{this.ATTRIBUTES_INFO={"text-color":{name:"color",type:10},"text-opacity":{name:"opacity",type:1,precisionFactor:100},"text-halo-color":{name:"halo_color",type:10},"text-halo-width":{name:"halo_width",type:1,precisionFactor:4},"text-halo-blur":{name:"halo_blur",type:1,precisionFactor:4},"text-size":{name:"size",type:1,isLayout:!0}}}constructor(t){super(t),this.baseGeometryLayout=i,this.opacityLayout=a,this.attributes=r.ATTRIBUTES,this.attributesInfo=r.ATTRIBUTES_INFO}}export{c as VTLIconMaterial,r as VTLTextMaterial};
5
+ import{VTLMaterial as t}from"./VTLMaterial.js";import{DataType as o}from"../../../../webgl/enums.js";import{VertexElementDescriptor as e}from"../../../../webgl/VertexElementDescriptor.js";const i=[new e("positionAndOffset",4,o.SHORT,0,16),new e("iconInfo",4,o.UNSIGNED_SHORT,8,16)],a=[new e("opacityInfo",1,o.UNSIGNED_BYTE,0,1)];class r extends t{static{this.ATTRIBUTES=["icon-color","icon-opacity","icon-halo-blur","icon-halo-color","icon-halo-width","icon-size"]}static{this.ATTRIBUTES_INFO={"icon-color":{name:"color",type:10,attribueIdx:[2,8]},"icon-opacity":{name:"opacity",type:1,precisionFactor:100,attribueIdx:[3,9]},"icon-halo-color":{name:"haloColor",type:10,attribueIdx:[4,10]},"icon-halo-width":{name:"haloWidth",type:1,precisionFactor:4,attribueIdx:[5,11]},"icon-halo-blur":{name:"haloBlur",type:1,precisionFactor:4,attribueIdx:[6,12]},"icon-size":{name:"size",type:1,precisionFactor:32,isLayout:!0,attribueIdx:[7,13]}}}constructor(t){super(t),this.baseGeometryLayout=i,this.opacityLayout=a,this.properties=r.ATTRIBUTES,this.propertyInfos=r.ATTRIBUTES_INFO}}class c extends t{static{this.ATTRIBUTES=["text-color","text-opacity","text-halo-blur","text-halo-color","text-halo-width","text-size"]}static{this.ATTRIBUTES_INFO={"text-color":{name:"color",type:10,attribueIdx:[4,10]},"text-opacity":{name:"opacity",type:1,precisionFactor:100,attribueIdx:[3,9]},"text-halo-color":{name:"haloColor",type:10,attribueIdx:[5,11]},"text-halo-width":{name:"haloWidth",type:1,precisionFactor:4,attribueIdx:[6,12]},"text-halo-blur":{name:"haloBlur",type:1,precisionFactor:4,attribueIdx:[7,13]},"text-size":{name:"size",type:1,isLayout:!0,attribueIdx:[2,8]}}}constructor(t){super(t),this.baseGeometryLayout=i,this.opacityLayout=a,this.properties=c.ATTRIBUTES,this.propertyInfos=c.ATTRIBUTES_INFO}}export{r as VTLIconMaterial,c as VTLTextMaterial};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{fromValues as t}from"../../../../../geometry/support/aaBoundingRect.js";import{tilePixelRatio as i}from"../constants.js";import{translateAnchor as e,offsetLine as a,distanceFromToPolylineWithinThreshold as o,pointInPolygon as r}from"../GeometryUtils.js";import{VTLBackgroundMaterial as n}from"../shaders/VTLBackgroundMaterial.js";import{VTLCircleMaterial as s}from"../shaders/VTLCircleMaterial.js";import{VTLFillMaterial as l,VTLOutlineMaterial as h}from"../shaders/VTLFillMaterial.js";import{VTLLineMaterial as u}from"../shaders/VTLLineMaterial.js";import{VTLIconMaterial as p,VTLTextMaterial as g}from"../shaders/VTLSymbolMaterial.js";import c from"./Filter.js";import{StyleDefinition as y}from"./StyleDefinition.js";import P from"./StyleProperty.js";import{thinLineHalfWidthThreshold as f}from"../../webgl/definitions.js";class D{constructor(t,i,e,a,o,r){this.layer=t,this.feature=i,this.bounds=e,this.normalizationRatio=a,this.normalizationOffsetX=o,this.normalizationOffsetY=r}}class m{constructor(t,i,e,a){switch(this.type=t,this.typeName=i.type,this.id=i.id,this.source=i.source,this.sourceLayer=i["source-layer"],this.minzoom=i.minzoom,this.maxzoom=i.maxzoom,this.filter=i.filter,this.layout=i.layout,this.paint=i.paint,this.z=e,this.uid=a,t){case 0:this._layoutDefinition=y.backgroundLayoutDefinition,this._paintDefinition=y.backgroundPaintDefinition;break;case 1:this._layoutDefinition=y.fillLayoutDefinition,this._paintDefinition=y.fillPaintDefinition;break;case 2:this._layoutDefinition=y.lineLayoutDefinition,this._paintDefinition=y.linePaintDefinition;break;case 3:this._layoutDefinition=y.symbolLayoutDefinition,this._paintDefinition=y.symbolPaintDefinition;break;case 4:this._layoutDefinition=y.circleLayoutDefinition,this._paintDefinition=y.circlePaintDefinition}this._layoutProperties=this._parseLayout(this.layout),this._paintProperties=this._parsePaint(this.paint)}getFeatureFilter(){return void 0!==this._featureFilter?this._featureFilter:this._featureFilter=c.createFilter(this.filter)}getLayoutProperty(t){return this._layoutProperties[t]}getPaintProperty(t){return this._paintProperties[t]}getLayoutValue(t,i,e){let a;const o=this._layoutProperties[t];return o&&(a=o.getValue(i,e)),void 0===a&&(a=this._layoutDefinition[t].default),a}getPaintValue(t,i,e){let a;const o=this._paintProperties[t];return o&&(a=o.getValue(i,e)),void 0===a&&(a=this._paintDefinition[t].default),a}isPainterDataDriven(){const t=this._paintProperties;if(t)for(const i in t)if(t[i].isDataDriven)return!0;return!1}isIntersectingFeature(t,i,e,a,o,r,n){return!1}getFeatureInflatedBounds(t,i,e,a){return null}_parseLayout(t){const i={};for(const e in t){const a=this._layoutDefinition[e];a&&(i[e]=new P(a,t[e]))}return i}_parsePaint(t){const i={};for(const e in t){const a=this._paintDefinition[e];a&&(i[e]=new P(a,t[e]))}return i}computeAttributesKey(t,i,e,a){let o=0,r=0;for(const n of i){let t=3;if(!n||n!==a){const i=e[n],{isLayout:a,isOptional:o}=i,r=a?this.getLayoutProperty(n):this.getPaintProperty(n);t=r?.interpolator?2:r?.isDataDriven?1:o&&!r?3:0}r|=t<<o,o+=2}return r<<3|t}}class d extends m{constructor(t,i,e,a){super(t,i,e,a),this.backgroundMaterial=new n(this.computeAttributesKey(0,n.ATTRIBUTES,n.ATTRIBUTES_INFO))}}class _ extends m{constructor(t,i,e,a){super(t,i,e,a);const o=this.getPaintProperty("fill-color"),r=this.getPaintProperty("fill-opacity"),n=this.getPaintProperty("fill-pattern");this.hasDataDrivenColor=o?.isDataDriven,this.hasDataDrivenOpacity=r?.isDataDriven,this.hasDataDrivenFill=this.hasDataDrivenColor||this.hasDataDrivenOpacity||n?.isDataDriven;const s=this.getPaintProperty("fill-outline-color");this.outlineUsesFillColor=!s,this.hasDataDrivenOutlineColor=s?.isDataDriven,this.hasDataDrivenOutline=s?s.isDataDriven:!!o&&o.isDataDriven,this.hasDataDrivenOutline=(s?this.hasDataDrivenOutlineColor:this.hasDataDrivenColor)||this.hasDataDrivenOpacity,this.fillMaterial=new l(this.computeAttributesKey(1,l.ATTRIBUTES,l.ATTRIBUTES_INFO)),this.outlineMaterial=new h(this.computeAttributesKey(2,this.outlineUsesFillColor?h.ATTRIBUTES_FILL:h.ATTRIBUTES_OUTLINE,this.outlineUsesFillColor?h.ATTRIBUTES_INFO_FILL:h.ATTRIBUTES_INFO_OUTLINE),this.outlineUsesFillColor)}getFeatureInflatedBounds(t,i,e,a){const o=z(t);if(!o)return null;const r=this.getPaintValue("fill-translate",i,t),n=a*Math.max(r[0],r[1]);return o[0]-=n,o[2]-=n,o[1]+=n,o[3]+=n,o}isIntersectingFeature(t,a,n,s,l,h,u){const p=s.getGeometry();if(!p)return!1;const g=i/u.normalizationRatio;t=t/u.normalizationRatio+u.normalizationOffsetX,a=a/u.normalizationRatio+u.normalizationOffsetY;const c=e(this.getPaintValue("fill-translate",l,s),this.getPaintValue("fill-translate-anchor",l,s),h,i);t-=g*c.x,a-=g*c.y;return!!r(t,a,p)||o(t,a,p,g*n)}}class L extends m{constructor(t,i,e,a){super(t,i,e,a);const o=this.getPaintProperty("line-pattern");if(this.lineMaterial=new u(this.computeAttributesKey(3,u.ATTRIBUTES,u.ATTRIBUTES_INFO,o?"line-dasharray":"")),this.hasDataDrivenLine=this.getPaintProperty("line-blur")?.isDataDriven||this.getPaintProperty("line-color")?.isDataDriven||this.getPaintProperty("line-gap-width")?.isDataDriven||this.getPaintProperty("line-offset")?.isDataDriven||this.getPaintProperty("line-opacity")?.isDataDriven||this.getPaintProperty("line-pattern")?.isDataDriven||this.getPaintProperty("line-dasharray")?.isDataDriven||this.getLayoutProperty("line-cap")?.isDataDriven||this.getPaintProperty("line-width")?.isDataDriven,this.canUseThinTessellation=!1,!this.hasDataDrivenLine){const t=this.getPaintProperty("line-width");if(!t||"number"==typeof t&&.5*t<f){const t=this.getPaintProperty("line-offset");(!t||"number"==typeof t&&0===t)&&(this.canUseThinTessellation=!0)}}}getDashKey(t,i){let e;switch(i){case 0:default:e="Butt";break;case 1:e="Round";break;case 2:e="Square"}return`dasharray-[${t.toString()}]-${e}`}getFeatureInflatedBounds(t,i,e,a){const o=z(t);if(!o)return null;const r=this.getPaintValue("line-translate",i,t),n=a*Math.max(r[0],r[1]);o[0]-=n,o[2]-=n,o[1]+=n,o[3]+=n;const s=a*Math.abs(this.getPaintValue("line-offset",i,t)||0),l=a*(this.getPaintValue("line-width",i,t)/2);return o[0]-=s+l,o[1]-=s+l,o[2]+=s+l,o[3]+=s+l,o}isIntersectingFeature(t,r,n,s,l,h,u){let p=s.getGeometry();if(!p)return!1;const g=i/u.normalizationRatio;t=t/u.normalizationRatio+u.normalizationOffsetX,r=r/u.normalizationRatio+u.normalizationOffsetY;const c=e(this.getPaintValue("line-translate",l,s),this.getPaintValue("line-translate-anchor",l,s),h,i);t-=g*c.x,r-=g*c.y;const y=g*this.getPaintValue("line-offset",l,s)||0;0!==y&&(p=a(p,-y));const P=this.getPaintValue("line-width",l,s);return o(t,r,p,g*(n+P/2))}}class v extends m{constructor(t,i,e,a){super(t,i,e,a),this.iconMaterial=new p(this.computeAttributesKey(4,p.ATTRIBUTES,p.ATTRIBUTES_INFO)),this.textMaterial=new g(this.computeAttributesKey(6,g.ATTRIBUTES,g.ATTRIBUTES_INFO)),this.hasDataDrivenIcon=this.getPaintProperty("icon-color")?.isDataDriven||this.getPaintProperty("icon-halo-blur")?.isDataDriven||this.getPaintProperty("icon-halo-color")?.isDataDriven||this.getPaintProperty("icon-halo-width")?.isDataDriven||this.getPaintProperty("icon-opacity")?.isDataDriven||this.getLayoutProperty("icon-size")?.isDataDriven,this.hasDataDrivenText=this.getPaintProperty("text-color")?.isDataDriven||this.getPaintProperty("text-halo-blur")?.isDataDriven||this.getPaintProperty("text-halo-color")?.isDataDriven||this.getPaintProperty("text-halo-width")?.isDataDriven||this.getPaintProperty("text-opacity")?.isDataDriven||this.getLayoutProperty("text-size")?.isDataDriven}}class x extends m{constructor(t,i,e,a){super(t,i,e,a),this.circleMaterial=new s(this.computeAttributesKey(5,s.ATTRIBUTES,s.ATTRIBUTES_INFO))}getFeatureInflatedBounds(t,e,a,o){const r=z(t);if(!r)return null;const n=this.getPaintValue("circle-translate",e,t),s=Math.max(n[0],n[1]);r[0]-=s,r[2]-=s,r[1]+=s,r[3]+=s;const l=o*(i*(this.getPaintValue("circle-radius",e,t)+this.getPaintValue("circle-stroke-width",e,t))/2);return r[0]-=l,r[1]-=l,r[2]+=l,r[3]+=l,r}isIntersectingFeature(t,a,o,r,n,s,l){const h=r.getGeometry();if(!h)return!1;const u=i/l.normalizationRatio;t=t/l.normalizationRatio+l.normalizationOffsetX,a=a/l.normalizationRatio+l.normalizationOffsetY,o*=u;const p=e(this.getPaintValue("circle-translate",n,r),this.getPaintValue("circle-translate-anchor",n,r),s,u),g=u*(this.getPaintValue("circle-radius",n,r)+this.getPaintValue("circle-stroke-width",n,r));let c,y;for(const i of h)if(i)for(const e of i){c=e.x+p.x,y=e.y+p.y;if(Math.sqrt((t-c)*(t-c)+(a-y)*(a-y))-o<=g)return!0}return!1}}class V{constructor(t,i,e){let a;this.allowOverlap=t.getLayoutValue("icon-allow-overlap",i),this.ignorePlacement=t.getLayoutValue("icon-ignore-placement",i),this.keepUpright=t.getLayoutValue("icon-keep-upright",i),this.optional=t.getLayoutValue("icon-optional",i),this.rotationAlignment=t.getLayoutValue("icon-rotation-alignment",i),2===this.rotationAlignment&&(this.rotationAlignment=e?0:1),a=t.getLayoutProperty("icon-anchor"),a?.isDataDriven?this._anchorProp=a:this.anchor=t.getLayoutValue("icon-anchor",i),a=t.getLayoutProperty("icon-offset"),a?.isDataDriven?this._offsetProp=a:this.offset=t.getLayoutValue("icon-offset",i),a=t.getLayoutProperty("icon-padding"),a?.isDataDriven?this._paddingProp=a:this.padding=t.getLayoutValue("icon-padding",i),a=t.getLayoutProperty("icon-rotate"),a?.isDataDriven?this._rotateProp=a:this.rotate=t.getLayoutValue("icon-rotate",i),a=t.getLayoutProperty("icon-size"),a?.isDataDriven?this._sizeProp=a:this.size=t.getLayoutValue("icon-size",i)}update(t,i){this._anchorProp&&(this.anchor=this._anchorProp.getValue(t,i)),this._offsetProp&&(this.offset=this._offsetProp.getValue(t,i)),this._paddingProp&&(this.padding=this._paddingProp.getValue(t,i)),this._rotateProp&&(this.rotate=this._rotateProp.getValue(t,i)),this._sizeProp&&(this.size=this._sizeProp.getValue(t,i))}}class T{constructor(t,i,e){let a;this.allowOverlap=t.getLayoutValue("text-allow-overlap",i),this.ignorePlacement=t.getLayoutValue("text-ignore-placement",i),this.keepUpright=t.getLayoutValue("text-keep-upright",i),this.optional=t.getLayoutValue("text-optional",i),this.rotationAlignment=t.getLayoutValue("text-rotation-alignment",i),2===this.rotationAlignment&&(this.rotationAlignment=e?0:1),a=t.getLayoutProperty("text-anchor"),a?.isDataDriven?this._anchorProp=a:this.anchor=t.getLayoutValue("text-anchor",i),a=t.getLayoutProperty("text-justify"),a?.isDataDriven?this._justifyProp=a:this.justify=t.getLayoutValue("text-justify",i),a=t.getLayoutProperty("text-letter-spacing"),a?.isDataDriven?this._letterSpacingProp=a:this.letterSpacing=t.getLayoutValue("text-letter-spacing",i),a=t.getLayoutProperty("text-line-height"),a?.isDataDriven?this._lineHeightProp=a:this.lineHeight=t.getLayoutValue("text-line-height",i),a=t.getLayoutProperty("text-max-angle"),a?.isDataDriven?this._maxAngleProp=a:this.maxAngle=t.getLayoutValue("text-max-angle",i),a=t.getLayoutProperty("text-max-width"),a?.isDataDriven?this._maxWidthProp=a:this.maxWidth=t.getLayoutValue("text-max-width",i),a=t.getLayoutProperty("text-offset"),a?.isDataDriven?this._offsetProp=a:this.offset=t.getLayoutValue("text-offset",i),a=t.getLayoutProperty("text-padding"),a?.isDataDriven?this._paddingProp=a:this.padding=t.getLayoutValue("text-padding",i),a=t.getLayoutProperty("text-rotate"),a?.isDataDriven?this._rotateProp=a:this.rotate=t.getLayoutValue("text-rotate",i),a=t.getLayoutProperty("text-size"),a?.isDataDriven?this._sizeProp=a:this.size=t.getLayoutValue("text-size",i),a=t.getLayoutProperty("text-writing-mode"),a?.isDataDriven?this._writingModeProp=a:this.writingMode=t.getLayoutValue("text-writing-mode",i)}update(t,i){this._anchorProp&&(this.anchor=this._anchorProp.getValue(t,i)),this._justifyProp&&(this.justify=this._justifyProp.getValue(t,i)),this._letterSpacingProp&&(this.letterSpacing=this._letterSpacingProp.getValue(t,i)),this._lineHeightProp&&(this.lineHeight=this._lineHeightProp.getValue(t,i)),this._maxAngleProp&&(this.maxAngle=this._maxAngleProp.getValue(t,i)),this._maxWidthProp&&(this.maxWidth=this._maxWidthProp.getValue(t,i)),this._offsetProp&&(this.offset=this._offsetProp.getValue(t,i)),this._paddingProp&&(this.padding=this._paddingProp.getValue(t,i)),this._rotateProp&&(this.rotate=this._rotateProp.getValue(t,i)),this._sizeProp&&(this.size=this._sizeProp.getValue(t,i)),this._writingModeProp&&(this.writingMode=this._writingModeProp.getValue(t,i))}}function z(i){const e=i?.getGeometry();if(null==e)return null;let a=1/0,o=1/0,r=-1/0,n=-1/0;for(const t of e)if(t)for(const i of t)a=Math.min(a,i.x),o=Math.min(o,i.y),r=Math.max(r,i.x),n=Math.max(n,i.y);return t(a,o,r,n)}export{d as BackgroundStyleLayer,x as CircleStyleLayer,_ as FillStyleLayer,V as IconLayout,D as IndexItem,L as LineStyleLayer,m as StyleLayer,v as SymbolStyleLayer,T as TextLayout};
5
+ import{fromValues as t}from"../../../../../geometry/support/aaBoundingRect.js";import{tilePixelRatio as i}from"../constants.js";import{translateAnchor as e,offsetLine as a,distanceFromToPolylineWithinThreshold as o,pointInPolygon as r}from"../GeometryUtils.js";import{VTLBackgroundMaterial as n}from"../shaders/VTLBackgroundMaterial.js";import{VTLCircleMaterial as s}from"../shaders/VTLCircleMaterial.js";import{VTLFillMaterial as l,VTLOutlineMaterial as h}from"../shaders/VTLFillMaterial.js";import{VTLLineMaterial as u}from"../shaders/VTLLineMaterial.js";import{VTLIconMaterial as p,VTLTextMaterial as g}from"../shaders/VTLSymbolMaterial.js";import c from"./Filter.js";import{StyleDefinition as y}from"./StyleDefinition.js";import P from"./StyleProperty.js";import{thinLineHalfWidthThreshold as f}from"../../webgl/definitions.js";class D{constructor(t,i,e,a,o,r){this.layer=t,this.feature=i,this.bounds=e,this.normalizationRatio=a,this.normalizationOffsetX=o,this.normalizationOffsetY=r}}class m{constructor(t,i,e,a){switch(this.type=t,this.typeName=i.type,this.id=i.id,this.source=i.source,this.sourceLayer=i["source-layer"],this.minzoom=i.minzoom,this.maxzoom=i.maxzoom,this.filter=i.filter,this.layout=i.layout,this.paint=i.paint,this.z=e,this.uid=a,t){case 0:this._layoutDefinition=y.backgroundLayoutDefinition,this._paintDefinition=y.backgroundPaintDefinition;break;case 1:this._layoutDefinition=y.fillLayoutDefinition,this._paintDefinition=y.fillPaintDefinition;break;case 2:this._layoutDefinition=y.lineLayoutDefinition,this._paintDefinition=y.linePaintDefinition;break;case 3:this._layoutDefinition=y.symbolLayoutDefinition,this._paintDefinition=y.symbolPaintDefinition;break;case 4:this._layoutDefinition=y.circleLayoutDefinition,this._paintDefinition=y.circlePaintDefinition}this._layoutProperties=this._parseLayout(this.layout),this._paintProperties=this._parsePaint(this.paint)}getFeatureFilter(){return void 0!==this._featureFilter?this._featureFilter:this._featureFilter=c.createFilter(this.filter)}getLayoutProperty(t){return this._layoutProperties[t]}getPaintProperty(t){return this._paintProperties[t]}getLayoutValue(t,i,e){let a;const o=this._layoutProperties[t];return o&&(a=o.getValue(i,e)),void 0===a&&(a=this._layoutDefinition[t].default),a}getPaintValue(t,i,e){let a;const o=this._paintProperties[t];return o&&(a=o.getValue(i,e)),void 0===a&&(a=this._paintDefinition[t].default),a}isPainterDataDriven(){const t=this._paintProperties;if(t)for(const i in t)if(t[i].isDataDriven)return!0;return!1}isIntersectingFeature(t,i,e,a,o,r,n){return!1}getFeatureInflatedBounds(t,i,e,a){return null}_parseLayout(t){const i={};for(const e in t){const a=this._layoutDefinition[e];a&&(i[e]=new P(a,t[e]))}return i}_parsePaint(t){const i={};for(const e in t){const a=this._paintDefinition[e];a&&(i[e]=new P(a,t[e]))}return i}computeAttributesKey(t,i,e,a){let o=0,r=0;for(const n of i){let t=3;if(n&&n!==a){const i=e[n],{isLayout:a,isOptional:o}=i,r=a?this.getLayoutProperty(n):this.getPaintProperty(n);t=r?.interpolator?2:r?.isDataDriven?1:o&&!r?3:0}r|=t<<o,o+=2}return r<<3|t}}class d extends m{constructor(t,i,e,a){super(t,i,e,a),this.backgroundMaterial=new n(this.computeAttributesKey(0,n.ATTRIBUTES,n.ATTRIBUTES_INFO))}}class _ extends m{constructor(t,i,e,a){super(t,i,e,a);const o=this.getPaintProperty("fill-color"),r=this.getPaintProperty("fill-opacity"),n=this.getPaintProperty("fill-pattern");this.hasDataDrivenColor=o?.isDataDriven,this.hasDataDrivenOpacity=r?.isDataDriven,this.hasDataDrivenFill=this.hasDataDrivenColor||this.hasDataDrivenOpacity||n?.isDataDriven;const s=this.getPaintProperty("fill-outline-color");this.outlineUsesFillColor=!s,this.hasDataDrivenOutlineColor=s?.isDataDriven,this.hasDataDrivenOutline=s?s.isDataDriven:!!o&&o.isDataDriven,this.hasDataDrivenOutline=(s?this.hasDataDrivenOutlineColor:this.hasDataDrivenColor)||this.hasDataDrivenOpacity,this.fillMaterial=new l(this.computeAttributesKey(1,l.ATTRIBUTES,l.ATTRIBUTES_INFO)),this.outlineMaterial=new h(this.computeAttributesKey(2,this.outlineUsesFillColor?h.ATTRIBUTES_FILL:h.ATTRIBUTES_OUTLINE,this.outlineUsesFillColor?h.ATTRIBUTES_INFO_FILL:h.ATTRIBUTES_INFO_OUTLINE),this.outlineUsesFillColor)}getFeatureInflatedBounds(t,i,e,a){const o=z(t);if(!o)return null;const r=this.getPaintValue("fill-translate",i,t),n=a*Math.max(r[0],r[1]);return o[0]-=n,o[2]-=n,o[1]+=n,o[3]+=n,o}isIntersectingFeature(t,a,n,s,l,h,u){const p=s.getGeometry();if(!p)return!1;const g=i/u.normalizationRatio;t=t/u.normalizationRatio+u.normalizationOffsetX,a=a/u.normalizationRatio+u.normalizationOffsetY;const c=e(this.getPaintValue("fill-translate",l,s),this.getPaintValue("fill-translate-anchor",l,s),h,i);t-=g*c.x,a-=g*c.y;return!!r(t,a,p)||o(t,a,p,g*n)}}class L extends m{constructor(t,i,e,a){super(t,i,e,a);const o=this.getPaintProperty("line-pattern");if(this.lineMaterial=new u(this.computeAttributesKey(3,u.ATTRIBUTES,u.ATTRIBUTES_INFO,o?"line-dasharray":"")),this.hasDataDrivenLine=this.getPaintProperty("line-blur")?.isDataDriven||this.getPaintProperty("line-color")?.isDataDriven||this.getPaintProperty("line-gap-width")?.isDataDriven||this.getPaintProperty("line-offset")?.isDataDriven||this.getPaintProperty("line-opacity")?.isDataDriven||this.getPaintProperty("line-pattern")?.isDataDriven||this.getPaintProperty("line-dasharray")?.isDataDriven||this.getLayoutProperty("line-cap")?.isDataDriven||this.getPaintProperty("line-width")?.isDataDriven,this.canUseThinTessellation=!1,!this.hasDataDrivenLine){const t=this.getPaintProperty("line-width");if(!t||"number"==typeof t&&.5*t<f){const t=this.getPaintProperty("line-offset");(!t||"number"==typeof t&&0===t)&&(this.canUseThinTessellation=!0)}}}getDashKey(t,i){let e;switch(i){case 0:default:e="Butt";break;case 1:e="Round";break;case 2:e="Square"}return`dasharray-[${t.toString()}]-${e}`}getFeatureInflatedBounds(t,i,e,a){const o=z(t);if(!o)return null;const r=this.getPaintValue("line-translate",i,t),n=a*Math.max(r[0],r[1]);o[0]-=n,o[2]-=n,o[1]+=n,o[3]+=n;const s=a*Math.abs(this.getPaintValue("line-offset",i,t)||0),l=a*(this.getPaintValue("line-width",i,t)/2);return o[0]-=s+l,o[1]-=s+l,o[2]+=s+l,o[3]+=s+l,o}isIntersectingFeature(t,r,n,s,l,h,u){let p=s.getGeometry();if(!p)return!1;const g=i/u.normalizationRatio;t=t/u.normalizationRatio+u.normalizationOffsetX,r=r/u.normalizationRatio+u.normalizationOffsetY;const c=e(this.getPaintValue("line-translate",l,s),this.getPaintValue("line-translate-anchor",l,s),h,i);t-=g*c.x,r-=g*c.y;const y=g*this.getPaintValue("line-offset",l,s)||0;0!==y&&(p=a(p,-y));const P=this.getPaintValue("line-width",l,s);return o(t,r,p,g*(n+P/2))}}class v extends m{constructor(t,i,e,a){super(t,i,e,a),this.iconMaterial=new p(this.computeAttributesKey(4,p.ATTRIBUTES,p.ATTRIBUTES_INFO)),this.textMaterial=new g(this.computeAttributesKey(6,g.ATTRIBUTES,g.ATTRIBUTES_INFO)),this.hasDataDrivenIcon=this.getPaintProperty("icon-color")?.isDataDriven||this.getPaintProperty("icon-halo-blur")?.isDataDriven||this.getPaintProperty("icon-halo-color")?.isDataDriven||this.getPaintProperty("icon-halo-width")?.isDataDriven||this.getPaintProperty("icon-opacity")?.isDataDriven||this.getLayoutProperty("icon-size")?.isDataDriven,this.hasDataDrivenText=this.getPaintProperty("text-color")?.isDataDriven||this.getPaintProperty("text-halo-blur")?.isDataDriven||this.getPaintProperty("text-halo-color")?.isDataDriven||this.getPaintProperty("text-halo-width")?.isDataDriven||this.getPaintProperty("text-opacity")?.isDataDriven||this.getLayoutProperty("text-size")?.isDataDriven}}class x extends m{constructor(t,i,e,a){super(t,i,e,a),this.circleMaterial=new s(this.computeAttributesKey(5,s.ATTRIBUTES,s.ATTRIBUTES_INFO))}getFeatureInflatedBounds(t,e,a,o){const r=z(t);if(!r)return null;const n=this.getPaintValue("circle-translate",e,t),s=Math.max(n[0],n[1]);r[0]-=s,r[2]-=s,r[1]+=s,r[3]+=s;const l=o*(i*(this.getPaintValue("circle-radius",e,t)+this.getPaintValue("circle-stroke-width",e,t))/2);return r[0]-=l,r[1]-=l,r[2]+=l,r[3]+=l,r}isIntersectingFeature(t,a,o,r,n,s,l){const h=r.getGeometry();if(!h)return!1;const u=i/l.normalizationRatio;t=t/l.normalizationRatio+l.normalizationOffsetX,a=a/l.normalizationRatio+l.normalizationOffsetY,o*=u;const p=e(this.getPaintValue("circle-translate",n,r),this.getPaintValue("circle-translate-anchor",n,r),s,u),g=u*(this.getPaintValue("circle-radius",n,r)+this.getPaintValue("circle-stroke-width",n,r));let c,y;for(const i of h)if(i)for(const e of i){c=e.x+p.x,y=e.y+p.y;if(Math.sqrt((t-c)*(t-c)+(a-y)*(a-y))-o<=g)return!0}return!1}}class V{constructor(t,i,e){let a;this.allowOverlap=t.getLayoutValue("icon-allow-overlap",i),this.ignorePlacement=t.getLayoutValue("icon-ignore-placement",i),this.keepUpright=t.getLayoutValue("icon-keep-upright",i),this.optional=t.getLayoutValue("icon-optional",i),this.rotationAlignment=t.getLayoutValue("icon-rotation-alignment",i),2===this.rotationAlignment&&(this.rotationAlignment=e?0:1),a=t.getLayoutProperty("icon-anchor"),a?.isDataDriven?this._anchorProp=a:this.anchor=t.getLayoutValue("icon-anchor",i),a=t.getLayoutProperty("icon-offset"),a?.isDataDriven?this._offsetProp=a:this.offset=t.getLayoutValue("icon-offset",i),a=t.getLayoutProperty("icon-padding"),a?.isDataDriven?this._paddingProp=a:this.padding=t.getLayoutValue("icon-padding",i),a=t.getLayoutProperty("icon-rotate"),a?.isDataDriven?this._rotateProp=a:this.rotate=t.getLayoutValue("icon-rotate",i),a=t.getLayoutProperty("icon-size"),a?.isDataDriven?this._sizeProp=a:this.size=t.getLayoutValue("icon-size",i)}update(t,i){this._anchorProp&&(this.anchor=this._anchorProp.getValue(t,i)),this._offsetProp&&(this.offset=this._offsetProp.getValue(t,i)),this._paddingProp&&(this.padding=this._paddingProp.getValue(t,i)),this._rotateProp&&(this.rotate=this._rotateProp.getValue(t,i)),this._sizeProp&&(this.size=this._sizeProp.getValue(t,i))}}class T{constructor(t,i,e){let a;this.allowOverlap=t.getLayoutValue("text-allow-overlap",i),this.ignorePlacement=t.getLayoutValue("text-ignore-placement",i),this.keepUpright=t.getLayoutValue("text-keep-upright",i),this.optional=t.getLayoutValue("text-optional",i),this.rotationAlignment=t.getLayoutValue("text-rotation-alignment",i),2===this.rotationAlignment&&(this.rotationAlignment=e?0:1),a=t.getLayoutProperty("text-anchor"),a?.isDataDriven?this._anchorProp=a:this.anchor=t.getLayoutValue("text-anchor",i),a=t.getLayoutProperty("text-justify"),a?.isDataDriven?this._justifyProp=a:this.justify=t.getLayoutValue("text-justify",i),a=t.getLayoutProperty("text-letter-spacing"),a?.isDataDriven?this._letterSpacingProp=a:this.letterSpacing=t.getLayoutValue("text-letter-spacing",i),a=t.getLayoutProperty("text-line-height"),a?.isDataDriven?this._lineHeightProp=a:this.lineHeight=t.getLayoutValue("text-line-height",i),a=t.getLayoutProperty("text-max-angle"),a?.isDataDriven?this._maxAngleProp=a:this.maxAngle=t.getLayoutValue("text-max-angle",i),a=t.getLayoutProperty("text-max-width"),a?.isDataDriven?this._maxWidthProp=a:this.maxWidth=t.getLayoutValue("text-max-width",i),a=t.getLayoutProperty("text-offset"),a?.isDataDriven?this._offsetProp=a:this.offset=t.getLayoutValue("text-offset",i),a=t.getLayoutProperty("text-padding"),a?.isDataDriven?this._paddingProp=a:this.padding=t.getLayoutValue("text-padding",i),a=t.getLayoutProperty("text-rotate"),a?.isDataDriven?this._rotateProp=a:this.rotate=t.getLayoutValue("text-rotate",i),a=t.getLayoutProperty("text-size"),a?.isDataDriven?this._sizeProp=a:this.size=t.getLayoutValue("text-size",i),a=t.getLayoutProperty("text-writing-mode"),a?.isDataDriven?this._writingModeProp=a:this.writingMode=t.getLayoutValue("text-writing-mode",i)}update(t,i){this._anchorProp&&(this.anchor=this._anchorProp.getValue(t,i)),this._justifyProp&&(this.justify=this._justifyProp.getValue(t,i)),this._letterSpacingProp&&(this.letterSpacing=this._letterSpacingProp.getValue(t,i)),this._lineHeightProp&&(this.lineHeight=this._lineHeightProp.getValue(t,i)),this._maxAngleProp&&(this.maxAngle=this._maxAngleProp.getValue(t,i)),this._maxWidthProp&&(this.maxWidth=this._maxWidthProp.getValue(t,i)),this._offsetProp&&(this.offset=this._offsetProp.getValue(t,i)),this._paddingProp&&(this.padding=this._paddingProp.getValue(t,i)),this._rotateProp&&(this.rotate=this._rotateProp.getValue(t,i)),this._sizeProp&&(this.size=this._sizeProp.getValue(t,i)),this._writingModeProp&&(this.writingMode=this._writingModeProp.getValue(t,i))}}function z(i){const e=i?.getGeometry();if(null==e)return null;let a=1/0,o=1/0,r=-1/0,n=-1/0;for(const t of e)if(t)for(const i of t)a=Math.min(a,i.x),o=Math.min(o,i.y),r=Math.max(r,i.x),n=Math.max(n,i.y);return t(a,o,r,n)}export{d as BackgroundStyleLayer,x as CircleStyleLayer,_ as FillStyleLayer,V as IconLayout,D as IndexItem,L as LineStyleLayer,m as StyleLayer,v as SymbolStyleLayer,T as TextLayout};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import"../../../../core/has.js";import"../../../../core/Logger.js";import{disposeMaybe as e,destroyMaybe as t}from"../../../../core/maybe.js";import{brushes as s}from"../brushes.js";import r from"../vectorTiles/shaders/VTLMaterialManager.js";import{BitBlitRenderer as i}from"./BitBlitRenderer.js";import{backbufferStencilVisible as n}from"./definitions.js";import a from"./MaterialManager.js";import o from"./TextureManager.js";import{TextureUploadManager as l}from"./TextureUploadManager.js";import{WorldExtentRenderer as h}from"./WorldExtentClipRenderer.js";import{BlendEffect as f}from"./effects/BlendEffect.js";import{FeatureEffect as c}from"./effects/FeatureEffect.js";import d from"./effects/HighlightEffect.js";import{HittestEffect as p}from"./effects/HittestEffect.js";import{EffectManager as u}from"./effects/post-processing/EffectManager.js";import{SimpleMesh as b}from"./meshing/SimpleMesh.js";import m from"./painter/RenderPass.js";import{TechniqueProgramCache as _}from"./shaderGraph/techniques/TechniqueProgramCache.js";import{SizedDepthStencilFormat as g}from"../../../webgl/enums.js";import{FramebufferObject as w}from"../../../webgl/FramebufferObject.js";import{Renderbuffer as S}from"../../../webgl/Renderbuffer.js";import{RenderbufferDescriptor as M}from"../../../webgl/RenderbufferDescriptor.js";import{TextureDescriptor as E}from"../../../webgl/TextureDescriptor.js";class P{constructor(e,t){this.context=e,this._currentPipelineStateNeedsUpdate=!1,this._blitRenderer=new i,this._worldExtentRenderer=new h,this._brushCache=new Map,this._lastWidth=null,this._lastHeight=null,this._vtlMaterialManager=new r,this._blendEffect=new f,this._stencilBuf=null,this._prevBeforeLayerFBOStack=[],this._fboPool=[],this.effects={highlight:new d,hittest:new p,insideEffect:new c("inside"),outsideEffect:new c("outside")},this._programCache=new _,this.materialManager=new a(e),this.textureManager=new o(t),this.textureUploadManager=new l(t),this._effectsManager=new u,this._quadMesh=b.fromVertexStream(e,[0,0,1,0,0,1,1,1])}dispose(){if(this._programCache.destroy(),this.materialManager.dispose(),this.textureManager.dispose(),this.textureUploadManager.destroy(),this._blitRenderer=e(this._blitRenderer),this._worldExtentRenderer=e(this._worldExtentRenderer),this._quadMesh=t(this._quadMesh),this._brushCache&&(this._brushCache.forEach(e=>e.dispose()),this._brushCache.clear(),this._brushCache=null),this._fbos){let e;for(e in this._fbos)this._fbos[e]&&this._fbos[e].dispose()}for(const e of this._fboPool)e.dispose();if(this._fboPool.length=0,this.effects){let e;for(e in this.effects)this.effects[e]&&this.effects[e].dispose()}this._effectsManager.dispose(),this._blendEffect.dispose(this.context),this._vtlMaterialManager=e(this._vtlMaterialManager)}clearShaderCache(){this._programCache.destroy(),this._programCache=new _}get blitRenderer(){return this._blitRenderer}get vectorTilesMaterialManager(){return this._vtlMaterialManager}get quadMesh(){return this._quadMesh}getFbos(){if(!this._fbos)throw new Error("InternalError: Painter FBOs not initialized");return this._fbos}acquireFbo(e,t){let s;if(this._fboPool.length>0)s=this._fboPool.pop();else{const r=new E(e,t);r.samplingMode=9728,r.wrapMode=33071,s=new w(this.context,r,this._stencilBuf)}return s.width===e&&s.height===t||s.resize(e,t),s}releaseFbo(e){this._fboPool.push(e)}getSharedStencilBuffer(){return this._stencilBuf}beforeRenderPhases(e,t,s){const{context:r}=e;this._worldExtentRenderer.render(e,t,s);const{width:i,height:n}=r.getViewport();if(this.updateFBOs(i,n),this._prevFBO=r.getBoundFramebufferObject(),r.bindFramebuffer(this.getFbos().output),r.setColorMask(!0,!0,!0,!0),null!=t){const{r:e,g:s,b:i,a:n}=t;r.setClearColor(n*e/255,n*s/255,n*i/255,n)}else r.setClearColor(0,0,0,0);r.setDepthWriteEnabled(!0),r.setClearDepth(1),r.clear(16640),r.setDepthWriteEnabled(!1)}afterRenderPhases(e){const{context:t}=e;t.bindFramebuffer(this._prevFBO),t.setStencilFunction(514,n,255),t.setStencilTestEnabled(!0),t.setDepthTestEnabled(!1),this.blitTexture(t,this.getFbos().output.colorTexture,9728)}beforeRenderLayer(e,t,s){const{context:r,blendMode:i,effects:n,drawPhase:a,requireFBO:o}=e;if(r.setClearColor(0,0,0,0),o||C(a,i,n,s)){const e=r.getBoundFramebufferObject();this._prevBeforeLayerFBOStack.push(e);const{width:t,height:s}=r.getViewport(),i=this.acquireFbo(t,s);r.bindFramebuffer(i),r.setColorMask(!0,!0,!0,!0),r.setClearColor(0,0,0,0),r.setDepthWriteEnabled(!0),r.setClearDepth(1),r.clear(16640),r.setDepthWriteEnabled(!1)}r.setDepthWriteEnabled(!1),r.setDepthTestEnabled(!1),r.setStencilTestEnabled(!0),r.setClearStencil(t),r.setStencilWriteMask(255),r.clear(1024)}afterRenderLayer(e,t){const{context:s,blendMode:r,effects:i,requireFBO:n,drawPhase:a}=e;if(n||C(a,r,i,t)){const n=s.getBoundFramebufferObject();null!=i&&i.length>0&&1===a&&(s.setColorMask(!0,!0,!0,!0),this._applyEffects(e,i,n)),s.bindFramebuffer(this._prevBeforeLayerFBOStack.pop()),s.setStencilTestEnabled(!1),s.setStencilWriteMask(0),s.setBlendingEnabled(!0),s.setBlendFunctionSeparate(1,771,1,771),s.setColorMask(!0,!0,!0,!0);const o=null==r||16===a||2===a||128===a?"normal":r;this._blendEffect.draw(e,n.colorTexture,9728,o,t),this.releaseFbo(n)}}renderObject(e,t,r,i){const n=s[r];if(!n)return;let a=this._brushCache.get(n);void 0===a&&(a=new n,this._brushCache.set(n,a)),a.prepareState(e),a.draw(e,t,i)}renderObjects(e,t,r,i){const n=s[r];if(!n)return;let a=this._brushCache.get(n);void 0===a&&(a=new n,this._brushCache.set(n,a)),a.drawMany(e,t,i)}registerRenderPass(e){const t=e.brushes.map(e=>(this._brushCache.has(e)||this._brushCache.set(e,new e),this._brushCache.get(e)));return new m(t,e)}blitTexture(e,t,s,r=1){e.setBlendingEnabled(!0),e.setBlendFunctionSeparate(1,771,1,771),e.setColorMask(!0,!0,!0,!0),this._blitRenderer.render(e,t,s,r),this._currentPipelineStateNeedsUpdate=!0}getPostProcessingEffects(e){return this._effectsManager.getPostProcessingEffects(e)}updateFBOs(e,t){if(e!==this._lastWidth||t!==this._lastHeight){if(this._lastWidth=e,this._lastHeight=t,this._fbos){let s;for(s in this._fbos)this._fbos[s].resize(e,t);return}const s=new E(e,t);s.samplingMode=9728,s.wrapMode=33071;const r=new M(g.DEPTH24_STENCIL8,e,t);this._stencilBuf=new S(this.context,r),this._fbos={output:new w(this.context,s,this._stencilBuf),effect0:new w(this.context,s,this._stencilBuf)}}}_applyEffects(e,t,s){const{context:r}=e,i=this._effectsManager.getPostProcessingEffects(t);for(const{postProcessingTechnique:n,effect:a}of i)r.bindFramebuffer(s),n.render(e,{layerFBO:s,effect:a});this._currentPipelineStateNeedsUpdate=!0}setShader(e){return this._shaderState={shader:e.shader,uniforms:e.uniforms,defines:e.defines,optionalAttributes:e.optionalAttributes,useComputeBuffer:e.useComputeBuffer??!1},this._shaderState}setPipelineState(e){e!==this._currentPipelineState&&(this._currentPipelineState=e,this._currentPipelineStateNeedsUpdate=!0)}submitDraw(e,t,s){let r=s?.stencilRef;if(!this._shaderState)return null;const{shader:i,uniforms:n,defines:a,optionalAttributes:o}=this._shaderState,l=e.context,h=t.getAttributePrecisionPackFactors(),f=this._programCache.getProgram(i,h,n,a??{},o??{});if(f.setUniforms(n),f.bind(l),this.updatePipelineState(l),null==r){const e=t.getStencilReference();null!=e&&(r=e)}return null!=r&&this.setStencilRef(l,r),t.draw(e,i.locationInfo),f.cleanupTemporaryTextures(),{vertexShader:f.vertexShader,fragmentShader:f.fragmentShader}}submitDrawMesh(e,t,s,r){this.submitDrawMeshUntyped(e,t,s,r)}submitDrawMeshUntyped(e,t,s,r){const i=r?.parts,n=r?.stencilRef,{shader:a,uniforms:o,defines:l,optionalAttributes:h}=this.setShader(t),f=this._programCache.getProgram(a,{},o,l??{},h??{});if(f.setUniforms(o),f.bind(e),this.updatePipelineState(e),this.setStencilRef(e,n),i)for(const c of i)s.bind(e,t.shader.locationInfo,c),s.draw(e);else for(let c=0;c<s.parts.length;c++)s.bind(e,t.shader.locationInfo,c),s.draw(e);s.unbind(e),f.cleanupTemporaryTextures()}updatePipelineState(e){this._currentPipelineStateNeedsUpdate&&(this._currentPipelineStateNeedsUpdate=!1,this._updatePipelineState(e))}_updatePipelineState(e){if(null==this._currentPipelineState)throw new Error("Pipeline state not defined. Call setPipelineState before calling submitDraw ");const{color:t,depth:s,stencil:r}=this._currentPipelineState;if(t){const{blendMode:s,write:r}=t;switch(e.setColorMask(...r),e.setBlendingEnabled("none"!==s),e.setBlendEquation(32774),s){case"composite":e.setBlendFunctionSeparate(1,771,1,771);break;case"additive":e.setBlendFunctionSeparate(1,1,1,1);break;case"custom":{const{blendParameters:s}=t,{dstAlpha:r,dstRGB:i,srcAlpha:n,srcRGB:a}=s;e.setBlendFunctionSeparate(a,i,n,r);break}case"delete":e.setBlendEquation(32779),e.setBlendFunctionSeparate(1,771,1,771);break;case"none":e.setBlendingEnabled(!1)}}else e.setColorMask(!1,!1,!1,!1);if(s){const{test:t,write:r}=s;r?(e.setDepthWriteEnabled(!0),e.setDepthRange(r.zNear,r.zFar)):e.setDepthWriteEnabled(!1),t?(e.setDepthTestEnabled(!0),e.setDepthFunction(t)):e.setDepthTestEnabled(!1)}else e.setDepthTestEnabled(!1),e.setDepthWriteEnabled(!1);if(r){const{test:t,write:s}=r;if(t){const{op:s}=t;e.setStencilTestEnabled(!0),e.setStencilOpSeparate(1032,s.fail,s.zFail,s.zPass)}else e.setStencilTestEnabled(!1);if(s){const{mask:t}=s;e.setStencilWriteMask(t)}else e.setStencilWriteMask(0)}else e.setStencilTestEnabled(!1),e.setStencilWriteMask(0)}setStencilRef(e,t){if(null==this._currentPipelineState)throw new Error("Pipeline state not defined. Call setPipelineState before calling submitDraw ");const{stencil:s}=this._currentPipelineState;if(s){const{test:r}=s;if(r){const{compare:s,mask:i}=r;if(null==t)throw new Error("InternalError: Stencil reference expected for target but not defined");e.setStencilFunctionSeparate(1032,s,t,i)}}}}function C(e,t,s,r){return 4!==e&&2!==e&&16!==e&&128!==e&&(1!==r||null!=t&&"normal"!==t||null!=s&&s.length>0)}export{P as default};
5
+ import"../../../../core/has.js";import{disposeMaybe as e,destroyMaybe as t}from"../../../../core/maybe.js";import{brushes as s}from"../brushes.js";import{BitBlitRenderer as r}from"./BitBlitRenderer.js";import{backbufferStencilVisible as i}from"./definitions.js";import n from"./MaterialManager.js";import{RenderingDevice as o}from"./RenderingDevice.js";import h from"./TextureManager.js";import{TextureUploadManager as a}from"./TextureUploadManager.js";import{WorldExtentRenderer as f}from"./WorldExtentClipRenderer.js";import{BlendEffect as l}from"./effects/BlendEffect.js";import{FeatureEffect as c}from"./effects/FeatureEffect.js";import d from"./effects/HighlightEffect.js";import{HittestEffect as u}from"./effects/HittestEffect.js";import{EffectManager as b}from"./effects/post-processing/EffectManager.js";import{SimpleMesh as p}from"./meshing/SimpleMesh.js";import _ from"./painter/RenderPass.js";import{SizedDepthStencilFormat as g}from"../../../webgl/enums.js";import{FramebufferObject as m}from"../../../webgl/FramebufferObject.js";import{Renderbuffer as w}from"../../../webgl/Renderbuffer.js";import{RenderbufferDescriptor as M}from"../../../webgl/RenderbufferDescriptor.js";import{TextureDescriptor as E}from"../../../webgl/TextureDescriptor.js";class C{constructor(e,t){this.context=e,this._blitRenderer=new r,this._worldExtentRenderer=new f,this._brushCache=new Map,this._lastWidth=null,this._lastHeight=null,this._blendEffect=new l,this._stencilBuf=null,this._prevBeforeLayerFBOStack=[],this._fboPool=[],this.effects={highlight:new d,hittest:new u,insideEffect:new c("inside"),outsideEffect:new c("outside")},this.materialManager=new n(e),this.textureManager=new h(t),this.textureUploadManager=new a(t),this._effectsManager=new b,this._quadMesh=p.fromVertexStream(e,[0,0,1,0,0,1,1,1]),this._renderingDevice=new o}dispose(){if(this.materialManager.dispose(),this.textureManager.dispose(),this.textureUploadManager.destroy(),this._blitRenderer=e(this._blitRenderer),this._worldExtentRenderer=e(this._worldExtentRenderer),this._quadMesh=t(this._quadMesh),this._brushCache&&(this._brushCache.forEach(e=>e.dispose()),this._brushCache.clear(),this._brushCache=null),this._fbos){let e;for(e in this._fbos)this._fbos[e]&&this._fbos[e].dispose()}for(const e of this._fboPool)e.dispose();if(this._fboPool.length=0,this.effects){let e;for(e in this.effects)this.effects[e]&&this.effects[e].dispose()}this._effectsManager.dispose(),this._blendEffect.dispose(this.context),this._renderingDevice.dispose()}get blitRenderer(){return this._blitRenderer}get quadMesh(){return this._quadMesh}getFbos(){if(!this._fbos)throw new Error("InternalError: Painter FBOs not initialized");return this._fbos}acquireFbo(e,t){let s;if(this._fboPool.length>0)s=this._fboPool.pop();else{const r=new E(e,t);r.samplingMode=9728,r.wrapMode=33071,s=new m(this.context,r,this._stencilBuf)}return s.width===e&&s.height===t||s.resize(e,t),s}releaseFbo(e){this._fboPool.push(e)}getSharedStencilBuffer(){return this._stencilBuf}beforeRenderPhases(e,t,s){const{context:r}=e;this._worldExtentRenderer.render(e,t,s);const{width:i,height:n}=r.getViewport();if(this.updateFBOs(i,n),this._prevFBO=r.getBoundFramebufferObject(),r.bindFramebuffer(this.getFbos().output),r.setColorMask(!0,!0,!0,!0),null!=t){const{r:e,g:s,b:i,a:n}=t;r.setClearColor(n*e/255,n*s/255,n*i/255,n)}else r.setClearColor(0,0,0,0);r.setDepthWriteEnabled(!0),r.setClearDepth(1),r.clear(16640),r.setDepthWriteEnabled(!1)}afterRenderPhases(e){const{context:t}=e;t.bindFramebuffer(this._prevFBO),t.setStencilFunction(514,i,255),t.setStencilTestEnabled(!0),t.setDepthTestEnabled(!1),this.blitTexture(t,this.getFbos().output.colorTexture,9728)}beforeRenderLayer(e,t,s){const{context:r,blendMode:i,effects:n,drawPhase:o,requireFBO:h}=e;if(r.setClearColor(0,0,0,0),h||D(o,i,n,s)){const e=r.getBoundFramebufferObject();this._prevBeforeLayerFBOStack.push(e);const{width:t,height:s}=r.getViewport(),i=this.acquireFbo(t,s);r.bindFramebuffer(i),r.setColorMask(!0,!0,!0,!0),r.setClearColor(0,0,0,0),r.setDepthWriteEnabled(!0),r.setClearDepth(1),r.clear(16640),r.setDepthWriteEnabled(!1)}r.setDepthWriteEnabled(!1),r.setDepthTestEnabled(!1),r.setStencilTestEnabled(!0),r.setClearStencil(t),r.setStencilWriteMask(255),r.clear(1024)}afterRenderLayer(e,t){const{context:s,blendMode:r,effects:i,requireFBO:n,drawPhase:o}=e;if(n||D(o,r,i,t)){const n=s.getBoundFramebufferObject();null!=i&&i.length>0&&1===o&&(s.setColorMask(!0,!0,!0,!0),this._applyEffects(e,i,n)),s.bindFramebuffer(this._prevBeforeLayerFBOStack.pop()),s.setStencilTestEnabled(!1),s.setStencilWriteMask(0),s.setBlendingEnabled(!0),s.setBlendFunctionSeparate(1,771,1,771),s.setColorMask(!0,!0,!0,!0);const h=null==r||16===o||2===o||128===o?"normal":r;this._blendEffect.draw(e,n.colorTexture,9728,h,t),this.releaseFbo(n)}}renderObject(e,t,r,i){const n=s[r];if(!n)return;let o=this._brushCache.get(n);void 0===o&&(o=new n,this._brushCache.set(n,o)),o.prepareState(e),o.draw(e,t)}renderObjects(e,t,r,i){const n=s[r];if(!n)return;let o=this._brushCache.get(n);void 0===o&&(o=new n,this._brushCache.set(n,o)),o.drawMany(e,t,i)}registerRenderPass(e){const t=e.brushes.map(e=>(this._brushCache.has(e)||this._brushCache.set(e,new e),this._brushCache.get(e)));return new _(t,e)}blitTexture(e,t,s,r=1){e.setBlendingEnabled(!0),e.setBlendFunctionSeparate(1,771,1,771),e.setColorMask(!0,!0,!0,!0),this._blitRenderer.render(e,t,s,r),this._renderingDevice.setPipelineStateNeedsUpdate(!0)}getPostProcessingEffects(e){return this._effectsManager.getPostProcessingEffects(e)}updateFBOs(e,t){if(e!==this._lastWidth||t!==this._lastHeight){if(this._lastWidth=e,this._lastHeight=t,this._fbos){let s;for(s in this._fbos)this._fbos[s].resize(e,t);return}const s=new E(e,t);s.samplingMode=9728,s.wrapMode=33071;const r=new M(g.DEPTH24_STENCIL8,e,t);this._stencilBuf=new w(this.context,r),this._fbos={output:new m(this.context,s,this._stencilBuf),effect0:new m(this.context,s,this._stencilBuf)}}}_applyEffects(e,t,s){const{context:r}=e,i=this._effectsManager.getPostProcessingEffects(t);for(const{postProcessingTechnique:n,effect:o}of i)r.bindFramebuffer(s),n.render(e,{layerFBO:s,effect:o});this._renderingDevice.setPipelineStateNeedsUpdate(!0)}setShader(e){return this._renderingDevice.setShader(e)}clearShaderCache(){this._renderingDevice.clearShaderCache()}setPipelineState(e){return this._renderingDevice.setPipelineState(e)}getPipelineState(){return this._renderingDevice.getPipelineState()}submitDraw(e,t,s){return this._renderingDevice.submitDraw(e,t,s)}submitDrawMesh(e,t,s,r){this._renderingDevice.submitDrawMesh(e,t,s,r)}submitDrawMeshUntyped(e,t,s,r){this._renderingDevice.submitDrawMeshUntyped(e,t,s,r)}updatePipelineState(e){return this._renderingDevice.updatePipelineState(e)}setStencilRef(e,t){return this._renderingDevice.setStencilRef(e,t)}}function D(e,t,s,r){return 4!==e&&2!==e&&16!==e&&128!==e&&(1!==r||null!=t&&"normal"!==t||null!=s&&s.length>0)}export{C as default};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
+ */
5
+ import"../../../../core/has.js";import"../../../../core/Logger.js";import{TechniqueProgramCache as e}from"./shaderGraph/techniques/TechniqueProgramCache.js";class t{constructor(){this._currentPipelineStateNeedsUpdate=!1,this._programCache=new e}dispose(){this._programCache.destroy()}clearShaderCache(){this._programCache.destroy(),this._programCache=new e}setShader(e){return this._shaderState={shader:e.shader,uniforms:e.uniforms,defines:e.defines,optionalAttributes:e.optionalAttributes,useComputeBuffer:e.useComputeBuffer??!1},this._shaderState}setPipelineState(e){e!==this._currentPipelineState&&(this._currentPipelineState=e,this._currentPipelineStateNeedsUpdate=!0)}updatePipelineState(e){this._currentPipelineStateNeedsUpdate&&(this._currentPipelineStateNeedsUpdate=!1,this._updatePipelineState(e))}getPipelineState(){return this._currentPipelineState}setStencilRef(e,t){if(null==this._currentPipelineState)throw new Error("Pipeline state not defined. Call setPipelineState before calling submitDraw ");const{stencil:s}=this._currentPipelineState;if(s){const{test:r}=s;if(r){const{compare:s,mask:i}=r;if(null==t)throw new Error("InternalError: Stencil reference expected for target but not defined");e.setStencilFunctionSeparate(1032,s,t,i)}}}setPipelineStateNeedsUpdate(e){this._currentPipelineStateNeedsUpdate=e}getShaderState(){return this._shaderState}getProgramCache(){return this._programCache}submitDraw(e,t,s){let r=s?.stencilRef;if(!this._shaderState)return null;const{shader:i,uniforms:n,defines:a,optionalAttributes:l}=this._shaderState,o=e.context,c=t.getAttributePrecisionPackFactors(),d=this._programCache.getProgram(i,c,n,a??{},l??{});if(d.setUniforms(n),d.bind(o),this.updatePipelineState(o),null==r){const e=t.getStencilReference();null!=e&&(r=e)}return null!=r&&this.setStencilRef(o,r),t.draw(e,i.locationInfo),d.cleanupTemporaryTextures(),{vertexShader:d.vertexShader,fragmentShader:d.fragmentShader}}submitDrawMesh(e,t,s,r){this.submitDrawMeshUntyped(e,t,s,r)}submitDrawMeshUntyped(e,t,s,r){const i=r?.parts,n=r?.stencilRef,{precisionFactors:a}=t,{shader:l,uniforms:o,defines:c,optionalAttributes:d}=this.setShader(t),p=this._programCache.getProgram(l,a||{},o,c??{},d??{});if(p.setUniforms(o),p.bind(e),this.updatePipelineState(e),this.setStencilRef(e,n),i)for(const h of i)s.bind(e,t.shader.locationInfo,h),s.draw(e);else for(let h=0;h<s.parts.length;h++)s.bind(e,t.shader.locationInfo,h),s.draw(e);s.unbind(e),p.cleanupTemporaryTextures()}_updatePipelineState(e){if(null==this._currentPipelineState)throw new Error("Pipeline state not defined. Call setPipelineState before calling submitDraw ");const{color:t,depth:s,stencil:r}=this._currentPipelineState;if(t){const{blendMode:s,write:r}=t;switch(e.setColorMask(...r),e.setBlendingEnabled("none"!==s),e.setBlendEquation(32774),s){case"composite":e.setBlendFunctionSeparate(1,771,1,771);break;case"additive":e.setBlendFunctionSeparate(1,1,1,1);break;case"custom":{const{blendParameters:s}=t,{dstAlpha:r,dstRGB:i,srcAlpha:n,srcRGB:a}=s;e.setBlendFunctionSeparate(a,i,n,r);break}case"delete":e.setBlendEquation(32779),e.setBlendFunctionSeparate(1,771,1,771);break;case"none":e.setBlendingEnabled(!1)}}else e.setColorMask(!1,!1,!1,!1);if(s){const{test:t,write:r}=s;r?(e.setDepthWriteEnabled(!0),e.setDepthRange(r.zNear,r.zFar)):e.setDepthWriteEnabled(!1),t?(e.setDepthTestEnabled(!0),e.setDepthFunction(t)):e.setDepthTestEnabled(!1)}else e.setDepthTestEnabled(!1),e.setDepthWriteEnabled(!1);if(r){const{test:t,write:s}=r;if(t){const{op:s}=t;e.setStencilTestEnabled(!0),e.setStencilOpSeparate(1032,s.fail,s.zFail,s.zPass)}else e.setStencilTestEnabled(!1);if(s){const{mask:t}=s;e.setStencilWriteMask(t)}else e.setStencilWriteMask(0)}else e.setStencilTestEnabled(!1),e.setStencilWriteMask(0)}}export{t as RenderingDevice};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import"../../../../core/has.js";import{Container as e}from"../Container.js";import{clipTechnique as r}from"./shaderGraph/techniques/clip/ClipTechnique.js";class s extends e{renderChildren(e){e.painter.setPipelineState(null),null==this._renderPasses&&(this._renderPasses=this.prepareRenderPasses(e.painter));for(const t of this._clips)r.render(e,t);for(const r of this._renderPasses)try{r.render(e)}catch(s){}}prepareRenderPasses(e){return[]}}export{s as default};
5
+ import"../../../../core/has.js";import{Container as e}from"../Container.js";import{clipTechnique as r}from"./shaderGraph/techniques/clip/ClipTechnique.js";class s extends e{renderChildren(e){const{painter:s}=e;s.setPipelineState(null),null==this._renderPasses&&(this._renderPasses=this.prepareRenderPasses(e.painter));for(const n of this._clips)r.render(e,n);for(const r of this._renderPasses)try{r.render(e)}catch(t){}}prepareRenderPasses(e){return[]}}export{s as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{toConst as r}from"../../../../../core/compilerUtils.js";import{BufferObject as e}from"../../../../webgl/BufferObject.js";import"../../../../webgl/FramebufferObject.js";import"../../../../webgl/Program.js";import"../../../../../core/has.js";import"../../../../webgl/Renderbuffer.js";import"../../../../webgl/Texture.js";import{VertexArrayObject as t}from"../../../../webgl/VertexArrayObject.js";import{dataSizeInBytes as s}from"./definitions.js";import{VertexBuffer as i}from"../../../../webgl/VertexBuffer.js";class o{constructor(r,t){this._boundPart=null,this.vertexBuffers=new Map,this.indexBuffers=new Map,this.groups=[];for(const e in t.vertex){const{data:s,layout:o}=t.vertex[e],n=new i(r,o,s);this.vertexBuffers.set(e,n)}for(const s in t.index){const{data:i}=t.index[s],o=e.createIndex(r,35044,i);this.indexBuffers.set(s,o)}for(const e of t.groups)this.groups.push({...e,vertexArrays:new Map});this.parts=t.parts}bind(e,s,i){this._boundPart=i;const{group:o}=this.parts[this._boundPart],n=this.groups[o];if(!n)throw new Error(`Missing group ${o}.`);let f=n.vertexArrays.get(s.stringHash);if(!f){const i=r(new Set(s.locations.keys())),o=n.index?this.indexBuffers.get(n.index):null,a=new Map;for(const[r,e]of this.vertexBuffers){e.layout.filter(r=>i.has(r.name)).length>0&&a.set(r,e)}f=new t(e,a,o),n.vertexArrays.set(s.stringHash,f)}e.bindVAO(f)}draw(r){if(null==this._boundPart)throw new Error("Mesh.bind() has not been called.");const{start:e,count:t}=this.parts[this._boundPart],{group:i}=this.parts[this._boundPart],{primitive:o,index:n}=this.groups[i];if(n){const i=this.indexBuffers.get(n);if(!i)throw new Error(`Missing index buffer "${n}".`);const{indexType:f}=i;if(!f)throw new Error("Buffer type error.");r.drawElements(o,t,f,e*s[f])}else r.drawArrays(o,e,t)}unbind(r){this._boundPart=null,r.bindVAO(null)}destroy(){this.groups.forEach(({vertexArrays:r})=>r.forEach(r=>r.disposeVAOOnly())),this.vertexBuffers.forEach(r=>r.dispose()),this.indexBuffers.forEach(r=>r.dispose())}}export{o as Mesh};
5
+ import{toConst as r}from"../../../../../core/compilerUtils.js";import{BufferObject as e}from"../../../../webgl/BufferObject.js";import"../../../../webgl/FramebufferObject.js";import"../../../../webgl/Program.js";import"../../../../../core/has.js";import"../../../../webgl/Renderbuffer.js";import"../../../../webgl/Texture.js";import{VertexArrayObject as t}from"../../../../webgl/VertexArrayObject.js";import{dataSizeInBytes as s}from"./definitions.js";import{VertexBuffer as i}from"../../../../webgl/VertexBuffer.js";class o{constructor(r,t){this._boundPart=null,this.vertexBuffers=new Map,this.indexBuffers=new Map,this.groups=[];for(const e in t.vertex){const{data:s,layout:o}=t.vertex[e],n=new i(r,o,s);this.vertexBuffers.set(e,n)}for(const s in t.index){const{data:i}=t.index[s],o=e.createIndex(r,35044,i);this.indexBuffers.set(s,o)}for(const e of t.groups)this.groups.push({...e,vertexArrays:new Map});this.parts=t.parts}bind(e,s,i){this._boundPart=i;const{group:o}=this.parts[this._boundPart],n=this.groups[o];if(!n)throw new Error(`Missing group ${o}.`);let f=n.vertexArrays.get(s.stringHash);if(!f){const{locations:i,stringHash:o}=s,a=r(new Set(i.keys())),u=n.index?this.indexBuffers.get(n.index):null,h=new Map;for(const[r,e]of this.vertexBuffers){e.layout.filter(r=>a.has(r.name)).length>0&&h.set(r,e)}f=new t(e,h,u,void 0,i),n.vertexArrays.set(o,f)}e.bindVAO(f)}draw(r){if(null==this._boundPart)throw new Error("Mesh.bind() has not been called.");const{start:e,count:t}=this.parts[this._boundPart],{group:i}=this.parts[this._boundPart],{primitive:o,index:n}=this.groups[i];if(n){const i=this.indexBuffers.get(n);if(!i)throw new Error(`Missing index buffer "${n}".`);const{indexType:f}=i;if(!f)throw new Error("Buffer type error.");r.drawElements(o,t,f,e*s[f])}else r.drawArrays(o,e,t)}unbind(r){this._boundPart=null,r.bindVAO(null)}destroy(){this.groups.forEach(({vertexArrays:r})=>r.forEach(r=>r.disposeVAOOnly())),this.vertexBuffers.forEach(r=>r.dispose()),this.indexBuffers.forEach(r=>r.dispose())}}export{o as Mesh};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- const n=new Float32Array(1),t=new Uint32Array(n.buffer);function r(n,t,r){return Math.round(Math.max(Math.min(n,r),t))}function u(n){return r(n,-128,127)}function o(n){return r(n,-32768,32767)}function e(n){return r(n,-2147483648,2147483647)}function c(n){return r(n,0,255)}function f(n){return r(n,0,65535)}function i(n){return r(n,0,4294967295)}function a(r){return n[0]=r,t[0]}function h(r){return t[0]=r,n[0]}function l(n){return[255&n,(65280&n)>>>8,(16711680&n)>>>16,(4278190080&n)>>>24]}function M(n,t){return 15&n|(15&t)<<4}function s(n,t){return 65535&n|t<<16}function m(n,t,r,u){return 255&n|(255&t)<<8|(255&r)<<16|u<<24}function w(n,t,r){return 255&n|(255&t)<<8|r<<16}function x(n){return 0|n}function y(n){const t=a(n),r=t>>>31;let u=t>>>23&255,o=8388607&t;return u-=127,u>15?r<<15|31744:u<-25?0:(u<-14&&(o+=8388608,o/=2**(-14-u),u=-15),u+=15,o/=8192,o=A(o,1023),r<<15|u<<10|o)}function A(n,t){const r=Math.floor(n),u=n-r;return r<t&&(u>.5||.5===u&&r%2==1)?r+1:r}function b(n){let t=n>>>15,r=n>>10&31,u=1023&n;return t=t?-1:1,r-=15,u/=1024,r>-15?u+=1:r=-14,t*2**r*u}export{b as fromUint16,o as i16,s as i1616to32,e as i32,u as i8,w as i8816to32,m as i8888to32,x as numTo32,h as toFloat32,y as toUint16,a as toUint32,f as u16,i as u32,l as u32to4Xu8,M as u4u4to8,c as u8};
5
+ const n=new Float32Array(1),t=new Uint32Array(n.buffer);function r(n,t,r){return Math.round(Math.max(Math.min(n,r),t))}function u(n){return r(n,-128,127)}function o(n){return r(n,-32768,32767)}function e(n){return r(n,-2147483648,2147483647)}function c(n){return r(n,0,255)}function f(n){return r(n,0,65535)}function i(n){return r(n,0,4294967295)}function a(r){return n[0]=r,t[0]}function h(r){return t[0]=r,n[0]}function l(n){return[255&n,(65280&n)>>>8,(16711680&n)>>>16,(4278190080&n)>>>24]}function M(n,t){return 15&n|(15&t)<<4}function s(n,t){return 65535&n|t<<16}function m(n,t,r,u){return 255&n|(255&t)<<8|(255&r)<<16|u<<24}function w(n,t,r){return 255&n|(255&t)<<8|r<<16}function x(n,t){return 255&n|(255&t)<<8}function y(n){return 0|n}function A(n){const t=a(n),r=t>>>31;let u=t>>>23&255,o=8388607&t;return u-=127,u>15?r<<15|31744:u<-25?0:(u<-14&&(o+=8388608,o/=2**(-14-u),u=-15),u+=15,o/=8192,o=b(o,1023),r<<15|u<<10|o)}function b(n,t){const r=Math.floor(n),u=n-r;return r<t&&(u>.5||.5===u&&r%2==1)?r+1:r}function d(n){let t=n>>>15,r=n>>10&31,u=1023&n;return t=t?-1:1,r-=15,u/=1024,r>-15?u+=1:r=-14,t*2**r*u}export{d as fromUint16,o as i16,s as i1616to32,e as i32,u as i8,w as i8816to32,m as i8888to32,x as i88to16,y as numTo32,h as toFloat32,A as toUint16,a as toUint32,f as u16,i as u32,l as u32to4Xu8,M as u4u4to8,c as u8};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as t}from"tslib";import{ShaderPrimitiveNode as e,cloneShaderNode as n,ShaderConditionNode as r,ShaderPropertyAccessNode as i,ShaderFunctionNode as c,ShaderBlockNode as u,ShaderPropertyAccess2DNode as s,ShaderScopeNode as o}from"./ShaderGraphNode.js";var h,l,a,f,p,d,y,w,m,v,b,g,x,I;function E(t){switch(t.type){case"uint":return C;case"uvec2":return X;case"uvec3":return Y;case"uvec4":return _;default:throw new Error("Found unexpected type")}}function $(t){switch(t.type){case"float":return G;case"vec2":return H;case"vec3":return A;case"vec4":return V;default:throw new Error("Found unexpected type")}}function z(t){switch(t.type){case"int":return C;case"ivec2":return X;case"ivec3":return Y;case"ivec4":return _;default:throw new Error("Found unexpected type")}}function T(t){switch(t.type){case"float":return W;case"vec2":return Z;case"vec3":return tt;case"vec4":return et;default:throw new Error("Found unexpected type")}}function N(t){switch(t.type){case"bool":case"float":case"int":case"uint":return J;case"bvec2":case"vec2":case"ivec2":case"uvec2":return K;case"bvec3":case"vec3":case"ivec3":case"uvec3":return L;case"bvec4":case"vec4":case"ivec4":case"uvec4":return Q;default:throw new Error("Unable to handle type")}}function D(t){switch(t.type){case"bool":case"bvec2":case"bvec3":case"bvec4":return J;case"float":case"vec2":case"vec3":case"vec4":return C;case"int":case"ivec2":case"ivec3":case"ivec4":return W;case"uint":case"uvec2":case"uvec3":case"uvec4":return G;default:throw new Error("Unable to handle type")}}function F(t){switch(t.type){case"float":case"int":case"uint":case"bool":case"sampler2D":return 1;case"vec2":case"ivec2":case"uvec2":case"bvec2":return 2;case"vec3":case"ivec3":case"uvec3":case"bvec3":return 3;case"vec4":case"ivec4":case"uvec4":case"bvec4":case"mat2":return 4;case"mat3":return 9;case"mat4":return 16;case"array":case"array-2d":return t.size*F(t.elementType)}}function k(t){const e=[["float","vec2","vec3","vec4"],["int","ivec2","ivec3","ivec4"],["uint","uvec2","uvec3","uvec4"],["bool","bvec2","bvec3","bvec4"]];for(const n of e)if(n.includes(t))return n.map(t=>ct[t]);throw new Error("Unable to find type family")}function M(t){return new Proxy(t,{get(e,n){if("constructor"===n)return new Proxy(e.constructor,{construct:(t,e,n)=>M(new t(...e))});if(n in e)return e[n];if("string"==typeof n){const e=k(t.type);return dt(t,n,e[n.length-1])}}})}function S(t){return new Proxy(t,{construct:(t,e,n)=>M(new t(...e))})}function R(t){return new Proxy(t,{get(e,n){if(n in e)return e[n];if("string"==typeof n){const e=parseInt(n,10);if(!isNaN(e))return dt(t,`[${e}]`,t.elementType.constructor)}}})}function j(t){return new Proxy(t,{construct:(t,e,n)=>R(new t(...e))})}class P extends Error{}let B=class extends e{static{h=this}static{this.type="array"}constructor(t,e){super(),this.elementType=t,this.size=e,this.children=[],this.type="array"}clone(){const t=new h(this.elementType,this.size);return super.cloneInto(t),t}get(t,e){const n=new W(t),r=null!=e?new W(e):null;if(null!=r){return yt(this,n,r,D(this.elementType.constructor))}return dt(this,n,this.elementType.constructor)}last(){return this.get(this.size-1)}first(){return this.get(0)}findIndex(t,e,n){return Et(this,t,e,n)}glslFindIndex(t,e,n){return $t(this,t,e,n)}static ofType(t,e){const n={construct:(n,r)=>new h(new t,e)};return new Proxy(h,n)}};B=h=t([j],B);class q extends e{static{this.type="array-2d"}constructor(t,e,n,r=!1){super(),this.elementType=t,this.xSize=e,this.ySize=n,this.isRowMajor=r,this.children=[],this.type="array-2d"}clone(){const t=new q(this.elementType,this.xSize,this.ySize,this.isRowMajor);return super.cloneInto(t),t}get size(){return this.xSize*this.ySize}get(t,e){return this.isRowMajor?this._getRowMajor(t,e):this._getColumnMajor(t,e)}_getColumnMajor(t,e){const n=new W(t);return dt(this,new W(e).add(n.multiply(this.xSize)),this.elementType.constructor)}_getRowMajor(t,e){const n=new W(t),r=new W(e);return dt(this,n.add(r.multiply(this.ySize)),this.elementType.constructor)}static ofType(t,e,n,r=!1){return new Proxy(B,{construct:(i,c)=>new q(new t,e,n,r)})}}class U extends e{constructor(){super(...arguments),this.type="sampler2D",this.children=[]}static{this.type="sampler2D"}clone(){const t=new U;return t.children=this.children.map(n),super.cloneInto(t),t}}class C extends e{static{this.type="float"}constructor(t){super(),this.type="float",this.children=[t]}clone(){const t=new C(n(this.children[0]));return super.cloneInto(t),t}multiply(t){return Dt(this,"number"==typeof t?O(t,C):t)}divide(t){return Ft(this,"number"==typeof t?O(t,C):t)}add(t){return kt(this,"number"==typeof t?O(t,C):t)}subtract(t){return Mt(this,"number"==typeof t?O(t,C):t)}}let X=class extends e{static{l=this}static{this.type="vec2"}constructor(t,e){super(),this.type="vec2",this.children=[t,e].filter(t=>null!=t)}clone(){const t=new l(n(this.children[0]),n(this.children[1]));return super.cloneInto(t),t}get 0(){return dt(this,"[0]",C)}get 1(){return dt(this,"[1]",C)}get 2(){throw new P}get 3(){throw new P}multiply(t){return Dt(this,"number"==typeof t?O(t,C):t)}divide(t){return Ft(this,"number"==typeof t?O(t,C):t)}add(t){return kt(this,"number"==typeof t?O(t,C):t)}subtract(t){return Mt(this,"number"==typeof t?O(t,C):t)}};X=l=t([S],X);let Y=class extends e{static{a=this}static{this.type="vec3"}constructor(t,e,n){super(),this.type="vec3",this.children=[t,e,n].filter(t=>null!=t)}get 0(){return dt(this,"[0]",C)}get 1(){return dt(this,"[1]",C)}get 2(){return dt(this,"[2]",C)}get 3(){throw new P}clone(){const t=new a(n(this.children[0]),n(this.children[1]),n(this.children[2]));return super.cloneInto(t),t}multiply(t){return Dt(this,"number"==typeof t?O(t,C):t)}divide(t){return Ft(this,"number"==typeof t?O(t,C):t)}add(t){return kt(this,"number"==typeof t?O(t,C):t)}subtract(t){return Mt(this,"number"==typeof t?O(t,C):t)}};Y=a=t([S],Y);let _=class extends e{static{f=this}static{this.type="vec4"}constructor(t,e,n,r){super(),this.type="vec4",this.children=[t,e,n,r].filter(t=>null!=t)}clone(){const t=new f(n(this.children[0]),n(this.children[1]),n(this.children[2]),n(this.children[3]));return super.cloneInto(t),t}get 0(){return dt(this,"[0]",C)}get 1(){return dt(this,"[1]",C)}get 2(){return dt(this,"[2]",C)}get 3(){return dt(this,"[3]",C)}multiply(t){return Dt(this,"number"==typeof t?O(t,C):t)}divide(t){return Ft(this,"number"==typeof t?O(t,C):t)}add(t){return kt(this,"number"==typeof t?O(t,C):t)}subtract(t){return Mt(this,"number"==typeof t?O(t,C):t)}};_=f=t([S],_);let G=class extends e{static{p=this}static{this.type="uint"}constructor(t){super(),this.type="uint",this.children=[t]}clone(){const t=new p(n(this.children[0]));return super.cloneInto(t),t}multiply(t){return Dt(this,O(t,p))}add(t){return kt(this,O(t,p))}subtract(t){return Mt(this,O(t,p))}divide(t){return Ft(this,O(t,p))}};G=p=t([S],G);let H=class extends e{static{d=this}static{this.type="uvec2"}constructor(t,e){super(),this.type="uvec2",this.children=[t,e].filter(t=>null!=t)}clone(){const t=new d(n(this.children[0]),n(this.children[1]));return super.cloneInto(t),t}get 0(){return dt(this,"[0]",W)}get 1(){return dt(this,"[1]",W)}get 2(){throw new P}get 3(){throw new P}multiply(t){return Dt(this,"number"==typeof t?O(t,G):t)}divide(t){return Ft(this,"number"==typeof t?O(t,G):t)}add(t){return kt(this,"number"==typeof t?O(t,G):t)}subtract(t){return Mt(this,"number"==typeof t?O(t,G):t)}};H=d=t([S],H);let A=class extends e{static{y=this}static{this.type="uvec3"}constructor(t,e,n){super(),this.type="uvec3",this.children=[t,e,n].filter(t=>null!=t)}clone(){const t=new y(n(this.children[0]),n(this.children[1]),n(this.children[2]));return super.cloneInto(t),t}get 0(){return dt(this,"[0]",G)}get 1(){return dt(this,"[1]",G)}get 2(){return dt(this,"[2]",G)}get 3(){throw new P}multiply(t){return Dt(this,"number"==typeof t?O(t,G):t)}divide(t){return Ft(this,"number"==typeof t?O(t,G):t)}add(t){return kt(this,"number"==typeof t?O(t,G):t)}subtract(t){return Mt(this,"number"==typeof t?O(t,G):t)}};A=y=t([S],A);let V=class extends e{static{w=this}static{this.type="uvec4"}constructor(t,e,n,r){super(),this.type="uvec4",this.children=[t,e,n,r].filter(t=>null!=t)}clone(){const t=new w(n(this.children[0]),n(this.children[1]),n(this.children[2]),n(this.children[3]));return super.cloneInto(t),t}get 0(){return dt(this,"[0]",G)}get 1(){return dt(this,"[1]",G)}get 2(){return dt(this,"[2]",G)}get 3(){return dt(this,"[3]",G)}multiply(t){return Dt(this,"number"==typeof t?O(t,G):t)}divide(t){return Ft(this,"number"==typeof t?O(t,G):t)}add(t){return kt(this,"number"==typeof t?O(t,G):t)}subtract(t){return Mt(this,"number"==typeof t?O(t,G):t)}};V=w=t([S],V);class J extends e{static{this.type="bool"}constructor(t){super(),this.type="bool",this.children=[t]}and(t){return Lt(this,t)}or(t){return At(this,t)}xor(t){return Jt(this,t)}clone(){const t=new J(n(this.children[0]));return super.cloneInto(t),t}}let K=class extends e{static{m=this}static{this.type="bvec2"}constructor(t,e){super(),this.type="bvec2",this.children=[t,e].filter(t=>null!=t)}all(){return te(this)}any(){return ee(this)}clone(){const t=new m(n(this.children[0]),n(this.children[1]));return super.cloneInto(t),t}};K=m=t([S],K);let L=class extends e{static{v=this}static{this.type="bvec3"}constructor(t,e,n){super(),this.type="bvec3",this.children=[t,e,n].filter(t=>null!=t)}all(){return te(this)}any(){return ee(this)}clone(){const t=new v(n(this.children[0]),n(this.children[1]),n(this.children[2]));return super.cloneInto(t),t}};function O(t,e){if("number"==typeof t){return new e(t)}return t}L=v=t([S],L);let Q=class extends e{static{b=this}static{this.type="bvec4"}constructor(t,e,n,r){super(),this.type="bvec4",this.children=[t,e,n,r].filter(t=>null!=t)}all(){return te(this)}any(){return ee(this)}clone(){const t=new b(n(this.children[0]),n(this.children[1]),n(this.children[2]),n(this.children[3]));return super.cloneInto(t),t}};Q=b=t([S],Q);class W extends e{static{this.type="int"}constructor(t){super(),this.type="int",this.children=[t]}multiply(t){return Dt(this,O(t,W))}add(t){return kt(this,O(t,W))}subtract(t){return Mt(this,O(t,W))}divide(t){return Ft(this,O(t,W))}clone(){const t=new W(n(this.children[0]));return super.cloneInto(t),t}}let Z=class extends e{static{g=this}static{this.type="ivec2"}constructor(t,e){super(),this.type="ivec2",this.children=[t,e].filter(t=>null!=t)}clone(){const t=new g(n(this.children[0]),n(this.children[1]));return super.cloneInto(t),t}get 0(){return dt(this,"[0]",W)}get 1(){return dt(this,"[1]",W)}get 2(){throw new P}get 3(){throw new P}multiply(t){return Dt(this,"number"==typeof t?O(t,W):t)}divide(t){return Ft(this,"number"==typeof t?O(t,W):t)}add(t){return kt(this,"number"==typeof t?O(t,W):t)}subtract(t){return Mt(this,"number"==typeof t?O(t,W):t)}};Z=g=t([S],Z);let tt=class extends e{static{x=this}static{this.type="ivec3"}constructor(t,e,n){super(),this.type="ivec3",this.children=[t,e,n].filter(t=>null!=t)}clone(){const t=new x(n(this.children[0]),n(this.children[1]),n(this.children[2]));return super.cloneInto(t),t}get 0(){return dt(this,"[0]",W)}get 1(){return dt(this,"[1]",W)}get 2(){return dt(this,"[2]",W)}get 3(){throw new P}multiply(t){return Dt(this,"number"==typeof t?O(t,W):t)}divide(t){return Ft(this,"number"==typeof t?O(t,W):t)}add(t){return kt(this,"number"==typeof t?O(t,W):t)}subtract(t){return Mt(this,"number"==typeof t?O(t,W):t)}};tt=x=t([S],tt);let et=class extends e{static{I=this}static{this.type="ivec4"}constructor(t,e,n,r){super(),this.type="ivec4",this.children=[t,e,n,r].filter(t=>null!=t)}clone(){const t=new I(n(this.children[0]),n(this.children[1]),n(this.children[2]),n(this.children[3]));return super.cloneInto(t),t}get 0(){return dt(this,"[0]",W)}get 1(){return dt(this,"[1]",W)}get 2(){return dt(this,"[2]",W)}get 3(){return dt(this,"[3]",W)}multiply(t){return Dt(this,"number"==typeof t?O(t,W):t)}divide(t){return Ft(this,"number"==typeof t?O(t,W):t)}add(t){return kt(this,"number"==typeof t?O(t,W):t)}subtract(t){return Mt(this,"number"==typeof t?O(t,W):t)}};et=I=t([S],et);class nt extends e{static{this.type="mat2"}constructor(t,e,n,r){super(),this.type="mat2",this.children=[t,e,n,r]}clone(){const t=new nt(n(this.children[0]),n(this.children[1]),n(this.children[2]),n(this.children[3]));return super.cloneInto(t),t}get(t,e){return yt(this,new W(t),new W(e),C)}multiply(t){return Dt(this,t)}}class rt extends e{static{this.type="mat3"}static identity(){return new rt(1,0,0,0,1,0,0,0,1)}static fromRotation(t){const e=un(t),n=oe(t);return new rt(n,e,0,gt(e),n,0,0,0,1)}constructor(t,e,n,r,i,c,u,s,o){super(),this.type="mat3",this.children=[t,e,n,r,i,c,u,s,o]}add(t){return kt(this,t)}multiply(t){return Dt(this,t)}get(t,e){return yt(this,new W(t),new W(e),C)}clone(){const t=new rt(n(this.children[0]),n(this.children[1]),n(this.children[2]),n(this.children[3]),n(this.children[4]),n(this.children[5]),n(this.children[6]),n(this.children[7]),n(this.children[8]));return super.cloneInto(t),t}}class it extends e{static{this.type="mat4"}static identity(){return new it(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)}constructor(t,e,n,r,i,c,u,s,o,h,l,a,f,p,d,y){super(),this.type="mat4",this.children=[t,e,n,r,i,c,u,s,o,h,l,a,f,p,d,y]}static fromColumns(t,e,n,r){return new it(t.x,t.y,t.z,t.w,e.x,e.y,e.z,e.w,n.x,n.y,n.z,n.w,r.x,r.y,r.z,r.w)}multiply(t){return Dt(this,t)}get(t,e){return yt(this,new W(t),new W(e),C)}clone(){const t=new it(n(this.children[0]),n(this.children[1]),n(this.children[2]),n(this.children[3]),n(this.children[4]),n(this.children[5]),n(this.children[6]),n(this.children[7]),n(this.children[8]),n(this.children[9]),n(this.children[10]),n(this.children[11]),n(this.children[12]),n(this.children[13]),n(this.children[14]),n(this.children[15]));return super.cloneInto(t),t}}const ct={float:C,vec2:X,vec3:Y,vec4:_,int:W,ivec2:Z,ivec3:tt,ivec4:et,uint:G,uvec2:H,uvec3:A,uvec4:V,bool:J,bvec2:K,bvec3:L,bvec4:Q},ut=(...t)=>new W(...t),st=(...t)=>new C(...t),ot=(...t)=>new X(...t),ht=(...t)=>new Y(...t),lt=(...t)=>new _(...t),at=(...t)=>new nt(...t),ft=(...t)=>new rt(...t),pt=(...t)=>new it(...t);function dt(t,e,n){const r=new n(new i(e,t,n));return r.isImplicit=!0,r}function yt(t,e,n,r){const i=new r(new s(e,n,t,r));return i.isImplicit=!0,i}function wt(t,e,n,r=null){if(r){const i=new r,u=new r(new c(t,[e,n],!0,!1,i));return u.isImplicit=!0,u}if("float"===e.type||"int"===e.type){const r=new n.constructor(new c(t,[e,n],!0,!1,n.constructor));return r.isImplicit=!0,r}if(("mat2"===e.type||"mat3"===e.type||"mat4"===e.type)&&"float"!==n.type){const r=new n.constructor(new c(t,[e,n],!0,!1,n.constructor));return r.isImplicit=!0,r}const i=new e.constructor(new c(t,[e,n],!0,!1,e.constructor));return i.isImplicit=!0,i}function mt(t,e,n=e.constructor){const r=new n(new c(t,[e],!1,!1,n));return r.isImplicit=!0,r}function vt(t,e,n,r=e.constructor){const i=new r(new c(t,[e,n],!1,!1,r));return i.isImplicit=!0,i}function bt(t,e,n,r,i=e.constructor){const u=new i(new c(t,[e,n,r],!1,!1,i));return u.isImplicit=!0,u}function gt(t){return Dt(t,st(-1))}function xt(t,e,n,r){return new e(new u(t,e,n,r))}function It(t,e){const n="function"==typeof t?t():t,r=new n.constructor(new o(n).setDebugName(e));return r.isImplicit=!0,r}function Et(t,e,n=0,r=t.size){const i=new W(n).setMutable().setDebugName("FindIndexIterator"),c=e(t.get(i)).setDebugName("FindIndexPredicate"),u=xt({iter:i},W,c,({out:t,iter:e,subgraph:n})=>`\n${t} = -1;\n\nfor (; ${e} < ${r}; ${e}++) {\n\n${n.body}\n\n if (${n.varName}) {\n ${t} = ${e};\n break;\n }\n\n}\n`).setDebugName("FindIndexBlock");return u}function $t(t,e,n=0,r=t.size){const i=xt({array:t},W,null,({out:t,array:i})=>`\n${t} = -1;\nfor (int i = ${n}; i < ${r}; i++) {\n bool condition;\n ${e({array:i,i:"i",out:"condition"})}\n if (condition) {\n ${t} = i;\n break;\n }\n}\n`).setDebugName("GlslFindIndexBlock");return i}function zt(t,e,n){const i="function"==typeof e?e():e,c="function"==typeof n?n():n,u=new i.constructor(new r(t,i,c));return u.isImplicit=!0,u}function Tt(...t){const e=t.map(([t,e])=>"function"==typeof e?[t,e()]:[t,e]),n=e[0][1].constructor,r=e.findIndex(t=>!0===t[0]);if(-1===r)throw new Error("A cond must have a fallthrough case with `true`/; ");const i=e.slice(0,r),c=e[r][1],u=new n(i.reduceRight((t,e)=>zt(e[0],e[1],t),c));return u.isImplicit=!0,u}function Nt(t,e){const n=new e.constructor(new r(t,e,null));return n.isImplicit=!0,n}function Dt(t,e){return wt("*",t,e)}function Ft(t,e){return wt("/",t,e)}function kt(t,e){return wt("+",t,e)}function Mt(t,e){return wt("-",t,e)}function St(t,e){return wt("%",t,e)}function Rt(t,e){return wt("<<",t,e)}function jt(t,e){return wt(">>",t,e)}function Pt(t,e){return wt("&",t,e)}function Bt(t,e){return wt("|",t,e)}function qt(t,e){return wt("^",t,e)}function Ut(t){return mt("~",t)}function Ct(t,e){return wt("==",t,e,J)}function Xt(t,e){return wt("!=",t,e,J)}function Yt(t,e){return wt("<",t,e,J)}function _t(t,e){return wt("<=",t,e,J)}function Gt(t,e){return wt(">",t,e,J)}function Ht(t,e){return wt(">=",t,e,J)}function At(...t){return t.length<=1?t[0]:t.slice(1).reduce((t,e)=>Vt(t,e),t[0])}function Vt(t,e){return wt("||",t,e,J)}function Jt(...t){return t.length<=1?t[0]:t.slice(1).reduce((t,e)=>Kt(t,e),t[0])}function Kt(t,e){return wt("^^",t,e,J)}function Lt(...t){return t.length<=1?t[0]:t.slice(1).reduce((t,e)=>Ot(t,e),t[0])}function Ot(t,e){return wt("&&",t,e,J)}function Qt(t){return mt("abs",t)}function Wt(t){return mt("acos",t)}function Zt(t){return mt("acosh",t)}function te(t){return mt("all",t,J)}function ee(t){return mt("any",t,J)}function ne(t){return mt("asin",t)}function re(t){return mt("asinh",t)}function ie(t,e){return null==e?mt("atan",t):vt("atan",t,e,t.constructor)}function ce(t){return mt("atanh",t)}function ue(t){return mt("ceil",t)}function se(t,e,n){return bt("clamp",t,e,n,t.constructor)}function oe(t){return mt("cos",t)}function he(t){return mt("cosh",t)}function le(t,e){return vt("cross",t,e,t.constructor)}function ae(t){return mt("dFdX",t)}function fe(t){return mt("dFdY",t)}function pe(t){return mt("degrees",t)}function de(t){return mt("determinant",t,C)}function ye(t,e){return vt("distance",t,e,C)}function we(t,e){return vt("dot",t,e,C)}function me(t,e){return vt("equal",t,e,N(t))}function ve(t,e){return vt("greaterThan",t,e,N(t))}function be(t,e){return vt("greaterThanEqual",t,e,N(t))}function ge(t){return mt("exp",t)}function xe(t){return mt("exp2",t)}function Ie(t,e,n){return bt("faceforward",t,e,n)}function Ee(t){return mt("floatBitsToInt",t,T(t))}function $e(t){return mt("floatBitsToUint",t,$(t))}function ze(t){return mt("floor",t)}function Te(t){return mt("fract",t)}function Ne(t){return mt("fwidth",t)}function De(t){return mt("intBitsToFloat",t,z(t))}function Fe(t){return mt("uintBitsToFloat",t,E(t))}function ke(t){return mt("inverse",t,C)}function Me(t){return mt("inversesqrt",t)}function Se(t){return mt("isinf",t,N(t))}function Re(t){return mt("isnan",t,N(t))}function je(t){return mt("length",t,C)}function Pe(t,e){return vt("lessThan",t,e,N(t))}function Be(t,e){return vt("lessThanEqual",t,e,N(t))}function qe(t){return mt("log",t)}function Ue(t){return mt("log2",t)}function Ce(t,e){return vt("matrixCompMult",t,e)}function Xe(t,e){return vt("max",t,e)}function Ye(t,e){return vt("min",t,e)}function _e(t,e,n){return bt("mix",t,e,n)}function Ge(t,e){return vt("mod",t,e)}function He(t,e){throw new Error("modf not implemented")}function Ae(t){return mt("normalize",t)}function Ve(t){return"bool"===t.type?mt("!",t):mt("not",t)}function Je(t,e){return vt("notEqual",t,e,N(t))}function Ke(t,e){throw new Error("Impl type?")}function Le(t){return mt("packHalf2x16",t,G)}function Oe(t){return mt("packUnorm2x16",t,G)}function Qe(t){return mt("packSnorm2x16",t,G)}function We(t,e){return vt("pow",t,e)}function Ze(t){return mt("radians",t)}function tn(t,e){return vt("reflect",t,e)}function en(t,e,n){return bt("refract",t,e,n)}function nn(t){return mt("round",t)}function rn(t){return mt("roundEven",t)}function cn(t){return mt("sign",t)}function un(t){return mt("sin",t)}function sn(t){return mt("sinh",t)}function on(t,e,n){return bt("smoothstep",t,e,n)}function hn(t){return mt("sqrt",t)}function ln(t,e){return vt("step",t,e,e.constructor)}function an(t){return mt("tan",t)}function fn(t){return mt("tanh",t)}function pn(t,e,n){return bt("texelFetch",t,e,n,_)}function dn(t,e,n,r){throw new Error("Impl type")}function yn(t,e,n){throw new Error("Impl type")}function wn(t,e){return vt("texture",t,e,_)}function mn(t,e,n,r){throw new Error("Impl type")}function vn(t,e,n,r,i){throw new Error("Impl type")}function bn(t,e,n){throw new Error("Impl type")}function gn(t,e,n,r){throw new Error("Impl type")}function xn(t,e,n,r){throw new Error("Impl type")}function In(t,e,n){throw new Error("Impl type")}function En(t,e,n,r){throw new Error("Impl type")}function $n(t,e,n,r,i){throw new Error("Impl type")}function zn(t,e,n){throw new Error("Impl type")}function Tn(t,e,n,r){throw new Error("Impl type")}function Nn(t,e,n,r){throw new Error("Impl type")}function Dn(t,e){throw new Error("Impl type")}function Fn(t){return mt("transpose",t)}function kn(t){return mt("trunc",t)}function Mn(t){return mt("unpackHalf2x16",t,X)}function Sn(t){return mt("unpackUnorm2x16",t,X)}function Rn(t){return mt("unpackSnorm2x16",t,X)}function jn(t,e){const{initialValue:n,xRange:r,yRange:i,callback:c}=e,[u,s]=r,[o,h]=i,l=new W(0).setMutable().setDebugName("iterX"),a=new W(0).setMutable().setDebugName("iterY"),f=n.setMutable().setDebugName("accumulator"),p=c(f,t.get(l,a),l,a).setDebugName("callback"),d=xt({iterX:l,iterY:a,accumulator:f},n.constructor,p,({out:t,iterX:e,iterY:n,accumulator:r,subgraph:i})=>`\nfor (${n} = ${o}; ${n} < ${h}; ${n}++) {\n for (${e} = ${u}; ${e} < ${s}; ${e}++) {\n\n ${i.body}\n\n ${r} = ${i.varName};\n }\n}\n${t} = ${r};\n`).setDebugName("reduce2DBody");return d}export{K as BVec2,L as BVec3,Q as BVec4,J as Bool,B as FixedArray,q as FixedArray2D,C as Float,Z as IVec2,tt as IVec3,et as IVec4,W as Int,nt as Mat2,rt as Mat3,it as Mat4,U as Sampler2D,G as UInt,H as UVec2,A as UVec3,V as UVec4,X as Vec2,Y as Vec3,_ as Vec4,Vt as _or,Kt as _xor,Qt as abs,Wt as acos,Zt as acosh,kt as add,te as all,Lt as and,ee as any,ne as asin,re as asinh,ie as atan,ce as atanh,Pt as bitAnd,Ut as bitNot,Bt as bitOr,jt as bitRShift,Rt as bitShift,qt as bitXor,xt as block,ue as ceil,se as clamp,Tt as cond,oe as cos,he as cosh,le as cross,ae as dFdx,fe as dFdy,dt as definePropertyAccess,yt as definePropertyAccess2D,pe as degrees,de as determinant,ye as distance,Ft as divide,we as dot,Ct as equal,me as equalComponent,ge as exp,xe as exp2,Ie as faceforward,Et as findIndex,st as float,Ee as floatBitsToInt,$e as floatBitsToUint,ze as floor,Te as fract,Ne as fwidth,F as getTypeElementLengthForType,$t as glslFindIndex,Gt as greaterThan,ve as greaterThanComponent,Ht as greaterThanEqual,be as greaterThanEqualComponent,zt as ifElse,ut as int,De as intBitsToFloat,St as intMod,ke as inverse,Me as inversesqrt,Se as isinf,Re as isnan,je as length,Yt as lessThan,Pe as lessThanComponent,_t as lessThanEqual,Be as lessThanEqualComponent,qe as log,Ue as log2,at as mat2,ft as mat3,pt as mat4,Ce as matrixCompMult,Xe as max,Ye as min,_e as mix,Ge as mod,He as modf,Dt as multiply,It as namedScope,gt as negate,Ae as normalize,Ve as not,Xt as notEqual,Je as notEqualComponent,At as or,Ke as outerProduct,Le as packHalf2x16,Qe as packSnorm2x16,Oe as packUnorm2x16,We as pow,Ze as radians,jn as reduce2D,tn as reflect,en as refract,nn as round,rn as roundEven,cn as sign,un as sin,sn as sinh,on as smoothstep,hn as sqrt,ln as step,Mt as subtract,an as tan,fn as tanh,pn as texelFetch,dn as texelFetchOffset,yn as texture,wn as texture2D,mn as textureGrad,vn as textureGradOffset,bn as textureLod,gn as textureLodOffset,xn as textureOffset,In as textureProj,En as textureProjGrad,$n as textureProjGradOffset,zn as textureProjLod,Tn as textureProjLodOffset,Nn as textureProjOffset,Dn as textureSize,T as transformFloatToInt,$ as transformFloatToUInt,z as transformIntToFloat,N as transformTypeToBooleanType,E as transformUIntToFloat,Fn as transpose,kn as trunc,Fe as uintBitsToFloat,Mn as unpackHalf2x16,Rn as unpackSnorm2x16,Sn as unpackUnorm2x16,ot as vec2,ht as vec3,lt as vec4,Nt as when,Jt as xor};
5
+ import{__decorate as t}from"tslib";import{ShaderPrimitiveNode as e,cloneShaderNode as n,ShaderConditionNode as r,ShaderPropertyAccessNode as i,ShaderFunctionNode as c,ShaderBlockNode as u,ShaderPropertyAccess2DNode as s,ShaderScopeNode as o}from"./ShaderGraphNode.js";var h,l,a,f,p,d,y,w,m,v,b,g,x,I;function E(t){switch(t.type){case"uint":return C;case"uvec2":return X;case"uvec3":return Y;case"uvec4":return _;default:throw new Error("Found unexpected type")}}function $(t){switch(t.type){case"float":return G;case"vec2":return H;case"vec3":return A;case"vec4":return V;default:throw new Error("Found unexpected type")}}function z(t){switch(t.type){case"int":return C;case"ivec2":return X;case"ivec3":return Y;case"ivec4":return _;default:throw new Error("Found unexpected type")}}function T(t){switch(t.type){case"float":return W;case"vec2":return Z;case"vec3":return tt;case"vec4":return et;default:throw new Error("Found unexpected type")}}function N(t){switch(t.type){case"bool":case"float":case"int":case"uint":return J;case"bvec2":case"vec2":case"ivec2":case"uvec2":return K;case"bvec3":case"vec3":case"ivec3":case"uvec3":return L;case"bvec4":case"vec4":case"ivec4":case"uvec4":return Q;default:throw new Error("Unable to handle type")}}function D(t){switch(t.type){case"bool":case"bvec2":case"bvec3":case"bvec4":return J;case"float":case"vec2":case"vec3":case"vec4":return C;case"int":case"ivec2":case"ivec3":case"ivec4":return W;case"uint":case"uvec2":case"uvec3":case"uvec4":return G;default:throw new Error("Unable to handle type")}}function F(t){switch(t.type){case"float":case"int":case"uint":case"bool":case"sampler2D":return 1;case"vec2":case"ivec2":case"uvec2":case"bvec2":return 2;case"vec3":case"ivec3":case"uvec3":case"bvec3":return 3;case"vec4":case"ivec4":case"uvec4":case"bvec4":case"mat2":return 4;case"mat3":return 9;case"mat4":return 16;case"array":case"array-2d":return t.size*F(t.elementType)}}function k(t){const e=[["float","vec2","vec3","vec4"],["int","ivec2","ivec3","ivec4"],["uint","uvec2","uvec3","uvec4"],["bool","bvec2","bvec3","bvec4"]];for(const n of e)if(n.includes(t))return n.map(t=>ct[t]);throw new Error("Unable to find type family")}function M(t){return new Proxy(t,{get(e,n){if("constructor"===n)return new Proxy(e.constructor,{construct:(t,e,n)=>M(new t(...e))});if(n in e)return e[n];if("string"==typeof n){const e=k(t.type);return dt(t,n,e[n.length-1])}}})}function S(t){return new Proxy(t,{construct:(t,e,n)=>M(new t(...e))})}function R(t){return new Proxy(t,{get(e,n){if(n in e)return e[n];if("string"==typeof n){const e=parseInt(n,10);if(!isNaN(e))return dt(t,`[${e}]`,t.elementType.constructor)}}})}function j(t){return new Proxy(t,{construct:(t,e,n)=>R(new t(...e))})}class P extends Error{}let B=class extends e{static{h=this}static{this.type="array"}constructor(t,e){super(),this.elementType=t,this.size=e,this.children=[],this.type="array"}clone(){const t=new h(this.elementType,this.size);return super.cloneInto(t),t}get(t,e){const n=new W(t),r=null!=e?new W(e):null;if(null!=r){return yt(this,n,r,D(this.elementType.constructor))}return dt(this,n,this.elementType.constructor)}last(){return this.get(this.size-1)}first(){return this.get(0)}findIndex(t,e,n){return Et(this,t,e,n)}glslFindIndex(t,e,n){return $t(this,t,e,n)}static ofType(t,e){const n={construct:(n,r)=>new h(new t,e)};return new Proxy(h,n)}};B=h=t([j],B);class q extends e{static{this.type="array-2d"}constructor(t,e,n,r=!1){super(),this.elementType=t,this.xSize=e,this.ySize=n,this.isRowMajor=r,this.children=[],this.type="array-2d"}clone(){const t=new q(this.elementType,this.xSize,this.ySize,this.isRowMajor);return super.cloneInto(t),t}get size(){return this.xSize*this.ySize}get(t,e){return this.isRowMajor?this._getRowMajor(t,e):this._getColumnMajor(t,e)}_getColumnMajor(t,e){const n=new W(t);return dt(this,new W(e).add(n.multiply(this.xSize)),this.elementType.constructor)}_getRowMajor(t,e){const n=new W(t),r=new W(e);return dt(this,n.add(r.multiply(this.ySize)),this.elementType.constructor)}static ofType(t,e,n,r=!1){return new Proxy(B,{construct:(i,c)=>new q(new t,e,n,r)})}}class U extends e{constructor(){super(...arguments),this.type="sampler2D",this.children=[]}static{this.type="sampler2D"}clone(){const t=new U;return t.children=this.children.map(n),super.cloneInto(t),t}}class C extends e{static{this.type="float"}constructor(t){super(),this.type="float",this.children=[t]}clone(){const t=new C(n(this.children[0]));return super.cloneInto(t),t}multiply(t){return Dt(this,"number"==typeof t?O(t,C):t)}divide(t){return Ft(this,"number"==typeof t?O(t,C):t)}add(t){return kt(this,"number"==typeof t?O(t,C):t)}subtract(t){return Mt(this,"number"==typeof t?O(t,C):t)}}let X=class extends e{static{l=this}static{this.type="vec2"}constructor(t,e){super(),this.type="vec2",this.children=[t,e].filter(t=>null!=t)}clone(){const t=new l(n(this.children[0]),n(this.children[1]));return super.cloneInto(t),t}get 0(){return dt(this,"[0]",C)}get 1(){return dt(this,"[1]",C)}get 2(){throw new P}get 3(){throw new P}multiply(t){return Dt(this,"number"==typeof t?O(t,C):t)}divide(t){return Ft(this,"number"==typeof t?O(t,C):t)}add(t){return kt(this,"number"==typeof t?O(t,C):t)}subtract(t){return Mt(this,"number"==typeof t?O(t,C):t)}};X=l=t([S],X);let Y=class extends e{static{a=this}static{this.type="vec3"}constructor(t,e,n){super(),this.type="vec3",this.children=[t,e,n].filter(t=>null!=t)}get 0(){return dt(this,"[0]",C)}get 1(){return dt(this,"[1]",C)}get 2(){return dt(this,"[2]",C)}get 3(){throw new P}clone(){const t=new a(n(this.children[0]),n(this.children[1]),n(this.children[2]));return super.cloneInto(t),t}multiply(t){return Dt(this,"number"==typeof t?O(t,C):t)}divide(t){return Ft(this,"number"==typeof t?O(t,C):t)}add(t){return kt(this,"number"==typeof t?O(t,C):t)}subtract(t){return Mt(this,"number"==typeof t?O(t,C):t)}};Y=a=t([S],Y);let _=class extends e{static{f=this}static{this.type="vec4"}constructor(t,e,n,r){super(),this.type="vec4",this.children=[t,e,n,r].filter(t=>null!=t)}clone(){const t=new f(n(this.children[0]),n(this.children[1]),n(this.children[2]),n(this.children[3]));return super.cloneInto(t),t}get 0(){return dt(this,"[0]",C)}get 1(){return dt(this,"[1]",C)}get 2(){return dt(this,"[2]",C)}get 3(){return dt(this,"[3]",C)}multiply(t){return Dt(this,"number"==typeof t?O(t,C):t)}divide(t){return Ft(this,"number"==typeof t?O(t,C):t)}add(t){return kt(this,"number"==typeof t?O(t,C):t)}subtract(t){return Mt(this,"number"==typeof t?O(t,C):t)}};_=f=t([S],_);let G=class extends e{static{p=this}static{this.type="uint"}constructor(t){super(),this.type="uint",this.children=[t]}clone(){const t=new p(n(this.children[0]));return super.cloneInto(t),t}multiply(t){return Dt(this,O(t,p))}add(t){return kt(this,O(t,p))}subtract(t){return Mt(this,O(t,p))}divide(t){return Ft(this,O(t,p))}};G=p=t([S],G);let H=class extends e{static{d=this}static{this.type="uvec2"}constructor(t,e){super(),this.type="uvec2",this.children=[t,e].filter(t=>null!=t)}clone(){const t=new d(n(this.children[0]),n(this.children[1]));return super.cloneInto(t),t}get 0(){return dt(this,"[0]",W)}get 1(){return dt(this,"[1]",W)}get 2(){throw new P}get 3(){throw new P}multiply(t){return Dt(this,"number"==typeof t?O(t,G):t)}divide(t){return Ft(this,"number"==typeof t?O(t,G):t)}add(t){return kt(this,"number"==typeof t?O(t,G):t)}subtract(t){return Mt(this,"number"==typeof t?O(t,G):t)}};H=d=t([S],H);let A=class extends e{static{y=this}static{this.type="uvec3"}constructor(t,e,n){super(),this.type="uvec3",this.children=[t,e,n].filter(t=>null!=t)}clone(){const t=new y(n(this.children[0]),n(this.children[1]),n(this.children[2]));return super.cloneInto(t),t}get 0(){return dt(this,"[0]",G)}get 1(){return dt(this,"[1]",G)}get 2(){return dt(this,"[2]",G)}get 3(){throw new P}multiply(t){return Dt(this,"number"==typeof t?O(t,G):t)}divide(t){return Ft(this,"number"==typeof t?O(t,G):t)}add(t){return kt(this,"number"==typeof t?O(t,G):t)}subtract(t){return Mt(this,"number"==typeof t?O(t,G):t)}};A=y=t([S],A);let V=class extends e{static{w=this}static{this.type="uvec4"}constructor(t,e,n,r){super(),this.type="uvec4",this.children=[t,e,n,r].filter(t=>null!=t)}clone(){const t=new w(n(this.children[0]),n(this.children[1]),n(this.children[2]),n(this.children[3]));return super.cloneInto(t),t}get 0(){return dt(this,"[0]",G)}get 1(){return dt(this,"[1]",G)}get 2(){return dt(this,"[2]",G)}get 3(){return dt(this,"[3]",G)}multiply(t){return Dt(this,"number"==typeof t?O(t,G):t)}divide(t){return Ft(this,"number"==typeof t?O(t,G):t)}add(t){return kt(this,"number"==typeof t?O(t,G):t)}subtract(t){return Mt(this,"number"==typeof t?O(t,G):t)}};V=w=t([S],V);class J extends e{static{this.type="bool"}constructor(t){super(),this.type="bool",this.children=[t]}and(t){return Lt(this,t)}or(t){return At(this,t)}xor(t){return Jt(this,t)}clone(){const t=new J(n(this.children[0]));return super.cloneInto(t),t}}let K=class extends e{static{m=this}static{this.type="bvec2"}constructor(t,e){super(),this.type="bvec2",this.children=[t,e].filter(t=>null!=t)}all(){return te(this)}any(){return ee(this)}clone(){const t=new m(n(this.children[0]),n(this.children[1]));return super.cloneInto(t),t}};K=m=t([S],K);let L=class extends e{static{v=this}static{this.type="bvec3"}constructor(t,e,n){super(),this.type="bvec3",this.children=[t,e,n].filter(t=>null!=t)}all(){return te(this)}any(){return ee(this)}clone(){const t=new v(n(this.children[0]),n(this.children[1]),n(this.children[2]));return super.cloneInto(t),t}};function O(t,e){if("number"==typeof t){return new e(t)}return t}L=v=t([S],L);let Q=class extends e{static{b=this}static{this.type="bvec4"}constructor(t,e,n,r){super(),this.type="bvec4",this.children=[t,e,n,r].filter(t=>null!=t)}all(){return te(this)}any(){return ee(this)}clone(){const t=new b(n(this.children[0]),n(this.children[1]),n(this.children[2]),n(this.children[3]));return super.cloneInto(t),t}};Q=b=t([S],Q);class W extends e{static{this.type="int"}constructor(t){super(),this.type="int",this.children=[t]}multiply(t){return Dt(this,O(t,W))}add(t){return kt(this,O(t,W))}subtract(t){return Mt(this,O(t,W))}divide(t){return Ft(this,O(t,W))}clone(){const t=new W(n(this.children[0]));return super.cloneInto(t),t}}let Z=class extends e{static{g=this}static{this.type="ivec2"}constructor(t,e){super(),this.type="ivec2",this.children=[t,e].filter(t=>null!=t)}clone(){const t=new g(n(this.children[0]),n(this.children[1]));return super.cloneInto(t),t}get 0(){return dt(this,"[0]",W)}get 1(){return dt(this,"[1]",W)}get 2(){throw new P}get 3(){throw new P}multiply(t){return Dt(this,"number"==typeof t?O(t,W):t)}divide(t){return Ft(this,"number"==typeof t?O(t,W):t)}add(t){return kt(this,"number"==typeof t?O(t,W):t)}subtract(t){return Mt(this,"number"==typeof t?O(t,W):t)}};Z=g=t([S],Z);let tt=class extends e{static{x=this}static{this.type="ivec3"}constructor(t,e,n){super(),this.type="ivec3",this.children=[t,e,n].filter(t=>null!=t)}clone(){const t=new x(n(this.children[0]),n(this.children[1]),n(this.children[2]));return super.cloneInto(t),t}get 0(){return dt(this,"[0]",W)}get 1(){return dt(this,"[1]",W)}get 2(){return dt(this,"[2]",W)}get 3(){throw new P}multiply(t){return Dt(this,"number"==typeof t?O(t,W):t)}divide(t){return Ft(this,"number"==typeof t?O(t,W):t)}add(t){return kt(this,"number"==typeof t?O(t,W):t)}subtract(t){return Mt(this,"number"==typeof t?O(t,W):t)}};tt=x=t([S],tt);let et=class extends e{static{I=this}static{this.type="ivec4"}constructor(t,e,n,r){super(),this.type="ivec4",this.children=[t,e,n,r].filter(t=>null!=t)}clone(){const t=new I(n(this.children[0]),n(this.children[1]),n(this.children[2]),n(this.children[3]));return super.cloneInto(t),t}get 0(){return dt(this,"[0]",W)}get 1(){return dt(this,"[1]",W)}get 2(){return dt(this,"[2]",W)}get 3(){return dt(this,"[3]",W)}multiply(t){return Dt(this,"number"==typeof t?O(t,W):t)}divide(t){return Ft(this,"number"==typeof t?O(t,W):t)}add(t){return kt(this,"number"==typeof t?O(t,W):t)}subtract(t){return Mt(this,"number"==typeof t?O(t,W):t)}};et=I=t([S],et);class nt extends e{static{this.type="mat2"}constructor(t,e,n,r){super(),this.type="mat2",this.children=[t,e,n,r]}clone(){const t=new nt(n(this.children[0]),n(this.children[1]),n(this.children[2]),n(this.children[3]));return super.cloneInto(t),t}get(t,e){return yt(this,new W(t),new W(e),C)}multiply(t){return Dt(this,t)}}class rt extends e{static{this.type="mat3"}static identity(){return new rt(1,0,0,0,1,0,0,0,1)}static fromRotation(t){const e=un(t),n=oe(t);return new rt(n,e,0,gt(e),n,0,0,0,1)}constructor(t,e,n,r,i,c,u,s,o){super(),this.type="mat3",this.children=[t,e,n,r,i,c,u,s,o]}add(t){return kt(this,t)}multiply(t){return Dt(this,t)}get(t,e){return yt(this,new W(t),new W(e),C)}clone(){const t=new rt(n(this.children[0]),n(this.children[1]),n(this.children[2]),n(this.children[3]),n(this.children[4]),n(this.children[5]),n(this.children[6]),n(this.children[7]),n(this.children[8]));return super.cloneInto(t),t}}class it extends e{static{this.type="mat4"}static identity(){return new it(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)}constructor(t,e,n,r,i,c,u,s,o,h,l,a,f,p,d,y){super(),this.type="mat4",this.children=[t,e,n,r,i,c,u,s,o,h,l,a,f,p,d,y]}static fromColumns(t,e,n,r){return new it(t.x,t.y,t.z,t.w,e.x,e.y,e.z,e.w,n.x,n.y,n.z,n.w,r.x,r.y,r.z,r.w)}multiply(t){return Dt(this,t)}get(t,e){return yt(this,new W(t),new W(e),C)}clone(){const t=new it(n(this.children[0]),n(this.children[1]),n(this.children[2]),n(this.children[3]),n(this.children[4]),n(this.children[5]),n(this.children[6]),n(this.children[7]),n(this.children[8]),n(this.children[9]),n(this.children[10]),n(this.children[11]),n(this.children[12]),n(this.children[13]),n(this.children[14]),n(this.children[15]));return super.cloneInto(t),t}}const ct={float:C,vec2:X,vec3:Y,vec4:_,int:W,ivec2:Z,ivec3:tt,ivec4:et,uint:G,uvec2:H,uvec3:A,uvec4:V,bool:J,bvec2:K,bvec3:L,bvec4:Q},ut=(...t)=>new W(...t),st=(...t)=>new C(...t),ot=(...t)=>new X(...t),ht=(...t)=>new Y(...t),lt=(...t)=>new _(...t),at=(...t)=>new nt(...t),ft=(...t)=>new rt(...t),pt=(...t)=>new it(...t);function dt(t,e,n){const r=new n(new i(e,t,n));return r.isImplicit=!0,r}function yt(t,e,n,r){const i=new r(new s(e,n,t,r));return i.isImplicit=!0,i}function wt(t,e,n,r=null){if(r){const i=new r,u=new r(new c(t,[e,n],!0,!1,i));return u.isImplicit=!0,u}if("float"===e.type||"int"===e.type){const r=new n.constructor(new c(t,[e,n],!0,!1,n.constructor));return r.isImplicit=!0,r}if(("mat2"===e.type||"mat3"===e.type||"mat4"===e.type)&&"float"!==n.type){const r=new n.constructor(new c(t,[e,n],!0,!1,n.constructor));return r.isImplicit=!0,r}const i=new e.constructor(new c(t,[e,n],!0,!1,e.constructor));return i.isImplicit=!0,i}function mt(t,e,n=e.constructor){const r=new n(new c(t,[e],!1,!1,n));return r.isImplicit=!0,r}function vt(t,e,n,r=e.constructor){const i=new r(new c(t,[e,n],!1,!1,r));return i.isImplicit=!0,i}function bt(t,e,n,r,i=e.constructor){const u=new i(new c(t,[e,n,r],!1,!1,i));return u.isImplicit=!0,u}function gt(t){return Dt(t,st(-1))}function xt(t,e,n,r){return new e(new u(t,e,n,r))}function It(t,e){const n="function"==typeof t?t():t,r=new n.constructor(new o(n).setDebugName(e));return r.isImplicit=!0,r}function Et(t,e,n=0,r=t.size){const i=new W(n).setMutable().setDebugName("FindIndexIterator"),c=e(t.get(i)).setDebugName("FindIndexPredicate"),u=xt({iter:i},W,c,({out:t,iter:e,subgraph:n})=>`\n${t} = -1;\n\nfor (; ${e} < ${r}; ${e}++) {\n\n${n.body}\n\n if (${n.varName}) {\n ${t} = ${e};\n break;\n }\n\n}\n`).setDebugName("FindIndexBlock");return u}function $t(t,e,n=0,r=t.size){const i=xt({array:t},W,null,({out:t,array:i})=>`\n${t} = -1;\nfor (int i = ${n}; i < ${r}; i++) {\n bool condition;\n ${e({array:i,i:"i",out:"condition"})}\n if (condition) {\n ${t} = i;\n break;\n }\n}\n`).setDebugName("GlslFindIndexBlock");return i}function zt(t,e,n){const i="function"==typeof e?e():e,c="function"==typeof n?n():n,u=new i.constructor(new r(t,i,c));return u.isImplicit=!0,u}function Tt(...t){const e=t.map(([t,e])=>"function"==typeof e?[t,e()]:[t,e]),n=e[0][1].constructor,r=e.findIndex(t=>!0===t[0]);if(-1===r)throw new Error("A cond must have a fallthrough case with `true`/; ");const i=e.slice(0,r),c=e[r][1],u=new n(i.reduceRight((t,e)=>zt(e[0],e[1],t),c));return u.isImplicit=!0,u}function Nt(t,e){const n=new e.constructor(new r(t,e,null));return n.isImplicit=!0,n}function Dt(t,e){return wt("*",t,e)}function Ft(t,e){return wt("/",t,e)}function kt(t,e){return wt("+",t,e)}function Mt(t,e){return wt("-",t,e)}function St(t,e){return wt("%",t,e)}function Rt(t,e){return wt("<<",t,e)}function jt(t,e){return wt(">>",t,e)}function Pt(t,e){return wt("&",t,e)}function Bt(t,e){return wt("|",t,e)}function qt(t,e){return wt("^",t,e)}function Ut(t){return mt("~",t)}function Ct(t,e){return wt("==",t,e,J)}function Xt(t,e){return wt("!=",t,e,J)}function Yt(t,e){return wt("<",t,e,J)}function _t(t,e){return wt("<=",t,e,J)}function Gt(t,e){return wt(">",t,e,J)}function Ht(t,e){return wt(">=",t,e,J)}function At(...t){return t.length<=1?t[0]:t.slice(1).reduce((t,e)=>Vt(t,e),t[0])}function Vt(t,e){return wt("||",t,e,J)}function Jt(...t){return t.length<=1?t[0]:t.slice(1).reduce((t,e)=>Kt(t,e),t[0])}function Kt(t,e){return wt("^^",t,e,J)}function Lt(...t){return t.length<=1?t[0]:t.slice(1).reduce((t,e)=>Ot(t,e),t[0])}function Ot(t,e){return wt("&&",t,e,J)}function Qt(t){return mt("abs",t)}function Wt(t){return mt("acos",t)}function Zt(t){return mt("acosh",t)}function te(t){return mt("all",t,J)}function ee(t){return mt("any",t,J)}function ne(t){return mt("asin",t)}function re(t){return mt("asinh",t)}function ie(t,e){return null==e?mt("atan",t):vt("atan",t,e,t.constructor)}function ce(t){return mt("atanh",t)}function ue(t){return mt("ceil",t)}function se(t,e,n){return bt("clamp",t,e,n,t.constructor)}function oe(t){return mt("cos",t)}function he(t){return mt("cosh",t)}function le(t,e){return vt("cross",t,e,t.constructor)}function ae(t){return mt("dFdX",t)}function fe(t){return mt("dFdY",t)}function pe(t){return mt("degrees",t)}function de(t){return mt("determinant",t,C)}function ye(t,e){return vt("distance",t,e,C)}function we(t,e){return vt("dot",t,e,C)}function me(t,e){return vt("equal",t,e,N(t))}function ve(t,e){return vt("greaterThan",t,e,N(t))}function be(t,e){return vt("greaterThanEqual",t,e,N(t))}function ge(t){return mt("exp",t)}function xe(t){return mt("exp2",t)}function Ie(t,e,n){return bt("faceforward",t,e,n)}function Ee(t){return mt("floatBitsToInt",t,T(t))}function $e(t){return mt("floatBitsToUint",t,$(t))}function ze(t){return mt("floor",t)}function Te(t){return mt("fract",t)}function Ne(t){return mt("fwidth",t)}function De(t){return mt("intBitsToFloat",t,z(t))}function Fe(t){return mt("uintBitsToFloat",t,E(t))}function ke(t){return mt("inverse",t,C)}function Me(t){return mt("inversesqrt",t)}function Se(t){return mt("isinf",t,N(t))}function Re(t){return mt("isnan",t,N(t))}function je(t){return mt("length",t,C)}function Pe(t,e){return vt("lessThan",t,e,N(t))}function Be(t,e){return vt("lessThanEqual",t,e,N(t))}function qe(t){return mt("log",t)}function Ue(t){return mt("log2",t)}function Ce(t,e){return vt("matrixCompMult",t,e)}function Xe(t,e){return vt("max",t,e)}function Ye(t,e){return vt("min",t,e)}function _e(t,e,n){return bt("mix",t,e,n)}function Ge(t,e){return vt("mod",t,e)}function He(t,e){throw new Error("modf not implemented")}function Ae(t){return mt("normalize",t)}function Ve(t){return"bool"===t.type?mt("!",t):mt("not",t)}function Je(t,e){return vt("notEqual",t,e,N(t))}function Ke(t,e){throw new Error("Impl type?")}function Le(t){return mt("packHalf2x16",t,G)}function Oe(t){return mt("packUnorm2x16",t,G)}function Qe(t){return mt("packSnorm2x16",t,G)}function We(t,e){return vt("pow",t,e)}function Ze(t){return mt("radians",t)}function tn(t,e){return vt("reflect",t,e)}function en(t,e,n){return bt("refract",t,e,n)}function nn(t){return mt("round",t)}function rn(t){return mt("roundEven",t)}function cn(t){return mt("sign",t)}function un(t){return mt("sin",t)}function sn(t){return mt("sinh",t)}function on(t,e,n){return bt("smoothstep",t,e,n)}function hn(t){return mt("sqrt",t)}function ln(t,e){return vt("step",t,e,e.constructor)}function an(t){return mt("tan",t)}function fn(t){return mt("tanh",t)}function pn(t,e,n){return bt("texelFetch",t,e,n,_)}function dn(t,e,n,r){throw new Error("Impl type")}function yn(t,e,n){throw new Error("Impl type")}function wn(t,e){return vt("texture",t,e,_)}function mn(t,e,n,r){throw new Error("Impl type")}function vn(t,e,n,r,i){throw new Error("Impl type")}function bn(t,e,n){throw new Error("Impl type")}function gn(t,e,n,r){throw new Error("Impl type")}function xn(t,e,n,r){throw new Error("Impl type")}function In(t,e,n){throw new Error("Impl type")}function En(t,e,n,r){throw new Error("Impl type")}function $n(t,e,n,r,i){throw new Error("Impl type")}function zn(t,e,n){throw new Error("Impl type")}function Tn(t,e,n,r){throw new Error("Impl type")}function Nn(t,e,n,r){throw new Error("Impl type")}function Dn(t,e){throw new Error("Impl type")}function Fn(t){return mt("transpose",t)}function kn(t){return mt("trunc",t)}function Mn(t){return mt("unpackHalf2x16",t,X)}function Sn(t){return mt("unpackUnorm2x16",t,X)}function Rn(t){return mt("unpackSnorm2x16",t,X)}function jn(t,e){const n=We(new C(2),new C(e));return[new _(Ge(t.x,n),ze(t.x.divide(n)),Ge(t.y,n),ze(t.y.divide(n))),new _(Ge(t.z,n),ze(t.z.divide(n)),Ge(t.w,n),ze(t.w.divide(n)))]}function Pn(t,e){const{initialValue:n,xRange:r,yRange:i,callback:c}=e,[u,s]=r,[o,h]=i,l=new W(0).setMutable().setDebugName("iterX"),a=new W(0).setMutable().setDebugName("iterY"),f=n.setMutable().setDebugName("accumulator"),p=c(f,t.get(l,a),l,a).setDebugName("callback"),d=xt({iterX:l,iterY:a,accumulator:f},n.constructor,p,({out:t,iterX:e,iterY:n,accumulator:r,subgraph:i})=>`\nfor (${n} = ${o}; ${n} < ${h}; ${n}++) {\n for (${e} = ${u}; ${e} < ${s}; ${e}++) {\n\n ${i.body}\n\n ${r} = ${i.varName};\n }\n}\n${t} = ${r};\n`).setDebugName("reduce2DBody");return d}export{K as BVec2,L as BVec3,Q as BVec4,J as Bool,B as FixedArray,q as FixedArray2D,C as Float,Z as IVec2,tt as IVec3,et as IVec4,W as Int,nt as Mat2,rt as Mat3,it as Mat4,U as Sampler2D,G as UInt,H as UVec2,A as UVec3,V as UVec4,X as Vec2,Y as Vec3,_ as Vec4,Vt as _or,Kt as _xor,Qt as abs,Wt as acos,Zt as acosh,kt as add,te as all,Lt as and,ee as any,ne as asin,re as asinh,ie as atan,ce as atanh,Pt as bitAnd,Ut as bitNot,Bt as bitOr,jt as bitRShift,Rt as bitShift,qt as bitXor,xt as block,ue as ceil,se as clamp,Tt as cond,oe as cos,he as cosh,le as cross,ae as dFdx,fe as dFdy,dt as definePropertyAccess,yt as definePropertyAccess2D,pe as degrees,de as determinant,ye as distance,Ft as divide,we as dot,Ct as equal,me as equalComponent,ge as exp,xe as exp2,Ie as faceforward,Et as findIndex,st as float,Ee as floatBitsToInt,$e as floatBitsToUint,ze as floor,Te as fract,Ne as fwidth,F as getTypeElementLengthForType,$t as glslFindIndex,Gt as greaterThan,ve as greaterThanComponent,Ht as greaterThanEqual,be as greaterThanEqualComponent,zt as ifElse,ut as int,De as intBitsToFloat,St as intMod,ke as inverse,Me as inversesqrt,Se as isinf,Re as isnan,je as length,Yt as lessThan,Pe as lessThanComponent,_t as lessThanEqual,Be as lessThanEqualComponent,qe as log,Ue as log2,at as mat2,ft as mat3,pt as mat4,Ce as matrixCompMult,Xe as max,Ye as min,_e as mix,Ge as mod,He as modf,Dt as multiply,It as namedScope,gt as negate,Ae as normalize,Ve as not,Xt as notEqual,Je as notEqualComponent,At as or,Ke as outerProduct,Le as packHalf2x16,Qe as packSnorm2x16,Oe as packUnorm2x16,We as pow,Ze as radians,Pn as reduce2D,tn as reflect,en as refract,nn as round,rn as roundEven,cn as sign,un as sin,sn as sinh,on as smoothstep,hn as sqrt,ln as step,Mt as subtract,an as tan,fn as tanh,pn as texelFetch,dn as texelFetchOffset,yn as texture,wn as texture2D,mn as textureGrad,vn as textureGradOffset,bn as textureLod,gn as textureLodOffset,xn as textureOffset,In as textureProj,En as textureProjGrad,$n as textureProjGradOffset,zn as textureProjLod,Tn as textureProjLodOffset,Nn as textureProjOffset,Dn as textureSize,T as transformFloatToInt,$ as transformFloatToUInt,z as transformIntToFloat,N as transformTypeToBooleanType,E as transformUIntToFloat,Fn as transpose,kn as trunc,Fe as uintBitsToFloat,Mn as unpackHalf2x16,Rn as unpackSnorm2x16,Sn as unpackUnorm2x16,jn as unpackVec4,ot as vec2,ht as vec3,lt as vec4,Nt as when,Jt as xor};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
+ */
5
+ import{__decorate as t,__param as o}from"tslib";import{GraphShaderModule as e,FragmentOutput as r,location as i,uniform as p,define as l,option as s,input as d,FragmentInput as n,VertexInput as a,UniformGroup as y}from"../../../GraphShaderModule.js";import{Vec3 as c,Vec4 as v,Vec2 as u,fract as h,mix as x,texture2D as m,Float as f,Mat3 as g,Sampler2D as w}from"../../../graph/glsl.js";class C extends a{}t([i(0,u)],C.prototype,"position",void 0);class M extends y{}t([p(f)],M.prototype,"coordRange",void 0),t([p(f)],M.prototype,"depth",void 0);class b extends y{}t([p(g)],b.prototype,"dvsMat",void 0);class S extends y{}t([p(v)],S.prototype,"tlbr",void 0),t([p(u)],S.prototype,"mosaicSize",void 0),t([p(f)],S.prototype,"opacity",void 0),t([p(w)],S.prototype,"texture",void 0);class I extends y{}t([p(g)],I.prototype,"mat",void 0);class z extends y{}t([p(v)],z.prototype,"color",void 0);class T extends e{constructor(){super(...arguments),this.type="VTLShaderBackground"}vertex(t){const o=new c(this.layerInfo.coordRange.multiply(t.position),1),e=this.tileInfo.dvsMat.multiply(o).xy,r=new v(e,this.layerInfo.depth,1);let i,p=null;if(1===this.renderMode){const o=this.pattern,{tlbr:e,mosaicSize:r}=o;p=this.patternMat.mat.multiply(new c(t.position,1)).xy,i=e.divide(r.xyxy)}else i=new v(0),p=new u(0);return{glPosition:r,tlbr:i,tileTextureCoord:p}}fragment(t){const o=new r;switch(this.renderMode){case 1:{const e=h(t.tileTextureCoord),{texture:r,opacity:i}=this.pattern,p=x(t.tlbr.xy,t.tlbr.zw,e),l=m(r,p);o.fragColor=i.multiply(l);break}default:o.fragColor=this.getSolidColor()}return o}getSolidColor(){return null!=this.solidColor?this.solidColor.color:new v(1,0,0,1)}}t([l],T.prototype,"renderMode",void 0),t([p(M)],T.prototype,"layerInfo",void 0),t([p(b)],T.prototype,"tileInfo",void 0),t([s(z)],T.prototype,"solidColor",void 0),t([s(S)],T.prototype,"pattern",void 0),t([s(I)],T.prototype,"patternMat",void 0),t([o(0,d(C))],T.prototype,"vertex",null),t([o(0,d(n))],T.prototype,"fragment",null);export{T as VTLShaderBackground};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
+ */
5
+ import{__decorate as o,__param as t}from"tslib";import{GraphShaderModule as e,FragmentOutput as r,location as i,uniform as s,option as p,input as l,VertexInput as a,UniformGroup as d,FragmentInput as y}from"../../../GraphShaderModule.js";import{max as u,mod as v,Vec2 as c,Float as n,Vec3 as h,Vec4 as k,length as x,smoothstep as g,negate as M,cond as C,lessThan as T,mix as w,Mat3 as b}from"../../../graph/glsl.js";class W extends a{}o([i(0,c)],W.prototype,"position",void 0),o([i(1,n)],W.prototype,"radius",void 0),o([i(2,k)],W.prototype,"color",void 0),o([i(3,n)],W.prototype,"opacity",void 0),o([i(4,n)],W.prototype,"strokeWidth",void 0),o([i(5,k)],W.prototype,"strokeColor",void 0),o([i(6,n)],W.prototype,"strokeOpacity",void 0),o([i(7,n)],W.prototype,"blur",void 0),o([i(8,n)],W.prototype,"radiusTo",void 0),o([i(9,k)],W.prototype,"colorTo",void 0),o([i(10,n)],W.prototype,"opacityTo",void 0),o([i(11,n)],W.prototype,"strokeWidthTo",void 0),o([i(12,k)],W.prototype,"strokeColorTo",void 0),o([i(13,n)],W.prototype,"strokeOpacityTo",void 0),o([i(14,n)],W.prototype,"blurTo",void 0);class m extends y{}class f extends d{}o([s(b)],f.prototype,"dvsMat",void 0),o([s(b)],f.prototype,"displayMat",void 0);class O extends d{}o([s(c)],O.prototype,"circleTranslation",void 0),o([s(n)],O.prototype,"depth",void 0),o([s(n)],O.prototype,"antialiasingWidth",void 0);class S extends d{}o([s(n)],S.prototype,"value",void 0);class L extends d{}o([s(n)],L.prototype,"value",void 0);class j extends d{}o([s(n)],j.prototype,"value",void 0);class B extends d{}o([s(n)],B.prototype,"value",void 0);class R extends d{}o([s(n)],R.prototype,"value",void 0);class G extends d{}o([s(n)],G.prototype,"value",void 0);class P extends d{}o([s(n)],P.prototype,"value",void 0);class V extends d{}o([s(n)],V.prototype,"value",void 0);class q extends d{}o([s(n)],q.prototype,"value",void 0);class z extends d{}o([s(n)],z.prototype,"value",void 0);class A extends d{}o([s(k)],A.prototype,"value",void 0);class D extends d{}o([s(k)],D.prototype,"value",void 0);class E extends d{}o([s(k)],E.prototype,"value",void 0);class F extends d{}o([s(k)],F.prototype,"value",void 0);class H extends e{constructor(){super(...arguments),this.type="VTLShaderCircle"}vertex(o){const t=this.getColor(o).multiply(this.getOpacity(o)),e=this.getStrokeColor(o).multiply(this.getStrokeOpacity(o)),r=this.getStrokeWidth(o),i=this.getRadius(o),s=this.getBlur(o),p=i.add(r),l=u(s,this.styleLayerConfig.antialiasingWidth.divide(p)),a=v(o.position,new c(2)).multiply(new n(2)).subtract(new n(1)),d=this.transform.dvsMat.multiply(new h(o.position.multiply(.5),new n(1))).add(this.transform.displayMat.multiply(new h(a.multiply(p).add(this.styleLayerConfig.circleTranslation),new n(0))));return{glPosition:new k(d.xy,this.styleLayerConfig.depth,1),strokeWidth:r,radius:i,blur:l,color:t,offset:a,strokeColor:e}}fragment(o){const t=new r,e=x(o.offset),i=g(new n(0),M(o.blur),e.subtract(new n(1))),s=C([T(o.strokeWidth,new n(.01)),()=>new n(0)],[!0,g(M(o.blur),new n(0),e.subtract(o.radius.divide(o.radius.add(o.strokeWidth))))]);return t.fragColor=w(o.color,o.strokeColor,s).multiply(i),t}getRadius(o){return this.radiusMix?.value&&o.radius&&o.radiusTo?w(o.radius,o.radiusTo,this.radiusMix.value):o.radius?o.radius:this.radius?.value||new n(0)}getBlur(o){return this.blurMix?.value&&o.blur&&o.blurTo?w(o.blur,o.blurTo,this.blurMix.value):o.blur?o.blur:this.blur?.value||new n(0)}getOpacity(o){return this.opacityMix?.value&&o.opacity&&o.opacityTo?w(o.opacity,o.opacityTo,this.opacityMix.value):o.opacity?o.opacity:this.opacity?.value||new n(1)}getStrokeWidth(o){return this.strokeWidthMix?.value&&o.strokeWidth&&o.strokeWidthTo?w(o.strokeWidth,o.strokeWidthTo,this.strokeWidthMix.value):o.strokeWidth?o.strokeWidth:this.strokeWidth?.value||new n(0)}getColor(o){return this.colorMix?.value&&o.color&&o.colorTo?w(o.color,o.colorTo,this.colorMix.value):o.color?o.color:this.color?.value||new k(0)}getStrokeColor(o){return this.strokeColorMix?.value&&o.strokeColor&&o.strokeColorTo?w(o.strokeColor,o.strokeColorTo,this.strokeColorMix.value):o.strokeColor?o.strokeColor:this.strokeColor?.value||new k(0)}getStrokeOpacity(o){return this.strokeOpacityMix?.value&&o.strokeOpacity&&o.strokeOpacityTo?w(o.strokeOpacity,o.strokeOpacityTo,this.strokeOpacityMix.value):o.strokeOpacity?o.strokeOpacity:this.opacity?.value||new n(0)}}o([s(f)],H.prototype,"transform",void 0),o([s(O)],H.prototype,"styleLayerConfig",void 0),o([p(S)],H.prototype,"radius",void 0),o([p(L)],H.prototype,"radiusMix",void 0),o([p(j)],H.prototype,"blur",void 0),o([p(B)],H.prototype,"blurMix",void 0),o([p(R)],H.prototype,"opacity",void 0),o([p(G)],H.prototype,"opacityMix",void 0),o([p(P)],H.prototype,"strokeOpacity",void 0),o([p(V)],H.prototype,"strokeOpacityMix",void 0),o([p(q)],H.prototype,"strokeWidth",void 0),o([p(z)],H.prototype,"strokeWidthMix",void 0),o([p(A)],H.prototype,"color",void 0),o([p(D)],H.prototype,"colorMix",void 0),o([p(E)],H.prototype,"strokeColor",void 0),o([p(F)],H.prototype,"strokeColorMix",void 0),o([t(0,l(W))],H.prototype,"vertex",null),o([t(0,l(m))],H.prototype,"fragment",null);export{H as VTLShaderCircle};