@arcgis/core 5.2.0-next.13 → 5.2.0-next.14

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 (303) hide show
  1. package/arcgisGlobal.d.ts +3 -3
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/03354e9256b2f77fd4f2.js +1 -0
  4. package/assets/esri/core/workers/chunks/0826d36dfbfa28442b70.js +1 -0
  5. package/assets/esri/core/workers/chunks/{87c2d4d58c2487324fb7.js → 0a8ba5cb857f61de40fb.js} +3 -3
  6. package/assets/esri/core/workers/chunks/152f1c08197955224ad3.js +1 -0
  7. package/assets/esri/core/workers/chunks/1a0903b1d2d5101977c6.js +1 -0
  8. package/assets/esri/core/workers/chunks/{de541ad390a8d258d2e6.js → 1d5db8746a4f1ed1d18f.js} +1 -1
  9. package/assets/esri/core/workers/chunks/1effde6a39ef0d4af525.js +1 -0
  10. package/assets/esri/core/workers/chunks/{2a5176533e78a92d8e5b.js → 20c729fca2e4b4c6b28d.js} +1 -1
  11. package/assets/esri/core/workers/chunks/23d50c4478f40a7d62bf.js +1 -0
  12. package/assets/esri/core/workers/chunks/2623cd08487fdc9a94f1.js +1 -0
  13. package/assets/esri/core/workers/chunks/2c3fc2805f6de0963789.js +1 -0
  14. package/assets/esri/core/workers/chunks/2c4f10eaf02ef090ee8f.js +1 -0
  15. package/assets/esri/core/workers/chunks/314bc1b356d43bfa72a8.js +1 -0
  16. package/assets/esri/core/workers/chunks/{34544c79ce568f30a094.js → 31762eb20a9a0ed3f8b0.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{26dca1d387183282276a.js → 318a2702632aaa4d3a63.js} +1 -1
  18. package/assets/esri/core/workers/chunks/3526ab3b1f87c24ae6f8.js +1 -0
  19. package/assets/esri/core/workers/chunks/{81808c3aead7dfac3049.js → 38cfedce779dd75bd217.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{5075e85e1eafd431a8c0.js → 39c994536ce6c1e5c956.js} +1 -1
  21. package/assets/esri/core/workers/chunks/3b74749db78bcba2bc16.js +1 -0
  22. package/assets/esri/core/workers/chunks/3d83ac791212b81c9d11.js +1 -0
  23. package/assets/esri/core/workers/chunks/3ecb906322a6a5c8c93b.js +1 -0
  24. package/assets/esri/core/workers/chunks/3f67162456a1f02190fa.js +1 -0
  25. package/assets/esri/core/workers/chunks/{ef46ef4f0ee9f2aeaa4a.js → 426b8e1e2eef2460851d.js} +1 -1
  26. package/assets/esri/core/workers/chunks/4376bc2934a996d8bc27.js +1 -0
  27. package/assets/esri/core/workers/chunks/44d0ca9d4c5f1722688c.js +1 -0
  28. package/assets/esri/core/workers/chunks/{e25bcfdd8f20f8a08b19.js → 4d57c771af4137f74bfb.js} +1 -1
  29. package/assets/esri/core/workers/chunks/4e4419282c4bf7ee4678.js +1 -0
  30. package/assets/esri/core/workers/chunks/4e788fc6cb2ea936f676.js +1 -0
  31. package/assets/esri/core/workers/chunks/4f51963815b0d53ffbd9.js +1 -0
  32. package/assets/esri/core/workers/chunks/5100b5a6a506c704dfaf.js +1 -0
  33. package/assets/esri/core/workers/chunks/52afd43bbe23e358efb5.js +1 -0
  34. package/assets/esri/core/workers/chunks/5aba23584e0b230c75f5.js +1 -0
  35. package/assets/esri/core/workers/chunks/{d3c760109a70a71448c5.js → 67773a9f031d9f1d672f.js} +1 -1
  36. package/assets/esri/core/workers/chunks/6f7193b9ff5942c0d354.js +1 -0
  37. package/assets/esri/core/workers/chunks/70737052bab29fcaa120.js +1 -0
  38. package/assets/esri/core/workers/chunks/718d2d430c1a5a940b83.js +1 -0
  39. package/assets/esri/core/workers/chunks/71c996e1ae84d9daddf2.js +1 -0
  40. package/assets/esri/core/workers/chunks/753e0b21e57c12c742ee.js +1 -0
  41. package/assets/esri/core/workers/chunks/764c8ba14ab74b66b391.js +1 -0
  42. package/assets/esri/core/workers/chunks/{1996f0a930abdd97b855.js → 7a8ed08cd173963b3112.js} +1 -1
  43. package/assets/esri/core/workers/chunks/{cc697c4d9cdc116373dc.js → 81726d997a2d34449bb2.js} +1 -1
  44. package/assets/esri/core/workers/chunks/{74e1826ad9e2c4fd3b42.js → 81883bca8a79ee2ddb00.js} +1 -1
  45. package/assets/esri/core/workers/chunks/{9fee0110dc7fee4c95e2.js → 854c320af09b6afc4b80.js} +2 -2
  46. package/assets/esri/core/workers/chunks/85505a8b8b0794656d06.js +1 -0
  47. package/assets/esri/core/workers/chunks/859bc873e7af911a518f.js +1 -0
  48. package/assets/esri/core/workers/chunks/{8407c91cce31e087b41b.js → 886ae23a1d8fa21e531f.js} +1 -1
  49. package/assets/esri/core/workers/chunks/{3ff7aa216cd794d951e8.js → 8e99f937fd36cf2cd05f.js} +1 -1
  50. package/assets/esri/core/workers/chunks/{c357c0a08b99c1e7f290.js → 9331969046f2b277d620.js} +1 -1
  51. package/assets/esri/core/workers/chunks/93d08d82ceab19e314f8.js +1 -0
  52. package/assets/esri/core/workers/chunks/97a654e8054302582a3b.js +1 -0
  53. package/assets/esri/core/workers/chunks/97d2bdbea39cbcf8fd0f.js +1 -0
  54. package/assets/esri/core/workers/chunks/a0208e35b217808777c4.js +1 -0
  55. package/assets/esri/core/workers/chunks/{f25bb204cf6727f6fdef.js → a0876a52a3c2ad849370.js} +1 -1
  56. package/assets/esri/core/workers/chunks/{7ad09ac5793e8d47b4b2.js → a4b970a841b3085500fc.js} +1 -1
  57. package/assets/esri/core/workers/chunks/aa5f36d7ed59c625ba78.js +1 -0
  58. package/assets/esri/core/workers/chunks/b045bffb4f2eb9203183.js +1 -0
  59. package/assets/esri/core/workers/chunks/b590402170ae289290d7.js +1 -0
  60. package/assets/esri/core/workers/chunks/b9935cc8e2bd4045058a.js +1 -0
  61. package/assets/esri/core/workers/chunks/{1a527c0740d9f4fa0791.js → bc547cf814d6703cef59.js} +1 -1
  62. package/assets/esri/core/workers/chunks/bcc097271f5cdf0a97a7.js +1 -0
  63. package/assets/esri/core/workers/chunks/bdc66ef2b6ed783047d5.js +1 -0
  64. package/assets/esri/core/workers/chunks/be1d2c3a61e6447fbbc7.js +1 -0
  65. package/assets/esri/core/workers/chunks/bf6ae205fbfbfcd1a0ee.js +1 -0
  66. package/assets/esri/core/workers/chunks/bfd1aef8ac795e1ce227.js +1 -0
  67. package/assets/esri/core/workers/chunks/c148ad0ea9258046ac1f.js +1 -0
  68. package/assets/esri/core/workers/chunks/{0f75c19d8e296a32e329.js → c2cd80b712f29e8cbb8d.js} +1 -1
  69. package/assets/esri/core/workers/chunks/cc0efa716b8414a44398.js +1 -0
  70. package/assets/esri/core/workers/chunks/{8f6833671c071b522923.js → cd66bd30f654fe571e57.js} +1 -1
  71. package/assets/esri/core/workers/chunks/cf41a66fb97c1076fb34.js +1 -0
  72. package/assets/esri/core/workers/chunks/cf8ce21dc649021e97f6.js +1 -0
  73. package/assets/esri/core/workers/chunks/d3be4d914fc99a1d686c.js +1 -0
  74. package/assets/esri/core/workers/chunks/dbd2bfcbf3e0f86f07b8.js +1 -0
  75. package/assets/esri/core/workers/chunks/{6675d56f49d07a97dc40.js → dd0c1cf921369e2bc48b.js} +1 -1
  76. package/assets/esri/core/workers/chunks/df18b0a653b328d8d052.js +1 -0
  77. package/assets/esri/core/workers/chunks/df54e741db40b308c2dd.js +2 -0
  78. package/assets/esri/core/workers/chunks/{89e09276086745aa21fa.js → e4e2f479c0c45ae1b2c3.js} +1 -1
  79. package/assets/esri/core/workers/chunks/e656fd5ecf9ac059a87b.js +1 -0
  80. package/assets/esri/core/workers/chunks/{58a7cdebc3d182c15ec6.js → e77df11aee136d64ff0f.js} +1 -1
  81. package/assets/esri/core/workers/chunks/{7a474ce61cf484df87b4.js → e80376832050a4b6d28a.js} +1 -1
  82. package/assets/esri/core/workers/chunks/f116331c6eca937aac8e.js +1 -0
  83. package/assets/esri/core/workers/chunks/{3b837b512999e6ab24bc.js → f148666308071bdb185a.js} +1 -1
  84. package/assets/esri/core/workers/chunks/f23e995320674b32e142.js +1 -0
  85. package/assets/esri/core/workers/chunks/f334bf192dff5af10a70.js +1 -0
  86. package/assets/esri/core/workers/chunks/f76b1fc36f5606cac2c8.js +1 -0
  87. package/assets/esri/core/workers/chunks/{893c0d28a5bf3f9f29f1.js → f93facf47aba9b128fcc.js} +1 -1
  88. package/assets/esri/core/workers/chunks/fa1336b60278017d2525.js +1 -0
  89. package/assets/esri/core/workers/chunks/{c911f0b5bdd43b66b731.js → fa3faec65882c5b6f1a0.js} +1 -1
  90. package/assets/esri/core/workers/chunks/fccc34b86454c56f27ab.js +1 -0
  91. package/assets/esri/libs/parquet/pkg/bundle_bg.wasm +0 -0
  92. package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core-simd.wasm +0 -0
  93. package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core.wasm +0 -0
  94. package/assets/esri/themes/base/widgets/_BatchAttributeForm.scss +5 -1
  95. package/assets/esri/themes/dark/main.css +1 -1
  96. package/assets/esri/themes/light/main.css +1 -1
  97. package/assets/esri/themes/light/view.css +1 -1
  98. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis.json +1 -1
  99. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_en.json +1 -1
  100. package/chunks/Component.glsl.js +6 -6
  101. package/chunks/GlobalIlluminationBlur.glsl.js +7 -7
  102. package/chunks/arcgis-knowledge-client-core-simd.js +1 -1
  103. package/chunks/arcgis-knowledge-client-core.js +1 -1
  104. package/chunks/bundle2.js +1 -1
  105. package/config.js +1 -1
  106. package/core/promiseUtils.d.ts +1 -1
  107. package/core/promiseUtils.js +1 -1
  108. package/core/units.js +1 -1
  109. package/form/types.d.ts +1 -1
  110. package/geometry/Mesh.d.ts +220 -95
  111. package/geometry/operators/support/projectionZScaling.js +1 -1
  112. package/geometry/support/MeshGeoreferencedVertexSpace.d.ts +35 -13
  113. package/geometry/support/MeshLocalVertexSpace.d.ts +32 -8
  114. package/geometry/support/MeshVertexAttributes.d.ts +6 -2
  115. package/geometry/support/heightModelInfoUtils.js +1 -1
  116. package/geometry/support/zscale.js +1 -1
  117. package/graphic/{AnnotationGraphicOrigin.d.ts → AnnotationFeatureGraphicOrigin.d.ts} +9 -9
  118. package/graphic/{AnnotationGraphicOrigin.js → AnnotationFeatureGraphicOrigin.js} +1 -1
  119. package/interfaces.d.ts +3 -3
  120. package/kernel.js +1 -1
  121. package/layers/{AnnotationLayer.d.ts → AnnotationFeatureLayer.d.ts} +24 -24
  122. package/layers/AnnotationFeatureLayer.js +2 -0
  123. package/layers/GaussianSplatLayer.d.ts +4 -1
  124. package/layers/graphics/data/QueryEngine.js +1 -1
  125. package/layers/graphics/data/queryUtils.js +1 -1
  126. package/layers/graphics/sources/parquet/ParquetFileStatistics.js +1 -1
  127. package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
  128. package/layers/graphics/sources/support/parquetIdUtils.js +1 -1
  129. package/layers/save/featureLayerUtils.js +1 -1
  130. package/layers/support/AnnotationSublayer.d.ts +7 -7
  131. package/layers/support/FeatureEffect.d.ts +3 -2
  132. package/layers/support/arcgisLayers.js +1 -1
  133. package/layers/support/fetchService.js +1 -1
  134. package/layers/support/layerUtils.js +1 -1
  135. package/layers/support/layersLoader.js +1 -1
  136. package/layers/support/parquetUtils.js +1 -1
  137. package/layers/support/schemaValidator.js +1 -1
  138. package/layers/types.d.ts +1 -1
  139. package/networks/Network.js +1 -1
  140. package/networks/UtilityNetwork.js +1 -1
  141. package/networks/support/networkFieldUtils.js +1 -1
  142. package/package.json +2 -2
  143. package/portal/schemas/definitions.js +1 -1
  144. package/portal/schemas/gaussianSplatLayerItem.js +2 -0
  145. package/portal/schemas/integratedMesh3DTilesLayerItem.js +1 -1
  146. package/portal/support/loadUtils.js +1 -1
  147. package/renderers/support/types.d.ts +1 -1
  148. package/renderers/visualVariables/RotationVariable.d.ts +1 -16
  149. package/renderers/visualVariables/RotationVariable.js +1 -1
  150. package/rest/knowledgeGraph/ReplicaDefinition.d.ts +0 -2
  151. package/rest/knowledgeGraph/ServiceDefinition.d.ts +1 -1
  152. package/rest/knowledgeGraph/wasmInterface/replicaToWasmEncodedFactories.js +1 -1
  153. package/rest/knowledgeGraph/wasmInterface/wasmToReplicaFactories.js +1 -1
  154. package/rest/knowledgeGraphService.js +1 -1
  155. package/rest/networks/support/QueryAssociationsParameters.d.ts +2 -2
  156. package/rest/networks/support/SynthesizeAssociationGeometriesParameters.d.ts +2 -2
  157. package/rest/networks/support/TraceParameters.d.ts +2 -2
  158. package/rest/support/AttributeBinsQuery.js +1 -1
  159. package/rest/support/Query.js +1 -1
  160. package/rest/support/TopFeaturesQuery.js +1 -1
  161. package/support/revision.js +1 -1
  162. package/views/2d/engine/webgl/TextureManager.js +1 -1
  163. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  164. package/views/2d/engine/webgl/util/createMatcher.js +1 -1
  165. package/views/2d/layerViewModuleImportUtils.js +1 -1
  166. package/views/2d/layers/AnnotationFeatureLayerView2D.js +2 -0
  167. package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
  168. package/views/2d/layers/TileLayerView2D.js +1 -1
  169. package/views/2d/layers/features/sources/strategies/support/queryAdapters.js +1 -1
  170. package/views/2d/layers/support/annodime/annotationSchema.js +1 -1
  171. package/views/2d/types.d.ts +2 -2
  172. package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
  173. package/views/3d/analysis/ShadowCast/ShadowCastTooltip.js +1 -1
  174. package/views/3d/layerViewModuleImportUtils.js +1 -1
  175. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  176. package/views/3d/support/GaussianSplatSortWorker.js +1 -1
  177. package/views/3d/support/GaussianSplatWorkerHandle.js +1 -1
  178. package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
  179. package/views/3d/support/gaussianSplatting/GaussianSplatOrderTexture.js +1 -1
  180. package/views/3d/support/gaussianSplatting/GaussianSplatTextureAtlas.js +1 -1
  181. package/views/3d/terrain/Tile.js +1 -1
  182. package/views/3d/terrain/isTerrainSurfaceLayer.js +1 -1
  183. package/views/3d/types.d.ts +1 -1
  184. package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBuffer.glsl.js +7 -7
  185. package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBufferFields.glsl.js +29 -20
  186. package/views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatTextureFetch.glsl.js +6 -8
  187. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TexelFormatInfo.js +2 -0
  188. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferFieldCreation.js +1 -1
  189. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferLayout.js +1 -1
  190. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBuffer.js +1 -1
  191. package/views/layers/{AnnotationLayerView.d.ts → AnnotationFeatureLayerView.d.ts} +6 -6
  192. package/views/layers/FeatureLikeLayerView.d.ts +2 -2
  193. package/views/layers/FeatureLikeLayerView.js +1 -1
  194. package/webdoc/widgets/FloorFilter.d.ts +14 -1
  195. package/webdoc/widgets/FloorFilter.js +1 -1
  196. package/widgets/AreaMeasurement2D/AreaMeasurement2DTool.js +1 -1
  197. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.d.ts +12 -4
  198. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
  199. package/widgets/BatchAttributeForm/ReactiveGraphic.js +1 -1
  200. package/widgets/BatchAttributeForm/ValueChangeTransaction.js +2 -0
  201. package/widgets/BatchAttributeForm/VisibleElements.d.ts +8 -1
  202. package/widgets/BatchAttributeForm/VisibleElements.js +1 -1
  203. package/widgets/BatchAttributeForm/batchAttributeFormUtils.js +1 -1
  204. package/widgets/BatchAttributeForm/css.js +1 -1
  205. package/widgets/BatchAttributeForm/expressions/ExpressionsManager.js +1 -1
  206. package/widgets/BatchAttributeForm/expressions/ExpressionsModel.js +1 -1
  207. package/widgets/BatchAttributeForm/inputs/BatchFormInputs.d.ts +3 -0
  208. package/widgets/BatchAttributeForm/inputs/BatchFormInputs.js +1 -1
  209. package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
  210. package/widgets/BatchAttributeForm/inputs/GroupInput.js +1 -1
  211. package/widgets/BatchAttributeForm/inputs/InputBase.js +1 -1
  212. package/widgets/BatchAttributeForm/inputs/RelationshipElementInput.js +1 -1
  213. package/widgets/BatchAttributeForm/inputs/support/inputUtils.js +1 -1
  214. package/widgets/BatchAttributeForm/interfaceUtils.js +1 -1
  215. package/widgets/BatchAttributeForm/stringUtils.js +2 -0
  216. package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
  217. package/widgets/BatchAttributeForm/types.d.ts +19 -3
  218. package/widgets/BatchAttributeForm.js +1 -1
  219. package/widgets/Editor/AddAssociationWorkflow.js +1 -1
  220. package/widgets/Editor/AddAssociationWorkflowData.js +1 -1
  221. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  222. package/widgets/Editor/EditorViewModel.d.ts +1 -1
  223. package/widgets/Editor/EditorViewModel.js +1 -1
  224. package/widgets/Editor/MergeFeaturesWorkflow.d.ts +3 -3
  225. package/widgets/Editor/MergeFeaturesWorkflow.js +1 -1
  226. package/widgets/Editor/SplitFeatureWorkflow.d.ts +3 -3
  227. package/widgets/Editor/SplitFeatureWorkflow.js +1 -1
  228. package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
  229. package/widgets/Editor/UpdateFeaturesWorkflow.js +1 -1
  230. package/widgets/Editor/UpdateRecordWorkflow.js +1 -1
  231. package/widgets/Editor/UpdateRecordWorkflowData.js +1 -1
  232. package/widgets/Editor/UpdateWorkflow.js +1 -1
  233. package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
  234. package/widgets/Editor/support/SketchController.js +1 -1
  235. package/widgets/Editor/workflowUtils.js +1 -1
  236. package/widgets/Editor.js +1 -1
  237. package/widgets/FloorFilter/FloorFilterViewModel.d.ts +10 -0
  238. package/widgets/FloorFilter/FloorFilterViewModel.js +1 -1
  239. package/assets/esri/core/workers/chunks/07cc5743cb6a9fd68adb.js +0 -1
  240. package/assets/esri/core/workers/chunks/0bb159ba0226122465cf.js +0 -1
  241. package/assets/esri/core/workers/chunks/160e5b99f1097a473e6b.js +0 -1
  242. package/assets/esri/core/workers/chunks/17e68828ca6ff6912d3e.js +0 -1
  243. package/assets/esri/core/workers/chunks/1e340536d3c5f94920b5.js +0 -1
  244. package/assets/esri/core/workers/chunks/24810c36ae09bb4e83dc.js +0 -1
  245. package/assets/esri/core/workers/chunks/274b82cb183ddd0042f3.js +0 -1
  246. package/assets/esri/core/workers/chunks/297ae764445e6f73a5ea.js +0 -1
  247. package/assets/esri/core/workers/chunks/29aba121db7f00e0cf81.js +0 -1
  248. package/assets/esri/core/workers/chunks/2a3145a595d19391bb8a.js +0 -1
  249. package/assets/esri/core/workers/chunks/3297658ccd8d4b9ce733.js +0 -1
  250. package/assets/esri/core/workers/chunks/38ca59db0e8f45bd7811.js +0 -1
  251. package/assets/esri/core/workers/chunks/3c5534c576528c1921d2.js +0 -1
  252. package/assets/esri/core/workers/chunks/40b3cdf81c79bbc44527.js +0 -2
  253. package/assets/esri/core/workers/chunks/41f12eb7c9b7086528d5.js +0 -1
  254. package/assets/esri/core/workers/chunks/426156137f279d979ddd.js +0 -1
  255. package/assets/esri/core/workers/chunks/4714241189c13d0db897.js +0 -1
  256. package/assets/esri/core/workers/chunks/537c5dd4cd0a067199d1.js +0 -1
  257. package/assets/esri/core/workers/chunks/538537f9bc866d9caa75.js +0 -1
  258. package/assets/esri/core/workers/chunks/5437a1c05c1bd2175981.js +0 -1
  259. package/assets/esri/core/workers/chunks/58ac245ff7fb57c1004f.js +0 -1
  260. package/assets/esri/core/workers/chunks/5c7aff9604b4576a0e1d.js +0 -1
  261. package/assets/esri/core/workers/chunks/5d3ddbf94539cb4f493e.js +0 -1
  262. package/assets/esri/core/workers/chunks/5eb9fdb076488de9cd83.js +0 -1
  263. package/assets/esri/core/workers/chunks/603177137eb680afe371.js +0 -1
  264. package/assets/esri/core/workers/chunks/629099f05ca5c9ca1973.js +0 -1
  265. package/assets/esri/core/workers/chunks/62f78fa455d556008f6a.js +0 -1
  266. package/assets/esri/core/workers/chunks/686c51fd2144e132783e.js +0 -1
  267. package/assets/esri/core/workers/chunks/6f0341cfa4c68e6e60b3.js +0 -1
  268. package/assets/esri/core/workers/chunks/70229007d594536ba6a3.js +0 -1
  269. package/assets/esri/core/workers/chunks/7e89cb9ff615742e0894.js +0 -1
  270. package/assets/esri/core/workers/chunks/890b7a1153b7f65eba9a.js +0 -1
  271. package/assets/esri/core/workers/chunks/9660ae52fb3951a19e9c.js +0 -1
  272. package/assets/esri/core/workers/chunks/a4245bd4e67a428fd835.js +0 -1
  273. package/assets/esri/core/workers/chunks/ac33b10fe65f9e9e824f.js +0 -1
  274. package/assets/esri/core/workers/chunks/b5937ce657c1fff3864f.js +0 -1
  275. package/assets/esri/core/workers/chunks/c3cf9e6e91f71c9cc5f3.js +0 -1
  276. package/assets/esri/core/workers/chunks/c80fc1b3048e8d58a1f8.js +0 -1
  277. package/assets/esri/core/workers/chunks/cc3e895cff019e811c07.js +0 -1
  278. package/assets/esri/core/workers/chunks/d122431f3b0b88dcb488.js +0 -1
  279. package/assets/esri/core/workers/chunks/d24e027bb8b2c09f25c8.js +0 -1
  280. package/assets/esri/core/workers/chunks/d2df8c328054dc6cb7b7.js +0 -1
  281. package/assets/esri/core/workers/chunks/d41caf20c26f80385265.js +0 -1
  282. package/assets/esri/core/workers/chunks/d468994822f9bc3d6279.js +0 -1
  283. package/assets/esri/core/workers/chunks/d63f532dd7d60ee8ef2c.js +0 -1
  284. package/assets/esri/core/workers/chunks/d64613209a9eb1eafb11.js +0 -1
  285. package/assets/esri/core/workers/chunks/d7be278aed1fb37ad5ec.js +0 -1
  286. package/assets/esri/core/workers/chunks/d8ec0afb2b91ccf32e55.js +0 -1
  287. package/assets/esri/core/workers/chunks/da1e8b338ab9fe9e0a8e.js +0 -1
  288. package/assets/esri/core/workers/chunks/dd920a6f6422fa213eba.js +0 -1
  289. package/assets/esri/core/workers/chunks/e279bcbe4f10e87bde6c.js +0 -1
  290. package/assets/esri/core/workers/chunks/e2de13810dce01b98520.js +0 -1
  291. package/assets/esri/core/workers/chunks/e5837e5ac6ef761f26a2.js +0 -1
  292. package/assets/esri/core/workers/chunks/e82488b9b3bb0c1dedb4.js +0 -1
  293. package/assets/esri/core/workers/chunks/f274a8e8c7ca4294e876.js +0 -1
  294. package/assets/esri/core/workers/chunks/f292c2c22a3822343118.js +0 -1
  295. package/assets/esri/core/workers/chunks/f4f642ddd4d5db7cbbb4.js +0 -1
  296. package/assets/esri/core/workers/chunks/f6d047358d14328f3622.js +0 -1
  297. package/assets/esri/core/workers/chunks/fb6605be0c5e36785543.js +0 -1
  298. package/assets/esri/core/workers/chunks/fd70a25ffdf2cc6c5be2.js +0 -1
  299. package/layers/AnnotationLayer.js +0 -2
  300. package/views/2d/layers/AnnotationLayerView2D.js +0 -2
  301. /package/assets/esri/core/workers/chunks/{9fee0110dc7fee4c95e2.js.LICENSE.txt → 854c320af09b6afc4b80.js.LICENSE.txt} +0 -0
  302. /package/assets/esri/core/workers/chunks/{40b3cdf81c79bbc44527.js.LICENSE.txt → df54e741db40b308c2dd.js.LICENSE.txt} +0 -0
  303. /package/views/layers/{AnnotationLayerView.js → AnnotationFeatureLayerView.js} +0 -0
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- class t{constructor(t,e,n,s,r=!1){this.distances=t,this.atlasIndices=e,this.packedSortedAtlasIndices=n,this.numGaussians=s,this.preciseSort=r}}class e{constructor(t,e,n){this.distances=t,this.atlasIndices=e,this.packedSortedAtlasIndices=n}}let n=null,s=null,r=0,a=0;const i=10,c=20,l=.25,o=1.5,f=16777215,u=3;function h(t,e,n){if(t>f)throw new Error("Gaussian splat order texture index exceeds RGB8UI packing capacity");e[n]=255&t,e[n+1]=t>>>8&255,e[n+2]=t>>>16&255}function d(t,e){let n=Math.max(1,t);for(;n<e;)n=Math.ceil(n*o);return n}function b(t,e){t>r&&(r=d(r,t),n=new Uint32Array(r)),e>a&&(a=d(a,e),s=new Uint32Array(a)),s.fill(0,0,e)}function p(t,e,r){const a=t.length,o=Math.max(i,Math.min(c,Math.round(Math.log2(a/l)))),f=1+(1<<o);b(a,f);let d=t[0],p=t[0];for(let n=0;n<t.length;n++)d=Math.min(d,t[n]),p=Math.max(p,t[n]);const y=p-d;if(y<1e-6)for(let i=0;i<a;++i)n[i]=0,s[0]++;else{const e=(1<<o)/y;for(let r=0;r<a;r++){const a=(t[r]-d)*e>>>0;n[r]=a,s[a]++}}for(let n=1;n<f;n++)s[n]+=s[n-1];for(let i=0;i<a;i++){const t=n[i],a=--s[t];h(e[i],r,a*u)}}async function y(t){const{distances:n,atlasIndices:s,packedSortedAtlasIndices:r,preciseSort:a,numGaussians:i}=t,c=n.subarray(0,i),l=s.subarray(0,i),o=r.subarray(0,i*u);if(0===c.length||0===l.length||0===o.length)return{result:new e(n,s,r),transferList:[n.buffer,s.buffer,r.buffer]};if(a){const t=new Array(i);for(let e=0;e<i;e++)t[e]=e;t.sort((t,e)=>c[t]-c[e]||t-e);for(let e=0;e<i;e++)h(l[t[e]],o,e*u)}else p(c,l,o);return{result:new e(n,s,r),transferList:[n.buffer,s.buffer,r.buffer]}}function M(){g()}function g(){n=null,s=null,r=0,a=0}export{t as SplatSortWorkerInput,e as SplatSortWorkerOutput,g as clear,M as destroy,y as sort};
2
+ class t{constructor(t,s,n,e,r=!1){this.distances=t,this.atlasIndices=s,this.sortedAtlasIndices=n,this.numGaussians=e,this.preciseSort=r}}class s{constructor(t,s,n){this.distances=t,this.atlasIndices=s,this.sortedAtlasIndices=n}}let n=null,e=null,r=0,a=0;const l=10,i=20,o=.25,c=1.5;function f(t,s){let n=Math.max(1,t);for(;n<s;)n=Math.ceil(n*c);return n}function u(t,s){t>r&&(r=f(r,t),n=new Uint32Array(r)),s>a&&(a=f(a,s),e=new Uint32Array(a)),e.fill(0,0,s)}function h(t,s,r){const a=t.length,c=Math.max(l,Math.min(i,Math.round(Math.log2(a/o)))),f=1+(1<<c);u(a,f);let h=t[0],d=t[0];for(let n=0;n<t.length;n++)h=Math.min(h,t[n]),d=Math.max(d,t[n]);const b=d-h;if(b<1e-6)for(let l=0;l<a;++l)n[l]=0,e[0]++;else{const s=(1<<c)/b;for(let r=0;r<a;r++){const a=(t[r]-h)*s>>>0;n[r]=a,e[a]++}}for(let n=1;n<f;n++)e[n]+=e[n-1];for(let l=0;l<a;l++){const t=n[l];r[--e[t]]=s[l]}}async function d(t){const{distances:n,atlasIndices:e,sortedAtlasIndices:r,preciseSort:a,numGaussians:l}=t,i=n.subarray(0,l),o=e.subarray(0,l),c=r.subarray(0,l);if(0===i.length||0===o.length||0===c.length)return{result:new s(n,e,r),transferList:[n.buffer,e.buffer,r.buffer]};if(a){const t=new Array(l);for(let s=0;s<l;s++)t[s]=s;t.sort((t,s)=>i[t]-i[s]||t-s);for(let s=0;s<l;s++)c[s]=o[t[s]]}else h(i,o,c);return{result:new s(n,e,r),transferList:[n.buffer,e.buffer,r.buffer]}}function b(){M()}function M(){n=null,e=null,r=0,a=0}export{t as SplatSortWorkerInput,s as SplatSortWorkerOutput,M as clear,b as destroy,d as sort};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{WorkerHandle as r}from"../../../core/workers/WorkerHandle.js";class e extends r{constructor(r){super("GaussianSplatSortWorker","sort",{sort:r=>[r.distances.buffer,r.atlasIndices.buffer,r.packedSortedAtlasIndices.buffer]},r,{strategy:"dedicated"})}sort(r,e){return this.invokeMethod("sort",r,e)}clear(){return this.broadcast({},"clear")}async destroyWorkerAndSelf(){await this.broadcast({},"destroy"),this.destroy()}}export{e as GaussianSplatSortWorkerHandle};
2
+ import{WorkerHandle as r}from"../../../core/workers/WorkerHandle.js";class s extends r{constructor(r){super("GaussianSplatSortWorker","sort",{sort:r=>[r.distances.buffer,r.atlasIndices.buffer,r.sortedAtlasIndices.buffer]},r,{strategy:"dedicated"})}sort(r,s){return this.invokeMethod("sort",r,s)}clear(){return this.broadcast({},"clear")}async destroyWorkerAndSelf(){await this.broadcast({},"destroy"),this.destroy()}}export{s as GaussianSplatSortWorkerHandle};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{reallocGrowthFactor as e}from"../../../../core/arrayUtils.js";import{abortMaybe as t}from"../../../../core/maybe.js";import{estimateNumberArrayMemory as s}from"../../../../core/memoryEstimations.js";import{isAbortError as i}from"../../../../core/promiseUtils.js";import{signal as r}from"../../../../core/signal.js";import{Milliseconds as a,now as o}from"../../../../core/time.js";import{exactEquals as n,copy as l,normalize as h}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as u}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as d,exactEquals as _,intersects as c,copy as p}from"../../../../geometry/support/aaBoundingBox.js";import{makeScheduleFunction as f}from"../../layers/support/makeScheduleFunction.js";import{GaussianSplatSortWorkerHandle as m}from"../GaussianSplatWorkerHandle.js";import{GaussianSplatFadeTexture as g}from"./GaussianSplatFadeTexture.js";import{GaussianSplatOrderTexture as T}from"./GaussianSplatOrderTexture.js";import{GaussianSplatTextureAtlas as b}from"./GaussianSplatTextureAtlas.js";import{DepthRange as S}from"../../webgl-engine/lib/DepthRange.js";import{TaskPriority as y}from"../../../support/Scheduler.js";class C{constructor(e,t){this._updating=r(!1),this._useDeterministicSort=!1,this._sortBufferMemory=0,this.visibleGaussians=0,this._visibleTileDepthRange=new S,this._previousVisibleTileDepthRangeEye=u(),this._previousVisibleTileDepthRangeViewForward=u(),this._previousVisibleTileDepthRangeClippingBox=d(),this._latestSortedGaussianTilesVersion=0,this._previousVisibleTileDepthRangeTilesVersion=-1,this._previousVisibleTileDepthRangeHasClippingBox=!1,this._bufferCapacity=0,this._requestedLyr3dVisibilityChange=0,this._latestCompletedLyr3dVisibilityChange=0,this._latestUpdatedGaussianTiles=new Array,this._latestSortedGaussianTiles=new Array,this._nextCommittedVisibleGaussianTiles=new Array,this._cameraDirectionNormalized=u(),this._frameTask=null,this._workerHandle=null,this._sortAbortController=null,this._isSorting=!1,this._pendingSortTask=!1,this._scheduledSortStartTimeout=null,this._lastSortStartTime=a(-1/0),this._sortInterval=a(80),this._renderer=e,this._onSortComplete=t,this._orderTexture=new T(this._renderer.renderingContext),this._fadingTexture=new g(this._renderer.renderingContext),this._textureAtlas=new b(this._renderer.renderingContext,this._renderer.view.resourceController.memoryController,this._renderer.fboCache);const{resourceController:s}=this._renderer.view;this._workerHandle=new m(f(s)),this._frameTask=s.scheduler.registerTask(y.GAUSSIAN_SPLAT_SORTING)}get textureAtlas(){return this._textureAtlas}get orderTexture(){return this._orderTexture}get fadingTexture(){return this._fadingTexture}get textureAtlasMemory(){return this._textureAtlas.usedMemory}get orderTextureMemory(){return this._orderTexture.usedMemory}get fadingTextureMemory(){return this._fadingTexture.usedMemory}get sortBufferMemory(){return this._sortBufferMemory}get usedMemory(){return this.textureAtlasMemory+this.orderTextureMemory+this.fadingTextureMemory+this.sortBufferMemory}queryVisibleTileDepthRange(e,t){if(0===this.visibleGaussians)return null;const{eye:s,viewForward:i}=e,r=s[0],a=s[1],o=s[2],h=i[0],u=i[1],d=i[2],f=this._visibleTileDepthRange;if(this._previousVisibleTileDepthRangeTilesVersion===this._latestSortedGaussianTilesVersion&&n(this._previousVisibleTileDepthRangeEye,s)&&n(this._previousVisibleTileDepthRangeViewForward,i)&&(null==t?!this._previousVisibleTileDepthRangeHasClippingBox:this._previousVisibleTileDepthRangeHasClippingBox&&_(this._previousVisibleTileDepthRangeClippingBox,t)))return f.near<=f.far?f:null;let m=1/0,g=-1/0;const T=this._latestSortedGaussianTiles;for(let n=0;n<T.length;n++){const e=T[n];if(null!=t){const s=e.boundingBox;if(!c(s,t))continue}const s=h*(e.obbCenterX-r)+u*(e.obbCenterY-a)+d*(e.obbCenterZ-o),i=e.paddedMbsRadius,l=s-i;l<m&&(m=l);const _=s+i;_>g&&(g=_)}const b=m<=g;return b?f.set(m,g):f.set(1/0,-1/0),this._previousVisibleTileDepthRangeTilesVersion=this._latestSortedGaussianTilesVersion,this._previousVisibleTileDepthRangeHasClippingBox=null!=t,l(this._previousVisibleTileDepthRangeEye,s),l(this._previousVisibleTileDepthRangeViewForward,i),null!=t&&p(this._previousVisibleTileDepthRangeClippingBox,t),b?f:null}updateGaussianVisibility(e,t){this._latestUpdatedGaussianTiles=e,this._requestedLyr3dVisibilityChange=t,this.requestSort()}get updating(){return this._updating.value}destroy(){this._sortAbortController=t(this._sortAbortController),this._pendingSortTask=!1,this._updating.value=!1,null!=this._scheduledSortStartTimeout&&(clearTimeout(this._scheduledSortStartTimeout),this._scheduledSortStartTimeout=null),this._frameTask.remove(),this._workerHandle?.destroyWorkerAndSelf(),this._textureAtlas.destroy(),this._orderTexture.destroy(),this._fadingTexture.destroy()}requestSort(){return this._updating.value=!0,!this._pendingSortTask&&(this._pendingSortTask=!0,this._scheduleSortStart(),!0)}_scheduleSortStart(){if(this._isSorting)return;const e=o()-this._lastSortStartTime,t=this._sortInterval-e;t<=0?this._startSortIfRequired():null==this._scheduledSortStartTimeout&&(this._scheduledSortStartTimeout=setTimeout(()=>{this._scheduledSortStartTimeout=null,this._pendingSortTask&&!this._isSorting&&this._scheduleSortStart()},t))}_startSortIfRequired(){if(this._isSorting||!this._pendingSortTask)return;const e=new AbortController;this._sortAbortController=e,this._isSorting=!0,this._pendingSortTask=!1,this._lastSortStartTime=o(),this._sortOnWorker(e.signal).finally(()=>{this._sortAbortController===e&&(this._sortAbortController=null),this._handleSortComplete()})}_handleSortComplete(){this._isSorting=!1,this._pendingSortTask?this._scheduleSortStart():this._updating.value=!1}_clearBuffersAndTextures(){this._atlasIndicesBuffer=void 0,this._packedSortedAtlasIndicesBuffer=void 0,this._distancesBuffer=void 0,this._bufferCapacity=0,this._sortBufferMemory=0,this._orderTexture.clear(),this._textureAtlas.clear()}_computeExpandedCapacity(t,s){let i=Math.max(1,t);for(;i<s;)i=Math.ceil(i*e);return i}_ensureSortBufferCapacities(e){if(this._bufferCapacity<e){const t=this._computeExpandedCapacity(this._bufferCapacity,e);this._atlasIndicesBuffer=new Uint32Array(t),this._packedSortedAtlasIndicesBuffer=new Uint8Array(t*T.bytesPerPackedGaussianIndex),this._distancesBuffer=new Float64Array(t),this._bufferCapacity=t,this._sortBufferMemory=s(this._atlasIndicesBuffer,this._packedSortedAtlasIndicesBuffer,this._distancesBuffer)}}_clearAllBuffersAndTextures(){this._clearBuffersAndTextures(),this._latestSortedGaussianTiles.length=0,this._nextCommittedVisibleGaussianTiles.length=0,this._previousVisibleTileDepthRangeTilesVersion=-1,this._workerHandle?.clear()}async _sortOnWorker(e){try{if(0===this._latestUpdatedGaussianTiles.length)return this.visibleGaussians=0,this._clearAllBuffersAndTextures(),this._latestCompletedLyr3dVisibilityChange=this._requestedLyr3dVisibilityChange,this._onSortComplete(this._latestSortedGaussianTiles,this._latestCompletedLyr3dVisibilityChange),void this._renderer.requestRender(1);this._useDeterministicSort&&this._latestUpdatedGaussianTiles.sort((e,t)=>e.obb.centerX-t.obb.centerX||e.obb.centerY-t.obb.centerY||e.obb.centerZ-t.obb.centerZ);const t=this._latestUpdatedGaussianTiles,s=t.length,i=this._requestedLyr3dVisibilityChange;let r=0;for(let e=0;e<s;e++)r+=t[e].gaussianCount;this._ensureSortBufferCapacities(r),this._textureAtlas.ensureTextureAtlas();const a=this._renderer.camera;h(this._cameraDirectionNormalized,a.ray.direction);const o=this._cameraDirectionNormalized[0],n=this._cameraDirectionNormalized[1],l=this._cameraDirectionNormalized[2];let u=0;const d=this._atlasIndicesBuffer,_=this._distancesBuffer,p=this._renderer.clippingBox,f=this._nextCommittedVisibleGaussianTiles;f.length=0;let m=0;const{frustum:g}=a,T=this._renderer.tileCullingRevision,b=g[0],S=g[1],y=g[2],C=g[3],x=g[4],V=g[5];for(let e=0;e<s;e++){const s=t[e],{gaussianAtlasIndices:i,relativePositions:r,obbCenterX:a,obbCenterY:h,obbCenterZ:g,paddedMbsRadius:v}=s,A=s.gaussianCount;if(s.cullingRevision!==T){let e=null==p||c(s.boundingBox,p);if(e){const t=1.5*v;e=b[0]*a+b[1]*h+b[2]*g+b[3]<t&&S[0]*a+S[1]*h+S[2]*g+S[3]<t&&y[0]*a+y[1]*h+y[2]*g+y[3]<t&&C[0]*a+C[1]*h+C[2]*g+C[3]<t&&x[0]*a+x[1]*h+x[2]*g+x[3]<t&&V[0]*a+V[1]*h+V[2]*g+V[3]<t}s.cullingRevision=T,s.cullingVisible=e}if(!s.cullingVisible)continue;d.set(i,u),f[m++]=s;const B=o*a+n*h+l*g,G=u+A;for(let e=u,t=0;e<G;e++,t+=3){const s=r[t],i=r[t+1],a=r[t+2];_[e]=s*o+i*n+a*l+B}u=G}if(f.length=m,0===u)return this.visibleGaussians=0,this._clearAllBuffersAndTextures(),this._latestCompletedLyr3dVisibilityChange=i,this._onSortComplete(this._latestSortedGaussianTiles,this._latestCompletedLyr3dVisibilityChange),void this._renderer.requestRender(1);const v={distances:this._distancesBuffer,atlasIndices:this._atlasIndicesBuffer,packedSortedAtlasIndices:this._packedSortedAtlasIndicesBuffer,numGaussians:u,preciseSort:this._useDeterministicSort},A=await(this._workerHandle?.sort(v,e));if(A&&(this._distancesBuffer=A.distances,this._atlasIndicesBuffer=A.atlasIndices,this._packedSortedAtlasIndicesBuffer=A.packedSortedAtlasIndices),e.aborted)return;const B=async e=>{this._orderTexture.setData(this._packedSortedAtlasIndicesBuffer,u);const t=this._latestSortedGaussianTiles;this._latestSortedGaussianTiles=f,this._nextCommittedVisibleGaussianTiles=t,this._latestSortedGaussianTilesVersion++,this._latestCompletedLyr3dVisibilityChange=i,this.visibleGaussians=u,this._onSortComplete(this._latestSortedGaussianTiles,this._latestCompletedLyr3dVisibilityChange),this._renderer.requestRender(1),e.madeProgress()};await this._frameTask.schedule(B,e)}catch(t){if(i(t))return}}set useDeterministicSort(e){this._useDeterministicSort=e}}export{C as GaussianSplatDataStore};
2
+ import{reallocGrowthFactor as e}from"../../../../core/arrayUtils.js";import{abortMaybe as t}from"../../../../core/maybe.js";import{estimateNumberArrayMemory as s}from"../../../../core/memoryEstimations.js";import{isAbortError as i}from"../../../../core/promiseUtils.js";import{signal as r}from"../../../../core/signal.js";import{Milliseconds as o,now as a}from"../../../../core/time.js";import{exactEquals as n,copy as l,normalize as h}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as u}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as d,exactEquals as _,intersects as c,copy as p}from"../../../../geometry/support/aaBoundingBox.js";import{makeScheduleFunction as f}from"../../layers/support/makeScheduleFunction.js";import{GaussianSplatSortWorkerHandle as m}from"../GaussianSplatWorkerHandle.js";import{GaussianSplatFadeTexture as g}from"./GaussianSplatFadeTexture.js";import{GaussianSplatOrderTexture as T}from"./GaussianSplatOrderTexture.js";import{GaussianSplatTextureAtlas as b}from"./GaussianSplatTextureAtlas.js";import{DepthRange as S}from"../../webgl-engine/lib/DepthRange.js";import{TaskPriority as y}from"../../../support/Scheduler.js";class C{constructor(e,t){this._updating=r(!1),this._useDeterministicSort=!1,this._sortBufferMemory=0,this.visibleGaussians=0,this._visibleTileDepthRange=new S,this._previousVisibleTileDepthRangeEye=u(),this._previousVisibleTileDepthRangeViewForward=u(),this._previousVisibleTileDepthRangeClippingBox=d(),this._latestSortedGaussianTilesVersion=0,this._previousVisibleTileDepthRangeTilesVersion=-1,this._previousVisibleTileDepthRangeHasClippingBox=!1,this._bufferCapacity=0,this._requestedLyr3dVisibilityChange=0,this._latestCompletedLyr3dVisibilityChange=0,this._latestUpdatedGaussianTiles=new Array,this._latestSortedGaussianTiles=new Array,this._nextCommittedVisibleGaussianTiles=new Array,this._cameraDirectionNormalized=u(),this._frameTask=null,this._workerHandle=null,this._sortAbortController=null,this._isSorting=!1,this._pendingSortTask=!1,this._scheduledSortStartTimeout=null,this._lastSortStartTime=o(-1/0),this._sortInterval=o(80),this._renderer=e,this._onSortComplete=t,this._orderTexture=new T(this._renderer.renderingContext),this._fadingTexture=new g(this._renderer.renderingContext),this._textureAtlas=new b(this._renderer.renderingContext,this._renderer.view.resourceController.memoryController,this._renderer.fboCache);const{resourceController:s}=this._renderer.view;this._workerHandle=new m(f(s)),this._frameTask=s.scheduler.registerTask(y.GAUSSIAN_SPLAT_SORTING)}get textureAtlas(){return this._textureAtlas}get orderTexture(){return this._orderTexture}get fadingTexture(){return this._fadingTexture}get textureAtlasMemory(){return this._textureAtlas.usedMemory}get orderTextureMemory(){return this._orderTexture.usedMemory}get fadingTextureMemory(){return this._fadingTexture.usedMemory}get sortBufferMemory(){return this._sortBufferMemory}get usedMemory(){return this.textureAtlasMemory+this.orderTextureMemory+this.fadingTextureMemory+this.sortBufferMemory}queryVisibleTileDepthRange(e,t){if(0===this.visibleGaussians)return null;const{eye:s,viewForward:i}=e,r=s[0],o=s[1],a=s[2],h=i[0],u=i[1],d=i[2],f=this._visibleTileDepthRange;if(this._previousVisibleTileDepthRangeTilesVersion===this._latestSortedGaussianTilesVersion&&n(this._previousVisibleTileDepthRangeEye,s)&&n(this._previousVisibleTileDepthRangeViewForward,i)&&(null==t?!this._previousVisibleTileDepthRangeHasClippingBox:this._previousVisibleTileDepthRangeHasClippingBox&&_(this._previousVisibleTileDepthRangeClippingBox,t)))return f.near<=f.far?f:null;let m=1/0,g=-1/0;const T=this._latestSortedGaussianTiles;for(let n=0;n<T.length;n++){const e=T[n];if(null!=t){const s=e.boundingBox;if(!c(s,t))continue}const s=h*(e.obbCenterX-r)+u*(e.obbCenterY-o)+d*(e.obbCenterZ-a),i=e.paddedMbsRadius,l=s-i;l<m&&(m=l);const _=s+i;_>g&&(g=_)}const b=m<=g;return b?f.set(m,g):f.set(1/0,-1/0),this._previousVisibleTileDepthRangeTilesVersion=this._latestSortedGaussianTilesVersion,this._previousVisibleTileDepthRangeHasClippingBox=null!=t,l(this._previousVisibleTileDepthRangeEye,s),l(this._previousVisibleTileDepthRangeViewForward,i),null!=t&&p(this._previousVisibleTileDepthRangeClippingBox,t),b?f:null}updateGaussianVisibility(e,t){this._latestUpdatedGaussianTiles=e,this._requestedLyr3dVisibilityChange=t,this.requestSort()}get updating(){return this._updating.value}destroy(){this._sortAbortController=t(this._sortAbortController),this._pendingSortTask=!1,this._updating.value=!1,null!=this._scheduledSortStartTimeout&&(clearTimeout(this._scheduledSortStartTimeout),this._scheduledSortStartTimeout=null),this._frameTask.remove(),this._workerHandle?.destroyWorkerAndSelf(),this._textureAtlas.destroy(),this._orderTexture.destroy(),this._fadingTexture.destroy()}requestSort(){return this._updating.value=!0,!this._pendingSortTask&&(this._pendingSortTask=!0,this._scheduleSortStart(),!0)}_scheduleSortStart(){if(this._isSorting)return;const e=a()-this._lastSortStartTime,t=this._sortInterval-e;t<=0?this._startSortIfRequired():null==this._scheduledSortStartTimeout&&(this._scheduledSortStartTimeout=setTimeout(()=>{this._scheduledSortStartTimeout=null,this._pendingSortTask&&!this._isSorting&&this._scheduleSortStart()},t))}_startSortIfRequired(){if(this._isSorting||!this._pendingSortTask)return;const e=new AbortController;this._sortAbortController=e,this._isSorting=!0,this._pendingSortTask=!1,this._lastSortStartTime=a(),this._sortOnWorker(e.signal).finally(()=>{this._sortAbortController===e&&(this._sortAbortController=null),this._handleSortComplete()})}_handleSortComplete(){this._isSorting=!1,this._pendingSortTask?this._scheduleSortStart():this._updating.value=!1}_clearBuffersAndTextures(){this._atlasIndicesBuffer=void 0,this._sortedAtlasIndicesBuffer=void 0,this._distancesBuffer=void 0,this._bufferCapacity=0,this._sortBufferMemory=0,this._orderTexture.clear(),this._textureAtlas.clear()}_computeExpandedCapacity(t,s){let i=Math.max(1,t);for(;i<s;)i=Math.ceil(i*e);return i}_ensureSortBufferCapacities(e){if(this._bufferCapacity<e){const t=this._computeExpandedCapacity(this._bufferCapacity,e);this._atlasIndicesBuffer=new Uint32Array(t),this._sortedAtlasIndicesBuffer=new Uint32Array(t),this._distancesBuffer=new Float64Array(t),this._bufferCapacity=t,this._sortBufferMemory=s(this._atlasIndicesBuffer,this._sortedAtlasIndicesBuffer,this._distancesBuffer)}}_clearAllBuffersAndTextures(){this._clearBuffersAndTextures(),this._latestSortedGaussianTiles.length=0,this._nextCommittedVisibleGaussianTiles.length=0,this._previousVisibleTileDepthRangeTilesVersion=-1,this._workerHandle?.clear()}async _sortOnWorker(e){try{if(0===this._latestUpdatedGaussianTiles.length)return this.visibleGaussians=0,this._clearAllBuffersAndTextures(),this._latestCompletedLyr3dVisibilityChange=this._requestedLyr3dVisibilityChange,this._onSortComplete(this._latestSortedGaussianTiles,this._latestCompletedLyr3dVisibilityChange),void this._renderer.requestRender(1);this._useDeterministicSort&&this._latestUpdatedGaussianTiles.sort((e,t)=>e.obb.centerX-t.obb.centerX||e.obb.centerY-t.obb.centerY||e.obb.centerZ-t.obb.centerZ);const t=this._latestUpdatedGaussianTiles,s=t.length,i=this._requestedLyr3dVisibilityChange;let r=0;for(let e=0;e<s;e++)r+=t[e].gaussianCount;this._ensureSortBufferCapacities(r),this._textureAtlas.ensureTextureAtlas();const o=this._renderer.camera;h(this._cameraDirectionNormalized,o.ray.direction);const a=this._cameraDirectionNormalized[0],n=this._cameraDirectionNormalized[1],l=this._cameraDirectionNormalized[2];let u=0;const d=this._atlasIndicesBuffer,_=this._distancesBuffer,p=this._renderer.clippingBox,f=this._nextCommittedVisibleGaussianTiles;f.length=0;let m=0;const{frustum:g}=o,T=this._renderer.tileCullingRevision,b=g[0],S=g[1],y=g[2],C=g[3],x=g[4],V=g[5];for(let e=0;e<s;e++){const s=t[e],{gaussianAtlasIndices:i,relativePositions:r,obbCenterX:o,obbCenterY:h,obbCenterZ:g,paddedMbsRadius:v}=s,A=s.gaussianCount;if(s.cullingRevision!==T){let e=null==p||c(s.boundingBox,p);if(e){const t=1.5*v;e=b[0]*o+b[1]*h+b[2]*g+b[3]<t&&S[0]*o+S[1]*h+S[2]*g+S[3]<t&&y[0]*o+y[1]*h+y[2]*g+y[3]<t&&C[0]*o+C[1]*h+C[2]*g+C[3]<t&&x[0]*o+x[1]*h+x[2]*g+x[3]<t&&V[0]*o+V[1]*h+V[2]*g+V[3]<t}s.cullingRevision=T,s.cullingVisible=e}if(!s.cullingVisible)continue;d.set(i,u),f[m++]=s;const B=a*o+n*h+l*g,G=u+A;for(let e=u,t=0;e<G;e++,t+=3){const s=r[t],i=r[t+1],o=r[t+2];_[e]=s*a+i*n+o*l+B}u=G}if(f.length=m,0===u)return this.visibleGaussians=0,this._clearAllBuffersAndTextures(),this._latestCompletedLyr3dVisibilityChange=i,this._onSortComplete(this._latestSortedGaussianTiles,this._latestCompletedLyr3dVisibilityChange),void this._renderer.requestRender(1);const v={distances:this._distancesBuffer,atlasIndices:this._atlasIndicesBuffer,sortedAtlasIndices:this._sortedAtlasIndicesBuffer,numGaussians:u,preciseSort:this._useDeterministicSort},A=await(this._workerHandle?.sort(v,e));if(e.aborted)return;A&&(this._distancesBuffer=A.distances,this._atlasIndicesBuffer=A.atlasIndices,this._sortedAtlasIndicesBuffer=A.sortedAtlasIndices);const B=async e=>{this._orderTexture.setData(this._sortedAtlasIndicesBuffer,u);const t=this._latestSortedGaussianTiles;this._latestSortedGaussianTiles=f,this._nextCommittedVisibleGaussianTiles=t,this._latestSortedGaussianTilesVersion++,this._latestCompletedLyr3dVisibilityChange=i,this.visibleGaussians=u,this._onSortComplete(this._latestSortedGaussianTiles,this._latestCompletedLyr3dVisibilityChange),this._renderer.requestRender(1),e.madeProgress()};await this._frameTask.schedule(B,e)}catch(t){if(i(t))return}}set useDeterministicSort(e){this._useDeterministicSort=e}}export{C as GaussianSplatDataStore};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{reallocGrowthFactor as e}from"../../../../core/arrayUtils.js";import{estimateNumberArrayMemory as t}from"../../../../core/memoryEstimations.js";import{fromValues as r}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import"../../../webgl/BufferObject.js";import"../../../webgl/FramebufferObject.js";import"../../../webgl/Program.js";import"../../../../core/has.js";import"../../../webgl/Renderbuffer.js";import i from"../../../webgl/Texture.js";import"../../../../core/Logger.js";import{PixelType as s,SizedPixelFormat as a}from"../../../webgl/enums.js";import"../../../webgl/Util.js";import{minExpectedGaussianCount as o}from"./GaussianSplatAtlasPages.js";import{TextureDescriptor as u}from"../../../webgl/TextureDescriptor.js";class d{static{this.bytesPerPackedGaussianIndex=3}constructor(e){this.texture=null,this._orderTextureCapacity=0,this._rctx=e}get usedMemory(){return(this.texture?.usedMemory??0)+t(this._packedUploadBuffer)}ensureCapacity(t){if(t<=0)return{textureWidth:0,rowCount:0,paddedSize:0};const r=this.texture;if(this._orderTextureCapacity>=t&&r?.hasWebGLTextureObject){const e=r.descriptor.width,i=Math.ceil(t/e);return{textureWidth:e,rowCount:i,paddedSize:e*i}}const d=Math.max(Math.ceil(t*e),o),[c,p]=this._evalTextureSize(d),n=c*p;this._orderTextureCapacity=n,this.texture?.dispose();const h=new u;h.width=c,h.height=p,h.pixelFormat=36248,h.dataType=s.UNSIGNED_BYTE,h.internalFormat=a.RGB8UI,h.wrapMode=33071,h.samplingMode=9728,h.unpackAlignment=1,h.isImmutable=!0,this.texture=new i(this._rctx,h);const l=Math.ceil(t/c);return{textureWidth:c,rowCount:l,paddedSize:c*l}}setData(e,t){const{textureWidth:r,rowCount:i,paddedSize:s}=this.ensureCapacity(t),a=s*d.bytesPerPackedGaussianIndex;if(e.length>=a)return void this.texture.updateData(0,0,0,r,i,e);(!this._packedUploadBuffer||this._packedUploadBuffer.length<a)&&(this._packedUploadBuffer=new Uint8Array(a));const o=this._packedUploadBuffer;o.set(e.subarray(0,t*d.bytesPerPackedGaussianIndex)),this.texture.updateData(0,0,0,r,i,o)}clear(){this._orderTextureCapacity=0,this._packedUploadBuffer=void 0,this.texture?.dispose(),this.texture=null}destroy(){this.clear()}_evalTextureSize(e){const t=Math.ceil(Math.sqrt(e)),i=Math.ceil(e/t);return r(t,i)}}export{d as GaussianSplatOrderTexture};
2
+ import{reallocGrowthFactor as t}from"../../../../core/arrayUtils.js";import{estimateNumberArrayMemory as e}from"../../../../core/memoryEstimations.js";import{fromValues as r}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import"../../../webgl/BufferObject.js";import"../../../webgl/FramebufferObject.js";import"../../../webgl/Program.js";import"../../../../core/has.js";import"../../../webgl/Renderbuffer.js";import i from"../../../webgl/Texture.js";import"../../../../core/Logger.js";import{PixelType as s,SizedPixelFormat as a}from"../../../webgl/enums.js";import"../../../webgl/Util.js";import{minExpectedGaussianCount as o}from"./GaussianSplatAtlasPages.js";import{TextureDescriptor as u}from"../../../webgl/TextureDescriptor.js";class d{constructor(t){this.texture=null,this._orderTextureCapacity=0,this._rctx=t}get usedMemory(){return(this.texture?.usedMemory??0)+e(this._uploadAtlasIndices)}ensureCapacity(e){if(e<=0)return{textureWidth:0,rowCount:0,paddedSize:0};const r=this.texture;if(this._orderTextureCapacity>=e&&r?.hasWebGLTextureObject){const t=r.descriptor.width,i=Math.ceil(e/t);return{textureWidth:t,rowCount:i,paddedSize:t*i}}const d=Math.max(Math.ceil(e*t),o),[l,c]=this._evalTextureSize(d),h=l*c;this._orderTextureCapacity=h,this.texture?.dispose();const n=new u;n.width=l,n.height=c,n.pixelFormat=36244,n.dataType=s.UNSIGNED_INT,n.internalFormat=a.R32UI,n.wrapMode=33071,n.samplingMode=9728,n.isImmutable=!0,this.texture=new i(this._rctx,n);const p=Math.ceil(e/l);return{textureWidth:l,rowCount:p,paddedSize:l*p}}setData(t,e){const{textureWidth:r,rowCount:i,paddedSize:s}=this.ensureCapacity(e);if(t.length>=s)return void this.texture.updateData(0,0,0,r,i,t);(!this._uploadAtlasIndices||this._uploadAtlasIndices.length<s)&&(this._uploadAtlasIndices=new Uint32Array(s));const a=this._uploadAtlasIndices;a.set(t.subarray(0,e)),this.texture.updateData(0,0,0,r,i,a)}clear(){this._orderTextureCapacity=0,this._uploadAtlasIndices=void 0,this.texture?.dispose(),this.texture=null}destroy(){this.clear()}_evalTextureSize(t){const e=Math.ceil(Math.sqrt(t)),i=Math.ceil(t/e);return r(e,i)}}export{d as GaussianSplatOrderTexture};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{reallocGrowthFactor as t}from"../../../../core/arrayUtils.js";import{initialSplatAtlasTextureHeight as e,GaussianSplatAtlasPages as s,splatAtlasTextureWidth as r,elementsPerSplatPage as a}from"./GaussianSplatAtlasPages.js";import{GaussianSplatOrderTexture as i}from"./GaussianSplatOrderTexture.js";import{PixelType as l,SizedPixelFormat as u}from"../../../webgl/enums.js";import{DisposableFramebufferObject as o}from"../../../webgl/FramebufferObject.js";import h from"../../../webgl/Texture.js";import{TextureDescriptor as p}from"../../../webgl/TextureDescriptor.js";class c{constructor(t,r,a){this._splatAtlasTextureHeight=e,this.texture=null,this._rctx=t,this._fboCache=a,this.pageAllocator=new s,this._cache=r.newCache("gaussian texture cache",t=>t.dispose())}get usedMemory(){return this.texture?.usedMemory??0}ensureTextureAtlas(){if(this.texture?.hasWebGLTextureObject)return;this.texture=null;const t=this._cache.pop("splatTextureAtlas");if(t)return void(this.texture=t);const e=new p;e.height=this._splatAtlasTextureHeight,e.width=r,e.pixelFormat=36249,e.dataType=l.UNSIGNED_INT,e.internalFormat=u.RGBA32UI,e.samplingMode=9728,e.wrapMode=33071,e.isImmutable=!0,this.texture=new h(this._rctx,e),this._updatePageAllocator()}grow(){if(!this.texture)return this.ensureTextureAtlas(),!1;const e=Math.floor(this._splatAtlasTextureHeight*t),s=Math.min(e,x);if(s<=this._splatAtlasTextureHeight)return!1;if(s*r>this._rctx.parameters.maxPreferredTexturePixels)return!1;const a=new o(this._rctx,this.texture),i=this._fboCache.acquire(r,s,"gaussian splat atlas resize",12);return this._rctx.blitFramebuffer(a,i.fbo,16384,9728,0,0,r,this._splatAtlasTextureHeight,0,0,r,this._splatAtlasTextureHeight),this.texture=i.fbo?.detachColorTexture(),a.dispose(),i.dispose(),this._splatAtlasTextureHeight=s,this._updatePageAllocator(),!0}requestPage(){let t=this.pageAllocator.findFirstFreePage();return null===t&&this.grow()&&(t=this.pageAllocator.findFirstFreePage()),null!==t&&this.pageAllocator.allocate(t),t}freePage(t){this.pageAllocator.free(t)}update(t,e,s){this.ensureTextureAtlas(),this.texture.updateData(0,t,e,a,1,s)}_updatePageAllocator(){const t=r*this._splatAtlasTextureHeight/a;this.pageAllocator.pageCount!==t&&this.pageAllocator.resize(t)}clear(){this.texture&&(this._cache.put("splatTextureAtlas",this.texture),this.texture=null)}destroy(){this._cache.destroy(),this.texture?.dispose(),this.texture=null}}const x=2**(8*i.bytesPerPackedGaussianIndex)/r;export{c as GaussianSplatTextureAtlas};
2
+ import{reallocGrowthFactor as t}from"../../../../core/arrayUtils.js";import{initialSplatAtlasTextureHeight as e,GaussianSplatAtlasPages as s,splatAtlasTextureWidth as r,elementsPerSplatPage as a}from"./GaussianSplatAtlasPages.js";import{PixelType as i,SizedPixelFormat as l}from"../../../webgl/enums.js";import{DisposableFramebufferObject as o}from"../../../webgl/FramebufferObject.js";import u from"../../../webgl/Texture.js";import{TextureDescriptor as h}from"../../../webgl/TextureDescriptor.js";class c{constructor(t,r,a){this._splatAtlasTextureHeight=e,this.texture=null,this._rctx=t,this._fboCache=a,this.pageAllocator=new s,this._cache=r.newCache("gaussian texture cache",t=>t.dispose())}get usedMemory(){return this.texture?.usedMemory??0}ensureTextureAtlas(){if(this.texture?.hasWebGLTextureObject)return;this.texture=null;const t=this._cache.pop("splatTextureAtlas");if(t)return void(this.texture=t);const e=new h;e.height=this._splatAtlasTextureHeight,e.width=r,e.pixelFormat=36249,e.dataType=i.UNSIGNED_INT,e.internalFormat=l.RGBA32UI,e.samplingMode=9728,e.wrapMode=33071,e.isImmutable=!0,this.texture=new u(this._rctx,e),this._updatePageAllocator()}grow(){if(!this.texture)return this.ensureTextureAtlas(),!1;const e=Math.floor(this._splatAtlasTextureHeight*t);if(e*r>this._rctx.parameters.maxPreferredTexturePixels)return!1;const s=new o(this._rctx,this.texture),a=this._fboCache.acquire(r,e,"gaussian splat atlas resize",12);return this._rctx.blitFramebuffer(s,a.fbo,16384,9728,0,0,r,this._splatAtlasTextureHeight,0,0,r,this._splatAtlasTextureHeight),this.texture=a.fbo?.detachColorTexture(),s.dispose(),a.dispose(),this._splatAtlasTextureHeight=e,this._updatePageAllocator(),!0}requestPage(){let t=this.pageAllocator.findFirstFreePage();return null===t&&this.grow()&&(t=this.pageAllocator.findFirstFreePage()),null!==t&&this.pageAllocator.allocate(t),t}freePage(t){this.pageAllocator.free(t)}update(t,e,s){this.ensureTextureAtlas(),this.texture.updateData(0,t,e,a,1,s)}_updatePageAllocator(){const t=r*this._splatAtlasTextureHeight/a;this.pageAllocator.pageCount!==t&&this.pageAllocator.resize(t)}clear(){this.texture&&(this._cache.put("splatTextureAtlas",this.texture),this.texture=null)}destroy(){this._cache.destroy(),this.texture?.dispose(),this.texture=null}}export{c as GaussianSplatTextureAtlas};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{toConst as e}from"../../../core/compilerUtils.js";import{clamp as t}from"../../../core/mathUtils.js";import{abortMaybe as i}from"../../../core/maybe.js";import s from"../../../core/ObjectPool.js";import{subtract as n,squaredLength as r,dot as a,scale as l,add as o,length as h,copy as d}from"../../../core/libs/gl-matrix-2/math/vec3.js";import{create as u,unitZ as c}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as g}from"../../../geometry/ellipsoidUtils.js";import{create as p,equals as f,rectangleContainsRectangleCyclicalAware as _,rectanglesIntersectCyclicalAware as m,width as y,height as v}from"../../../geometry/support/aaBoundingRect.js";import{Sphere as M}from"../../../geometry/support/sphere.js";import{isGroupLayer as A}from"../../../layers/support/layerUtils.js";import{isLayerViewWithFlowRenderer as x}from"../support/flowUtils.js";import{ElevationBounds as D}from"./ElevationBounds.js";import{ElevationTileAgent as b,isElevationTileAgent as L}from"./ElevationTileAgent.js";import{LayerClasses as j}from"./LayerClass.js";import{MapDataCacheItem as I}from"./MapDataCacheItem.js";import{MapTileAgent as T,isMapTileAgent as C}from"./MapTileAgent.js";import{maxPatchTesselation as B}from"./TerrainConst.js";import{isVectorTile as U,isTileTexture as S,isRasterTile as w,isCreateBitmapResult as P}from"./TerrainData.js";import{weakAssert as E,isBlendableLayerView as O,oppositeCorner as R,internalAssert as q,enableTerrainInternalChecks as V,neighborEdgeIndices as N,oppositeEdge as G,neighborCornerIndices as k,almostEquals as z,enableWaterproofTests as F,isNorth as W,isSouth as J,isWest as H,isEast as X,isWestCorner as Y,isNorthCorner as $}from"./terrainUtils.js";import{tileAgentDone as Q}from"./TileAgent.js";import{TilePerLayerInfo as K}from"./TilePerLayerInfo.js";import{fallsWithinLayerView as Z}from"./tileUtils.js";const ee=.1;class te{constructor(){this._lij=[0,0,0],this._children=[null,null,null,null],this._pendingUpdates=0,this._dirty=!0,this._previouslyRendered=!1,this.extent=p(),this._elevationBoundsMin=NaN,this._elevationBoundsMax=0,this.layerInfo=[[],[]],this.extentInRadians=p(),this.centerAtSeaLevel=u(),this._center=[u(),new M,u()],this.up=c(),this._withinClippingArea=!0,this._intersectsClippingArea=!0,this._maxTesselation=0,this._usedMemory=0,this._rasterTileMemory=0,this._vectorTileMemory=0,this._mapDataRefCount=0,this.screenDepth=0,this.renderOrder=0,this._edgeLen=0,this._edgeLen2=0,this._curvatureHeight=0,this.onCompressionFinished=()=>{this.setPendingUpdate(16),this.setMemoryDirty()},this.extentMidX=0,this.extentMidY=0,this.distanceToPOI=-1,this._lastPOI=u(),this.maxLevelDeltaNeighborCount=0,this.unmergableChildCount=0}get lij(){return this._lij}get spatialReference(){return this._surface.spatialReference??this._surface.tilingScheme.spatialReference}get isDisposed(){return null==this._surface}get elevationLevelDelta(){return this._surface.getElevationLevelDelta(this.level)}static prune(){ne.prune(0),re.prune(0),K.prune()}get _cached(){return!this.leaf&&this._mapDataRefCount<=0}get withinClippingArea(){return this._withinClippingArea}get intersectsClippingArea(){return this._intersectsClippingArea}get clippingArea(){return this._clippingArea}get parent(){return this._parent}get children(){return this._children}get surface(){return this._surface}get elevationBoundsMin(){return this._elevationBoundsMin}get elevationBoundsMax(){return this._elevationBoundsMax}get level(){return this._lij[0]}get key(){return`${this._lij[0]}/${this._lij[1]}/${this._lij[2]}`}get edgeLen(){return this._edgeLen}get radius(){return this._center[1].radius}get visible(){return this._dirty&&this.computeVisibility(),this._visible}get frustumVisibility(){return this._dirty&&this.computeVisibility(),this._frustumVisibility}computeVisibility(){this._dirty=!1;const e=this.parent,t=e?.frustumVisibility??1;this._frustumVisibility=0===t?0:2===t?2:this._calculateFrustumVisibility(this.surface.frustum);const i=2!==this._frustumVisibility&&this._intersectsClippingArea;i!==this._visible&&(this._visible=i,this._surface.emit("tiles-visibility-changed"),this._surface.renderer.setDirty(),this.updateAgentSuspension())}get _loadable(){return this.visible||this._surface.view.state.fixedContentCamera}get rendered(){const e=!!this.renderData;return e!==this._previouslyRendered&&(this._surface.emit("tiles-visibility-changed"),this._previouslyRendered=e,this._surface.renderer.setDirty()),e}init(e,t,i,s,n){this._lij[0]=e,this._lij[1]=t,this._lij[2]=i,this.ellipsoid=g(n.tilingScheme.spatialReference),n.tilingScheme.getExtent(e,t,i,this.extent),n.tilingScheme.convertExtentToRadians(this.extent,this.extentInRadians),this.extentMidX=.5*(this.extent[0]+this.extent[2]),this.extentMidY=.5*(this.extent[1]+this.extent[3]),this._withinClippingArea=!0,this._intersectsClippingArea=!0,this._clippingArea=null,this._mapDataRefCount=0,n.upsampleMapCache.pop(this.key),this._edgeLen=0,this._edgeLen2=0,this._center[1].radius=0,this.elevationLevel=e,s&&!Number.isNaN(s.elevationBoundsMin)?(this._elevationBoundsMin=s.elevationBoundsMin,this._elevationBoundsMax=s.elevationBoundsMax):(this._elevationBoundsMin=0,this._elevationBoundsMax=0),this._pendingUpdates=0,this.renderData=null,this.screenDepth=0,this._visible=!1,this._previouslyRendered=!1,this._parent=s,this.clearChildren(),this._surface=n,this.updateVisibility(),this.maxLevelDeltaNeighborCount=0,this.unmergableChildCount=0;for(const r of j){const e=n.numLayers(r),t=this.layerInfo[r];for(const i of t)i.release();t.length=e;for(let i=0;i<e;i++)t[i]=K.acquire(this._surface.upsampleInfoPool),0===r&&this.findElevationBoundsForLayer(i,-1)}this.computeElevationBounds(),this._maxTesselation=Math.min(n.tilingScheme.pixelSize,B)}dispose(){E(!this.renderData,"tile.renderData was not unloaded"),this._surface?.upsampleMapCache.pop(this.key),this.layerInfo.forEach(e=>{e.forEach(e=>e.release()),e.length=0}),this._surface=this._parent=null,this.clearChildren(),this.setMemoryDirty()}refMapData(){++this._mapDataRefCount,this._cached||this._surface.upsampleMapCache.pop(this.key)}unrefMapData(){--this._mapDataRefCount,this._cached&&this.cachedMemory>0&&this._surface.upsampleMapCache.put(this.key,new I(e(this)))}setMemoryDirty(){this._usedMemory=0}get usedMemory(){return this._ensureUsedMemory()+(this._cached?0:this.mapDataMemory)}get cachedMemory(){return this._ensureUsedMemory(),null==this._surface?this.usedMemory:this._cached?this.mapDataMemory:0}get mapDataMemory(){return this._rasterTileMemory+this._vectorTileMemory}get _cpuImageMemorySize(){const e=4,t=this._surface.tilingScheme.pixelSize;return t*t*e}_ensureUsedMemory(){if(this._usedMemory>0)return this._vectorTileMemory=this.layerInfo[1].reduce((e,{data:t})=>e+(U(t)?t.usedMemoryPerReference:0),0),this._usedMemory;this._usedMemory=this._baseUsedMemory,this._rasterTileMemory=0,this._vectorTileMemory=0;for(const{data:e}of this.layerInfo[1])U(e)?this._vectorTileMemory+=e.usedMemoryPerReference:this._rasterTileMemory+=this.getTerrainDataMemory(e);for(const e of this.layerInfo[0])this._usedMemory+=e.data?this._cpuImageMemorySize:0;return this.renderData&&(this._usedMemory+=this.renderData.estimatedGeometryMemoryUsage,this._rasterTileMemory+=this.renderData.texture?.usedMemory??0),this._cached&&this._surface.upsampleMapCache.updateSize(this.key),this._usedMemory}getUsedMemoryForLayer(e,t){const i=this.layerInfo[e][t];return i?.data?1===e?this._cached?0:this.getTerrainDataMemory(i.data):0===e?this._cpuImageMemorySize:0:0}getTerrainDataMemory(e){return S(e)?e.texture.usedMemory:w(e)?e.memoryUsage:U(e)?e.usedMemoryPerReference:P(e)?this._cpuImageMemorySize:0}updateScreenDepth(e){const[t,i,s]=this._center[1].center,n=e,r=n[2]*t+n[6]*i+n[10]*s+n[14];this.screenDepth=r<0?0:r/(n[3]*t+n[7]*i+n[11]*s+n[15])}shouldSplit(e,t,i){if(!this.visible)return 0;if(e.frustum&&(!this._intersectsClippingArea||2===this._calculateFrustumVisibility(e.frustum)))return 0;const s=this.level;n(ce,this._center[1].center,t);let d=r(ce),u=ce,c=this._center[1].center;n(ge,this._center[0],t);const g=r(ge);g<d&&(d=g,u=ge,c=this._center[0]),n(pe,this._center[2],t);const p=r(pe);if(p<d&&(d=p,u=pe,c=this._center[2]),this._edgeLen2>d&&s<e.maxLod)return 1;const f=Math.sqrt(d),_=e.fovX*f*2,m=this._edgeLen/_,y=()=>{if(s<e.maxLod)return this.elevationLevel=s,0;const t=s+Math.ceil(-Math.log2(e.relativeWidthLimit/m));return t!==this.elevationLevel?(this.elevationLevel=t,2):0},v=null!=i?i-s:1/0;if(v<=.5)return y();const M=a(this.up,ce),A=this._elevationBoundsMax-this._elevationBoundsMin,x=A/this.edgeLen;if(e.aboveGround&&M>0&&x<.001){if(M/f-Math.sin(this._curvatureHeight/(this.edgeLen*Math.SQRT1_2)*Math.PI)-x>0)return 0}const D=null!=i?3-Math.min(v,2):1;if(m*D<e.relativeWidthLimit||s>=e.maxLod)return y();if(s<7)return 1;l(fe,this.up,M),n(fe,fe,u);const b=r(fe);if(b<=this.radius*this.radius)return 1;l(fe,fe,this.radius/Math.sqrt(b)),o(fe,fe,c),n(fe,t,fe);const L=Math.min(1,(Math.abs(a(fe,this.up))+.5*A+this._curvatureHeight)/h(fe)),j=ee/e.angledSplitBias,I=e.fovY*f*2;return L*(this._edgeLen/I*D)<j*e.relativeHeightLimit?0:1}createChildren(){const e=this._children,t=this.lij[0]+1,i=2*this.lij[1],s=2*this.lij[2];return e[0]=this.surface.createTile(t,i,s,this),e[1]=this.surface.createTile(t,i,s+1,this),e[2]=this.surface.createTile(t,i+1,s,this),e[3]=this.surface.createTile(t,i+1,s+1,this),e}clearChildren(){this._children[0]=this._children[1]=this._children[2]=this._children[3]=null}get loaded(){return this.renderData?.hasGeometry??!1}load(){this.refMapData();for(const e of j)this._createOrUpdateAgents(0,e);this.surface.renderer.loadTile(this)}unload(){this.renderData&&this.unrefMapData(),this.surface.renderer.unloadTile(this);for(const e of j){const t=this.layerInfo[e];for(const e of t)e.loadingAgent&&e.loadingAgent!==Q&&(se(e.loadingAgent),e.loadingAgent=null),e.pendingUpdates=0}this.resetPendingUpdate(8),this.resetPendingUpdate(16),this.resetPendingUpdate(32)}unloadMapData(){const e=this.layerInfo[1];for(const t of e)t.loadingAgent&&t.loadingAgent!==Q&&(se(t.loadingAgent),t.loadingAgent=null),t.pendingUpdates=0,t.invalidateSourceData();this.renderData?.releaseTexture(),this.setMemoryDirty()}updateClippingStatus(e){if(f(e,this._clippingArea))return!1;const t=this._intersectsClippingArea,i=this._withinClippingArea;null!=e?(this._intersectsClippingArea=this.intersectsExtent(e),this._withinClippingArea=this._isWithinExtent(e)):(this._intersectsClippingArea=!0,this._withinClippingArea=!0),this._clippingArea=e,this.updateVisibility();const s=i&&this._withinClippingArea,n=!(i||t||this._withinClippingArea||this._intersectsClippingArea);return!this.renderData||s||n||this.setPendingUpdate(8),!0}updateVisibility(){this._dirty=!0,this._surface.setTileTreeDirty(!1)}getLayerInfo(e,t){return this.layerInfo[t][e]}hasLayerData(e,t){const i=this.layerInfo[t][e];return!(!i?.data||i.dataInvalidated)}get updating(){if(this.hasPendingUpdates)return!0;for(const e of j){const t=this.layerInfo[e];for(const e of t)if(e.loadingAgent&&e.loadingAgent!==Q&&e.loadingAgent.updating)return!0}return!1}_isSuspended(e){return!!this.hasPendingUpdate(1)||0!==e&&!this._loadable}get hasPendingUpdates(){return 0!==this._pendingUpdates}hasPendingUpdate(e){return(this._pendingUpdates&e)===e}setPendingUpdate(e){const t=this._pendingUpdates;return this._pendingUpdates|=e,1===e||4===e?this._surface.setTileTreeDirty(!0):this._surface.requestUpdate(),t!==this._pendingUpdates}resetPendingUpdate(e){return!!this.hasPendingUpdate(e)&&(this._pendingUpdates&=~e,!0)}requestLayerData(e,t,s){const n=this.layerInfo[t][e];if(n.waitingAgents.has(s))return console.warn("agent already requested this piece of map data (tile %s, agent tile %s, layer: %d/%d)",this._lij.toString(),s.tile.lij.toString(),t,e),!0;if(n.waitingAgents.push(s),n.data&&!n.dataInvalidated){console.warn("agent requested existing data (tile %s, agent tile %s, layer: %d/%d)",this._lij.toString(),s.tile.lij.toString(),t,e);const i=U(n.data);return s.dataArrived(this,i),!0}if(n.requestPromise)return!0;i(n.requestAbort),n.requestAbort=new AbortController;const r=this._surface.requestTileData(this,e,t,{signal:n.requestAbort.signal});if(!r)return n.requestAbort=null,!1;const a=()=>{n.requestPromise===r&&(n.requestPromise=null,n.requestAbort=null)};return n.requestPromise=r,r.then(a,a),!0}get leaf(){return null==this._children[0]}hasLij(e){return this._lij[0]===e[0]&&this._lij[1]===e[1]&&this._lij[2]===e[2]}findByLij(e){if(this.hasLij(e))return this;const t=this._children;if(!t[0])return null;return t[0].findByLij(e)||t[1].findByLij(e)||t[2].findByLij(e)||t[3].findByLij(e)}distanceToSquared(e){return r(n(fe,this._center[1].center,e))}containsPoint(e){const t=this.extent;return e[0]>=t[0]&&e[1]>=t[1]&&e[0]<=t[2]&&e[1]<=t[3]}containsPointXY(e,t){const i=this.extent;return e>=i[0]&&t>=i[1]&&e<=i[2]&&t<=i[3]}unrequestLayerData(e,t,i){const s=this.layerInfo[t][e],n=s.waitingAgents,r=null!=n.removeUnordered(i);E(r,"agent has not requested this piece of map data"),n.length<1&&(s.abortRequest(),this.setMemoryDirty())}dataArrived(e,t,i){const s=U(i),n=this.layerInfo[t][e];n.data=i,n.dataInvalidated=!1,n.waitingAgents.forAll(e=>e.dataArrived(this,s)),n.waitingAgents.clear(),this.setMemoryDirty()}dataMissing(e,t){const i=this.layerInfo[t][e];i.dataMissing=!0,i.waitingAgents.forAll(e=>e.dataMissing()),i.waitingAgents.clear(),this.setMemoryDirty()}updateRenderData(e,t,i){switch(i&&this.forEachLoadedNeighbor(i=>i.updateRenderData(e,t)),e){case 1:return this._updateTexture(t);case 0:return this._updateGeometry()}}_updateTexture(e){this.renderData&&(this.resetPendingUpdate(0===e?16:32),this.setPendingUpdate(0===e?32:16))}_updateGeometry(){this.setPendingUpdate(8);for(const e of this.layerInfo[0])e.pendingUpdates|=8}invalidateLayerData(e,t){this.layerInfo[t][e].invalidateSourceData()}computeElevationBounds(){const e=this._elevationBoundsMin,t=this._elevationBoundsMax;let i=1/0,s=-1/0;const n=this.layerInfo[0];let r=!0;for(const a of n)null!=a.elevationBounds&&(i=Math.min(i,a.elevationBounds.minElevation),s=Math.max(s,a.elevationBounds.maxElevation),a.elevationBounds.hasNoDataValues||(r=!1));r&&(i=Math.min(i,0),s=Math.max(s,0)),e===i&&t===s||(this._elevationBoundsMin=i,this._elevationBoundsMax=s,this.updateRadiusAndCenter(),this._surface.setTileTreeDirty(!1))}_updateCenter(){const e=this._elevationBoundsMin,t=this._elevationBoundsMax,i=.5*(e+t),s=this._center;l(fe,this.up,i),o(s[1].center,this.centerAtSeaLevel,fe),l(fe,this.up,e),o(s[0],this.centerAtSeaLevel,fe),l(fe,this.up,t),o(s[2],this.centerAtSeaLevel,fe)}findElevationBoundsForLayer(e,t){const i=this.layerInfo[0][e],s=this.elevationLevelDelta,n=Math.max(this.elevationLevel-s,0),r=i.elevationBounds;if(null!=r&&r.level>=t&&r.level<=n)return;const a=this._surface.layerViewByIndex(e,0);if(!Z(this,a))return;const l=ae;let o=!1;const h=i.data;if(h&&h.level<=n){const e=i.data;l.minElevation=e.samplerData.data.minValue,l.maxElevation=e.samplerData.data.maxValue,l.hasNoDataValues=e.samplerData.data.hasNoDataValues,l.level=this.level,o=!0}else{let t,i,r=0;for(let a=this._parent;a&&(!i||r<s)&&(r=this.elevationLevel-a.level,t=i||t,i=a.layerInfo[0][e].data,!(!i&&t&&a.level<=n));a=a.parent);i=i||t,i&&(i.computeMinMaxValue(this._lij[0],this._lij[1],this._lij[2],l),l.minElevation!==1/0&&(l.level=i.level,o=!0))}o&&(null==i.elevationBounds&&(i.elevationBounds=new D),i.elevationBounds.copyFrom(l))}modifyLayers(e,t,i){const s=this.layerInfo[i];for(const a of s)a.loadingAgent&&a.loadingAgent!==Q&&(se(a.loadingAgent),a.loadingAgent=null),a.waitingAgents.clear();for(let a=0;a<s.length;++a)void 0===e[a]&&s[a].release();const n=new Array(...s),r=t.length;s.length=r;for(let a=0;a<r;a++){const e=t[a];s[a]=e>-1?n[e]:K.acquire(this._surface.upsampleInfoPool)}this.setMemoryDirty()}restartAgents(e){this.renderData&&(this._createOrUpdateAgents(0,e),this.updateRenderData(e,0))}updateAgents(e){if(this.renderData){const t=this.layerInfo[e];for(const e of t)e.loadingAgent===Q&&(e.loadingAgent=null);this._createOrUpdateAgents(0,e)}}updateAgentSuspension(){for(const e of j){const t=this._isSuspended(e);for(const i of this.layerInfo[e])i.loadingAgent&&i.loadingAgent!==Q&&(i.loadingAgent.setSuspension(t),i.loadingAgent===Q&&this.updateRenderData(e,0))}}removeLayerAgent(e,t){const i=this.layerInfo[t][e];i.loadingAgent&&i.loadingAgent!==Q&&i.loadingAgent.dispose(),i.loadingAgent=null}agentDone(e,t){const i=this.layerInfo[t][e];i.loadingAgent=Q,i.data||null!=i.upsampleInfo||this._createOrUpdateAgents(e+1,t)}_hasBlendableAncestor(e){return"normal"!==e.blendMode||A(e.parent)&&this._hasBlendableAncestor(e.parent)}_hasBlendModes(e,t,i){for(let s=e;s<t;++s){const e=this._surface.layerViewByIndex(s,i);if(O(e)&&"normal"!==e?.layer?.blendMode||A(e?.layer?.parent)&&this._hasBlendableAncestor(e?.layer?.parent))return!0}return!1}_createOrUpdateAgents(e,t){const i=this.layerInfo[t];if(0===i.length)return;const s=this._isSuspended(t);let n=!1;for(let r=e;r<i.length;++r){const a=i[r],l=this._surface.layerViewByIndex(r,t);let o=!1;n&&!x(l)||(a.loadingAgent?Z(this,l)?(a.loadingAgent!==Q&&a.loadingAgent.setSuspension(s),a.loadingAgent!==Q&&(o=a.loadingAgent.update())):a.dispose():Z(this,l)&&(a.loadingAgent=ie(this,r,t,s),o=a.loadingAgent.startLoading(),o?a.loadingAgent===Q&&this.setPendingUpdate(8):(se(a.loadingAgent),a.loadingAgent=Q)),a.loadingAgent===Q&&this.updateRenderData(t,0),!l.destroyed&&!this._hasBlendModes(e,i.length,t)&&o&&l.isOpaque&&(n||=!0))}}_isWithinExtent(e){const t=this.extent;return t[0]>=e[0]&&e[2]>=t[2]&&t[1]>=e[1]&&e[3]>=t[3]}intersectsExtent(e){const t=this.extent;return t[2]>=e[0]&&e[2]>=t[0]&&t[3]>=e[1]&&e[3]>=t[1]}getElevationVerticesPerSide(e){const i=this.elevationLevel-this.level,s=Math.max(this.level-e,this.elevationLevelDelta-i),n=t(1+(this._maxTesselation>>s),2,this._maxTesselation+1),r=this.minimumVerticesPerSide;return Math.max(n,r)}_findLIJ(e,t){if(!e)return null;const{rootTiles:i}=this.surface;if(null!=i)for(const s of i)if(le(s,e)){let i=s,n=e[0]-i.level-1;for(;n>=0&&!i.leaf&&!t(i);){const t=e[1]>>n&1,s=e[2]>>n&1;i=i.children[2*t+s],n--}return t(i)?i:null}return null}findNeighborTile(e,t){const i=this._lij,s=this._getNeighborLIJ(i,e);return s?oe(i,s)?t(this)?this:null:this._findLIJ(s,t):null}findCorner(e,t){const i=1===e?1:7===e?0:5===e?2:3;let s=this;for(;s.children[0]&&(!t||!t(s));)s=s.children[i];return s}findNeighborCornerTileExact(e,t){return this.findNeighborTile(e,e=>t(e)||e.level===this.level)?.findCorner(R(e),t)||null}forAllSubtreeOnSide(e,t){const i=0===e?[0,1]:1===e?[1]:2===e?[1,3]:3===e?[3]:4===e?[2,3]:5===e?[2]:6===e?[0,2]:[0],s=e=>{const n=e.children;!t(e)&&n[0]&&i.forEach(e=>s(n[e]))};s(this)}getNeighborEdgeStartVertexIndex(e,t){if(!t)return 0;const i=this.level-t.level;if(q(!V||i>=0),0===i)return 0;const s=2**i,n=!(1&~e),r=n?0:1,a=t.lij[r+1]*s,l=this._lij[r+1],o=l-a,h=n?s-1-o:o;return V&&(q(a<=l&&l<a+s),q(0<=h&&h<s)),h}forEachLoadedNeighbor(e){const t=this.level,i=e=>e.level===t||e.loaded;N.forEach(t=>{const s=this.findNeighborTile(t,i);null!=s&&s!==this&&s.forAllSubtreeOnSide(G(t),i=>!!i.loaded&&(e(i,t),!0))}),k.forEach(t=>{const s=this.findNeighborTile(t,i)?.findCorner(R(t),e=>e.loaded);q(!s||he(this,s,t)),s?.loaded&&e(s,t)})}_getNeighborLIJ(e,t){const i=W(t)?-1:J(t)?1:0,s=H(t)?-1:X(t)?1:0,n=[e[0],e[1]+i,e[2]+s];return n[1]<0?null:this.surface.isGlobal?this._wrapLIJ(n):n[2]<0?null:n}_wrapLIJ(e){return!e||e[1]<0||e[1]>=2**e[0]?null:this.surface.wrapEastWest(e)}isEdgeNeighbor(e,t){if(null==e)return!1;if(0===this.level&&0===e.level){if(this._eastEnd&&e._westEnd&&2===t)return!0;if(this._westEnd&&e._eastEnd&&6===t)return!0}const i=Math.max(1e-6*(this.extent[2]-this.extent[0]),1);switch(t){case 0:return z(this.extent[3],e.extent[1],i);case 4:return z(this.extent[1],e.extent[3],i);case 2:return z(this.extent[2],e.extent[0],i)||z(this.extent[2],-e.extent[0],i);case 6:return z(this.extent[0],e.extent[2],i)||z(this.extent[0],-e.extent[2],i)}}get _eastEnd(){return this._lij[2]===this.surface.lijEastEnd(this.level)-1}get _westEnd(){return 0===this._lij[2]}checkGeometryWaterproofness(){F&&(q(this.loaded),this.renderData?.checkGeometryWaterproofness())}shouldHaveNeighbor(e){const t=this.extent,{rootTilesExtent:i}=this._surface,s=.25*(t[2]-t[0]);if(W(e)&&t[3]+s>=i[3])return!1;if(J(e)&&t[1]-s<=i[1])return!1;const n=this.surface.isGlobal;return!(!n&&H(e)&&t[0]-s<=i[0])&&!(!n&&X(e)&&t[2]+s>=i[2])}updateDistanceToPOI(e){const t=this._lastPOI;if(this.distanceToPOI>=0&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return;d(this._lastPOI,e);const i=this._center[1].center,s=e[0]-i[0],n=e[1]-i[1],r=e[2]-i[2];this.distanceToPOI=s*s+n*n+r*r}updateOverlayParameters(e){const{renderData:t}=this;if(!t)return;const{overlays:i,longitudeCyclical:s}=e,n=t.overlay;if(0===i.length)this._clearTileOverlayData(0,n),this._clearTileOverlayData(1,n);else{const[e,t]=i,r=this.extent;_(e.extent,r,s)||m(r,e.extent,s)||m(r,t.extent,s)?(this._setOverlayData(i,s,r,0,n),this._setOverlayData(i,s,r,1,n)):(this._clearTileOverlayData(0,n),this._clearTileOverlayData(1,n))}}_setOverlayData(e,t,i,s,n){const r=e[s].extent,a=y(r),l=v(r);let o=i[0];if(t){o=t.minimalMonotonic(r[0],o);const e=t.minimalMonotonic(r[0],i[2]);o>e&&(o=e-(i[2]-i[0]))}if(0===a||0===l)return void n.setOffsetAndScale(s,0,0,1,1);const h=y(i)/a,d=v(i)/l,u=(o-r[0])/a,c=(i[1]-r[1])/l;n.setOffsetAndScale(s,u,c,h,d)}_clearTileOverlayData(e,t){t.setOffsetAndScale(e,-1,-1,-1,-1)}}function ie(e,t,i,s){const n=0===i?re.acquire():ne.acquire();return n.init(e,t,i,s),n}function se(e){e.dispose(),L(e)?re.release(e):C(e)&&ne.release(e)}const ne=new s(()=>new T),re=new s(()=>new b),ae=new D;function le(e,t){const i=e.lij,s=t[0]-i[0];return!(s<0)&&(t[1]>>s===i[1]&&t[2]>>s===i[2])}function oe(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function he(e,t,i){return null!=e&&null!=t&&t!==e&&(e.level>=t.level?de(e,t,i):de(t,e,R(i)))}function de(e,t,i){q(e.level>=t.level);const s=Y(i),n=$(i),r=e.extent,a=t.extent,l=[s?r[0]:r[2],n?r[3]:r[1]],o=[s?a[2]:a[0],n?a[1]:a[3]],h=1e-5*(r[2]-r[0]),d=z(l[0],o[0],h)||e.surface.isGlobal&&z(l[0],-o[0],h),u=z(l[1],o[1],h);if(d&&u)return!0;if(e.level===t.level)return q(!1),!1;if(!d&&!u)return q(!1),!1;const c=d?ue(a[1],a[3],r[1],r[3],h):ue(a[0],a[2],r[0],r[2],h);return q(c),c}function ue(e,t,i,s,n){return e-n<=i&&i<=s&&s<=t+n}const ce=u(),ge=u(),pe=u(),fe=u();export{te as Tile,he as isCornerNeighbor,oe as lijEquals};
2
+ import{toConst as e}from"../../../core/compilerUtils.js";import{clamp as t}from"../../../core/mathUtils.js";import{abortMaybe as i}from"../../../core/maybe.js";import s from"../../../core/ObjectPool.js";import{subtract as n,squaredLength as r,dot as a,scale as l,add as o,length as h,copy as d}from"../../../core/libs/gl-matrix-2/math/vec3.js";import{create as u,unitZ as c}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as g}from"../../../geometry/ellipsoidUtils.js";import{create as p,equals as f,rectangleContainsRectangleCyclicalAware as _,rectanglesIntersectCyclicalAware as m,width as y,height as v}from"../../../geometry/support/aaBoundingRect.js";import{Sphere as M}from"../../../geometry/support/sphere.js";import{isGroupLayer as A}from"../../../layers/support/layerUtils.js";import{isLayerViewWithFlowRenderer as x}from"../support/flowUtils.js";import{ElevationBounds as D}from"./ElevationBounds.js";import{ElevationTileAgent as b,isElevationTileAgent as L}from"./ElevationTileAgent.js";import{LayerClasses as j}from"./LayerClass.js";import{MapDataCacheItem as I}from"./MapDataCacheItem.js";import{MapTileAgent as T,isMapTileAgent as C}from"./MapTileAgent.js";import{maxPatchTesselation as B}from"./TerrainConst.js";import{isVectorTile as U,isTileTexture as S,isRasterTile as w,isCreateBitmapResult as P}from"./TerrainData.js";import{weakAssert as E,isBlendableLayerView as O,oppositeCorner as R,internalAssert as q,enableTerrainInternalChecks as V,neighborEdgeIndices as N,oppositeEdge as G,neighborCornerIndices as k,almostEquals as z,enableWaterproofTests as F,isNorth as W,isSouth as J,isWest as H,isEast as X,isWestCorner as Y,isNorthCorner as $}from"./terrainUtils.js";import{tileAgentDone as Q}from"./TileAgent.js";import{TilePerLayerInfo as K}from"./TilePerLayerInfo.js";import{fallsWithinLayerView as Z}from"./tileUtils.js";const ee=.1;class te{constructor(){this._lij=[0,0,0],this._children=[null,null,null,null],this._pendingUpdates=0,this._dirty=!0,this._previouslyRendered=!1,this.extent=p(),this._elevationBoundsMin=NaN,this._elevationBoundsMax=0,this.layerInfo=[[],[]],this.extentInRadians=p(),this.centerAtSeaLevel=u(),this._center=[u(),new M,u()],this.up=c(),this._withinClippingArea=!0,this._intersectsClippingArea=!0,this._maxTesselation=0,this._usedMemory=0,this._rasterTileMemory=0,this._vectorTileMemory=0,this._mapDataRefCount=0,this.screenDepth=0,this.renderOrder=0,this._edgeLen=0,this._edgeLen2=0,this._curvatureHeight=0,this.onCompressionFinished=()=>{this.setPendingUpdate(16),this.setMemoryDirty()},this.extentMidX=0,this.extentMidY=0,this.distanceToPOI=-1,this._lastPOI=u(),this.maxLevelDeltaNeighborCount=0,this.unmergableChildCount=0}get lij(){return this._lij}get spatialReference(){return this._surface.spatialReference??this._surface.tilingScheme.spatialReference}get isDisposed(){return null==this._surface}get elevationLevelDelta(){return this._surface.getElevationLevelDelta(this.level)}static prune(){ne.prune(0),re.prune(0),K.prune()}get _cached(){return!this.leaf&&this._mapDataRefCount<=0}get withinClippingArea(){return this._withinClippingArea}get intersectsClippingArea(){return this._intersectsClippingArea}get clippingArea(){return this._clippingArea}get parent(){return this._parent}get children(){return this._children}get surface(){return this._surface}get elevationBoundsMin(){return this._elevationBoundsMin}get elevationBoundsMax(){return this._elevationBoundsMax}get level(){return this._lij[0]}get key(){return`${this._lij[0]}/${this._lij[1]}/${this._lij[2]}`}get edgeLen(){return this._edgeLen}get radius(){return this._center[1].radius}get visible(){return this._dirty&&this.computeVisibility(),this._visible}get frustumVisibility(){return this._dirty&&this.computeVisibility(),this._frustumVisibility}computeVisibility(){this._dirty=!1;const e=this.parent,t=e?.frustumVisibility??1;this._frustumVisibility=0===t?0:2===t&&this._elevationBoundsMin>=e._elevationBoundsMin&&this._elevationBoundsMax<=e._elevationBoundsMax?2:this._calculateFrustumVisibility(this.surface.frustum);const i=2!==this._frustumVisibility&&this._intersectsClippingArea;i!==this._visible&&(this._visible=i,this._surface.emit("tiles-visibility-changed"),this._surface.renderer.setDirty(),this.updateAgentSuspension())}get _loadable(){return this.visible||this._surface.view.state.fixedContentCamera}get rendered(){const e=!!this.renderData;return e!==this._previouslyRendered&&(this._surface.emit("tiles-visibility-changed"),this._previouslyRendered=e,this._surface.renderer.setDirty()),e}init(e,t,i,s,n){this._lij[0]=e,this._lij[1]=t,this._lij[2]=i,this.ellipsoid=g(n.tilingScheme.spatialReference),n.tilingScheme.getExtent(e,t,i,this.extent),n.tilingScheme.convertExtentToRadians(this.extent,this.extentInRadians),this.extentMidX=.5*(this.extent[0]+this.extent[2]),this.extentMidY=.5*(this.extent[1]+this.extent[3]),this._withinClippingArea=!0,this._intersectsClippingArea=!0,this._clippingArea=null,this._mapDataRefCount=0,n.upsampleMapCache.pop(this.key),this._edgeLen=0,this._edgeLen2=0,this._center[1].radius=0,this.elevationLevel=e,s&&!Number.isNaN(s.elevationBoundsMin)?(this._elevationBoundsMin=s.elevationBoundsMin,this._elevationBoundsMax=s.elevationBoundsMax):(this._elevationBoundsMin=0,this._elevationBoundsMax=0),this._pendingUpdates=0,this.renderData=null,this.screenDepth=0,this._visible=!1,this._previouslyRendered=!1,this._parent=s,this.clearChildren(),this._surface=n,this.updateVisibility(),this.maxLevelDeltaNeighborCount=0,this.unmergableChildCount=0;for(const r of j){const e=n.numLayers(r),t=this.layerInfo[r];for(const i of t)i.release();t.length=e;for(let i=0;i<e;i++)t[i]=K.acquire(this._surface.upsampleInfoPool),0===r&&this.findElevationBoundsForLayer(i,-1)}this.computeElevationBounds(),this._maxTesselation=Math.min(n.tilingScheme.pixelSize,B)}dispose(){E(!this.renderData,"tile.renderData was not unloaded"),this._surface?.upsampleMapCache.pop(this.key),this.layerInfo.forEach(e=>{e.forEach(e=>e.release()),e.length=0}),this._surface=this._parent=null,this.clearChildren(),this.setMemoryDirty()}refMapData(){++this._mapDataRefCount,this._cached||this._surface.upsampleMapCache.pop(this.key)}unrefMapData(){--this._mapDataRefCount,this._cached&&this.cachedMemory>0&&this._surface.upsampleMapCache.put(this.key,new I(e(this)))}setMemoryDirty(){this._usedMemory=0}get usedMemory(){return this._ensureUsedMemory()+(this._cached?0:this.mapDataMemory)}get cachedMemory(){return this._ensureUsedMemory(),null==this._surface?this.usedMemory:this._cached?this.mapDataMemory:0}get mapDataMemory(){return this._rasterTileMemory+this._vectorTileMemory}get _cpuImageMemorySize(){const e=4,t=this._surface.tilingScheme.pixelSize;return t*t*e}_ensureUsedMemory(){if(this._usedMemory>0)return this._vectorTileMemory=this.layerInfo[1].reduce((e,{data:t})=>e+(U(t)?t.usedMemoryPerReference:0),0),this._usedMemory;this._usedMemory=this._baseUsedMemory,this._rasterTileMemory=0,this._vectorTileMemory=0;for(const{data:e}of this.layerInfo[1])U(e)?this._vectorTileMemory+=e.usedMemoryPerReference:this._rasterTileMemory+=this.getTerrainDataMemory(e);for(const e of this.layerInfo[0])this._usedMemory+=e.data?this._cpuImageMemorySize:0;return this.renderData&&(this._usedMemory+=this.renderData.estimatedGeometryMemoryUsage,this._rasterTileMemory+=this.renderData.texture?.usedMemory??0),this._cached&&this._surface.upsampleMapCache.updateSize(this.key),this._usedMemory}getUsedMemoryForLayer(e,t){const i=this.layerInfo[e][t];return i?.data?1===e?this._cached?0:this.getTerrainDataMemory(i.data):0===e?this._cpuImageMemorySize:0:0}getTerrainDataMemory(e){return S(e)?e.texture.usedMemory:w(e)?e.memoryUsage:U(e)?e.usedMemoryPerReference:P(e)?this._cpuImageMemorySize:0}updateScreenDepth(e){const[t,i,s]=this._center[1].center,n=e,r=n[2]*t+n[6]*i+n[10]*s+n[14];this.screenDepth=r<0?0:r/(n[3]*t+n[7]*i+n[11]*s+n[15])}shouldSplit(e,t,i){if(!this.visible)return 0;if(e.frustum&&(!this._intersectsClippingArea||2===this._calculateFrustumVisibility(e.frustum)))return 0;const s=this.level;n(ce,this._center[1].center,t);let d=r(ce),u=ce,c=this._center[1].center;n(ge,this._center[0],t);const g=r(ge);g<d&&(d=g,u=ge,c=this._center[0]),n(pe,this._center[2],t);const p=r(pe);if(p<d&&(d=p,u=pe,c=this._center[2]),this._edgeLen2>d&&s<e.maxLod)return 1;const f=Math.sqrt(d),_=e.fovX*f*2,m=this._edgeLen/_,y=()=>{if(s<e.maxLod)return this.elevationLevel=s,0;const t=s+Math.ceil(-Math.log2(e.relativeWidthLimit/m));return t!==this.elevationLevel?(this.elevationLevel=t,2):0},v=null!=i?i-s:1/0;if(v<=.5)return y();const M=a(this.up,ce),A=this._elevationBoundsMax-this._elevationBoundsMin,x=A/this.edgeLen;if(e.aboveGround&&M>0&&x<.001){if(M/f-Math.sin(this._curvatureHeight/(this.edgeLen*Math.SQRT1_2)*Math.PI)-x>0)return 0}const D=null!=i?3-Math.min(v,2):1;if(m*D<e.relativeWidthLimit||s>=e.maxLod)return y();if(s<7)return 1;l(fe,this.up,M),n(fe,fe,u);const b=r(fe);if(b<=this.radius*this.radius)return 1;l(fe,fe,this.radius/Math.sqrt(b)),o(fe,fe,c),n(fe,t,fe);const L=Math.min(1,(Math.abs(a(fe,this.up))+.5*A+this._curvatureHeight)/h(fe)),j=ee/e.angledSplitBias,I=e.fovY*f*2;return L*(this._edgeLen/I*D)<j*e.relativeHeightLimit?0:1}createChildren(){const e=this._children,t=this.lij[0]+1,i=2*this.lij[1],s=2*this.lij[2];return e[0]=this.surface.createTile(t,i,s,this),e[1]=this.surface.createTile(t,i,s+1,this),e[2]=this.surface.createTile(t,i+1,s,this),e[3]=this.surface.createTile(t,i+1,s+1,this),e}clearChildren(){this._children[0]=this._children[1]=this._children[2]=this._children[3]=null}get loaded(){return this.renderData?.hasGeometry??!1}load(){this.refMapData();for(const e of j)this._createOrUpdateAgents(0,e);this.surface.renderer.loadTile(this)}unload(){this.renderData&&this.unrefMapData(),this.surface.renderer.unloadTile(this);for(const e of j){const t=this.layerInfo[e];for(const e of t)e.loadingAgent&&e.loadingAgent!==Q&&(se(e.loadingAgent),e.loadingAgent=null),e.pendingUpdates=0}this.resetPendingUpdate(8),this.resetPendingUpdate(16),this.resetPendingUpdate(32)}unloadMapData(){const e=this.layerInfo[1];for(const t of e)t.loadingAgent&&t.loadingAgent!==Q&&(se(t.loadingAgent),t.loadingAgent=null),t.pendingUpdates=0,t.invalidateSourceData();this.renderData?.releaseTexture(),this.setMemoryDirty()}updateClippingStatus(e){if(f(e,this._clippingArea))return!1;const t=this._intersectsClippingArea,i=this._withinClippingArea;null!=e?(this._intersectsClippingArea=this.intersectsExtent(e),this._withinClippingArea=this._isWithinExtent(e)):(this._intersectsClippingArea=!0,this._withinClippingArea=!0),this._clippingArea=e,this.updateVisibility();const s=i&&this._withinClippingArea,n=!(i||t||this._withinClippingArea||this._intersectsClippingArea);return!this.renderData||s||n||this.setPendingUpdate(8),!0}updateVisibility(){this._dirty=!0,this._surface.setTileTreeDirty(!1)}getLayerInfo(e,t){return this.layerInfo[t][e]}hasLayerData(e,t){const i=this.layerInfo[t][e];return!(!i?.data||i.dataInvalidated)}get updating(){if(this.hasPendingUpdates)return!0;for(const e of j){const t=this.layerInfo[e];for(const e of t)if(e.loadingAgent&&e.loadingAgent!==Q&&e.loadingAgent.updating)return!0}return!1}_isSuspended(e){return!!this.hasPendingUpdate(1)||0!==e&&!this._loadable}get hasPendingUpdates(){return 0!==this._pendingUpdates}hasPendingUpdate(e){return(this._pendingUpdates&e)===e}setPendingUpdate(e){const t=this._pendingUpdates;return this._pendingUpdates|=e,1===e||4===e?this._surface.setTileTreeDirty(!0):this._surface.requestUpdate(),t!==this._pendingUpdates}resetPendingUpdate(e){return!!this.hasPendingUpdate(e)&&(this._pendingUpdates&=~e,!0)}requestLayerData(e,t,s){const n=this.layerInfo[t][e];if(n.waitingAgents.has(s))return console.warn("agent already requested this piece of map data (tile %s, agent tile %s, layer: %d/%d)",this._lij.toString(),s.tile.lij.toString(),t,e),!0;if(n.waitingAgents.push(s),n.data&&!n.dataInvalidated){console.warn("agent requested existing data (tile %s, agent tile %s, layer: %d/%d)",this._lij.toString(),s.tile.lij.toString(),t,e);const i=U(n.data);return s.dataArrived(this,i),!0}if(n.requestPromise)return!0;i(n.requestAbort),n.requestAbort=new AbortController;const r=this._surface.requestTileData(this,e,t,{signal:n.requestAbort.signal});if(!r)return n.requestAbort=null,!1;const a=()=>{n.requestPromise===r&&(n.requestPromise=null,n.requestAbort=null)};return n.requestPromise=r,r.then(a,a),!0}get leaf(){return null==this._children[0]}hasLij(e){return this._lij[0]===e[0]&&this._lij[1]===e[1]&&this._lij[2]===e[2]}findByLij(e){if(this.hasLij(e))return this;const t=this._children;if(!t[0])return null;return t[0].findByLij(e)||t[1].findByLij(e)||t[2].findByLij(e)||t[3].findByLij(e)}distanceToSquared(e){return r(n(fe,this._center[1].center,e))}containsPoint(e){const t=this.extent;return e[0]>=t[0]&&e[1]>=t[1]&&e[0]<=t[2]&&e[1]<=t[3]}containsPointXY(e,t){const i=this.extent;return e>=i[0]&&t>=i[1]&&e<=i[2]&&t<=i[3]}unrequestLayerData(e,t,i){const s=this.layerInfo[t][e],n=s.waitingAgents,r=null!=n.removeUnordered(i);E(r,"agent has not requested this piece of map data"),n.length<1&&(s.abortRequest(),this.setMemoryDirty())}dataArrived(e,t,i){const s=U(i),n=this.layerInfo[t][e];n.data=i,n.dataInvalidated=!1,n.waitingAgents.forAll(e=>e.dataArrived(this,s)),n.waitingAgents.clear(),this.setMemoryDirty()}dataMissing(e,t){const i=this.layerInfo[t][e];i.dataMissing=!0,i.waitingAgents.forAll(e=>e.dataMissing()),i.waitingAgents.clear(),this.setMemoryDirty()}updateRenderData(e,t,i){switch(i&&this.forEachLoadedNeighbor(i=>i.updateRenderData(e,t)),e){case 1:return this._updateTexture(t);case 0:return this._updateGeometry()}}_updateTexture(e){this.renderData&&(this.resetPendingUpdate(0===e?16:32),this.setPendingUpdate(0===e?32:16))}_updateGeometry(){this.setPendingUpdate(8);for(const e of this.layerInfo[0])e.pendingUpdates|=8}invalidateLayerData(e,t){this.layerInfo[t][e].invalidateSourceData()}computeElevationBounds(){const e=this._elevationBoundsMin,t=this._elevationBoundsMax;let i=1/0,s=-1/0;const n=this.layerInfo[0];let r=!0;for(const a of n)null!=a.elevationBounds&&(i=Math.min(i,a.elevationBounds.minElevation),s=Math.max(s,a.elevationBounds.maxElevation),a.elevationBounds.hasNoDataValues||(r=!1));r&&(i=Math.min(i,0),s=Math.max(s,0)),e===i&&t===s||(this._elevationBoundsMin=i,this._elevationBoundsMax=s,this.updateRadiusAndCenter(),this._surface.setTileTreeDirty(!1))}_updateCenter(){const e=this._elevationBoundsMin,t=this._elevationBoundsMax,i=.5*(e+t),s=this._center;l(fe,this.up,i),o(s[1].center,this.centerAtSeaLevel,fe),l(fe,this.up,e),o(s[0],this.centerAtSeaLevel,fe),l(fe,this.up,t),o(s[2],this.centerAtSeaLevel,fe)}findElevationBoundsForLayer(e,t){const i=this.layerInfo[0][e],s=this.elevationLevelDelta,n=Math.max(this.elevationLevel-s,0),r=i.elevationBounds;if(null!=r&&r.level>=t&&r.level<=n)return;const a=this._surface.layerViewByIndex(e,0);if(!Z(this,a))return;const l=ae;let o=!1;const h=i.data;if(h&&h.level<=n){const e=i.data;l.minElevation=e.samplerData.data.minValue,l.maxElevation=e.samplerData.data.maxValue,l.hasNoDataValues=e.samplerData.data.hasNoDataValues,l.level=this.level,o=!0}else{let t,i,r=0;for(let a=this._parent;a&&(!i||r<s)&&(r=this.elevationLevel-a.level,t=i||t,i=a.layerInfo[0][e].data,!(!i&&t&&a.level<=n));a=a.parent);i=i||t,i&&(i.computeMinMaxValue(this._lij[0],this._lij[1],this._lij[2],l),l.minElevation!==1/0&&(l.level=i.level,o=!0))}o&&(null==i.elevationBounds&&(i.elevationBounds=new D),i.elevationBounds.copyFrom(l))}modifyLayers(e,t,i){const s=this.layerInfo[i];for(const a of s)a.loadingAgent&&a.loadingAgent!==Q&&(se(a.loadingAgent),a.loadingAgent=null),a.waitingAgents.clear();for(let a=0;a<s.length;++a)void 0===e[a]&&s[a].release();const n=new Array(...s),r=t.length;s.length=r;for(let a=0;a<r;a++){const e=t[a];s[a]=e>-1?n[e]:K.acquire(this._surface.upsampleInfoPool)}this.setMemoryDirty()}restartAgents(e){this.renderData&&(this._createOrUpdateAgents(0,e),this.updateRenderData(e,0))}updateAgents(e){if(this.renderData){const t=this.layerInfo[e];for(const e of t)e.loadingAgent===Q&&(e.loadingAgent=null);this._createOrUpdateAgents(0,e)}}updateAgentSuspension(){for(const e of j){const t=this._isSuspended(e);for(const i of this.layerInfo[e])i.loadingAgent&&i.loadingAgent!==Q&&(i.loadingAgent.setSuspension(t),i.loadingAgent===Q&&this.updateRenderData(e,0))}}removeLayerAgent(e,t){const i=this.layerInfo[t][e];i.loadingAgent&&i.loadingAgent!==Q&&i.loadingAgent.dispose(),i.loadingAgent=null}agentDone(e,t){const i=this.layerInfo[t][e];i.loadingAgent=Q,i.data||null!=i.upsampleInfo||this._createOrUpdateAgents(e+1,t)}_hasBlendableAncestor(e){return"normal"!==e.blendMode||A(e.parent)&&this._hasBlendableAncestor(e.parent)}_hasBlendModes(e,t,i){for(let s=e;s<t;++s){const e=this._surface.layerViewByIndex(s,i);if(O(e)&&"normal"!==e?.layer?.blendMode||A(e?.layer?.parent)&&this._hasBlendableAncestor(e?.layer?.parent))return!0}return!1}_createOrUpdateAgents(e,t){const i=this.layerInfo[t];if(0===i.length)return;const s=this._isSuspended(t);let n=!1;for(let r=e;r<i.length;++r){const a=i[r],l=this._surface.layerViewByIndex(r,t);let o=!1;n&&!x(l)||(a.loadingAgent?Z(this,l)?(a.loadingAgent!==Q&&a.loadingAgent.setSuspension(s),a.loadingAgent!==Q&&(o=a.loadingAgent.update())):a.dispose():Z(this,l)&&(a.loadingAgent=ie(this,r,t,s),o=a.loadingAgent.startLoading(),o?a.loadingAgent===Q&&this.setPendingUpdate(8):(se(a.loadingAgent),a.loadingAgent=Q)),a.loadingAgent===Q&&this.updateRenderData(t,0),!l.destroyed&&!this._hasBlendModes(e,i.length,t)&&o&&l.isOpaque&&(n||=!0))}}_isWithinExtent(e){const t=this.extent;return t[0]>=e[0]&&e[2]>=t[2]&&t[1]>=e[1]&&e[3]>=t[3]}intersectsExtent(e){const t=this.extent;return t[2]>=e[0]&&e[2]>=t[0]&&t[3]>=e[1]&&e[3]>=t[1]}getElevationVerticesPerSide(e){const i=this.elevationLevel-this.level,s=Math.max(this.level-e,this.elevationLevelDelta-i),n=t(1+(this._maxTesselation>>s),2,this._maxTesselation+1),r=this.minimumVerticesPerSide;return Math.max(n,r)}_findLIJ(e,t){if(!e)return null;const{rootTiles:i}=this.surface;if(null!=i)for(const s of i)if(le(s,e)){let i=s,n=e[0]-i.level-1;for(;n>=0&&!i.leaf&&!t(i);){const t=e[1]>>n&1,s=e[2]>>n&1;i=i.children[2*t+s],n--}return t(i)?i:null}return null}findNeighborTile(e,t){const i=this._lij,s=this._getNeighborLIJ(i,e);return s?oe(i,s)?t(this)?this:null:this._findLIJ(s,t):null}findCorner(e,t){const i=1===e?1:7===e?0:5===e?2:3;let s=this;for(;s.children[0]&&(!t||!t(s));)s=s.children[i];return s}findNeighborCornerTileExact(e,t){return this.findNeighborTile(e,e=>t(e)||e.level===this.level)?.findCorner(R(e),t)||null}forAllSubtreeOnSide(e,t){const i=0===e?[0,1]:1===e?[1]:2===e?[1,3]:3===e?[3]:4===e?[2,3]:5===e?[2]:6===e?[0,2]:[0],s=e=>{const n=e.children;!t(e)&&n[0]&&i.forEach(e=>s(n[e]))};s(this)}getNeighborEdgeStartVertexIndex(e,t){if(!t)return 0;const i=this.level-t.level;if(q(!V||i>=0),0===i)return 0;const s=2**i,n=!(1&~e),r=n?0:1,a=t.lij[r+1]*s,l=this._lij[r+1],o=l-a,h=n?s-1-o:o;return V&&(q(a<=l&&l<a+s),q(0<=h&&h<s)),h}forEachLoadedNeighbor(e){const t=this.level,i=e=>e.level===t||e.loaded;N.forEach(t=>{const s=this.findNeighborTile(t,i);null!=s&&s!==this&&s.forAllSubtreeOnSide(G(t),i=>!!i.loaded&&(e(i,t),!0))}),k.forEach(t=>{const s=this.findNeighborTile(t,i)?.findCorner(R(t),e=>e.loaded);q(!s||he(this,s,t)),s?.loaded&&e(s,t)})}_getNeighborLIJ(e,t){const i=W(t)?-1:J(t)?1:0,s=H(t)?-1:X(t)?1:0,n=[e[0],e[1]+i,e[2]+s];return n[1]<0?null:this.surface.isGlobal?this._wrapLIJ(n):n[2]<0?null:n}_wrapLIJ(e){return!e||e[1]<0||e[1]>=2**e[0]?null:this.surface.wrapEastWest(e)}isEdgeNeighbor(e,t){if(null==e)return!1;if(0===this.level&&0===e.level){if(this._eastEnd&&e._westEnd&&2===t)return!0;if(this._westEnd&&e._eastEnd&&6===t)return!0}const i=Math.max(1e-6*(this.extent[2]-this.extent[0]),1);switch(t){case 0:return z(this.extent[3],e.extent[1],i);case 4:return z(this.extent[1],e.extent[3],i);case 2:return z(this.extent[2],e.extent[0],i)||z(this.extent[2],-e.extent[0],i);case 6:return z(this.extent[0],e.extent[2],i)||z(this.extent[0],-e.extent[2],i)}}get _eastEnd(){return this._lij[2]===this.surface.lijEastEnd(this.level)-1}get _westEnd(){return 0===this._lij[2]}checkGeometryWaterproofness(){F&&(q(this.loaded),this.renderData?.checkGeometryWaterproofness())}shouldHaveNeighbor(e){const t=this.extent,{rootTilesExtent:i}=this._surface,s=.25*(t[2]-t[0]);if(W(e)&&t[3]+s>=i[3])return!1;if(J(e)&&t[1]-s<=i[1])return!1;const n=this.surface.isGlobal;return!(!n&&H(e)&&t[0]-s<=i[0])&&!(!n&&X(e)&&t[2]+s>=i[2])}updateDistanceToPOI(e){const t=this._lastPOI;if(this.distanceToPOI>=0&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return;d(this._lastPOI,e);const i=this._center[1].center,s=e[0]-i[0],n=e[1]-i[1],r=e[2]-i[2];this.distanceToPOI=s*s+n*n+r*r}updateOverlayParameters(e){const{renderData:t}=this;if(!t)return;const{overlays:i,longitudeCyclical:s}=e,n=t.overlay;if(0===i.length)this._clearTileOverlayData(0,n),this._clearTileOverlayData(1,n);else{const[e,t]=i,r=this.extent;_(e.extent,r,s)||m(r,e.extent,s)||m(r,t.extent,s)?(this._setOverlayData(i,s,r,0,n),this._setOverlayData(i,s,r,1,n)):(this._clearTileOverlayData(0,n),this._clearTileOverlayData(1,n))}}_setOverlayData(e,t,i,s,n){const r=e[s].extent,a=y(r),l=v(r);let o=i[0];if(t){o=t.minimalMonotonic(r[0],o);const e=t.minimalMonotonic(r[0],i[2]);o>e&&(o=e-(i[2]-i[0]))}if(0===a||0===l)return void n.setOffsetAndScale(s,0,0,1,1);const h=y(i)/a,d=v(i)/l,u=(o-r[0])/a,c=(i[1]-r[1])/l;n.setOffsetAndScale(s,u,c,h,d)}_clearTileOverlayData(e,t){t.setOffsetAndScale(e,-1,-1,-1,-1)}}function ie(e,t,i,s){const n=0===i?re.acquire():ne.acquire();return n.init(e,t,i,s),n}function se(e){e.dispose(),L(e)?re.release(e):C(e)&&ne.release(e)}const ne=new s(()=>new T),re=new s(()=>new b),ae=new D;function le(e,t){const i=e.lij,s=t[0]-i[0];return!(s<0)&&(t[1]>>s===i[1]&&t[2]>>s===i[2])}function oe(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function he(e,t,i){return null!=e&&null!=t&&t!==e&&(e.level>=t.level?de(e,t,i):de(t,e,R(i)))}function de(e,t,i){q(e.level>=t.level);const s=Y(i),n=$(i),r=e.extent,a=t.extent,l=[s?r[0]:r[2],n?r[3]:r[1]],o=[s?a[2]:a[0],n?a[1]:a[3]],h=1e-5*(r[2]-r[0]),d=z(l[0],o[0],h)||e.surface.isGlobal&&z(l[0],-o[0],h),u=z(l[1],o[1],h);if(d&&u)return!0;if(e.level===t.level)return q(!1),!1;if(!d&&!u)return q(!1),!1;const c=d?ue(a[1],a[3],r[1],r[3],h):ue(a[0],a[2],r[0],r[2],h);return q(c),c}function ue(e,t,i,s,n){return e-n<=i&&i<=s&&s<=t+n}const ce=u(),ge=u(),pe=u(),fe=u();export{te as Tile,he as isCornerNeighbor,oe as lijEquals};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- function e(e){switch(e.type){case"annotation":case"building-scene":case"catalog":case"catalog-dynamic-group":case"catalog-footprint":case"csv":case"dimension":case"dimension-feature":case"feature":case"gaussian-splat":case"geo-rss":case"geojson":case"graphics":case"group":case"integrated-mesh":case"integrated-mesh-3dtiles":case"kml":case"knowledge-graph":case"link-chart":case"knowledge-graph-sublayer":case"line-of-sight":case"map-notes":case"ogc-feature":case"oriented-imagery":case"point-cloud":case"route":case"scene":case"stream":case"viewshed":case"voxel":case"subtype-group":case"unknown":case"unsupported":case"wfs":case"parquet":case"imagery":case"imagery-tile":return!1;case"base-dynamic":case"base-elevation":case"base-tile":case"bing-maps":case"elevation":case"map-image":case"media":case"open-street-map":case"tile":case"vector-tile":case"video":case"wcs":case"web-tile":case"wms":case"wmts":return!0;default:return e.type,!1}}export{e as isTerrainSurfaceLayer};
2
+ function e(e){switch(e.type){case"annotation-feature":case"building-scene":case"catalog":case"catalog-dynamic-group":case"catalog-footprint":case"csv":case"dimension":case"dimension-feature":case"feature":case"gaussian-splat":case"geo-rss":case"geojson":case"graphics":case"group":case"integrated-mesh":case"integrated-mesh-3dtiles":case"kml":case"knowledge-graph":case"link-chart":case"knowledge-graph-sublayer":case"line-of-sight":case"map-notes":case"ogc-feature":case"oriented-imagery":case"point-cloud":case"route":case"scene":case"stream":case"viewshed":case"voxel":case"subtype-group":case"unknown":case"unsupported":case"wfs":case"parquet":case"imagery":case"imagery-tile":return!1;case"base-dynamic":case"base-elevation":case"base-tile":case"bing-maps":case"elevation":case"map-image":case"media":case"open-street-map":case"tile":case"vector-tile":case"video":case"wcs":case"web-tile":case"wms":case"wmts":return!0;default:return e.type,!1}}export{e as isTerrainSurfaceLayer};
@@ -20,7 +20,7 @@ import type { PointCloudLayerView } from "../layers/PointCloudLayerView.js";
20
20
  /** @since 5.0 */
21
21
  export interface LayerView3DMap {
22
22
  /** @since 5.1 */
23
- annotation: never;
23
+ "annotation-feature": never;
24
24
  /** @since 5.0 */
25
25
  "base-dynamic": never;
26
26
  /** @since 5.0 */
@@ -1,11 +1,11 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{generateUID as e}from"../../../../../core/uid.js";import{TextureBufferNaNSupportConfiguration as t,unpackFloat1x32 as o,unpackHalf1x16 as d,unpackInt1x16 as n,glslType as i,glslDecodeField as r}from"./TextureBackedBufferFields.glsl.js";import{glsl as a}from"../shaderModules/glsl.js";import{assert as c}from"../../lib/Util.js";const s=new t(!0),u=new t(!1);class f{constructor(t){this.moduleId=e(),this.namespace=`_tbb_${this.moduleId}_`;const{itemIndexAttribute:o,bufferUniform:d,layout:n}=t,i=t.fieldFilter??(()=>!0),r=t.enableNaNSupport?s:u;this.TextureBackedBufferModule=(e,t)=>l(this.namespace,e,t,o,d,n,i,r),this.getTextureAttribute=m(this.namespace)}}function l(e,t,s,u,f,l,m,$){const{vertex:x}=t;x.include(o,$),x.include(d,$),x.include(n);const p=`${e}tbbStride`,g=`${e}TextureBackedBufferItemData`,b=`${e}fetchTextureBackedBufferItemData`,I=h(e);for(const o of[p,g,b,I])c(o.length<1024,"Identifiers do not have a valid length");x.constants.add(p,"uint",l.texelStride),x.uniforms.add(f);const B=new Array;for(const o of l.fields.values())m(o.name,s)&&B.push(o);if(0===B.length)return;const w=[];for(let o=0;o<l.texelStride;++o)w.push(!1);for(const o of B)for(let e=0;e<o.numTexels;++e)w[o.startTexel+e]=!0;x.code.add(a`
3
- struct ${g} {`);for(const o of B)x.code.add(a`\t${i(o)} ${o.name};`);x.code.add(a`};`),x.code.add(a`
4
- ${g} ${b}(highp uint itemIndex) {
5
- ${g} itemData;
6
- highp uint index = itemIndex * ${p};
2
+ import{generateUID as e}from"../../../../../core/uid.js";import{TextureBufferNaNSupportConfiguration as t,unpackFloat1x32 as n,unpackHalf as o,unpackInt1x16 as d,glslType as i,glslDecodeField as r}from"./TextureBackedBufferFields.glsl.js";import{glsl as a}from"../shaderModules/glsl.js";import{assert as c}from"../../lib/Util.js";const s=new t(!0),u=new t(!1);class f{constructor(t){this.moduleId=e(),this.namespace=`_tbb_${this.moduleId}_`;const{itemIndexAttribute:n,bufferUniform:o,layout:d}=t,i=t.fieldFilter??(()=>!0),r=t.enableNaNSupport?s:u;this.TextureBackedBufferModule=(e,t)=>l(this.namespace,e,t,n,o,d,i,r),this.getTextureAttribute=m(this.namespace)}}function l(e,t,s,u,f,l,m,p){const{vertex:g}=t,{texelFormatInfo:I}=l;g.include(n,p),g.include(o,p),g.include(d);const b=`${e}tbbStride`,B=`${e}TextureBackedBufferItemData`,v=`${e}fetchTextureBackedBufferItemData`,T=h(e);for(const n of[b,B,v,T])c(n.length<1024,"Identifiers do not have a valid length");g.constants.add(b,"uint",l.texelStride),g.uniforms.add(f);const w=new Array;for(const n of l.fields.values())m(n.name,s)&&w.push(n);if(0===w.length)return;const D=[];for(let n=0;n<l.texelStride;++n)D.push(!1);for(const n of w)for(let e=0;e<n.numTexels;++e)D[n.startTexel+e]=!0;g.code.add(a`
3
+ struct ${B} {`);for(const n of w)g.code.add(a`\t${i(n)} ${n.name};`);g.code.add(a`};`),g.code.add(a`
4
+ ${B} ${v}(highp uint itemIndex) {
5
+ ${B} itemData;
6
+ highp uint index = itemIndex * ${b};
7
7
  highp uint rowWidth = uint(textureSize(${f.name}, 0).x);
8
8
  int coordX = int(index % rowWidth);
9
9
  int coordY = int(index / rowWidth);
10
- `);for(let o=0;o<w.length;++o)!1!==w[o]&&x.code.add(a`lowp uvec4 texel${a.int(o)} = texelFetch(${f.name}, ivec2(coordX + ${a.int(o)}, coordY), 0);`);for(const o of B)x.code.add(a`itemData.${o.name} = ${r(o)};`);x.code.add(a`return itemData;
11
- }`),x.code.add(a`${g} ${I};`),x.main.add(a`${I} = ${b}(${u});`)}function m(e){const t=h(e);return e=>a`${t}.${e}`}function h(e){return`${e}ItemData`}export{f as TextureBackedBufferModule};
10
+ `);const S=$[I.channels],j=x[I.channels];for(let n=0;n<D.length;++n)!1!==D[n]&&g.code.add(a`highp ${S} texel${a.int(n)} = texelFetch(${f.name}, ivec2(coordX + ${a.int(n)}, coordY), 0)${j};`);for(const n of w)g.code.add(a`itemData.${n.name} = ${r(n,I)};`);g.code.add(a`return itemData;
11
+ }`),g.code.add(a`${B} ${T};`),g.main.add(a`${T} = ${v}(${u});`)}function m(e){const t=h(e);return e=>a`${t}.${e}`}function h(e){return`${e}ItemData`}const $={1:a`uint`,2:a`uvec2`,4:a`uvec4`},x={1:a`.x`,2:a`.xy`,4:""};export{f as TextureBackedBufferModule};
@@ -1,32 +1,41 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as t}from"tslib";import{maxInt16 as n,maxUint8 as e}from"../../../../../core/typedArrayUtil.js";import{hasNativeFloat16Array as i}from"../../../../../geometry/support/float16.js";import{FloatBindUniform as o}from"../shaderModules/FloatBindUniform.js";import{glsl as u,If as s}from"../shaderModules/glsl.js";import{ShaderTechniqueConfiguration as a,parameter as r}from"../shaderTechnique/ShaderTechniqueConfiguration.js";function c(t){switch(t.elementType){case"float":switch(t.elementCount){case 1:return u`float`;case 2:return u`vec2`;case 3:return u`vec3`;case 4:return u`vec4`;case 9:return u`mat3`;default:t.elementCount}break;case"int":switch(t.elementCount){case 1:return u`int`;case 2:return u`ivec2`;case 3:return u`ivec3`;case 4:return u`ivec4`;case 9:throw new Error("Invalid element count 9 for type int");default:t.elementCount}break;case"uint":switch(t.elementCount){case 1:return u`uint`;case 2:return u`uvec2`;case 3:return u`uvec3`;case 4:return u`uvec4`;case 9:throw new Error("Invalid element count 9 for type uint");default:t.elementCount}break;default:t.elementType}throw new Error("unsupported field")}const p=new o("const_NaN",()=>NaN,{supportsNaN:!0});class f extends a{constructor(t){super(),this.supportNaN=t}}function l(t,n){const e=n?.supportNaN;e&&(t.uniforms.add(p),t.code.add(u`bool bitsEncodeFloat16NaN(highp uint bits) {
2
+ import{__decorate as t}from"tslib";import{maxUint8 as n}from"../../../../../core/typedArrayUtil.js";import{hasNativeFloat16Array as e}from"../../../../../geometry/support/float16.js";import{FloatBindUniform as o}from"../shaderModules/FloatBindUniform.js";import{glsl as i,If as u}from"../shaderModules/glsl.js";import{ShaderTechniqueConfiguration as a,parameter as r}from"../shaderTechnique/ShaderTechniqueConfiguration.js";function s(t){switch(t.elementType){case"float":switch(t.elementCount){case 1:return i`float`;case 2:return i`vec2`;case 3:return i`vec3`;case 4:return i`vec4`;case 9:return i`mat3`;default:t.elementCount}break;case"int":switch(t.elementCount){case 1:return i`int`;case 2:return i`ivec2`;case 3:return i`ivec3`;case 4:return i`ivec4`;case 9:throw new Error("Invalid element count 9 for type int");default:t.elementCount}break;case"uint":switch(t.elementCount){case 1:return i`uint`;case 2:return i`uvec2`;case 3:return i`uvec3`;case 4:return i`uvec4`;case 9:throw new Error("Invalid element count 9 for type uint");default:t.elementCount}break;default:t.elementType}throw new Error("unsupported field")}const c=new o("constNaN",()=>NaN,{supportsNaN:!0});class p extends a{constructor(t){super(),this.supportNaN=t}}function f(t,n){const e=n?.supportNaN;e&&(t.uniforms.add(c),t.code.add(i`bool bitsEncodeFloat16NaN(highp uint bits) {
3
3
  const highp uint nanExponent = 0x00007c00u;
4
4
  highp uint exponent = bits & nanExponent;
5
5
  highp uint mantissa = bits & 0x000003ffu;
6
6
  return exponent == nanExponent && mantissa != 0u;
7
- }`)),t.code.add(u`
8
- mediump float unpackHalf1x16(highp uint bits0, highp uint bits1) {
9
- highp uint halfBits = (bits1 << 8u) | bits0;
10
- ${s(e,u`
11
- if (bitsEncodeFloat16NaN(halfBits)) {
12
- return const_NaN;
7
+ }`)),t.code.add(i`
8
+ mediump float unpackHalf1x16(highp uint bits) {
9
+ ${u(e,i`
10
+ if (bitsEncodeFloat16NaN(bits)) {
11
+ return constNaN;
13
12
  }`)}
14
- return unpackHalf2x16(halfBits).x;
15
- }`)}function h(t,n){const e=n?.supportNaN;e&&(t.uniforms.add(p),t.code.add(u`bool bitsEncodeFloat32NaN(highp uint bits) {
13
+ return unpackHalf2x16(bits).x;
14
+ }`),t.code.add(i`
15
+ mediump vec2 unpackHalf2x16NaNSupport(highp uint bits) {
16
+ vec2 result = unpackHalf2x16(bits);
17
+ ${u(e,i`
18
+ if (bitsEncodeFloat16NaN(bits)) {
19
+ result.x = constNaN;
20
+ }
21
+ if (bitsEncodeFloat16NaN(bits >> ${i.uint(k[2])})) {
22
+ result.y = constNaN;
23
+ }
24
+ `)}
25
+ return result;
26
+ }`)}function l(t,n){const e=n?.supportNaN;e&&(t.uniforms.add(c),t.code.add(i`bool bitsEncodeFloat32NaN(highp uint bits) {
16
27
  const highp uint nanExponent = 0x7f800000u;
17
28
  highp uint exponent = bits & nanExponent;
18
29
  highp uint mantissa = bits & 0x007fffffu;
19
30
  return exponent == nanExponent && mantissa != 0u;
20
- }`)),t.code.add(u`
21
- highp float unpackFloat1x32(highp uint bits0, highp uint bits1, highp uint bits2, highp uint bits3) {
22
- highp uint floatBits = (bits3 << 24u) |(bits2 << 16u) | (bits1 << 8u) | bits0;
23
- ${s(e,u`
24
- if (bitsEncodeFloat32NaN(floatBits)) {
25
- return const_NaN;
31
+ }`)),t.code.add(i`
32
+ highp float unpackFloat1x32(highp uint bits) {
33
+ ${u(e,i`
34
+ if (bitsEncodeFloat32NaN(bits)) {
35
+ return constNaN;
26
36
  }`)}
27
- return uintBitsToFloat(floatBits);
28
- }`)}function $(t){t.code.add(u`mediump int unpackInt1x16(highp uint bits0, highp uint bits1) {
29
- highp uint rawBits = (bits1 << 8u) | bits0;
30
- highp uint signExtendedBits = (rawBits & 0x8000u) != 0u ? (rawBits | 0xffff0000u) : rawBits;
37
+ return uintBitsToFloat(bits);
38
+ }`)}function d(t){t.code.add(i`mediump int unpackInt1x16(highp uint bits) {
39
+ highp uint signExtendedBits = (bits & 0x8000u) != 0u ? (bits | 0xffff0000u) : bits;
31
40
  return int(signExtendedBits);
32
- }`)}function d(t){const{fieldType:n}=t;return`${(0,N[n])(v(t))}`}function m(t,n){const e=[];for(let i=0;i<t.length;i+=4){const n=t[i],o=t[i+1],s=t[i+2],a=t[i+3],r=u`unpackFloat1x32(${`${n}, ${o}, ${s}, ${a}`})`;e.push(r)}return e.join(n)}function x(t){return u`vec2(${m(t,", ")})`}function b(t){return u`vec3(${m(t,",\n\t")})`}function g(t){return u`mat3(${m(t,",\n")})`}t([r()],f.prototype,"supportNaN",void 0);const N={u8:t=>u`${t[0]}`,unorm8:t=>u`float(${t[0]})/${u.float(e)}`,vec4unorm8:t=>u`vec4(${`${t[0]}, ${t[1]}, ${t[2]}, ${t[3]}`})/${u.float(e)}`,snorm16:t=>u`max(float(unpackInt1x16(${`${t[0]}, ${t[1]}`}))/${u.float(n)}, -1.0)`,vec2snorm16:t=>u`max(vec2(unpackInt1x16(${`${t[0]}, ${t[1]}`}), unpackInt1x16(${`${t[2]}, ${t[3]}`}))/${u.float(n)}, vec2(-1.0))`,f16:i?t=>u`unpackHalf1x16(${`${t[0]}, ${t[1]}`})`:t=>u`unpackFloat1x32(${`${t[0]}, ${t[1]}, ${t[2]}, ${t[3]}`})`,f32:t=>u`unpackFloat1x32(${`${t[0]}, ${t[1]}, ${t[2]}, ${t[3]}`})`,vec4u8:t=>u`uvec4(${`${t[0]}, ${t[1]}, ${t[2]}, ${t[3]}`})`,vec2f32:t=>x(t),vec3f32:t=>b(t),mat3f32:t=>g(t)};function v(t){const{startTexel:n,byteOffset:e,texelByteStride:i,byteSize:o}=t;let s=n,a=e%i;const r=new Array;for(let c=0;c<o;++c){const t=u`texel${u.int(s)}.${w[a]}`;r.push(t),++a,a>=i&&(a=0,++s)}return r}const w=["x","y","z","w"];export{f as TextureBufferNaNSupportConfiguration,d as glslDecodeField,c as glslType,h as unpackFloat1x32,l as unpackHalf1x16,$ as unpackInt1x16};
41
+ }`)}function h(t,n){const{fieldType:e}=t;return`${(0,g[e])(y(t,n))}`}function m(t,n){const e=[];for(const o of t){const t=i`unpackFloat1x32(${o})`;e.push(t)}return e.join(n)}t([r()],p.prototype,"supportNaN",void 0);const x=t=>i`${t[0]}`,N=t=>{const n=t[0],e=i`uvec4(${i.uint(k[0])}, ${i.uint(k[1])}, ${i.uint(k[2])}, ${i.uint(k[3])})`,o=i`uvec4(${i.hexuint(w[1])})`;return i`((uvec4(${n}) >> ${e}) & ${o})`},$=t=>i`(float(${x(t)})/${i.float(n)})`,b=t=>i`unpackFloat1x32(${t[0]})`,v=t=>i`vec4(${m(t,", ")})`,g={u8:x,unorm8:$,vec4unorm8:t=>i`(vec4(${N(t)})/${i.float(n)})`,snorm16:t=>i`unpackSnorm2x16(${t[0]}).x`,vec2snorm16:t=>i`unpackSnorm2x16(${t[0]})`,f16:e?t=>i`unpackHalf1x16(${t[0]})`:b,vec4f16:e?t=>i`vec4(unpackHalf2x16NaNSupport(${t[0]}), unpackHalf2x16NaNSupport(${t[1]}))`:v,f32:b,vec4u8:N,vec2f32:t=>i`vec2(${m(t,", ")})`,vec3f32:t=>i`vec3(${m(t,", ")})`,vec4f32:v,mat3f32:t=>i`mat3(${m(t,",\n")})`};function y(t,n){const{byteOffset:e,byteSize:o}=t,u=n.channelByteStride,a=n.byteStride,r=Math.ceil(o/E),s=F[n.channels],c=new Array;for(let p=0;p<r;++p){const t=p*E,n=e+t,r=o-t,f=Math.min(r,E);let l=0;const d=new Array;for(;l<f;){const t=n+l,e=Math.floor(t/a),o=t%a,r=Math.floor(o/u),c=o%u,p=u-c,h=f-l,m=Math.min(p,h),x=i`texel${i.int(e)}${s[r]}`,N=4===m?"":i` & ${i.hexuint(w[m])}`,$=0===c?"":i` >> ${i.uint(k[c])}`,b=i`((${x}${$})${N})`,v=0===l?"":i` << ${i.uint(k[l])}`,g=i`(${b})${v}`;d.push(g),l+=m}c.push(i`(${d.join(" | ")})`)}return c}const E=4,k=[0,8,16,24],w=[0,255,65535,16777215,4294967295],F={1:[i``],2:[i`.x`,i`.y`],4:[i`.x`,i`.y`,i`.z`,i`.w`]};export{p as TextureBufferNaNSupportConfiguration,h as glslDecodeField,s as glslType,l as unpackFloat1x32,f as unpackHalf,d as unpackInt1x16};
@@ -5,22 +5,20 @@ import{splatAtlasTextureWidth as e,elementsPerSplatPage as a}from"../../../../su
5
5
  uint x = instanceID % orderTextureWidth;
6
6
  uint y = instanceID / orderTextureWidth;
7
7
 
8
- uvec4 packedGaussianIndex = texelFetch(splatOrderTexture, ivec2(x, y), 0);
9
-
10
- return packedGaussianIndex.r | (packedGaussianIndex.g << 8u) | (packedGaussianIndex.b << 16u);
8
+ return texelFetch(splatOrderTexture, ivec2(x, y), 0).r;
11
9
  }
12
10
 
13
11
  uvec4 fetchPackedGaussian(uint gaussianIndex) {
14
- uint gaussianIndexX = gaussianIndex & ${s}u;
15
- uint gaussianIndexY = gaussianIndex >> ${t}u;
12
+ uint gaussianIndexX = gaussianIndex & ${t}u;
13
+ uint gaussianIndexY = gaussianIndex >> ${s}u;
16
14
 
17
15
  return texelFetch(splatAtlasTexture, ivec2(gaussianIndexX, gaussianIndexY), 0);
18
16
  }
19
17
 
20
18
  uvec4 fetchPackedGaussianHeader(uint gaussianIndex) {
21
19
  uint headerIndex = gaussianIndex | ${u}u;
22
- uint headerIndexX = headerIndex & ${s}u;
23
- uint headerIndexY = headerIndex >> ${t}u;
20
+ uint headerIndexX = headerIndex & ${t}u;
21
+ uint headerIndexY = headerIndex >> ${s}u;
24
22
 
25
23
  return texelFetch(splatAtlasTexture, ivec2(headerIndexX, headerIndexY), 0);
26
24
  }
@@ -35,4 +33,4 @@ import{splatAtlasTextureWidth as e,elementsPerSplatPage as a}from"../../../../su
35
33
  uint fetchGaussianPageIndex(uint gaussianIndex) {
36
34
  return gaussianIndex >> ${d}u;
37
35
  }
38
- `)}const s=""+(e-1),t=`${Math.log2(e)}`,u=""+(a-1),d=`${Math.log2(a)}`;export{i as GaussianSplatTextureFetch};
36
+ `)}const t=""+(e-1),s=`${Math.log2(e)}`,u=""+(a-1),d=`${Math.log2(a)}`;export{i as GaussianSplatTextureFetch};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{SizedPixelFormat as t,PixelType as e}from"../../../../webgl/enums.js";class n{constructor(t){this.internalFormat=t,this.channelByteStride=4,this.dataType=e.UNSIGNED_INT,this.elementArrayConstructor=Uint32Array,this.pixelFormat=s[t],this.channels=r[this.pixelFormat],this.byteStride=this.channelByteStride*this.channels}}const r={36244:1,33320:2,36249:4},s={[t.R32UI]:36244,[t.RG32UI]:33320,[t.RGBA32UI]:36249},i=[new n(t.RGBA32UI),new n(t.RG32UI),new n(t.R32UI)];function o(t){let e=1/0,n=null;for(const r of i){const s=r.byteStride,i=(s-t%s)%s;i<e&&(e=i,n=r)}return n??i[2]}export{n as TexelFormatInfo,o as pickFormat,i as texelSizeFormats};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{hasNativeFloat16Array as e}from"../../../../../geometry/support/float16.js";import{BufferViewMat3f as t,BufferViewVec3f as o,BufferViewVec2f as n,BufferViewFloat as f,BufferViewFloat16 as r,BufferViewVec2Snorm16 as u,BufferViewSnorm16 as m,BufferViewVec4Unorm8 as s,BufferViewUnorm8 as l,BufferViewVec4u8 as i,BufferViewUint8 as p}from"../../../../../geometry/support/buffer/BufferView.js";import{elementTypeSize as w}from"../../../../../geometry/support/buffer/types.js";class a{constructor(e,t,o){this.elementCount=e,this.elementType=t,this.bufferViewConstructor=o,this.byteSize=c(o)}}function c(e){return w(e.ElementType)*e.ElementCount}const y={u8:new a(1,"uint",p),vec4u8:new a(4,"uint",i),unorm8:new a(1,"float",l),vec4unorm8:new a(4,"float",s),snorm16:new a(1,"float",m),vec2snorm16:new a(2,"float",u),f16:new a(1,"float",e?r:f),f32:new a(1,"float",f),vec2f32:new a(2,"float",n),vec3f32:new a(3,"float",o),mat3f32:new a(9,"float",t)};export{a as FieldCreationInfo,y as typeToCreationInfoMap};
2
+ import{hasNativeFloat16Array as e}from"../../../../../geometry/support/float16.js";import{BufferViewMat3f as t,BufferViewVec4f as o,BufferViewVec3f as f,BufferViewVec2f as n,BufferViewFloat as r,BufferViewVec4f16 as u,BufferViewFloat16 as m,BufferViewVec2Snorm16 as s,BufferViewSnorm16 as l,BufferViewVec4Unorm8 as w,BufferViewUnorm8 as a,BufferViewVec4u8 as c,BufferViewUint8 as i}from"../../../../../geometry/support/buffer/BufferView.js";import{elementTypeSize as p}from"../../../../../geometry/support/buffer/types.js";class v{constructor(e,t,o){this.elementCount=e,this.elementType=t,this.bufferViewConstructor=o,this.byteSize=y(o)}}function y(e){return p(e.ElementType)*e.ElementCount}const b={u8:new v(1,"uint",i),vec4u8:new v(4,"uint",c),unorm8:new v(1,"float",a),vec4unorm8:new v(4,"float",w),snorm16:new v(1,"float",l),vec2snorm16:new v(2,"float",s),f16:new v(1,"float",e?m:r),vec4f16:new v(4,"float",e?u:o),f32:new v(1,"float",r),vec2f32:new v(2,"float",n),vec3f32:new v(3,"float",f),vec4f32:new v(4,"float",o),mat3f32:new v(9,"float",t)};export{v as FieldCreationInfo,b as typeToCreationInfoMap};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{typeToCreationInfoMap as e}from"./TextureBackedBufferFieldCreation.js";import{LayoutField as t}from"./TextureBackedBufferLayoutField.js";import{TextureBufferView as r}from"./TextureBufferView.js";class i{constructor(r){this._fields=new Map,this.texelByteStride=4,this.texelElementArrayConstructor=Uint8Array;let i=0;const n=[];for(let t=0;t<r.length;++t){const s=r[t],{type:o}=s,f=e[o];n.push({declaration:s,byteOffset:i,creationInfo:f}),i+=f.byteSize}i=s(i);const o=i,f=this._fields,{texelByteStride:l}=this;for(const{declaration:e,byteOffset:s,creationInfo:a}of n)f.set(e.name,new t(e,s,l,a));this.byteStride=o,this.texelStride=Math.ceil(o/l)}get stride(){return this.byteStride}get fields(){return this._fields}createBuffer(e){return new r(this,e,this.texelElementArrayConstructor)}createView(e,t){return new r(this,e,this.texelElementArrayConstructor,t)}}function s(e){return e+3&-4}export{i as TextureBackedBufferLayout};
2
+ import{pickFormat as e}from"./TexelFormatInfo.js";import{typeToCreationInfoMap as t}from"./TextureBackedBufferFieldCreation.js";import{LayoutField as r}from"./TextureBackedBufferLayoutField.js";import{TextureBufferView as o}from"./TextureBufferView.js";class i{constructor(o){this._fields=new Map;let i=0;const s=[];for(let e=0;e<o.length;++e){const r=o[e],{type:n}=r,f=t[n];s.push({declaration:r,byteOffset:i,creationInfo:f}),i+=f.byteSize}this.texelFormatInfo=e(i);const{texelByteStride:n}=this;i=Math.ceil(i/n)*n;const f=i,l=this._fields;for(const{declaration:e,byteOffset:t,creationInfo:a}of s)l.set(e.name,new r(e,t,n,a));this.byteStride=f,this.texelStride=Math.ceil(f/n)}get texelByteStride(){return this.texelFormatInfo.byteStride}get texelElementArrayConstructor(){return this.texelFormatInfo.elementArrayConstructor}get stride(){return this.byteStride}get fields(){return this._fields}createBuffer(e){return new o(this,e,this.texelElementArrayConstructor)}createView(e,t){return new o(this,e,this.texelElementArrayConstructor,t)}}export{i as TextureBackedBufferLayout};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{getMaxItemCount as t,getItemsRectangle as e}from"./TextureBackedBufferUtils.js";import{SizedPixelFormat as r,PixelType as o}from"../../../../webgl/enums.js";import i from"../../../../webgl/Texture.js";import{TextureDescriptor as s}from"../../../../webgl/TextureDescriptor.js";class n{constructor(n,a,u){this.layout=a;const l="number"!=typeof u,h=l?Math.floor(u.byteLength/a.byteStride):u;if(h>t(n,a))throw new Error(`Cannot allocate TextureBuffer for ${h}. Exceeding hardware texture limits`);const{itemCount:m,itemWidth:f,itemHeight:d}=e(h),{texelStride:c,byteStride:p}=this.layout,y=f*c,x=d;this.itemCount=m,this.byteLength=m*p;const b=new s(y,x);b.samplingMode=9728,b.wrapMode=33071,b.internalFormat=r.RGBA8UI,b.pixelFormat=36249,b.dataType=o.UNSIGNED_BYTE,b.isImmutable=!0,b.hasMipmap=!1,this.texture=new i(n,b),l&&this.setSubData(u)}get sizeBytes(){return this.byteLength}get usedMemory(){return this.byteLength}setSubData(t,e=0,r=0,o=Math.floor((t.byteLength-r)/this.layout.byteStride)){if(0===o)return;const{layout:i,texture:s}=this,{texelStride:n,texelByteStride:a}=i,{width:u}=s.descriptor;if(e+o>this.itemCount)throw new Error("Upload range is outside of texture");const l=o*n;if(l<=0)return;let h=r,m=e*n,f=l;const d=m%u;if(0!==d){const e=new i.texelElementArrayConstructor(t,h),r=d,o=Math.floor(m/u),n=Math.min(f,u-d);s.updateData(0,r,o,n,1,e),m+=n,h+=n*a,f-=n}const c=Math.floor(f/u);if(c>0){const e=new i.texelElementArrayConstructor(t,h),r=0,o=Math.floor(m/u);s.updateData(0,r,o,u,c,e);const n=c*u;m+=n,h+=n*a,f-=n}if(f>0){const e=new i.texelElementArrayConstructor(t,h),r=m%u,o=Math.floor(m/u);s.updateData(0,r,o,f,1,e)}}dispose(){this.texture.dispose()}}export{n as TextureBuffer};
2
+ import{getMaxItemCount as t,getItemsRectangle as e}from"./TextureBackedBufferUtils.js";import r from"../../../../webgl/Texture.js";import{TextureDescriptor as o}from"../../../../webgl/TextureDescriptor.js";class i{constructor(i,a,s){this.layout=a;const n="number"!=typeof s,l=n?Math.floor(s.byteLength/a.byteStride):s;if(l>t(i,a))throw new Error(`Cannot allocate TextureBuffer for ${l}. Exceeding hardware texture limits`);const{itemCount:u,itemWidth:h,itemHeight:m}=e(l),{texelStride:d,byteStride:f}=this.layout,c=h*d,p=m;this.itemCount=u,this.byteLength=u*f;const y=a.texelFormatInfo,x=new o(c,p);x.samplingMode=9728,x.wrapMode=33071,x.internalFormat=y.internalFormat,x.pixelFormat=y.pixelFormat,x.dataType=y.dataType,x.isImmutable=!0,x.hasMipmap=!1,this.texture=new r(i,x),n&&this.setSubData(s)}get sizeBytes(){return this.byteLength}get usedMemory(){return this.byteLength}setSubData(t,e=0,r=0,o=Math.floor((t.byteLength-r)/this.layout.byteStride)){if(0===o)return;const{layout:i,texture:a}=this,{texelStride:s,texelByteStride:n}=i,{width:l}=a.descriptor;if(e+o>this.itemCount)throw new Error("Upload range is outside of texture");const u=o*s;if(u<=0)return;let h=r,m=e*s,d=u;const f=m%l;if(0!==f){const e=new i.texelElementArrayConstructor(t,h),r=f,o=Math.floor(m/l),s=Math.min(d,l-f);a.updateData(0,r,o,s,1,e),m+=s,h+=s*n,d-=s}const c=Math.floor(d/l);if(c>0){const e=new i.texelElementArrayConstructor(t,h),r=0,o=Math.floor(m/l);a.updateData(0,r,o,l,c,e);const s=c*l;m+=s,h+=s*n,d-=s}if(d>0){const e=new i.texelElementArrayConstructor(t,h),r=m%l,o=Math.floor(m/l);a.updateData(0,r,o,d,1,e)}}dispose(){this.texture.dispose()}}export{i as TextureBuffer};
@@ -1,18 +1,18 @@
1
- import type AnnotationLayer from "../../layers/AnnotationLayer.js";
1
+ import type AnnotationFeatureLayer from "../../layers/AnnotationFeatureLayer.js";
2
2
  import type FeatureLikeLayerView from "./FeatureLikeLayerView.js";
3
3
 
4
4
  /**
5
- * Represents the [LayerView](https://developers.arcgis.com/javascript/latest/references/core/views/layers/LayerView/) of a [AnnotationLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/AnnotationLayer/)
5
+ * Represents the [LayerView](https://developers.arcgis.com/javascript/latest/references/core/views/layers/LayerView/) of a [AnnotationFeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/AnnotationFeatureLayer/)
6
6
  * after it has been added to a [Map](https://developers.arcgis.com/javascript/latest/references/core/Map/) in either a [MapView](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/) or
7
7
  * [SceneView](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/).
8
8
  *
9
- * The AnnotationLayerView is responsible for rendering a [AnnotationLayer's](https://developers.arcgis.com/javascript/latest/references/core/layers/AnnotationLayer/)
9
+ * The AnnotationFeatureLayerView is responsible for rendering a [AnnotationFeatureLayer's](https://developers.arcgis.com/javascript/latest/references/core/layers/AnnotationFeatureLayer/)
10
10
  * features as [graphics](https://developers.arcgis.com/javascript/latest/references/core/Graphic/) in the [View](https://developers.arcgis.com/javascript/latest/references/core/views/View/).
11
11
  *
12
12
  * @since 5.1
13
- * @see [AnnotationLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/AnnotationLayer/)
13
+ * @see [AnnotationFeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/AnnotationFeatureLayer/)
14
14
  */
15
- export default abstract class AnnotationLayerView extends FeatureLikeLayerView {
15
+ export default abstract class AnnotationFeatureLayerView extends FeatureLikeLayerView {
16
16
  /** The layer being viewed. */
17
- get layer(): AnnotationLayer;
17
+ get layer(): AnnotationFeatureLayer;
18
18
  }
@@ -1,5 +1,5 @@
1
1
  import type Graphic from "../../Graphic.js";
2
- import type AnnotationLayer from "../../layers/AnnotationLayer.js";
2
+ import type AnnotationFeatureLayer from "../../layers/AnnotationFeatureLayer.js";
3
3
  import type CSVLayer from "../../layers/CSVLayer.js";
4
4
  import type DimensionFeatureLayer from "../../layers/DimensionFeatureLayer.js";
5
5
  import type FeatureLayer from "../../layers/FeatureLayer.js";
@@ -44,7 +44,7 @@ import type { FeatureFilterProperties } from "../../layers/support/FeatureFilter
44
44
  * @see [WFSLayerView](https://developers.arcgis.com/javascript/latest/references/core/views/layers/WFSLayerView/)
45
45
  * @see [KnowledgeGraphSublayerView](https://developers.arcgis.com/javascript/latest/references/core/views/layers/KnowledgeGraphSublayerView/)
46
46
  */
47
- export type FeatureLikeLayerViewLayer = AnnotationLayer | CatalogFootprintLayer | CSVLayer | FeatureLayer | GeoJSONLayer | OGCFeatureLayer | OrientedImageryLayer | ParquetLayer | StreamLayer | SubtypeGroupLayer | WFSLayer | KnowledgeGraphSublayer | DimensionFeatureLayer;
47
+ export type FeatureLikeLayerViewLayer = AnnotationFeatureLayer | CatalogFootprintLayer | CSVLayer | FeatureLayer | GeoJSONLayer | OGCFeatureLayer | OrientedImageryLayer | ParquetLayer | StreamLayer | SubtypeGroupLayer | WFSLayer | KnowledgeGraphSublayer | DimensionFeatureLayer;
48
48
 
49
49
  /** @since 5.0 */
50
50
  export default abstract class FeatureLikeLayerView extends LayerView {
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import"../../core/has.js";import t from"../../core/Logger.js";import{getOrCreateMapValue as i}from"../../core/MapUtils.js";import{throwIfAborted as r}from"../../core/promiseUtils.js";import{watch as s,syncAndInitial as l,on as n,whenOnce as a}from"../../core/reactiveUtils.js";import{sqlOr as o,sqlIn as u,sqlAnd as d}from"../../core/sql.js";import{property as p,subclass as f}from"../../core/accessorSupport/decorators.js";import{getPopupProvider as h}from"../../graphic/getPopupProvider.js";import{getFeatureIdInfoFieldNames as y}from"../../layers/graphics/data/FeatureIdInfo.js";import{systemIsSpatialFieldName as m}from"../../layers/knowledgeGraph/constants.js";import{getEffectiveDisplayFilter as c}from"../../layers/support/displayFilterUtils.js";import F from"../../layers/support/FeatureEffect.js";import g from"../../layers/support/FeatureFilter.js";import{getSignedInUser as I,layerRequiresGeometryZM as b}from"../../layers/support/featureLayerUtils.js";import{fetchFeaturePopupFeatures as v,loadFeaturePopupArcadeModules as w}from"../../layers/support/featurePopupQueryUtils.js";import{fixFields as x,unpackFieldNames as E,collectLabelingFields as R,collectElevationFields as q,collectFilterFields as _,collectFeatureReductionFields as j,collectOrderByInfos as O,collectFields as C,collectTrackInfoFields as k,collectDisplayFilterFields as Z,collectField as M,featureHasFields as U}from"../../layers/support/fieldUtils.js";import{getFloorFilterClause as P}from"../../layers/support/floorFilterUtils.js";import{collectRelativeTimeFields as T}from"../../layers/support/relativeTimeQueryUtils.js";import{getUtilityNetworkFields as L}from"../../networks/support/networkFieldUtils.js";import S from"../../rest/support/Query.js";import{createFeatureIdInfo as D}from"../2d/layers/features/layerAdapters/featureServiceUtils.js";import N from"./LayerView.js";import{getFetchPopupTemplate as Q,getRequiredFields as H}from"./support/popupUtils.js";import{WhereClauseVisitor as B}from"./support/WhereClauseVisitor.js";let G=class extends N{constructor(){super(...arguments),this._updatingRequiredPromise=null,this._defaultReturnZ=!1,this.hasZ=!1,this.hasM=!1,this.filter=null,this.layer=null,this.requiresCurrentUser=!1,this.requiredFields=[],this.view=null}initialize(){this.addHandles([s(()=>{const e=this.layer,t=this.view;return[e&&"elevationInfo"in e?e.elevationInfo?.featureExpressionInfo:null,e&&"displayField"in e?e.displayField:null,e&&"timeInfo"in e&&e.timeInfo,e&&"renderer"in e&&e.renderer,e&&"returnZ"in e&&e.returnZ,e&&"returnM"in e&&e.returnM,e&&"capabilities"in e&&e.capabilities,e&&"labelingInfo"in e&&e.labelingInfo,e&&"floorInfo"in e&&e.floorInfo,t?.requiredFieldsOptions?.featureTitleFields&&e&&"featureTitleFields"in e&&e.featureTitleFields,t?.requiredFieldsOptions?.utilityNetworkFields&&L(t,e),e&&"displayFilterInfo"in e&&e.displayFilterInfo,this.displayFilterEnabled,this.filter,this.featureEffect,this.timeExtent,"knowledge-graph-sublayer"===e?.type&&"link-chart"===e.parentCompositeLayer?.type&&e.parentCompositeLayer.linkChart?.linkChartProperties.nonspatialDataDisplay?.mode]},()=>this._handleChange(),l),n(()=>this.view?.floors,"change",()=>this._handleChange()),n(()=>(this.layer&&"displayFilterInfo"in this.layer?this.layer.displayFilterInfo:null)?.filters,"change",()=>this._handleChange()),n(()=>this.layer&&"sublayers"in this.layer?this.layer.sublayers:null,"change",()=>this._handleChange())])}get availableFields(){if(!this.layer)return[];const{layer:e,layer:{fieldsIndex:t},requiredFields:i}=this;return"outFields"in e&&e.outFields?x(t,[...E(t,e.outFields),...i]):x(t,i)}get displayFilterEnabled(){return(this.view?.displayFilterEnabled??!0)&&(!("displayFilterEnabled"in this.layer)||(this.layer?.displayFilterEnabled??!0))}get effectiveDisplayFilter(){const e=this.layer;return"displayFilterInfo"in e&&this.displayFilterEnabled&&e.displayFilterInfo?c(e.displayFilterInfo,this.view):null}get effectiveDisplayFilterClause(){const e=this.effectiveDisplayFilter?.where??null;return e&&this.hasHighlight?o(e,u(this.layer.objectIdField,this.highlightIds)):e}get featureEffect(){return this.layer&&"featureEffect"in this.layer?this.layer.featureEffect:null}set featureEffect(e){this._override("featureEffect",e)}get highlightOptions(){}set highlightOptions(e){}get maximumNumberOfFeatures(){return 0}set maximumNumberOfFeatures(e){t.getLogger(this).error("#maximumNumberOfFeatures=","Setting maximum number of features is not supported")}get maximumNumberOfFeaturesExceeded(){return!1}get signedInUser(){return this.layer?.url?I(this.layer.url):Promise.resolve(null)}createQuery(){const e={outFields:["*"],returnGeometry:!0,outSpatialReference:this.view.spatialReference},t=null!=this.filter?this.filter.createQuery(e):new S(e);if("floorInfo"in this.layer&&this.layer.floorInfo&&(t.where=d(t.where,P(this))),this.displayFilterEnabled&&(t.where=d(t.where,this.effectiveDisplayFilter?.where)),null!=this.timeExtent&&(t.timeExtent=null!=t.timeExtent?t.timeExtent.intersection(this.timeExtent):this.timeExtent.clone()),"capabilities"in this.layer){const e=this.layer.capabilities?.data;"returnZ"in this.layer&&e?.supportsZ&&null!=this.layer.returnZ&&(t.returnZ=this.layer.returnZ),"returnM"in this.layer&&e?.supportsM&&null!=this.layer.returnM&&(t.returnM=this.layer.returnM)}return t}createAggregateQuery(){const e={outFields:["*"],returnGeometry:!0,outSpatialReference:this.view.spatialReference};return new S(e)}async patchFeaturesForPopup(e,t){const r=[],s=new Set,l=new Map;for(const a of e){const e=i(l,a.origin,()=>{const e=h(a.origin);return Q(e,{...t,checkPopupEnabled:!0})});e&&(r.push(a),s.add(e))}if(0===r.length||0===s.size)return[];const n=await this._createPopupQuery(s,t);return await v(this.layer,r,n,{hasRequiredFields:(e,t)=>this._popupFeatureHasRequiredFields(e,t),...t})}_handleChange(){const e=Promise.all([a(()=>!("reloading"in this.layer&&this.layer.reloading)),this._updateRequiredFields(),this._updateClientWhereClauseRequirements(),this._updateHasZM()]).then(()=>{});return this._updatingRequiredPromise=e,e.then(()=>{this._updatingRequiredPromise===e&&(this._updatingRequiredPromise=null)}),e}async _updateClientWhereClauseRequirements(){if(!this.layer||!this.view)return;const{layer:e}=this,i=new B(e.fieldsIndex);if(i.visitFilter(this.filter),"featureReduction"in e&&i.visitFeatureReduction(e.featureReduction),"labelingInfo"in e&&i.visitLabelingInfo(e.labelsVisible,e.labelingInfo),"trackInfo"in e&&i.visitTrackInfo(e.trackInfo),"2d"===this.view.type&&(i.visitFilter(this.featureEffect?.filter),"featureReduction"in e&&i.visitFeatureReduction(e.featureReduction),"displayFilterInfo"in e&&i.visitDisplayFilter(this.displayFilterEnabled,e.displayFilterInfo)),"subtype-group"===e.type)for(const t of e.sublayers)i.visitLabelingInfo(t.labelsVisible,t.labelingInfo);"definitionExpression"in e&&"capabilities"in e&&e.capabilities?.query.relativeTimeBinWindow&&i.visitRelativeTimeQuery(e.definitionExpression);try{const e=await i.finish();this._set("requiresCurrentUser",e.requiresCurrentUser)}catch(r){t.getLogger(this).error(r)}}async _updateRequiredFields(){if(!this.layer||!this.view)return;const e="3d"===this.view.type,{layer:i,layer:{fieldsIndex:r}}=this,s="renderer"in i&&i.renderer,l="orderBy"in i&&i.orderBy,n="featureReduction"in i?i.featureReduction:null,a=new Set,o=[s?s.collectRequiredFields(a,r):null,R(a,i),e&&"elevationInfo"in i?q(a,i):null,null!=this.filter?_(a,i,this.filter):null,e||null==this.featureEffect?null:_(a,i,this.featureEffect.filter),!e&&n?j(a,i,n):null,!e&&l?O(a,i,l):null,"definitionExpression"in i&&"capabilities"in i&&i.capabilities?.query.relativeTimeBinWindow?T(a,i.fieldsIndex,i.definitionExpression):null];if("timeInfo"in i&&i.timeInfo&&this.timeExtent&&C(a,i.fieldsIndex,[i.timeInfo.startField,i.timeInfo.endField]),"timeInfo"in i&&i.timeInfo&&"trackInfo"in i&&i.trackInfo){const{trackInfo:e}=i;C(a,i.fieldsIndex,[i.timeInfo.trackIdField]),"feature"!==i.type&&"startTimeField"!==e.timeField||C(a,i.fieldsIndex,[i.timeInfo.startField]),"endTimeField"===e.timeField&&C(a,i.fieldsIndex,[i.timeInfo.endField]),await k(a,i)}if("floorInfo"in i&&i.floorInfo&&C(a,i.fieldsIndex,[i.floorInfo.floorField]),"featureTitleFields"in i&&this.view?.requiredFieldsOptions?.featureTitleFields&&i.featureTitleFields&&C(a,i.fieldsIndex,i.featureTitleFields),"feature"===i.type&&i.globalIdField&&this.view?.requiredFieldsOptions?.globalIdField&&C(a,i.fieldsIndex,[i.globalIdField]),"feature"!==i.type&&"subtype-group"!==i.type||!this.view?.requiredFieldsOptions?.utilityNetworkFields||C(a,i.fieldsIndex,L(this.view,i)),this.displayFilterEnabled&&"displayFilterInfo"in i&&o.push(Z(a,i,i.displayFilterInfo)),"feature"===i.type&&e&&null!=i.infoFor3D&&(null==i.globalIdField&&t.getLogger(this).error("globalIdField missing on 3DObjectFeatureLayer"),C(a,i.fieldsIndex,[i.globalIdField])),"subtype-group"===i.type){M(a,r,i.subtypeField);const e=i.sublayers.map(e=>Promise.all([e.renderer?.collectRequiredFields(a,r),R(a,e)]));o.push(Promise.all(e))}if("annotation"===i.type&&M(a,r,i.subtypeField),"catalog-footprint"===i.type&&i.parent){const e=i.parent;C(a,r,[e.itemNameField,e.itemSourceField,e.itemTypeField,e.maxScaleField,e.minScaleField])}"knowledge-graph-sublayer"===i.type&&"link-chart"===i.parentCompositeLayer?.type&&M(a,r,m);const u=await Promise.allSettled(o);if(e)M(a,r,i.objectIdField);else for(const t of y(D(i)))M(a,r,t);e&&"displayField"in i&&i.displayField&&M(a,r,i.displayField);for(const p of u)"rejected"===p.status&&t.getLogger(this).error(p.reason);const d=Array.from(a).sort();this._set("requiredFields",d)}async _updateHasZM(){const{layer:e}=this;if(!e||!this.view)return;let t=!1,i=!1;if("capabilities"in e&&e.capabilities){const{data:r}=e.capabilities;t=r.supportsZ,i=r.supportsM}this._set("hasZ",t),this._set("hasM",i);const{returnZ:r,returnM:s}=await b(e);t&&=r??this._defaultReturnZ,i&&=s??!1,this.hasZ!==t&&this._set("hasZ",t),this.hasM!==i&&this._set("hasM",i)}_popupFeatureHasRequiredFields(e,t){return U(e,t)}async _createPopupQuery(e,t){const i=this.layer.createQuery(),s=new Set;let l="point"===this.layer.geometryType;for(const n of e){if(!l){const e=await w(n);r(t),l=(e&&e.arcadeUtils.hasGeometryOperations(n))??!1}const e=await H(this.layer,n);r(t);for(const t of e)s.add(t)}return i.where="1=1",i.returnGeometry=l,i.returnZ=l,i.returnM=l,i.outFields=Array.from(s),i.outSpatialReference=this.view.spatialReference,"floorInfo"in this.layer&&this.layer.floorInfo&&(i.where=d(i.where,P(this))),i}canResume(){return!!super.canResume()&&(null==this.timeExtent||!this.timeExtent.isEmpty)}getTest(){}get test(){}};e([p()],G.prototype,"_updatingRequiredPromise",void 0),e([p()],G.prototype,"_defaultReturnZ",void 0),e([p({readOnly:!0})],G.prototype,"availableFields",null),e([p({readOnly:!0})],G.prototype,"hasZ",void 0),e([p({readOnly:!0})],G.prototype,"hasM",void 0),e([p({readOnly:!0})],G.prototype,"displayFilterEnabled",null),e([p({readOnly:!0})],G.prototype,"effectiveDisplayFilter",null),e([p({readOnly:!0})],G.prototype,"effectiveDisplayFilterClause",null),e([p({type:F})],G.prototype,"featureEffect",null),e([p({type:g})],G.prototype,"filter",void 0),e([p()],G.prototype,"layer",void 0),e([p({type:Number})],G.prototype,"maximumNumberOfFeatures",null),e([p({readOnly:!0,type:Boolean})],G.prototype,"maximumNumberOfFeaturesExceeded",null),e([p()],G.prototype,"requiresCurrentUser",void 0),e([p({readOnly:!0})],G.prototype,"requiredFields",void 0),e([p({readOnly:!0})],G.prototype,"signedInUser",null),e([p()],G.prototype,"view",void 0),G=e([f("esri.views.layers.FeatureLikeLayerView")],G);const V=G;export{V as default};
2
+ import{__decorate as e}from"tslib";import"../../core/has.js";import t from"../../core/Logger.js";import{getOrCreateMapValue as i}from"../../core/MapUtils.js";import{throwIfAborted as r}from"../../core/promiseUtils.js";import{watch as s,syncAndInitial as l,on as n,whenOnce as a}from"../../core/reactiveUtils.js";import{sqlOr as o,sqlIn as u,sqlAnd as d}from"../../core/sql.js";import{property as p,subclass as f}from"../../core/accessorSupport/decorators.js";import{getPopupProvider as h}from"../../graphic/getPopupProvider.js";import{getFeatureIdInfoFieldNames as y}from"../../layers/graphics/data/FeatureIdInfo.js";import{systemIsSpatialFieldName as m}from"../../layers/knowledgeGraph/constants.js";import{getEffectiveDisplayFilter as c}from"../../layers/support/displayFilterUtils.js";import F from"../../layers/support/FeatureEffect.js";import g from"../../layers/support/FeatureFilter.js";import{getSignedInUser as I,layerRequiresGeometryZM as b}from"../../layers/support/featureLayerUtils.js";import{fetchFeaturePopupFeatures as v,loadFeaturePopupArcadeModules as w}from"../../layers/support/featurePopupQueryUtils.js";import{fixFields as x,unpackFieldNames as E,collectLabelingFields as R,collectElevationFields as q,collectFilterFields as _,collectFeatureReductionFields as j,collectOrderByInfos as O,collectFields as C,collectTrackInfoFields as k,collectDisplayFilterFields as Z,collectField as M,featureHasFields as U}from"../../layers/support/fieldUtils.js";import{getFloorFilterClause as P}from"../../layers/support/floorFilterUtils.js";import{collectRelativeTimeFields as T}from"../../layers/support/relativeTimeQueryUtils.js";import{getUtilityNetworkFields as L}from"../../networks/support/networkFieldUtils.js";import S from"../../rest/support/Query.js";import{createFeatureIdInfo as D}from"../2d/layers/features/layerAdapters/featureServiceUtils.js";import N from"./LayerView.js";import{getFetchPopupTemplate as Q,getRequiredFields as H}from"./support/popupUtils.js";import{WhereClauseVisitor as B}from"./support/WhereClauseVisitor.js";let G=class extends N{constructor(){super(...arguments),this._updatingRequiredPromise=null,this._defaultReturnZ=!1,this.hasZ=!1,this.hasM=!1,this.filter=null,this.layer=null,this.requiresCurrentUser=!1,this.requiredFields=[],this.view=null}initialize(){this.addHandles([s(()=>{const e=this.layer,t=this.view;return[e&&"elevationInfo"in e?e.elevationInfo?.featureExpressionInfo:null,e&&"displayField"in e?e.displayField:null,e&&"timeInfo"in e&&e.timeInfo,e&&"renderer"in e&&e.renderer,e&&"returnZ"in e&&e.returnZ,e&&"returnM"in e&&e.returnM,e&&"capabilities"in e&&e.capabilities,e&&"labelingInfo"in e&&e.labelingInfo,e&&"floorInfo"in e&&e.floorInfo,t?.requiredFieldsOptions?.featureTitleFields&&e&&"featureTitleFields"in e&&e.featureTitleFields,t?.requiredFieldsOptions?.utilityNetworkFields&&L(t,e),e&&"displayFilterInfo"in e&&e.displayFilterInfo,this.displayFilterEnabled,this.filter,this.featureEffect,this.timeExtent,"knowledge-graph-sublayer"===e?.type&&"link-chart"===e.parentCompositeLayer?.type&&e.parentCompositeLayer.linkChart?.linkChartProperties.nonspatialDataDisplay?.mode]},()=>this._handleChange(),l),n(()=>this.view?.floors,"change",()=>this._handleChange()),n(()=>(this.layer&&"displayFilterInfo"in this.layer?this.layer.displayFilterInfo:null)?.filters,"change",()=>this._handleChange()),n(()=>this.layer&&"sublayers"in this.layer?this.layer.sublayers:null,"change",()=>this._handleChange())])}get availableFields(){if(!this.layer)return[];const{layer:e,layer:{fieldsIndex:t},requiredFields:i}=this;return"outFields"in e&&e.outFields?x(t,[...E(t,e.outFields),...i]):x(t,i)}get displayFilterEnabled(){return(this.view?.displayFilterEnabled??!0)&&(!("displayFilterEnabled"in this.layer)||(this.layer?.displayFilterEnabled??!0))}get effectiveDisplayFilter(){const e=this.layer;return"displayFilterInfo"in e&&this.displayFilterEnabled&&e.displayFilterInfo?c(e.displayFilterInfo,this.view):null}get effectiveDisplayFilterClause(){const e=this.effectiveDisplayFilter?.where??null;return e&&this.hasHighlight?o(e,u(this.layer.objectIdField,this.highlightIds)):e}get featureEffect(){return this.layer&&"featureEffect"in this.layer?this.layer.featureEffect:null}set featureEffect(e){this._override("featureEffect",e)}get highlightOptions(){}set highlightOptions(e){}get maximumNumberOfFeatures(){return 0}set maximumNumberOfFeatures(e){t.getLogger(this).error("#maximumNumberOfFeatures=","Setting maximum number of features is not supported")}get maximumNumberOfFeaturesExceeded(){return!1}get signedInUser(){return this.layer?.url?I(this.layer.url):Promise.resolve(null)}createQuery(){const e={outFields:["*"],returnGeometry:!0,outSpatialReference:this.view.spatialReference},t=null!=this.filter?this.filter.createQuery(e):new S(e);if("floorInfo"in this.layer&&this.layer.floorInfo&&(t.where=d(t.where,P(this))),this.displayFilterEnabled&&(t.where=d(t.where,this.effectiveDisplayFilter?.where)),null!=this.timeExtent&&(t.timeExtent=null!=t.timeExtent?t.timeExtent.intersection(this.timeExtent):this.timeExtent.clone()),"capabilities"in this.layer){const e=this.layer.capabilities?.data;"returnZ"in this.layer&&e?.supportsZ&&null!=this.layer.returnZ&&(t.returnZ=this.layer.returnZ),"returnM"in this.layer&&e?.supportsM&&null!=this.layer.returnM&&(t.returnM=this.layer.returnM)}return t}createAggregateQuery(){const e={outFields:["*"],returnGeometry:!0,outSpatialReference:this.view.spatialReference};return new S(e)}async patchFeaturesForPopup(e,t){const r=[],s=new Set,l=new Map;for(const a of e){const e=i(l,a.origin,()=>{const e=h(a.origin);return Q(e,{...t,checkPopupEnabled:!0})});e&&(r.push(a),s.add(e))}if(0===r.length||0===s.size)return[];const n=await this._createPopupQuery(s,t);return await v(this.layer,r,n,{hasRequiredFields:(e,t)=>this._popupFeatureHasRequiredFields(e,t),...t})}_handleChange(){const e=Promise.all([a(()=>!("reloading"in this.layer&&this.layer.reloading)),this._updateRequiredFields(),this._updateClientWhereClauseRequirements(),this._updateHasZM()]).then(()=>{});return this._updatingRequiredPromise=e,e.then(()=>{this._updatingRequiredPromise===e&&(this._updatingRequiredPromise=null)}),e}async _updateClientWhereClauseRequirements(){if(!this.layer||!this.view)return;const{layer:e}=this,i=new B(e.fieldsIndex);if(i.visitFilter(this.filter),"featureReduction"in e&&i.visitFeatureReduction(e.featureReduction),"labelingInfo"in e&&i.visitLabelingInfo(e.labelsVisible,e.labelingInfo),"trackInfo"in e&&i.visitTrackInfo(e.trackInfo),"2d"===this.view.type&&(i.visitFilter(this.featureEffect?.filter),"featureReduction"in e&&i.visitFeatureReduction(e.featureReduction),"displayFilterInfo"in e&&i.visitDisplayFilter(this.displayFilterEnabled,e.displayFilterInfo)),"subtype-group"===e.type)for(const t of e.sublayers)i.visitLabelingInfo(t.labelsVisible,t.labelingInfo);"definitionExpression"in e&&"capabilities"in e&&e.capabilities?.query.relativeTimeBinWindow&&i.visitRelativeTimeQuery(e.definitionExpression);try{const e=await i.finish();this._set("requiresCurrentUser",e.requiresCurrentUser)}catch(r){t.getLogger(this).error(r)}}async _updateRequiredFields(){if(!this.layer||!this.view)return;const e="3d"===this.view.type,{layer:i,layer:{fieldsIndex:r}}=this,s="renderer"in i&&i.renderer,l="orderBy"in i&&i.orderBy,n="featureReduction"in i?i.featureReduction:null,a=new Set,o=[s?s.collectRequiredFields(a,r):null,R(a,i),e&&"elevationInfo"in i?q(a,i):null,null!=this.filter?_(a,i,this.filter):null,e||null==this.featureEffect?null:_(a,i,this.featureEffect.filter),!e&&n?j(a,i,n):null,!e&&l?O(a,i,l):null,"definitionExpression"in i&&"capabilities"in i&&i.capabilities?.query.relativeTimeBinWindow?T(a,i.fieldsIndex,i.definitionExpression):null];if("timeInfo"in i&&i.timeInfo&&this.timeExtent&&C(a,i.fieldsIndex,[i.timeInfo.startField,i.timeInfo.endField]),"timeInfo"in i&&i.timeInfo&&"trackInfo"in i&&i.trackInfo){const{trackInfo:e}=i;C(a,i.fieldsIndex,[i.timeInfo.trackIdField]),"feature"!==i.type&&"startTimeField"!==e.timeField||C(a,i.fieldsIndex,[i.timeInfo.startField]),"endTimeField"===e.timeField&&C(a,i.fieldsIndex,[i.timeInfo.endField]),await k(a,i)}if("floorInfo"in i&&i.floorInfo&&C(a,i.fieldsIndex,[i.floorInfo.floorField]),"featureTitleFields"in i&&this.view?.requiredFieldsOptions?.featureTitleFields&&i.featureTitleFields&&C(a,i.fieldsIndex,i.featureTitleFields),"feature"===i.type&&i.globalIdField&&this.view?.requiredFieldsOptions?.globalIdField&&C(a,i.fieldsIndex,[i.globalIdField]),"feature"!==i.type&&"subtype-group"!==i.type||!this.view?.requiredFieldsOptions?.utilityNetworkFields||C(a,i.fieldsIndex,L(this.view,i)),this.displayFilterEnabled&&"displayFilterInfo"in i&&o.push(Z(a,i,i.displayFilterInfo)),"feature"===i.type&&e&&null!=i.infoFor3D&&(null==i.globalIdField&&t.getLogger(this).error("globalIdField missing on 3DObjectFeatureLayer"),C(a,i.fieldsIndex,[i.globalIdField])),"subtype-group"===i.type){M(a,r,i.subtypeField);const e=i.sublayers.map(e=>Promise.all([e.renderer?.collectRequiredFields(a,r),R(a,e)]));o.push(Promise.all(e))}if("annotation-feature"===i.type&&M(a,r,i.subtypeField),"catalog-footprint"===i.type&&i.parent){const e=i.parent;C(a,r,[e.itemNameField,e.itemSourceField,e.itemTypeField,e.maxScaleField,e.minScaleField])}"knowledge-graph-sublayer"===i.type&&"link-chart"===i.parentCompositeLayer?.type&&M(a,r,m);const u=await Promise.allSettled(o);if(e)M(a,r,i.objectIdField);else for(const t of y(D(i)))M(a,r,t);e&&"displayField"in i&&i.displayField&&M(a,r,i.displayField);for(const p of u)"rejected"===p.status&&t.getLogger(this).error(p.reason);const d=Array.from(a).sort();this._set("requiredFields",d)}async _updateHasZM(){const{layer:e}=this;if(!e||!this.view)return;let t=!1,i=!1;if("capabilities"in e&&e.capabilities){const{data:r}=e.capabilities;t=r.supportsZ,i=r.supportsM}this._set("hasZ",t),this._set("hasM",i);const{returnZ:r,returnM:s}=await b(e);t&&=r??this._defaultReturnZ,i&&=s??!1,this.hasZ!==t&&this._set("hasZ",t),this.hasM!==i&&this._set("hasM",i)}_popupFeatureHasRequiredFields(e,t){return U(e,t)}async _createPopupQuery(e,t){const i=this.layer.createQuery(),s=new Set;let l="point"===this.layer.geometryType;for(const n of e){if(!l){const e=await w(n);r(t),l=(e&&e.arcadeUtils.hasGeometryOperations(n))??!1}const e=await H(this.layer,n);r(t);for(const t of e)s.add(t)}return i.where="1=1",i.returnGeometry=l,i.returnZ=l,i.returnM=l,i.outFields=Array.from(s),i.outSpatialReference=this.view.spatialReference,"floorInfo"in this.layer&&this.layer.floorInfo&&(i.where=d(i.where,P(this))),i}canResume(){return!!super.canResume()&&(null==this.timeExtent||!this.timeExtent.isEmpty)}getTest(){}get test(){}};e([p()],G.prototype,"_updatingRequiredPromise",void 0),e([p()],G.prototype,"_defaultReturnZ",void 0),e([p({readOnly:!0})],G.prototype,"availableFields",null),e([p({readOnly:!0})],G.prototype,"hasZ",void 0),e([p({readOnly:!0})],G.prototype,"hasM",void 0),e([p({readOnly:!0})],G.prototype,"displayFilterEnabled",null),e([p({readOnly:!0})],G.prototype,"effectiveDisplayFilter",null),e([p({readOnly:!0})],G.prototype,"effectiveDisplayFilterClause",null),e([p({type:F})],G.prototype,"featureEffect",null),e([p({type:g})],G.prototype,"filter",void 0),e([p()],G.prototype,"layer",void 0),e([p({type:Number})],G.prototype,"maximumNumberOfFeatures",null),e([p({readOnly:!0,type:Boolean})],G.prototype,"maximumNumberOfFeaturesExceeded",null),e([p()],G.prototype,"requiresCurrentUser",void 0),e([p({readOnly:!0})],G.prototype,"requiredFields",void 0),e([p({readOnly:!0})],G.prototype,"signedInUser",null),e([p()],G.prototype,"view",void 0),G=e([f("esri.views.layers.FeatureLikeLayerView")],G);const V=G;export{V as default};
@@ -1,7 +1,10 @@
1
1
  import type { JSONSupport } from "../../core/JSONSupport.js";
2
2
 
3
3
  /** @since 5.0 */
4
- export interface FloorFilterProperties extends Partial<Pick<FloorFilter, "enabled" | "facility" | "level" | "longNames" | "minimized" | "pinnedLevels" | "site" | "useVerticalOrder">> {}
4
+ export interface FloorFilterProperties extends Partial<Pick<FloorFilter, "enabled" | "facility" | "floorVisibilityMode" | "level" | "longNames" | "minimized" | "pinnedLevels" | "site" | "useVerticalOrder">> {}
5
+
6
+ /** @since 5.1 */
7
+ export type FloorVisibilityMode = "belowSelected" | "selectedOnly";
5
8
 
6
9
  /**
7
10
  * Floor filtering is controlled by a configurable [floor filter](https://developers.arcgis.com/javascript/latest/references/core/widgets/FloorFilter/). Those configurations are
@@ -24,6 +27,16 @@ export default class FloorFilter extends JSONSupport {
24
27
  * @since 5.0
25
28
  */
26
29
  accessor facility: string | null | undefined;
30
+ /**
31
+ * Indicates whether the floor filter should display the selected floor and all floors below it or only the selected floor.
32
+ *
33
+ * > [!NOTE]
34
+ * > Floor Visibility mode is only applicable in web scenes.
35
+ *
36
+ * @default "selectedOnly"
37
+ * @since 5.1
38
+ */
39
+ accessor floorVisibilityMode: FloorVisibilityMode;
27
40
  /**
28
41
  * Contains the level ID for the initially selected [floor](https://developers.arcgis.com/javascript/latest/references/core/widgets/FloorFilter/#level), which is used when filtering layers by their configured floor-aware properties.
29
42
  *