@arcgis/core 5.1.0-next.30 → 5.1.0-next.32

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 (284) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/{dcdddbc02b7d7febc56d.js → 005fe95c3329cfe74219.js} +1 -1
  3. package/assets/esri/core/workers/chunks/00947268b6de12329146.js +1 -0
  4. package/assets/esri/core/workers/chunks/{2563ce0f18eb84a9971a.js → 0337138d3702a1a52ce0.js} +1 -1
  5. package/assets/esri/core/workers/chunks/0554f310066937098099.js +1 -0
  6. package/assets/esri/core/workers/chunks/087403b53f15eb4d375c.js +1 -0
  7. package/assets/esri/core/workers/chunks/0d156e14fc34d0600fd5.js +1 -0
  8. package/assets/esri/core/workers/chunks/{eb4934d3a3b82316c7c6.js → 0d196cf72cd8bef8d91d.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{764d080f77dec5e7a02c.js → 0e7d3f3479fcb366cc6f.js} +1 -1
  10. package/assets/esri/core/workers/chunks/0efe90bd43ab29dab8ae.js +1 -0
  11. package/assets/esri/core/workers/chunks/122ff8d0d428f31fc5d1.js +1 -0
  12. package/assets/esri/core/workers/chunks/{37d943d3f2c40468438c.js → 144acac9bb1aa78f1170.js} +1 -1
  13. package/assets/esri/core/workers/chunks/14e05d37e10ebba8cf10.js +1 -0
  14. package/assets/esri/core/workers/chunks/19722dfef06028ab399b.js +1 -0
  15. package/assets/esri/core/workers/chunks/1ff40e6057916e8482b3.js +1 -0
  16. package/assets/esri/core/workers/chunks/209d8ee81cc3ebb18b27.js +1 -0
  17. package/assets/esri/core/workers/chunks/22aeab5c363645c04806.js +1 -0
  18. package/assets/esri/core/workers/chunks/283ce37403c5e7a76e95.js +1 -0
  19. package/assets/esri/core/workers/chunks/29687aae97dc01f33fa6.js +1 -0
  20. package/assets/esri/core/workers/chunks/2d6165796af522858e56.js +1 -0
  21. package/assets/esri/core/workers/chunks/2f0e850ebea0ffd2708f.js +1 -0
  22. package/assets/esri/core/workers/chunks/34cdcee6d0ea595d7aed.js +1 -0
  23. package/assets/esri/core/workers/chunks/34f2e9d7466abc0919e7.js +1 -0
  24. package/assets/esri/core/workers/chunks/36f91b5c4345a179b8b1.js +1 -0
  25. package/assets/esri/core/workers/chunks/380bb57bccc266d6442a.js +1 -0
  26. package/assets/esri/core/workers/chunks/3b86e8eb553122d3b68d.js +1 -0
  27. package/assets/esri/core/workers/chunks/3b9de873f87f0feeb20b.js +1 -0
  28. package/assets/esri/core/workers/chunks/{f0bb986dce9cf75c890c.js → 3c597d8ef898627b8f93.js} +1 -1
  29. package/assets/esri/core/workers/chunks/3ca7f5cedf3cb747c0cf.js +1 -0
  30. package/assets/esri/core/workers/chunks/3d18b8c1c759c7240721.js +1 -0
  31. package/assets/esri/core/workers/chunks/3dcb4ee8b862689a141b.js +1 -0
  32. package/assets/esri/core/workers/chunks/{c814abf3e67d9eadbc6b.js → 414a802b6365688d31cb.js} +1 -1
  33. package/assets/esri/core/workers/chunks/446bc8461403ed1ac7b2.js +1 -0
  34. package/assets/esri/core/workers/chunks/4bfc6f8c2d13ca4d2082.js +1 -0
  35. package/assets/esri/core/workers/chunks/4ceba469398ef55de8ea.js +1 -0
  36. package/assets/esri/core/workers/chunks/54c1d31e1efab765ee7a.js +1 -0
  37. package/assets/esri/core/workers/chunks/{84073653ff50e5d3c47a.js → 55165b6b49b87c1aff8f.js} +24 -13
  38. package/assets/esri/core/workers/chunks/582d45a41e29005f6c63.js +1 -0
  39. package/assets/esri/core/workers/chunks/586bc903e2c285649bf2.js +1 -0
  40. package/assets/esri/core/workers/chunks/{aa3bdfd00f666c6cc521.js → 5b12865ac53d984d8149.js} +1 -1
  41. package/assets/esri/core/workers/chunks/5e5b358e603b13b4d7d7.js +1 -0
  42. package/assets/esri/core/workers/chunks/5f3b25b30acd7a07f5c0.js +1 -0
  43. package/assets/esri/core/workers/chunks/620965d2e1a9ccf81d43.js +1 -0
  44. package/assets/esri/core/workers/chunks/623bfacf4b9c9a5387cc.js +1 -0
  45. package/assets/esri/core/workers/chunks/63722607fbf8d411188d.js +1 -0
  46. package/assets/esri/core/workers/chunks/64870f555fefa85a5c59.js +1 -0
  47. package/assets/esri/core/workers/chunks/{0df585420c9cec6a7265.js → 666db81085bc97831b18.js} +1 -1
  48. package/assets/esri/core/workers/chunks/67de5225b2c66c9c7bc9.js +1 -0
  49. package/assets/esri/core/workers/chunks/696f645349249f26090c.js +1 -0
  50. package/assets/esri/core/workers/chunks/{57e375d8a8db9fa57193.js → 6e8cfe69617876ee0dac.js} +1 -1
  51. package/assets/esri/core/workers/chunks/6f3f7f785241edacdb8b.js +1 -0
  52. package/assets/esri/core/workers/chunks/{ee6f7c5d3c2f187645ff.js → 7411ca5e1876aaa0228e.js} +1 -1
  53. package/assets/esri/core/workers/chunks/{94563b007647a9c4ad76.js → 75cde632887a95ea20f2.js} +1 -1
  54. package/assets/esri/core/workers/chunks/776a7179d32fe62a37e3.js +1 -0
  55. package/assets/esri/core/workers/chunks/7ddb11a127b9458e9eac.js +1 -0
  56. package/assets/esri/core/workers/chunks/7ebd836b98d14c7d3ecf.js +1 -0
  57. package/assets/esri/core/workers/chunks/80f0810527743833b4b7.js +1 -0
  58. package/assets/esri/core/workers/chunks/828998d33a48be161782.js +1 -0
  59. package/assets/esri/core/workers/chunks/8bd24534ed185afcb124.js +1 -0
  60. package/assets/esri/core/workers/chunks/8d4ddaace906dd09de2c.js +1 -0
  61. package/assets/esri/core/workers/chunks/8e10e4c25869af9da5ba.js +1 -0
  62. package/assets/esri/core/workers/chunks/8eed5b6cac937099102c.js +1 -0
  63. package/assets/esri/core/workers/chunks/{71be4833a260714d3b2c.js → 917474f9dd2039b82e9d.js} +1 -1
  64. package/assets/esri/core/workers/chunks/{c3a0b38abf0a12a466fa.js → 965b8fa54d0cfafd4a70.js} +1 -1
  65. package/assets/esri/core/workers/chunks/9813f25192ea27084754.js +1 -0
  66. package/assets/esri/core/workers/chunks/9a3e5053e95db36f26dc.js +1 -0
  67. package/assets/esri/core/workers/chunks/9cc1b44c5a325a840307.js +1 -0
  68. package/assets/esri/core/workers/chunks/9cd548ea00b641d8e65d.js +1 -0
  69. package/assets/esri/core/workers/chunks/a2d045217a42ecc36308.js +1 -0
  70. package/assets/esri/core/workers/chunks/{9417c32ad50970ffb61a.js → a3b29eca5807978fb2a3.js} +1 -1
  71. package/assets/esri/core/workers/chunks/a52a8254577840a23aba.js +1 -0
  72. package/assets/esri/core/workers/chunks/{1cbe564cfc9eb0723827.js → aa367ca7f8326fd67881.js} +1 -1
  73. package/assets/esri/core/workers/chunks/ad9194335902c687bb96.js +1 -0
  74. package/assets/esri/core/workers/chunks/ae72c530d52a6d4461be.js +1 -0
  75. package/assets/esri/core/workers/chunks/af601eb8c938c0720406.js +1 -0
  76. package/assets/esri/core/workers/chunks/b2cf19a28aa5c32a99e3.js +1 -0
  77. package/assets/esri/core/workers/chunks/b2f497339493926d4c9e.js +1 -0
  78. package/assets/esri/core/workers/chunks/b7a3a7f7fb747f9689d7.js +1 -0
  79. package/assets/esri/core/workers/chunks/b81780e5e7cd9a1a010a.js +1 -0
  80. package/assets/esri/core/workers/chunks/b98366d8a5bc6cc2b219.js +1 -0
  81. package/assets/esri/core/workers/chunks/bb7e0334f438daa665da.js +1 -0
  82. package/assets/esri/core/workers/chunks/{5690b49f355a5e2083a9.js → c17c3453d014dc73fe0b.js} +1 -1
  83. package/assets/esri/core/workers/chunks/c1be9c4e59925a897a91.js +1 -0
  84. package/assets/esri/core/workers/chunks/{0389ebb63510dd7024de.js → c24ce19ab8580364c703.js} +2 -2
  85. package/assets/esri/core/workers/chunks/c2882a9e67124b7c18be.js +1 -0
  86. package/assets/esri/core/workers/chunks/c6112dcd6b36e256d7b5.js +1 -0
  87. package/assets/esri/core/workers/chunks/c8ae8d1b456ace0b383b.js +1 -0
  88. package/assets/esri/core/workers/chunks/{3a018c78859b5edec4fd.js → ca700e9e1bced9f99899.js} +1 -1
  89. package/assets/esri/core/workers/chunks/cc8e6d1eb90221103023.js +1 -0
  90. package/assets/esri/core/workers/chunks/d0d836502321e7a80e61.js +1 -0
  91. package/assets/esri/core/workers/chunks/d2fa8bd3f4cd3cf6b436.js +1 -0
  92. package/assets/esri/core/workers/chunks/d4b97ca16d79809ed6f2.js +1 -0
  93. package/assets/esri/core/workers/chunks/e00000468fb8ec2b3d43.js +1 -0
  94. package/assets/esri/core/workers/chunks/e0d6292aaa3f8a796de3.js +1 -0
  95. package/assets/esri/core/workers/chunks/ee582bbe7365b678ec54.js +1 -0
  96. package/assets/esri/core/workers/chunks/f4053e4e2d6e678db48a.js +1 -0
  97. package/assets/esri/core/workers/chunks/f5dbda08d7fd4bed1c62.js +1 -0
  98. package/assets/esri/core/workers/chunks/{a7dbd38bc216713044fc.js → fe21b2d31fbf83224e6b.js} +1 -1
  99. package/assets/esri/core/workers/chunks/ff8de370abf661768380.js +1 -0
  100. package/assets/esri/themes/base/widgets/_FeatureTable.scss +2 -0
  101. package/assets/esri/themes/base/widgets/_Grid.scss +14 -0
  102. package/assets/esri/themes/dark/main.css +1 -1
  103. package/assets/esri/themes/light/main.css +1 -1
  104. package/assets/esri/themes/light/view.css +1 -1
  105. package/chunks/HUDMaterial.glsl.js +34 -45
  106. package/chunks/LineCallout.glsl.js +10 -14
  107. package/config.js +1 -1
  108. package/core/timeUtils.js +1 -1
  109. package/editing/sharedTemplates/executor/support/createFeatureServiceEdit.js +1 -1
  110. package/kernel.js +1 -1
  111. package/layers/VoxelWasmPerSceneView.js +1 -1
  112. package/package.json +2 -2
  113. package/rest/query/operations/pbfFeatureServiceParser.js +1 -1
  114. package/support/actions/ActionBase.d.ts +8 -0
  115. package/support/actions/ActionBase.js +1 -1
  116. package/support/actions/ActionButton.js +1 -1
  117. package/support/actions/ActionToggle.js +1 -1
  118. package/support/basemapDefinitions.js +1 -1
  119. package/support/revision.js +1 -1
  120. package/symbols/CIMSymbol.d.ts +3 -3
  121. package/symbols/ExtrudeSymbol3DLayer.d.ts +1 -1
  122. package/symbols/FillSymbol.d.ts +1 -1
  123. package/symbols/FillSymbol3DLayer.d.ts +1 -1
  124. package/symbols/IconSymbol3DLayer.d.ts +1 -1
  125. package/symbols/LabelSymbol3D.d.ts +1 -1
  126. package/symbols/LineSymbol.d.ts +1 -1
  127. package/symbols/LineSymbol3D.d.ts +1 -1
  128. package/symbols/LineSymbol3DLayer.d.ts +1 -1
  129. package/symbols/LineSymbolMarker.d.ts +1 -1
  130. package/symbols/MarkerSymbol.d.ts +1 -1
  131. package/symbols/MeshSymbol3D.d.ts +1 -1
  132. package/symbols/ObjectSymbol3DLayer.d.ts +1 -1
  133. package/symbols/PathSymbol3DLayer.d.ts +1 -1
  134. package/symbols/PictureFillSymbol.d.ts +1 -1
  135. package/symbols/PictureMarkerSymbol.d.ts +1 -1
  136. package/symbols/PointSymbol3D.d.ts +1 -1
  137. package/symbols/PolygonSymbol3D.d.ts +1 -1
  138. package/symbols/SimpleFillSymbol.d.ts +1 -1
  139. package/symbols/SimpleLineSymbol.d.ts +1 -1
  140. package/symbols/SimpleMarkerSymbol.d.ts +1 -1
  141. package/symbols/Symbol.d.ts +1 -1
  142. package/symbols/Symbol3D.d.ts +1 -1
  143. package/symbols/Symbol3DLayer.d.ts +1 -1
  144. package/symbols/TextSymbol.d.ts +1 -1
  145. package/symbols/TextSymbol3DLayer.d.ts +1 -1
  146. package/symbols/WebStyleSymbol.d.ts +1 -1
  147. package/time/TimeExtent.js +1 -1
  148. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueFill.js +1 -1
  149. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueLine.js +1 -1
  150. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  151. package/views/3d/interactive/visualElements/PointVisualElement.js +1 -1
  152. package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
  153. package/views/3d/layers/IntegratedMeshNormals.js +1 -1
  154. package/views/3d/layers/VoxelLayerView3D.js +1 -1
  155. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  156. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  157. package/views/3d/layers/graphics/Graphics3DLineCalloutSymbolLayer.js +1 -1
  158. package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
  159. package/views/3d/layers/graphics/GraphicsDeconflictor.js +1 -1
  160. package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
  161. package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
  162. package/views/3d/support/gaussianSplatting/GaussianSplatIntersectionHandler.js +1 -1
  163. package/views/3d/support/gaussianSplatting/GaussianTile.js +1 -1
  164. package/views/3d/webgl/RenderNode.js +1 -1
  165. package/views/3d/webgl-engine/collections/Component/ComponentDrawParameters.js +1 -1
  166. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  167. package/views/3d/webgl-engine/core/renderPasses/AllRenderPasses.js +1 -1
  168. package/views/3d/webgl-engine/core/renderPasses/RenderPass.js +1 -1
  169. package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
  170. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexNormal.glsl.js +13 -3
  171. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js +27 -9
  172. package/views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js +7 -6
  173. package/views/3d/webgl-engine/effects/RenderPluginManager.js +1 -1
  174. package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
  175. package/views/3d/webgl-engine/effects/highlight/HighlightApplyTechnique.js +1 -1
  176. package/views/3d/webgl-engine/effects/highlight/HighlightBlurTechnique.js +1 -1
  177. package/views/3d/webgl-engine/effects/highlight/HighlightDownsampleTechnique.js +1 -1
  178. package/views/3d/webgl-engine/effects/highlight/HighlightToSingleTechnique.js +1 -1
  179. package/views/3d/webgl-engine/effects/ssao/SSAOBlurTechnique.js +1 -1
  180. package/views/3d/webgl-engine/effects/stars/Stars.js +1 -1
  181. package/views/3d/webgl-engine/effects/transparency/OITBlend.js +1 -1
  182. package/views/3d/webgl-engine/effects/transparency/OITBlendTechnique.js +1 -1
  183. package/views/3d/webgl-engine/effects/transparency/OITDimTechnique.js +1 -1
  184. package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
  185. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  186. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  187. package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
  188. package/views/3d/webgl-engine/shaders/HUDMaterial.glsl.js +1 -1
  189. package/views/3d/webgl-engine/shaders/HUDMaterialTechnique.js +1 -1
  190. package/views/3d/webgl-engine/shaders/HUDMaterialTechniqueConfiguration.js +1 -1
  191. package/views/3d/webgl-engine/shaders/LineCallout.glsl.js +1 -1
  192. package/views/3d/webgl-engine/shaders/LineCalloutTechniqueConfiguration.js +1 -1
  193. package/views/3d/webgl-engine/statistics/RendererPerformanceInfo.js +1 -1
  194. package/views/3d/webgl.js +1 -1
  195. package/views/VideoView.js +1 -1
  196. package/views/draw/DrawTool.js +1 -1
  197. package/views/webgl/RenderingContext.js +1 -1
  198. package/widgets/ElevationProfile/ElevationProfileInteraction.js +1 -1
  199. package/widgets/ElevationProfile/ElevationProfileViewModel.js +1 -1
  200. package/widgets/FeatureTable/support/ColumnTemplateBase.d.ts +3 -3
  201. package/widgets/OrientedImageryViewer/support/geometryUtils.js +1 -1
  202. package/widgets/Popup/actions.js +1 -1
  203. package/widgets/Sketch/SketchViewModel.js +1 -1
  204. package/widgets/TimeSlider/TimeSliderViewModel.js +1 -1
  205. package/widgets/TimeSlider.js +1 -1
  206. package/assets/esri/core/workers/chunks/011b31df019b3ce2277e.js +0 -1
  207. package/assets/esri/core/workers/chunks/018859b79f9ce7528ac7.js +0 -1
  208. package/assets/esri/core/workers/chunks/05e5b9082c0a396df7e5.js +0 -1
  209. package/assets/esri/core/workers/chunks/0711c856144cd8700e7e.js +0 -1
  210. package/assets/esri/core/workers/chunks/0ca9953afaea7c7e11e0.js +0 -1
  211. package/assets/esri/core/workers/chunks/1482262d0788ee65ddf7.js +0 -1
  212. package/assets/esri/core/workers/chunks/15d7c9f5a55985ed00b4.js +0 -1
  213. package/assets/esri/core/workers/chunks/16b9ac49d13057b3aff5.js +0 -1
  214. package/assets/esri/core/workers/chunks/172137cc98be03de1436.js +0 -1
  215. package/assets/esri/core/workers/chunks/179b3385c24ad8a05e1d.js +0 -1
  216. package/assets/esri/core/workers/chunks/18a40606e4c39f244ecd.js +0 -1
  217. package/assets/esri/core/workers/chunks/19cb4720e92ac3c0478c.js +0 -1
  218. package/assets/esri/core/workers/chunks/1d697642fb2a6332b7f9.js +0 -1
  219. package/assets/esri/core/workers/chunks/2003dae2d7f6d52ea643.js +0 -1
  220. package/assets/esri/core/workers/chunks/209acb3ad16c99bb506c.js +0 -1
  221. package/assets/esri/core/workers/chunks/23079a2e584fca0bdb66.js +0 -1
  222. package/assets/esri/core/workers/chunks/2e06baf6469820697f17.js +0 -1
  223. package/assets/esri/core/workers/chunks/2ecfd6edab796194bf88.js +0 -1
  224. package/assets/esri/core/workers/chunks/2f3aeaa25a76ab94b8e5.js +0 -1
  225. package/assets/esri/core/workers/chunks/33de1d899a4fa9ab6ab1.js +0 -1
  226. package/assets/esri/core/workers/chunks/359d3ba9d6e3b1de05d1.js +0 -1
  227. package/assets/esri/core/workers/chunks/36fd18a05ba503e6f3b5.js +0 -1
  228. package/assets/esri/core/workers/chunks/38d5dd4d457428244302.js +0 -1
  229. package/assets/esri/core/workers/chunks/3a8f2f6ac3c3e7e71c00.js +0 -1
  230. package/assets/esri/core/workers/chunks/3ad1edf199e7159f3cc2.js +0 -1
  231. package/assets/esri/core/workers/chunks/452d71789a1b77cff48d.js +0 -1
  232. package/assets/esri/core/workers/chunks/48a56b19bf825f05cc6e.js +0 -1
  233. package/assets/esri/core/workers/chunks/48e66b78274b82478bae.js +0 -1
  234. package/assets/esri/core/workers/chunks/48fb1520cb8c5ce248d9.js +0 -1
  235. package/assets/esri/core/workers/chunks/4e9b3b4b3dcce94c99a5.js +0 -1
  236. package/assets/esri/core/workers/chunks/5028de543cc1b8e60e65.js +0 -1
  237. package/assets/esri/core/workers/chunks/544bfa97837770a8792f.js +0 -1
  238. package/assets/esri/core/workers/chunks/55d4483b1862077e3732.js +0 -1
  239. package/assets/esri/core/workers/chunks/561484ab6ed564e4b90f.js +0 -1
  240. package/assets/esri/core/workers/chunks/592f6bf0283152481f21.js +0 -1
  241. package/assets/esri/core/workers/chunks/5b70ee8122262de5bbdf.js +0 -1
  242. package/assets/esri/core/workers/chunks/6138a528c3820af81bc6.js +0 -1
  243. package/assets/esri/core/workers/chunks/72cd450b24fdfcef6547.js +0 -1
  244. package/assets/esri/core/workers/chunks/75fd96fd9557ac1f8e10.js +0 -1
  245. package/assets/esri/core/workers/chunks/777b0e07f72c42470d36.js +0 -1
  246. package/assets/esri/core/workers/chunks/7b297a2f712361bfae2e.js +0 -1
  247. package/assets/esri/core/workers/chunks/7d274a077bdfa8c485e8.js +0 -1
  248. package/assets/esri/core/workers/chunks/7dd1e93469d0b1d652bc.js +0 -1
  249. package/assets/esri/core/workers/chunks/835a929e37811d0f82cb.js +0 -1
  250. package/assets/esri/core/workers/chunks/843c505148ed728d3c30.js +0 -1
  251. package/assets/esri/core/workers/chunks/8dcc8df5925f66e45b8c.js +0 -1
  252. package/assets/esri/core/workers/chunks/8eae33c4d8932b7a6bc1.js +0 -1
  253. package/assets/esri/core/workers/chunks/91e56959b2fddf1a9743.js +0 -1
  254. package/assets/esri/core/workers/chunks/925980d26d71987ac80c.js +0 -1
  255. package/assets/esri/core/workers/chunks/9bd5c56f879eb935d906.js +0 -1
  256. package/assets/esri/core/workers/chunks/aa9c11f25d95372998a3.js +0 -1
  257. package/assets/esri/core/workers/chunks/aec33bdb355bd04f28ae.js +0 -1
  258. package/assets/esri/core/workers/chunks/af618a1c55c15e17189b.js +0 -1
  259. package/assets/esri/core/workers/chunks/b35ea099334c867bde02.js +0 -1
  260. package/assets/esri/core/workers/chunks/b4254fcb2051c873f2ba.js +0 -1
  261. package/assets/esri/core/workers/chunks/b730131e52f9220db031.js +0 -1
  262. package/assets/esri/core/workers/chunks/b81824d62be92ab595f7.js +0 -1
  263. package/assets/esri/core/workers/chunks/b9d68a5dcb50999d3a90.js +0 -1
  264. package/assets/esri/core/workers/chunks/bae7376b554cac4a8f96.js +0 -1
  265. package/assets/esri/core/workers/chunks/bcd701892ee120e13a18.js +0 -1
  266. package/assets/esri/core/workers/chunks/c1c006c86cf31f934684.js +0 -1
  267. package/assets/esri/core/workers/chunks/cb6a7ca4ba2cf0b5ced7.js +0 -1
  268. package/assets/esri/core/workers/chunks/d70678598f4080adfb39.js +0 -1
  269. package/assets/esri/core/workers/chunks/d72d5031887373d35610.js +0 -1
  270. package/assets/esri/core/workers/chunks/d8896c57a414f2450190.js +0 -1
  271. package/assets/esri/core/workers/chunks/da780342f16e65b55ac8.js +0 -1
  272. package/assets/esri/core/workers/chunks/db005d9419bb718b3962.js +0 -1
  273. package/assets/esri/core/workers/chunks/e063cce778944fe97dd3.js +0 -1
  274. package/assets/esri/core/workers/chunks/e2bdb0e87422e222646e.js +0 -1
  275. package/assets/esri/core/workers/chunks/e4faccd48060349b8da1.js +0 -1
  276. package/assets/esri/core/workers/chunks/ea245d3a6fd601fffd88.js +0 -1
  277. package/assets/esri/core/workers/chunks/efb2a8879011d2d77a81.js +0 -1
  278. package/assets/esri/core/workers/chunks/f6c9742691ccdaed44a2.js +0 -1
  279. package/assets/esri/core/workers/chunks/f82a95c46f0d579d5bf5.js +0 -1
  280. package/assets/esri/core/workers/chunks/fd9ef90e2ebb7fed62b1.js +0 -1
  281. package/assets/esri/core/workers/chunks/feac196493ccd087de35.js +0 -1
  282. package/views/3d/webgl-engine/core/shaderLibrary/hud/HUDOcclusionPass.glsl.js +0 -19
  283. package/views/3d/webgl-engine/core/shaderLibrary/hud/HUDVisibility.glsl.js +0 -9
  284. /package/assets/esri/core/workers/chunks/{0389ebb63510dd7024de.js.LICENSE.txt → c24ce19ab8580364c703.js.LICENSE.txt} +0 -0
@@ -1,10 +1,10 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{copy as e,set as o}from"../core/libs/gl-matrix-2/math/vec2.js";import{create as i}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import{ZEROS as r}from"../core/libs/gl-matrix-2/factories/vec4f64.js";import{RejectBySlice as t}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{ObjectAndLayerIdColor as a}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js";import{AlignPixel as l}from"../views/3d/webgl-engine/core/shaderLibrary/hud/AlignPixel.glsl.js";import{HUD as s}from"../views/3d/webgl-engine/core/shaderLibrary/hud/HUD.glsl.js";import{HUDOcclusionPass as n}from"../views/3d/webgl-engine/core/shaderLibrary/hud/HUDOcclusionPass.glsl.js";import{HUDVisibility as c}from"../views/3d/webgl-engine/core/shaderLibrary/hud/HUDVisibility.glsl.js";import{OutputHighlight as d}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js";import{ReadDepth as u}from"../views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js";import{positionOutsideClipSpace as f}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PositionOutsideClipSpace.js";import{VisualVariables as p}from"../views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js";import{ColorConversion as g}from"../views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import{ScreenSizePerspective as m,addScreenSizePerspective as v,addScreenSizePerspectiveAlignment as h}from"../views/3d/webgl-engine/core/shaderLibrary/util/ScreenSizePerspective.glsl.js";import{addPixelRatio as x}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float2PassUniform as b}from"../views/3d/webgl-engine/core/shaderModules/Float2PassUniform.js";import{Float4BindUniform as C}from"../views/3d/webgl-engine/core/shaderModules/Float4BindUniform.js";import{Float4PassUniform as w}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{FloatPassUniform as S}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as z,If as P}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{IntegerPassUniform as y}from"../views/3d/webgl-engine/core/shaderModules/IntegerPassUniform.js";import{Texture2DBindUniform as j}from"../views/3d/webgl-engine/core/shaderModules/Texture2DBindUniform.js";import{Texture2DPassUniform as A}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{styleToEffect as O}from"../views/3d/webgl-engine/effects/focusArea/FocusAreaColorNode.js";import{alphaCutoff as F}from"../views/3d/webgl-engine/shaders/alphaCutoff.glsl.js";import{outputColorHighlightOLID as D}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js";import{ShaderBuilder as $}from"../views/webgl/ShaderBuilder.js";const B=e=>e?O[e]:0;function V(e){const i=new $;if(i.include(s,e),i.vertex.include(t,e),e.occlusionPass)return i.include(n,e),i;const{output:O,oitPass:V,hasOcclusionTexture:T,signedDistanceFieldEnabled:H,useVisibilityPixel:q,pixelSnappingEnabled:R,hasEmission:k,hasScreenSizePerspective:I,debugDrawLabelBorder:E,hasVVSize:G,hasVVColor:N,hasRotation:J,occludedFragmentFade:K,sampleSignedDistanceFieldTexelCenter:Q,hasVertexColor:W,hasVertexSize:X,hasVertexRotation:Y,hasVertexUVi:Z}=e;i.include(m),i.include(p,e),i.include(a,e),i.include(D,e),q&&i.include(c);const{vertex:ee,fragment:oe}=i;oe.include(g),oe.code.add(z`
2
+ import{copy as e,set as o}from"../core/libs/gl-matrix-2/math/vec2.js";import{create as r}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import{ZEROS as i}from"../core/libs/gl-matrix-2/factories/vec4f64.js";import{RejectBySlice as t}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{ObjectAndLayerIdColor as a}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js";import{AlignPixel as l}from"../views/3d/webgl-engine/core/shaderLibrary/hud/AlignPixel.glsl.js";import{HUD as s}from"../views/3d/webgl-engine/core/shaderLibrary/hud/HUD.glsl.js";import{OutputHighlight as n}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js";import{ReadDepth as c}from"../views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js";import{positionOutsideClipSpace as d}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PositionOutsideClipSpace.js";import{VisualVariables as u}from"../views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js";import{ColorConversion as f}from"../views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import{ScreenSizePerspective as p,addScreenSizePerspective as g,addScreenSizePerspectiveAlignment as m}from"../views/3d/webgl-engine/core/shaderLibrary/util/ScreenSizePerspective.glsl.js";import{addPixelRatio as v}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float2PassUniform as h}from"../views/3d/webgl-engine/core/shaderModules/Float2PassUniform.js";import{Float4BindUniform as x}from"../views/3d/webgl-engine/core/shaderModules/Float4BindUniform.js";import{Float4PassUniform as b}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{FloatPassUniform as C}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as w,If as S}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{IntegerPassUniform as z}from"../views/3d/webgl-engine/core/shaderModules/IntegerPassUniform.js";import{Texture2DBindUniform as P}from"../views/3d/webgl-engine/core/shaderModules/Texture2DBindUniform.js";import{Texture2DPassUniform as y}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{styleToEffect as A}from"../views/3d/webgl-engine/effects/focusArea/FocusAreaColorNode.js";import{alphaCutoff as j}from"../views/3d/webgl-engine/shaders/alphaCutoff.glsl.js";import{outputColorHighlightOLID as O}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js";import{ShaderBuilder as F}from"../views/webgl/ShaderBuilder.js";const D=e=>e?A[e]:0;function B(e){const r=new F;r.include(s,e),r.vertex.include(t,e);const{output:A,oitPass:B,hasOcclusionTexture:M,signedDistanceFieldEnabled:U,pixelSnappingEnabled:_,hasEmission:q,hasScreenSizePerspective:R,debugDrawLabelBorder:k,hasVVSize:H,hasVVColor:I,hasRotation:E,occludedFragmentFade:G,sampleSignedDistanceFieldTexelCenter:N,hasVertexColor:J,hasVertexSize:K,hasVertexRotation:Q,hasVertexUVi:W}=e;r.include(p),r.include(u,e),r.include(a,e),r.include(O,e);const{vertex:X,fragment:Y}=r;Y.include(f),Y.code.add(w`
3
3
  vec4 applyFocusAreaStyle(vec4 color, int style) {
4
4
  const float factor = 0.46;
5
5
  const float factorBright = 0.32;
6
6
 
7
- if (style == ${z.int(0)}) {
7
+ if (style == ${w.int(0)}) {
8
8
  float luma = (color.r + color.g + color.b) / 3.0;
9
9
  float bright = luma * (1.0 - 0.6 * factorBright) + 0.6 * factorBright * color.a;
10
10
  float brightScaled = bright * factorBright;
@@ -14,49 +14,39 @@ import{copy as e,set as o}from"../core/libs/gl-matrix-2/math/vec2.js";import{cre
14
14
  float darkScaled = factor * factor;
15
15
  return vec4(color.rgb * darkScaled, color.a * factor);
16
16
  }
17
- `),i.varyings.add("vcolor","vec4"),i.varyings.add("vtc","vec2"),i.varyings.add("vsize","vec2");const ie=8===O,re=ie&&q;re&&i.varyings.add("voccluded","float"),ee.uniforms.add(new C("viewport",e=>e.camera.fullViewport),new b("screenOffset",(e,i)=>o(M,2*e.screenOffset[0]*i.camera.pixelRatio,2*e.screenOffset[1]*i.camera.pixelRatio)),new b("anchorPosition",e=>U(e)),new w("materialColor",({color:e})=>e),new S("materialRotation",e=>e.rotation),new b("materialSize",e=>e.size),new A("tex",e=>e.texture)),x(ee),H&&(ee.uniforms.add(new w("outlineColor",e=>e.outlineColor)),oe.uniforms.add(new w("outlineColor",e=>L(e)?e.outlineColor:r),new S("outlineSize",e=>L(e)?e.outlineSize:0))),R&&ee.include(l),I&&(v(ee),h(ee)),E&&i.varyings.add("debugBorderCoords","vec4"),i.attributes.add("uv0","vec2"),Z&&i.attributes.add("uvi","vec4"),W&&i.attributes.add("color","vec4"),X&&i.attributes.add("size","vec2"),Y&&i.attributes.add("rotation","float"),(G||N)&&i.attributes.add("featureAttribute","vec4"),ee.main.add(z`
17
+ `),r.varyings.add("vcolor","vec4"),r.varyings.add("vtc","vec2"),r.varyings.add("vsize","vec2");const Z=8===A;X.uniforms.add(new x("viewport",e=>e.camera.fullViewport),new h("screenOffset",(e,r)=>o(L,2*e.screenOffset[0]*r.camera.pixelRatio,2*e.screenOffset[1]*r.camera.pixelRatio)),new h("anchorPosition",e=>V(e)),new b("materialColor",({color:e})=>e),new C("materialRotation",e=>e.rotation),new h("materialSize",e=>e.size),new y("tex",e=>e.texture)),v(X),U&&(X.uniforms.add(new b("outlineColor",e=>e.outlineColor)),Y.uniforms.add(new b("outlineColor",e=>$(e)?e.outlineColor:i),new C("outlineSize",e=>$(e)?e.outlineSize:0))),_&&X.include(l),R&&(g(X),m(X)),k&&r.varyings.add("debugBorderCoords","vec4"),r.attributes.add("uv0","vec2"),W&&r.attributes.add("uvi","vec4"),J&&r.attributes.add("color","vec4"),K&&r.attributes.add("size","vec2"),Q&&r.attributes.add("rotation","float"),(H||I)&&r.attributes.add("featureAttribute","vec4"),X.main.add(w`
18
18
  ProjectHUDAux projectAux;
19
19
  vec4 posProj = projectPositionHUD(projectAux);
20
20
  forwardObjectAndLayerIdColor();
21
21
 
22
22
  if (rejectBySlice(projectAux.posModel)) {
23
- gl_Position = ${f};
23
+ gl_Position = ${d};
24
24
  return;
25
25
  }
26
26
 
27
- vec2 vertexSize = materialSize${P(X," * size")};
27
+ vec2 vertexSize = materialSize${S(K," * size")};
28
28
  vec2 inputSize;
29
- ${P(I,z`
29
+ ${S(R,w`
30
30
  inputSize = screenSizePerspectiveScaleVec2(vertexSize, projectAux.absCosAngle, projectAux.distanceToCamera, screenSizePerspective);
31
- vec2 screenOffsetScaled = screenSizePerspectiveScaleVec2(screenOffset, projectAux.absCosAngle, projectAux.distanceToCamera, screenSizePerspectiveAlignment);`,z`
31
+ vec2 screenOffsetScaled = screenSizePerspectiveScaleVec2(screenOffset, projectAux.absCosAngle, projectAux.distanceToCamera, screenSizePerspectiveAlignment);`,w`
32
32
  inputSize = vertexSize;
33
33
  vec2 screenOffsetScaled = screenOffset;`)}
34
- ${P(G,z`inputSize *= vvScale(featureAttribute).xx;`)}
34
+ ${S(H,w`inputSize *= vvScale(featureAttribute).xx;`)}
35
35
 
36
36
  vec2 combinedSize = inputSize * pixelRatio;
37
37
  vec4 quadOffset = vec4(0.0);
38
-
39
- ${P(q,z`
40
- bool visible = testHUDVisibility(posProj);
41
- if (!visible) {
42
- vtc = vec2(0.0);
43
- ${P(E,"debugBorderCoords = vec4(0.5, 0.5, 1.5 / combinedSize);")}
44
- return;
45
- }
46
- `)}
47
- ${P(re,z`voccluded = visible ? 0.0 : 1.0;`)}
48
- `);const te=z`
49
- ${P(Z,z`
38
+ `);const ee=w`
39
+ ${S(W,w`
50
40
  vec2 texSize = vec2(textureSize(tex, 0));
51
41
  vec2 uv = mix(uvi.xy, uvi.zw, bvec2(uv0)) / texSize;
52
- `,z`
42
+ `,w`
53
43
  vec2 uv = mix(vec2(0.), vec2(1.), bvec2(uv0));
54
44
  `)}
55
45
 
56
46
  quadOffset.xy = (uv0 - anchorPosition) * 2.0 * combinedSize;
57
47
 
58
- ${P(J,z`
59
- float angle = radians(materialRotation${P(Y," + rotation")});
48
+ ${S(E,w`
49
+ float angle = radians(materialRotation${S(Q," + rotation")});
60
50
  float cosAngle = cos(angle);
61
51
  float sinAngle = sin(angle);
62
52
  mat2 rotate = mat2(cosAngle, -sinAngle, sinAngle, cosAngle);
@@ -65,34 +55,34 @@ import{copy as e,set as o}from"../core/libs/gl-matrix-2/math/vec2.js";import{cre
65
55
  `)}
66
56
 
67
57
  quadOffset.xy = (quadOffset.xy + screenOffsetScaled) / viewport.zw * posProj.w;
68
- `,ae=R?H?z`posProj = alignToPixelOrigin(posProj, viewport.zw) + quadOffset;`:z`posProj += quadOffset;
58
+ `,oe=_?U?w`posProj = alignToPixelOrigin(posProj, viewport.zw) + quadOffset;`:w`posProj += quadOffset;
69
59
  if (inputSize.x == vertexSize.x) {
70
60
  posProj = alignToPixelOrigin(posProj, viewport.zw);
71
- }`:z`posProj += quadOffset;`;ee.include(F),ee.main.add(z`
72
- ${te}
73
- ${N?"vcolor = interpolateVVColor(featureAttribute.y) * materialColor;":W?"vcolor = color * materialColor;":"vcolor = materialColor;"}
61
+ }`:w`posProj += quadOffset;`;X.include(j),X.main.add(w`
62
+ ${ee}
63
+ ${I?"vcolor = interpolateVVColor(featureAttribute.y) * materialColor;":J?"vcolor = color * materialColor;":"vcolor = materialColor;"}
74
64
 
75
- ${P(9===O,z`vcolor.a = 1.0;`)}
65
+ ${S(9===A,w`vcolor.a = 1.0;`)}
76
66
 
77
67
  bool alphaDiscard = vcolor.a < alphaCutoff;
78
- ${P(H,"alphaDiscard = alphaDiscard && outlineColor.a < alphaCutoff;")}
68
+ ${S(U,"alphaDiscard = alphaDiscard && outlineColor.a < alphaCutoff;")}
79
69
  if (alphaDiscard) {
80
70
  // "early discard" if both symbol color (= fill) and outline color (if applicable) are transparent
81
71
  gl_Position = vec4(1e38, 1e38, 1e38, 1.0);
82
72
  return;
83
73
  } else {
84
- ${ae}
74
+ ${oe}
85
75
  gl_Position = posProj;
86
76
  }
87
77
 
88
78
  vtc = uv;
89
79
 
90
- ${P(E,z`debugBorderCoords = vec4(uv0, 1.5 / combinedSize);`)}
80
+ ${S(k,w`debugBorderCoords = vec4(uv0, 1.5 / combinedSize);`)}
91
81
  vsize = inputSize;
92
- `);const le=0===O&&e.hasFocusAreaStyle&&!e.draped;switch(oe.uniforms.add(new A("tex",e=>e.texture)),le&&oe.uniforms.add(new y("focusAreaStyle",e=>B(e.focusAreaStyle))),K&&!ie&&(oe.include(u),oe.uniforms.add(new j("depthMap",e=>e.mainDepth),new S("occludedOpacity",e=>e.occludedFragmentOpacity?.value??1))),T&&oe.uniforms.add(new j("texOcclusion",e=>e.hudOcclusion?.attachment)),E?oe.main.add("\n float isBorder = float(any(lessThan(debugBorderCoords.xy, debugBorderCoords.zw)) || any(greaterThan(debugBorderCoords.xy, 1.0 - debugBorderCoords.zw)));\n // don't discard fragments on debug border\n float textureAlphaCutoff = isBorder > 0.0 ? 0.0 : alphaCutoff;\n "):oe.main.add("float textureAlphaCutoff = alphaCutoff;"),oe.main.add("vec2 samplePos = vtc;"),Q&&oe.main.add(z`float txSize = float(textureSize(tex, 0).x);
82
+ `);const re=0===A&&e.hasFocusAreaStyle&&!e.draped;switch(Y.uniforms.add(new y("tex",e=>e.texture)),re&&Y.uniforms.add(new z("focusAreaStyle",e=>D(e.focusAreaStyle))),G&&!Z&&(Y.include(c),Y.uniforms.add(new P("depthMap",e=>e.mainDepth),new C("occludedOpacity",e=>e.occludedFragmentOpacity?.value??1))),M&&Y.uniforms.add(new P("texOcclusion",e=>e.hudOcclusion?.attachment)),k?Y.main.add("\n float isBorder = float(any(lessThan(debugBorderCoords.xy, debugBorderCoords.zw)) || any(greaterThan(debugBorderCoords.xy, 1.0 - debugBorderCoords.zw)));\n // don't discard fragments on debug border\n float textureAlphaCutoff = isBorder > 0.0 ? 0.0 : alphaCutoff;\n "):Y.main.add("float textureAlphaCutoff = alphaCutoff;"),Y.main.add("vec2 samplePos = vtc;"),N&&Y.main.add(w`float txSize = float(textureSize(tex, 0).x);
93
83
  float texelSize = 1.0 / txSize;
94
84
  vec2 scaleFactor = (vsize - txSize) * texelSize;
95
- samplePos += (vec2(1.0, -1.0) * texelSize) * scaleFactor;`),H?oe.main.add(z`
85
+ samplePos += (vec2(1.0, -1.0) * texelSize) * scaleFactor;`),U?Y.main.add(w`
96
86
  vec4 fillPixelColor = vcolor;
97
87
 
98
88
  // Get distance in output units (i.e. pixels)
@@ -124,35 +114,34 @@ samplePos += (vec2(1.0, -1.0) * texelSize) * scaleFactor;`),H?oe.main.add(z`
124
114
  vec3 compositeColor = vec3(outlinePixelColor) * outlinePixelColor.a +
125
115
  vec3(fillPixelColor) * fillPixelColor.a * (1.0 - outlinePixelColor.a);
126
116
 
127
- ${P(!ie,z`fragColor = vec4(compositeColor, compositeAlpha);`)}
117
+ ${S(!Z,w`fragColor = vec4(compositeColor, compositeAlpha);`)}
128
118
  } else {
129
119
  if (fillAlphaFactor < textureAlphaCutoff) {
130
120
  discard;
131
121
  }
132
122
 
133
- ${P(!ie,z`fragColor = premultiplyAlpha(fillPixelColor);`)}
123
+ ${S(!Z,w`fragColor = premultiplyAlpha(fillPixelColor);`)}
134
124
  }
135
125
 
136
126
  // visualize SDF:
137
127
  // fragColor = vec4(clamp(-pixelDistance/vsize.x*2.0, 0.0, 1.0), clamp(pixelDistance/vsize.x*2.0, 0.0, 1.0), 0.0, 1.0);
138
- `):oe.main.add(z`
128
+ `):Y.main.add(w`
139
129
  vec4 texColor = texture(tex, samplePos, -0.5);
140
130
  if (texColor.a < textureAlphaCutoff) {
141
131
  discard;
142
132
  }
143
- ${P(!ie,z`fragColor = texColor * premultiplyAlpha(vcolor);`)}
144
- `),K&&!ie&&oe.main.add(z`
133
+ ${S(!Z,w`fragColor = texColor * premultiplyAlpha(vcolor);`)}
134
+ `),G&&!Z&&Y.main.add(w`
145
135
  float zSample = -linearizeDepth(texelFetch(depthMap, ivec2(gl_FragCoord.xy), 0).x);
146
136
  float zFragment = -linearizeDepth(gl_FragCoord.z);
147
- if (zSample < ${z.float(1-_)} * zFragment) {
137
+ if (zSample < ${w.float(1-T)} * zFragment) {
148
138
  fragColor *= occludedOpacity;
149
139
  }
150
- `),T&&oe.main.add("fragColor *= texelFetch(texOcclusion, ivec2(gl_FragCoord.xy), 0).r;"),!ie&&E&&oe.main.add("fragColor = mix(fragColor, vec4(1.0, 0.0, 1.0, 1.0), isBorder * 0.5);"),2===V&&oe.main.add(z`if (fragColor.a < alphaCutoff) {
140
+ `),M&&Y.main.add("fragColor *= texelFetch(texOcclusion, ivec2(gl_FragCoord.xy), 0).r;"),!Z&&k&&Y.main.add("fragColor = mix(fragColor, vec4(1.0, 0.0, 1.0, 1.0), isBorder * 0.5);"),2===B&&Y.main.add(w`if (fragColor.a < alphaCutoff) {
151
141
  discard;
152
- }`),le&&oe.main.add(z`fragColor = applyFocusAreaStyle(fragColor, focusAreaStyle);`),O){case 0:oe.main.add(z`
142
+ }`),re&&Y.main.add(w`fragColor = applyFocusAreaStyle(fragColor, focusAreaStyle);`),A){case 0:Y.main.add(w`
153
143
  // Unlike other materials, the fragment shader outputs premultiplied colors.
154
144
  // Disable this for front face rendering for correct OIT compositing.
155
- ${P(2===V,z`fragColor.rgb /= fragColor.a;`)}
156
- ${P(k,z`fragEmission = vec4(0.0);`)}
157
- ${P(1===V,z`fragAlpha = fragColor.a;`)}`);break;case 9:oe.main.add(z`outputObjectAndLayerIdColor();`);break;case 8:i.include(d,e),oe.main.add(z`
158
- outputHighlight(${P(re,z`voccluded == 1.0`,z`false`)});`)}return i}function L(e){return e.outlineColor[3]>0&&e.outlineSize>0}function U(o){return o.textureIsSignedDistanceField?T(o.anchorPosition,o.distanceFieldBoundingBox,M):e(M,o.anchorPosition),M}const M=i();function T(e,i,r){o(r,e[0]*(i[2]-i[0])+i[0],e[1]*(i[3]-i[1])+i[1])}const _=.08,H=Object.freeze(Object.defineProperty({__proto__:null,build:V,calculateAnchorPosition:U},Symbol.toStringTag,{value:"Module"}));export{H,V as b,U as c};
145
+ ${S(2===B,w`fragColor.rgb /= fragColor.a;`)}
146
+ ${S(q,w`fragEmission = vec4(0.0);`)}
147
+ ${S(1===B,w`fragAlpha = fragColor.a;`)}`);break;case 9:Y.main.add(w`outputObjectAndLayerIdColor();`);break;case 8:r.include(n,e),Y.main.add(w`outputHighlight(false);`)}return r}function $(e){return e.outlineColor[3]>0&&e.outlineSize>0}function V(o){return o.textureIsSignedDistanceField?M(o.anchorPosition,o.distanceFieldBoundingBox,L):e(L,o.anchorPosition),L}const L=r();function M(e,r,i){o(i,e[0]*(r[2]-r[0])+r[0],e[1]*(r[3]-r[1])+r[1])}const T=.08,U=Object.freeze(Object.defineProperty({__proto__:null,build:B,calculateAnchorPosition:V},Symbol.toStringTag,{value:"Module"}));export{U as H,B as b,V as c};
@@ -1,5 +1,5 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{set as e}from"../core/libs/gl-matrix-2/math/vec2.js";import{create as i}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import{ZEROS as r}from"../core/libs/gl-matrix-2/factories/vec4f64.js";import{RejectBySlice as o}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{AlignPixel as t}from"../views/3d/webgl-engine/core/shaderLibrary/hud/AlignPixel.glsl.js";import{HUD as n}from"../views/3d/webgl-engine/core/shaderLibrary/hud/HUD.glsl.js";import{HUDVisibility as a}from"../views/3d/webgl-engine/core/shaderLibrary/hud/HUDVisibility.glsl.js";import{multipassGeometryTest as l}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MultipassGeometryTest.glsl.js";import{addScreenSizePerspectiveAlignment as d}from"../views/3d/webgl-engine/core/shaderLibrary/util/ScreenSizePerspective.glsl.js";import{Float2BindUniform as s}from"../views/3d/webgl-engine/core/shaderModules/Float2BindUniform.js";import{Float2PassUniform as c}from"../views/3d/webgl-engine/core/shaderModules/Float2PassUniform.js";import{Float4BindUniform as p}from"../views/3d/webgl-engine/core/shaderModules/Float4BindUniform.js";import{Float4PassUniform as g}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{FloatPassUniform as f}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{If as v,glsl as S}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{outputColorHighlightOLID as m}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js";import{ShaderBuilder as h}from"../views/webgl/ShaderBuilder.js";function w(i){const w=new h,{vertex:x,fragment:z}=w,{terrainDepthTest:y}=i;return x.include(t),w.include(n,i),w.vertex.include(o,i),i.hudDepth||w.include(m,i),w.attributes.add("uv0","vec2"),x.uniforms.add(new p("viewport",e=>e.camera.fullViewport),new f("lineSize",(e,i)=>e.size>0?Math.max(1,e.size)*i.camera.pixelRatio:0),new s("pixelToNDC",i=>e(b,2/i.camera.fullViewport[2],2/i.camera.fullViewport[3])),new f("borderSize",(e,i)=>e.borderColor?i.camera.pixelRatio:0),new c("screenOffset",(i,r)=>e(b,i.horizontalScreenOffset*r.camera.pixelRatio,0))),w.varyings.add("coverageSampling","vec4"),w.varyings.add("lineSizes","vec2"),y&&w.varyings.add("depth","float"),i.useVisibilityPixel&&w.include(a),i.hasScreenSizePerspective&&d(x),x.main.add(S`
2
+ import{set as e}from"../core/libs/gl-matrix-2/math/vec2.js";import{create as i}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import{ZEROS as r}from"../core/libs/gl-matrix-2/factories/vec4f64.js";import{RejectBySlice as o}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{AlignPixel as t}from"../views/3d/webgl-engine/core/shaderLibrary/hud/AlignPixel.glsl.js";import{HUD as a}from"../views/3d/webgl-engine/core/shaderLibrary/hud/HUD.glsl.js";import{multipassGeometryTest as n}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MultipassGeometryTest.glsl.js";import{addScreenSizePerspectiveAlignment as l}from"../views/3d/webgl-engine/core/shaderLibrary/util/ScreenSizePerspective.glsl.js";import{Float2BindUniform as d}from"../views/3d/webgl-engine/core/shaderModules/Float2BindUniform.js";import{Float2PassUniform as s}from"../views/3d/webgl-engine/core/shaderModules/Float2PassUniform.js";import{Float4BindUniform as c}from"../views/3d/webgl-engine/core/shaderModules/Float4BindUniform.js";import{Float4PassUniform as p}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{FloatPassUniform as g}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as f,If as v}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{outputColorHighlightOLID as S}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js";import{ShaderBuilder as m}from"../views/webgl/ShaderBuilder.js";function h(i){const h=new m,{vertex:b,fragment:z}=h,{terrainDepthTest:x}=i;return b.include(t),h.include(a,i),h.vertex.include(o,i),i.hudDepth||h.include(S,i),h.attributes.add("uv0","vec2"),b.uniforms.add(new c("viewport",e=>e.camera.fullViewport),new g("lineSize",(e,i)=>e.size>0?Math.max(1,e.size)*i.camera.pixelRatio:0),new d("pixelToNDC",i=>e(u,2/i.camera.fullViewport[2],2/i.camera.fullViewport[3])),new g("borderSize",(e,i)=>e.borderColor?i.camera.pixelRatio:0),new s("screenOffset",(i,r)=>e(u,i.horizontalScreenOffset*r.camera.pixelRatio,0))),h.varyings.add("coverageSampling","vec4"),h.varyings.add("lineSizes","vec2"),x&&h.varyings.add("depth","float"),i.hasScreenSizePerspective&&l(b),b.main.add(f`
3
3
  ProjectHUDAux projectAux;
4
4
  vec4 endPoint = projectPositionHUD(projectAux);
5
5
 
@@ -8,17 +8,13 @@ import{set as e}from"../core/libs/gl-matrix-2/math/vec2.js";import{create as i}f
8
8
  gl_Position = vec4(1e38, 1e38, 1e38, 1.0);
9
9
  return;
10
10
  }
11
- ${v(i.useVisibilityPixel,S`if (!testHUDVisibility(endPoint)) {
12
- gl_Position = vec4(1e38, 1e38, 1e38, 1.0);
13
- return;
14
- }`)}
15
11
 
16
- ${i.hasScreenSizePerspective?S`vec3 perspectiveFactor = screenSizePerspectiveScaleFactor(projectAux.absCosAngle, projectAux.distanceToCamera, screenSizePerspectiveAlignment);
12
+ ${i.hasScreenSizePerspective?f`vec3 perspectiveFactor = screenSizePerspectiveScaleFactor(projectAux.absCosAngle, projectAux.distanceToCamera, screenSizePerspectiveAlignment);
17
13
  vec2 screenOffsetScaled = applyScreenSizePerspectiveScaleFactorVec2(screenOffset, perspectiveFactor);`:"vec2 screenOffsetScaled = screenOffset;"}
18
14
  // Add view dependent polygon offset to get exact same original starting point. This is mostly used to get the
19
15
  // correct depth value
20
16
  vec3 posView = (view * vec4(position, 1.0)).xyz;
21
- ${v(y,"depth = posView.z;")}
17
+ ${v(x,"depth = posView.z;")}
22
18
 
23
19
  applyHUDViewDependentPolygonOffset(groundDistance, projectAux.absCosAngle, posView);
24
20
  vec4 startPoint = proj * vec4(posView, 1.0);
@@ -37,8 +33,8 @@ import{set as e}from"../core/libs/gl-matrix-2/math/vec2.js";import{create as i}f
37
33
  // The direction of the line in screen space
38
34
  vec2 screenSpaceDirection = normalize(endAligned.xy / endAligned.w - startAligned.xy / startAligned.w);
39
35
  vec2 perpendicularScreenSpaceDirection = vec2(screenSpaceDirection.y, -screenSpaceDirection.x);
40
- ${i.hasScreenSizePerspective?S`float lineSizeScaled = applyScreenSizePerspectiveScaleFactorFloat(lineSize, perspectiveFactor);
41
- float borderSizeScaled = applyScreenSizePerspectiveScaleFactorFloat(borderSize, perspectiveFactor);`:S`float lineSizeScaled = lineSize;
36
+ ${i.hasScreenSizePerspective?f`float lineSizeScaled = applyScreenSizePerspectiveScaleFactorFloat(lineSize, perspectiveFactor);
37
+ float borderSizeScaled = applyScreenSizePerspectiveScaleFactorFloat(borderSize, perspectiveFactor);`:f`float lineSizeScaled = lineSize;
42
38
  float borderSizeScaled = borderSize;`}
43
39
  float halfPixelSize = lineSizeScaled * 0.5;
44
40
 
@@ -76,8 +72,8 @@ import{set as e}from"../core/libs/gl-matrix-2/math/vec2.js";import{create as i}f
76
72
  );
77
73
 
78
74
  lineSizes = vec2(lineSizeScaled, borderSizeScaled);
79
- gl_Position = projectedPosition;`),z.uniforms.add(new g("uColor",e=>e.color??r),new g("borderColor",e=>e.borderColor??r)),y&&(z.include(l,i),z.uniforms.add(new s("inverseViewport",e=>e.inverseViewport))),z.main.add(S`
80
- ${v(y,"if( geometryDepthTest(gl_FragCoord.xy * inverseViewport, depth) ){ discard; }")}
75
+ gl_Position = projectedPosition;`),z.uniforms.add(new p("uColor",e=>e.color??r),new p("borderColor",e=>e.borderColor??r)),x&&(z.include(n,i),z.uniforms.add(new d("inverseViewport",e=>e.inverseViewport))),z.main.add(f`
76
+ ${v(x,"if( geometryDepthTest(gl_FragCoord.xy * inverseViewport, depth) ){ discard; }")}
81
77
 
82
78
  vec2 coverage = min(1.0 - clamp(abs(coverageSampling.xy) - coverageSampling.zw, 0.0, 1.0), lineSizes);
83
79
 
@@ -85,7 +81,7 @@ import{set as e}from"../core/libs/gl-matrix-2/math/vec2.js";import{create as i}f
85
81
  float colorAlpha = uColor.a * coverage.x;
86
82
 
87
83
  float finalAlpha = mix(borderAlpha, 1.0, colorAlpha);
88
- ${v(i.hudDepth,S`
89
- if (max(coverage.x, coverage.y) < ${S.float(u)}) discard;`,S`
84
+ ${v(i.hudDepth,f`
85
+ if (max(coverage.x, coverage.y) < ${f.float(w)}) discard;`,f`
90
86
  vec3 finalRgb = mix(borderColor.rgb * borderAlpha, uColor.rgb, colorAlpha);
91
- outputColorHighlightOLID(vec4(finalRgb, finalAlpha), finalRgb);`)}`),w}const u=.5,b=i(),x=Object.freeze(Object.defineProperty({__proto__:null,build:w},Symbol.toStringTag,{value:"Module"}));export{x as L,w as b};
87
+ outputColorHighlightOLID(vec4(finalRgb, finalAlpha), finalRgb);`)}`),h}const w=.5,u=i(),b=Object.freeze(Object.defineProperty({__proto__:null,build:h},Symbol.toStringTag,{value:"Module"}));export{b as L,h as b};
package/config.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import"./core/has.js";import{deepMerge as e}from"./core/object.js";const s={apiKey:void 0,apiKeys:{scopes:[]},applicationName:"",applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",userPrivilegesApplied:!0,portalUrl:"https://www.arcgis.com",respectPrefersReducedMotion:!0,routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&(e(s,globalThis.esriConfig,!0),delete s.has),!s.assetsPath){{const e="5.1.0-next.30";s.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@${e}/assets`}s.defaultAssetsPath=s.assetsPath}export{s as default};
2
+ import"./core/has.js";import{deepMerge as e}from"./core/object.js";const s={apiKey:void 0,apiKeys:{scopes:[]},applicationName:"",applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",userPrivilegesApplied:!0,portalUrl:"https://www.arcgis.com",respectPrefersReducedMotion:!0,routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&(e(s,globalThis.esriConfig,!0),delete s.has),!s.assetsPath){{const e="5.1.0-next.32";s.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@${e}/assets`}s.defaultAssetsPath=s.assetsPath}export{s as default};
package/core/timeUtils.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{resolveTimeZone as e}from"../intl/date.js";import{system as n}from"../time/constants.js";import{IANAZone as t,DateTime as s}from"luxon";const r={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8,unknown:NaN};function o(r,o,i,c=n){if("unknown"===i)return r;const u=new t(e(c)),a=s.fromJSDate(r,{zone:u}),l="decades"===i||"centuries"===i?"year":T(i);return"decades"===i&&(o*=10),"centuries"===i&&(o*=100),a.plus({[l]:o}).toJSDate()}function i(e,n,t="milliseconds"){const s=e.getTime(),r=m(n,t,"milliseconds");return new Date(s+r)}function c(r,o,i=n){if("unknown"===o)return r;const c=new t(e(i)),u=s.fromJSDate(r,{zone:c});if("decades"===o||"centuries"===o){const e=u.startOf("year"),{year:n}=e,t=n-n%("decades"===o?10:100);return e.set({year:t}).toJSDate()}const a=T(o);return u.startOf(a).toJSDate()}function u(e,n,t="milliseconds"){const s=new Date(m(n,t,"milliseconds"));return s.setUTCFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),s}function a(e,n="milliseconds"){const t=m(e.getUTCHours(),"hours","milliseconds"),s=m(e.getUTCMinutes(),"minutes","milliseconds"),r=m(e.getUTCSeconds(),"seconds","milliseconds");return m(t+s+r+e.getUTCMilliseconds(),"milliseconds",n)}function l(e,n){const t=new Date(e);return t.setUTCFullYear(n.getFullYear(),n.getMonth(),n.getDate()),t}function d(e){const n=new Date(0);return n.setHours(0),n.setMinutes(0),n.setSeconds(0),n.setMilliseconds(0),n.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),n}function m(e,n,t){if(0===e)return 0;return e*r[n]/r[t]}function f(e){return e instanceof Date&&!isNaN(e.getTime())}function g(e,n){return e&&n?e.intersection(n):e||n}function T(e){switch(e){case"milliseconds":return"millisecond";case"seconds":return"second";case"minutes":return"minute";case"hours":return"hour";case"days":return"day";case"weeks":return"week";case"months":return"month";case"years":return"year"}}export{m as convertTime,f as isValidDate,u as makeUTCTime,g as mergeTimeExtents,r as millisecondsPerTimeUnit,o as offsetDate,i as offsetDateUTC,l as resetUTCDate,a as timeSinceUTCMidnight,c as truncateDate,d as truncateLocalTime};
2
+ import{resolveTimeZone as e}from"../intl/date.js";import{system as t}from"../time/constants.js";import{IANAZone as s,DateTime as n}from"luxon";const r={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8,unknown:NaN};function o(r,o,a,u=t){if("unknown"===a)return r;const c=new s(e(u)),i=n.fromJSDate(r,{zone:c}),l="decades"===a||"centuries"===a?"year":w(a);return"decades"===a&&(o*=10),"centuries"===a&&(o*=100),i.plus({[l]:o}).toJSDate()}function a(e,t,s="milliseconds"){const n=e.getTime(),r=m(t,s,"milliseconds");return new Date(n+r)}function u(r,o,a=t){const{unit:u}=o,c=Math.max(1,Math.trunc(o.value)),i=new s(e(a)),l=n.fromJSDate(r,{zone:i}),d=e=>e-e%c;switch(u){case"milliseconds":return l.startOf("second").plus({millisecond:d(l.millisecond)}).toJSDate();case"seconds":return l.startOf("minute").plus({second:d(l.second)}).toJSDate();case"minutes":return l.startOf("hour").plus({minute:d(l.minute)}).toJSDate();case"hours":return l.startOf("day").plus({hour:d(l.hour)}).toJSDate();case"days":return l.startOf("month").plus({day:d(l.day-1)}).toJSDate();case"weeks":{const e=l.startOf("year").startOf("week"),t=Math.floor(l.diff(e,"weeks").weeks);return e.plus({week:d(t)}).toJSDate()}case"months":return l.startOf("year").plus({month:d(l.month-1)}).toJSDate();case"years":case"decades":case"centuries":{const e=l.startOf("year"),t=("decades"===u?10:"centuries"===u?100:1)*c,s=e.year-e.year%t;return e.set({year:s}).toJSDate()}case"unknown":return r}}function c(e,t,s="milliseconds"){const n=new Date(m(t,s,"milliseconds"));return n.setUTCFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),n}function i(e,t="milliseconds"){const s=m(e.getUTCHours(),"hours","milliseconds"),n=m(e.getUTCMinutes(),"minutes","milliseconds"),r=m(e.getUTCSeconds(),"seconds","milliseconds");return m(s+n+r+e.getUTCMilliseconds(),"milliseconds",t)}function l(e,t){const s=new Date(e);return s.setUTCFullYear(t.getFullYear(),t.getMonth(),t.getDate()),s}function d(e){const t=new Date(0);return t.setHours(0),t.setMinutes(0),t.setSeconds(0),t.setMilliseconds(0),t.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),t}function m(e,t,s){if(0===e)return 0;return e*r[t]/r[s]}function f(e){return e instanceof Date&&!isNaN(e.getTime())}function h(e,t){return e&&t?e.intersection(t):e||t}function w(e){switch(e){case"milliseconds":return"millisecond";case"seconds":return"second";case"minutes":return"minute";case"hours":return"hour";case"days":return"day";case"weeks":return"week";case"months":return"month";case"years":return"year"}}export{m as convertTime,f as isValidDate,c as makeUTCTime,h as mergeTimeExtents,r as millisecondsPerTimeUnit,o as offsetDate,a as offsetDateUTC,l as resetUTCDate,i as timeSinceUTCMidnight,u as truncateDate,d as truncateLocalTime};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import e from"../../../../Graphic.js";import a from"../../../../core/Error.js";import{generateBracedUUID as t}from"../../../../core/uuid.js";import{isLoadedSharedTemplate as s}from"../../../templateUtils.js";import{isRadial as r}from"./executorUtils.js";import n from"../../../../geometry/Multipoint.js";import i from"../../../../geometry/Point.js";import o from"../../../../geometry/Polygon.js";import h from"../../../../geometry/Polyline.js";import{isCurvedGeometry as l,isCoordinate as u,cloneCurve as f,isBezierCurve as p,isCircularArc as d}from"../../../../geometry/support/curves/curveUtils.js";import{isSubtypeGroupLayer as c}from"../../../../layers/support/layerUtils.js";function m({edits:n,geometry:i,relationships:o,tag:l="",template:u}){if(r(i)){const e=i.geometry.clone();for(const a of e.paths){m({geometry:new h({spatialReference:e.spatialReference,paths:[a],hasZ:e.hasZ,hasM:e.hasM}),template:u,edits:n,relationships:o,tag:l})}return}const{definition:f,layer:p}=u;i=Z(i,p);const d=new e({attributes:f.defaultValues?{...f.defaultValues}:{},geometry:i,sourceLayer:p});if(j(d,p),p.globalIdField&&(d.attributes[p.globalIdField]=t()),n.push({id:p.layerId,graphic:d,tag:l,layer:p}),0!==f.relationships.length)for(const r of f.relationships||[]){const i=r.template;if(null==r.relationshipMetadata||!s(i))throw new a("shared-template:missing-relationship-metadata-or-definition","Relationship part must have metadata and a fully loaded template with definition");const{layer:h}=i,l=new e({attributes:{...f.defaultValues},sourceLayer:h});j(l,h),h.globalIdField&&(l.attributes[h.globalIdField]=t()),n.push({graphic:l,id:h.layerId,tag:"",layer:h}),o.push({...r.relationshipMetadata,sourceGraphic:d,destinationGraphic:l})}}function Z(e,a){if(!e)return null;if(e.hasZ===a.hasZ&&e.hasM===a.hasM)return e;switch(e.type){case"point":return new i({spatialReference:e.spatialReference,x:e.x,y:e.y,...a.hasZ?e.hasZ?{z:e.z}:{z:b(a)}:{},...a.hasM?e.hasM?{m:e.m}:{m:R(a)??void 0}:{}});case"polygon":return new o({spatialReference:e.spatialReference,...l(e)?{curveRings:y(e.curveRings,{hasZ:a.hasZ,hasM:a.hasM,defaultZ:b(a),defaultM:R(a),mIndex:e.hasM?e.hasZ?3:2:-1,zIndex:e.hasZ?2:-1})}:{rings:M(e.rings,{hasZ:a.hasZ,hasM:a.hasM,defaultZ:b(a),defaultM:R(a),mIndex:e.hasM?e.hasZ?3:2:-1,zIndex:e.hasZ?2:-1})},hasZ:a.hasZ,hasM:a.hasM});case"polyline":return new h({spatialReference:e.spatialReference,...l(e)?{curvePaths:y(e.curvePaths,{hasZ:a.hasZ,hasM:a.hasM,defaultZ:b(a),defaultM:R(a),mIndex:e.hasM?e.hasZ?3:2:-1,zIndex:e.hasZ?2:-1})}:{paths:M(e.paths,{hasZ:a.hasZ,hasM:a.hasM,defaultZ:b(a),defaultM:R(a),mIndex:e.hasM?e.hasZ?3:2:-1,zIndex:e.hasZ?2:-1})},hasZ:a.hasZ,hasM:a.hasM});case"multipoint":return new n({spatialReference:e.spatialReference,hasZ:a.hasZ,hasM:a.hasM,points:g(e.points,{hasZ:a.hasZ,hasM:a.hasM,defaultZ:b(a),defaultM:R(a),mIndex:e.hasM?e.hasZ?3:2:-1,zIndex:e.hasZ?2:-1})});default:return e}}function M(e,a){const t=[];for(const s of e)t.push(g(s,a));return t}function g(e,a){const t=[];for(const s of e){const e=[s[0],s[1]];a.hasZ&&(e[2]=a.zIndex>-1?s[2]:a.defaultZ),a.hasM&&(a.mIndex>-1?e[a.hasZ?3:2]=s[a.mIndex]:e[a.hasZ?3:2]=a.defaultM),t.push(e)}return t}function y(e,a){return e.map(e=>I(e,a))}function I(e,a){const t=[];for(const s of e)if(u(s)){const e=x(s,a);t.push(e)}else{const e=f(s);p(e)?e.b[0]=x(e.b[0],a):d(e)?e.c[0]=x(e.c[0],a):e.a[0]=x(e.a[0],a),t.push(e)}return t}function x(e,a){const t=[e[0],e[1]];return a.hasZ&&(t[2]=a.zIndex>-1?e[2]:a.defaultZ),a.hasM&&(a.mIndex>-1?t[a.hasZ?3:2]=e[a.mIndex]:t[a.hasZ?3:2]=a.defaultM),t}function b(e){return e.capabilities.editing?.zDefault??0}function R(e){return e.capabilities.editing.supportsUpdateWithoutM?void 0:0}function j(e,a){c(a)&&(e.sourceLayer=a.findSublayerForFeature(e))}export{m as createFeatureServiceEdit};
2
+ import e from"../../../../Graphic.js";import a from"../../../../core/Error.js";import{generateBracedUUID as t}from"../../../../core/uuid.js";import{getCreationAttributes as s,isLoadedSharedTemplate as r}from"../../../templateUtils.js";import{isRadial as n}from"./executorUtils.js";import i from"../../../../geometry/Multipoint.js";import o from"../../../../geometry/Point.js";import h from"../../../../geometry/Polygon.js";import l from"../../../../geometry/Polyline.js";import{isCurvedGeometry as u,isCoordinate as p,cloneCurve as d,isBezierCurve as f,isCircularArc as c}from"../../../../geometry/support/curves/curveUtils.js";import{isSubtypeGroupLayer as m}from"../../../../layers/support/layerUtils.js";import{isNumber as Z}from"../../../../support/guards.js";function M({edits:i,geometry:o,relationships:h,tag:u="",template:p}){if(n(o)){const e=o.geometry.clone();for(const a of e.paths){M({geometry:new l({spatialReference:e.spatialReference,paths:[a],hasZ:e.hasZ,hasM:e.hasM}),template:p,edits:i,relationships:h,tag:u})}return}const{definition:d,layer:f}=p;o=y(o,f);const c=m(f)?z(p,f):f,Z=new e({attributes:s(p,{},c),geometry:o,sourceLayer:c});if(f.globalIdField&&(Z.attributes[f.globalIdField]=t()),i.push({id:f.layerId,graphic:Z,tag:u,layer:f}),0!==d.relationships.length)for(const n of d.relationships||[]){const o=n.template;if(null==n.relationshipMetadata||!r(o))throw new a("shared-template:missing-relationship-metadata-or-definition","Relationship part must have metadata and a fully loaded template with definition");const{layer:l}=o,u=m(l)?z(o,l):l,p=new e({attributes:s(o,{},u),sourceLayer:u});l.globalIdField&&(p.attributes[l.globalIdField]=t()),i.push({graphic:p,id:l.layerId,tag:"",layer:l}),h.push({...n.relationshipMetadata,sourceGraphic:Z,destinationGraphic:p})}}function y(e,a){if(!e)return null;if(e.hasZ===a.hasZ&&e.hasM===a.hasM)return e;switch(e.type){case"point":return new o({spatialReference:e.spatialReference,x:e.x,y:e.y,...a.hasZ?e.hasZ?{z:e.z}:{z:j(a)}:{},...a.hasM?e.hasM?{m:e.m}:{m:w(a)??void 0}:{}});case"polygon":return new h({spatialReference:e.spatialReference,...u(e)?{curveRings:x(e.curveRings,{hasZ:a.hasZ,hasM:a.hasM,defaultZ:j(a),defaultM:w(a),mIndex:e.hasM?e.hasZ?3:2:-1,zIndex:e.hasZ?2:-1})}:{rings:g(e.rings,{hasZ:a.hasZ,hasM:a.hasM,defaultZ:j(a),defaultM:w(a),mIndex:e.hasM?e.hasZ?3:2:-1,zIndex:e.hasZ?2:-1})},hasZ:a.hasZ,hasM:a.hasM});case"polyline":return new l({spatialReference:e.spatialReference,...u(e)?{curvePaths:x(e.curvePaths,{hasZ:a.hasZ,hasM:a.hasM,defaultZ:j(a),defaultM:w(a),mIndex:e.hasM?e.hasZ?3:2:-1,zIndex:e.hasZ?2:-1})}:{paths:g(e.paths,{hasZ:a.hasZ,hasM:a.hasM,defaultZ:j(a),defaultM:w(a),mIndex:e.hasM?e.hasZ?3:2:-1,zIndex:e.hasZ?2:-1})},hasZ:a.hasZ,hasM:a.hasM});case"multipoint":return new i({spatialReference:e.spatialReference,hasZ:a.hasZ,hasM:a.hasM,points:I(e.points,{hasZ:a.hasZ,hasM:a.hasM,defaultZ:j(a),defaultM:w(a),mIndex:e.hasM?e.hasZ?3:2:-1,zIndex:e.hasZ?2:-1})});default:return e}}function g(e,a){const t=[];for(const s of e)t.push(I(s,a));return t}function I(e,a){const t=[];for(const s of e){const e=[s[0],s[1]];a.hasZ&&(e[2]=a.zIndex>-1?s[2]:a.defaultZ),a.hasM&&(a.mIndex>-1?e[a.hasZ?3:2]=s[a.mIndex]:e[a.hasZ?3:2]=a.defaultM),t.push(e)}return t}function x(e,a){return e.map(e=>b(e,a))}function b(e,a){const t=[];for(const s of e)if(p(s)){const e=R(s,a);t.push(e)}else{const e=d(s);f(e)?e.b[0]=R(e.b[0],a):c(e)?e.c[0]=R(e.c[0],a):e.a[0]=R(e.a[0],a),t.push(e)}return t}function R(e,a){const t=[e[0],e[1]];return a.hasZ&&(t[2]=a.zIndex>-1?e[2]:a.defaultZ),a.hasM&&(a.mIndex>-1?t[a.hasZ?3:2]=e[a.mIndex]:t[a.hasZ?3:2]=a.defaultM),t}function j(e){return e.capabilities.editing?.zDefault??0}function w(e){return e.capabilities.editing.supportsUpdateWithoutM?void 0:0}function z(e,a){const t=a.fieldsIndex.get(a.subtypeField),{defaultValues:s}=e.definition,r=(Z(s?.[t.name])?s[t.name]:null)??e.subtypeCode;return null==r?a.sublayers.at(0):a.findSublayerForSubtypeCode(r)}export{M as createFeatureServiceEdit};
package/kernel.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,commitHash as revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="5.1";let s,r=e;function i(o){s=o}function t(e){const r=s?.findCredential(e);return r?.token?o(e,"token",r.token):e}r="5.1.0-next.30",has("host-webworker")||globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),has("host-webworker");export{t as addTokenParameter,r as fullVersion,s as id,i as setId,e as version};
2
+ import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,commitHash as revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="5.1";let s,r=e;function i(o){s=o}function t(e){const r=s?.findCredential(e);return r?.token?o(e,"token",r.token):e}r="5.1.0-next.32",has("host-webworker")||globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),has("host-webworker");export{t as addTokenParameter,r as fullVersion,s as id,i as setId,e as version};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../request.js";import has from"../core/has.js";import s from"../core/Logger.js";import{isAbortError as i}from"../core/promiseUtils.js";import{watch as r,initial as a}from"../core/reactiveUtils.js";import{convertTime as n}from"../core/timeUtils.js";import{property as l,subclass as o}from"../core/accessorSupport/decorators.js";import{distance as h}from"../core/libs/gl-matrix-2/math/vec3.js";import{create as d}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{renderSRFromViewSR as u}from"../geometry/support/coordinateSystem.js";import{loadVoxelWASM as _}from"../libs/vxl/VxlModule.js";import{VoxelGraphic as c}from"../views/3d/layers/VoxelGraphic.js";import{VoxelTarget as m}from"../views/3d/layers/i3s/Intersector.js";import{Frustum as g}from"../views/3d/state/Frustum.js";import{RenderCoordsHelper as f}from"../views/3d/support/RenderCoordsHelper.js";import{SyncRenderPlugin as p}from"../views/3d/webgl-engine/effects/RenderPlugin.js";import{IntersectorResult as x}from"../views/3d/webgl-engine/lib/IntersectorResult.js";let y=class extends p{constructor(e){super(e),this._halfIntTexturesAvailable=!1,this._textureFloatLinearAvailable=!1,this._havePreparedWithAllLayers=!1,this._renderPluginContext=null,this._vxlPromise=null,this._vxl=null,this._pluginIsActive=!1,this._moreToLoad=!1,this._viewportWidth=-1,this._viewportHeight=-1,this._newLayers=[],this._layers=new Map,this._rctx=null,this._renderTargetToRestore=null,this._lastFrameWasStationary=!1,this._wasmMemBlockSizes=[512,1024,2048,4096,8192,16384,32768,65536],this._wasmMemBlocks=new Map,this._dbgFlags=new Set,this._captureFrustum=!1,this._frustum=null,this._frustumRenderableId=-1,this._renderCoordsHelper=null,this.produces=new Map([[22,()=>!!this._vxl&&"local"===this.view.viewingMode]]),this.type=9,this.slicePlaneEnabled=!0,this.isGround=!1,this.layerViewUid=[]}_dbg(e,t){this._dbgFlags.has(e)&&(4===e?s.getLogger(this).error(t):s.getLogger(this).warn(t))}_removeRenderPlugin(){this._pluginIsActive&&this.view.stage&&(this._dbg(1,"--removeRenderPlugin--"),this.view.stage.removeRenderPlugin(this)),this._pluginIsActive=!1}initialize(){this._dbg(1,"--initialize--");for(const e of this._wasmMemBlockSizes)this._wasmMemBlocks.set(e,0);this.addHandles([r(()=>this.view.ready,e=>{e&&"local"===this.view.viewingMode?(this._dbg(1,"view ready status changed to ready on a local view, calling addRenderPlugin"),this.view.stage.addRenderPlugin(this),this._pluginIsActive=!0):(this._dbg(1,"view ready status changed, not ready or not a local view!"),this._removeRenderPlugin())},a),r(()=>this.view?.qualityProfile,e=>{this._dbg(3,"qualityProfile changed to "+e),this._vxl&&this._vxl.set_quality(this._toWasmQuality(e))},a),r(()=>this.view?.timeExtent,()=>{if(this._vxl){const e=this._getTimeArgs(this.view?.timeExtent);this._dbg(3,"sceneView timeExtent changed to useTime="+e.hasTime+" st="+e.startTime+" et="+e.endTime),this._vxl.set_scene_time_extent(e.startTime,e.endTime,e.hasTime),this._renderPluginContext.requestRender()}},a),r(()=>this.view?.stationary,e=>{this._vxl&&e&&!this._lastFrameWasStationary&&this._renderPluginContext.requestRender()})])}initializeRenderContext(e){this._dbg(1,"--initializeRenderContext--");const t=e.renderContext.rctx;this._renderPluginContext=e,this._rctx=e.renderContext.rctx,this._halfIntTexturesAvailable=!!this._rctx.capabilities.textureNorm16,this._textureFloatLinearAvailable=this._rctx.capabilities.textureFloatLinear,this._initializeWasm(t.gl)}uninitializeRenderContext(){this._renderPluginContext=null,this._rctx=null,this._dbg(1,"--uninitializeRenderContext--")}_restoreFramebuffer(){if(!this._renderTargetToRestore)return;const e=this._renderTargetToRestore.fbo;if(!!!this._rctx)return void this._dbg(4,"no context in restoreFramebuffer!");this._rctx.bindFramebuffer(e,!0);const t=this._renderTargetToRestore.viewport;this._rctx.setViewport(t.x,t.y,t.width,t.height)}_bindPreviousDepthToSlot(e,t){const s=!!this._rctx,i=!!this._renderTargetToRestore;if(!s||!i)return 0;const r=this._renderTargetToRestore.fbo.depthStencilTexture;return r?(0===t?this._rctx.bindTexture(null,e,!0):this._rctx.bindTexture(r,e,!0),1):(this._dbg(4,"no depth/stencil texture exists!"),0)}_modifyResourceCount(e,t,s){if(!this._rctx)return void this._dbg(4,"modifyAllocation callback has no rendering context!");const i=e;1===s?this._rctx.instanceCounter.increment(i,t):this._rctx.instanceCounter.decrement(i,t)}_setBlendState(e,t,s,i){this._rctx?(this._rctx.setBlendingEnabled(1===e),this._rctx.setBlendFunction(t,s),this._rctx.setBlendEquation(i)):this._dbg(4,"setBlendState callback has no rendering context!")}_setFrontFace(e){this._rctx?this._rctx.setFrontFace(e):this._dbg(4,"setFrontFace callback has no rendering context!")}_setDepthStencilStateFunction(e,t,s){this._rctx?(this._rctx.setDepthFunction(s),this._rctx.setDepthTestEnabled(1===e),this._rctx.setDepthWriteEnabled(1===t),this._rctx.setStencilTestEnabled(!1),this._rctx.setStencilFunction(519,0,255),this._rctx.setStencilOpSeparate(1028,7680,7682,7680),this._rctx.setStencilOpSeparate(1029,7680,7683,7680)):this._dbg(4,"setDepthStencilStateFunction callback has no rendering context!")}_setRasterizerState(e){if(this._rctx)switch(e){case 1:this._rctx.setFaceCullingEnabled(!1);break;case 3:this._rctx.setCullFace(1029),this._rctx.setFaceCullingEnabled(!0);break;case 2:this._rctx.setCullFace(1028),this._rctx.setFaceCullingEnabled(!0)}else this._dbg(4,"setRasterizerState callback has no rendering context!")}_setViewport(e,t,s,i){this._rctx?this._rctx.setViewport(e,t,s,i):this._dbg(4,"setViewport callback has no rendering context!")}_updateMemoryUsage(){this._layers.forEach((e,t)=>{if(e.needMemoryUsageUpdate){const s=this._vxl.estimate_memory_usage(t);s>=0&&(e.needMemoryUsageUpdate=!1,e.layerView.setUsedMemory(s))}})}_syncRequestsResponses(){this._layers.forEach((e,s)=>{const r=[];e.responses.forEach((t,i)=>{r.push(i),this._dbg(2,"responding for requestID:"+i+" size:"+t.size),this._vxl.respond(s,i,t),0!==t.requestType&&4!==t.requestType||(e.needMemoryUsageUpdate=!0)});const a=e.responses;for(const t of r)a.delete(t);const n=this._vxl.get_new_requests(s),l=e.abortController.signal;for(const o in n){e.outstandingRequestCount+=1,1===e.outstandingRequestCount&&e.layerView.updatingFlagChanged();const s=n[o],r={responseType:"array-buffer",signal:l,query:{...e.layerView.layer.customParameters,token:e.layerView.layer.apiKey}};this._dbg(2,"making requestID:"+o+" url:"+s.url),t(s.url,r).then(t=>{e.outstandingRequestCount-=1,0===e.outstandingRequestCount&&e.layerView.updatingFlagChanged(),this._dbg(2,"have response for requestID:"+o);let i=0;if(t.data.byteLength>0){i=this._vxl._malloc(t.data.byteLength);const e=new Uint8Array(this._vxl.HEAPU8.buffer,i,t.data.byteLength),s=new Uint8Array(t.data);for(let i=0;i<t.data.byteLength;++i)e[i]=s[i]}a.set(+o,{responseType:s.responseType,ptr:i,size:t.data.byteLength,success:!0,requestType:s.requestType})}).catch(t=>{e.outstandingRequestCount-=1,0===e.outstandingRequestCount&&e.layerView.updatingFlagChanged(),i(t)||(this._dbg(4,`requestID:${o} failed, error=${t.toString()}`),a.set(+o,{responseType:s.responseType,ptr:0,size:0,success:!1,requestType:s.requestType}))})}})}updateWasmCamera(e){this._vxl.set_projection_matrix.apply(this._vxl,e.projectionMatrix),this._vxl.set_view_matrix.apply(this._vxl,e.viewMatrix),this._vxl.set_near_far(e.near,e.far)}isUpdating(e){if(!this._vxl&&this._vxlPromise)return!0;const t=this._layers.get(e);return!!t&&t.outstandingRequestCount>0}getLayerTimes(e){const t=[];return this._layers.forEach((s,i)=>{if(s.layerView.wasmLayerId===e.wasmLayerId){const s=this._vxl.get_layer_epoch_times(i,e.layer.currentVariableId);for(let e=0;e<s.length;++e)t.push(s[e])}}),t}getCurrentLayerTimeIndex(e){let t=0;return this._layers.forEach((s,i)=>{s.layerView.wasmLayerId===e.wasmLayerId&&(t=this._vxl.get_layer_current_time_id(i))}),t}setEnabled(e,t){this._layers.forEach((s,i)=>{s.layerView.wasmLayerId===e.wasmLayerId&&(this._vxl.set_enabled(i,t),s.needMemoryUsageUpdate=!0,this._renderPluginContext.requestRender())})}setIsInScaleRange(e,t){const s=this._layers.get(e.wasmLayerId);s&&t!==s.isInScaleRange&&(s.isInScaleRange=t,this._vxl.set_is_in_scale_range(e.wasmLayerId,t),s.needMemoryUsageUpdate=!t,this._renderPluginContext.requestRender())}setStaticSections(e,t){const s={mask:1,staticSections:t};return this._doMaskedUIUpdate(e,s,!0)}setCurrentVariable(e,t){const s={mask:1024,currentVariable:t};return this._doMaskedUIUpdate(e,s,!0)}setRenderMode(e,t){const s={mask:8192,renderMode:t};return this._doMaskedUIUpdate(e,s,!0)}setVerticalExaggerationAndOffset(e,t,s,i){const r={mask:256,volStyleDesc:{volumeId:t,verticalExaggeration:s,verticalOffset:i}};return this._doMaskedUIUpdate(e,r,!0)}setVariableStyles(e,t){const s={mask:32768,variableStyles:t};return this._doMaskedUIUpdate(e,s,!0)}setVolumeStyles(e,t){const s={mask:65536,volumeStyles:t};return this._doMaskedUIUpdate(e,s,!0)}setEnableDynamicSections(e,t){const s={mask:4096,containerIsVisible:t,container:1};return this._doMaskedUIUpdate(e,s,!0)}setEnableIsosurfaces(e,t){const s={mask:4096,containerIsVisible:t,container:0};return this._doMaskedUIUpdate(e,s,!0)}setEnableSections(e,t){const s={mask:4096,containerIsVisible:t,container:2};return this._doMaskedUIUpdate(e,s,!0)}setAnalysisSlice(e,t,s,i){const r={mask:131072,analysisSlice:{point:s,normal:i,enabled:t}};return this._doMaskedUIUpdate(e,r,!0)}updateLayerTimeProperties(e){if(!this._vxl)return;const t=this._layers.get(e.wasmLayerId);if(t){const s=t.layerView.layer;let i=0;s.timeOffset&&(i=n(s.timeOffset.value,s.timeOffset.unit,"seconds"));const r=this._getTimeArgs(s.timeExtent);this._vxl.set_layer_time_properties(e.wasmLayerId,r.startTime,r.endTime,r.hasTime,s.useViewTime,i),this._renderPluginContext.requestRender()}}_doMaskedUIUpdate(e,t,s){if(!this._vxl)return!1;let i=!1;return this._layers.forEach((s,r)=>{if(s.layerView.wasmLayerId===e.wasmLayerId){const e={str:JSON.stringify(t),byteCount:0,ptr:0,isReusable:!1};this._allocateBlock(e)&&(i=1===this._vxl.handle_masked_ui_update(r,e.ptr,e.byteCount),e.isReusable||this._vxl._free(e.ptr))}}),i&&s&&this._renderPluginContext.requestRender(),i}_addTriangleToWasmBuffer(e,t,s,i,r){return e[3*t]=s[0],e[3*t+1]=s[1],e[3*t+2]=s[2],e[3*(t+=1)]=i[0],e[3*t+1]=i[1],e[3*t+2]=i[2],e[3*(t+=1)]=r[0],e[3*t+1]=r[1],e[3*t+2]=r[2],t+=1}_addNormalToWasmBuffer(e,t,s){return e[3*t]=s[0],e[3*t+1]=s[1],e[3*t+2]=s[2],t+=1}_doCaptureFrustum(){if(!this._vxl)return;const e=36,t=e/3,s=this._vxl._malloc(3*e*Float32Array.BYTES_PER_ELEMENT),i=new Float32Array(this._vxl.HEAPF32.buffer,s,3*e),r=this._vxl._malloc(3*t*Float32Array.BYTES_PER_ELEMENT),a=new Float32Array(this._vxl.HEAPF32.buffer,r,e),n=this._frustum.points[0],l=this._frustum.points[1],o=this._frustum.points[2],h=this._frustum.points[3],d=this._frustum.points[4],u=this._frustum.points[5],_=this._frustum.points[6],c=this._frustum.points[7];let m=0,g=0;const f=this._frustum.planes[4];m=this._addTriangleToWasmBuffer(i,m,o,l,n),g=this._addNormalToWasmBuffer(a,g,f),m=this._addTriangleToWasmBuffer(i,m,n,h,o),g=this._addNormalToWasmBuffer(a,g,f);const p=this._frustum.planes[5];m=this._addTriangleToWasmBuffer(i,m,d,u,_),g=this._addNormalToWasmBuffer(a,g,p),m=this._addTriangleToWasmBuffer(i,m,_,c,d),g=this._addNormalToWasmBuffer(a,g,p);const x=this._frustum.planes[3];m=this._addTriangleToWasmBuffer(i,m,_,o,h),g=this._addNormalToWasmBuffer(a,g,x),m=this._addTriangleToWasmBuffer(i,m,h,c,_),g=this._addNormalToWasmBuffer(a,g,x);const y=this._frustum.planes[2];m=this._addTriangleToWasmBuffer(i,m,n,l,u),g=this._addNormalToWasmBuffer(a,g,y),m=this._addTriangleToWasmBuffer(i,m,u,d,n),g=this._addNormalToWasmBuffer(a,g,y);const v=this._frustum.planes[0];m=this._addTriangleToWasmBuffer(i,m,h,n,d),g=this._addNormalToWasmBuffer(a,g,v),m=this._addTriangleToWasmBuffer(i,m,d,c,h),g=this._addNormalToWasmBuffer(a,g,v);const b=this._frustum.planes[1];m=this._addTriangleToWasmBuffer(i,m,o,_,u),g=this._addNormalToWasmBuffer(a,g,b),this._addTriangleToWasmBuffer(i,m,u,l,o),this._addNormalToWasmBuffer(a,g,b),-1!==this._frustumRenderableId&&this._vxl.remove_generic_mesh(this._frustumRenderableId),this._frustumRenderableId=this._vxl.add_generic_mesh(s,3*e,r,e,255,0,0,64),this._vxl._free(s),this._vxl._free(r),this._captureFrustum=!1,this._renderPluginContext.requestRender()}captureFrustum(){null===this._renderCoordsHelper&&(this._renderCoordsHelper=f.create(2,u(!1,this.view.spatialReference))),null===this._frustum&&(this._frustum=new g(this._renderCoordsHelper)),this._captureFrustum=!0,null!==this._renderPluginContext&&this._renderPluginContext.requestRender()}toggleFullVolumeExtentDraw(e){this._vxl&&this._layers.forEach((t,s)=>{t.layerView.wasmLayerId===e.wasmLayerId&&(this._vxl.toggle_full_volume_extent_draw(s),this._renderPluginContext.requestRender())})}dropQueryRenderTarget(){this._vxl&&this._vxl.drop_query_rt()}addVoxelLayer(e){if(!this._vxl){const t={layerView:e,resolveCallback:null,rejectCallback:null},s=new Promise((e,s)=>{t.resolveCallback=e,t.rejectCallback=s});return this._newLayers.push(t),s}const t=this._addVoxelLayer(e);return t<0?Promise.reject(-1):Promise.resolve(t)}removeVoxelLayer(e){if(!this._vxl){const t=this._newLayers.findIndex(t=>e.uid===t.layerView.uid);t>=0&&(this._newLayers[t].resolveCallback(-1),this._newLayers.splice(t,1));const s=this._newLayers.length;return 0===s&&(this._dbg(1," no voxel layers left after removing a layer, removing RenderPlugin and destroying"),this.destroy()),s}let t=-1;this._layers.forEach((s,i)=>{if(s.layerView.wasmLayerId===e.wasmLayerId){t=i,s.abortController.abort(),this._vxl.remove_layer(t);const r=this.layerViewUid.indexOf(e.uid);-1!==r&&this.layerViewUid.splice(r,1)}}),t>=0&&this._layers.delete(t);const s=this._layers.size;return 0===s&&(this._dbg(1," no voxel layers left after removing a layer, removing RenderPlugin and destroying"),this.destroy()),s}_getBlockSize(e){for(const t of this._wasmMemBlockSizes)if(e<t)return t;return-1}_allocateBlock(e){e.byteCount=this._vxl.lengthBytesUTF8(e.str)+1;const t=this._getBlockSize(e.byteCount);return t<0?(e.isReusable=!1,e.ptr=this._vxl._malloc(e.byteCount)):(e.isReusable=!0,e.ptr=this._wasmMemBlocks.get(t),0===e.ptr&&(e.ptr=this._vxl._malloc(t),this._wasmMemBlocks.set(t,e.ptr))),0!==e.ptr&&(this._vxl.stringToUTF8(e.str,e.ptr,e.byteCount),!0)}_getTimeArgs(e){let t=-Number.MAX_VALUE,s=Number.MAX_VALUE,i=!1;return null!=e&&(e.isAllTime?i=!0:(null!=e.start&&(i=!0,t=e.start.getTime()/1e3),null!=e.end&&(i=!0,s=e.end.getTime()/1e3))),{startTime:t,endTime:s,hasTime:i}}_addVoxelLayer(e){const t=e.layer;let i=-1;const r=t.getConfiguration();if(r.length<1)return-1;const a={str:r,byteCount:0,ptr:0,isReusable:!1};if(!this._allocateBlock(a))return-1;const l=this._getTimeArgs(t.timeExtent),o=this.view.spatialReference.isWGS84&&t.spatialReference.isWGS84?111319.49079327357:1;let h=0;if(t.timeOffset&&(h=n(t.timeOffset.value,t.timeOffset.unit,"seconds")),i=this._vxl.add_layer(t.serviceRoot,a.ptr,a.byteCount,o,o,l.startTime,l.endTime,l.hasTime,t.useViewTime,h,this._toWasmQuality(this.view.qualityProfile)),a.isReusable||this._vxl._free(a.ptr),i>=0){t.test?.constantUpscaling&&(this._setUpscalingLimits(0,.25,.25),this._setUpscalingLimits(1,.5,.5),this._setUpscalingLimits(2,.75,.75));const r=new AbortController;if(this._layers.set(i,{layerView:e,responses:new Map,outstandingRequestCount:0,abortController:r,needMemoryUsageUpdate:!1,isInScaleRange:!0}),this.layerViewUid.push(e.uid),!this._halfIntTexturesAvailable||has("mac")){const t=[];let i="";for(const s of e.layer.variables)"Int16"!==s.renderingFormat.type&&"UInt16"!==s.renderingFormat.type||(t.push(s.name),s.id===e.layer.currentVariableId&&(i=s.name));""!==i&&s.getLogger(this).error("#addVoxelLayer_error()",e.layer,`The voxel layer '${e.layer.title}' cannot render the current variable '${i}' in this browser`),t.length>0&&s.getLogger(this).warn("#addVoxelLayer_warning()",e.layer,`The voxel layer '${e.layer.title}' cannot render the variables '${t.toString()}' in this browser`)}if(!this._textureFloatLinearAvailable){const t=[];let i="";for(const s of e.layer.variables)"Float32"===s.renderingFormat.type&&(t.push(s.name),s.id===e.layer.currentVariableId&&(i=s.name));""!==i&&s.getLogger(this).error("#addVoxelLayer_error()",e.layer,`The voxel layer '${e.layer.title}' cannot render the current variable '${i}' in this browser`),t.length>0&&s.getLogger(this).warn("#addVoxelLayer_warning()",e.layer,`The voxel layer '${e.layer.title}' cannot render the variables '${t.toString()}' in this browser`)}return has("esri-mobile")&&s.getLogger(this).warnOnce("Mobile support differs across devices. Voxel layer might not display as expected."),i}return-1}prepareRender(e){if(!this._vxl)return;const t=e.bind.camera.viewForward,s=e.bind.camera.eye;this._vxl.update_camera_pos_and_direction(s[0],s[1],s[2],t[0],t[1],t[2]);const i=this._vxl.cull();this._dbg(2,"missingResourceCount="+i),this._moreToLoad=i>0,this._havePreparedWithAllLayers=0===this._newLayers.length,this._updateMemoryUsage()}acquireTechniques(){return[]}render(e){if(!this._vxl)return;for(const s of this._newLayers){const e=this._addVoxelLayer(s.layerView);-1===e?s.rejectCallback(-1):s.resolveCallback(e)}if(this._newLayers=[],0===this._layers.size)return void this._dbg(4,"No voxel layers but RenderPlugin instance is being asked to render!");this._lastFrameWasStationary=this.view.stationary,this._syncRequestsResponses(),this._beforeDraw(),this._vxl.begin_color_frame(!this.view.stage.renderer.isFeatureEnabled(3),e.bind.lighting.mainLight.direction[0],e.bind.lighting.mainLight.direction[1],e.bind.lighting.mainLight.direction[2]);const t=this._renderTargetToRestore.viewport;t.width===this._viewportWidth&&t.height===this._viewportHeight||(this._viewportWidth=t.width,this._viewportHeight=t.height,this._vxl.set_viewport(t.width,t.height),this._layers.forEach(e=>{e.needMemoryUsageUpdate=!0})),0===t.x&&0===t.y||this._dbg(4,"Unsupported viewport parameters detected!"),this.updateWasmCamera(e.bind.camera),this._captureFrustum&&(this._frustum.update(e.bind.camera),this._doCaptureFrustum()),this._vxl.draw(),this._afterDraw(),(this._moreToLoad||!this._havePreparedWithAllLayers&&this._layers.size>0)&&this._renderPluginContext.requestRender()}destroy(){this._dbg(1,"--destroy--"),this._vxl&&(this._layers.forEach(e=>{e.abortController.abort()}),this._wasmMemBlocks.forEach(e=>{0!==e&&this._vxl._free(e)}),this._vxl.uninitialize_voxel_wasm(),this._removeRenderPlugin(),this._vxl=null)}_initializeWasm(e){return this._vxl?Promise.resolve():(this._vxlPromise||(this._vxlPromise=_(e).then(t=>{if(t.specialHTMLTargets.jsAPI3DRenderingContext=e,this._vxl=t,this._vxlPromise=null,this._newLayers.length<=0)return this._dbg(1," no voxel layers left after WASM downloaded, removing RenderPlugin and destroying"),void this.destroy();const s=this._getTimeArgs(this.view?.timeExtent),i=this._vxl.addFunction(this._restoreFramebuffer.bind(this),"v"),r=this._vxl.addFunction(this._setBlendState.bind(this),"viiii"),a=this._vxl.addFunction(this._setFrontFace.bind(this),"vi"),n=this._vxl.addFunction(this._setRasterizerState.bind(this),"vi"),l=this._vxl.addFunction(this._setDepthStencilStateFunction.bind(this),"viii"),o=this._vxl.addFunction(this._setViewport.bind(this),"viiii"),h=this._vxl.addFunction(this._bindPreviousDepthToSlot.bind(this),"iii"),d=this._vxl.addFunction(this._modifyResourceCount.bind(this),"viii"),u=this._halfIntTexturesAvailable&&!has("mac"),_=this._textureFloatLinearAvailable;this._vxl.initialize_voxel_wasm(i,r,a,n,l,o,h,d,s.startTime,s.endTime,s.hasTime,u,_),this._renderPluginContext&&this._renderPluginContext.requestRender()}).catch(()=>{for(const e of this._newLayers)e.rejectCallback(-2);this._dbg(4," WASM failed to download, removing RenderPlugin and destroying"),this.destroy()})),this._vxlPromise)}pickDepth(e,t,s){if(!this._vxl||!this._rctx||0===this._layers.size)return null;const i=s.viewport[3]-t;if(e<0||e>s.viewport[2]||t<0||t>s.viewport[3])return this._dbg(4,`[js] pickDepth: outOfRange, screenXY=[${e.toFixed(0)}, ${i.toFixed(0)}]]`),null;this._beforeDraw();const r=s.viewForward,a=s.eye;this._vxl.update_camera_pos_and_direction(a[0],a[1],a[2],r[0],r[1],r[2]),this.updateWasmCamera(s),this._vxl.begin_frame();const n=this._vxl.pick_depth(e,i);if(this._afterDraw(),n.success){return n.distanceToCamera}return null}pickObject(e,t,s,i){if(!this._vxl||!this._rctx||0===this._layers.size)return null;const r=Math.round(e),a=Math.round(t);if(r<0||r>s.viewport[2]||a<0||a>s.viewport[3])return this._dbg(4,`[js] pickObject: outOfRange, screenXY=[${r}, ${a}], vp=[${s.viewport.toString()}]`),null;this._beforeDraw();const n=s.viewForward,l=s.eye;this._vxl.update_camera_pos_and_direction(l[0],l[1],l[2],n[0],n[1],n[2]),this.updateWasmCamera(s),this._vxl.begin_frame();let o=null;if(0===i.length)o=this._vxl.pick_object(r,a,0,0);else{const e={str:JSON.stringify({layerIds:i}),byteCount:0,ptr:0,isReusable:!1};this._allocateBlock(e)&&(o=this._vxl.pick_object(r,a,e.ptr,e.byteCount),e.isReusable||this._vxl._free(e.ptr))}return this._afterDraw(),o}async getOtherFieldPopupValues(e,s){for(const i of e){const e=i.gpuResult;if(!e)continue;const r=this._layers.get(e.layerId);if(!r||!r.layerView.layer.url)continue;const a=r.layerView.layer,n={responseType:"array-buffer",signal:r.abortController.signal,query:{...r.layerView.layer.customParameters,token:r.layerView.layer.apiKey}},l=e.voxelSpacePosition,o=[Math.floor(l[0]/32),Math.floor(l[1]/32),Math.floor(l[2]/32)],h=[-4&o[0],-4&o[1],-4&o[2]];let d=0;if(e.epochTime){const t=this._vxl.get_layer_epoch_times(r.layerView.wasmLayerId,a.currentVariableId);for(let s=0;s<t.length;++s)if(t[s]===e.epochTime/1e3){d=s;break}}const u=[],_={varIds:[],ptrs:[],sizes:[]};for(const i of s){const e=a.variables.findIndex(e=>e.name===i);if(-1===e)continue;const s=a.variables.getItemAt(e)?.id;if(null==s)continue;const r=`${a.url}/variables/${s}/${d}/bundles/0/${h[0]}-${h[1]}-${h[2]}`;u.push(t(r,n).then(e=>e.data)),_.varIds.push(s)}const c=await Promise.allSettled(u),m=c.length;for(let t=0;t<m;++t){const e=c[t];if("fulfilled"===e.status){const t=e.value,s=this._vxl._malloc(t.byteLength);new Uint8Array(this._vxl.HEAPU8.buffer,s,t.byteLength).set(new Uint8Array(t)),_.ptrs.push(s),_.sizes.push(t.byteLength)}else _.varIds.splice(t,1)}const g=this._vxl.get_other_field_popup_values(e,_);for(let t=0;t<_.ptrs.length;++t)this._vxl._free(_.ptrs[t]);if(g.continuousValues)for(const t in g.continuousValues)i.attributes[t]=g.continuousValues[t];if(g.uniqueValues)for(const t in g.uniqueValues)i.attributes[t]=g.uniqueValues[t]}return e}_beforeDraw(){this._renderTargetToRestore={fbo:this._rctx.getBoundFramebufferObject(),viewport:this._rctx.getViewport()},this._rctx.setPolygonOffsetFillEnabled(!1),this._rctx.setScissorTestEnabled(!1),this._rctx.setColorMask(!0,!0,!0,!0)}_afterDraw(){this._renderTargetToRestore.fbo=null,this._rctx.externalTextureUnitUpdate(this._vxl.get_texture_units_bound_in_frame(),this._vxl.get_active_texture_unit()),this._rctx.externalVertexArrayObjectUpdate(),this._rctx.externalVertexBufferUpdate(),this._rctx.externalProgramUpdate()}intersect(e,t,s,i,r){if(!this._vxl||!this._rctx||0===this._layers.size||!e.options.selectionMode||e.options.isFiltered||!e.camera)return;if(null==r||r[0]<0||r[0]>e.camera.viewport[2]||r[1]<0||r[1]>e.camera.viewport[3])return this._dbg(4,r?`[js] VoxelWasmPerScene.intersect: outOfRange, screenXY=[${r[0].toFixed(0)}, ${r[1].toFixed(0)}]`:"[js] VoxelWasmPerScene.intersect: outOfRange, screenXY=null"),null;const a=[];this._layers.forEach(t=>{e.options.filteredLayerViewUids.includes(t.layerView.uid)&&a.push(t.layerView.wasmLayerId)});const n=this.pickObject(r[0],r[1],e.camera,a);if(null==n||-1===n.layerId)return;const l=this._layers.get(n.layerId);if(l){const t=l.layerView.layer.uid,r=n.distanceToCamera/h(s,i),a=d();a[0]=n.worldX,a[1]=n.worldY,a[2]=n.worldZ;const o={},u=l.layerView.layer,_=u.variables.findIndex(e=>e.id===u.currentVariableId);if(_>=0){const e=u.variables.getItemAt(_);null!=e&&(null!=n.continuousValue?o[e.name]=n.continuousValue:null!=n.uniqueValueLabel&&null!=n.uniqueValue?o[e.name]=`${n.uniqueValueLabel} (${n.uniqueValue})`:null!=n.uniqueValue&&(o[e.name]=`${n.uniqueValue}`),e.description.length>0?o["Voxel.CurrentVariable"]=e.description:e.name?.length>0&&(o["Voxel.CurrentVariable"]=e.name))}if(o["Voxel.Position"]=`[${n.voxelSpacePosition.toString()}]`,null!=n.epochTime&&null!=n.nativeTime&&null!=n.nativeTimeUnits){const e=new Date(n.epochTime);o["Voxel.LocalTime"]=e,o["Voxel.SourceTime"]=`${n.nativeTime.toLocaleString()} ${n.nativeTimeUnits}`}null!=n.depth&&(o["Voxel.Depth"]=n.depth);const c=n.faceNormal;o["Voxel.WorldPosition"]=`[${a[0]}, ${a[1]}, ${a[2]}]`;const g=e=>{const s=new m(a,t,()=>this._createVoxelGraphic(l.layerView.layer,o,n));e.set(this.type,s,r,c)},f=e.results,p=2===e.options.store;if((null==f.min.distance||r<f.min.distance)&&g(f.min),(null==f.max.distance||r>f.max.distance)&&g(f.max),p){const t=new x(e.ray);g(t),e.results.all.push(t)}}}_createVoxelGraphic(e,t,s){return new c({layer:e,sourceLayer:e,origin:e.graphicOrigin,attributes:t,gpuResult:s})}_toWasmQuality(e){switch(e){case"low":return 0;case"medium":return 1;case"high":return 2}}_setUpscalingLimits(e,t,s){this._vxl&&this._vxl.set_upscaling_limits(e,t,s)}hasHighlight(){return!1}};e([l({constructOnly:!0})],y.prototype,"view",void 0),y=e([o("esri.layers.VoxelWasmPerSceneView")],y);const v=y;export{v as default};
2
+ import{__decorate as e}from"tslib";import t from"../request.js";import has from"../core/has.js";import s from"../core/Logger.js";import{isAbortError as r}from"../core/promiseUtils.js";import{watch as i,initial as a}from"../core/reactiveUtils.js";import{convertTime as n}from"../core/timeUtils.js";import{property as o,subclass as l}from"../core/accessorSupport/decorators.js";import{distance as h}from"../core/libs/gl-matrix-2/math/vec3.js";import{create as d}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{renderSRFromViewSR as u}from"../geometry/support/coordinateSystem.js";import{loadVoxelWASM as _}from"../libs/vxl/VxlModule.js";import{InternalRenderCategory as c}from"../views/3d/webgl.js";import{VoxelGraphic as m}from"../views/3d/layers/VoxelGraphic.js";import{VoxelTarget as f}from"../views/3d/layers/i3s/Intersector.js";import{Frustum as p}from"../views/3d/state/Frustum.js";import{RenderCoordsHelper as g}from"../views/3d/support/RenderCoordsHelper.js";import y from"../views/3d/webgl/RenderNode.js";import{IntersectorResult as x}from"../views/3d/webgl-engine/lib/IntersectorResult.js";let v=class extends y{constructor(e){super(e),this._havePreparedWithAllLayers=!1,this.produces="disabled",this.consumes={required:[c.PRE_TRANSPARENT]},this._vxlPromise=null,this._moreToLoad=!1,this._viewportWidth=-1,this._viewportHeight=-1,this._newLayers=[],this._layers=new Map,this._renderTargetToRestore=null,this._lastFrameWasStationary=!1,this._wasmMemBlockSizes=[512,1024,2048,4096,8192,16384,32768,65536],this._wasmMemBlocks=new Map,this._dbgFlags=new Set,this._captureFrustum=!1,this._frustum=null,this._frustumRenderableId=-1,this._renderCoordsHelper=null,this.type=9,this.slicePlaneEnabled=!0,this.isGround=!1,this.layerViewUid=[]}_dbg(e,t){this._dbgFlags.has(e)&&(4===e?s.getLogger(this).error(t):s.getLogger(this).warn(t))}initialize(){this._dbg(1,"--initialize--");for(const e of this._wasmMemBlockSizes)this._wasmMemBlocks.set(e,0);this.addHandles([i(()=>"local"===this.view.viewingMode,e=>{e?(this._dbg(1,"view switched to local view, enabling rendering"),this.produces=c.PRE_TRANSPARENT,this.view.sceneIntersectionHelper.addIntersectionHandler(this)):(this._dbg(1,"view switched to global view, disabling rendering"),this.view.sceneIntersectionHelper.removeIntersectionHandler(this),this.produces="disabled")},a),i(()=>this.view?.qualityProfile,e=>{this._dbg(3,"qualityProfile changed to "+e),this._vxl?.set_quality(this._toWasmQuality(e))},a),i(()=>this.view?.timeExtent,()=>{if(this._vxl){const e=this._getTimeArgs(this.view?.timeExtent);this._dbg(3,"sceneView timeExtent changed to useTime="+e.hasTime+" st="+e.startTime+" et="+e.endTime),this._vxl.set_scene_time_extent(e.startTime,e.endTime,e.hasTime),this.requestRender(1)}},a),i(()=>this.view?.stationary,e=>{this._vxl&&e&&!this._lastFrameWasStationary&&this.requestRender(1)})])}get _rctx(){return this.renderContext?.rctx}get _halfIntTexturesAvailable(){return!!this._rctx?.capabilities.textureNorm16}get _textureFloatLinearAvailable(){return!!this._rctx?.capabilities.textureFloatLinear}_restoreFramebuffer(){if(!this._renderTargetToRestore||!this._rctx)return;const e=this._renderTargetToRestore.fbo;if(!!!this._rctx)return void this._dbg(4,"no context in restoreFramebuffer!");this._rctx.bindFramebuffer(e,!0);const t=this._renderTargetToRestore.viewport;this._rctx.setViewport(t.x,t.y,t.width,t.height)}_bindPreviousDepthToSlot(e,t){if(!this._rctx||!this._renderTargetToRestore)return 0;const s=this._renderTargetToRestore.fbo.depthStencilTexture;return s?(0===t?this._rctx.bindTexture(null,e,!0):this._rctx.bindTexture(s,e,!0),1):(this._dbg(4,"no depth/stencil texture exists!"),0)}_modifyResourceCount(e,t,s){if(!this._rctx)return void this._dbg(4,"modifyAllocation callback has no rendering context!");const r=e;1===s?this._rctx.instanceCounter.increment(r,t):this._rctx.instanceCounter.decrement(r,t)}_setBlendState(e,t,s,r){this._rctx?(this._rctx.setBlendingEnabled(1===e),this._rctx.setBlendFunction(t,s),this._rctx.setBlendEquation(r)):this._dbg(4,"setBlendState callback has no rendering context!")}_setFrontFace(e){this._rctx?this._rctx.setFrontFace(e):this._dbg(4,"setFrontFace callback has no rendering context!")}_setDepthStencilStateFunction(e,t,s){this._rctx?(this._rctx.setDepthFunction(s),this._rctx.setDepthTestEnabled(1===e),this._rctx.setDepthWriteEnabled(1===t),this._rctx.setStencilTestEnabled(!1),this._rctx.setStencilFunction(519,0,255),this._rctx.setStencilOpSeparate(1028,7680,7682,7680),this._rctx.setStencilOpSeparate(1029,7680,7683,7680)):this._dbg(4,"setDepthStencilStateFunction callback has no rendering context!")}_setRasterizerState(e){if(this._rctx)switch(e){case 1:this._rctx.setFaceCullingEnabled(!1);break;case 3:this._rctx.setCullFace(1029),this._rctx.setFaceCullingEnabled(!0);break;case 2:this._rctx.setCullFace(1028),this._rctx.setFaceCullingEnabled(!0)}else this._dbg(4,"setRasterizerState callback has no rendering context!")}_setViewport(e,t,s,r){this._rctx?this._rctx.setViewport(e,t,s,r):this._dbg(4,"setViewport callback has no rendering context!")}_updateMemoryUsage(){this._layers.forEach((e,t)=>{if(e.needMemoryUsageUpdate){const s=this._vxl?.estimate_memory_usage(t)??0;s>=0&&(e.needMemoryUsageUpdate=!1,e.layerView.setUsedMemory(s))}})}_syncRequestsResponses(){this._vxl&&this._layers.forEach((e,s)=>{const i=[];e.responses.forEach((t,r)=>{i.push(r),this._dbg(2,"responding for requestID:"+r+" size:"+t.size),this._vxl?.respond(s,r,t),0!==t.requestType&&4!==t.requestType||(e.needMemoryUsageUpdate=!0)});const a=e.responses;for(const t of i)a.delete(t);const n=this._vxl.get_new_requests(s),o=e.abortController.signal;for(const l in n){e.outstandingRequestCount+=1,1===e.outstandingRequestCount&&e.layerView.updatingFlagChanged();const s=n[l],i={responseType:"array-buffer",signal:o,query:{...e.layerView.layer.customParameters,token:e.layerView.layer.apiKey}};this._dbg(2,"making requestID:"+l+" url:"+s.url),t(s.url,i).then(t=>{e.outstandingRequestCount-=1,0===e.outstandingRequestCount&&e.layerView.updatingFlagChanged(),this._dbg(2,"have response for requestID:"+l);let r=0;if(t.data.byteLength>0&&this._vxl){r=this._vxl._malloc(t.data.byteLength);const e=new Uint8Array(this._vxl.HEAPU8.buffer,r,t.data.byteLength),s=new Uint8Array(t.data);for(let r=0;r<t.data.byteLength;++r)e[r]=s[r]}a.set(+l,{responseType:s.responseType,ptr:r,size:t.data.byteLength,success:!0,requestType:s.requestType})}).catch(t=>{e.outstandingRequestCount-=1,0===e.outstandingRequestCount&&e.layerView.updatingFlagChanged(),r(t)||(this._dbg(4,`requestID:${l} failed, error=${t.toString()}`),a.set(+l,{responseType:s.responseType,ptr:0,size:0,success:!1,requestType:s.requestType}))})}})}updateWasmCamera(e){this._vxl?.set_projection_matrix.apply(this._vxl,e.projectionMatrix),this._vxl?.set_view_matrix.apply(this._vxl,e.viewMatrix),this._vxl?.set_near_far(e.near,e.far)}isUpdating(e){if(!this._vxl&&this._vxlPromise)return!0;const t=this._layers.get(e);return!!t&&t.outstandingRequestCount>0}getLayerTimes(e){const t=[];return this._vxl?(this._layers.forEach((s,r)=>{if(s.layerView.wasmLayerId===e.wasmLayerId){const s=this._vxl.get_layer_epoch_times(r,e.layer.currentVariableId);for(let e=0;e<s.length;++e)t.push(s[e])}}),t):t}getCurrentLayerTimeIndex(e){let t=0;return this._layers.forEach((s,r)=>{s.layerView.wasmLayerId===e.wasmLayerId&&(t=this._vxl?.get_layer_current_time_id(r)??0)}),t}setEnabled(e,t){this._layers.forEach((s,r)=>{s.layerView.wasmLayerId===e.wasmLayerId&&(this._vxl?.set_enabled(r,t),s.needMemoryUsageUpdate=!0,this.requestRender(1))})}setIsInScaleRange(e,t){const s=this._layers.get(e.wasmLayerId);s&&t!==s.isInScaleRange&&(s.isInScaleRange=t,this._vxl?.set_is_in_scale_range(e.wasmLayerId,t),s.needMemoryUsageUpdate=!t,this.requestRender(1))}setStaticSections(e,t){const s={mask:1,staticSections:t};return this._doMaskedUIUpdate(e,s,!0)}setCurrentVariable(e,t){const s={mask:1024,currentVariable:t};return this._doMaskedUIUpdate(e,s,!0)}setRenderMode(e,t){const s={mask:8192,renderMode:t};return this._doMaskedUIUpdate(e,s,!0)}setVerticalExaggerationAndOffset(e,t,s,r){const i={mask:256,volStyleDesc:{volumeId:t,verticalExaggeration:s,verticalOffset:r}};return this._doMaskedUIUpdate(e,i,!0)}setVariableStyles(e,t){const s={mask:32768,variableStyles:t};return this._doMaskedUIUpdate(e,s,!0)}setVolumeStyles(e,t){const s={mask:65536,volumeStyles:t};return this._doMaskedUIUpdate(e,s,!0)}setEnableDynamicSections(e,t){const s={mask:4096,containerIsVisible:t,container:1};return this._doMaskedUIUpdate(e,s,!0)}setEnableIsosurfaces(e,t){const s={mask:4096,containerIsVisible:t,container:0};return this._doMaskedUIUpdate(e,s,!0)}setEnableSections(e,t){const s={mask:4096,containerIsVisible:t,container:2};return this._doMaskedUIUpdate(e,s,!0)}setAnalysisSlice(e,t,s,r){const i={mask:131072,analysisSlice:{point:s,normal:r,enabled:t}};return this._doMaskedUIUpdate(e,i,!0)}updateLayerTimeProperties(e){if(!this._vxl)return;const t=this._layers.get(e.wasmLayerId);if(t){const s=t.layerView.layer;let r=0;s.timeOffset&&(r=n(s.timeOffset.value,s.timeOffset.unit,"seconds"));const i=this._getTimeArgs(s.timeExtent);this._vxl?.set_layer_time_properties(e.wasmLayerId,i.startTime,i.endTime,i.hasTime,s.useViewTime,r),this.requestRender(1)}}_doMaskedUIUpdate(e,t,s){if(!this._vxl)return!1;let r=!1;return this._layers.forEach((s,i)=>{if(s.layerView.wasmLayerId===e.wasmLayerId){const e={str:JSON.stringify(t),byteCount:0,ptr:0,isReusable:!1};this._allocateBlock(e)&&(r=1===this._vxl?.handle_masked_ui_update(i,e.ptr,e.byteCount),e.isReusable||this._vxl?._free(e.ptr))}}),r&&s&&this.requestRender(1),r}_addTriangleToWasmBuffer(e,t,s,r,i){return e[3*t]=s[0],e[3*t+1]=s[1],e[3*t+2]=s[2],e[3*(t+=1)]=r[0],e[3*t+1]=r[1],e[3*t+2]=r[2],e[3*(t+=1)]=i[0],e[3*t+1]=i[1],e[3*t+2]=i[2],t+=1}_addNormalToWasmBuffer(e,t,s){return e[3*t]=s[0],e[3*t+1]=s[1],e[3*t+2]=s[2],t+=1}_doCaptureFrustum(){if(!this._vxl)return;const e=36,t=e/3,s=this._vxl._malloc(3*e*Float32Array.BYTES_PER_ELEMENT),r=new Float32Array(this._vxl.HEAPF32.buffer,s,3*e),i=this._vxl._malloc(3*t*Float32Array.BYTES_PER_ELEMENT),a=new Float32Array(this._vxl.HEAPF32.buffer,i,e),n=this._frustum.points[0],o=this._frustum.points[1],l=this._frustum.points[2],h=this._frustum.points[3],d=this._frustum.points[4],u=this._frustum.points[5],_=this._frustum.points[6],c=this._frustum.points[7];let m=0,f=0;const p=this._frustum.planes[4];m=this._addTriangleToWasmBuffer(r,m,l,o,n),f=this._addNormalToWasmBuffer(a,f,p),m=this._addTriangleToWasmBuffer(r,m,n,h,l),f=this._addNormalToWasmBuffer(a,f,p);const g=this._frustum.planes[5];m=this._addTriangleToWasmBuffer(r,m,d,u,_),f=this._addNormalToWasmBuffer(a,f,g),m=this._addTriangleToWasmBuffer(r,m,_,c,d),f=this._addNormalToWasmBuffer(a,f,g);const y=this._frustum.planes[3];m=this._addTriangleToWasmBuffer(r,m,_,l,h),f=this._addNormalToWasmBuffer(a,f,y),m=this._addTriangleToWasmBuffer(r,m,h,c,_),f=this._addNormalToWasmBuffer(a,f,y);const x=this._frustum.planes[2];m=this._addTriangleToWasmBuffer(r,m,n,o,u),f=this._addNormalToWasmBuffer(a,f,x),m=this._addTriangleToWasmBuffer(r,m,u,d,n),f=this._addNormalToWasmBuffer(a,f,x);const v=this._frustum.planes[0];m=this._addTriangleToWasmBuffer(r,m,h,n,d),f=this._addNormalToWasmBuffer(a,f,v),m=this._addTriangleToWasmBuffer(r,m,d,c,h),f=this._addNormalToWasmBuffer(a,f,v);const b=this._frustum.planes[1];m=this._addTriangleToWasmBuffer(r,m,l,_,u),f=this._addNormalToWasmBuffer(a,f,b),this._addTriangleToWasmBuffer(r,m,u,o,l),this._addNormalToWasmBuffer(a,f,b),-1!==this._frustumRenderableId&&this._vxl.remove_generic_mesh(this._frustumRenderableId),this._frustumRenderableId=this._vxl.add_generic_mesh(s,3*e,i,e,255,0,0,64),this._vxl._free(s),this._vxl._free(i),this._captureFrustum=!1,this.requestRender(1)}captureFrustum(){null===this._renderCoordsHelper&&(this._renderCoordsHelper=g.create(2,u(!1,this.view.spatialReference))),null===this._frustum&&(this._frustum=new p(this._renderCoordsHelper)),this._captureFrustum=!0,this.requestRender(1)}toggleFullVolumeExtentDraw(e){this._vxl&&this._layers.forEach((t,s)=>{t.layerView.wasmLayerId===e.wasmLayerId&&(this._vxl?.toggle_full_volume_extent_draw(s),this.requestRender(1))})}dropQueryRenderTarget(){this._vxl?.drop_query_rt()}addVoxelLayer(e){if(!this._vxl){const t={layerView:e,resolveCallback:null,rejectCallback:null},s=new Promise((e,s)=>{t.resolveCallback=e,t.rejectCallback=s});return this._newLayers.push(t),s}const t=this._addVoxelLayer(e,this._vxl);return t<0?Promise.reject(-1):Promise.resolve(t)}removeVoxelLayer(e){if(!this._vxl){const t=this._newLayers.findIndex(t=>e.uid===t.layerView.uid);t>=0&&(this._newLayers[t].resolveCallback(-1),this._newLayers.splice(t,1));const s=this._newLayers.length;return 0===s&&(this._dbg(1,"No voxel layers left after removing a layer, destroying render node"),this.destroy()),s}let t=-1;this._layers.forEach((s,r)=>{if(s.layerView.wasmLayerId===e.wasmLayerId){t=r,s.abortController.abort(),this._vxl?.remove_layer(t);const i=this.layerViewUid.indexOf(e.uid);-1!==i&&this.layerViewUid.splice(i,1)}}),t>=0&&this._layers.delete(t);const s=this._layers.size;return 0===s&&(this._dbg(1,"No voxel layers left after removing a layer, destroying render node"),this.destroy()),s}_getBlockSize(e){for(const t of this._wasmMemBlockSizes)if(e<t)return t;return-1}_allocateBlock(e){if(!this._vxl)return!1;e.byteCount=this._vxl.lengthBytesUTF8(e.str)+1;const t=this._getBlockSize(e.byteCount);return t<0?(e.isReusable=!1,e.ptr=this._vxl._malloc(e.byteCount)):(e.isReusable=!0,e.ptr=this._wasmMemBlocks.get(t),0===e.ptr&&(e.ptr=this._vxl._malloc(t),this._wasmMemBlocks.set(t,e.ptr))),0!==e.ptr&&(this._vxl.stringToUTF8(e.str,e.ptr,e.byteCount),!0)}_getTimeArgs(e){let t=-Number.MAX_VALUE,s=Number.MAX_VALUE,r=!1;return null!=e&&(e.isAllTime?r=!0:(null!=e.start&&(r=!0,t=e.start.getTime()/1e3),null!=e.end&&(r=!0,s=e.end.getTime()/1e3))),{startTime:t,endTime:s,hasTime:r}}_addVoxelLayer(e,t){const r=e.layer;let i=-1;const a=r.getConfiguration();if(a.length<1)return-1;const o={str:a,byteCount:0,ptr:0,isReusable:!1};if(!this._allocateBlock(o))return-1;const l=this._getTimeArgs(r.timeExtent),h=this.view.spatialReference.isWGS84&&r.spatialReference.isWGS84?111319.49079327357:1;let d=0;if(r.timeOffset&&(d=n(r.timeOffset.value,r.timeOffset.unit,"seconds")),i=t.add_layer(r.serviceRoot,o.ptr,o.byteCount,h,h,l.startTime,l.endTime,l.hasTime,r.useViewTime,d,this._toWasmQuality(this.view.qualityProfile)),o.isReusable||t._free(o.ptr),i>=0){r.test?.constantUpscaling&&(this._setUpscalingLimits(0,.25,.25),this._setUpscalingLimits(1,.5,.5),this._setUpscalingLimits(2,.75,.75));const t=new AbortController;if(this._layers.set(i,{layerView:e,responses:new Map,outstandingRequestCount:0,abortController:t,needMemoryUsageUpdate:!1,isInScaleRange:!0}),this.layerViewUid.push(e.uid),!this._halfIntTexturesAvailable||has("mac")){const t=[];let r="";for(const s of e.layer.variables)"Int16"!==s.renderingFormat.type&&"UInt16"!==s.renderingFormat.type||(t.push(s.name),s.id===e.layer.currentVariableId&&(r=s.name));""!==r&&s.getLogger(this).error("#addVoxelLayer_error()",e.layer,`The voxel layer '${e.layer.title}' cannot render the current variable '${r}' in this browser`),t.length>0&&s.getLogger(this).warn("#addVoxelLayer_warning()",e.layer,`The voxel layer '${e.layer.title}' cannot render the variables '${t.toString()}' in this browser`)}if(!this._textureFloatLinearAvailable){const t=[];let r="";for(const s of e.layer.variables)"Float32"===s.renderingFormat.type&&(t.push(s.name),s.id===e.layer.currentVariableId&&(r=s.name));""!==r&&s.getLogger(this).error("#addVoxelLayer_error()",e.layer,`The voxel layer '${e.layer.title}' cannot render the current variable '${r}' in this browser`),t.length>0&&s.getLogger(this).warn("#addVoxelLayer_warning()",e.layer,`The voxel layer '${e.layer.title}' cannot render the variables '${t.toString()}' in this browser`)}return has("esri-mobile")&&s.getLogger(this).warnOnce("Mobile support differs across devices. Voxel layer might not display as expected."),i}return-1}_prepareRender(){if(!this._vxl)return void this._initializeWasm();const e=this.bindParameters.camera.viewForward,t=this.bindParameters.camera.eye;this._vxl.update_camera_pos_and_direction(t[0],t[1],t[2],e[0],e[1],e[2]);const s=this._vxl.cull();this._dbg(2,"missingResourceCount="+s),this._moreToLoad=s>0,this._havePreparedWithAllLayers=0===this._newLayers.length,this._updateMemoryUsage()}render(){this._prepareRender();const e=this.bindRenderTarget();if(!this._vxl||!this._rctx)return this.requestRender(1),e;for(const s of this._newLayers){const e=this._addVoxelLayer(s.layerView,this._vxl);-1===e?s.rejectCallback(-1):s.resolveCallback(e)}if(this._newLayers=[],0===this._layers.size)return this._dbg(4,"No voxel layers but RenderNode is being asked to render!"),e;this._lastFrameWasStationary=this.view.stationary,this._syncRequestsResponses(),this._beforeDraw(this._rctx),this._vxl.begin_color_frame(!this.view.stage.renderer.isFeatureEnabled(3),this.bindParameters.lighting.mainLight.direction[0],this.bindParameters.lighting.mainLight.direction[1],this.bindParameters.lighting.mainLight.direction[2]);const t=this._renderTargetToRestore.viewport;return t.width===this._viewportWidth&&t.height===this._viewportHeight||(this._viewportWidth=t.width,this._viewportHeight=t.height,this._vxl.set_viewport(t.width,t.height),this._layers.forEach(e=>e.needMemoryUsageUpdate=!0)),0===t.x&&0===t.y||this._dbg(4,"Unsupported viewport parameters detected!"),this.updateWasmCamera(this.bindParameters.camera),this._captureFrustum&&(this._frustum.update(this.bindParameters.camera),this._doCaptureFrustum()),this._vxl.draw(),this._afterDraw(this._rctx,this._vxl),(this._moreToLoad||!this._havePreparedWithAllLayers&&this._layers.size>0)&&this.requestRender(1),e}destroy(){this._dbg(1,"--destroy--"),this._vxl&&(this._layers.forEach(e=>{e.abortController.abort()}),this._wasmMemBlocks.forEach(e=>{0!==e&&this._vxl?._free(e)}),this._vxl.uninitialize_voxel_wasm(),this._vxl=null)}_initializeWasm(){if(this._vxl||this._vxlPromise||!this._rctx?.gl)return;const e=this._rctx.gl;this._vxlPromise=_(e).then(t=>{if(t.specialHTMLTargets.jsAPI3DRenderingContext=e,this._vxl=t,this._vxlPromise=null,this._newLayers.length<=0)return this._dbg(1," no voxel layers left after WASM downloaded, removing RenderNode and destroying"),void this.destroy();const s=this._getTimeArgs(this.view?.timeExtent),r=this._vxl.addFunction(this._restoreFramebuffer.bind(this),"v"),i=this._vxl.addFunction(this._setBlendState.bind(this),"viiii"),a=this._vxl.addFunction(this._setFrontFace.bind(this),"vi"),n=this._vxl.addFunction(this._setRasterizerState.bind(this),"vi"),o=this._vxl.addFunction(this._setDepthStencilStateFunction.bind(this),"viii"),l=this._vxl.addFunction(this._setViewport.bind(this),"viiii"),h=this._vxl.addFunction(this._bindPreviousDepthToSlot.bind(this),"iii"),d=this._vxl.addFunction(this._modifyResourceCount.bind(this),"viii"),u=this._halfIntTexturesAvailable&&!has("mac"),_=this._textureFloatLinearAvailable;this._vxl.initialize_voxel_wasm(r,i,a,n,o,l,h,d,s.startTime,s.endTime,s.hasTime,u,_),this.requestRender(1)}).catch(()=>{for(const e of this._newLayers)e.rejectCallback(-2);this._dbg(4," WASM failed to download, destroying render node"),this.destroy()})}pickDepth(e,t,s){if(!this._vxl||!this._rctx||0===this._layers.size)return null;const r=s.viewport[3]-t;if(e<0||e>s.viewport[2]||t<0||t>s.viewport[3])return this._dbg(4,`[js] pickDepth: outOfRange, screenXY=[${e.toFixed(0)}, ${r.toFixed(0)}]]`),null;this._beforeDraw(this._rctx);const i=s.viewForward,a=s.eye;this._vxl.update_camera_pos_and_direction(a[0],a[1],a[2],i[0],i[1],i[2]),this.updateWasmCamera(s),this._vxl.begin_frame();const n=this._vxl.pick_depth(e,r);if(this._afterDraw(this._rctx,this._vxl),n.success){return n.distanceToCamera}return null}pickObject(e,t,s,r){if(!this._vxl||!this._rctx||0===this._layers.size)return null;const i=Math.round(e),a=Math.round(t);if(i<0||i>s.viewport[2]||a<0||a>s.viewport[3])return this._dbg(4,`[js] pickObject: outOfRange, screenXY=[${i}, ${a}], vp=[${s.viewport.toString()}]`),null;this._beforeDraw(this._rctx);const n=s.viewForward,o=s.eye;this._vxl.update_camera_pos_and_direction(o[0],o[1],o[2],n[0],n[1],n[2]),this.updateWasmCamera(s),this._vxl.begin_frame();let l=null;if(0===r.length)l=this._vxl.pick_object(i,a,0,0);else{const e={str:JSON.stringify({layerIds:r}),byteCount:0,ptr:0,isReusable:!1};this._allocateBlock(e)&&(l=this._vxl.pick_object(i,a,e.ptr,e.byteCount),e.isReusable||this._vxl._free(e.ptr))}return this._afterDraw(this._rctx,this._vxl),l}async getOtherFieldPopupValues(e,s){if(!this._vxl)return[];for(const r of e){const e=r.gpuResult;if(!e)continue;const i=this._layers.get(e.layerId);if(!i||!i.layerView.layer.url)continue;const a=i.layerView.layer,n={responseType:"array-buffer",signal:i.abortController.signal,query:{...i.layerView.layer.customParameters,token:i.layerView.layer.apiKey}},o=e.voxelSpacePosition,l=[Math.floor(o[0]/32),Math.floor(o[1]/32),Math.floor(o[2]/32)],h=[-4&l[0],-4&l[1],-4&l[2]];let d=0;if(e.epochTime){const t=this._vxl.get_layer_epoch_times(i.layerView.wasmLayerId,a.currentVariableId);for(let s=0;s<t.length;++s)if(t[s]===e.epochTime/1e3){d=s;break}}const u=[],_={varIds:[],ptrs:[],sizes:[]};for(const r of s){const e=a.variables.findIndex(e=>e.name===r);if(-1===e)continue;const s=a.variables.getItemAt(e)?.id;if(null==s)continue;const i=`${a.url}/variables/${s}/${d}/bundles/0/${h[0]}-${h[1]}-${h[2]}`;u.push(t(i,n).then(e=>e.data)),_.varIds.push(s)}const c=await Promise.allSettled(u),m=c.length;for(let t=0;t<m;++t){const e=c[t];if("fulfilled"===e.status){const t=e.value,s=this._vxl._malloc(t.byteLength);new Uint8Array(this._vxl.HEAPU8.buffer,s,t.byteLength).set(new Uint8Array(t)),_.ptrs.push(s),_.sizes.push(t.byteLength)}else _.varIds.splice(t,1)}const f=this._vxl.get_other_field_popup_values(e,_);for(let t=0;t<_.ptrs.length;++t)this._vxl._free(_.ptrs[t]);if(f.continuousValues)for(const t in f.continuousValues)r.attributes[t]=f.continuousValues[t];if(f.uniqueValues)for(const t in f.uniqueValues)r.attributes[t]=f.uniqueValues[t]}return e}_beforeDraw(e){this._renderTargetToRestore={fbo:e.getBoundFramebufferObject(),viewport:e.getViewport()},e.setPolygonOffsetFillEnabled(!1),e.setScissorTestEnabled(!1),e.setColorMask(!0,!0,!0,!0)}_afterDraw(e,t){this._renderTargetToRestore.fbo=null,e.externalTextureUnitUpdate(t.get_texture_units_bound_in_frame(),t.get_active_texture_unit()),e.externalVertexArrayObjectUpdate(),e.externalVertexBufferUpdate(),e.externalProgramUpdate()}intersect(e,t,s,r,i){if(!this._vxl||!this._rctx||0===this._layers.size||!e.options.selectionMode||e.options.isFiltered||!e.camera)return;if(null==i||i[0]<0||i[0]>e.camera.viewport[2]||i[1]<0||i[1]>e.camera.viewport[3])return this._dbg(4,i?`[js] VoxelWasmPerScene.intersect: outOfRange, screenXY=[${i[0].toFixed(0)}, ${i[1].toFixed(0)}]`:"[js] VoxelWasmPerScene.intersect: outOfRange, screenXY=null"),null;const a=[];this._layers.forEach(t=>{e.options.filteredLayerViewUids.includes(t.layerView.uid)&&a.push(t.layerView.wasmLayerId)});const n=this.pickObject(i[0],i[1],e.camera,a);if(null==n||-1===n.layerId)return;const o=this._layers.get(n.layerId);if(o){const t=o.layerView.layer.uid,i=n.distanceToCamera/h(s,r),a=d();a[0]=n.worldX,a[1]=n.worldY,a[2]=n.worldZ;const l={},u=o.layerView.layer,_=u.variables.findIndex(e=>e.id===u.currentVariableId);if(_>=0){const e=u.variables.getItemAt(_);null!=e&&(null!=n.continuousValue?l[e.name]=n.continuousValue:null!=n.uniqueValueLabel&&null!=n.uniqueValue?l[e.name]=`${n.uniqueValueLabel} (${n.uniqueValue})`:null!=n.uniqueValue&&(l[e.name]=`${n.uniqueValue}`),e.description.length>0?l["Voxel.CurrentVariable"]=e.description:e.name?.length>0&&(l["Voxel.CurrentVariable"]=e.name))}if(l["Voxel.Position"]=`[${n.voxelSpacePosition.toString()}]`,null!=n.epochTime&&null!=n.nativeTime&&null!=n.nativeTimeUnits){const e=new Date(n.epochTime);l["Voxel.LocalTime"]=e,l["Voxel.SourceTime"]=`${n.nativeTime.toLocaleString()} ${n.nativeTimeUnits}`}null!=n.depth&&(l["Voxel.Depth"]=n.depth);const c=n.faceNormal;l["Voxel.WorldPosition"]=`[${a[0]}, ${a[1]}, ${a[2]}]`;const m=e=>{const s=new f(a,t,()=>this._createVoxelGraphic(o.layerView.layer,l,n));e.set(this.type,s,i,c)},p=e.results,g=2===e.options.store;if((null==p.min.distance||i<p.min.distance)&&m(p.min),(null==p.max.distance||i>p.max.distance)&&m(p.max),g){const t=new x(e.ray);m(t),e.results.all.push(t)}}}_createVoxelGraphic(e,t,s){return new m({layer:e,sourceLayer:e,origin:e.graphicOrigin,attributes:t,gpuResult:s})}_toWasmQuality(e){switch(e){case"low":return 0;case"medium":return 1;case"high":return 2}}_setUpscalingLimits(e,t,s){this._vxl&&this._vxl.set_upscaling_limits(e,t,s)}};e([o()],v.prototype,"produces",void 0),e([o()],v.prototype,"consumes",void 0),v=e([l("esri.layers.VoxelWasmPerSceneView")],v);const b=v;export{b as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/core",
3
- "version": "5.1.0-next.30",
3
+ "version": "5.1.0-next.32",
4
4
  "homepage": "https://js.arcgis.com",
5
5
  "description": "ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API",
6
6
  "keywords": [
@@ -19,7 +19,7 @@
19
19
  "license": "SEE LICENSE IN LICENSE.md",
20
20
  "dependencies": {
21
21
  "@amcharts/amcharts5": "~5.15.5",
22
- "@arcgis/toolkit": "^5.1.0-next.25",
22
+ "@arcgis/toolkit": "^5.1.0-next.30",
23
23
  "@esri/arcgis-html-sanitizer": "~4.1.0",
24
24
  "@esri/calcite-components": "^5.0.2",
25
25
  "@vaadin/grid": "~25.0.3",
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__addDisposableResource as e,__disposeResources as t}from"tslib";import s from"../../../core/Error.js";import r from"../../../core/pbf.js";import{featureGeometryTypeKebabDictionary as n}from"../../../geometry/support/typeUtils.js";const a=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"],o=["esriFieldTypeSmallInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeString","esriFieldTypeDate","esriFieldTypeOID","esriFieldTypeGeometry","esriFieldTypeBlob","esriFieldTypeRaster","esriFieldTypeGUID","esriFieldTypeGlobalID","esriFieldTypeXML","esriFieldTypeBigInteger","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"],i=["sqlTypeBigInt","sqlTypeBinary","sqlTypeBit","sqlTypeChar","sqlTypeDate","sqlTypeDecimal","sqlTypeDouble","sqlTypeFloat","sqlTypeGeometry","sqlTypeGUID","sqlTypeInteger","sqlTypeLongNVarchar","sqlTypeLongVarbinary","sqlTypeLongVarchar","sqlTypeNChar","sqlTypeNVarchar","sqlTypeOther","sqlTypeReal","sqlTypeSmallInt","sqlTypeSqlXml","sqlTypeTime","sqlTypeTimestamp","sqlTypeTimestamp2","sqlTypeTinyInt","sqlTypeVarbinary","sqlTypeVarchar"],c=["upperLeft","lowerLeft"];function l(e,t){const s=e.getEnum();return s<t.length?t[s]:void 0}function u(e,t){e.featureSet.geometryType=e.usesShortGeometryTypes?n.fromJSON(t):t}function g(e,t=e.featureSet.geometryType){return e.usesShortGeometryTypes?n.toJSON(t):t}function p(e){const t=e.asUnsafe();for(;t.next();)switch(t.tag()){case 1:return t.getString();case 2:return t.getFloat();case 3:return t.getDouble();case 4:return t.getSInt32();case 5:return t.getUInt32();case 6:return t.getInt64();case 7:return t.getUInt64();case 8:return t.getSInt64();case 9:return t.getBool();default:return t.skip(),null}return null}function f(e){const t=e.asUnsafe(),s={type:o[0]};for(;t.next();)switch(t.tag()){case 1:s.name=t.getString();break;case 2:s.type=l(t,o);break;case 3:s.alias=t.getString();break;case 4:s.sqlType=l(t,i);break;case 5:default:t.skip();break;case 6:s.defaultValue=t.getString()}return s}function y(e){const t={},s=e.asUnsafe();for(;s.next();)switch(s.tag()){case 1:t.name=s.getString();break;case 2:t.isSystemMaintained=s.getBool();break;default:s.skip()}return t}let d=[];function h(e,t,s){let r=g(t),n=0;const o=e.asUnsafe();for(;o.next();)switch(o.tag()){case 1:1===s?r=g(t,l(o,a)):o.skip();continue;case 2:for(const e=o.getPackedEnd();o.pos()<e;)d[n++]=o.getUInt32();continue;case 3:n>0?(d.length=n,null!=t.geometry(s,r,d)&&(d=[])):t.geometry(s,r,[]);for(const e=o.getPackedEnd();o.pos()<e;)t.coord(o.getSInt64());continue;default:o.skip()}}function m(e,t){const s=[],r=e.asUnsafe();for(;r.next();)if(3!==r.tag())r.skip();else for(const e=r.getPackedEnd();r.pos()<e;)s.push(r.getSInt64());t.centroid(s)}let k=[],T=[],b=[];function S(s,r){const n={stack:[],error:void 0,hasError:!1};try{let o=0;const i=d;let c=0;const l=s.asUnsafe(),u=e(n,l.clonePooled().asUnsafe(),!1);for(;l.next();)switch(l.tag()){case 2:for(const p=l.getPackedEnd();l.pos()<p;)i[o++]=l.getUInt32();continue;case 3:if(!("curvedGeometry"in r))throw new Error(`Tried to parse curved geometry in a ${r.constructor.name}, which doesn't support them.`);l.processMessageWithArgs(I,c++);continue;case 4:{const f=l.getUInt32(),y=l.pos()+f;if(0===c||0===o||0===f){l.move(y);continue}i.length=o,b.length=T.length=c,r.curvedGeometry(g(r),i,T,b);const{hasZ:h,hasM:m}=r.featureSet,S=[],q=[0,0];function w(){F(),q[0]+=S[0],q[1]+=S[1]}function F(){for(let e=0;e<q.length;++e)S[e]=q[e],q[e]=l.getSInt64()}h&&q.push(0),m&&q.push(0);const U=[0,0],D=[0,0];let M=0;for(let x=0;x<o;++x){q.fill(0),w(),r.startCurvedPart(q);for(const G=M+i[x];M<G;++M){const E=T[M],v=b[M];switch(E){case 0:for(let A=0;A<v;++A)w(),r.lineSegment(S,q);continue;case 1:for(let P=0;P<v;++P){F();const W=U;W[0]=l.getSInt64(),W[1]=l.getSInt64(),r.circularArcSegment(S,q,W)}continue;case 2:for(let O=0;O<v;++O)w(),U[0]=l.getSInt64()+S[0],U[1]=l.getSInt64()+S[1],D[0]=l.getSInt64()+U[0],D[1]=l.getSInt64()+U[1],r.bezierSegment(S,q,U,D);continue;case 3:u.move(k[M]);if(u.getUInt32()<7*v)throw new Error("Not implemented: compressed full circle encoding");for(let B=0;B<v;++B){w();const N=U;N[0]=u.getDouble(),N[1]=u.getDouble();const V=u.getDouble(),L=u.getDouble(),C=u.getDouble(),R=u.getDouble(),j=u.getDouble();r.ellipticArcSegment(S,q,N,V,L,C,R,j)}continue}}r.finishCurvedPart(q)}continue}default:l.skip()}}catch(a){n.error=a,n.hasError=!0}finally{t(n)}}function I(e,t){const s=e.asUnsafe();let r=0,n=0,a=0;for(;s.next();)switch(s.tag()){case 1:r=s.getEnum();continue;case 2:n=s.getUInt32();continue;case 3:a=s.pos(),s.skip();continue;default:s.skip()}if(3===r&&0===a)throw new Error("An elliptic arc segment set did not include a parameters array");T[t]=r,b[t]=n,k[t]=a}function q(e,t){t.feature();const s=t.featureSet.features.at(-1);let r=0;const{fields:n}=t.featureSet;for(;e.next();)switch(e.tag()){case 1:if(null==n)throw new Error("A Feature had attributes but the FeatureResult didn't include any fields");s.attributes[n[r++].name]=e.processMessage(p);continue;case 2:e.processMessageWithArgs(h,t,0);continue;case 4:e.processMessageWithArgs(m,t);continue;case 7:e.processMessageWithArgs(S,t);continue;default:e.skip();continue}t.finishFeature?.()}function w(e){const t=[1,1,1,1],s=e.asUnsafe();for(;s.next();)switch(s.tag()){case 1:t[0]=s.getDouble();break;case 2:t[1]=s.getDouble();break;case 4:t[2]=s.getDouble();break;case 3:t[3]=s.getDouble();break;default:s.skip()}return t}function F(e){const t=[0,0,0,0],s=e.asUnsafe();for(;s.next();)switch(s.tag()){case 1:t[0]=s.getDouble();break;case 2:t[1]=s.getDouble();break;case 4:t[2]=s.getDouble();break;case 3:t[3]=s.getDouble();break;default:s.skip()}return t}function U(e){const t={originPosition:c[0]},s=e.asUnsafe();for(;s.next();)switch(s.tag()){case 1:t.originPosition=l(s,c);break;case 2:t.scale=s.processMessage(w);break;case 3:t.translate=s.processMessage(F);break;default:s.skip()}return t}function D(e){const t={},s=e.asUnsafe();for(;s.next();)switch(s.tag()){case 1:t.shapeAreaFieldName=s.getString();break;case 2:t.shapeLengthFieldName=s.getString();break;case 3:t.units=s.getString();break;default:s.skip()}return t}function M(e){const t={};for(;e.next();)switch(e.tag()){case 1:t.wkid=e.getUInt32();break;case 5:t.wkt=e.getString();break;case 2:t.latestWkid=e.getUInt32();break;case 3:t.vcsWkid=e.getUInt32();break;case 4:t.latestVcsWkid=e.getUInt32();break;default:e.skip()}return t}function x(e,t){const s=e.asUnsafe();if(t.featureSet.features.length=0,"features"===t.parseOnly?.type){const e=t.parseOnly.indices.values();let r=0,n=e.next().value;for(;s.next();)15===s.tag()&&r++===n?(n=e.next().value,s.processMessageWithArgs(q,t)):s.skip();return}let r=!1;for("metadata"===t.parseOnly?.type&&(r=!0,t.parseOnly.featureCount=0),u(t,"esriGeometryPoint");s.next();)switch(s.tag()){case 1:t.idField(s.getString());continue;case 3:t.featureSet.globalIdFieldName=s.getString();continue;case 4:t.featureSet.geohashFieldName=s.getString();continue;case 5:t.featureSet.geometryProperties=s.processMessage(D);continue;case 7:u(t,l(s,a));continue;case 8:t.featureSet.spatialReference=s.processMessageWithArgs(M);continue;case 10:t.featureSet.hasZ=s.getBool();continue;case 11:t.featureSet.hasM=s.getBool();continue;case 12:t.featureSet.transform=s.processMessage(U);continue;case 9:t.featureSet.exceededTransferLimit=s.getBool();continue;case 13:t.featureSet.fields??=[],t.featureSet.fields.push(s.processMessage(f));continue;case 15:if(r){++t.parseOnly.featureCount,s.skip();continue}s.processMessageWithArgs(q,t);continue;case 2:t.idField(s.processMessage(y));continue;default:s.skip()}}function G(e,t,s){let r=-1;for(;e.next();)switch(e.tag()){case 4:r=e.pos(),e.skip();continue;case 1:e.processMessageWithArgs(x,t);continue;default:e.skip()}if(-1!==r){if(!t.queryGeometry()){const s=e.pos();e.move(r),e.processMessageWithArgs(h,t,1),e.move(s)}s.queryGeometryType=t.queryGeometryType(),s.queryGeometry=t.queryGeometry()}t.finish(),s.featureResult=t.featureSet}function E(n,a){const o={stack:[],error:void 0,hasError:!1};try{e(o,{[Symbol.dispose](){d=[],k=[],T=[],b=[]}},!1);try{const s={stack:[],error:void 0,hasError:!1};try{const t=e(s,r.constructPooled(new Uint8Array(n),new DataView(n)),!1);let o;for(;t.next();)if(2===t.tag())o={},t.processMessageWithArgs(G,a,o);else t.skip();return o}catch(i){s.error=i,s.hasError=!0}finally{t(s)}}catch(c){throw new s("query:parsing-pbf","Error while parsing FeatureSet PBF payload",{error:c})}}catch(l){o.error=l,o.hasError=!0}finally{t(o)}}export{E as parseFeatureQuery,f as parseField,U as parseTransform};
2
+ import{__addDisposableResource as e,__disposeResources as t}from"tslib";import s from"../../../core/Error.js";import r from"../../../core/pbf.js";import{featureGeometryTypeKebabDictionary as n}from"../../../geometry/support/typeUtils.js";const a=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"],o=["esriFieldTypeSmallInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeString","esriFieldTypeDate","esriFieldTypeOID","esriFieldTypeGeometry","esriFieldTypeBlob","esriFieldTypeRaster","esriFieldTypeGUID","esriFieldTypeGlobalID","esriFieldTypeXML","esriFieldTypeBigInteger","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"],i=["sqlTypeBigInt","sqlTypeBinary","sqlTypeBit","sqlTypeChar","sqlTypeDate","sqlTypeDecimal","sqlTypeDouble","sqlTypeFloat","sqlTypeGeometry","sqlTypeGUID","sqlTypeInteger","sqlTypeLongNVarchar","sqlTypeLongVarbinary","sqlTypeLongVarchar","sqlTypeNChar","sqlTypeNVarchar","sqlTypeOther","sqlTypeReal","sqlTypeSmallInt","sqlTypeSqlXml","sqlTypeTime","sqlTypeTimestamp","sqlTypeTimestamp2","sqlTypeTinyInt","sqlTypeVarbinary","sqlTypeVarchar"],c=["upperLeft","lowerLeft"];function l(e,t){const s=e.getEnum();return s<t.length?t[s]:void 0}function u(e,t){e.featureSet.geometryType=e.usesShortGeometryTypes?n.fromJSON(t):t}function g(e,t=e.featureSet.geometryType){return e.usesShortGeometryTypes?n.toJSON(t):t}function p(e){const t=e.asUnsafe();for(;t.next();)switch(t.tag()){case 1:return t.getString();case 2:return t.getFloat();case 3:return t.getDouble();case 4:return t.getSInt32();case 5:return t.getUInt32();case 6:return t.getInt64();case 7:return t.getUInt64();case 8:return t.getSInt64();case 9:return t.getBool();default:return t.skip(),null}return null}function f(e){const t=e.asUnsafe(),s={type:o[0]};for(;t.next();)switch(t.tag()){case 1:s.name=t.getString();break;case 2:s.type=l(t,o);break;case 3:s.alias=t.getString();break;case 4:s.sqlType=l(t,i);break;case 5:default:t.skip();break;case 6:s.defaultValue=t.getString()}return s}function y(e){const t={},s=e.asUnsafe();for(;s.next();)switch(s.tag()){case 1:t.name=s.getString();break;case 2:t.isSystemMaintained=s.getBool();break;default:s.skip()}return t}let d=[];function h(e,t,s){let r=g(t),n=0;const o=e.asUnsafe();for(;o.next();)switch(o.tag()){case 1:1===s?r=g(t,l(o,a)):o.skip();continue;case 2:for(const e=o.getPackedEnd();o.pos()<e;)d[n++]=o.getUInt32();continue;case 3:n>0?(d.length=n,null!=t.geometry(s,r,d)&&(d=[])):t.geometry(s,r,[]);for(const e=o.getPackedEnd();o.pos()<e;)t.coord(o.getSInt64());continue;default:o.skip()}}function m(e,t){const s=[],r=e.asUnsafe();for(;r.next();)if(3!==r.tag())r.skip();else for(const e=r.getPackedEnd();r.pos()<e;)s.push(r.getSInt64());t.centroid(s)}let k=[],T=[],b=[];function S(s,r){const n={stack:[],error:void 0,hasError:!1};try{let o=0;const i=d;let c=0;const l=s.asUnsafe(),u=e(n,l.clonePooled().asUnsafe(),!1);for(;l.next();)switch(l.tag()){case 2:for(const p=l.getPackedEnd();l.pos()<p;)i[o++]=l.getUInt32();continue;case 3:if(!("curvedGeometry"in r))throw new Error(`Tried to parse curved geometry in a ${r.constructor.name}, which doesn't support them.`);l.processMessageWithArgs(I,c++);continue;case 4:{const f=l.getUInt32(),y=l.pos()+f;if(0===c||0===o||0===f){l.move(y);continue}i.length=o,b.length=T.length=c,r.curvedGeometry(g(r),i,T,b);const{hasZ:h,hasM:m}=r.featureSet,S=[],q=[0,0];function w(){for(let e=0;e<q.length;++e)S[e]=q[e],q[e]=l.getSInt64()}h&&q.push(0),m&&q.push(0);const F=[0,0],U=[0,0],D=F,M=F;let x=0;for(let G=0;G<o;++G){w(),S.fill(0),r.startCurvedPart(q);for(const E=x+i[G];x<E;++x){const v=T[x],A=b[x];switch(v){case 0:for(let P=0;P<A;++P)w(),q[0]+=S[0],q[1]+=S[1],r.lineSegment(S,q);continue;case 1:for(let W=0;W<A;++W)w(),D[0]=l.getSInt64(),D[1]=l.getSInt64(),r.circularArcSegment(S,q,D);continue;case 2:for(let O=0;O<A;++O)w(),F[0]=l.getSInt64(),F[1]=l.getSInt64(),U[0]=l.getSInt64(),U[1]=l.getSInt64(),r.bezierSegment(S,q,F,U);continue;case 3:u.move(k[x]);if(u.getUInt32()<7*A)throw new Error("Not implemented: compressed full circle encoding");for(let B=0;B<A;++B){w(),M[0]=u.getDouble(),M[1]=u.getDouble();const N=u.getDouble(),V=u.getDouble(),L=u.getDouble(),C=u.getDouble(),R=u.getDouble();r.ellipticArcSegment(S,q,M,N,V,L,C,R)}continue}}r.finishCurvedPart(q)}continue}default:l.skip()}}catch(a){n.error=a,n.hasError=!0}finally{t(n)}}function I(e,t){const s=e.asUnsafe();let r=0,n=0,a=0;for(;s.next();)switch(s.tag()){case 1:r=s.getEnum();continue;case 2:n=s.getUInt32();continue;case 3:a=s.pos(),s.skip();continue;default:s.skip()}if(3===r&&0===a)throw new Error("An elliptic arc segment set did not include a parameters array");T[t]=r,b[t]=n,k[t]=a}function q(e,t){t.feature();const s=t.featureSet.features.at(-1);let r=0;const{fields:n}=t.featureSet;for(;e.next();)switch(e.tag()){case 1:if(null==n)throw new Error("A Feature had attributes but the FeatureResult didn't include any fields");s.attributes[n[r++].name]=e.processMessage(p);continue;case 2:e.processMessageWithArgs(h,t,0);continue;case 4:e.processMessageWithArgs(m,t);continue;case 7:e.processMessageWithArgs(S,t);continue;default:e.skip();continue}t.finishFeature?.()}function w(e){const t=[1,1,1,1],s=e.asUnsafe();for(;s.next();)switch(s.tag()){case 1:t[0]=s.getDouble();break;case 2:t[1]=s.getDouble();break;case 4:t[2]=s.getDouble();break;case 3:t[3]=s.getDouble();break;default:s.skip()}return t}function F(e){const t=[0,0,0,0],s=e.asUnsafe();for(;s.next();)switch(s.tag()){case 1:t[0]=s.getDouble();break;case 2:t[1]=s.getDouble();break;case 4:t[2]=s.getDouble();break;case 3:t[3]=s.getDouble();break;default:s.skip()}return t}function U(e){const t={originPosition:c[0]},s=e.asUnsafe();for(;s.next();)switch(s.tag()){case 1:t.originPosition=l(s,c);break;case 2:t.scale=s.processMessage(w);break;case 3:t.translate=s.processMessage(F);break;default:s.skip()}return t}function D(e){const t={},s=e.asUnsafe();for(;s.next();)switch(s.tag()){case 1:t.shapeAreaFieldName=s.getString();break;case 2:t.shapeLengthFieldName=s.getString();break;case 3:t.units=s.getString();break;default:s.skip()}return t}function M(e){const t={};for(;e.next();)switch(e.tag()){case 1:t.wkid=e.getUInt32();break;case 5:t.wkt=e.getString();break;case 2:t.latestWkid=e.getUInt32();break;case 3:t.vcsWkid=e.getUInt32();break;case 4:t.latestVcsWkid=e.getUInt32();break;default:e.skip()}return t}function x(e,t){const s=e.asUnsafe();if(t.featureSet.features.length=0,"features"===t.parseOnly?.type){const e=t.parseOnly.indices.values();let r=0,n=e.next().value;for(;s.next();)15===s.tag()&&r++===n?(n=e.next().value,s.processMessageWithArgs(q,t)):s.skip();return}let r=!1;for("metadata"===t.parseOnly?.type&&(r=!0,t.parseOnly.featureCount=0),u(t,"esriGeometryPoint");s.next();)switch(s.tag()){case 1:t.idField(s.getString());continue;case 3:t.featureSet.globalIdFieldName=s.getString();continue;case 4:t.featureSet.geohashFieldName=s.getString();continue;case 5:t.featureSet.geometryProperties=s.processMessage(D);continue;case 7:u(t,l(s,a));continue;case 8:t.featureSet.spatialReference=s.processMessageWithArgs(M);continue;case 10:t.featureSet.hasZ=s.getBool();continue;case 11:t.featureSet.hasM=s.getBool();continue;case 12:t.featureSet.transform=s.processMessage(U);continue;case 9:t.featureSet.exceededTransferLimit=s.getBool();continue;case 13:t.featureSet.fields??=[],t.featureSet.fields.push(s.processMessage(f));continue;case 15:if(r){++t.parseOnly.featureCount,s.skip();continue}s.processMessageWithArgs(q,t);continue;case 2:t.idField(s.processMessage(y));continue;default:s.skip()}}function G(e,t,s){let r=-1;for(;e.next();)switch(e.tag()){case 4:r=e.pos(),e.skip();continue;case 1:e.processMessageWithArgs(x,t);continue;default:e.skip()}if(-1!==r){if(!t.queryGeometry()){const s=e.pos();e.move(r),e.processMessageWithArgs(h,t,1),e.move(s)}s.queryGeometryType=t.queryGeometryType(),s.queryGeometry=t.queryGeometry()}t.finish(),s.featureResult=t.featureSet}function E(n,a){const o={stack:[],error:void 0,hasError:!1};try{e(o,{[Symbol.dispose](){d=[],k=[],T=[],b=[]}},!1);try{const s={stack:[],error:void 0,hasError:!1};try{const t=e(s,r.constructPooled(new Uint8Array(n),new DataView(n)),!1);let o;for(;t.next();)if(2===t.tag())o={},t.processMessageWithArgs(G,a,o);else t.skip();return o}catch(i){s.error=i,s.hasError=!0}finally{t(s)}}catch(c){throw new s("query:parsing-pbf","Error while parsing FeatureSet PBF payload",{error:c})}}catch(l){o.error=l,o.hasError=!0}finally{t(o)}}export{E as parseFeatureQuery,f as parseField,U as parseTransform};
@@ -81,6 +81,14 @@ export default abstract class ActionBase extends ActionBaseSuperclass {
81
81
  * @default true
82
82
  */
83
83
  accessor visible: boolean;
84
+ /**
85
+ * Sets the `className` property internally without logging a deprecation warning.
86
+ *
87
+ * @deprecated since 5.1. We can remove this for 6.0 - https://devtopia.esri.com/WebGIS/arcgis-js-api/issues/78974
88
+ * @param className - The CSS class name to set on the action button.
89
+ * @internal
90
+ */
91
+ _internalSetClassName(className: string | null | undefined): this;
84
92
  /**
85
93
  * Creates a deep clone of this object.
86
94
  *
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as t}from"tslib";import e from"../../core/Accessor.js";import{deprecatedProperty as o}from"../../core/deprecate.js";import{IdentifiableMixin as s}from"../../core/Identifiable.js";import i from"../../core/Logger.js";import{property as r,subclass as c}from"../../core/accessorSupport/decorators.js";let p=class extends(s(e)){constructor(t){super(t),this.active=!1,this.disabled=!1,this.icon=null,this.id=null,this.indicator=!1,this.title=null,this.type=null,this.visible=!0}get className(){return o(i.getLogger(this),"className",{replacement:"icon",version:"5.1",warnOnce:!0}),this._get("className")??null}set className(t){o(i.getLogger(this),"className",{replacement:"icon",version:"5.1",warnOnce:!0}),this._set("className",t)}};t([r()],p.prototype,"active",void 0),t([r()],p.prototype,"className",null),t([r()],p.prototype,"disabled",void 0),t([r()],p.prototype,"icon",void 0),t([r()],p.prototype,"id",void 0),t([r()],p.prototype,"indicator",void 0),t([r()],p.prototype,"title",void 0),t([r()],p.prototype,"type",void 0),t([r()],p.prototype,"visible",void 0),p=t([c("esri.support.actions.ActionBase")],p);const a=p;export{a as default};
2
+ import{__decorate as t}from"tslib";import e from"../../core/Accessor.js";import{deprecatedProperty as o}from"../../core/deprecate.js";import{IdentifiableMixin as s}from"../../core/Identifiable.js";import i from"../../core/Logger.js";import{property as r,subclass as a}from"../../core/accessorSupport/decorators.js";let p=class extends(s(e)){constructor(t){super(t),this.active=!1,this.disabled=!1,this.icon=null,this.id=null,this.indicator=!1,this.title=null,this.type=null,this.visible=!0}_internalSetClassName(t){return this._set("className",t),this}get className(){return this._get("className")??null}set className(t){o(i.getLogger(this),"className",{replacement:"icon",version:"5.1",warnOnce:!0}),this._set("className",t)}};t([r()],p.prototype,"active",void 0),t([r()],p.prototype,"className",null),t([r()],p.prototype,"disabled",void 0),t([r()],p.prototype,"icon",void 0),t([r()],p.prototype,"id",void 0),t([r()],p.prototype,"indicator",void 0),t([r()],p.prototype,"title",void 0),t([r()],p.prototype,"type",void 0),t([r()],p.prototype,"visible",void 0),p=t([a("esri.support.actions.ActionBase")],p);const c=p;export{c as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as t}from"tslib";import{property as i,subclass as s}from"../../core/accessorSupport/decorators.js";import e from"./ActionBase.js";var o;let r=o=class extends e{constructor(t){super(t),this.image=null,this.type="button"}clone(){return new o({active:this.active,className:this.className,disabled:this.disabled,icon:this.icon,id:this.id,indicator:this.indicator,title:this.title,visible:this.visible,image:this.image})}};t([i()],r.prototype,"image",void 0),r=o=t([s("esri.support.actions.ActionButton")],r);const a=r;export{a as default};
2
+ import{__decorate as t}from"tslib";import{property as i,subclass as s}from"../../core/accessorSupport/decorators.js";import e from"./ActionBase.js";var o;let r=o=class extends e{constructor(t){super(t),this.image=null,this.type="button"}clone(){return new o({active:this.active,disabled:this.disabled,icon:this.icon,id:this.id,indicator:this.indicator,title:this.title,visible:this.visible,image:this.image})._internalSetClassName(this.className)}};t([i()],r.prototype,"image",void 0),r=o=t([s("esri.support.actions.ActionButton")],r);const a=r;export{a as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as i}from"tslib";import{property as t,subclass as s}from"../../core/accessorSupport/decorators.js";import e from"./ActionBase.js";var o;let a=o=class extends e{constructor(i){super(i),this.image=null,this.type="toggle",this.value=!1}clone(){return new o({active:this.active,className:this.className,disabled:this.disabled,icon:this.icon,id:this.id,indicator:this.indicator,title:this.title,visible:this.visible,image:this.image,value:this.value})}};i([t()],a.prototype,"image",void 0),i([t()],a.prototype,"value",void 0),a=o=i([s("esri.support.actions.ActionToggle")],a);const r=a;export{r as default};
2
+ import{__decorate as t}from"tslib";import{property as i,subclass as e}from"../../core/accessorSupport/decorators.js";import s from"./ActionBase.js";var o;let a=o=class extends s{constructor(t){super(t),this.image=null,this.type="toggle",this.value=!1}clone(){return new o({active:this.active,disabled:this.disabled,icon:this.icon,id:this.id,indicator:this.indicator,title:this.title,visible:this.visible,image:this.image,value:this.value})._internalSetClassName(this.className)}};t([i()],a.prototype,"image",void 0),t([i()],a.prototype,"value",void 0),a=o=t([e("esri.support.actions.ActionToggle")],a);const r=a;export{r as default};