@arcgis/core 4.34.0-next.57 → 4.34.0-next.58

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 (264) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/00ee6f84119bc55a222f.js +1 -0
  3. package/assets/esri/core/workers/chunks/06b65105b15abf4d0fbf.js +1 -0
  4. package/assets/esri/core/workers/chunks/{02902303e5585a16ebea.js → 0b53bc76d38e85902748.js} +1 -1
  5. package/assets/esri/core/workers/chunks/{9b5e04d87116ce2b68b2.js → 0e4976f92b66793137c4.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{76ff7ccfe583927918f3.js → 0fb2dcbd54175e75d94d.js} +14 -12
  7. package/assets/esri/core/workers/chunks/14c6461ffd36319e1d74.js +1 -0
  8. package/assets/esri/core/workers/chunks/1612d1c1d78c122dfef6.js +1 -0
  9. package/assets/esri/core/workers/chunks/17abab49db1813d3e192.js +1 -0
  10. package/assets/esri/core/workers/chunks/182383fd00008606bfaa.js +1 -0
  11. package/assets/esri/core/workers/chunks/18f878ec695617650a96.js +1 -0
  12. package/assets/esri/core/workers/chunks/{d578c3880eaf2dd62324.js → 19e5e011f929b6b940fe.js} +1 -1
  13. package/assets/esri/core/workers/chunks/1c61cf137a989bc52bb8.js +1 -0
  14. package/assets/esri/core/workers/chunks/{dd2b5f115d156b5b212e.js → 22ec2b0a853911692dc8.js} +1 -1
  15. package/assets/esri/core/workers/chunks/232c76f122b1f519e099.js +1 -0
  16. package/assets/esri/core/workers/chunks/26975e5b3fb7f2ed45a4.js +1 -0
  17. package/assets/esri/core/workers/chunks/27334cda1b877abcba1b.js +1 -0
  18. package/assets/esri/core/workers/chunks/{9fef330b241f958b55df.js → 2cd27b06226e30aec5da.js} +1 -1
  19. package/assets/esri/core/workers/chunks/327b0da744426ce40e60.js +1 -0
  20. package/assets/esri/core/workers/chunks/373c9e17e2834dfc1839.js +1 -0
  21. package/assets/esri/core/workers/chunks/{70cf81ec5a901782d2db.js → 3e7c9a43e52ed6a1b018.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{8257352421f453a669e9.js → 3f634580055b30dbfc8e.js} +1 -1
  23. package/assets/esri/core/workers/chunks/{0e8d3d38e9b1f6abf6f2.js → 3fd09a7c05583a57a317.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{52917b753c5ceab0c1f7.js → 4050ddb580d364d9e205.js} +7 -7
  25. package/assets/esri/core/workers/chunks/462b30fc40a5f337ba10.js +1 -0
  26. package/assets/esri/core/workers/chunks/497214e9e82b936fc94e.js +1 -0
  27. package/assets/esri/core/workers/chunks/4ac127cefa3aa5e93e78.js +1 -0
  28. package/assets/esri/core/workers/chunks/4b1daffa97fd90a554a0.js +1 -0
  29. package/assets/esri/core/workers/chunks/4d7fcec769369c576847.js +1 -0
  30. package/assets/esri/core/workers/chunks/516864fb68025acc7db6.js +1 -0
  31. package/assets/esri/core/workers/chunks/54b43876ae6fb078eb38.js +1 -0
  32. package/assets/esri/core/workers/chunks/{9940e59033a8a1eff2a9.js → 55bb794bcdd9cc788322.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{ef85cd0e82d59db8a26f.js → 5787101b2b814c5d2439.js} +1 -1
  34. package/assets/esri/core/workers/chunks/5b7e5ec6aea1f7f9b005.js +1 -0
  35. package/assets/esri/core/workers/chunks/{fe55833c80cf59df9c2b.js → 5cb238318a24b70d5ac3.js} +1 -1
  36. package/assets/esri/core/workers/chunks/5cfec58c7c31e6d8c6ea.js +1 -0
  37. package/assets/esri/core/workers/chunks/{88a5e7415f8858c454f7.js → 5de7c2a80bd9c81cefe2.js} +1 -1
  38. package/assets/esri/core/workers/chunks/5e1afea05b624b315d9f.js +1 -0
  39. package/assets/esri/core/workers/chunks/5ed7e139c72cd2b3ddba.js +1 -0
  40. package/assets/esri/core/workers/chunks/6531f33d6710960079e9.js +1 -0
  41. package/assets/esri/core/workers/chunks/{1cbd59918c60a1a21494.js → 700b5a536f97233bc4af.js} +1 -1
  42. package/assets/esri/core/workers/chunks/757717416d909059df2f.js +1 -0
  43. package/assets/esri/core/workers/chunks/7597ef10d1699e7088e5.js +1 -0
  44. package/assets/esri/core/workers/chunks/781e424a383c71ca904d.js +1 -0
  45. package/assets/esri/core/workers/chunks/79933271a76a1756584f.js +1 -0
  46. package/assets/esri/core/workers/chunks/{c2f184e9f579152aa29a.js → 7b17f52019762aa21af8.js} +1 -1
  47. package/assets/esri/core/workers/chunks/{a249e56a0be8cef33ba8.js → 81eb7785d626aa975033.js} +1 -1
  48. package/assets/esri/core/workers/chunks/8374d87176486c1fc90e.js +1 -0
  49. package/assets/esri/core/workers/chunks/{5691d504ffe5592bc40f.js → 897f9775f06ddbf6486f.js} +1 -1
  50. package/assets/esri/core/workers/chunks/8c0e11f781607239749d.js +1 -0
  51. package/assets/esri/core/workers/chunks/8c2fcfcfbb6b70f7bada.js +1 -0
  52. package/assets/esri/core/workers/chunks/90540fdfb0c5f68aa959.js +1 -0
  53. package/assets/esri/core/workers/chunks/9280edff80fd87860a5e.js +1 -0
  54. package/assets/esri/core/workers/chunks/944d1608f935516951c4.js +1 -0
  55. package/assets/esri/core/workers/chunks/94f1005222bff1870ef1.js +1 -0
  56. package/assets/esri/core/workers/chunks/{aab349d4624b78ef429f.js → 96102a9296afd1bfe1a9.js} +1 -1
  57. package/assets/esri/core/workers/chunks/{4d2473e680324dc17cfa.js → 997a2a1a51039ce7e4e3.js} +1 -1
  58. package/assets/esri/core/workers/chunks/{4e2b125e6e3945985a54.js → 9f93513037a6e87433c4.js} +1 -1
  59. package/assets/esri/core/workers/chunks/a16b471c3706ee37f9b6.js +1 -0
  60. package/assets/esri/core/workers/chunks/a2150baf0661e2f28011.js +1 -0
  61. package/assets/esri/core/workers/chunks/a244afea77127e54dd3a.js +1 -0
  62. package/assets/esri/core/workers/chunks/{ab3c018c406dcd81ef9e.js → a2f4b6d8da93f106852c.js} +1 -1
  63. package/assets/esri/core/workers/chunks/a532614aa65fb52dee7b.js +1 -0
  64. package/assets/esri/core/workers/chunks/{3b51b61a7b8a1ef87c9b.js → a700f57af6856cb5313c.js} +1 -1
  65. package/assets/esri/core/workers/chunks/{a7530dcb08b43e37bbb2.js → ae1cb4c65d72217ae4d4.js} +1 -1
  66. package/assets/esri/core/workers/chunks/af5ae7c36e1178077cbc.js +1 -0
  67. package/assets/esri/core/workers/chunks/{7f80bbbd0897082c1af3.js → b29144ee58b43f769d9a.js} +1 -1
  68. package/assets/esri/core/workers/chunks/b30de4936caa654d7817.js +1 -0
  69. package/assets/esri/core/workers/chunks/b6c6f82df3b60c2f831f.js +1 -0
  70. package/assets/esri/core/workers/chunks/{fae6030a81cb91a91b69.js → bafd9b0f6e817252cb31.js} +1 -1
  71. package/assets/esri/core/workers/chunks/{c80c032c5b7a11db177a.js → bb2ab663e3e5597f2104.js} +1 -1
  72. package/assets/esri/core/workers/chunks/bf6b76027c60b4ffa507.js +1 -0
  73. package/assets/esri/core/workers/chunks/c34a164a8ece4cb33e81.js +1 -0
  74. package/assets/esri/core/workers/chunks/c4ff5c78fc8668af9c05.js +1 -0
  75. package/assets/esri/core/workers/chunks/c696615cae5daefa2d98.js +1 -0
  76. package/assets/esri/core/workers/chunks/{07d5e0633cc2f765037f.js → c71dac67f95d694bf67e.js} +1 -1
  77. package/assets/esri/core/workers/chunks/{e982cf44906eb26164f2.js → c75b0243e5bb84738419.js} +1 -1
  78. package/assets/esri/core/workers/chunks/{80a69897fa3ce1eaa6e7.js → d707538b150d79050336.js} +1 -1
  79. package/assets/esri/core/workers/chunks/d83bdc13c3cad3eee7be.js +1 -0
  80. package/assets/esri/core/workers/chunks/{a96ac5c68d84122e7751.js → db7678104b18534482e3.js} +1 -1
  81. package/assets/esri/core/workers/chunks/dbcef57073075e9cfdfe.js +1 -0
  82. package/assets/esri/core/workers/chunks/e36d538915261ee0373f.js +1 -0
  83. package/assets/esri/core/workers/chunks/e97250ae8da4bd0d6bc9.js +1 -0
  84. package/assets/esri/core/workers/chunks/ed8863c3d334f438b625.js +1 -0
  85. package/assets/esri/core/workers/chunks/f636ca5c811c3a2a962f.js +1 -0
  86. package/assets/esri/core/workers/chunks/{a3ee76b7e46d3fba7cf7.js → f6d91256c4e5f8a0d5c0.js} +1 -1
  87. package/assets/esri/core/workers/chunks/f718f630a8b81496c646.js +1 -0
  88. package/assets/esri/core/workers/chunks/{cac060a187f3a27a19ba.js → fa0f94318173db2034de.js} +1 -1
  89. package/assets/esri/core/workers/chunks/{cf699b9bb530b87be14c.js → ff14b632f147cb68ed59.js} +1 -1
  90. package/assets/esri/core/workers/chunks/{b6a201e86f9caef45ff0.js → ff2614d96ca5228e9685.js} +1 -1
  91. package/assets/esri/themes/base/widgets/_Editor.scss +5 -3
  92. package/assets/esri/themes/base/widgets/_SelectionToolbar.scss +6 -0
  93. package/assets/esri/themes/dark/main.css +1 -1
  94. package/assets/esri/themes/light/main.css +1 -1
  95. package/assets/esri/themes/light/view.css +1 -1
  96. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar.json +1 -1
  97. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_en.json +1 -1
  98. package/chunks/ColorMaterial.glsl.js +1 -1
  99. package/chunks/ComponentShader.glsl.js +2 -2
  100. package/chunks/CutFillDepth.glsl.js +15 -0
  101. package/chunks/CutFillReduction.glsl.js +12 -0
  102. package/chunks/CutFillTargetDepth.glsl.js +6 -0
  103. package/chunks/DefaultMaterial.glsl.js +1 -1
  104. package/chunks/HUDMaterial.glsl.js +4 -4
  105. package/chunks/ImageMaterial.glsl.js +2 -2
  106. package/chunks/NativeLine.glsl.js +1 -1
  107. package/chunks/Path.glsl.js +6 -6
  108. package/chunks/Pattern.glsl.js +1 -1
  109. package/chunks/RealisticTree.glsl.js +1 -1
  110. package/chunks/RibbonLine.glsl.js +2 -2
  111. package/chunks/ShadedColorMaterial.glsl.js +1 -1
  112. package/chunks/SimpleAtmosphere.glsl.js +1 -1
  113. package/chunks/Terrain.glsl.js +4 -4
  114. package/chunks/WaterSurface.glsl.js +3 -3
  115. package/chunks/offsetOperator.js +1 -1
  116. package/config.js +1 -1
  117. package/core/Clonable.js +1 -1
  118. package/effects/FocusArea.js +1 -1
  119. package/geometry/operators/offsetOperator.js +1 -1
  120. package/interfaces.d.ts +2 -2
  121. package/kernel.js +1 -1
  122. package/layers/IntegratedMesh3DTilesLayer.js +1 -1
  123. package/layers/IntegratedMeshLayer.js +1 -1
  124. package/layers/PointCloudLayer.js +1 -1
  125. package/layers/SceneLayer.js +1 -1
  126. package/layers/buildingSublayers/BuildingComponentSublayer.js +1 -1
  127. package/layers/graphics/hydratedFeatures.js +1 -1
  128. package/layers/support/SceneFilter.js +1 -1
  129. package/package.json +2 -2
  130. package/support/revision.js +1 -1
  131. package/views/2d/engine/Stage.js +1 -1
  132. package/views/2d/engine/webgl/Profiler.js +1 -1
  133. package/views/3d/layers/BuildingComponentSublayerView3D.js +1 -1
  134. package/views/3d/layers/CSVLayerView3D.js +1 -1
  135. package/views/3d/layers/FeatureLayerView3D.js +1 -1
  136. package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
  137. package/views/3d/layers/GeoJSONLayerView3D.js +1 -1
  138. package/views/3d/layers/GraphicsLayerView3D.js +1 -1
  139. package/views/3d/layers/GraphicsView3D.js +1 -1
  140. package/views/3d/layers/IntegratedMeshLayerView3D.js +1 -1
  141. package/views/3d/layers/OGCFeatureLayerView3D.js +1 -1
  142. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  143. package/views/3d/layers/RouteLayerView3D.js +1 -1
  144. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  145. package/views/3d/layers/SceneLayerView3D.js +1 -1
  146. package/views/3d/layers/StreamLayerView3D.js +1 -1
  147. package/views/3d/layers/WFSLayerView3D.js +1 -1
  148. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  149. package/views/3d/layers/graphics/GraphicsProcessor.js +1 -1
  150. package/views/3d/layers/graphics/Labeler.js +1 -1
  151. package/views/3d/layers/graphics/QueryEngine.js +1 -1
  152. package/views/3d/layers/graphics/StreamController.js +1 -1
  153. package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorkerHandle.js +1 -1
  154. package/views/3d/layers/graphics/pipeline/rendering/DirectRenderer.js +1 -1
  155. package/views/3d/layers/i3s/PointCloudRenderer.js +1 -1
  156. package/views/3d/layers/support/Tiles3DIntersectionHandler.js +1 -1
  157. package/views/3d/terrain/OverlayRenderTargets.js +1 -1
  158. package/views/3d/terrain/OverlayRenderer.js +1 -1
  159. package/views/3d/terrain/TerrainRenderer.js +1 -1
  160. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  161. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  162. package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentData.glsl.js +2 -2
  163. package/views/3d/webgl-engine/core/FBOCache.js +1 -1
  164. package/views/3d/webgl-engine/core/FBOCacheFormats.js +1 -1
  165. package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
  166. package/views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js +1 -1
  167. package/views/3d/webgl-engine/core/shaderLibrary/ShaderOutputConfiguration.js +1 -1
  168. package/views/3d/webgl-engine/core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js +1 -1
  169. package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +4 -4
  170. package/views/3d/webgl-engine/core/shaderLibrary/output/OutputDepth.glsl.js +2 -0
  171. package/views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js +1 -1
  172. package/views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlightOverlay.js +1 -1
  173. package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +1 -1
  174. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
  175. package/views/3d/webgl-engine/effects/geometry/ObjectAndLayerIDRenderNode.js +1 -1
  176. package/views/3d/webgl-engine/effects/geometry/RenderOccludedRenderNode.js +1 -1
  177. package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
  178. package/views/3d/webgl-engine/lib/CutFillDepth.js +5 -0
  179. package/views/3d/webgl-engine/lib/DefaultVertexBufferLayouts.js +1 -1
  180. package/views/3d/webgl-engine/lib/MainFramebuffer.js +1 -1
  181. package/views/3d/webgl-engine/lib/Material.js +1 -1
  182. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  183. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  184. package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
  185. package/views/3d/webgl-engine/lib/ViewshedShadowMap.js +1 -1
  186. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  187. package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
  188. package/views/3d/webgl-engine/materials/DefaultTechniqueConfiguration.js +1 -1
  189. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  190. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  191. package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
  192. package/views/3d/webgl-engine/materials/WaterTechnique.js +1 -1
  193. package/views/3d/webgl-engine/materials/renderers/VaoRenderer.js +1 -1
  194. package/views/3d/webgl-engine/shaders/CutFillDepth.glsl.js +5 -0
  195. package/views/3d/webgl-engine/shaders/CutFillDepthTechnique.js +5 -0
  196. package/views/3d/webgl-engine/shaders/CutFillReduction.glsl.js +5 -0
  197. package/views/3d/webgl-engine/shaders/CutFillReductionTechnique.js +5 -0
  198. package/views/3d/webgl-engine/shaders/CutFillTargetDepth.glsl.js +5 -0
  199. package/views/3d/webgl-engine/shaders/CutFillTargetDepthTechnique.js +5 -0
  200. package/views/3d/webgl-engine/shaders/HUDMaterialTechnique.js +1 -1
  201. package/views/3d/webgl-engine/shaders/OutputColorHighlightOID.glsl.js +1 -1
  202. package/views/3d/webgl.js +1 -1
  203. package/views/draw/support/Reshape.js +1 -1
  204. package/widgets/Editor/EditorViewModel.js +1 -1
  205. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationItemList.js +1 -1
  206. package/widgets/Sketch.js +1 -1
  207. package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.js +1 -1
  208. package/widgets/support/SelectionToolbar/VisibleElements.js +1 -1
  209. package/widgets/support/SelectionToolbar.js +1 -1
  210. package/widgets/support/Selector2D/SelectionOperation.js +1 -1
  211. package/assets/esri/core/workers/chunks/0390f3aa624e3f380ce2.js +0 -1
  212. package/assets/esri/core/workers/chunks/06d2251d6f6b3e44800a.js +0 -1
  213. package/assets/esri/core/workers/chunks/07eea90733834313e9fa.js +0 -1
  214. package/assets/esri/core/workers/chunks/08393d9cc2ed846dd5b4.js +0 -1
  215. package/assets/esri/core/workers/chunks/094c741fa8139c3f40cf.js +0 -1
  216. package/assets/esri/core/workers/chunks/0f51e51db83f303ce5a6.js +0 -1
  217. package/assets/esri/core/workers/chunks/184d3c88ac2fc1d7e2c3.js +0 -1
  218. package/assets/esri/core/workers/chunks/1eee7cf11df01a52c1bf.js +0 -1
  219. package/assets/esri/core/workers/chunks/27197b0a2ffb2b6104ea.js +0 -1
  220. package/assets/esri/core/workers/chunks/2c0241a5958aef9cda61.js +0 -1
  221. package/assets/esri/core/workers/chunks/2ded2446700f89155ccd.js +0 -1
  222. package/assets/esri/core/workers/chunks/3264d58aeef8cf074b86.js +0 -1
  223. package/assets/esri/core/workers/chunks/3445ffd752262673fb13.js +0 -1
  224. package/assets/esri/core/workers/chunks/38f09e36e174792646bd.js +0 -1
  225. package/assets/esri/core/workers/chunks/3c57b2e13628b5c1f6de.js +0 -1
  226. package/assets/esri/core/workers/chunks/4162c633efefc63c5506.js +0 -1
  227. package/assets/esri/core/workers/chunks/435169b455fd2846799b.js +0 -1
  228. package/assets/esri/core/workers/chunks/44dc7ec52c4abb700783.js +0 -1
  229. package/assets/esri/core/workers/chunks/4558f2e3e77831758fdc.js +0 -1
  230. package/assets/esri/core/workers/chunks/4fc267552939583a81a0.js +0 -1
  231. package/assets/esri/core/workers/chunks/527557b603400189d49a.js +0 -1
  232. package/assets/esri/core/workers/chunks/53873f26a2c24cd75e4a.js +0 -1
  233. package/assets/esri/core/workers/chunks/554c789f4e875d7e6fd5.js +0 -1
  234. package/assets/esri/core/workers/chunks/561a2078458bc0339f83.js +0 -1
  235. package/assets/esri/core/workers/chunks/5f28470304b57e24d94c.js +0 -1
  236. package/assets/esri/core/workers/chunks/61a294f9411bf884f2ab.js +0 -1
  237. package/assets/esri/core/workers/chunks/719450ccd455f503d81a.js +0 -1
  238. package/assets/esri/core/workers/chunks/71cac356874b36f9a383.js +0 -1
  239. package/assets/esri/core/workers/chunks/7388e8c905d93dea1c05.js +0 -1
  240. package/assets/esri/core/workers/chunks/749c7159e0902388e828.js +0 -1
  241. package/assets/esri/core/workers/chunks/7714228825fb44d506df.js +0 -1
  242. package/assets/esri/core/workers/chunks/77ee4afaa4a1c7047940.js +0 -1
  243. package/assets/esri/core/workers/chunks/790e97ddbe318bc75415.js +0 -1
  244. package/assets/esri/core/workers/chunks/8762928d10c3821738ad.js +0 -1
  245. package/assets/esri/core/workers/chunks/8ead467a5af0d9bba804.js +0 -1
  246. package/assets/esri/core/workers/chunks/91e04d03b0013bcaad82.js +0 -1
  247. package/assets/esri/core/workers/chunks/92b60d4fb09711919601.js +0 -1
  248. package/assets/esri/core/workers/chunks/998c38974372720b1c52.js +0 -1
  249. package/assets/esri/core/workers/chunks/9b10e70f28873cff44f5.js +0 -1
  250. package/assets/esri/core/workers/chunks/9d920f3488d59e7f276c.js +0 -1
  251. package/assets/esri/core/workers/chunks/a999f804fc2f00b2e7ae.js +0 -1
  252. package/assets/esri/core/workers/chunks/acf13a64df2991a4cb6b.js +0 -1
  253. package/assets/esri/core/workers/chunks/b5640f9623a9c9ded92a.js +0 -1
  254. package/assets/esri/core/workers/chunks/b8158c681456d4cf2395.js +0 -1
  255. package/assets/esri/core/workers/chunks/bbdbb618a18542f7a4a2.js +0 -1
  256. package/assets/esri/core/workers/chunks/bead38898c3f4d4d3569.js +0 -1
  257. package/assets/esri/core/workers/chunks/c51e2a048df152abd901.js +0 -1
  258. package/assets/esri/core/workers/chunks/c86e339e45900c54c9f5.js +0 -1
  259. package/assets/esri/core/workers/chunks/ca7c9756802214e41c56.js +0 -1
  260. package/assets/esri/core/workers/chunks/cb8f2ce22274990b359c.js +0 -1
  261. package/assets/esri/core/workers/chunks/d6ab4d55f1023ee6ec6a.js +0 -1
  262. package/assets/esri/core/workers/chunks/db2b8d8cf7131554cf7e.js +0 -1
  263. package/assets/esri/core/workers/chunks/f1c50f37a81c672263a1.js +0 -1
  264. package/assets/esri/core/workers/chunks/ff323db554c9e09749e8.js +0 -1
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../request.js";import i from"../core/Error.js";import r from"../core/Logger.js";import{rad2deg as o}from"../core/mathUtils.js";import{MultiOriginJSONMixin as s}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as a}from"../core/promiseUtils.js";import{on as n,sync as l}from"../core/reactiveUtils.js";import{property as m}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{reader as p}from"../core/accessorSupport/decorators/reader.js";import{subclass as c}from"../core/accessorSupport/decorators/subclass.js";import{persistable as f}from"../core/accessorSupport/decorators/persistable.js";import{d,f as h,t as y,c as u,A as g,z as x,a as v}from"../chunks/vec32.js";import{fromValues as j,create as S}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{WGS84ECEFSpatialReferenceLike as b}from"../geometry/ellipsoidUtils.js";import L from"../geometry/Extent.js";import _ from"../geometry/SpatialReference.js";import{projectBuffer as A}from"../geometry/projection/projectBuffer.js";import w from"./Layer.js";import{APIKeyMixin as M}from"./mixins/APIKeyMixin.js";import{ArcGISService as E}from"./mixins/ArcGISService.js";import{CustomParametersMixin as I}from"./mixins/CustomParametersMixin.js";import{OperationalLayer as T}from"./mixins/OperationalLayer.js";import{PortalLayer as R}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as U}from"./mixins/ScaleRangeLayer.js";import{elevationInfo as N,url as z}from"./support/commonProperties.js";import D from"./support/SceneModifications.js";import{logInvalidElevationInfoWarning as O,elevationModeRequiredMessage as P,featureExpressionUnsupportedMessage as V}from"../support/elevationInfoUtils.js";import{f as G}from"../chunks/persistableUrlUtils.js";var X;let k=class extends(E(T(R(U(s(I(M(w)))))))){static{X=this}readModifications(e,t,i){this._modificationsSource={url:G(e,i),context:i}}initialize(){this.addHandles(n(()=>this.modifications,"after-changes",()=>this.modifications=this.modifications,l))}constructor(e){super(e),this.operationalLayerType="IntegratedMesh3DTilesLayer",this.modifications=null,this._modificationsSource=null,this.spatialReference=new _({wkid:4326,vcsWkid:115700}),this.fullExtent=new L(-180,-90,180,90,this.spatialReference),this.url=null,this.type="integrated-mesh-3dtiles",this.path=null,this.minScale=0,this.maxScale=0,this.rootTilesetJSON=null}set elevationInfo(e){null!=e&&"absolute-height"!==e.mode||this._set("elevationInfo",e),this._validateElevationInfo(e)}_verifyArray(e,t){if(!Array.isArray(e)||e.length<t)return!1;for(const i of e)if("number"!=typeof i)return!1;return!0}static{this.googleIMFullExtent={xmin:-180,ymin:-90,zmin:-450,xmax:180,ymax:90,zmax:8850}}_initFullExtent(){const e=this.rootTilesetJSON?.root?.boundingVolume;if(!e)return;const{spatialReference:t}=this;if(e.box){const i=e?.box;if(i[3]>J&&i[7]>J&&i[11]>J)return void(this.fullExtent=new L({...X.googleIMFullExtent,spatialReference:t}))}const i=this.rootTilesetJSON?.root?.transform,r=S();if(e.region&&this._verifyArray(e.region,6)){const i=e.region,r=o(i[0]),s=o(i[1]),a=i[4],n=o(i[2]),l=o(i[3]),m=i[5];this.fullExtent=new L({xmin:r,ymin:s,zmin:a,xmax:n,ymax:l,zmax:m,spatialReference:t})}else if(e.sphere&&this._verifyArray(e.sphere,4)){const o=e.sphere,s=j(o[0],o[1],o[2]),a=o[3]/Math.sqrt(3),n=S();d(n,s,j(a,a,a));const l=S();if(h(l,s,j(a,a,a)),i&&this._verifyArray(i,16)){const e=i;y(r,n,e),u(n,r),y(r,l,e),u(l,r)}A(n,b,0,n,_.WGS84,0),A(l,b,0,l,_.WGS84,0);const m=S(),p=S();g(m,n,l),x(p,n,l),this.fullExtent=new L({xmin:m[0],ymin:m[1],zmin:m[2],xmax:p[0],ymax:p[1],zmax:p[2],spatialReference:t})}else if(e.box&&this._verifyArray(e.box,12)){const r=e.box,o=j(r[0],r[1],r[2]),s=j(r[3],r[4],r[5]),a=j(r[6],r[7],r[8]),n=j(r[9],r[10],r[11]),l=[];for(let e=0;e<8;++e)l.push(S());if(h(l[0],o,s),h(l[0],l[0],a),h(l[0],l[0],n),v(l[1],o,s),h(l[1],l[1],a),h(l[1],l[1],n),h(l[2],o,s),v(l[2],l[2],a),h(l[2],l[2],n),v(l[3],o,s),v(l[3],l[3],a),h(l[3],l[3],n),h(l[4],o,s),h(l[4],l[4],a),v(l[4],l[4],n),v(l[5],o,s),h(l[5],l[5],a),v(l[5],l[5],n),h(l[6],o,s),v(l[6],l[6],a),v(l[6],l[6],n),v(l[7],o,s),v(l[7],l[7],a),v(l[7],l[7],n),i&&this._verifyArray(i,16)){const e=i;for(let t=0;t<8;++t)y(l[t],l[t],e)}const m=j(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),p=j(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE);for(let e=0;e<8;++e)A(l[e],b,0,l[e],_.WGS84,0),g(p,p,l[e]),x(m,m,l[e]);this.fullExtent=new L({xmin:p[0],ymin:p[1],zmin:p[2],xmax:m[0],ymax:m[1],zmax:m[2],spatialReference:t})}}async load(e){return this.addResolvingPromise(this._doLoad(e)),this}async _doLoad(e){const o=null!=e?e.signal:null;try{await this.loadFromPortal({supportedTypes:["3DTiles Service"],validateItem:e=>{if(e.typeKeywords?.includes("IntegratedMesh"))return!0;throw new i("portal:invalid-layer-item-type","Invalid layer item, expected '${expectedType}' ",{expectedType:"3DTiles Service containing IntegratedMesh"})}},e)}catch(s){a(s)}if(null!=this._modificationsSource){const t=await D.fromUrl(this._modificationsSource.url,this.spatialReference,e);this.setAtOrigin("modifications",t,this._modificationsSource.context.origin),this._modificationsSource=null}if(this.url){const e=t(this.url,{query:{...this.customParameters,token:this.apiKey},responseType:"json",signal:o}).then(e=>{this.rootTilesetJSON=e.data,this._initFullExtent()},e=>{a(e),r.getLogger("IntegratedMesh3DTilesLayer").error("Layer loading failed",e)});await e}}beforeSave(){if(null!=this._modificationsSource)return this.load().then(()=>{},e=>{r.getLogger("IntegratedMesh3DTilesLayer").error("Layer loading failed",e)})}async fetchAttributionData(){return this.load().then(()=>({}))}_validateElevationInfo(e){const t="Integrated mesh 3d tiles layers";O(r.getLogger(this),P(t,"absolute-height",e)),O(r.getLogger(this),V(t,e))}get isGroundReplacement(){return!!this.url?.match(/.+\.googleapis.com/)}};e([m({type:["IntegratedMesh3DTilesLayer"]})],k.prototype,"operationalLayerType",void 0),e([m({type:D,clonable:e=>e.clone()}),f({origins:["web-scene","portal-item"],type:"resource",prefix:"modifications"})],k.prototype,"modifications",void 0),e([p(["web-scene","portal-item"],"modifications")],k.prototype,"readModifications",null),e([m({type:_})],k.prototype,"spatialReference",void 0),e([m({type:L})],k.prototype,"fullExtent",void 0),e([m(N)],k.prototype,"elevationInfo",null),e([m({type:["show","hide"]})],k.prototype,"listMode",void 0),e([m(z)],k.prototype,"url",void 0),e([m({readOnly:!0})],k.prototype,"type",void 0),e([m({type:String,json:{origins:{"web-scene":{read:!0,write:!0},"portal-item":{read:!0,write:!0}},read:!1}})],k.prototype,"path",void 0),e([m({type:Number,json:{name:"layerDefinition.minScale",write:!0,origins:{service:{read:!1,write:!1}}}})],k.prototype,"minScale",void 0),e([m({type:Number,json:{name:"layerDefinition.maxScale",write:!0,origins:{service:{read:!1,write:!1}}}})],k.prototype,"maxScale",void 0),k=X=e([c("esri.layers.IntegratedMesh3DTilesLayer")],k);const F=k,J=7645211;export{F as default};
5
+ import{__decorate as e}from"tslib";import t from"../request.js";import i from"../core/Error.js";import r from"../core/Logger.js";import{rad2deg as o}from"../core/mathUtils.js";import{MultiOriginJSONMixin as s}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as a}from"../core/promiseUtils.js";import{on as n,sync as l}from"../core/reactiveUtils.js";import{property as m}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{reader as p}from"../core/accessorSupport/decorators/reader.js";import{subclass as c}from"../core/accessorSupport/decorators/subclass.js";import{persistable as f}from"../core/accessorSupport/decorators/persistable.js";import{d,f as h,t as y,c as u,A as g,z as x,a as v}from"../chunks/vec32.js";import{fromValues as j,create as S}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{WGS84ECEFSpatialReferenceLike as b}from"../geometry/ellipsoidUtils.js";import L from"../geometry/Extent.js";import _ from"../geometry/SpatialReference.js";import{projectBuffer as A}from"../geometry/projection/projectBuffer.js";import w from"../graphic/IntegratedMesh3DTilesGraphicOrigin.js";import M from"./Layer.js";import{APIKeyMixin as I}from"./mixins/APIKeyMixin.js";import{ArcGISService as E}from"./mixins/ArcGISService.js";import{CustomParametersMixin as T}from"./mixins/CustomParametersMixin.js";import{OperationalLayer as R}from"./mixins/OperationalLayer.js";import{PortalLayer as U}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as N}from"./mixins/ScaleRangeLayer.js";import{elevationInfo as O,url as D}from"./support/commonProperties.js";import z from"./support/SceneModifications.js";import{logInvalidElevationInfoWarning as G,elevationModeRequiredMessage as P,featureExpressionUnsupportedMessage as V}from"../support/elevationInfoUtils.js";import{f as X}from"../chunks/persistableUrlUtils.js";var k;let F=class extends(E(R(U(N(s(T(I(M)))))))){static{k=this}readModifications(e,t,i){this._modificationsSource={url:X(e,i),context:i}}initialize(){this.addHandles(n(()=>this.modifications,"after-changes",()=>this.modifications=this.modifications,l))}constructor(e){super(e),this.operationalLayerType="IntegratedMesh3DTilesLayer",this.modifications=null,this._modificationsSource=null,this.spatialReference=new _({wkid:4326,vcsWkid:115700}),this.fullExtent=new L(-180,-90,180,90,this.spatialReference),this.url=null,this.type="integrated-mesh-3dtiles",this.path=null,this.minScale=0,this.maxScale=0,this.graphicOrigin=new w(this),this.rootTilesetJSON=null}set elevationInfo(e){null!=e&&"absolute-height"!==e.mode||this._set("elevationInfo",e),this._validateElevationInfo(e)}_verifyArray(e,t){if(!Array.isArray(e)||e.length<t)return!1;for(const i of e)if("number"!=typeof i)return!1;return!0}static{this.googleIMFullExtent={xmin:-180,ymin:-90,zmin:-450,xmax:180,ymax:90,zmax:8850}}_initFullExtent(){const e=this.rootTilesetJSON?.root?.boundingVolume;if(!e)return;const{spatialReference:t}=this;if(e.box){const i=e?.box;if(i[3]>W&&i[7]>W&&i[11]>W)return void(this.fullExtent=new L({...k.googleIMFullExtent,spatialReference:t}))}const i=this.rootTilesetJSON?.root?.transform,r=S();if(e.region&&this._verifyArray(e.region,6)){const i=e.region,r=o(i[0]),s=o(i[1]),a=i[4],n=o(i[2]),l=o(i[3]),m=i[5];this.fullExtent=new L({xmin:r,ymin:s,zmin:a,xmax:n,ymax:l,zmax:m,spatialReference:t})}else if(e.sphere&&this._verifyArray(e.sphere,4)){const o=e.sphere,s=j(o[0],o[1],o[2]),a=o[3]/Math.sqrt(3),n=S();d(n,s,j(a,a,a));const l=S();if(h(l,s,j(a,a,a)),i&&this._verifyArray(i,16)){const e=i;y(r,n,e),u(n,r),y(r,l,e),u(l,r)}A(n,b,0,n,_.WGS84,0),A(l,b,0,l,_.WGS84,0);const m=S(),p=S();g(m,n,l),x(p,n,l),this.fullExtent=new L({xmin:m[0],ymin:m[1],zmin:m[2],xmax:p[0],ymax:p[1],zmax:p[2],spatialReference:t})}else if(e.box&&this._verifyArray(e.box,12)){const r=e.box,o=j(r[0],r[1],r[2]),s=j(r[3],r[4],r[5]),a=j(r[6],r[7],r[8]),n=j(r[9],r[10],r[11]),l=[];for(let e=0;e<8;++e)l.push(S());if(h(l[0],o,s),h(l[0],l[0],a),h(l[0],l[0],n),v(l[1],o,s),h(l[1],l[1],a),h(l[1],l[1],n),h(l[2],o,s),v(l[2],l[2],a),h(l[2],l[2],n),v(l[3],o,s),v(l[3],l[3],a),h(l[3],l[3],n),h(l[4],o,s),h(l[4],l[4],a),v(l[4],l[4],n),v(l[5],o,s),h(l[5],l[5],a),v(l[5],l[5],n),h(l[6],o,s),v(l[6],l[6],a),v(l[6],l[6],n),v(l[7],o,s),v(l[7],l[7],a),v(l[7],l[7],n),i&&this._verifyArray(i,16)){const e=i;for(let t=0;t<8;++t)y(l[t],l[t],e)}const m=j(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),p=j(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE);for(let e=0;e<8;++e)A(l[e],b,0,l[e],_.WGS84,0),g(p,p,l[e]),x(m,m,l[e]);this.fullExtent=new L({xmin:p[0],ymin:p[1],zmin:p[2],xmax:m[0],ymax:m[1],zmax:m[2],spatialReference:t})}}async load(e){return this.addResolvingPromise(this._doLoad(e)),this}async _doLoad(e){const o=null!=e?e.signal:null;try{await this.loadFromPortal({supportedTypes:["3DTiles Service"],validateItem:e=>{if(e.typeKeywords?.includes("IntegratedMesh"))return!0;throw new i("portal:invalid-layer-item-type","Invalid layer item, expected '${expectedType}' ",{expectedType:"3DTiles Service containing IntegratedMesh"})}},e)}catch(s){a(s)}if(null!=this._modificationsSource){const t=await z.fromUrl(this._modificationsSource.url,this.spatialReference,e);this.setAtOrigin("modifications",t,this._modificationsSource.context.origin),this._modificationsSource=null}if(this.url){const e=t(this.url,{query:{...this.customParameters,token:this.apiKey},responseType:"json",signal:o}).then(e=>{this.rootTilesetJSON=e.data,this._initFullExtent()},e=>{a(e),r.getLogger("IntegratedMesh3DTilesLayer").error("Layer loading failed",e)});await e}}beforeSave(){if(null!=this._modificationsSource)return this.load().then(()=>{},e=>{r.getLogger("IntegratedMesh3DTilesLayer").error("Layer loading failed",e)})}async fetchAttributionData(){return this.load().then(()=>({}))}_validateElevationInfo(e){const t="Integrated mesh 3d tiles layers";G(r.getLogger(this),P(t,"absolute-height",e)),G(r.getLogger(this),V(t,e))}get isGroundReplacement(){return!!this.url?.match(/.+\.googleapis.com/)}};e([m({type:["IntegratedMesh3DTilesLayer"]})],F.prototype,"operationalLayerType",void 0),e([m({type:z,clonable:e=>e.clone()}),f({origins:["web-scene","portal-item"],type:"resource",prefix:"modifications"})],F.prototype,"modifications",void 0),e([p(["web-scene","portal-item"],"modifications")],F.prototype,"readModifications",null),e([m({type:_})],F.prototype,"spatialReference",void 0),e([m({type:L})],F.prototype,"fullExtent",void 0),e([m(O)],F.prototype,"elevationInfo",null),e([m({type:["show","hide"]})],F.prototype,"listMode",void 0),e([m(D)],F.prototype,"url",void 0),e([m({readOnly:!0})],F.prototype,"type",void 0),e([m({type:String,json:{origins:{"web-scene":{read:!0,write:!0},"portal-item":{read:!0,write:!0}},read:!1}})],F.prototype,"path",void 0),e([m({type:Number,json:{name:"layerDefinition.minScale",write:!0,origins:{service:{read:!1,write:!1}}}})],F.prototype,"minScale",void 0),e([m({type:Number,json:{name:"layerDefinition.maxScale",write:!0,origins:{service:{read:!1,write:!1}}}})],F.prototype,"maxScale",void 0),e([m({readOnly:!0})],F.prototype,"graphicOrigin",void 0),F=k=e([c("esri.layers.IntegratedMesh3DTilesLayer")],F);const J=F,W=7645211;export{J as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import{ClonableMixin as t}from"../core/Clonable.js";import o from"../core/Error.js";import i from"../core/Logger.js";import{MultiOriginJSONMixin as r}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as s}from"../core/promiseUtils.js";import{on as n,sync as a}from"../core/reactiveUtils.js";import{property as p}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{reader as l}from"../core/accessorSupport/decorators/reader.js";import{subclass as m}from"../core/accessorSupport/decorators/subclass.js";import{persistable as d}from"../core/accessorSupport/decorators/persistable.js";import c from"./Layer.js";import{APIKeyMixin as y}from"./mixins/APIKeyMixin.js";import{ArcGISService as h}from"./mixins/ArcGISService.js";import{CustomParametersMixin as f}from"./mixins/CustomParametersMixin.js";import{OperationalLayer as u}from"./mixins/OperationalLayer.js";import{PortalLayer as v}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as g}from"./mixins/ScaleRangeLayer.js";import{SceneService as S}from"./mixins/SceneService.js";import{elevationInfo as j}from"./support/commonProperties.js";import{I3SNodePageDefinition as w,I3SMaterialDefinition as x,I3STextureSetDefinition as L,I3SGeometryDefinition as I}from"./support/I3SLayerDefinitions.js";import b from"./support/SceneModifications.js";import{logInvalidElevationInfoWarning as T,elevationModeRequiredMessage as _,featureExpressionUnsupportedMessage as M}from"../support/elevationInfoUtils.js";import{f as O}from"../chunks/persistableUrlUtils.js";let P=class extends(S(h(u(v(g(r(f(y(t(c)))))))))){constructor(...e){super(...e),this.geometryType="mesh",this.operationalLayerType="IntegratedMeshLayer",this.type="integrated-mesh",this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.profile="mesh-pyramids",this.modifications=null,this.path=null,this.definitionExpression=null}initialize(){this.addHandles(n(()=>this.modifications,"after-changes",()=>this.modifications=this.modifications,a))}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}readModifications(e,t,o){this._modificationsSource={url:O(e,o),context:o}}set elevationInfo(e){null!=e&&"absolute-height"!==e.mode||this._set("elevationInfo",e),this._validateElevationInfo(e)}async load(e){return this.addResolvingPromise(this._doLoad(e)),this}async _doLoad(e){const t=e?.signal;try{await this.loadFromPortal({supportedTypes:["Scene Service"]},e)}catch(o){s(o)}if(await this._fetchService(t),null!=this._modificationsSource){const t=await b.fromUrl(this._modificationsSource.url,this.spatialReference,e);this.setAtOrigin("modifications",t,this._modificationsSource.context.origin),this._modificationsSource=null}await this._fetchIndexAndUpdateExtent(this.nodePages,t)}beforeSave(){if(null!=this._modificationsSource)return this.load().then(()=>{},()=>{})}async saveAs(e,t){return this._debouncedSaveOperations(1,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"integrated-mesh"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"integrated-mesh"};return this._debouncedSaveOperations(0,e)}validateLayer(e){if(e.layerType&&"IntegratedMesh"!==e.layerType)throw new o("integrated-mesh-layer:layer-type-not-supported","IntegratedMeshLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new o("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x"});if(this.version.major>1)throw new o("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x"})}_getTypeKeywords(){return["IntegratedMeshLayer"]}_validateElevationInfo(e){const t="Integrated mesh layers";T(i.getLogger(this),_(t,"absolute-height",e)),T(i.getLogger(this),M(t,e))}};e([p({type:String,readOnly:!0})],P.prototype,"geometryType",void 0),e([p({type:["show","hide"]})],P.prototype,"listMode",void 0),e([p({type:["IntegratedMeshLayer"]})],P.prototype,"operationalLayerType",void 0),e([p({json:{read:!1},readOnly:!0})],P.prototype,"type",void 0),e([p({type:w,readOnly:!0,clonable:!1})],P.prototype,"nodePages",void 0),e([p({type:[x],readOnly:!0,clonable:!1})],P.prototype,"materialDefinitions",void 0),e([p({type:[L],readOnly:!0,clonable:!1})],P.prototype,"textureSetDefinitions",void 0),e([p({type:[I],readOnly:!0,clonable:!1})],P.prototype,"geometryDefinitions",void 0),e([p({readOnly:!0})],P.prototype,"serviceUpdateTimeStamp",void 0),e([p({type:b,clonable:e=>e?.clone()??e}),d({origins:["web-scene","portal-item"],type:"resource",prefix:"modifications"})],P.prototype,"modifications",void 0),e([l(["web-scene","portal-item"],"modifications")],P.prototype,"readModifications",null),e([p(j)],P.prototype,"elevationInfo",null),e([p({type:String,json:{origins:{"web-scene":{read:!0,write:!0},"portal-item":{read:!0,write:!0}},read:!1}})],P.prototype,"path",void 0),P=e([m("esri.layers.IntegratedMeshLayer")],P);const U=P;export{U as default};
5
+ import{__decorate as e}from"tslib";import{ClonableMixin as t}from"../core/Clonable.js";import o from"../core/Error.js";import i from"../core/Logger.js";import{MultiOriginJSONMixin as r}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as s}from"../core/promiseUtils.js";import{on as n,sync as a}from"../core/reactiveUtils.js";import{property as p}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{reader as l}from"../core/accessorSupport/decorators/reader.js";import{subclass as m}from"../core/accessorSupport/decorators/subclass.js";import{persistable as d}from"../core/accessorSupport/decorators/persistable.js";import c from"../graphic/IntegratedMeshGraphicOrigin.js";import y from"./Layer.js";import{APIKeyMixin as h}from"./mixins/APIKeyMixin.js";import{ArcGISService as f}from"./mixins/ArcGISService.js";import{CustomParametersMixin as u}from"./mixins/CustomParametersMixin.js";import{OperationalLayer as g}from"./mixins/OperationalLayer.js";import{PortalLayer as v}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as S}from"./mixins/ScaleRangeLayer.js";import{SceneService as j}from"./mixins/SceneService.js";import{elevationInfo as w}from"./support/commonProperties.js";import{I3SNodePageDefinition as x,I3SMaterialDefinition as L,I3STextureSetDefinition as I,I3SGeometryDefinition as b}from"./support/I3SLayerDefinitions.js";import T from"./support/SceneModifications.js";import{logInvalidElevationInfoWarning as _,elevationModeRequiredMessage as O,featureExpressionUnsupportedMessage as M}from"../support/elevationInfoUtils.js";import{f as P}from"../chunks/persistableUrlUtils.js";let U=class extends(j(f(g(v(S(r(u(h(t(y)))))))))){constructor(...e){super(...e),this.geometryType="mesh",this.operationalLayerType="IntegratedMeshLayer",this.type="integrated-mesh",this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.profile="mesh-pyramids",this.modifications=null,this.path=null,this.definitionExpression=null,this.graphicOrigin=new c(this)}initialize(){this.addHandles(n(()=>this.modifications,"after-changes",()=>this.modifications=this.modifications,a))}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}readModifications(e,t,o){this._modificationsSource={url:P(e,o),context:o}}set elevationInfo(e){null!=e&&"absolute-height"!==e.mode||this._set("elevationInfo",e),this._validateElevationInfo(e)}async load(e){return this.addResolvingPromise(this._doLoad(e)),this}async _doLoad(e){const t=e?.signal;try{await this.loadFromPortal({supportedTypes:["Scene Service"]},e)}catch(o){s(o)}if(await this._fetchService(t),null!=this._modificationsSource){const t=await T.fromUrl(this._modificationsSource.url,this.spatialReference,e);this.setAtOrigin("modifications",t,this._modificationsSource.context.origin),this._modificationsSource=null}await this._fetchIndexAndUpdateExtent(this.nodePages,t)}beforeSave(){if(null!=this._modificationsSource)return this.load().then(()=>{},()=>{})}async saveAs(e,t){return this._debouncedSaveOperations(1,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"integrated-mesh"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"integrated-mesh"};return this._debouncedSaveOperations(0,e)}validateLayer(e){if(e.layerType&&"IntegratedMesh"!==e.layerType)throw new o("integrated-mesh-layer:layer-type-not-supported","IntegratedMeshLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new o("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x"});if(this.version.major>1)throw new o("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x"})}_getTypeKeywords(){return["IntegratedMeshLayer"]}_validateElevationInfo(e){const t="Integrated mesh layers";_(i.getLogger(this),O(t,"absolute-height",e)),_(i.getLogger(this),M(t,e))}};e([p({type:String,readOnly:!0})],U.prototype,"geometryType",void 0),e([p({type:["show","hide"]})],U.prototype,"listMode",void 0),e([p({type:["IntegratedMeshLayer"]})],U.prototype,"operationalLayerType",void 0),e([p({json:{read:!1},readOnly:!0})],U.prototype,"type",void 0),e([p({type:x,readOnly:!0,clonable:!1})],U.prototype,"nodePages",void 0),e([p({type:[L],readOnly:!0,clonable:!1})],U.prototype,"materialDefinitions",void 0),e([p({type:[I],readOnly:!0,clonable:!1})],U.prototype,"textureSetDefinitions",void 0),e([p({type:[b],readOnly:!0,clonable:!1})],U.prototype,"geometryDefinitions",void 0),e([p({readOnly:!0})],U.prototype,"serviceUpdateTimeStamp",void 0),e([p({type:T,clonable:e=>e?.clone()??e}),d({origins:["web-scene","portal-item"],type:"resource",prefix:"modifications"})],U.prototype,"modifications",void 0),e([l(["web-scene","portal-item"],"modifications")],U.prototype,"readModifications",null),e([p(w)],U.prototype,"elevationInfo",null),e([p({type:String,json:{origins:{"web-scene":{read:!0,write:!0},"portal-item":{read:!0,write:!0}},read:!1}})],U.prototype,"path",void 0),e([p({readOnly:!0})],U.prototype,"graphicOrigin",void 0),U=e([m("esri.layers.IntegratedMeshLayer")],U);const D=U;export{D as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import r from"../PopupTemplate.js";import t from"../request.js";import{ClonableMixin as o}from"../core/Clonable.js";import i from"../core/Error.js";import{clone as s}from"../core/lang.js";import n from"../core/Logger.js";import{MultiOriginJSONMixin as a}from"../core/MultiOriginJSONSupport.js";import{setDeepValue as p}from"../core/object.js";import{throwIfAbortError as l}from"../core/promiseUtils.js";import{join as d}from"../core/urlUtils.js";import{property as u}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import{reader as m}from"../core/accessorSupport/decorators/reader.js";import{subclass as c}from"../core/accessorSupport/decorators/subclass.js";import{writer as f}from"../core/accessorSupport/decorators/writer.js";import y from"./Layer.js";import{APIKeyMixin as h}from"./mixins/APIKeyMixin.js";import{ArcGISService as g}from"./mixins/ArcGISService.js";import{CustomParametersMixin as v}from"./mixins/CustomParametersMixin.js";import{OperationalLayer as j}from"./mixins/OperationalLayer.js";import{PortalLayer as w}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as I}from"./mixins/ScaleRangeLayer.js";import{SceneService as b}from"./mixins/SceneService.js";import{types as S}from"./pointCloudFilters/typeUtils.js";import{popupEnabled as x,elevationInfo as T,legendEnabled as P}from"./support/commonProperties.js";import F from"./support/Field.js";import{defineFieldProperties as L}from"./support/fieldProperties.js";import C from"../popup/ExpressionInfo.js";import{types as _}from"../renderers/support/pointCloud/typeUtils.js";import{logInvalidElevationInfoWarning as N,elevationModeRequiredMessage as E,featureExpressionUnsupportedMessage as R}from"../support/elevationInfoUtils.js";import{createPopupTemplate as O}from"../support/popupUtils.js";const A=L();let U=class extends(b(g(j(w(I(a(v(h(o(y)))))))))){constructor(...e){super(...e),this.operationalLayerType="PointCloudLayer",this.popupEnabled=!0,this.popupTemplate=null,this.opacity=1,this.filters=[],this.fields=null,this.fieldsIndex=null,this.outFields=null,this.path=null,this.legendEnabled=!0,this.renderer=null,this.type="point-cloud"}normalizeCtorArgs(e,r){return"string"==typeof e?{url:e,...r}:e}get defaultPopupTemplate(){return this.attributeStorageInfo?this.createPopupTemplate():null}getFieldDomain(e){const r=this.fieldsIndex.get(e);return r?.domain?r.domain:null}readServiceFields(e,r,t){return Array.isArray(e)?e.map(e=>{const r=new F;return"FieldTypeInteger"===e.type&&((e=s(e)).type="esriFieldTypeInteger"),r.read(e,t),r}):Array.isArray(r.attributeStorageInfo)?r.attributeStorageInfo.map(e=>new F({name:e.name,type:"ELEVATION"===e.name?"double":"integer"})):null}set elevationInfo(e){null!=e&&"absolute-height"!==e.mode||this._set("elevationInfo",e),this._validateElevationInfo(e)}writeRenderer(e,r,t,o){p("layerDefinition.drawingInfo.renderer",e.write({},o),r)}load(e){const r=null!=e?e.signal:null,t=this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(l).then(()=>this._fetchService(r));return this.addResolvingPromise(t),Promise.resolve(this)}createPopupTemplate(e){const r=O(this,e);return r&&(this._formatPopupTemplateReturnsField(r),this._formatPopupTemplateRGBField(r)),r}_formatPopupTemplateReturnsField(e){const r=this.fieldsIndex.get("RETURNS");if(!r)return;const t=e.fieldInfos?.find(e=>e.fieldName===r.name);if(!t)return;const o=new C({name:"pcl-returns-decoded",title:r.alias||r.name,expression:`\n var returnValue = $feature.${r.name};\n return (returnValue % 16) + " / " + Floor(returnValue / 16);\n `});e.expressionInfos=[...e.expressionInfos||[],o],t.fieldName="expression/pcl-returns-decoded"}_formatPopupTemplateRGBField(e){const r=this.fieldsIndex.get("RGB");if(!r)return;const t=e.fieldInfos?.find(e=>e.fieldName===r.name);if(!t)return;const o=new C({name:"pcl-rgb-decoded",title:r.alias||r.name,expression:`\n var rgb = $feature.${r.name};\n var red = Floor(rgb / 65536, 0);\n var green = Floor((rgb - (red * 65536)) / 256,0);\n var blue = rgb - (red * 65536) - (green * 256);\n\n return "rgb(" + red + "," + green + "," + blue + ")";\n `});e.expressionInfos=[...e.expressionInfos||[],o],t.fieldName="expression/pcl-rgb-decoded"}async queryCachedStatistics(e,r){if(await this.load(r),!this.attributeStorageInfo)throw new i("scenelayer:no-cached-statistics","Cached statistics are not available for this layer");const o=this.fieldsIndex.get(e);if(!o)throw new i("pointcloudlayer:field-unexisting",`Field '${e}' does not exist on the layer`);for(const i of this.attributeStorageInfo)if(i.name===o.name){const e=d(this.parsedUrl?.path??"",`./statistics/${i.key}`);return t(e,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:r?r.signal:null}).then(e=>e.data)}throw new i("pointcloudlayer:no-cached-statistics","Cached statistics for this attribute are not available")}async saveAs(e,r){return this._debouncedSaveOperations(1,{...r,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"point-cloud"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"point-cloud"};return this._debouncedSaveOperations(0,e)}validateLayer(e){if(e.layerType&&"PointCloud"!==e.layerType)throw new i("pointcloudlayer:layer-type-not-supported","PointCloudLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new i("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x-2.x"});if(this.version.major>2)throw new i("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x-2.x"})}hasCachedStatistics(e){return null!=this.attributeStorageInfo&&this.attributeStorageInfo.some(r=>r.name===e)}_getTypeKeywords(){return["PointCloud"]}_validateElevationInfo(e){N(n.getLogger(this),E("Point cloud layers","absolute-height",e)),N(n.getLogger(this),R("Point cloud layers",e))}};e([u({type:["PointCloudLayer"]})],U.prototype,"operationalLayerType",void 0),e([u(x)],U.prototype,"popupEnabled",void 0),e([u({type:r,json:{name:"popupInfo",write:!0}})],U.prototype,"popupTemplate",void 0),e([u({readOnly:!0,json:{read:!1}})],U.prototype,"defaultPopupTemplate",null),e([u({readOnly:!0,json:{write:!1,read:!1,origins:{"web-document":{write:!1,read:!1}}}})],U.prototype,"opacity",void 0),e([u({type:["show","hide"]})],U.prototype,"listMode",void 0),e([u({types:[S],json:{origins:{service:{read:{source:"filters"}}},name:"layerDefinition.filters",write:!0}})],U.prototype,"filters",void 0),e([u({type:[F]})],U.prototype,"fields",void 0),e([u(A.fieldsIndex)],U.prototype,"fieldsIndex",void 0),e([m("service","fields",["fields","attributeStorageInfo"])],U.prototype,"readServiceFields",null),e([u(A.outFields)],U.prototype,"outFields",void 0),e([u({readOnly:!0})],U.prototype,"attributeStorageInfo",void 0),e([u(T)],U.prototype,"elevationInfo",null),e([u({type:String,json:{origins:{"web-scene":{read:!0,write:!0},"portal-item":{read:!0,write:!0}},read:!1}})],U.prototype,"path",void 0),e([u(P)],U.prototype,"legendEnabled",void 0),e([u({types:_,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:{target:{"layerDefinition.drawingInfo.renderer":{types:_},"layerDefinition.drawingInfo.transparency":{type:Number}}}}})],U.prototype,"renderer",void 0),e([f("renderer")],U.prototype,"writeRenderer",null),e([u({json:{read:!1},readOnly:!0})],U.prototype,"type",void 0),U=e([c("esri.layers.PointCloudLayer")],U);const V=U;export{V as default};
5
+ import{__decorate as e}from"tslib";import r from"../PopupTemplate.js";import t from"../request.js";import{ClonableMixin as o}from"../core/Clonable.js";import i from"../core/Error.js";import{clone as s}from"../core/lang.js";import n from"../core/Logger.js";import{MultiOriginJSONMixin as a}from"../core/MultiOriginJSONSupport.js";import{setDeepValue as p}from"../core/object.js";import{throwIfAbortError as l}from"../core/promiseUtils.js";import{join as d}from"../core/urlUtils.js";import{property as u}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import{reader as m}from"../core/accessorSupport/decorators/reader.js";import{subclass as c}from"../core/accessorSupport/decorators/subclass.js";import{writer as y}from"../core/accessorSupport/decorators/writer.js";import f from"../graphic/PointCloudGraphicOrigin.js";import h from"./Layer.js";import{APIKeyMixin as g}from"./mixins/APIKeyMixin.js";import{ArcGISService as v}from"./mixins/ArcGISService.js";import{CustomParametersMixin as j}from"./mixins/CustomParametersMixin.js";import{OperationalLayer as w}from"./mixins/OperationalLayer.js";import{PortalLayer as I}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as b}from"./mixins/ScaleRangeLayer.js";import{SceneService as S}from"./mixins/SceneService.js";import{types as x}from"./pointCloudFilters/typeUtils.js";import{popupEnabled as T,elevationInfo as P,legendEnabled as F}from"./support/commonProperties.js";import L from"./support/Field.js";import{defineFieldProperties as C}from"./support/fieldProperties.js";import O from"../popup/ExpressionInfo.js";import{types as _}from"../renderers/support/pointCloud/typeUtils.js";import{logInvalidElevationInfoWarning as N,elevationModeRequiredMessage as E,featureExpressionUnsupportedMessage as R}from"../support/elevationInfoUtils.js";import{createPopupTemplate as A}from"../support/popupUtils.js";const U=C();let V=class extends(S(v(w(I(b(a(j(g(o(h)))))))))){constructor(...e){super(...e),this.operationalLayerType="PointCloudLayer",this.popupEnabled=!0,this.popupTemplate=null,this.opacity=1,this.filters=[],this.fields=null,this.fieldsIndex=null,this.outFields=null,this.path=null,this.legendEnabled=!0,this.renderer=null,this.type="point-cloud",this.graphicOrigin=new f(this)}normalizeCtorArgs(e,r){return"string"==typeof e?{url:e,...r}:e}get defaultPopupTemplate(){return this.attributeStorageInfo?this.createPopupTemplate():null}getFieldDomain(e){const r=this.fieldsIndex.get(e);return r?.domain?r.domain:null}readServiceFields(e,r,t){return Array.isArray(e)?e.map(e=>{const r=new L;return"FieldTypeInteger"===e.type&&((e=s(e)).type="esriFieldTypeInteger"),r.read(e,t),r}):Array.isArray(r.attributeStorageInfo)?r.attributeStorageInfo.map(e=>new L({name:e.name,type:"ELEVATION"===e.name?"double":"integer"})):null}set elevationInfo(e){null!=e&&"absolute-height"!==e.mode||this._set("elevationInfo",e),this._validateElevationInfo(e)}writeRenderer(e,r,t,o){p("layerDefinition.drawingInfo.renderer",e.write({},o),r)}load(e){const r=null!=e?e.signal:null,t=this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(l).then(()=>this._fetchService(r));return this.addResolvingPromise(t),Promise.resolve(this)}createPopupTemplate(e){const r=A(this,e);return r&&(this._formatPopupTemplateReturnsField(r),this._formatPopupTemplateRGBField(r)),r}_formatPopupTemplateReturnsField(e){const r=this.fieldsIndex.get("RETURNS");if(!r)return;const t=e.fieldInfos?.find(e=>e.fieldName===r.name);if(!t)return;const o=new O({name:"pcl-returns-decoded",title:r.alias||r.name,expression:`\n var returnValue = $feature.${r.name};\n return (returnValue % 16) + " / " + Floor(returnValue / 16);\n `});e.expressionInfos=[...e.expressionInfos||[],o],t.fieldName="expression/pcl-returns-decoded"}_formatPopupTemplateRGBField(e){const r=this.fieldsIndex.get("RGB");if(!r)return;const t=e.fieldInfos?.find(e=>e.fieldName===r.name);if(!t)return;const o=new O({name:"pcl-rgb-decoded",title:r.alias||r.name,expression:`\n var rgb = $feature.${r.name};\n var red = Floor(rgb / 65536, 0);\n var green = Floor((rgb - (red * 65536)) / 256,0);\n var blue = rgb - (red * 65536) - (green * 256);\n\n return "rgb(" + red + "," + green + "," + blue + ")";\n `});e.expressionInfos=[...e.expressionInfos||[],o],t.fieldName="expression/pcl-rgb-decoded"}async queryCachedStatistics(e,r){if(await this.load(r),!this.attributeStorageInfo)throw new i("scenelayer:no-cached-statistics","Cached statistics are not available for this layer");const o=this.fieldsIndex.get(e);if(!o)throw new i("pointcloudlayer:field-unexisting",`Field '${e}' does not exist on the layer`);for(const i of this.attributeStorageInfo)if(i.name===o.name){const e=d(this.parsedUrl?.path??"",`./statistics/${i.key}`);return t(e,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:r?r.signal:null}).then(e=>e.data)}throw new i("pointcloudlayer:no-cached-statistics","Cached statistics for this attribute are not available")}async saveAs(e,r){return this._debouncedSaveOperations(1,{...r,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"point-cloud"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"point-cloud"};return this._debouncedSaveOperations(0,e)}validateLayer(e){if(e.layerType&&"PointCloud"!==e.layerType)throw new i("pointcloudlayer:layer-type-not-supported","PointCloudLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new i("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x-2.x"});if(this.version.major>2)throw new i("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x-2.x"})}hasCachedStatistics(e){return null!=this.attributeStorageInfo&&this.attributeStorageInfo.some(r=>r.name===e)}_getTypeKeywords(){return["PointCloud"]}_validateElevationInfo(e){N(n.getLogger(this),E("Point cloud layers","absolute-height",e)),N(n.getLogger(this),R("Point cloud layers",e))}};e([u({type:["PointCloudLayer"]})],V.prototype,"operationalLayerType",void 0),e([u(T)],V.prototype,"popupEnabled",void 0),e([u({type:r,json:{name:"popupInfo",write:!0}})],V.prototype,"popupTemplate",void 0),e([u({readOnly:!0,json:{read:!1}})],V.prototype,"defaultPopupTemplate",null),e([u({readOnly:!0,json:{write:!1,read:!1,origins:{"web-document":{write:!1,read:!1}}}})],V.prototype,"opacity",void 0),e([u({type:["show","hide"]})],V.prototype,"listMode",void 0),e([u({types:[x],json:{origins:{service:{read:{source:"filters"}}},name:"layerDefinition.filters",write:!0}})],V.prototype,"filters",void 0),e([u({type:[L]})],V.prototype,"fields",void 0),e([u(U.fieldsIndex)],V.prototype,"fieldsIndex",void 0),e([m("service","fields",["fields","attributeStorageInfo"])],V.prototype,"readServiceFields",null),e([u(U.outFields)],V.prototype,"outFields",void 0),e([u({readOnly:!0})],V.prototype,"attributeStorageInfo",void 0),e([u(P)],V.prototype,"elevationInfo",null),e([u({type:String,json:{origins:{"web-scene":{read:!0,write:!0},"portal-item":{read:!0,write:!0}},read:!1}})],V.prototype,"path",void 0),e([u(F)],V.prototype,"legendEnabled",void 0),e([u({types:_,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:{target:{"layerDefinition.drawingInfo.renderer":{types:_},"layerDefinition.drawingInfo.transparency":{type:Number}}}}})],V.prototype,"renderer",void 0),e([y("renderer")],V.prototype,"writeRenderer",null),e([u({json:{read:!1},readOnly:!0})],V.prototype,"type",void 0),e([u({readOnly:!0})],V.prototype,"graphicOrigin",void 0),V=e([c("esri.layers.PointCloudLayer")],V);const K=V;export{K as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../Graphic.js";import r from"../PopupTemplate.js";import{ClonableMixin as i}from"../core/Clonable.js";import s from"../core/Collection.js";import o from"../core/Error.js";import{abortHandle as a}from"../core/handleUtils.js";import n from"../core/Logger.js";import{destroyMaybe as l}from"../core/maybe.js";import{MultiOriginJSONMixin as p}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as d,isAbortError as y,throwIfNotAbortError as u}from"../core/promiseUtils.js";import{whenOnce as c}from"../core/reactiveUtils.js";import{property as h}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{getProperties as f}from"../core/accessorSupport/utils.js";import{reader as m}from"../core/accessorSupport/decorators/reader.js";import{subclass as g}from"../core/accessorSupport/decorators/subclass.js";import v from"../geometry/Point.js";import b from"./Layer.js";import{NoModelError as w,MultipleModelsError as I}from"./graphics/sources/support/uploadAssetErrors.js";import{APIKeyMixin as L}from"./mixins/APIKeyMixin.js";import{ArcGISService as j}from"./mixins/ArcGISService.js";import{CustomParametersMixin as F}from"./mixins/CustomParametersMixin.js";import{EditBusLayer as S}from"./mixins/EditBusLayer.js";import{OperationalLayer as _}from"./mixins/OperationalLayer.js";import{PortalLayer as O}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as P}from"./mixins/ScaleRangeLayer.js";import{SceneService as A}from"./mixins/SceneService.js";import{useViewTimeProperty as T}from"./mixins/TemporalLayer.js";import{TemporalSceneLayer as x}from"./mixins/TemporalSceneLayer.js";import{isHostedAgolService as E}from"./support/arcgisLayerUrl.js";import{findAssociatedFeatureService as D}from"./support/associatedFeatureServiceUtils.js";import{zeroCapabilities as U}from"./support/capabilities.js";import{elevationInfo as R,labelsVisible as q,legendEnabled as C,popupEnabled as N,attributeTableTemplate as G,screenSizePerspectiveEnabled as Q}from"./support/commonProperties.js";import{getFieldDomain as V,computeEffectiveEditingEnabled as M,getGlobalIdToObjectIdMap as k}from"./support/featureLayerUtils.js";import{FeatureReduction as K}from"./support/FeatureReduction.js";import $ from"./support/FeatureReductionSelection.js";import{defineFieldProperties as H}from"./support/fieldProperties.js";import z from"./support/FieldsIndex.js";import{fixRendererFields as W,unpackFieldNames as Z}from"./support/fieldUtils.js";import{I3SNodePageDefinition as B,I3SMaterialDefinition as J,I3STextureSetDefinition as X,I3SGeometryDefinition as Y}from"./support/I3SLayerDefinitions.js";import{isFileEditFormat as ee,isFileSupported as te}from"./support/infoFor3D.js";import re from"./support/LabelClass.js";import{reader as ie}from"./support/labelingInfo.js";import se from"./support/LayerFloorInfo.js";import{layerLookupMap as oe}from"./support/lazyLayerLoader.js";import{getMeshTransformForMetersToSpatialReference as ae}from"./support/meshSpatialReferenceScaleUtils.js";import{RangeInfo as ne}from"./support/RangeInfo.js";import le from"./support/SceneFilter.js";import{cacheIsOutOfSync as pe}from"./support/sceneLayerCacheUtils.js";import{fetchStatistics as de}from"./support/sceneLayerStatistics.js";import{loadStyleRenderer as ye}from"../renderers/support/styleUtils.js";import{webSceneRendererTypes as ue}from"../renderers/support/typeUtils.js";import ce from"../rest/support/Query.js";import{logInvalidElevationInfoWarning as he,elevationModeUnsupportedMessage as fe,featureExpressionUnsupportedMessage as me}from"../support/elevationInfoUtils.js";import{createPopupTemplate as ge}from"../support/popupUtils.js";import{extractZipFiles as ve}from"../support/zipUtils.js";import{queryAttributesFromCachedAttributesId as be}from"../views/3d/layers/i3s/I3SUtil.js";import{getRequiredFields as we,getFetchPopupTemplate as Ie}from"../views/layers/support/popupUtils.js";import{transparencyToOpacity as Le}from"../webdoc/support/opacityUtils.js";const je=new Set(["3DObject","Point"]),Fe=H();let Se=class extends(x(S(A(j(_(O(P(p(F(L(i(b)))))))))))){constructor(...e){super(...e),this.featureReduction=null,this.rangeInfos=null,this.operationalLayerType="ArcGISSceneServiceLayer",this.type="scene",this.fields=null,this.floorInfo=null,this.outFields=null,this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.excludeObjectIds=new s,this.definitionExpression=null,this.filter=null,this.path=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.priority=null,this.semantic=null,this.cachedDrawingInfo={color:!1},this.popupEnabled=!0,this.popupTemplate=null,this.attributeTableTemplate=null,this.objectIdField=null,this.globalIdField=null,this._fieldUsageInfo={},this.screenSizePerspectiveEnabled=!0,this.serviceItemId=void 0}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._set("renderer",null),this.associatedLayer=l(this.associatedLayer)}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const r=this.getField(e)?.domain??null;return this.associatedLayer?V(this.associatedLayer,e,t,r):r}getFeatureType(e){return e&&this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){return this.associatedLayer?.types??[]}get typeIdField(){return this.associatedLayer?.typeIdField??null}get templates(){return this.associatedLayer?.templates??null}get formTemplate(){return this.associatedLayer?.formTemplate??null}get fieldsIndex(){return new z(this.fields)}readNodePages(e,t,r){return"Point"===t.layerType&&(e=t.pointNodePages),null==e||"object"!=typeof e?null:B.fromJSON(e,r)}set elevationInfo(e){this._set("elevationInfo",e),this.loaded&&this._validateElevationInfo()}get effectiveCapabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.effectiveCapabilities)}get effectiveEditingEnabled(){return null!=this.associatedLayer&&M(this.associatedLayer)}get geometryType(){return Oe[this.profile]||"mesh"}set renderer(e){W(e,this.fieldsIndex),this._set("renderer",e)}readCachedDrawingInfo(e){return null!=e&&"object"==typeof e||(e={}),null==e.color&&(e.color=!1),e}get capabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.capabilities)}_capabilitiesFromAssociatedFeatureLayer(e){e=null!=e?e:U;const{query:t,queryRelated:r,editing:{supportsGlobalId:i,supportsRollbackOnFailure:s,supportsUploadWithItemId:o,supportsGeometryUpdate:a,supportsReturnServiceEditsInSourceSpatialReference:n},data:{supportsZ:l,supportsM:p,isVersioned:d,supportsAttachment:y},operations:{supportsEditing:u,supportsAdd:c,supportsUpdate:h,supportsDelete:f,supportsQuery:m,supportsQueryAttachments:g,supportsAsyncConvert3D:v}}=e,b=e.operations.supportsChangeTracking,w=!!this.associatedLayer?.infoFor3D;return{query:t,queryRelated:r,editing:{supportsGlobalId:i,supportsReturnServiceEditsInSourceSpatialReference:n,supportsRollbackOnFailure:s,supportsGeometryUpdate:w&&a,supportsUploadWithItemId:o},data:{supportsAttachment:y,supportsZ:l,supportsM:p,isVersioned:d},operations:{supportsQuery:m,supportsQueryAttachments:g,supportsEditing:u&&b,supportsAdd:w&&c&&b,supportsDelete:w&&f&&b,supportsUpdate:h&&b,supportsAsyncConvert3D:v}}}get editingEnabled(){return this._isOverridden("editingEnabled")?this._get("editingEnabled"):this.associatedLayer?.editingEnabled??!1}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}get infoFor3D(){return this.associatedLayer?.infoFor3D??null}get relationships(){return this.associatedLayer?.relationships}get defaultPopupTemplate(){return this.associatedLayer||this.attributeStorageInfo?this.createPopupTemplate():null}readObjectIdField(e,t){return!e&&t.fields&&t.fields.some(t=>("esriFieldTypeOID"===t.type&&(e=t.name),!!e)),e||void 0}readGlobalIdField(e,t){return!e&&t.fields&&t.fields.some(t=>("esriFieldTypeGlobalID"===t.type&&(e=t.name),!!e)),e||void 0}get displayField(){return this.associatedLayer?.displayField??null}readProfile(e,t){const r=t.store.profile;return null!=r&&_e[r]?_e[r]:(n.getLogger(this).error("Unknown or missing profile",{profile:r,layer:this}),"mesh-pyramids")}get useViewTime(){return this.associatedLayer?.useViewTime??!0}set useViewTime(e){this._override("useViewTime",e)}load(e){return this.addResolvingPromise(this._load(e)),Promise.resolve(this)}async _load(e){const t=null!=e?e.signal:null;await this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(d),await this._fetchService(t),await Promise.all([this._fetchIndexAndUpdateExtent(this.nodePages,t),this._setAssociatedFeatureLayer(t),this._loadFilterGeometries()]),this._validateElevationInfo(),this._applyAssociatedLayerOverrides(),this._populateFieldUsageInfo(),await this.loadTimeInfoFromService(e),await ye(this,{origin:"service"},t),W(this.renderer,this.fieldsIndex),await this.finishLoadEditablePortalLayer(e)}async beforeSave(){null!=this.filter&&(this.filter=this.filter.clone(),await this.load())}async _loadFilterGeometries(){if(this.filter)try{await this.filter.loadGeometries(this.spatialReference)}catch(e){n.getLogger(this).error("#_loadFilterGeometries()",this,"Failed to load filter geometries. Geometry filter will not be applied for this layer.",{error:e}),this.filter=null}}createQuery(){const e=new ce;return"mesh"===this.geometryType?this.capabilities.query.supportsReturnMesh&&(e.returnGeometry=!0):(e.returnGeometry=!0,e.returnZ=!0),e.where=this.definitionExpression||"1=1",e.sqlFormat="standard",e.outFields=["*"],e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryExtent(e||this.createQuery(),t))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryFeatureCount(e||this.createQuery(),t))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryFeatures(e||this.createQuery(),t)).then(e=>{if(e?.features)for(const t of e.features)t.layer=this,t.sourceLayer=this;return e})}async queryRelatedFeatures(e,t){if(await this.load(),!this.associatedLayer)throw new o("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});return this.associatedLayer.queryRelatedFeatures(e,t)}async queryRelatedFeaturesCount(e,t){if(await this.load(),!this.associatedLayer)throw new o("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});return this.associatedLayer.queryRelatedFeaturesCount(e,t)}async queryCachedAttributes(e,t){const r=Z(this.fieldsIndex,await we(this,Ie(this)));return be(this.parsedUrl?.path??"",this.attributeStorageInfo??[],e,t,r,this.apiKey,this.customParameters)}async queryCachedFeature(e,r){const i=await this.queryCachedAttributes(e,[r]);if(!i||0===i.length)throw new o("scenelayer:feature-not-in-cached-data","Feature not found in cached data");const s=new t;return s.attributes=i[0],s.layer=this,s.sourceLayer=this,s}queryObjectIds(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryObjectIds(e||this.createQuery(),t))}queryAttachments(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryAttachments(e,t))}getFieldUsageInfo(e){const t={supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1};return this.loaded?this._fieldUsageInfo[e]||t:(n.getLogger(this).error("#getFieldUsageInfo()","Unavailable until layer is loaded"),t)}createPopupTemplate(e){return ge(this,e)}_getAssociatedLayerForQuery(){const e=this.associatedLayer;return e?.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),!this.associatedLayer)throw new o("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});try{await this.associatedLayer.load()}catch(e){throw new o("scenelayer:query-not-available","SceneLayer associated feature layer could not be loaded",{layer:this,error:e})}return this.associatedLayer}hasCachedStatistics(e){return null!=this.statisticsInfo&&this.statisticsInfo.some(t=>t.name===e)}async queryCachedStatistics(e,t){return await this.load(t),await this.fetchStatistics(e,t)}async saveAs(e,t){return this._debouncedSaveOperations(1,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"};return this._debouncedSaveOperations(0,e)}async applyEdits(e,t){const{applyEdits:r}=await import("./graphics/editingSupport.js");let i=t;await this.load();const s=this.associatedLayer;if(!s)throw new o(`${this.type}-layer:not-editable`,"Service is not editable");await s.load();const{globalIdField:a}=s,n=!!s.infoFor3D,l=i?.globalIdUsed??!0;if(n&&null==a)throw new o(`${this.type}-layer:not-editable`,"Valid globalIdField expected on editable SceneLayer");if(n&&!l)throw new o(`${this.type}-layer:globalid-required`,"globalIdUsed must not be false for SceneLayer editing as globalIds are required.");return E(s.url)&&n&&null!=e.deleteFeatures&&null!=a&&(i={...i,globalIdToObjectId:await k(s,e.deleteFeatures,a)}),r(this,s.source,e,i)}async uploadAssets(e,t){if(await this.load(),null==this.associatedLayer)throw new o(`${this.type}-layer:not-editable`,"Service is not editable");return await this.associatedLayer.load(),this.associatedLayer.uploadAssets(e,t)}async convertMesh(e,t){t??={};const r=e=>{throw n.getLogger(this).error(".convertMesh()",e.message),e};await this.load(),this.infoFor3D||r(new o("invalid:layer","SceneLayer has no capability for mesh conversion"));const i=await this.extractAndFilterFiles(e),s=i.reduce((e,t)=>ee(this.infoFor3D,t)?e+1:e,0);0===s&&r(new w),s>1&&r(new I);const a=this.spatialReference,l=t.location??new v({x:0,y:0,z:0,spatialReference:a}),p=l.spatialReference.isGeographic?"local":"georeferenced",{default:d}=await import("../geometry/Mesh.js"),y=d.createWithExternalSource(l,{type:"client",files:i},{vertexSpace:p,transform:ae(l.spatialReference),unitConversionDisabled:!0}),[u]=await this.uploadAssets([y],{...t,useAssetOrigin:!t.location});return u}async extractAndFilterFiles(e){await this.load();const t=this.infoFor3D;if(!t)return e;return(await ve(e)).filter(e=>te(t,e))}validateLayer(e){if(e.layerType&&!je.has(e.layerType))throw new o("scenelayer:layer-type-not-supported","SceneLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new o("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});if(this.version.major>2)throw new o("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});function t(e,t){let r=!1,i=!1;if(null==e)r=!0,i=!0;else{const s=t&&t.isGeographic;switch(e){case"east-north-up":case"earth-centered":r=!0,i=s;break;case"vertex-reference-frame":r=!0,i=!s;break;default:r=!1}}if(!r)throw new o("scenelayer:unsupported-normal-reference-frame","Normal reference frame is invalid.");if(!i)throw new o("scenelayer:incompatible-normal-reference-frame","Normal reference frame is incompatible with layer spatial reference.")}t(this.normalReferenceFrame,this.spatialReference)}_getTypeKeywords(){const e=[];if("points"===this.profile)e.push("Point");else{if("mesh-pyramids"!==this.profile)throw new o("scenelayer:unknown-profile","SceneLayer:save() encountered an unknown SceneLayer profile: "+this.profile);e.push("3DObject")}return e}_populateFieldUsageInfo(){if(this._fieldUsageInfo={},this.fields)for(const e of this.fields){const t=!!this.attributeStorageInfo?.some(t=>t.name===e.name),r=!!this.associatedLayer?.fields?.some(t=>t&&e.name===t.name),i={supportsLabelingInfo:t,supportsRenderer:t,supportsPopupTemplate:t||r,supportsLayerQuery:r};this._fieldUsageInfo[e.name]=i}}_applyAssociatedLayerOverrides(){this._applyAssociatedLayerFieldsOverrides(),this._applyAssociatedLayerPropertyOverrides(),this._applyAssociatedLayerExtentOverride(),this._applyAssociatedLayerPrivileges()}_applyAssociatedLayerFieldsOverrides(){if(!this.associatedLayer?.fields)return;let e=null;for(const t of this.associatedLayer.fields){const r=this.getField(t.name);r?(!r.domain&&t.domain&&(r.domain=t.domain.clone()),r.editable=t.editable,r.nullable=t.nullable,r.length=t.length):(e||(e=this.fields?this.fields.slice():[]),e.push(t.clone()))}e&&this._set("fields",e)}_applyAssociatedLayerPropertyOverrides(){if(!this.associatedLayer)return;const e=["popupTemplate","popupEnabled","attributeTableTemplate"],t=f(this);for(let r=0;r<e.length;r++){const i=e[r],s=this.originIdOf(i),o=this.associatedLayer.originIdOf(i);s<o&&(2===o||3===o)&&t.setAtOrigin(i,this.associatedLayer[i],o)}}_applyAssociatedLayerExtentOverride(){const e=this.associatedLayer?.getAtOrigin("fullExtent","service");if(null==this.associatedLayer?.infoFor3D||!e||!E(this.associatedLayer?.url)||!pe(this))return;f(this).setAtOrigin("fullExtent",e.clone(),2)}_applyAssociatedLayerPrivileges(){const e=this.associatedLayer;e&&(this._set("userHasEditingPrivileges",e.userHasEditingPrivileges),this._set("userHasFullEditingPrivileges",e.userHasFullEditingPrivileges),this._set("userHasUpdateItemPrivileges",e.userHasUpdateItemPrivileges))}async _setAssociatedFeatureLayer(e){if(["mesh-pyramids","points"].includes(this.profile))try{const{serverUrl:t,layerId:r,portalItem:i}=await D(`${this.url}/layers/${this.layerId}`,{sceneLayerItem:this.portalItem,customParameters:this.customParameters,apiKey:this.apiKey,signal:e}),s=await oe.FeatureLayer();this.associatedLayer=new s({url:t,customParameters:this.customParameters,layerId:r,portalItem:i}),await this.associatedLayer.load()}catch(t){y(t)||this._logWarningOnPopupEnabled()}}async _logWarningOnPopupEnabled(){const e=new AbortController;this.addHandles(a(e));try{await c(()=>this.popupEnabled&&null!=this.popupTemplate,e.signal)}catch(r){return void u(r)}const t=`this SceneLayer: ${this.title}`;null==this.attributeStorageInfo?n.getLogger(this).warn(`Associated FeatureLayer could not be loaded and no binary attributes found. Popups will not work on ${t}`):n.getLogger(this).info(`Associated FeatureLayer could not be loaded. Falling back to binary attributes for Popups on ${t}`)}_validateElevationInfo(){const e=this.elevationInfo;"mesh-pyramids"===this.profile&&he(n.getLogger(this),fe("Mesh scene layers","relative-to-scene",e)),he(n.getLogger(this),me("Scene layers",e))}async fetchStatistics(e,t){return await de({fieldName:e,statisticsInfo:this.statisticsInfo,errorContext:"scenelayer",fieldsIndex:this.fieldsIndex,path:this.parsedUrl?.path??"",customParameters:this.customParameters,apiKey:this.apiKey,signal:t?.signal})}};e([h({types:{key:"type",base:K,typeMap:{selection:$}},json:{origins:{"web-scene":{name:"layerDefinition.featureReduction",write:{allowNull:!0}},"portal-item":{name:"layerDefinition.featureReduction",write:{allowNull:!0}}}}})],Se.prototype,"featureReduction",void 0),e([h({type:[ne],json:{read:!1,origins:{"web-scene":{name:"layerDefinition.rangeInfos",write:!0},"portal-item":{name:"layerDefinition.rangeInfos",write:!0}}},clonable:!1})],Se.prototype,"rangeInfos",void 0),e([h({json:{read:!1}})],Se.prototype,"associatedLayer",void 0),e([h({type:["show","hide"]})],Se.prototype,"listMode",void 0),e([h({type:["ArcGISSceneServiceLayer"]})],Se.prototype,"operationalLayerType",void 0),e([h({json:{read:!1},readOnly:!0})],Se.prototype,"type",void 0),e([h({...Fe.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Se.prototype,"fields",void 0),e([h()],Se.prototype,"types",null),e([h()],Se.prototype,"typeIdField",null),e([h()],Se.prototype,"templates",null),e([h()],Se.prototype,"formTemplate",null),e([h({readOnly:!0,clonable:!1})],Se.prototype,"fieldsIndex",null),e([h({type:se,json:{read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo"}}})],Se.prototype,"floorInfo",void 0),e([h(Fe.outFields)],Se.prototype,"outFields",void 0),e([h({type:B,readOnly:!0,json:{read:!1},clonable:!1})],Se.prototype,"nodePages",void 0),e([m("service","nodePages",["nodePages","pointNodePages"])],Se.prototype,"readNodePages",null),e([h({type:[J],readOnly:!0,clonable:!1})],Se.prototype,"materialDefinitions",void 0),e([h({type:[X],readOnly:!0,clonable:!1})],Se.prototype,"textureSetDefinitions",void 0),e([h({type:[Y],readOnly:!0,clonable:!1})],Se.prototype,"geometryDefinitions",void 0),e([h({readOnly:!0})],Se.prototype,"serviceUpdateTimeStamp",void 0),e([h({readOnly:!0})],Se.prototype,"attributeStorageInfo",void 0),e([h({readOnly:!0})],Se.prototype,"statisticsInfo",void 0),e([h({type:s.ofType(Number),nonNullable:!0,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.excludeObjectIds",write:{enabled:!0}}})],Se.prototype,"excludeObjectIds",void 0),e([h({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],Se.prototype,"definitionExpression",void 0),e([h({type:le,json:{name:"layerDefinition.polygonFilter",write:{enabled:!0,allowNull:!0},origins:{service:{read:!1,write:!1}}}})],Se.prototype,"filter",void 0),e([h({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],Se.prototype,"path",void 0),e([h(R)],Se.prototype,"elevationInfo",null),e([h({readOnly:!0,json:{read:!1}})],Se.prototype,"effectiveCapabilities",null),e([h({readOnly:!0})],Se.prototype,"effectiveEditingEnabled",null),e([h({type:String})],Se.prototype,"geometryType",null),e([h(q)],Se.prototype,"labelsVisible",void 0),e([h({type:[re],json:{origins:{service:{name:"drawingInfo.labelingInfo",read:{reader:ie},write:!1}},name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:ie},write:!0}})],Se.prototype,"labelingInfo",void 0),e([h(C)],Se.prototype,"legendEnabled",void 0),e([h({type:Number,json:{origins:{"web-document":{default:1,write:{enabled:!0,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}},read:{source:["opacity","layerDefinition.drawingInfo.transparency"],reader(e,t){if("number"==typeof e&&e>=0&&e<=1)return e;const r=t.layerDefinition?.drawingInfo?.transparency;return void 0!==r?Le(r):void 0}}},"portal-item":{write:!0},service:{read:!1}}}})],Se.prototype,"opacity",void 0),e([h({type:["Low","High"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Se.prototype,"priority",void 0),e([h({type:["Labels"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Se.prototype,"semantic",void 0),e([h({types:ue,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],Se.prototype,"renderer",null),e([h({json:{read:!1}})],Se.prototype,"cachedDrawingInfo",void 0),e([m("service","cachedDrawingInfo")],Se.prototype,"readCachedDrawingInfo",null),e([h({readOnly:!0,json:{read:!1}})],Se.prototype,"capabilities",null),e([h({type:Boolean,json:{read:!1}})],Se.prototype,"editingEnabled",null),e([h({readOnly:!0,json:{write:!1,read:!1}})],Se.prototype,"infoFor3D",null),e([h({readOnly:!0,json:{write:!1,read:!1}})],Se.prototype,"relationships",null),e([h(N)],Se.prototype,"popupEnabled",void 0),e([h({type:r,json:{name:"popupInfo",write:!0}})],Se.prototype,"popupTemplate",void 0),e([h({readOnly:!0,json:{read:!1}})],Se.prototype,"defaultPopupTemplate",null),e([h(G)],Se.prototype,"attributeTableTemplate",void 0),e([h({type:String,json:{read:!1}})],Se.prototype,"objectIdField",void 0),e([m("service","objectIdField",["objectIdField","fields"])],Se.prototype,"readObjectIdField",null),e([h({type:String,json:{read:!1}})],Se.prototype,"globalIdField",void 0),e([m("service","globalIdField",["globalIdField","fields"])],Se.prototype,"readGlobalIdField",null),e([h({readOnly:!0,type:String,json:{read:!1}})],Se.prototype,"displayField",null),e([h({type:String,json:{read:!1}})],Se.prototype,"profile",void 0),e([m("service","profile",["store.profile"])],Se.prototype,"readProfile",null),e([h({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],Se.prototype,"normalReferenceFrame",void 0),e([h(Q)],Se.prototype,"screenSizePerspectiveEnabled",void 0),e([h({json:{read:!1,origins:{service:{read:!0}}}})],Se.prototype,"serviceItemId",void 0),e([h(T)],Se.prototype,"useViewTime",null),Se=e([g("esri.layers.SceneLayer")],Se);const _e={"mesh-pyramids":"mesh-pyramids",meshpyramids:"mesh-pyramids","features-meshes":"mesh-pyramids",points:"points","features-points":"points",lines:"lines","features-lines":"lines",polygons:"polygons","features-polygons":"polygons"},Oe={"mesh-pyramids":"mesh",points:"point"},Pe=Se;export{Pe as default};
5
+ import{__decorate as e}from"tslib";import t from"../Graphic.js";import r from"../PopupTemplate.js";import{ClonableMixin as i}from"../core/Clonable.js";import s from"../core/Collection.js";import o from"../core/Error.js";import{abortHandle as a}from"../core/handleUtils.js";import n from"../core/Logger.js";import{destroyMaybe as l}from"../core/maybe.js";import{MultiOriginJSONMixin as p}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as d,isAbortError as y,throwIfNotAbortError as u}from"../core/promiseUtils.js";import{whenOnce as c}from"../core/reactiveUtils.js";import{property as h}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{getProperties as f}from"../core/accessorSupport/utils.js";import{reader as m}from"../core/accessorSupport/decorators/reader.js";import{subclass as g}from"../core/accessorSupport/decorators/subclass.js";import v from"../geometry/Point.js";import b from"../graphic/SceneGraphicOrigin.js";import w from"./Layer.js";import{NoModelError as I,MultipleModelsError as L}from"./graphics/sources/support/uploadAssetErrors.js";import{APIKeyMixin as j}from"./mixins/APIKeyMixin.js";import{ArcGISService as F}from"./mixins/ArcGISService.js";import{CustomParametersMixin as S}from"./mixins/CustomParametersMixin.js";import{EditBusLayer as O}from"./mixins/EditBusLayer.js";import{OperationalLayer as _}from"./mixins/OperationalLayer.js";import{PortalLayer as P}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as A}from"./mixins/ScaleRangeLayer.js";import{SceneService as T}from"./mixins/SceneService.js";import{useViewTimeProperty as x}from"./mixins/TemporalLayer.js";import{TemporalSceneLayer as E}from"./mixins/TemporalSceneLayer.js";import{isHostedAgolService as D}from"./support/arcgisLayerUrl.js";import{findAssociatedFeatureService as U}from"./support/associatedFeatureServiceUtils.js";import{zeroCapabilities as R}from"./support/capabilities.js";import{elevationInfo as q,labelsVisible as C,legendEnabled as G,popupEnabled as N,attributeTableTemplate as Q,screenSizePerspectiveEnabled as V}from"./support/commonProperties.js";import{getFieldDomain as M,computeEffectiveEditingEnabled as k,getGlobalIdToObjectIdMap as K}from"./support/featureLayerUtils.js";import{FeatureReduction as $}from"./support/FeatureReduction.js";import H from"./support/FeatureReductionSelection.js";import{defineFieldProperties as z}from"./support/fieldProperties.js";import W from"./support/FieldsIndex.js";import{fixRendererFields as Z,unpackFieldNames as B}from"./support/fieldUtils.js";import{I3SNodePageDefinition as J,I3SMaterialDefinition as X,I3STextureSetDefinition as Y,I3SGeometryDefinition as ee}from"./support/I3SLayerDefinitions.js";import{isFileEditFormat as te,isFileSupported as re}from"./support/infoFor3D.js";import ie from"./support/LabelClass.js";import{reader as se}from"./support/labelingInfo.js";import oe from"./support/LayerFloorInfo.js";import{layerLookupMap as ae}from"./support/lazyLayerLoader.js";import{getMeshTransformForMetersToSpatialReference as ne}from"./support/meshSpatialReferenceScaleUtils.js";import{RangeInfo as le}from"./support/RangeInfo.js";import pe from"./support/SceneFilter.js";import{cacheIsOutOfSync as de}from"./support/sceneLayerCacheUtils.js";import{fetchStatistics as ye}from"./support/sceneLayerStatistics.js";import{loadStyleRenderer as ue}from"../renderers/support/styleUtils.js";import{webSceneRendererTypes as ce}from"../renderers/support/typeUtils.js";import he from"../rest/support/Query.js";import{logInvalidElevationInfoWarning as fe,elevationModeUnsupportedMessage as me,featureExpressionUnsupportedMessage as ge}from"../support/elevationInfoUtils.js";import{createPopupTemplate as ve}from"../support/popupUtils.js";import{extractZipFiles as be}from"../support/zipUtils.js";import{queryAttributesFromCachedAttributesId as we}from"../views/3d/layers/i3s/I3SUtil.js";import{getRequiredFields as Ie,getFetchPopupTemplate as Le}from"../views/layers/support/popupUtils.js";import{transparencyToOpacity as je}from"../webdoc/support/opacityUtils.js";const Fe=new Set(["3DObject","Point"]),Se=z();let Oe=class extends(E(O(T(F(_(P(A(p(S(j(i(w)))))))))))){constructor(...e){super(...e),this.featureReduction=null,this.rangeInfos=null,this.operationalLayerType="ArcGISSceneServiceLayer",this.type="scene",this.fields=null,this.graphicOrigin=new b(this),this.floorInfo=null,this.outFields=null,this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.excludeObjectIds=new s,this.definitionExpression=null,this.filter=null,this.path=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.priority=null,this.semantic=null,this.cachedDrawingInfo={color:!1},this.popupEnabled=!0,this.popupTemplate=null,this.attributeTableTemplate=null,this.objectIdField=null,this.globalIdField=null,this._fieldUsageInfo={},this.screenSizePerspectiveEnabled=!0,this.serviceItemId=void 0}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._set("renderer",null),this.associatedLayer=l(this.associatedLayer)}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const r=this.getField(e)?.domain??null;return this.associatedLayer?M(this.associatedLayer,e,t,r):r}getFeatureType(e){return e&&this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){return this.associatedLayer?.types??[]}get typeIdField(){return this.associatedLayer?.typeIdField??null}get templates(){return this.associatedLayer?.templates??null}get formTemplate(){return this.associatedLayer?.formTemplate??null}get fieldsIndex(){return new W(this.fields)}readNodePages(e,t,r){return"Point"===t.layerType&&(e=t.pointNodePages),null==e||"object"!=typeof e?null:J.fromJSON(e,r)}set elevationInfo(e){this._set("elevationInfo",e),this.loaded&&this._validateElevationInfo()}get effectiveCapabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.effectiveCapabilities)}get effectiveEditingEnabled(){return null!=this.associatedLayer&&k(this.associatedLayer)}get geometryType(){return Pe[this.profile]||"mesh"}set renderer(e){Z(e,this.fieldsIndex),this._set("renderer",e)}readCachedDrawingInfo(e){return null!=e&&"object"==typeof e||(e={}),null==e.color&&(e.color=!1),e}get capabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.capabilities)}_capabilitiesFromAssociatedFeatureLayer(e){e=null!=e?e:R;const{query:t,queryRelated:r,editing:{supportsGlobalId:i,supportsRollbackOnFailure:s,supportsUploadWithItemId:o,supportsGeometryUpdate:a,supportsReturnServiceEditsInSourceSpatialReference:n},data:{supportsZ:l,supportsM:p,isVersioned:d,supportsAttachment:y},operations:{supportsEditing:u,supportsAdd:c,supportsUpdate:h,supportsDelete:f,supportsQuery:m,supportsQueryAttachments:g,supportsAsyncConvert3D:v}}=e,b=e.operations.supportsChangeTracking,w=!!this.associatedLayer?.infoFor3D;return{query:t,queryRelated:r,editing:{supportsGlobalId:i,supportsReturnServiceEditsInSourceSpatialReference:n,supportsRollbackOnFailure:s,supportsGeometryUpdate:w&&a,supportsUploadWithItemId:o},data:{supportsAttachment:y,supportsZ:l,supportsM:p,isVersioned:d},operations:{supportsQuery:m,supportsQueryAttachments:g,supportsEditing:u&&b,supportsAdd:w&&c&&b,supportsDelete:w&&f&&b,supportsUpdate:h&&b,supportsAsyncConvert3D:v}}}get editingEnabled(){return this._isOverridden("editingEnabled")?this._get("editingEnabled"):this.associatedLayer?.editingEnabled??!1}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}get infoFor3D(){return this.associatedLayer?.infoFor3D??null}get relationships(){return this.associatedLayer?.relationships}get defaultPopupTemplate(){return this.associatedLayer||this.attributeStorageInfo?this.createPopupTemplate():null}readObjectIdField(e,t){return!e&&t.fields&&t.fields.some(t=>("esriFieldTypeOID"===t.type&&(e=t.name),!!e)),e||void 0}readGlobalIdField(e,t){return!e&&t.fields&&t.fields.some(t=>("esriFieldTypeGlobalID"===t.type&&(e=t.name),!!e)),e||void 0}get displayField(){return this.associatedLayer?.displayField??null}readProfile(e,t){const r=t.store.profile;return null!=r&&_e[r]?_e[r]:(n.getLogger(this).error("Unknown or missing profile",{profile:r,layer:this}),"mesh-pyramids")}get useViewTime(){return this.associatedLayer?.useViewTime??!0}set useViewTime(e){this._override("useViewTime",e)}load(e){return this.addResolvingPromise(this._load(e)),Promise.resolve(this)}async _load(e){const t=null!=e?e.signal:null;await this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(d),await this._fetchService(t),await Promise.all([this._fetchIndexAndUpdateExtent(this.nodePages,t),this._setAssociatedFeatureLayer(t),this._loadFilterGeometries()]),this._validateElevationInfo(),this._applyAssociatedLayerOverrides(),this._populateFieldUsageInfo(),await this.loadTimeInfoFromService(e),await ue(this,{origin:"service"},t),Z(this.renderer,this.fieldsIndex),await this.finishLoadEditablePortalLayer(e)}async beforeSave(){null!=this.filter&&(this.filter=this.filter.clone(),await this.load())}async _loadFilterGeometries(){if(this.filter)try{await this.filter.loadGeometries(this.spatialReference)}catch(e){n.getLogger(this).error("#_loadFilterGeometries()",this,"Failed to load filter geometries. Geometry filter will not be applied for this layer.",{error:e}),this.filter=null}}createQuery(){const e=new he;return"mesh"===this.geometryType?this.capabilities.query.supportsReturnMesh&&(e.returnGeometry=!0):(e.returnGeometry=!0,e.returnZ=!0),e.where=this.definitionExpression||"1=1",e.sqlFormat="standard",e.outFields=["*"],e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryExtent(e||this.createQuery(),t))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryFeatureCount(e||this.createQuery(),t))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryFeatures(e||this.createQuery(),t)).then(e=>{if(e?.features)for(const t of e.features)t.layer=this,t.sourceLayer=this;return e})}async queryRelatedFeatures(e,t){if(await this.load(),!this.associatedLayer)throw new o("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});return this.associatedLayer.queryRelatedFeatures(e,t)}async queryRelatedFeaturesCount(e,t){if(await this.load(),!this.associatedLayer)throw new o("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});return this.associatedLayer.queryRelatedFeaturesCount(e,t)}async queryCachedAttributes(e,t){const r=B(this.fieldsIndex,await Ie(this,Le(this)));return we(this.parsedUrl?.path??"",this.attributeStorageInfo??[],e,t,r,this.apiKey,this.customParameters)}async queryCachedFeature(e,r){const i=await this.queryCachedAttributes(e,[r]);if(!i||0===i.length)throw new o("scenelayer:feature-not-in-cached-data","Feature not found in cached data");const s=new t;return s.attributes=i[0],s.layer=this,s.sourceLayer=this,s}queryObjectIds(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryObjectIds(e||this.createQuery(),t))}queryAttachments(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryAttachments(e,t))}getFieldUsageInfo(e){const t={supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1};return this.loaded?this._fieldUsageInfo[e]||t:(n.getLogger(this).error("#getFieldUsageInfo()","Unavailable until layer is loaded"),t)}createPopupTemplate(e){return ve(this,e)}_getAssociatedLayerForQuery(){const e=this.associatedLayer;return e?.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),!this.associatedLayer)throw new o("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});try{await this.associatedLayer.load()}catch(e){throw new o("scenelayer:query-not-available","SceneLayer associated feature layer could not be loaded",{layer:this,error:e})}return this.associatedLayer}hasCachedStatistics(e){return null!=this.statisticsInfo&&this.statisticsInfo.some(t=>t.name===e)}async queryCachedStatistics(e,t){return await this.load(t),await this.fetchStatistics(e,t)}async saveAs(e,t){return this._debouncedSaveOperations(1,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"};return this._debouncedSaveOperations(0,e)}async applyEdits(e,t){const{applyEdits:r}=await import("./graphics/editingSupport.js");let i=t;await this.load();const s=this.associatedLayer;if(!s)throw new o(`${this.type}-layer:not-editable`,"Service is not editable");await s.load();const{globalIdField:a}=s,n=!!s.infoFor3D,l=i?.globalIdUsed??!0;if(n&&null==a)throw new o(`${this.type}-layer:not-editable`,"Valid globalIdField expected on editable SceneLayer");if(n&&!l)throw new o(`${this.type}-layer:globalid-required`,"globalIdUsed must not be false for SceneLayer editing as globalIds are required.");return D(s.url)&&n&&null!=e.deleteFeatures&&null!=a&&(i={...i,globalIdToObjectId:await K(s,e.deleteFeatures,a)}),r(this,s.source,e,i)}async uploadAssets(e,t){if(await this.load(),null==this.associatedLayer)throw new o(`${this.type}-layer:not-editable`,"Service is not editable");return await this.associatedLayer.load(),this.associatedLayer.uploadAssets(e,t)}async convertMesh(e,t){t??={};const r=e=>{throw n.getLogger(this).error(".convertMesh()",e.message),e};await this.load(),this.infoFor3D||r(new o("invalid:layer","SceneLayer has no capability for mesh conversion"));const i=await this.extractAndFilterFiles(e),s=i.reduce((e,t)=>te(this.infoFor3D,t)?e+1:e,0);0===s&&r(new I),s>1&&r(new L);const a=this.spatialReference,l=t.location??new v({x:0,y:0,z:0,spatialReference:a}),p=l.spatialReference.isGeographic?"local":"georeferenced",{default:d}=await import("../geometry/Mesh.js"),y=d.createWithExternalSource(l,{type:"client",files:i},{vertexSpace:p,transform:ne(l.spatialReference),unitConversionDisabled:!0}),[u]=await this.uploadAssets([y],{...t,useAssetOrigin:!t.location});return u}async extractAndFilterFiles(e){await this.load();const t=this.infoFor3D;if(!t)return e;return(await be(e)).filter(e=>re(t,e))}validateLayer(e){if(e.layerType&&!Fe.has(e.layerType))throw new o("scenelayer:layer-type-not-supported","SceneLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new o("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});if(this.version.major>2)throw new o("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});function t(e,t){let r=!1,i=!1;if(null==e)r=!0,i=!0;else{const s=t&&t.isGeographic;switch(e){case"east-north-up":case"earth-centered":r=!0,i=s;break;case"vertex-reference-frame":r=!0,i=!s;break;default:r=!1}}if(!r)throw new o("scenelayer:unsupported-normal-reference-frame","Normal reference frame is invalid.");if(!i)throw new o("scenelayer:incompatible-normal-reference-frame","Normal reference frame is incompatible with layer spatial reference.")}t(this.normalReferenceFrame,this.spatialReference)}_getTypeKeywords(){const e=[];if("points"===this.profile)e.push("Point");else{if("mesh-pyramids"!==this.profile)throw new o("scenelayer:unknown-profile","SceneLayer:save() encountered an unknown SceneLayer profile: "+this.profile);e.push("3DObject")}return e}_populateFieldUsageInfo(){if(this._fieldUsageInfo={},this.fields)for(const e of this.fields){const t=!!this.attributeStorageInfo?.some(t=>t.name===e.name),r=!!this.associatedLayer?.fields?.some(t=>t&&e.name===t.name),i={supportsLabelingInfo:t,supportsRenderer:t,supportsPopupTemplate:t||r,supportsLayerQuery:r};this._fieldUsageInfo[e.name]=i}}_applyAssociatedLayerOverrides(){this._applyAssociatedLayerFieldsOverrides(),this._applyAssociatedLayerPropertyOverrides(),this._applyAssociatedLayerExtentOverride(),this._applyAssociatedLayerPrivileges()}_applyAssociatedLayerFieldsOverrides(){if(!this.associatedLayer?.fields)return;let e=null;for(const t of this.associatedLayer.fields){const r=this.getField(t.name);r?(!r.domain&&t.domain&&(r.domain=t.domain.clone()),r.editable=t.editable,r.nullable=t.nullable,r.length=t.length):(e||(e=this.fields?this.fields.slice():[]),e.push(t.clone()))}e&&this._set("fields",e)}_applyAssociatedLayerPropertyOverrides(){if(!this.associatedLayer)return;const e=["popupTemplate","popupEnabled","attributeTableTemplate"],t=f(this);for(let r=0;r<e.length;r++){const i=e[r],s=this.originIdOf(i),o=this.associatedLayer.originIdOf(i);s<o&&(2===o||3===o)&&t.setAtOrigin(i,this.associatedLayer[i],o)}}_applyAssociatedLayerExtentOverride(){const e=this.associatedLayer?.getAtOrigin("fullExtent","service");if(null==this.associatedLayer?.infoFor3D||!e||!D(this.associatedLayer?.url)||!de(this))return;f(this).setAtOrigin("fullExtent",e.clone(),2)}_applyAssociatedLayerPrivileges(){const e=this.associatedLayer;e&&(this._set("userHasEditingPrivileges",e.userHasEditingPrivileges),this._set("userHasFullEditingPrivileges",e.userHasFullEditingPrivileges),this._set("userHasUpdateItemPrivileges",e.userHasUpdateItemPrivileges))}async _setAssociatedFeatureLayer(e){if(["mesh-pyramids","points"].includes(this.profile))try{const{serverUrl:t,layerId:r,portalItem:i}=await U(`${this.url}/layers/${this.layerId}`,{sceneLayerItem:this.portalItem,customParameters:this.customParameters,apiKey:this.apiKey,signal:e}),s=await ae.FeatureLayer();this.associatedLayer=new s({url:t,customParameters:this.customParameters,layerId:r,portalItem:i}),await this.associatedLayer.load()}catch(t){y(t)||this._logWarningOnPopupEnabled()}}async _logWarningOnPopupEnabled(){const e=new AbortController;this.addHandles(a(e));try{await c(()=>this.popupEnabled&&null!=this.popupTemplate,e.signal)}catch(r){return void u(r)}const t=`this SceneLayer: ${this.title}`;null==this.attributeStorageInfo?n.getLogger(this).warn(`Associated FeatureLayer could not be loaded and no binary attributes found. Popups will not work on ${t}`):n.getLogger(this).info(`Associated FeatureLayer could not be loaded. Falling back to binary attributes for Popups on ${t}`)}_validateElevationInfo(){const e=this.elevationInfo;"mesh-pyramids"===this.profile&&fe(n.getLogger(this),me("Mesh scene layers","relative-to-scene",e)),fe(n.getLogger(this),ge("Scene layers",e))}async fetchStatistics(e,t){return await ye({fieldName:e,statisticsInfo:this.statisticsInfo,errorContext:"scenelayer",fieldsIndex:this.fieldsIndex,path:this.parsedUrl?.path??"",customParameters:this.customParameters,apiKey:this.apiKey,signal:t?.signal})}};e([h({types:{key:"type",base:$,typeMap:{selection:H}},json:{origins:{"web-scene":{name:"layerDefinition.featureReduction",write:{allowNull:!0}},"portal-item":{name:"layerDefinition.featureReduction",write:{allowNull:!0}}}}})],Oe.prototype,"featureReduction",void 0),e([h({type:[le],json:{read:!1,origins:{"web-scene":{name:"layerDefinition.rangeInfos",write:!0},"portal-item":{name:"layerDefinition.rangeInfos",write:!0}}},clonable:!1})],Oe.prototype,"rangeInfos",void 0),e([h({json:{read:!1}})],Oe.prototype,"associatedLayer",void 0),e([h({type:["show","hide"]})],Oe.prototype,"listMode",void 0),e([h({type:["ArcGISSceneServiceLayer"]})],Oe.prototype,"operationalLayerType",void 0),e([h({json:{read:!1},readOnly:!0})],Oe.prototype,"type",void 0),e([h({...Se.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Oe.prototype,"fields",void 0),e([h()],Oe.prototype,"types",null),e([h()],Oe.prototype,"typeIdField",null),e([h()],Oe.prototype,"templates",null),e([h()],Oe.prototype,"formTemplate",null),e([h({readOnly:!0})],Oe.prototype,"graphicOrigin",void 0),e([h({readOnly:!0,clonable:!1})],Oe.prototype,"fieldsIndex",null),e([h({type:oe,json:{read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo"}}})],Oe.prototype,"floorInfo",void 0),e([h(Se.outFields)],Oe.prototype,"outFields",void 0),e([h({type:J,readOnly:!0,json:{read:!1},clonable:!1})],Oe.prototype,"nodePages",void 0),e([m("service","nodePages",["nodePages","pointNodePages"])],Oe.prototype,"readNodePages",null),e([h({type:[X],readOnly:!0,clonable:!1})],Oe.prototype,"materialDefinitions",void 0),e([h({type:[Y],readOnly:!0,clonable:!1})],Oe.prototype,"textureSetDefinitions",void 0),e([h({type:[ee],readOnly:!0,clonable:!1})],Oe.prototype,"geometryDefinitions",void 0),e([h({readOnly:!0})],Oe.prototype,"serviceUpdateTimeStamp",void 0),e([h({readOnly:!0})],Oe.prototype,"attributeStorageInfo",void 0),e([h({readOnly:!0})],Oe.prototype,"statisticsInfo",void 0),e([h({type:s.ofType(Number),nonNullable:!0,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.excludeObjectIds",write:{enabled:!0}}})],Oe.prototype,"excludeObjectIds",void 0),e([h({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],Oe.prototype,"definitionExpression",void 0),e([h({type:pe,json:{name:"layerDefinition.polygonFilter",write:{enabled:!0,allowNull:!0},origins:{service:{read:!1,write:!1}}}})],Oe.prototype,"filter",void 0),e([h({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],Oe.prototype,"path",void 0),e([h(q)],Oe.prototype,"elevationInfo",null),e([h({readOnly:!0,json:{read:!1}})],Oe.prototype,"effectiveCapabilities",null),e([h({readOnly:!0})],Oe.prototype,"effectiveEditingEnabled",null),e([h({type:String})],Oe.prototype,"geometryType",null),e([h(C)],Oe.prototype,"labelsVisible",void 0),e([h({type:[ie],json:{origins:{service:{name:"drawingInfo.labelingInfo",read:{reader:se},write:!1}},name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:se},write:!0}})],Oe.prototype,"labelingInfo",void 0),e([h(G)],Oe.prototype,"legendEnabled",void 0),e([h({type:Number,json:{origins:{"web-document":{default:1,write:{enabled:!0,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}},read:{source:["opacity","layerDefinition.drawingInfo.transparency"],reader(e,t){if("number"==typeof e&&e>=0&&e<=1)return e;const r=t.layerDefinition?.drawingInfo?.transparency;return void 0!==r?je(r):void 0}}},"portal-item":{write:!0},service:{read:!1}}}})],Oe.prototype,"opacity",void 0),e([h({type:["Low","High"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Oe.prototype,"priority",void 0),e([h({type:["Labels"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Oe.prototype,"semantic",void 0),e([h({types:ce,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],Oe.prototype,"renderer",null),e([h({json:{read:!1}})],Oe.prototype,"cachedDrawingInfo",void 0),e([m("service","cachedDrawingInfo")],Oe.prototype,"readCachedDrawingInfo",null),e([h({readOnly:!0,json:{read:!1}})],Oe.prototype,"capabilities",null),e([h({type:Boolean,json:{read:!1}})],Oe.prototype,"editingEnabled",null),e([h({readOnly:!0,json:{write:!1,read:!1}})],Oe.prototype,"infoFor3D",null),e([h({readOnly:!0,json:{write:!1,read:!1}})],Oe.prototype,"relationships",null),e([h(N)],Oe.prototype,"popupEnabled",void 0),e([h({type:r,json:{name:"popupInfo",write:!0}})],Oe.prototype,"popupTemplate",void 0),e([h({readOnly:!0,json:{read:!1}})],Oe.prototype,"defaultPopupTemplate",null),e([h(Q)],Oe.prototype,"attributeTableTemplate",void 0),e([h({type:String,json:{read:!1}})],Oe.prototype,"objectIdField",void 0),e([m("service","objectIdField",["objectIdField","fields"])],Oe.prototype,"readObjectIdField",null),e([h({type:String,json:{read:!1}})],Oe.prototype,"globalIdField",void 0),e([m("service","globalIdField",["globalIdField","fields"])],Oe.prototype,"readGlobalIdField",null),e([h({readOnly:!0,type:String,json:{read:!1}})],Oe.prototype,"displayField",null),e([h({type:String,json:{read:!1}})],Oe.prototype,"profile",void 0),e([m("service","profile",["store.profile"])],Oe.prototype,"readProfile",null),e([h({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],Oe.prototype,"normalReferenceFrame",void 0),e([h(V)],Oe.prototype,"screenSizePerspectiveEnabled",void 0),e([h({json:{read:!1,origins:{service:{read:!0}}}})],Oe.prototype,"serviceItemId",void 0),e([h(x)],Oe.prototype,"useViewTime",null),Oe=e([g("esri.layers.SceneLayer")],Oe);const _e={"mesh-pyramids":"mesh-pyramids",meshpyramids:"mesh-pyramids","features-meshes":"mesh-pyramids",points:"points","features-points":"points",lines:"lines","features-lines":"lines",polygons:"polygons","features-polygons":"polygons"},Pe={"mesh-pyramids":"mesh",points:"point"},Ae=Oe;export{Ae as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../../Graphic.js";import r from"../../PopupTemplate.js";import o from"../../request.js";import s from"../../core/Error.js";import{JSONMap as i}from"../../core/jsonMap.js";import{LoadableMixin as a}from"../../core/Loadable.js";import n from"../../core/Logger.js";import{EsriPromiseMixin as p}from"../../core/Promise.js";import{property as l}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/RandomLCG.js";import{enumeration as y}from"../../core/accessorSupport/decorators/enumeration.js";import{reader as u}from"../../core/accessorSupport/decorators/reader.js";import{subclass as d}from"../../core/accessorSupport/decorators/subclass.js";import c from"../../geometry/Extent.js";import m from"../../geometry/SpatialReference.js";import h from"../FeatureLayer.js";import f from"./BuildingSublayer.js";import{zeroCapabilities as g}from"../support/capabilities.js";import{popupEnabled as j}from"../support/commonProperties.js";import{getFieldDomain as v}from"../support/featureLayerUtils.js";import{defineFieldProperties as b}from"../support/fieldProperties.js";import L from"../support/FieldsIndex.js";import{unpackFieldNames as I}from"../support/fieldUtils.js";import{fetchIndexInfo as S}from"../support/I3SIndexInfo.js";import{I3SNodePageDefinition as F,I3SMaterialDefinition as w,I3STextureSetDefinition as O,I3SGeometryDefinition as x}from"../support/I3SLayerDefinitions.js";import{webSceneRendererTypes as P}from"../../renderers/support/typeUtils.js";import q from"../../rest/support/Query.js";import{isNumber as T}from"../../support/guards.js";import{createPopupTemplate as Q}from"../../support/popupUtils.js";import U from"../../symbols/support/ElevationInfo.js";import{queryAttributesFromCachedAttributesId as E}from"../../views/3d/layers/i3s/I3SUtil.js";import{getRequiredFields as D,getFetchPopupTemplate as R}from"../../views/layers/support/popupUtils.js";const A=b();let _=class extends(a(p(f))){constructor(e){super(e),this.type="building-component",this.nodePages=null,this.materialDefinitions=[],this.textureSetDefinitions=[],this.geometryDefinitions=[],this.indexInfo=null,this.serviceUpdateTimeStamp=null,this.store=null,this.attributeStorageInfo=[],this.fields=[],this.associatedLayer=null,this.outFields=null,this.listMode="show",this.renderer=null,this.definitionExpression=null,this.popupEnabled=!0,this.popupTemplate=null,this.layerType="3d-object"}get parsedUrl(){return this.layer?{path:`${this.layer.parsedUrl?.path}/sublayers/${this.id}`,query:this.layer.parsedUrl?.query}:{path:""}}get fieldsIndex(){return new L(this.fields)}readAssociatedLayer(e,t){const r=this.layer.associatedFeatureServiceItem,o=t.associatedLayerID;return null!=r&&"number"==typeof o?new h({portalItem:r,customParameters:this.customParameters,layerId:o}):null}get objectIdField(){if(null!=this.fields)for(const e of this.fields)if("oid"===e.type)return e.name;return""}get globalIdField(){if(null!=this.fields)for(const e of this.fields)if("global-id"===e.type)return e.name;return""}get displayField(){return null!=this.associatedLayer?this.associatedLayer.displayField:void 0}get apiKey(){return this.layer.apiKey}get customParameters(){return this.layer.customParameters}get fullExtent(){return this.layer.fullExtent}get spatialReference(){return this.layer.spatialReference}get version(){return this.layer.version}get elevationInfo(){return this.layer.elevationInfo}get minScale(){return this.layer.minScale}get maxScale(){return this.layer.maxScale}get effectiveScaleRange(){return this.layer.effectiveScaleRange}get defaultPopupTemplate(){return this.createPopupTemplate()}load(e){const t=null!=e?e.signal:null,r=this._fetchService(t).then(()=>{this.indexInfo=S(this.parsedUrl.path,this.rootNode,this.nodePages,this.customParameters,this.apiKey,n.getLogger(this),t)});return this.addResolvingPromise(r),Promise.resolve(this)}createPopupTemplate(e){return Q(this,e)}async _fetchService(e){const t=(await o(this.parsedUrl.path,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e})).data;this.read(t,{origin:"service",url:this.parsedUrl})}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const r=this.getField(e)?.domain??null;return this.associatedLayer?v(this.associatedLayer,e,t,r):r}getFeatureType(e){return e&&null!=this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){return null!=this.associatedLayer?this.associatedLayer.types??[]:[]}get typeIdField(){return null!=this.associatedLayer?this.associatedLayer.typeIdField:null}get geometryType(){return"3d-object"===this.layerType?"mesh":"point"}get profile(){return"3d-object"===this.layerType?"mesh-pyramids":"points"}get capabilities(){const e=null!=this.associatedLayer&&this.associatedLayer.capabilities?this.associatedLayer.capabilities:g,{query:t,operations:{supportsQuery:r},data:{supportsZ:o,supportsM:s,isVersioned:i}}=e;return{query:t,operations:{supportsQuery:r},data:{supportsZ:o,supportsM:s,isVersioned:i}}}createQuery(){const e=new q;return"mesh"!==this.geometryType&&(e.returnGeometry=!0,e.returnZ=!0),e.where=this.definitionExpression||"1=1",e.sqlFormat="standard",e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryExtent(e||this.createQuery(),t))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryFeatureCount(e||this.createQuery(),t))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryFeatures(e||this.createQuery(),t)).then(e=>{if(e?.features)for(const t of e.features)t.layer=this.layer,t.sourceLayer=this;return e})}async queryObjectIds(e,t){const r=await this._getAssociatedLayerForQuery();return(await r.queryObjectIds(e||this.createQuery(),t)).filter(T)}async queryCachedAttributes(e,t){const r=I(this.fieldsIndex,await D(this,R(this)));return E(this.parsedUrl.path,this.attributeStorageInfo,e,t,r,this.apiKey,this.customParameters)}async queryCachedFeature(e,r){const o=await this.queryCachedAttributes(e,[r]);if(!o||0===o.length)throw new s("scenelayer:feature-not-in-cached-data","Feature not found in cached data");return new t({attributes:o[0],layer:this,sourceLayer:this})}getFieldUsageInfo(e){return this.fieldsIndex.has(e)?{supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1}:{supportsLabelingInfo:!1,supportsRenderer:!0,supportsPopupTemplate:!0,supportsLayerQuery:null!=this.associatedLayer}}_getAssociatedLayerForQuery(){const e=this.associatedLayer;return null!=e&&e.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),null==this.associatedLayer)throw new s("buildingscenelayer:query-not-available","BuildingSceneLayer component layer queries are not available without an associated feature layer",{layer:this});try{await this.associatedLayer.load()}catch(e){throw new s("buildingscenelayer:query-not-available","BuildingSceneLayer associated feature layer could not be loaded",{layer:this,error:e})}return this.associatedLayer}};e([l({readOnly:!0})],_.prototype,"parsedUrl",null),e([l({type:F,readOnly:!0})],_.prototype,"nodePages",void 0),e([l({type:[w],readOnly:!0})],_.prototype,"materialDefinitions",void 0),e([l({type:[O],readOnly:!0})],_.prototype,"textureSetDefinitions",void 0),e([l({type:[x],readOnly:!0})],_.prototype,"geometryDefinitions",void 0),e([l({readOnly:!0})],_.prototype,"serviceUpdateTimeStamp",void 0),e([l({readOnly:!0})],_.prototype,"store",void 0),e([l({type:String,readOnly:!0,json:{read:{source:"store.rootNode"}}})],_.prototype,"rootNode",void 0),e([l({readOnly:!0})],_.prototype,"attributeStorageInfo",void 0),e([l(A.fields)],_.prototype,"fields",void 0),e([l({readOnly:!0})],_.prototype,"fieldsIndex",null),e([l({readOnly:!0,type:h})],_.prototype,"associatedLayer",void 0),e([u("service","associatedLayer",["associatedLayerID"])],_.prototype,"readAssociatedLayer",null),e([l(A.outFields)],_.prototype,"outFields",void 0),e([l({type:String,readOnly:!0})],_.prototype,"objectIdField",null),e([l({type:String,readOnly:!0})],_.prototype,"globalIdField",null),e([l({readOnly:!0,type:String,json:{read:!1}})],_.prototype,"displayField",null),e([l({readOnly:!0,type:String})],_.prototype,"apiKey",null),e([l({readOnly:!0,type:String})],_.prototype,"customParameters",null),e([l({readOnly:!0,type:c})],_.prototype,"fullExtent",null),e([l({readOnly:!0,type:m})],_.prototype,"spatialReference",null),e([l({readOnly:!0})],_.prototype,"version",null),e([l({readOnly:!0,type:U})],_.prototype,"elevationInfo",null),e([l({readOnly:!0,type:Number})],_.prototype,"minScale",null),e([l({readOnly:!0,type:Number})],_.prototype,"maxScale",null),e([l({readOnly:!0,type:Number})],_.prototype,"effectiveScaleRange",null),e([l({type:["hide","show"],json:{write:!0}})],_.prototype,"listMode",void 0),e([l({types:P,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],_.prototype,"renderer",void 0),e([l({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],_.prototype,"definitionExpression",void 0),e([l(j)],_.prototype,"popupEnabled",void 0),e([l({type:r,json:{read:{source:"popupInfo"},write:{target:"popupInfo"}}})],_.prototype,"popupTemplate",void 0),e([l({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],_.prototype,"normalReferenceFrame",void 0),e([l({readOnly:!0,json:{read:!1}})],_.prototype,"defaultPopupTemplate",null),e([l()],_.prototype,"types",null),e([l()],_.prototype,"typeIdField",null),e([l({json:{write:!1}}),y(new i({"3DObject":"3d-object",Point:"point"}))],_.prototype,"layerType",void 0),e([l()],_.prototype,"geometryType",null),e([l()],_.prototype,"profile",null),e([l({readOnly:!0,json:{read:!1}})],_.prototype,"capabilities",null),e([l({readOnly:!0})],_.prototype,"statisticsInfo",void 0),_=e([d("esri.layers.buildingSublayers.BuildingComponentSublayer")],_);export{_ as default};
5
+ import{__decorate as e}from"tslib";import t from"../../Graphic.js";import r from"../../PopupTemplate.js";import o from"../../request.js";import s from"../../core/Error.js";import{JSONMap as i}from"../../core/jsonMap.js";import{LoadableMixin as a}from"../../core/Loadable.js";import n from"../../core/Logger.js";import{EsriPromiseMixin as p}from"../../core/Promise.js";import{property as l}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/RandomLCG.js";import{enumeration as y}from"../../core/accessorSupport/decorators/enumeration.js";import{reader as u}from"../../core/accessorSupport/decorators/reader.js";import{subclass as d}from"../../core/accessorSupport/decorators/subclass.js";import c from"../../geometry/Extent.js";import m from"../../geometry/SpatialReference.js";import h from"../../graphic/BuildingGraphicOrigin.js";import f from"../FeatureLayer.js";import g from"./BuildingSublayer.js";import{zeroCapabilities as j}from"../support/capabilities.js";import{popupEnabled as v}from"../support/commonProperties.js";import{getFieldDomain as b}from"../support/featureLayerUtils.js";import{defineFieldProperties as L}from"../support/fieldProperties.js";import I from"../support/FieldsIndex.js";import{unpackFieldNames as S}from"../support/fieldUtils.js";import{fetchIndexInfo as F}from"../support/I3SIndexInfo.js";import{I3SNodePageDefinition as w,I3SMaterialDefinition as O,I3STextureSetDefinition as x,I3SGeometryDefinition as P}from"../support/I3SLayerDefinitions.js";import{webSceneRendererTypes as q}from"../../renderers/support/typeUtils.js";import T from"../../rest/support/Query.js";import{isNumber as Q}from"../../support/guards.js";import{createPopupTemplate as U}from"../../support/popupUtils.js";import E from"../../symbols/support/ElevationInfo.js";import{queryAttributesFromCachedAttributesId as D}from"../../views/3d/layers/i3s/I3SUtil.js";import{getRequiredFields as R,getFetchPopupTemplate as A}from"../../views/layers/support/popupUtils.js";const _=L();let C=class extends(a(p(g))){constructor(e){super(e),this.type="building-component",this.nodePages=null,this.materialDefinitions=[],this.textureSetDefinitions=[],this.geometryDefinitions=[],this.indexInfo=null,this.serviceUpdateTimeStamp=null,this.store=null,this.attributeStorageInfo=[],this.fields=[],this.associatedLayer=null,this.outFields=null,this.listMode="show",this.renderer=null,this.definitionExpression=null,this.popupEnabled=!0,this.popupTemplate=null,this.layerType="3d-object"}initialize(){this._set("graphicOrigin",new h(this))}get parsedUrl(){return this.layer?{path:`${this.layer.parsedUrl?.path}/sublayers/${this.id}`,query:this.layer.parsedUrl?.query}:{path:""}}get fieldsIndex(){return new I(this.fields)}readAssociatedLayer(e,t){const r=this.layer.associatedFeatureServiceItem,o=t.associatedLayerID;return null!=r&&"number"==typeof o?new f({portalItem:r,customParameters:this.customParameters,layerId:o}):null}get objectIdField(){if(null!=this.fields)for(const e of this.fields)if("oid"===e.type)return e.name;return""}get globalIdField(){if(null!=this.fields)for(const e of this.fields)if("global-id"===e.type)return e.name;return""}get displayField(){return null!=this.associatedLayer?this.associatedLayer.displayField:void 0}get apiKey(){return this.layer.apiKey}get customParameters(){return this.layer.customParameters}get fullExtent(){return this.layer.fullExtent}get spatialReference(){return this.layer.spatialReference}get version(){return this.layer.version}get elevationInfo(){return this.layer.elevationInfo}get minScale(){return this.layer.minScale}get maxScale(){return this.layer.maxScale}get effectiveScaleRange(){return this.layer.effectiveScaleRange}get defaultPopupTemplate(){return this.createPopupTemplate()}load(e){const t=null!=e?e.signal:null,r=this._fetchService(t).then(()=>{this.indexInfo=F(this.parsedUrl.path,this.rootNode,this.nodePages,this.customParameters,this.apiKey,n.getLogger(this),t)});return this.addResolvingPromise(r),Promise.resolve(this)}createPopupTemplate(e){return U(this,e)}async _fetchService(e){const t=(await o(this.parsedUrl.path,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e})).data;this.read(t,{origin:"service",url:this.parsedUrl})}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const r=this.getField(e)?.domain??null;return this.associatedLayer?b(this.associatedLayer,e,t,r):r}getFeatureType(e){return e&&null!=this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){return null!=this.associatedLayer?this.associatedLayer.types??[]:[]}get typeIdField(){return null!=this.associatedLayer?this.associatedLayer.typeIdField:null}get geometryType(){return"3d-object"===this.layerType?"mesh":"point"}get profile(){return"3d-object"===this.layerType?"mesh-pyramids":"points"}get capabilities(){const e=null!=this.associatedLayer&&this.associatedLayer.capabilities?this.associatedLayer.capabilities:j,{query:t,operations:{supportsQuery:r},data:{supportsZ:o,supportsM:s,isVersioned:i}}=e;return{query:t,operations:{supportsQuery:r},data:{supportsZ:o,supportsM:s,isVersioned:i}}}createQuery(){const e=new T;return"mesh"!==this.geometryType&&(e.returnGeometry=!0,e.returnZ=!0),e.where=this.definitionExpression||"1=1",e.sqlFormat="standard",e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryExtent(e||this.createQuery(),t))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryFeatureCount(e||this.createQuery(),t))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryFeatures(e||this.createQuery(),t)).then(e=>{if(e?.features)for(const t of e.features)t.layer=this.layer,t.sourceLayer=this;return e})}async queryObjectIds(e,t){const r=await this._getAssociatedLayerForQuery();return(await r.queryObjectIds(e||this.createQuery(),t)).filter(Q)}async queryCachedAttributes(e,t){const r=S(this.fieldsIndex,await R(this,A(this)));return D(this.parsedUrl.path,this.attributeStorageInfo,e,t,r,this.apiKey,this.customParameters)}async queryCachedFeature(e,r){const o=await this.queryCachedAttributes(e,[r]);if(!o||0===o.length)throw new s("scenelayer:feature-not-in-cached-data","Feature not found in cached data");return new t({attributes:o[0],layer:this,sourceLayer:this})}getFieldUsageInfo(e){return this.fieldsIndex.has(e)?{supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1}:{supportsLabelingInfo:!1,supportsRenderer:!0,supportsPopupTemplate:!0,supportsLayerQuery:null!=this.associatedLayer}}_getAssociatedLayerForQuery(){const e=this.associatedLayer;return null!=e&&e.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),null==this.associatedLayer)throw new s("buildingscenelayer:query-not-available","BuildingSceneLayer component layer queries are not available without an associated feature layer",{layer:this});try{await this.associatedLayer.load()}catch(e){throw new s("buildingscenelayer:query-not-available","BuildingSceneLayer associated feature layer could not be loaded",{layer:this,error:e})}return this.associatedLayer}};e([l({readOnly:!0})],C.prototype,"parsedUrl",null),e([l({type:w,readOnly:!0})],C.prototype,"nodePages",void 0),e([l({type:[O],readOnly:!0})],C.prototype,"materialDefinitions",void 0),e([l({type:[x],readOnly:!0})],C.prototype,"textureSetDefinitions",void 0),e([l({type:[P],readOnly:!0})],C.prototype,"geometryDefinitions",void 0),e([l({readOnly:!0})],C.prototype,"serviceUpdateTimeStamp",void 0),e([l({readOnly:!0})],C.prototype,"store",void 0),e([l({type:String,readOnly:!0,json:{read:{source:"store.rootNode"}}})],C.prototype,"rootNode",void 0),e([l({readOnly:!0})],C.prototype,"attributeStorageInfo",void 0),e([l(_.fields)],C.prototype,"fields",void 0),e([l({readOnly:!0})],C.prototype,"fieldsIndex",null),e([l({readOnly:!0,type:f})],C.prototype,"associatedLayer",void 0),e([u("service","associatedLayer",["associatedLayerID"])],C.prototype,"readAssociatedLayer",null),e([l(_.outFields)],C.prototype,"outFields",void 0),e([l({type:String,readOnly:!0})],C.prototype,"objectIdField",null),e([l({type:String,readOnly:!0})],C.prototype,"globalIdField",null),e([l({readOnly:!0,type:String,json:{read:!1}})],C.prototype,"displayField",null),e([l({readOnly:!0,type:String})],C.prototype,"apiKey",null),e([l({readOnly:!0,type:String})],C.prototype,"customParameters",null),e([l({readOnly:!0,type:c})],C.prototype,"fullExtent",null),e([l({readOnly:!0,type:m})],C.prototype,"spatialReference",null),e([l({readOnly:!0})],C.prototype,"version",null),e([l({readOnly:!0,type:E})],C.prototype,"elevationInfo",null),e([l({readOnly:!0,type:Number})],C.prototype,"minScale",null),e([l({readOnly:!0,type:Number})],C.prototype,"maxScale",null),e([l({readOnly:!0,type:Number})],C.prototype,"effectiveScaleRange",null),e([l({type:["hide","show"],json:{write:!0}})],C.prototype,"listMode",void 0),e([l({types:q,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],C.prototype,"renderer",void 0),e([l({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],C.prototype,"definitionExpression",void 0),e([l(v)],C.prototype,"popupEnabled",void 0),e([l({type:r,json:{read:{source:"popupInfo"},write:{target:"popupInfo"}}})],C.prototype,"popupTemplate",void 0),e([l({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],C.prototype,"normalReferenceFrame",void 0),e([l({readOnly:!0,json:{read:!1}})],C.prototype,"defaultPopupTemplate",null),e([l({readOnly:!0})],C.prototype,"graphicOrigin",void 0),e([l()],C.prototype,"types",null),e([l()],C.prototype,"typeIdField",null),e([l({json:{write:!1}}),y(new i({"3DObject":"3d-object",Point:"point"}))],C.prototype,"layerType",void 0),e([l()],C.prototype,"geometryType",null),e([l()],C.prototype,"profile",null),e([l({readOnly:!0,json:{read:!1}})],C.prototype,"capabilities",null),e([l({readOnly:!0})],C.prototype,"statisticsInfo",void 0),C=e([d("esri.layers.buildingSublayers.BuildingComponentSublayer")],C);export{C as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../Graphic.js";import"../../core/has.js";import{clone as t}from"../../core/lang.js";import{isFloat32Array as n,isFloat64Array as r}from"../../core/typedArrayUtil.js";import a from"../../geometry/SpatialReference.js";import{fromJSON as s}from"../../geometry/support/jsonUtils.js";import{makeDehydratedPoint as i}from"./dehydratedPoint.js";function o(e){return"declaredClass"in e}function m(e){return"declaredClass"in e}function l(e){return"declaredClass"in e}function c(n,r){return n?l(n)?n:new e({layer:r,sourceLayer:r,visible:n.visible,symbol:t(n.symbol),attributes:t(n.attributes),geometry:u(n.geometry)}):null}function u(e){return null==e?null:o(e)?e:s(f(e))}function f(e){const{wkid:t,wkt:n,wkt2:r,latestWkid:a}=e.spatialReference,s={wkid:t,wkt:n,wkt2:r,latestWkid:a};switch(e.type){case"point":{const{x:t,y:n,z:r,m:a}=e;return{x:t,y:n,z:r,m:a,spatialReference:s}}case"polygon":{const{rings:t,hasZ:n,hasM:r}=e;return{rings:p(t),hasZ:n,hasM:r,spatialReference:s}}case"polyline":{const{paths:t,hasZ:n,hasM:r}=e;return{paths:p(t),hasZ:n,hasM:r,spatialReference:s}}case"extent":{const{xmin:t,xmax:n,ymin:r,ymax:a,zmin:i,zmax:o,mmin:m,mmax:l,hasZ:c,hasM:u}=e;return{xmin:t,xmax:n,ymin:r,ymax:a,zmin:i,zmax:o,mmin:m,mmax:l,hasZ:c,hasM:u,spatialReference:s}}case"multipoint":{const{points:t,hasZ:n,hasM:r}=e;return{points:d(t)?h(t):t,hasZ:n,hasM:r,spatialReference:s}}default:return}}function p(e){return y(e)?e.map(e=>h(e)):e}function h(e){return e.map(e=>Array.from(e))}function y(e){for(const t of e)if(0!==t.length)return d(t);return!1}function d(e){return e.length>0&&(n(e[0])||r(e[0]))}function x(e,t){if(!e)return null;let n;if(m(e)){if(null==t)return e.clone();if(m(t))return t.copy(e)}return null!=t?(n=t,n.x=e.x,n.y=e.y,n.spatialReference=e.spatialReference,e.hasZ?(n.z=e.z,n.hasZ=e.hasZ):(n.z=void 0,n.hasZ=!1),e.hasM?(n.m=e.m,n.hasM=!0):(n.m=void 0,n.hasM=!1)):(n=i(e.x,e.y,e.z,e.spatialReference),e.hasM&&(n.m=e.m,n.hasM=!0)),n}function k(e){const{wkid:t,wkt:n,wkt2:r,latestWkid:s}=e,i={wkid:t,wkt:n,wkt2:r,latestWkid:s};return a.fromJSON(i)}export{x as clonePoint,u as hydrateGeometry,c as hydrateGraphic,k as hydratedSpatialReference,o as isHydratedGeometry,l as isHydratedGraphic,m as isHydratedPoint};
5
+ import e from"../../Graphic.js";import"../../core/has.js";import{clone as t}from"../../core/lang.js";import{isFloat32Array as n,isFloat64Array as r}from"../../core/typedArrayUtil.js";import a from"../../geometry/SpatialReference.js";import{fromJSON as s}from"../../geometry/support/jsonUtils.js";import{makeDehydratedPoint as i}from"./dehydratedPoint.js";function o(e){return"declaredClass"in e}function m(e){return"declaredClass"in e}function l(e){return"declaredClass"in e}function c(n,r,a){return n?l(n)?(n.origin!==a&&(n.origin=a),n):new e({layer:r,sourceLayer:r,origin:a,visible:n.visible,symbol:t(n.symbol),attributes:t(n.attributes),geometry:u(n.geometry)}):null}function u(e){return null==e?null:o(e)?e:s(f(e))}function f(e){const{wkid:t,wkt:n,wkt2:r,latestWkid:a}=e.spatialReference,s={wkid:t,wkt:n,wkt2:r,latestWkid:a};switch(e.type){case"point":{const{x:t,y:n,z:r,m:a}=e;return{x:t,y:n,z:r,m:a,spatialReference:s}}case"polygon":{const{rings:t,hasZ:n,hasM:r}=e;return{rings:p(t),hasZ:n,hasM:r,spatialReference:s}}case"polyline":{const{paths:t,hasZ:n,hasM:r}=e;return{paths:p(t),hasZ:n,hasM:r,spatialReference:s}}case"extent":{const{xmin:t,xmax:n,ymin:r,ymax:a,zmin:i,zmax:o,mmin:m,mmax:l,hasZ:c,hasM:u}=e;return{xmin:t,xmax:n,ymin:r,ymax:a,zmin:i,zmax:o,mmin:m,mmax:l,hasZ:c,hasM:u,spatialReference:s}}case"multipoint":{const{points:t,hasZ:n,hasM:r}=e;return{points:d(t)?h(t):t,hasZ:n,hasM:r,spatialReference:s}}default:return}}function p(e){return y(e)?e.map(e=>h(e)):e}function h(e){return e.map(e=>Array.from(e))}function y(e){for(const t of e)if(0!==t.length)return d(t);return!1}function d(e){return e.length>0&&(n(e[0])||r(e[0]))}function x(e,t){if(!e)return null;let n;if(m(e)){if(null==t)return e.clone();if(m(t))return t.copy(e)}return null!=t?(n=t,n.x=e.x,n.y=e.y,n.spatialReference=e.spatialReference,e.hasZ?(n.z=e.z,n.hasZ=e.hasZ):(n.z=void 0,n.hasZ=!1),e.hasM?(n.m=e.m,n.hasM=!0):(n.m=void 0,n.hasM=!1)):(n=i(e.x,e.y,e.z,e.spatialReference),e.hasM&&(n.m=e.m,n.hasM=!0)),n}function k(e){const{wkid:t,wkt:n,wkt2:r,latestWkid:s}=e,i={wkid:t,wkt:n,wkt2:r,latestWkid:s};return a.fromJSON(i)}export{x as clonePoint,u as hydrateGeometry,c as hydrateGraphic,k as hydratedSpatialReference,o as isHydratedGeometry,l as isHydratedGraphic,m as isHydratedPoint};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import r from"../../request.js";import{JSONSupport as o}from"../../core/JSONSupport.js";import{clone as s}from"../../core/lang.js";import{on as t,sync as i}from"../../core/reactiveUtils.js";import{property as a}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import{reader as p}from"../../core/accessorSupport/decorators/reader.js";import{subclass as c}from"../../core/accessorSupport/decorators/subclass.js";import{persistable as n}from"../../core/accessorSupport/decorators/persistable.js";import m from"./PolygonCollection.js";import{f as l}from"../../chunks/persistableUrlUtils.js";var u;let g=u=class extends o{constructor(e){super(e),this.spatialRelationship="disjoint",this.geometries=new m,this._geometriesSource=null}initialize(){this.addHandles(t(()=>this.geometries,"after-changes",()=>this.geometries=this.geometries,i))}readGeometries(e,r,o){Array.isArray(e)?this.geometries=m.fromJSON(e,o):this._geometriesSource={url:l(e,o),context:o}}async loadGeometries(e,o){if(null==this._geometriesSource)return;const{url:s,context:t}=this._geometriesSource,i=await r(s,{responseType:"json",signal:o?.signal}),a=e.toJSON(),p=i.data.map(e=>({...e,spatialReference:a}));this.geometries=m.fromJSON(p,t),this._geometriesSource=null}clone(){const e=new u({geometries:s(this.geometries),spatialRelationship:this.spatialRelationship});return e._geometriesSource=this._geometriesSource,e}};e([a({type:["disjoint","contains"],nonNullable:!0,json:{write:{isRequired:!0}}})],g.prototype,"spatialRelationship",void 0),e([a({type:m,nonNullable:!0,json:{write:!0,origins:{"web-scene":{write:{isRequired:!0}}}}}),n({origins:["web-scene","portal-item"],type:"resource",prefix:"geometries",contentAddressed:!0})],g.prototype,"geometries",void 0),e([p(["web-scene","portal-item"],"geometries")],g.prototype,"readGeometries",null),g=u=e([c("esri.layers.support.SceneFilter")],g);const d=g;export{d as default};
5
+ import{__decorate as e}from"tslib";import r from"../../request.js";import{JSONSupport as o}from"../../core/JSONSupport.js";import{clone as s}from"../../core/lang.js";import{on as t,sync as i}from"../../core/reactiveUtils.js";import{property as a}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import{reader as p}from"../../core/accessorSupport/decorators/reader.js";import{subclass as n}from"../../core/accessorSupport/decorators/subclass.js";import{persistable as c}from"../../core/accessorSupport/decorators/persistable.js";import m from"./PolygonCollection.js";import{f as l}from"../../chunks/persistableUrlUtils.js";var u;let g=u=class extends o{constructor(e){super(e),this.spatialRelationship="disjoint",this.geometries=new m,this._geometriesSource=null}initialize(){this.addHandles(t(()=>this.geometries,"after-changes",()=>this.geometries=this.geometries,i))}readGeometries(e,r,o){Array.isArray(e)?this.geometries=m.fromJSON(e,o):"web-scene"!==o.origin&&"portal-item"!==o.origin||(this._geometriesSource={url:l(e,o),context:o})}async loadGeometries(e,o){if(null==this._geometriesSource)return;const{url:s,context:t}=this._geometriesSource,i=await r(s,{responseType:"json",signal:o?.signal}),a=e.toJSON(),p=i.data.map(e=>({...e,spatialReference:a}));this.geometries=m.fromJSON(p,t),this._geometriesSource=null}clone(){const e=new u({geometries:s(this.geometries),spatialRelationship:this.spatialRelationship});return e._geometriesSource=this._geometriesSource,e}};e([a({type:["disjoint","contains"],nonNullable:!0,json:{write:{isRequired:!0}}})],g.prototype,"spatialRelationship",void 0),e([a({type:m,nonNullable:!0,json:{write:!0,origins:{"web-scene":{write:{isRequired:!0}}}}}),c({origins:["web-scene","portal-item"],type:"resource",prefix:"geometries",contentAddressed:!0})],g.prototype,"geometries",void 0),e([p(["web-scene","portal-item","service"],"geometries")],g.prototype,"readGeometries",null),g=u=e([n("esri.layers.support.SceneFilter")],g);const d=g;export{d as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/core",
3
- "version": "4.34.0-next.57",
3
+ "version": "4.34.0-next.58",
4
4
  "homepage": "https://js.arcgis.com",
5
5
  "description": "ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API",
6
6
  "keywords": [
@@ -20,7 +20,7 @@
20
20
  "dependencies": {
21
21
  "@esri/arcgis-html-sanitizer": "~4.1.0",
22
22
  "@esri/calcite-components": "^3.2.1",
23
- "@vaadin/grid": "~24.8.4",
23
+ "@vaadin/grid": "~24.8.5",
24
24
  "@zip.js/zip.js": "~2.7.72",
25
25
  "luxon": "~3.7.1",
26
26
  "marked": "~16.1.2",
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- const c="20250809",e="c1714d8c08c66e85352c9a99864f65ccff60351e";export{c as buildDate,e as commitHash};
5
+ const e="20250812",f="3c91c09faee3f1dfeb817727224917594f208787";export{e as buildDate,f as commitHash};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../core/Error.js";import has from"../../../core/has.js";import{removeMaybe as t}from"../../../core/maybe.js";import{addFrameTask as r}from"../../../core/scheduling.js";import{signal as s}from"../../../core/signal.js";import{create as i}from"../../../core/libs/gl-matrix-2/factories/mat3f32.js";import{CIMAnalyzer as n}from"../../../symbols/cim/cimAnalyzer.js";import{Container as a}from"./Container.js";import{MAX_TILE_RESHUFFLES_PER_FRAME as o}from"./webgl/definitions.js";import h from"./webgl/Painter.js";import{ArrayBufferPool as d}from"./webgl/PooledUint32Array.js";import{Profiler as l}from"./webgl/Profiler.js";import{TileReshuffleManager as m}from"./webgl/TileReshuffleManager.js";import{startup as u,shutdown as c}from"./webgl/shaderGraph/techniques/TechniqueRegistry.js";import{MeshWriterRegistry as p}from"./webgl/shaderGraph/techniques/mesh/MeshWriterRegistry.js";import{Timeline as g}from"../support/Timeline.js";import{SizedPixelFormat as f,SizedDepthStencilFormat as _,PixelType as b}from"../../webgl/enums.js";import{FramebufferObject as w}from"../../webgl/FramebufferObject.js";import{RenderbufferDescriptor as R}from"../../webgl/RenderbufferDescriptor.js";import{RenderingContext as y}from"../../webgl/RenderingContext.js";import{RenderingContextOptions as x}from"../../webgl/RenderingContextOptions.js";import{TextureDescriptor as C}from"../../webgl/TextureDescriptor.js";const P=2e3;class j extends a{constructor(t,i,a){super(),this.meshWriterRegistry=new p,this._trash=new Set,this._renderRemainingTime=0,this._lastFrameRenderTime=0,this._renderRequested=s(!1),this.stage=this,this._stationary=!0,this._reshuffleManager=new m,this._managedCanvas=a,this.context=new y(this._managedCanvas.gl,i.contextOptions??new x),this.painter=new h(this.context,this),this._cimAnalyzer=new n(this.painter.textureManager.resourceManager),has("esri-2d-profiler")&&null!=t&&(this._debugOutput=document.createElement("div"),this._debugOutput.setAttribute("style","margin: 24px 64px; position: absolute; color: red;"),t.appendChild(this._debugOutput));const o=()=>this.highlightGradient;this._renderParameters={drawPhase:0,state:this.state,pixelRatio:window.devicePixelRatio,stationary:!1,globalOpacity:1,blendMode:null,deltaTime:-1,time:0,inFadeTransition:!1,effects:null,context:this.context,painter:this.painter,timeline:i.timeline||new g,renderingOptions:i.renderingOptions,requestRender:()=>this.requestRender(),allowDelayedRender:!1,requireFBO:!1,profiler:new l(this.context,this._debugOutput),dataUploadCounter:0,get highlightGradient(){return o()},reshuffleManager:this._reshuffleManager,backgroundColor:i.backgroundColor};let c=e=>this.renderFrame(e);null!=i.renderFrame&&(c=i.renderFrame),this._taskHandle=r({render:e=>c(e)}),this._taskHandle.pause(),this._lostWebGLContextHandle=this._managedCanvas.events.on("webgl-context-lost",t=>this.emit("webgl-error",{error:new e("webgl-context-lost",t.statusMessage)})),this._bufferPool=new d,u()}destroy(){super.destroy(),c(this.context),this.removeAllChildren(),this._emptyTrash(),this._taskHandle=t(this._taskHandle),this._lostWebGLContextHandle=t(this._lostWebGLContextHandle),this._managedCanvas.destroy(),this._debugOutput?.parentNode?.removeChild(this._debugOutput),this._bufferPool.destroy(),this.painter.dispose(),this.context.dispose(),this._managedCanvas=null}get textureManager(){return this.painter.textureManager}get backgroundColor(){return this._renderParameters.backgroundColor}set backgroundColor(e){this._renderParameters.backgroundColor=e,this.requestRender()}get canvas(){return this._managedCanvas.canvas}get bufferPool(){return this._bufferPool}get cimAnalyzer(){return this._cimAnalyzer}get renderingOptions(){return this._renderingOptions}set renderingOptions(e){this._renderingOptions=e,this.requestRender()}get renderRequested(){return this._renderRequested.value}get state(){return this._state}set state(e){this._state=e,this.requestRender()}get stationary(){return this._stationary}set stationary(e){this._stationary!==e&&(this._stationary=e,this.requestRender())}trashDisplayObject(e){this._trash.add(e),this.requestRender()}untrashDisplayObject(e){return this._trash.delete(e)}requestRender(){this._renderRemainingTime=P,this.renderRequested||(this._renderRequested.value=!0,this._taskHandle.resume())}renderFrame(e){const t=this._lastFrameRenderTime?e.time-this._lastFrameRenderTime:0;this._renderRemainingTime-=t,this._renderRemainingTime<=0&&this._taskHandle.pause(),this._lastFrameRenderTime=e.time,this._renderRequested.value=!1,this._renderParameters.state=this._state,this._renderParameters.stationary=this.stationary,this._renderParameters.pixelRatio=window.devicePixelRatio,this._renderParameters.globalOpacity=1,this._renderParameters.time=e.time,this._renderParameters.deltaTime=e.deltaTime,this._renderParameters.effects=null,this.processRender(this._renderParameters),this._emptyTrash()}_createTransforms(){return{displayViewScreenMat3:i()}}renderChildren(e){for(const t of this.children)t.beforeRender(e);this._reshuffleManager.reshuffle(o),this._managedCanvas.render(e,()=>this._renderChildren(this.children,e));for(const t of this.children)t.afterRender(e)}_renderChildren(e,t){const r=this.context;this.painter.textureUploadManager.upload(),r.resetInfo(),t.profiler.recordStart("drawLayers"),t.dataUploadCounter=0,this.painter.beforeRenderPhases(t,t.backgroundColor,this.state.padding),t.drawPhase=1;for(const s of e)s.processRender(t);if(this.children.some(e=>e.hasHighlight)){t.drawPhase=16;for(const r of e)r.processRender(t)}if(this.children.some(e=>e.hasLabels)){t.drawPhase=2;for(const r of e)r.processRender(t)}if(has("esri-tiles-debug")){t.drawPhase=64;for(const r of e)r.processRender(t)}this.painter.afterRenderPhases(t),t.profiler.recordEnd("drawLayers"),r.logInfo()}doRender(e){const t=this.context,{state:r,pixelRatio:s}=e;this._managedCanvas.resize(e),t.setViewport(0,0,s*r.size[0],s*r.size[1]),t.setDepthWriteEnabled(!0),t.setStencilWriteMask(255),this.renderChildren(e)}async takeScreenshot(e,t,r,s){const i=Math.round(this.state.size[0]*e.resolutionScale),n=Math.round(this.state.size[1]*e.resolutionScale),a=e.resolutionScale,o=this.context,h=this._state.clone();if(null!=s){const e=h.viewpoint;h.viewpoint.rotation=s,h.viewpoint=e}const d={...this._renderParameters,drawPhase:null,globalOpacity:1,stationary:!0,state:h,pixelRatio:a,time:performance.now(),deltaTime:0,blendMode:null,effects:null,inFadeTransition:!1,backgroundColor:r},l=new C(i,n);l.wrapMode=33071,l.internalFormat=f.RGBA8,l.isImmutable=!0;const m=new w(o,l,new R(_.DEPTH24_STENCIL8,i,n)),u=o.getBoundFramebufferObject(),c=o.getViewport();o.bindFramebuffer(m),o.setViewport(0,0,i,n),this._renderChildren(t??this.children,d);const p=this._readbackScreenshot(m,{...e.cropArea,y:n-(e.cropArea.y+e.cropArea.height)});o.bindFramebuffer(u),o.setViewport(c.x,c.y,c.width,c.height),this.requestRender();const g=await p;let b;return 1===e.outputScale?b=g:(b=new ImageData(Math.round(g.width*e.outputScale),Math.round(g.height*e.outputScale)),(await import("../../support/screenshotUtils.js")).resampleHermite(g,b,!0)),m.dispose(),b}async _readbackScreenshot(e,t){const r=(await import("../../support/screenshotUtils.js")).createEmptyImageData(t.width,t.height,document.createElement("canvas"));return await e.readPixelsAsync(t.x,t.y,t.width,t.height,6408,b.UNSIGNED_BYTE,new Uint8Array(r.data.buffer)),r}_emptyTrash(){for(;this._trash.size>0;){const e=Array.from(this._trash);this._trash.clear();for(const t of e)t.processDetach()}}}export{j as Stage,P as extraRenderTime};
5
+ import e from"../../../core/Error.js";import has from"../../../core/has.js";import{removeMaybe as t}from"../../../core/maybe.js";import{addFrameTask as r}from"../../../core/scheduling.js";import{signal as s}from"../../../core/signal.js";import{create as i}from"../../../core/libs/gl-matrix-2/factories/mat3f32.js";import{CIMAnalyzer as n}from"../../../symbols/cim/cimAnalyzer.js";import{Container as a}from"./Container.js";import{MAX_TILE_RESHUFFLES_PER_FRAME as o}from"./webgl/definitions.js";import h from"./webgl/Painter.js";import{ArrayBufferPool as d}from"./webgl/PooledUint32Array.js";import{Profiler as l}from"./webgl/Profiler.js";import{TileReshuffleManager as m}from"./webgl/TileReshuffleManager.js";import{startup as u,shutdown as c}from"./webgl/shaderGraph/techniques/TechniqueRegistry.js";import{MeshWriterRegistry as p}from"./webgl/shaderGraph/techniques/mesh/MeshWriterRegistry.js";import{Timeline as g}from"../support/Timeline.js";import{SizedPixelFormat as f,SizedDepthStencilFormat as _,PixelType as b}from"../../webgl/enums.js";import{FramebufferObject as w}from"../../webgl/FramebufferObject.js";import{RenderbufferDescriptor as R}from"../../webgl/RenderbufferDescriptor.js";import{RenderingContext as y}from"../../webgl/RenderingContext.js";import{RenderingContextOptions as x}from"../../webgl/RenderingContextOptions.js";import{TextureDescriptor as C}from"../../webgl/TextureDescriptor.js";const P=2e3;class j extends a{constructor(t,i,a){super(),this.meshWriterRegistry=new p,this._trash=new Set,this._renderRemainingTime=0,this._lastFrameRenderTime=0,this._renderRequested=s(!1),this.stage=this,this._stationary=!0,this._reshuffleManager=new m,this._managedCanvas=a,this.context=new y(this._managedCanvas.gl,i.contextOptions??new x),this.painter=new h(this.context,this),this._cimAnalyzer=new n(this.painter.textureManager.resourceManager),has("esri-2d-profiler")&&null!=t&&(this._debugOutput=document.createElement("div"),this._debugOutput.setAttribute("style","margin: 24px 64px; position: absolute; color: red;"),t.appendChild(this._debugOutput));const o=()=>this.highlightGradient;this._renderParameters={drawPhase:0,state:this.state,pixelRatio:window.devicePixelRatio,stationary:!1,globalOpacity:1,blendMode:null,deltaTime:-1,time:0,inFadeTransition:!1,effects:null,context:this.context,painter:this.painter,timeline:i.timeline||new g,renderingOptions:i.renderingOptions,requestRender:()=>this.requestRender(),allowDelayedRender:!1,requireFBO:!1,profiler:new l(this.context,this._debugOutput),dataUploadCounter:0,get highlightGradient(){return o()},reshuffleManager:this._reshuffleManager,backgroundColor:i.backgroundColor};let c=e=>this.renderFrame(e);null!=i.renderFrame&&(c=i.renderFrame),this._taskHandle=r({render:e=>c(e)}),this._taskHandle.pause(),this._lostWebGLContextHandle=this._managedCanvas.events.on("webgl-context-lost",t=>this.emit("webgl-error",{error:new e("webgl-context-lost",t.statusMessage)})),this._bufferPool=new d,u()}destroy(){super.destroy(),c(this.context),this.removeAllChildren(),this._emptyTrash(),this._taskHandle=t(this._taskHandle),this._lostWebGLContextHandle=t(this._lostWebGLContextHandle),this._managedCanvas.destroy(),this._debugOutput?.parentNode?.removeChild(this._debugOutput),this._bufferPool.destroy(),this.painter.dispose(),this.context.dispose(),this._managedCanvas=null}get textureManager(){return this.painter.textureManager}get profiler(){return this._renderParameters.profiler}get backgroundColor(){return this._renderParameters.backgroundColor}set backgroundColor(e){this._renderParameters.backgroundColor=e,this.requestRender()}get canvas(){return this._managedCanvas.canvas}get bufferPool(){return this._bufferPool}get cimAnalyzer(){return this._cimAnalyzer}get renderingOptions(){return this._renderingOptions}set renderingOptions(e){this._renderingOptions=e,this.requestRender()}get renderRequested(){return this._renderRequested.value}get state(){return this._state}set state(e){this._state=e,this.requestRender()}get stationary(){return this._stationary}set stationary(e){this._stationary!==e&&(this._stationary=e,this.requestRender())}trashDisplayObject(e){this._trash.add(e),this.requestRender()}untrashDisplayObject(e){return this._trash.delete(e)}requestRender(){this._renderRemainingTime=P,this.renderRequested||(this._renderRequested.value=!0,this._taskHandle.resume())}renderFrame(e){const t=this._lastFrameRenderTime?e.time-this._lastFrameRenderTime:0;this._renderRemainingTime-=t,this._renderRemainingTime<=0&&this._taskHandle.pause(),this._lastFrameRenderTime=e.time,this._renderRequested.value=!1,this._renderParameters.state=this._state,this._renderParameters.stationary=this.stationary,this._renderParameters.pixelRatio=window.devicePixelRatio,this._renderParameters.globalOpacity=1,this._renderParameters.time=e.time,this._renderParameters.deltaTime=e.deltaTime,this._renderParameters.effects=null,this.processRender(this._renderParameters),this._emptyTrash()}_createTransforms(){return{displayViewScreenMat3:i()}}renderChildren(e){for(const t of this.children)t.beforeRender(e);this._reshuffleManager.reshuffle(o),this._managedCanvas.render(e,()=>this._renderChildren(this.children,e));for(const t of this.children)t.afterRender(e)}_renderChildren(e,t){const r=this.context;this.painter.textureUploadManager.upload(),r.resetInfo(),t.profiler.recordStart("drawLayers"),t.dataUploadCounter=0,this.painter.beforeRenderPhases(t,t.backgroundColor,this.state.padding),t.drawPhase=1;for(const s of e)s.processRender(t);if(this.children.some(e=>e.hasHighlight)){t.drawPhase=16;for(const r of e)r.processRender(t)}if(this.children.some(e=>e.hasLabels)){t.drawPhase=2;for(const r of e)r.processRender(t)}if(has("esri-tiles-debug")){t.drawPhase=64;for(const r of e)r.processRender(t)}this.painter.afterRenderPhases(t),t.profiler.recordEnd("drawLayers"),r.logInfo()}doRender(e){const t=this.context,{state:r,pixelRatio:s}=e;this._managedCanvas.resize(e),t.setViewport(0,0,s*r.size[0],s*r.size[1]),t.setDepthWriteEnabled(!0),t.setStencilWriteMask(255),this.renderChildren(e)}async takeScreenshot(e,t,r,s){const i=Math.round(this.state.size[0]*e.resolutionScale),n=Math.round(this.state.size[1]*e.resolutionScale),a=e.resolutionScale,o=this.context,h=this._state.clone();if(null!=s){const e=h.viewpoint;h.viewpoint.rotation=s,h.viewpoint=e}const d={...this._renderParameters,drawPhase:null,globalOpacity:1,stationary:!0,state:h,pixelRatio:a,time:performance.now(),deltaTime:0,blendMode:null,effects:null,inFadeTransition:!1,backgroundColor:r},l=new C(i,n);l.wrapMode=33071,l.internalFormat=f.RGBA8,l.isImmutable=!0;const m=new w(o,l,new R(_.DEPTH24_STENCIL8,i,n)),u=o.getBoundFramebufferObject(),c=o.getViewport();o.bindFramebuffer(m),o.setViewport(0,0,i,n),this._renderChildren(t??this.children,d);const p=this._readbackScreenshot(m,{...e.cropArea,y:n-(e.cropArea.y+e.cropArea.height)});o.bindFramebuffer(u),o.setViewport(c.x,c.y,c.width,c.height),this.requestRender();const g=await p;let b;return 1===e.outputScale?b=g:(b=new ImageData(Math.round(g.width*e.outputScale),Math.round(g.height*e.outputScale)),(await import("../../support/screenshotUtils.js")).resampleHermite(g,b,!0)),m.dispose(),b}async _readbackScreenshot(e,t){const r=(await import("../../support/screenshotUtils.js")).createEmptyImageData(t.width,t.height,document.createElement("canvas"));return await e.readPixelsAsync(t.x,t.y,t.width,t.height,6408,b.UNSIGNED_BYTE,new Uint8Array(r.data.buffer)),r}_emptyTrash(){for(;this._trash.size>0;){const e=Array.from(this._trash);this._trash.clear();for(const t of e)t.processDetach()}}}export{j as Stage,P as extraRenderTime};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../../core/CircularArray.js";import{EventEmitter as t}from"../../../../core/Evented.js";import has from"../../../../core/has.js";import{createDisjointTimerQuery as s}from"../../../webgl/capabilities/DisjointTimerQuery.js";const r=!!has("esri-2d-profiler");class n{constructor(n,i){if(this._events=new t,this._entries=new Map,this._timings=new e(10),this._currentContainer=null,this._currentPass=null,this._currentBrush=null,this._currentSummary=null,!r)return;this._ext=s(n.gl,{}),this._debugOutput=i;const o=n.gl;if(!this.enableCommandLogging)return;let a;for(a in o)if("function"==typeof o[a]){const e=o[a],t=a.includes("draw");o[a]=(...s)=>(this._events.emit("command",{container:this._currentContainer,pass:this._currentPass,brush:this._currentBrush,method:a,args:s,isDrawCommand:t}),this._currentSummary&&(this._currentSummary.commands++,t&&this._currentSummary.drawCommands++),e.apply(o,s))}}get enableCommandLogging(){return!("object"==typeof r&&r.disableCommands)}recordContainerStart(e){r&&(this._currentContainer=e)}recordContainerEnd(){r&&(this._currentContainer=null)}recordPassStart(e){r&&(this._currentPass=e,this._initSummary())}recordPassEnd(){r&&(this._currentPass=null,this._emitSummary())}recordBrushStart(e){r&&(this._currentBrush=e)}recordBrushEnd(){r&&(this._currentBrush=null)}recordStart(e){if(r&&null!=this._ext){if(this._entries.has(e)){const t=this._entries.get(e),s=this._ext.resultAvailable(t.query),r=this._ext.disjoint();if(s&&!r){const s=this._ext.getResult(t.query)/1e6;let r=0;if(null!=this._timings.enqueue(s)){const e=this._timings.entries,t=e.length;let s=0;for(const r of e)s+=r;r=s/t}const n=s.toFixed(2),i=r?r.toFixed(2):"--";this.enableCommandLogging?(console.groupCollapsed(`Frame report for ${e}, ${n} ms (${i} last 10 avg)\n${t.commandsLen} Commands (${t.drawCommands} draw)`),console.log("RenderPass breakdown: "),console.table(t.summaries),console.log("Commands: ",t.commands),console.groupEnd()):console.log(`Frame report for ${e}, ${n} ms (${i} last 10 avg)`),this._debugOutput.innerHTML=`${n} (${i})`}for(const e of t.handles)e.remove();this._ext.deleteQuery(t.query),this._entries.delete(e)}const t={name:e,query:this._ext.createQuery(),commands:[],commandsLen:0,drawCommands:0,summaries:[],handles:[]};this.enableCommandLogging&&(t.handles.push(this._events.on("command",e=>{t.commandsLen++,t.commands.push(e),e.isDrawCommand&&t.drawCommands++})),t.handles.push(this._events.on("summary",e=>{t.summaries.push(e)}))),this._ext.beginTimeElapsed(t.query),this._entries.set(e,t)}}recordEnd(e){r&&null!=this._ext&&this._entries.has(e)&&this._ext.endTimeElapsed()}_initSummary(){this.enableCommandLogging&&(this._currentSummary={container:this._currentContainer,pass:this._currentPass,drawCommands:0,commands:0})}_emitSummary(){this.enableCommandLogging&&this._currentSummary&&this._events.emit("summary",this._currentSummary)}}export{n as Profiler};
5
+ import e from"../../../../core/CircularArray.js";import{EventEmitter as t}from"../../../../core/Evented.js";import has from"../../../../core/has.js";import{createDisjointTimerQuery as s}from"../../../webgl/capabilities/DisjointTimerQuery.js";const n=!!has("esri-2d-profiler");class r{constructor(r,i){if(this._events=new t,this._entries=new Map,this._timings=new e(10),this._currentContainer=null,this._currentPass=null,this._currentBrush=null,this._currentSummary=null,!n)return;this._ext=s(r.gl,{}),this._debugOutput=i;const o=r.gl;if(!this.enableCommandLogging)return;let a;for(a in o)if("function"==typeof o[a]){const e=o[a],t=a.includes("draw");o[a]=(...s)=>(this._events.emit("command",{container:this._currentContainer,pass:this._currentPass,brush:this._currentBrush,method:a,args:s,isDrawCommand:t}),this._currentSummary&&(this._currentSummary.commands++,t&&this._currentSummary.drawCommands++),e.apply(o,s))}}get enableCommandLogging(){return"object"==typeof n&&n.commandLogging}get enableTimeLogging(){return"object"==typeof n&&n.timeLogging}get lastTime(){return this._timings.peekLast()}recordContainerStart(e){n&&(this._currentContainer=e)}recordContainerEnd(){n&&(this._currentContainer=null)}recordPassStart(e){n&&(this._currentPass=e,this._initSummary())}recordPassEnd(){n&&(this._currentPass=null,this._emitSummary())}recordBrushStart(e){n&&(this._currentBrush=e)}recordBrushEnd(){n&&(this._currentBrush=null)}recordStart(e){if(n&&null!=this._ext){if(this._entries.has(e)){const t=this._entries.get(e),s=this._ext.resultAvailable(t.query),n=this._ext.disjoint();if(s&&!n){const s=this._ext.getResult(t.query)/1e6;let n=0;if(null!=this._timings.enqueue(s)&&this.enableTimeLogging){const e=this._timings.entries,t=e.length;let s=0;for(const n of e)s+=n;n=s/t}const r=s.toFixed(2),i=n?n.toFixed(2):"--";this.enableCommandLogging?(this.enableTimeLogging?console.groupCollapsed(`Frame report for ${e}, ${r} ms (${i} last 10 avg)\n ${t.commandsLen} Commands (${t.drawCommands} draw)`):console.groupCollapsed(`Frame report for ${e}\n ${t.commandsLen} Commands (${t.drawCommands} draw)`),console.log("RenderPass breakdown: "),console.table(t.summaries),console.log("Commands: ",t.commands),console.groupEnd()):this.enableTimeLogging&&console.log(`Frame report for ${e}, ${r} ms (${i} last 10 avg)`),this.enableTimeLogging&&(this._debugOutput.innerHTML=`${r} (${i})`)}for(const e of t.handles)e.remove();this._ext.deleteQuery(t.query),this._entries.delete(e)}const t={name:e,query:this._ext.createQuery(),commands:[],commandsLen:0,drawCommands:0,summaries:[],handles:[]};this.enableCommandLogging&&(t.handles.push(this._events.on("command",e=>{t.commandsLen++,t.commands.push(e),e.isDrawCommand&&t.drawCommands++})),t.handles.push(this._events.on("summary",e=>{t.summaries.push(e)}))),this._ext.beginTimeElapsed(t.query),this._entries.set(e,t)}}recordEnd(e){n&&null!=this._ext&&this._entries.has(e)&&this._ext.endTimeElapsed()}_initSummary(){this.enableCommandLogging&&(this._currentSummary={container:this._currentContainer,pass:this._currentPass,drawCommands:0,commands:0})}_emitSummary(){this.enableCommandLogging&&this._currentSummary&&this._events.emit("summary",this._currentSummary)}}export{r as Profiler};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import r from"../../../Graphic.js";import t from"../../../core/Error.js";import i from"../../../core/Logger.js";import{destroyMaybe as s}from"../../../core/maybe.js";import{throwIfAborted as l,throwIfAbortError as a}from"../../../core/promiseUtils.js";import{syncAndInitial as n,initial as o}from"../../../core/reactiveUtils.js";import{property as u}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/RandomLCG.js";import{subclass as d}from"../../../core/accessorSupport/decorators/subclass.js";import p from"../../../core/sql/WhereClause.js";import h from"../../../graphic/BuildingGraphicOrigin.js";import"../../../layers/buildingSublayers/BuildingComponentSublayer.js";import y from"../../../layers/support/FeatureFilter.js";import{fixFields as c,unpackFieldNames as g,populateMissingFields as f}from"../../../layers/support/fieldUtils.js";import m from"../../../rest/support/Query.js";import{isNumber as F}from"../../../support/guards.js";import{BuildingSublayerView3DMixin as b}from"./BuildingSublayerView3D.js";import{I3SMeshView3D as _}from"./I3SMeshView3D.js";import{applyFilterMode as w}from"./i3s/BuildingFilterUtil.js";import{createGetFeatureExtent as E}from"./i3s/I3SGeometryUtil.js";import{I3SMeshViewFilter as x}from"./i3s/I3SMeshViewFilter.js";import{I3SQueryEngine as S}from"./i3s/I3SQueryEngine.js";import{I3SQueryFeatureAdapter as j,I3SQueryFeature as v}from"./i3s/I3SQueryFeatureAdapter.js";import{I3SQueryFeatureStore as I}from"./i3s/I3SQueryFeatureStore.js";import{findFieldsCaseInsensitive as Q,getIndexCrs as q}from"./i3s/I3SUtil.js";import{DefinitionExpressionSceneLayerView as R}from"./support/DefinitionExpressionSceneLayerView.js";import{TemporalSceneLayerView as L}from"./support/TemporalSceneLayerView.js";import O from"../../layers/BuildingComponentSublayerView.js";import{hasPopupTemplate as V,getRequiredFields as U,getFetchPopupTemplate as C}from"../../layers/support/popupUtils.js";import{isInEffectiveScaleRange as A}from"../../support/layerViewUtils.js";import{TaskPriority as H}from"../../support/Scheduler.js";let G=class extends(L(R(_(b(O))))){constructor(e){super(e),this.type="building-component-sublayer-3d",this._elevationContext="scene",this._supportsLabeling=!1,this.requiredFields=[],this.progressiveLoadFactor=1,this._queryEngine=null}get i3slayer(){return this.sublayer}get layerViewUid(){return this.layerView.uid}get layerId(){return this.sublayer.layer.id}get sublayerId(){return this.sublayer.id}get layerPopupEnabledAndHasTemplate(){return this.sublayer.popupEnabled&&V(this.sublayer,this.layerView.view.popup?.defaultPopupTemplateEnabled)}initialize(){this._updatingHandles.add(()=>this.mergedFilter,e=>{null!=e&&x.checkSupport(e)?null==this._i3sFilter?this._i3sFilter=new x({viewFilter:e,layerFieldsIndex:this.sublayer.fieldsIndex,loadAsyncModule:e=>this._loadAsyncModule(e),addSqlFilter:(e,r)=>this.addSqlFilter(e,r,this.logError),addTimeFilter:(e,r)=>this.addTimeFilter(e,r)}):this._i3sFilter.viewFilter=e:this._i3sFilter=s(this._i3sFilter)},n),this._updatingHandles.add(()=>[this.sublayer.renderer,this.definitionExpressionFields,this.filterExpressionFields],()=>this._updateRequiredFields()),this._updatingHandles.add(()=>this.sublayer.renderer,e=>this._rendererChange(e),o);const e=()=>this._filterChange();this._updatingHandles.add(()=>this.parsedDefinitionExpression,e),this._updatingHandles.add(()=>this._i3sFilter?.sortedObjectIds,e),this._updatingHandles.add(()=>this._i3sFilter?.parsedWhereClause,e),this._updatingHandles.add(()=>this.getTimeFilterDependencies(),e),this._updatingHandles.add(()=>this.mergedFilter,e),this._updatingHandles.add(()=>[this._i3sFilter?.parsedGeometry,this.filter?.spatialRelationship],()=>this._geometryFilterChange()),this._updatingHandles.add(()=>this.parsedFilterExpressions,()=>this._updateSymbologyOverride(),o),this.addResolvingPromise(this._updateRequiredFields())}get lodFactor(){return this.view.qualitySettings.sceneService.object.lodFactor}get parsedFilterExpressions(){return"Overview"===this.sublayer.modelName?[]:this.layerView.filterExpressions.map(([e,r])=>{let t;try{t=p.create(e,{fieldsIndex:this.sublayer.fieldsIndex})}catch(a){return i.getLogger(this).error("Failed to parse filterExpression: "+a),null}if(!t.isStandardized)return i.getLogger(this).error("filterExpression is using non standard function"),null;const s=[],l=t.fieldNames;return Q(l,this.sublayer.fieldsIndex,{missingFields:s}),s.length>0?(i.getLogger(this).error(`filterExpression references unknown fields: ${s.join(", ")}`),null):[t,r]}).filter(e=>null!=e)}get filter(){return this._get("filter")}set filter(e){this._set("filter",x.checkSupport(e)?e:null)}isUpdating(){return super.isUpdating()||(this._i3sFilter?.updating??!1)}_updateSymbologyOverride(){const e=this.parsedFilterExpressions;e.length>0?this._setSymbologyOverride((r,t)=>{for(const[s,l]of e)try{if(s.testFeature(r))return w(t,l)}catch(i){this.logError(i)}return w(t,null)},this.filterExpressionFields):this._setSymbologyOverride(null,null)}get filterExpressionFields(){return c(this.sublayer.fieldsIndex,this.parsedFilterExpressions.reduce((e,[r])=>e.concat(r.fieldNames),new Array))}get availableFields(){const e=this.sublayer,r=e.fieldsIndex;let t=this.requiredFields;if(e.outFields||e.layer.outFields){const i=[...e.outFields||[],...e.layer.outFields||[]];t=[...g(r,i),...t]}return c(r,t)}get _graphicOrigin(){return new h(this.sublayer)}_createLayerGraphic(e){return new r({attributes:e,layer:this.sublayer.layer,sourceLayer:this.sublayer,origin:this._graphicOrigin})}canResume(){return super.canResume()&&A(this.i3slayer.effectiveScaleRange,this.view.scale)&&(!this._controller||this._controller.rootNodeVisible)}async fetchPopupFeaturesFromGraphics(e,r){const t=this._validateFetchPopupFeatures(r);if(t)throw t;if(0===e.length)return[];const s=[],n=[],o=null!=this.sublayer.associatedLayer?await this.sublayer.associatedLayer.load(r):this.sublayer,u=g(this.sublayer.fieldsIndex,await U(o,C(this.sublayer,r)));l(r);const d=new Set;for(const i of e)f(i,u,d)?n.push(i):s.push(i);return 0===n.length?s:(null!=this.sublayer.associatedLayer&&await this.sublayer.associatedLayer.load().catch(()=>i.getLogger(this).warn("Failed to load associated feature layer. Displaying popup attributes from cached attributes.")),this.whenGraphicAttributes(n,Array.from(d)).catch(e=>(a(e),n)).then(e=>s.concat(e)))}async _updateRequiredFields(){const e=c(this.sublayer.fieldsIndex,[...this.sublayer.renderer?await this.sublayer.renderer.getRequiredFields(this.sublayer.fieldsIndex):[],...this.definitionExpressionFields,...this.filterExpressionFields]);this._set("requiredFields",e)}_validateFetchPopupFeatures(e){const{sublayer:r}=this,{popupEnabled:i}=r;return i?C(r,e)?void 0:new t("buildingscenelayerview3d:fetchPopupFeatures","Layer does not define a popup template",{sublayer:r}):new t("buildingscenelayerview3d:fetchPopupFeatures","Popups are disabled",{sublayer:r})}getFilters(){const e=super.getFilters();return this.addSqlFilter(e,this.parsedDefinitionExpression,this.logError),this._i3sFilter?.addFilters(e,this.view,this._controller.crsIndex,this._collection),e}createQuery(){const e={outFields:["*"],returnGeometry:!1,outSpatialReference:this.view.spatialReference};return null!=this.filter?this.filter.createQuery(e):new m(e)}queryExtent(e,r){return this._ensureQueryEngine().executeQueryForExtent(this._ensureQuery(e),r?.signal)}queryFeatureCount(e,r){return this._ensureQueryEngine().executeQueryForCount(this._ensureQuery(e),r?.signal)}queryFeatures(e,r){return this._ensureQueryEngine().executeQuery(this._ensureQuery(e),r?.signal).then(e=>{if(!e?.features)return e;const r=this.sublayer,t=r.layer,i=new h(r);for(const s of e.features)s.layer=t,s.sourceLayer=r,s.origin=i;return e})}async queryObjectIds(e,r){return(await this._ensureQueryEngine().executeQueryForIds(this._ensureQuery(e),r?.signal)).filter(F)}_ensureQueryEngine(){return this._queryEngine??=this._createQueryEngine(),this._queryEngine}_createQueryEngine(){const e=E(this.view.spatialReference,this.view.renderSpatialReference,this._collection);return new S({layerView:this,priority:H.FEATURE_QUERY_ENGINE,spatialIndex:new I({featureAdapter:new j({objectIdField:this.sublayer.objectIdField,attributeStorageInfo:this.sublayer.attributeStorageInfo,getFeatureExtent:e}),forAllFeatures:(e,r)=>this._forAllFeatures((r,t,i)=>e(new v(r,t,i)),r,2),getFeatureExtent:e,sourceSpatialReference:q(this.sublayer),viewSpatialReference:this.view.spatialReference})})}_ensureQuery(e){return this._addDefinitionExpressionToQuery(null==e?this.createQuery():m.from(e))}};e([u()],G.prototype,"i3slayer",null),e([u()],G.prototype,"layerView",void 0),e([u()],G.prototype,"lodFactor",null),e([u({readOnly:!0})],G.prototype,"parsedFilterExpressions",null),e([u({type:y})],G.prototype,"filter",null),e([u()],G.prototype,"_i3sFilter",void 0),e([u({type:[String],readOnly:!0})],G.prototype,"filterExpressionFields",null),e([u({type:[String],readOnly:!0})],G.prototype,"requiredFields",void 0),e([u({type:[String],readOnly:!0})],G.prototype,"availableFields",null),e([u()],G.prototype,"_graphicOrigin",null),G=e([d("esri.views.3d.layers.BuildingComponentSublayerView3D")],G);export{G as default};
5
+ import{__decorate as e}from"tslib";import r from"../../../Graphic.js";import t from"../../../core/Error.js";import i from"../../../core/Logger.js";import{destroyMaybe as s}from"../../../core/maybe.js";import{throwIfAborted as l,throwIfAbortError as a}from"../../../core/promiseUtils.js";import{syncAndInitial as n,initial as o}from"../../../core/reactiveUtils.js";import{property as u}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/RandomLCG.js";import{subclass as d}from"../../../core/accessorSupport/decorators/subclass.js";import p from"../../../core/sql/WhereClause.js";import"../../../layers/buildingSublayers/BuildingComponentSublayer.js";import h from"../../../layers/support/FeatureFilter.js";import{fixFields as y,unpackFieldNames as c,populateMissingFields as g}from"../../../layers/support/fieldUtils.js";import f from"../../../rest/support/Query.js";import{isNumber as m}from"../../../support/guards.js";import{BuildingSublayerView3DMixin as F}from"./BuildingSublayerView3D.js";import{I3SMeshView3D as b}from"./I3SMeshView3D.js";import{applyFilterMode as _}from"./i3s/BuildingFilterUtil.js";import{createGetFeatureExtent as w}from"./i3s/I3SGeometryUtil.js";import{I3SMeshViewFilter as E}from"./i3s/I3SMeshViewFilter.js";import{I3SQueryEngine as x}from"./i3s/I3SQueryEngine.js";import{I3SQueryFeatureAdapter as S,I3SQueryFeature as j}from"./i3s/I3SQueryFeatureAdapter.js";import{I3SQueryFeatureStore as v}from"./i3s/I3SQueryFeatureStore.js";import{findFieldsCaseInsensitive as I,getIndexCrs as Q}from"./i3s/I3SUtil.js";import{DefinitionExpressionSceneLayerView as q}from"./support/DefinitionExpressionSceneLayerView.js";import{TemporalSceneLayerView as R}from"./support/TemporalSceneLayerView.js";import L from"../../layers/BuildingComponentSublayerView.js";import{hasPopupTemplate as O,getRequiredFields as V,getFetchPopupTemplate as U}from"../../layers/support/popupUtils.js";import{isInEffectiveScaleRange as C}from"../../support/layerViewUtils.js";import{TaskPriority as A}from"../../support/Scheduler.js";let H=class extends(R(q(b(F(L))))){constructor(e){super(e),this.type="building-component-sublayer-3d",this._elevationContext="scene",this._supportsLabeling=!1,this.requiredFields=[],this.progressiveLoadFactor=1,this._queryEngine=null}get i3slayer(){return this.sublayer}get layerViewUid(){return this.layerView.uid}get layerId(){return this.sublayer.layer.id}get sublayerId(){return this.sublayer.id}get layerPopupEnabledAndHasTemplate(){return this.sublayer.popupEnabled&&O(this.sublayer,this.layerView.view.popup?.defaultPopupTemplateEnabled)}initialize(){this._updatingHandles.add(()=>this.mergedFilter,e=>{null!=e&&E.checkSupport(e)?null==this._i3sFilter?this._i3sFilter=new E({viewFilter:e,layerFieldsIndex:this.sublayer.fieldsIndex,loadAsyncModule:e=>this._loadAsyncModule(e),addSqlFilter:(e,r)=>this.addSqlFilter(e,r,this.logError),addTimeFilter:(e,r)=>this.addTimeFilter(e,r)}):this._i3sFilter.viewFilter=e:this._i3sFilter=s(this._i3sFilter)},n),this._updatingHandles.add(()=>[this.sublayer.renderer,this.definitionExpressionFields,this.filterExpressionFields],()=>this._updateRequiredFields()),this._updatingHandles.add(()=>this.sublayer.renderer,e=>this._rendererChange(e),o);const e=()=>this._filterChange();this._updatingHandles.add(()=>this.parsedDefinitionExpression,e),this._updatingHandles.add(()=>this._i3sFilter?.sortedObjectIds,e),this._updatingHandles.add(()=>this._i3sFilter?.parsedWhereClause,e),this._updatingHandles.add(()=>this.getTimeFilterDependencies(),e),this._updatingHandles.add(()=>this.mergedFilter,e),this._updatingHandles.add(()=>[this._i3sFilter?.parsedGeometry,this.filter?.spatialRelationship],()=>this._geometryFilterChange()),this._updatingHandles.add(()=>this.parsedFilterExpressions,()=>this._updateSymbologyOverride(),o),this.addResolvingPromise(this._updateRequiredFields())}get lodFactor(){return this.view.qualitySettings.sceneService.object.lodFactor}get parsedFilterExpressions(){return"Overview"===this.sublayer.modelName?[]:this.layerView.filterExpressions.map(([e,r])=>{let t;try{t=p.create(e,{fieldsIndex:this.sublayer.fieldsIndex})}catch(a){return i.getLogger(this).error("Failed to parse filterExpression: "+a),null}if(!t.isStandardized)return i.getLogger(this).error("filterExpression is using non standard function"),null;const s=[],l=t.fieldNames;return I(l,this.sublayer.fieldsIndex,{missingFields:s}),s.length>0?(i.getLogger(this).error(`filterExpression references unknown fields: ${s.join(", ")}`),null):[t,r]}).filter(e=>null!=e)}get filter(){return this._get("filter")}set filter(e){this._set("filter",E.checkSupport(e)?e:null)}isUpdating(){return super.isUpdating()||(this._i3sFilter?.updating??!1)}_updateSymbologyOverride(){const e=this.parsedFilterExpressions;e.length>0?this._setSymbologyOverride((r,t)=>{for(const[s,l]of e)try{if(s.testFeature(r))return _(t,l)}catch(i){this.logError(i)}return _(t,null)},this.filterExpressionFields):this._setSymbologyOverride(null,null)}get filterExpressionFields(){return y(this.sublayer.fieldsIndex,this.parsedFilterExpressions.reduce((e,[r])=>e.concat(r.fieldNames),new Array))}get availableFields(){const e=this.sublayer,r=e.fieldsIndex;let t=this.requiredFields;if(e.outFields||e.layer.outFields){const i=[...e.outFields||[],...e.layer.outFields||[]];t=[...c(r,i),...t]}return y(r,t)}get _graphicOrigin(){return this.sublayer.graphicOrigin}_createLayerGraphic(e){return new r({attributes:e,layer:this.sublayer.layer,sourceLayer:this.sublayer,origin:this._graphicOrigin})}canResume(){return super.canResume()&&C(this.i3slayer.effectiveScaleRange,this.view.scale)&&(!this._controller||this._controller.rootNodeVisible)}async fetchPopupFeaturesFromGraphics(e,r){const t=this._validateFetchPopupFeatures(r);if(t)throw t;if(0===e.length)return[];const s=[],n=[],o=null!=this.sublayer.associatedLayer?await this.sublayer.associatedLayer.load(r):this.sublayer,u=c(this.sublayer.fieldsIndex,await V(o,U(this.sublayer,r)));l(r);const d=new Set;for(const i of e)g(i,u,d)?n.push(i):s.push(i);return 0===n.length?s:(null!=this.sublayer.associatedLayer&&await this.sublayer.associatedLayer.load().catch(()=>i.getLogger(this).warn("Failed to load associated feature layer. Displaying popup attributes from cached attributes.")),this.whenGraphicAttributes(n,Array.from(d)).catch(e=>(a(e),n)).then(e=>s.concat(e)))}async _updateRequiredFields(){const e=y(this.sublayer.fieldsIndex,[...this.sublayer.renderer?await this.sublayer.renderer.getRequiredFields(this.sublayer.fieldsIndex):[],...this.definitionExpressionFields,...this.filterExpressionFields]);this._set("requiredFields",e)}_validateFetchPopupFeatures(e){const{sublayer:r}=this,{popupEnabled:i}=r;return i?U(r,e)?void 0:new t("buildingscenelayerview3d:fetchPopupFeatures","Layer does not define a popup template",{sublayer:r}):new t("buildingscenelayerview3d:fetchPopupFeatures","Popups are disabled",{sublayer:r})}getFilters(){const e=super.getFilters();return this.addSqlFilter(e,this.parsedDefinitionExpression,this.logError),this._i3sFilter?.addFilters(e,this.view,this._controller.crsIndex,this._collection),e}createQuery(){const e={outFields:["*"],returnGeometry:!1,outSpatialReference:this.view.spatialReference};return null!=this.filter?this.filter.createQuery(e):new f(e)}queryExtent(e,r){return this._ensureQueryEngine().executeQueryForExtent(this._ensureQuery(e),r?.signal)}queryFeatureCount(e,r){return this._ensureQueryEngine().executeQueryForCount(this._ensureQuery(e),r?.signal)}queryFeatures(e,r){return this._ensureQueryEngine().executeQuery(this._ensureQuery(e),r?.signal).then(e=>{if(!e?.features)return e;const r=this.sublayer,t=r.layer,i=this._graphicOrigin;for(const s of e.features)s.layer=t,s.sourceLayer=r,s.origin=i;return e})}async queryObjectIds(e,r){return(await this._ensureQueryEngine().executeQueryForIds(this._ensureQuery(e),r?.signal)).filter(m)}_ensureQueryEngine(){return this._queryEngine??=this._createQueryEngine(),this._queryEngine}_createQueryEngine(){const e=w(this.view.spatialReference,this.view.renderSpatialReference,this._collection);return new x({layerView:this,priority:A.FEATURE_QUERY_ENGINE,spatialIndex:new v({featureAdapter:new S({objectIdField:this.sublayer.objectIdField,attributeStorageInfo:this.sublayer.attributeStorageInfo,getFeatureExtent:e}),forAllFeatures:(e,r)=>this._forAllFeatures((r,t,i)=>e(new j(r,t,i)),r,2),getFeatureExtent:e,sourceSpatialReference:Q(this.sublayer),viewSpatialReference:this.view.spatialReference})})}_ensureQuery(e){return this._addDefinitionExpressionToQuery(null==e?this.createQuery():f.from(e))}};e([u()],H.prototype,"i3slayer",null),e([u()],H.prototype,"layerView",void 0),e([u()],H.prototype,"lodFactor",null),e([u({readOnly:!0})],H.prototype,"parsedFilterExpressions",null),e([u({type:h})],H.prototype,"filter",null),e([u()],H.prototype,"_i3sFilter",void 0),e([u({type:[String],readOnly:!0})],H.prototype,"filterExpressionFields",null),e([u({type:[String],readOnly:!0})],H.prototype,"requiredFields",void 0),e([u({type:[String],readOnly:!0})],H.prototype,"availableFields",null),e([u()],H.prototype,"_graphicOrigin",null),H=e([d("esri.views.3d.layers.BuildingComponentSublayerView3D")],H);export{H as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as r}from"tslib";import{property as o}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as e}from"../../../core/accessorSupport/decorators/subclass.js";import s from"../../../graphic/CSVGraphicOrigin.js";import t from"./FeatureLayerViewBase3D.js";let i=class extends t{constructor(){super(...arguments),this.type="csv-3d"}get graphicOrigin(){return new s(this.layer)}};r([o()],i.prototype,"layer",void 0),r([o()],i.prototype,"graphicOrigin",null),i=r([e("esri.views.3d.layers.CSVLayerView3D")],i);const p=i;export{p as default};
5
+ import{__decorate as r}from"tslib";import{property as o}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as e}from"../../../core/accessorSupport/decorators/subclass.js";import s from"./FeatureLayerViewBase3D.js";let t=class extends s{constructor(){super(...arguments),this.type="csv-3d"}get graphicOrigin(){return this.layer.graphicOrigin}};r([o()],t.prototype,"layer",void 0),r([o()],t.prototype,"graphicOrigin",null),t=r([e("esri.views.3d.layers.CSVLayerView3D")],t);const i=t;export{i as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import r from"../../../core/Error.js";import{property as t}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as i}from"../../../core/accessorSupport/decorators/subclass.js";import{canProjectWithoutEngine as o}from"../../../geometry/projectionUtils.js";import s from"../../../graphic/FeatureGraphicOrigin.js";import{getEffectiveLayerCapabilities as a}from"../../../layers/support/layerUtils.js";import p from"./FeatureLayerViewBase3D.js";let l=class extends p{constructor(){super(...arguments),this.type="feature-3d"}initialize(){const{layer:e,view:t}=this;a(e)?.operations.supportsQuery||this.addResolvingPromise(Promise.reject(new r("featurelayerview:query-not-supported","layer view requires a layer with query capability",{layer:e}))),null!=e.infoFor3D&&this.addResolvingPromise(Promise.reject(new r("featurelayerview3d:unsupported-geometry-type",`Unsupported geometry type ${e.geometryType}`))),"mesh"!==e.geometryType||o(e.spatialReference,t.spatialReference)||this.addResolvingPromise(Promise.reject(new r("layerview:spatial-reference-incompatible","The spatial references of the feature layer is incompatible with the spatial reference of the view")))}get graphicOrigin(){return new s(this.layer)}get featureSpatialReference(){return this.view.featureTiles?.tilingScheme?.spatialReference}};e([t()],l.prototype,"layer",void 0),e([t()],l.prototype,"graphicOrigin",null),l=e([i("esri.views.3d.layers.FeatureLayerView3D")],l);const c=l;export{c as default};
5
+ import{__decorate as e}from"tslib";import r from"../../../core/Error.js";import{property as i}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as t}from"../../../core/accessorSupport/decorators/subclass.js";import{canProjectWithoutEngine as o}from"../../../geometry/projectionUtils.js";import{isFeatureGraphicOrigin as s}from"../../../graphic/isFeatureGraphicOrigin.js";import{getEffectiveLayerCapabilities as a}from"../../../layers/support/layerUtils.js";import p from"./FeatureLayerViewBase3D.js";let n=class extends p{constructor(){super(...arguments),this.type="feature-3d"}initialize(){const{layer:e,view:i}=this;a(e)?.operations.supportsQuery||this.addResolvingPromise(Promise.reject(new r("featurelayerview:query-not-supported","layer view requires a layer with query capability",{layer:e}))),null!=e.infoFor3D&&this.addResolvingPromise(Promise.reject(new r("featurelayerview3d:unsupported-geometry-type",`Unsupported geometry type ${e.geometryType}`))),"mesh"!==e.geometryType||o(e.spatialReference,i.spatialReference)||this.addResolvingPromise(Promise.reject(new r("layerview:spatial-reference-incompatible","The spatial references of the feature layer is incompatible with the spatial reference of the view")))}get graphicOrigin(){const e=this.layer.graphicOrigin;if(!s(e))throw new r("featurelayerview3d:invalid-graphic-origin","Layer's graphic origin is not a FeatureGraphicOrigin");return e}get featureSpatialReference(){return this.view.featureTiles?.tilingScheme?.spatialReference}};e([i()],n.prototype,"layer",void 0),e([i()],n.prototype,"graphicOrigin",null),n=e([t("esri.views.3d.layers.FeatureLayerView3D")],n);const c=n;export{c as default};