@arcgis/core 5.0.0-next.53 → 5.0.0-next.55

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 (812) hide show
  1. package/Basemap.d.ts +1 -1
  2. package/Color.js +1 -1
  3. package/Ground.d.ts +4 -6
  4. package/Ground.js +1 -1
  5. package/PopupTemplate.d.ts +2 -2
  6. package/WebLinkChart.d.ts +1 -1
  7. package/WebScene.js +1 -1
  8. package/applications/Components/QuantityFormatter.d.ts +7 -7
  9. package/applications/Components/analysisUtils.d.ts +28 -53
  10. package/applications/Components/baUtils.d.ts +8 -0
  11. package/applications/Components/drawUtils.d.ts +8 -1
  12. package/applications/Components/featureUtils.d.ts +1 -1
  13. package/applications/Components/imageryUtils.d.ts +2 -2
  14. package/applications/Components/layerOriginUtils.d.ts +3 -3
  15. package/applications/Components/reactiveUtils.d.ts +24 -5
  16. package/applications/Excalibur/videoViewUtils.d.ts +2 -2
  17. package/applications/ExperienceBuilder/sketchUtils.d.ts +6 -6
  18. package/applications/KnowledgeStudio/generalSdkInternalAccess.d.ts +7 -13
  19. package/applications/KnowledgeStudio/generalSharedKgUtils.d.ts +7 -7
  20. package/applications/KnowledgeStudio/reshape.d.ts +6 -15
  21. package/applications/MapViewer/mediaUtils.d.ts +4 -4
  22. package/applications/MapViewer/templateUtils.d.ts +3 -3
  23. package/applications/PortalApp/layerUtils.d.ts +10 -0
  24. package/applications/PortalApp/layerUtils.js +5 -0
  25. package/applications/SceneViewer/sceneViewerUtils.d.ts +1 -2
  26. package/arcade/featureSetUtils.js +1 -1
  27. package/arcade/featureset/support/shared.js +1 -1
  28. package/arcade.d.ts +33 -17
  29. package/assets/esri/core/workers/RemoteClient.js +1 -1
  30. package/assets/esri/core/workers/chunks/{5aa354854219361f722b.js → 0099f4729c94c779ba35.js} +1 -1
  31. package/assets/esri/core/workers/chunks/00e407d262c49890afa8.js +1 -0
  32. package/assets/esri/core/workers/chunks/{15a0750c10b510564a42.js → 01d38a9ca9e88c38aab9.js} +1 -1
  33. package/assets/esri/core/workers/chunks/087cf25ca211836a084a.js +1 -0
  34. package/assets/esri/core/workers/chunks/{a3f23f08337e101e4e64.js → 097001462d93b78b64f4.js} +1 -1
  35. package/assets/esri/core/workers/chunks/0a39c6dc57bd60d5587e.js +1 -0
  36. package/assets/esri/core/workers/chunks/0d1e8d5d9abee38e275e.js +316 -0
  37. package/assets/esri/core/workers/chunks/{cef873da468668eb95cb.js → 14765f98b8ea447498a1.js} +6 -7
  38. package/assets/esri/core/workers/chunks/{da922e861d5845ae0979.js → 1ab98591d2f2bc604505.js} +1 -1
  39. package/assets/esri/core/workers/chunks/1b2e17c04c34cfa671a1.js +1 -0
  40. package/assets/esri/core/workers/chunks/211837df0edada4414c5.js +1 -0
  41. package/assets/esri/core/workers/chunks/22b07c54a5fcc27771b0.js +1 -0
  42. package/assets/esri/core/workers/chunks/{cd8fec3500e6503ae020.js → 23a9dd9454d5249bbd59.js} +1 -1
  43. package/assets/esri/core/workers/chunks/311c4914a4f69f3c1525.js +1 -0
  44. package/assets/esri/core/workers/chunks/{108675a17e432a02cf66.js → 35cbc61a006351620ead.js} +1 -1
  45. package/assets/esri/core/workers/chunks/{1bf4b5e5402790ccb450.js → 369f37060608342a4262.js} +1 -1
  46. package/assets/esri/core/workers/chunks/3b5e71b156244789f624.js +1 -0
  47. package/assets/esri/core/workers/chunks/3f0959b1abafe516146e.js +1 -0
  48. package/assets/esri/core/workers/chunks/{308fb48d080e01499a26.js → 436f206898306df019ac.js} +1 -1
  49. package/assets/esri/core/workers/chunks/{553ca1e55e9f1359839c.js → 44c228388a95fa958827.js} +1 -1
  50. package/assets/esri/core/workers/chunks/454c15367cccbf63af7a.js +1 -0
  51. package/assets/esri/core/workers/chunks/{11ab10668632648b2ba7.js → 492d575894c7905bb70c.js} +1 -1
  52. package/assets/esri/core/workers/chunks/{f3d8d5fe15501220792d.js → 495b11fdecc3ba90d454.js} +1 -1
  53. package/assets/esri/core/workers/chunks/4f33a2ecb154a2c2449c.js +1 -0
  54. package/assets/esri/core/workers/chunks/{b1d3d2c93c189e215f67.js → 5047acfd66539eefe353.js} +1 -1
  55. package/assets/esri/core/workers/chunks/{cddce67919e13e2f365e.js → 51fd6662245b920af652.js} +1 -1
  56. package/assets/esri/core/workers/chunks/52726458f590e726d52c.js +1 -0
  57. package/assets/esri/core/workers/chunks/5873c7b65d0fb04998fb.js +1 -0
  58. package/assets/esri/core/workers/chunks/{d677b378449257103ec4.js → 58cf5b9a6aa685fc3367.js} +1 -1
  59. package/assets/esri/core/workers/chunks/{395a0773ccafd1f24c4d.js → 5d31fbabaa875f8627c0.js} +1 -1
  60. package/assets/esri/core/workers/chunks/67a45faa80316f43c51b.js +1 -0
  61. package/assets/esri/core/workers/chunks/6d09965ab2bff9da88b6.js +1 -0
  62. package/assets/esri/core/workers/chunks/{521aac8a665e98e4ca78.js → 700122f775b98a7ed353.js} +1 -1
  63. package/assets/esri/core/workers/chunks/{a92c1171314a68504c1b.js → 7353d78feba7e6302b6e.js} +1 -1
  64. package/assets/esri/core/workers/chunks/{13ce8e8d45779b11ee12.js → 7f4fa2f2e85863d3cfb9.js} +1 -1
  65. package/assets/esri/core/workers/chunks/{a4f89568205d78d91cfe.js → 80c36f1786ae0be00962.js} +1 -1
  66. package/assets/esri/core/workers/chunks/{549f4ab9e285deaf04fb.js → 81d89107ff82604a3ea0.js} +1 -1
  67. package/assets/esri/core/workers/chunks/8208c073e606973ea1ad.js +1 -0
  68. package/assets/esri/core/workers/chunks/{62ed6b45482e39d67785.js → 893a5ab0c2df9262efd8.js} +1 -1
  69. package/assets/esri/core/workers/chunks/{1f0c7ab33e466a37c7f9.js → 8c1f1eb36198ce40ef13.js} +1 -1
  70. package/assets/esri/core/workers/chunks/92928c56b312e1514600.js +1 -0
  71. package/assets/esri/core/workers/chunks/94929cf2b9fc66a93882.js +1 -0
  72. package/assets/esri/core/workers/chunks/94f02082a006003ef5a9.js +1 -0
  73. package/assets/esri/core/workers/chunks/951e3c911a3486b1e609.js +1 -0
  74. package/assets/esri/core/workers/chunks/{54666586754949bfa584.js → 983356eb4fd0a0dcf3fd.js} +1 -1
  75. package/assets/esri/core/workers/chunks/a16e75ff5cd9b22be197.js +1 -0
  76. package/assets/esri/core/workers/chunks/{36d9208895abd1ba4ff1.js → a623676c74745e040a2a.js} +1 -1
  77. package/assets/esri/core/workers/chunks/{1065fd655bb7cee243fd.js → a624dd283d264dce35a8.js} +1 -1
  78. package/assets/esri/core/workers/chunks/{2dfaead2ec6434513d45.js → a6742abe3ebe371e85f1.js} +1 -1
  79. package/assets/esri/core/workers/chunks/acc7ff44bfcb5c195114.js +1 -0
  80. package/assets/esri/core/workers/chunks/ad92427bf597a6e0a299.js +1 -0
  81. package/assets/esri/core/workers/chunks/{640085b5ade5c7f16228.js → b285de471ca90f38ec25.js} +1 -1
  82. package/assets/esri/core/workers/chunks/b8f83a272fc41765031d.js +1 -0
  83. package/assets/esri/core/workers/chunks/{19270a2de33f2662005b.js → b93f2bd6429879f92143.js} +1 -1
  84. package/assets/esri/core/workers/chunks/be6cc8a1485961f22372.js +1 -0
  85. package/assets/esri/core/workers/chunks/{bf5a120bc0c4851dbb69.js → bef2a70d382515b3c84e.js} +1 -1
  86. package/assets/esri/core/workers/chunks/{e2973e5626e5039209f9.js → c448540065690cac0744.js} +1 -1
  87. package/assets/esri/core/workers/chunks/{95057105f1b3bf805140.js → cd2ea924cb91cdb6dde9.js} +1 -1
  88. package/assets/esri/core/workers/chunks/d199deff988eaefe18b4.js +1 -0
  89. package/assets/esri/core/workers/chunks/{2ef4c0092c59a98a5532.js → d54988c21ea5667d00b7.js} +1 -1
  90. package/assets/esri/core/workers/chunks/d94a2ad5a91de7086fbe.js +1 -0
  91. package/assets/esri/core/workers/chunks/d9736c783513e9c9b22f.js +1 -0
  92. package/assets/esri/core/workers/chunks/{23396a6318edf9264c1f.js → dcf6f7001f470f76bd3e.js} +1 -1
  93. package/assets/esri/core/workers/chunks/dd99b77a7c0a052507bb.js +33 -0
  94. package/assets/esri/core/workers/chunks/{cd39a53ef74f47604977.js → e03c706e327f4989280a.js} +1 -1
  95. package/assets/esri/core/workers/chunks/e47535f795b15608a6cb.js +1 -0
  96. package/assets/esri/core/workers/chunks/e572ffc1d000e4e6325f.js +1 -0
  97. package/assets/esri/core/workers/chunks/ed38c1043e6a83f49f93.js +1 -0
  98. package/assets/esri/core/workers/chunks/f44f358db5c56d5bbc0c.js +1 -0
  99. package/assets/esri/core/workers/chunks/fa95c9248fbfab338f2e.js +1 -0
  100. package/chunks/ChapmanAtmosphere.glsl.js +12 -9
  101. package/chunks/ComponentShader.glsl.js +29 -29
  102. package/chunks/GlowComposition.glsl.js +1 -1
  103. package/chunks/Haze.glsl.js +15 -21
  104. package/chunks/RasterColorizer.glsl.js +10 -10
  105. package/chunks/Viewshed.glsl.js +1 -1
  106. package/config.d.ts +1 -1
  107. package/config.js +1 -1
  108. package/core/Collection.d.ts +1 -1
  109. package/core/Error.d.ts +1 -1
  110. package/core/Evented.d.ts +1 -1
  111. package/core/accessorSupport/decorators.d.ts +1 -1
  112. package/core/colorUtils.js +1 -1
  113. package/editing/sharedTemplates/SharedTemplate.d.ts +1 -1
  114. package/editing/sharedTemplates/SharedTemplateMetadata.d.ts +1 -1
  115. package/geometry/Mesh.d.ts +1 -2
  116. package/geometry/coordinateFormatter.d.ts +1 -1
  117. package/geometry/projection/projectPointToVector.js +1 -1
  118. package/geometry/projectionUtils.js +1 -1
  119. package/geometry/support/MeshMaterial.d.ts +1 -1
  120. package/geometry/support/MeshMaterialMetallicRoughness.d.ts +1 -1
  121. package/geometry/support/MeshTexture.d.ts +1 -1
  122. package/geometry/support/meshUtils/{interfaces.d.ts → types.d.ts} +10 -1
  123. package/geometry/support/meshUtils.d.ts +1 -1
  124. package/geometry/support/normalizeUtils.d.ts +1 -1
  125. package/geometry/support/typeUtils.d.ts +3 -1
  126. package/geometry/support/typeUtils.js +1 -1
  127. package/{views/3d/glTF/internal/resourceUtils.d.ts → geometry/types.d.ts} +5 -1
  128. package/interfaces.d.ts +779 -812
  129. package/intl/date.d.ts +1 -1
  130. package/kernel.js +1 -1
  131. package/layers/CSVLayer.d.ts +3 -3
  132. package/layers/CatalogLayer.d.ts +1 -1
  133. package/layers/FeatureLayer.d.ts +7 -4
  134. package/layers/GaussianSplatLayer.d.ts +22 -0
  135. package/layers/GeoJSONLayer.d.ts +3 -3
  136. package/layers/ImageryTileLayer.d.ts +9 -9
  137. package/layers/MapImageLayer.d.ts +2 -2
  138. package/layers/OrientedImageryLayer.d.ts +2 -2
  139. package/layers/ParquetLayer.d.ts +1 -1
  140. package/layers/RouteLayer.d.ts +3 -3
  141. package/layers/SceneLayer.d.ts +3 -3
  142. package/layers/SubtypeGroupLayer.d.ts +1 -1
  143. package/layers/VectorTileLayer.d.ts +3 -3
  144. package/layers/VideoLayer.d.ts +2 -2
  145. package/layers/WCSLayer.d.ts +1 -1
  146. package/layers/WFSLayer.d.ts +3 -3
  147. package/layers/catalog/CatalogFootprintLayer.d.ts +3 -3
  148. package/layers/graphics/sources/OGCFeatureSource.js +1 -1
  149. package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
  150. package/layers/graphics/sources/support/clientSideDefaults.js +1 -1
  151. package/layers/knowledgeGraph/KnowledgeGraphSublayer.d.ts +2 -2
  152. package/layers/knowledgeGraph/layerUtils.js +1 -1
  153. package/layers/mixins/ArcGISImageService.d.ts +7 -7
  154. package/layers/mixins/BlendLayer.d.ts +2 -2
  155. package/layers/mixins/EditBusLayer.d.ts +6 -0
  156. package/layers/mixins/FeatureLayerBase.d.ts +2 -2
  157. package/layers/mixins/ImageryTileMixin.d.ts +4 -4
  158. package/layers/mixins/properties/ILayerWithGetFeatureTitle.d.ts +1 -1
  159. package/layers/ogc/wcsUtils.d.ts +1 -1
  160. package/layers/orientedImagery/transformations/imageToWorld.d.ts +2 -2
  161. package/layers/orientedImagery/transformations/{interfaces.d.ts → types.d.ts} +1 -1
  162. package/layers/orientedImagery/transformations/worldToImage.d.ts +2 -2
  163. package/layers/raster/datasets/wcsCapabilitiesParser.d.ts +1 -1
  164. package/layers/raster/datasets/wcsCoverageParser.d.ts +1 -1
  165. package/layers/raster/functions/creators/createAppearenceFunctions.d.ts +2 -2
  166. package/layers/raster/functions/creators/createBandIndexFunctions.d.ts +1 -1
  167. package/layers/raster/functions/creators/createChangeFunctions.d.ts +1 -1
  168. package/layers/raster/functions/creators/createConversionFunctions.d.ts +1 -1
  169. package/layers/raster/functions/creators/createDataManagementFunctions.d.ts +2 -2
  170. package/layers/raster/functions/creators/createLocalFunctions.d.ts +1 -1
  171. package/layers/raster/functions/creators/createMultiRasterAnalysisFunctions.d.ts +1 -1
  172. package/layers/raster/functions/creators/createStatisticsFunctions.d.ts +1 -1
  173. package/layers/raster/functions/creators/createSurfaceFunctions.d.ts +1 -1
  174. package/layers/support/ControlPoint.d.ts +3 -3
  175. package/layers/support/ControlPointsGeoreference.d.ts +6 -6
  176. package/layers/support/EditingCapabilities.d.ts +2 -2
  177. package/layers/support/FeatureEffect.d.ts +3 -3
  178. package/layers/support/LabelClass.d.ts +1 -1
  179. package/layers/support/RasterInfo.d.ts +1 -1
  180. package/layers/support/SpriteSource.d.ts +1 -1
  181. package/layers/support/StreamConnection.d.ts +1 -1
  182. package/layers/support/Sublayer.d.ts +1 -1
  183. package/layers/support/SubtypeSublayer.d.ts +15 -2
  184. package/layers/support/TimeInfo.d.ts +1 -1
  185. package/layers/support/capabilities.js +1 -1
  186. package/layers/support/layerUtils.js +1 -1
  187. package/layers/support/rasterFunctionUtils.d.ts +1 -1
  188. package/layers/support/serviceCapabilitiesUtils.js +1 -1
  189. package/layers/support/{interfaces.d.ts → types.d.ts} +6 -6
  190. package/layers/{interfaces.d.ts → types.d.ts} +18 -1
  191. package/linkChart/ChronologicalLayoutSettings.d.ts +1 -1
  192. package/linkChart/OrganicLayoutSettings.d.ts +1 -1
  193. package/networks/Network.d.ts +4 -4
  194. package/networks/UtilityNetwork.d.ts +8 -8
  195. package/networks/support/TopologyValidationJobInfo.d.ts +1 -1
  196. package/networks/support/TraceJobInfo.d.ts +1 -1
  197. package/package.json +1 -1
  198. package/popup/content/CustomContent.d.ts +1 -1
  199. package/portal/PortalItem.d.ts +1 -1
  200. package/portal/PortalItemResource.d.ts +1 -1
  201. package/portal/PortalUser.d.ts +2 -2
  202. package/renderers/FlowRenderer.d.ts +1 -1
  203. package/renderers/RasterStretchRenderer.d.ts +2 -2
  204. package/renderers/Renderer.d.ts +1 -1
  205. package/renderers/VectorFieldRenderer.d.ts +1 -1
  206. package/renderers/mixins/VisualVariablesMixin.d.ts +3 -3
  207. package/renderers/support/AuthoringInfo.d.ts +1 -1
  208. package/renderers/support/rasterRendererHelper.d.ts +1 -1
  209. package/renderers/support/renderingInfoUtils.js +1 -1
  210. package/renderers/{interfaces.d.ts → types.d.ts} +3 -1
  211. package/renderers/visualVariables/SizeVariable.d.ts +1 -1
  212. package/renderers/visualVariables/VisualVariable.d.ts +1 -1
  213. package/request/{interfaces.d.ts → types.d.ts} +10 -10
  214. package/request.d.ts +4 -4
  215. package/rest/closestFacility.d.ts +1 -1
  216. package/rest/featureService/FeatureService.d.ts +1 -1
  217. package/rest/featureService/FeatureService.js +1 -1
  218. package/rest/featureService/{interfaces.d.ts → types.d.ts} +16 -3
  219. package/rest/featureService/utils.d.ts +1 -1
  220. package/rest/find.d.ts +1 -1
  221. package/rest/geometryService.d.ts +1 -1
  222. package/rest/geoprocessor.d.ts +1 -1
  223. package/rest/identify.d.ts +1 -1
  224. package/rest/imageService.d.ts +5 -5
  225. package/rest/knowledgeGraphService.d.ts +19 -19
  226. package/rest/lastMileDelivery.d.ts +1 -1
  227. package/rest/locator.d.ts +1 -1
  228. package/rest/networkService.d.ts +1 -1
  229. package/rest/networks/queryAssociations.d.ts +1 -1
  230. package/rest/networks/synthesizeAssociationGeometries.d.ts +1 -1
  231. package/rest/networks/trace.d.ts +1 -1
  232. package/rest/places.d.ts +1 -1
  233. package/rest/print.d.ts +2 -2
  234. package/rest/query.d.ts +2 -2
  235. package/rest/route.d.ts +1 -1
  236. package/rest/serviceArea.d.ts +1 -1
  237. package/rest/support/AddressToLocationsParameters.d.ts +1 -1
  238. package/rest/support/AddressesToLocationsParameters.d.ts +1 -1
  239. package/rest/support/AttributeBinsQuery.d.ts +3 -3
  240. package/rest/support/JobInfo.d.ts +2 -2
  241. package/rest/support/LastMileDeliveryParameters.d.ts +1 -1
  242. package/rest/support/LocationToAddressParameters.d.ts +1 -1
  243. package/rest/support/ParameterValue.d.ts +1 -1
  244. package/rest/support/ProjectParameters.d.ts +1 -1
  245. package/rest/symbolService.d.ts +3 -3
  246. package/smartMapping/heuristics/binLevel.d.ts +1 -1
  247. package/smartMapping/heuristics/scaleRange.d.ts +1 -1
  248. package/smartMapping/heuristics/sizeRange.d.ts +1 -1
  249. package/smartMapping/heuristics/{interfaces.d.ts → types.d.ts} +1 -1
  250. package/smartMapping/labels/clusters.d.ts +1 -1
  251. package/smartMapping/popup/clusters.d.ts +1 -1
  252. package/smartMapping/popup/templates.d.ts +1 -1
  253. package/smartMapping/raster/renderers/classBreaks.d.ts +2 -2
  254. package/smartMapping/raster/renderers/colormap.d.ts +1 -1
  255. package/smartMapping/raster/renderers/flow.d.ts +4 -4
  256. package/smartMapping/raster/renderers/rgb.d.ts +2 -2
  257. package/smartMapping/raster/renderers/shadedRelief.d.ts +1 -1
  258. package/smartMapping/raster/renderers/stretch.d.ts +2 -2
  259. package/smartMapping/raster/renderers/{interfaces.d.ts → types.d.ts} +1 -1
  260. package/smartMapping/raster/renderers/uniqueValue.d.ts +1 -1
  261. package/smartMapping/raster/renderers/vectorField.d.ts +1 -1
  262. package/smartMapping/raster/support/utils.d.ts +1 -1
  263. package/smartMapping/renderers/color.d.ts +4 -4
  264. package/smartMapping/renderers/dotDensity.d.ts +3 -3
  265. package/smartMapping/renderers/heatmap.d.ts +3 -3
  266. package/smartMapping/renderers/location.d.ts +2 -2
  267. package/smartMapping/renderers/opacity.d.ts +3 -3
  268. package/smartMapping/renderers/pieChart.d.ts +3 -3
  269. package/smartMapping/renderers/predominance.d.ts +2 -2
  270. package/smartMapping/renderers/relationship.d.ts +4 -4
  271. package/smartMapping/renderers/size.d.ts +4 -4
  272. package/smartMapping/renderers/support/rendererUtils.d.ts +1 -1
  273. package/smartMapping/renderers/type.d.ts +3 -3
  274. package/smartMapping/renderers/univariateColorSize.d.ts +4 -4
  275. package/smartMapping/statistics/classBreaks.d.ts +2 -2
  276. package/smartMapping/statistics/heatmapStatistics.d.ts +2 -2
  277. package/smartMapping/statistics/histogram.d.ts +1 -2
  278. package/smartMapping/statistics/predominantCategories.d.ts +2 -2
  279. package/smartMapping/statistics/summaryStatistics.d.ts +2 -2
  280. package/smartMapping/statistics/summaryStatisticsForAge.d.ts +1 -1
  281. package/smartMapping/statistics/support/ageUtils.d.ts +1 -1
  282. package/smartMapping/statistics/types.d.ts +571 -0
  283. package/smartMapping/statistics/uniqueValues.d.ts +2 -2
  284. package/smartMapping/symbology/color.d.ts +1 -1
  285. package/smartMapping/symbology/dotDensity.d.ts +1 -1
  286. package/smartMapping/symbology/flow.d.ts +1 -1
  287. package/smartMapping/symbology/heatmap.d.ts +1 -1
  288. package/smartMapping/symbology/location.d.ts +1 -1
  289. package/smartMapping/symbology/pieChart.d.ts +1 -1
  290. package/smartMapping/symbology/predominance.d.ts +1 -1
  291. package/smartMapping/symbology/relationship.d.ts +1 -1
  292. package/smartMapping/symbology/size.d.ts +1 -1
  293. package/smartMapping/symbology/support/colorRamps.d.ts +1 -1
  294. package/smartMapping/symbology/type.d.ts +1 -1
  295. package/smartMapping/types.d.ts +18 -0
  296. package/support/groundUtils.js +1 -1
  297. package/support/revision.js +1 -1
  298. package/support/tests/setupServiceMocksMesh.js +1 -1
  299. package/support/timeUtils.d.ts +1 -1
  300. package/symbols/LineStyleMarker3D.d.ts +1 -1
  301. package/symbols/LineSymbol3DLayer.d.ts +1 -1
  302. package/symbols/LineSymbolMarker.d.ts +1 -1
  303. package/symbols/PathSymbol3DLayer.d.ts +1 -1
  304. package/symbols/SimpleLineSymbol.d.ts +1 -1
  305. package/symbols/patterns/LineStylePattern3D.d.ts +1 -1
  306. package/symbols/patterns/StylePattern3D.d.ts +1 -1
  307. package/symbols/support/ElevationInfo.d.ts +1 -1
  308. package/symbols/support/Symbol3DOutline.d.ts +1 -1
  309. package/symbols/support/symbolUtils.d.ts +2 -2
  310. package/time/TimeExtent.d.ts +1 -1
  311. package/unionTypes.d.ts +3 -3
  312. package/versionManagement/VersionManagementService.d.ts +1 -1
  313. package/versionManagement/VersionManager.d.ts +3 -3
  314. package/versionManagement/VersioningState.d.ts +1 -1
  315. package/versionManagement/utils.d.ts +1 -1
  316. package/versionManagement/versionAdapters/utils.d.ts +7 -7
  317. package/views/2d/analysis/ElevationProfile/ElevationProfileLineVisualization2D.js +1 -1
  318. package/views/2d/analysis/ElevationProfile/ElevationProfileVisualization2D.js +1 -1
  319. package/views/2d/analysis/ElevationProfileAnalysisView2D.d.ts +1 -2
  320. package/views/2d/engine/vectorTiles/style/StyleProperty.js +1 -1
  321. package/views/2d/layers/BaseLayerView2D.d.ts +2 -2
  322. package/views/2d/layers/BaseLayerViewGL2D.d.ts +9 -9
  323. package/views/2d/layers/ImageryLayerView2D.js +1 -1
  324. package/views/2d/layers/ImageryTileLayerView2D.js +1 -1
  325. package/views/2d/layers/imagery/ImageryTileView2D.js +1 -1
  326. package/views/2d/layers/types.d.ts +6 -0
  327. package/views/2d/{layers/support/interfaces.d.ts → types.d.ts} +71 -2
  328. package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementVisualization.js +1 -1
  329. package/views/3d/analysis/Dimension/DimensionVisualization.js +1 -1
  330. package/views/3d/analysis/Dimension/LengthDimensionSubTool.js +1 -1
  331. package/views/3d/analysis/Dimension/lengthDimensionManipulatorUtils.js +1 -1
  332. package/views/3d/analysis/DirectLineMeasurement/DirectLineMeasurementVisualization.js +1 -1
  333. package/views/3d/analysis/ElevationProfile/ElevationProfileLineVisualization3D.js +1 -1
  334. package/views/3d/analysis/ElevationProfile/ElevationProfileVisualization3D.js +1 -1
  335. package/views/3d/analysis/ElevationProfileAnalysisView3D.d.ts +1 -2
  336. package/views/3d/analysis/LineOfSight/LineOfSightManipulators.js +1 -1
  337. package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
  338. package/views/3d/analysis/LineOfSight/LineOfSightVisualization.js +1 -1
  339. package/views/3d/analysis/ShadowCastAnalysisView3D.d.ts +2 -2
  340. package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
  341. package/views/3d/analysis/Slice/ResizeManipulator.js +1 -1
  342. package/views/3d/analysis/Slice/RotateManipulator.js +1 -1
  343. package/views/3d/analysis/Slice/ShiftManipulator.js +1 -1
  344. package/views/3d/analysis/Viewshed/ViewshedArrowManipulator.js +1 -1
  345. package/views/3d/analysis/Viewshed/ViewshedConfiguration.js +1 -1
  346. package/views/3d/analysis/Viewshed/ViewshedFieldOfViewManipulation.js +1 -1
  347. package/views/3d/analysis/Viewshed/ViewshedSubVisualization.js +1 -1
  348. package/views/3d/analysis/Viewshed/viewshedToolManipulatorUtils.js +1 -1
  349. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +1 -1
  350. package/views/3d/environment/ChapmanApproximation.glsl.js +9 -10
  351. package/views/3d/environment/ChapmanAtmosphere.glsl.js +1 -1
  352. package/views/3d/environment/ChapmanAtmosphere.js +1 -1
  353. package/views/3d/environment/ChapmanAtmosphereTechnique.js +1 -1
  354. package/views/3d/environment/ChapmanRaymarching.glsl.js +7 -9
  355. package/views/3d/environment/CloudsParameters.js +1 -1
  356. package/views/3d/environment/EnvironmentManager.js +1 -1
  357. package/views/3d/environment/PrecipitationTechnique.js +1 -1
  358. package/views/3d/environment/SceneViewEnvironment.d.ts +1 -1
  359. package/views/3d/environment/SimpleAtmosphereTechnique.js +1 -1
  360. package/views/3d/environment/types.d.ts +13 -0
  361. package/views/3d/interactive/SnappingVisualizer3D.js +1 -1
  362. package/views/3d/interactive/editingTools/draw/DrawGraphicTool3D.js +1 -1
  363. package/views/3d/interactive/editingTools/manipulations/MoveXYAxisManipulation.js +1 -1
  364. package/views/3d/interactive/editingTools/manipulations/MoveXYDiscManipulation.js +1 -1
  365. package/views/3d/interactive/editingTools/manipulations/MoveZManipulation.js +1 -1
  366. package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
  367. package/views/3d/interactive/editingTools/settings.js +1 -1
  368. package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DView.js +1 -1
  369. package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DView.js +1 -1
  370. package/views/3d/layers/I3SMeshView3D.js +1 -1
  371. package/views/3d/layers/ImageryLayerView3D.js +1 -1
  372. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  373. package/views/3d/layers/SceneLayerWorker.js +1 -1
  374. package/views/3d/layers/{I3SMeshWorkerHandle.js → SceneLayerWorkerHandle.js} +1 -1
  375. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  376. package/views/3d/layers/graphics/Graphics3DLineCalloutSymbolLayer.js +1 -1
  377. package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
  378. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  379. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  380. package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
  381. package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
  382. package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
  383. package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
  384. package/views/3d/layers/graphics/pipeline/symbolization/IconSymbolLayerRenderer.js +1 -1
  385. package/views/3d/layers/i3s/I3SClientMaterialUtil.js +1 -1
  386. package/views/3d/layers/support/edgeUtils.js +1 -1
  387. package/views/3d/support/flow/geometryUtils.js +1 -1
  388. package/views/3d/support/viewpointUtils.js +1 -1
  389. package/views/3d/terrain/BlendLayersTechnique.js +1 -1
  390. package/views/3d/terrain/RasterColorizerTechnique.js +1 -1
  391. package/views/3d/terrain/TerrainRenderer.js +1 -1
  392. package/views/3d/webgl/ManagedFBO.d.ts +4 -5
  393. package/views/3d/webgl/RenderNode.d.ts +1 -1
  394. package/views/3d/{webgl-engine/lighting/SceneLighting.d.ts → webgl/types.d.ts} +4 -6
  395. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  396. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  397. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechnique.js +1 -1
  398. package/views/3d/webgl-engine/collections/Component/SourceGeometry.js +1 -1
  399. package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexPosition.glsl.js +2 -2
  400. package/views/3d/webgl-engine/core/shaderLibrary/attributes/RibbonVertexPosition.glsl.js +1 -1
  401. package/views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js +1 -2
  402. package/views/3d/webgl-engine/core/shaderLibrary/raster/RasterColorizer.glsl.js +1 -1
  403. package/views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js +1 -1
  404. package/views/3d/webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js +18 -27
  405. package/views/3d/webgl-engine/core/shaderModules/Float4sPassUniform.js +1 -1
  406. package/views/3d/webgl-engine/core/shaderModules/FloatsPassUniform.js +1 -1
  407. package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechnique.js +1 -1
  408. package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechniqueRepository.js +1 -1
  409. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskTechnique.js +1 -1
  410. package/views/3d/webgl-engine/effects/focusArea/FocusAreaOutlineItem.js +1 -1
  411. package/views/3d/webgl-engine/effects/haze/Haze.glsl.js +1 -1
  412. package/views/3d/webgl-engine/effects/haze/Haze.js +1 -1
  413. package/views/3d/webgl-engine/effects/haze/HazeTechnique.js +1 -1
  414. package/views/3d/webgl-engine/effects/highlight/HighlightApplyTechnique.js +1 -1
  415. package/views/3d/webgl-engine/effects/highlight/HighlightBlurTechnique.js +1 -1
  416. package/views/3d/webgl-engine/effects/highlight/HighlightToSingleTechnique.js +1 -1
  417. package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.js +1 -1
  418. package/views/3d/webgl-engine/effects/laserlines/LaserlinePathData.js +1 -1
  419. package/views/3d/webgl-engine/effects/laserlines/LaserlinePathTechnique.js +1 -1
  420. package/views/3d/webgl-engine/effects/stars/StarsTechnique.js +1 -1
  421. package/views/3d/webgl-engine/lib/CutFillColor.js +1 -1
  422. package/views/3d/webgl-engine/lib/DefaultVertexBufferLayouts.js +1 -1
  423. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  424. package/views/3d/webgl-engine/lib/TextRenderParameters.js +1 -1
  425. package/views/3d/webgl-engine/lib/edgeRendering/EdgeShaderTechnique.js +1 -1
  426. package/views/3d/webgl-engine/lib/edgeRendering/bufferLayouts.js +1 -1
  427. package/views/3d/webgl-engine/materials/DefaultLayouts.js +1 -1
  428. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  429. package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
  430. package/views/3d/webgl-engine/materials/WaterTechnique.js +1 -1
  431. package/views/3d/webgl-engine/shaders/CheckerBoardTechnique.js +1 -1
  432. package/views/3d/webgl-engine/shaders/ColorMaterialTechnique.js +1 -1
  433. package/views/3d/webgl-engine/shaders/CutFillMaskTechnique.js +1 -1
  434. package/views/3d/webgl-engine/shaders/CutFillTargetDepthTechnique.js +1 -1
  435. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  436. package/views/3d/webgl-engine/shaders/HUDMaterialTechnique.js +1 -1
  437. package/views/3d/webgl-engine/shaders/HeatmapDensityTechnique.js +1 -1
  438. package/views/3d/webgl-engine/shaders/ImageMaterialTechnique.js +1 -1
  439. package/views/3d/webgl-engine/shaders/LineCalloutTechnique.js +1 -1
  440. package/views/3d/webgl-engine/shaders/LineMarkerTechnique.js +1 -1
  441. package/views/3d/webgl-engine/shaders/MeasurementArrowTechnique.js +1 -1
  442. package/views/3d/webgl-engine/shaders/NativeLineTechnique.js +1 -1
  443. package/views/3d/webgl-engine/shaders/PatternTechnique.js +1 -1
  444. package/views/3d/webgl-engine/shaders/PointRendererTechnique.js +1 -1
  445. package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
  446. package/views/3d/webgl-engine/shaders/ShadedColorMaterialTechnique.js +1 -1
  447. package/views/3d/webgl-engine/shaders/SlicePlaneMaterialTechnique.js +1 -1
  448. package/views/3d/webgl-engine/shaders/SphereDepthInterpolate.glsl.js +5 -5
  449. package/views/3d/webgl-engine/shaders/TerrainTechnique.js +1 -1
  450. package/views/LinkChartView.d.ts +5 -5
  451. package/views/Magnifier.d.ts +1 -1
  452. package/views/MapView.d.ts +11 -12
  453. package/views/PopupView.d.ts +1 -1
  454. package/views/SceneView.d.ts +19 -23
  455. package/views/VideoView.d.ts +1 -2
  456. package/views/View.d.ts +2 -3
  457. package/views/View2D.d.ts +8 -9
  458. package/views/analysis/ElevationProfile/ElevationProfileHoveredPointVisualization.js +1 -1
  459. package/views/analysis/ElevationProfile/ElevationProfileResult.d.ts +1 -1
  460. package/views/analysis/ElevationProfile/types.d.ts +68 -0
  461. package/views/analysis/types.d.ts +2 -2
  462. package/views/draw/Draw.d.ts +1 -1
  463. package/views/draw/DrawAction.d.ts +1 -1
  464. package/views/draw/DrawOperation.js +1 -1
  465. package/views/draw/PolygonDrawAction.d.ts +1 -1
  466. package/views/draw/PolygonDrawAction.js +1 -1
  467. package/views/draw/PolylineDrawAction.d.ts +1 -1
  468. package/views/draw/PolylineDrawAction.js +1 -1
  469. package/views/draw/support/GraphicMover.js +1 -1
  470. package/views/draw/{interfaces.d.ts → types.d.ts} +3 -1
  471. package/views/input/IViewEvents.d.ts +1 -1
  472. package/views/interactive/Tooltip.d.ts +1 -1
  473. package/views/interactive/sketch/SketchValueOptions.d.ts +1 -1
  474. package/views/interactive/sketch/Units.d.ts +5 -1
  475. package/views/interactive/tooltip/types.d.ts +4 -0
  476. package/views/layers/BuildingComponentSublayerView.d.ts +1 -1
  477. package/views/layers/BuildingSceneLayerView.d.ts +1 -1
  478. package/views/layers/ImageryLayerViewMixin.d.ts +3 -4
  479. package/views/layers/PointCloudLayerView.d.ts +1 -1
  480. package/views/layers/support/highlightUtils.js +1 -1
  481. package/views/navigation/NavigationActionMap.d.ts +1 -1
  482. package/views/support/colorUtils.d.ts +1 -1
  483. package/views/{interfaces.d.ts → types.d.ts} +160 -6
  484. package/views/ui/DefaultUI.d.ts +1 -1
  485. package/views/ui/UI.d.ts +1 -1
  486. package/views/ui/{interfaces.d.ts → types.d.ts} +12 -1
  487. package/webdoc/widgets/FloorFilter.d.ts +2 -2
  488. package/webdoc/widgets/TimeSlider.d.ts +5 -5
  489. package/webmap/InitialViewProperties.d.ts +2 -2
  490. package/webscene/Environment.d.ts +5 -5
  491. package/webscene/InitialViewProperties.d.ts +0 -1
  492. package/webscene/Slide.d.ts +36 -4
  493. package/webscene/Slide.js +1 -1
  494. package/webscene/support/FeatureReference.d.ts +1 -1
  495. package/webscene/support/SlidePopupInfo.d.ts +2 -2
  496. package/webscene/types.d.ts +5 -1
  497. package/widgets/AreaMeasurement2D/AreaMeasurement2DViewModel.d.ts +1 -1
  498. package/widgets/AreaMeasurement3D/AreaMeasurement3DViewModel.d.ts +7 -1
  499. package/widgets/AreaMeasurement3D.d.ts +1 -0
  500. package/widgets/Attachments/AttachmentsViewModel.d.ts +1 -1
  501. package/widgets/Attachments.d.ts +1 -1
  502. package/widgets/Attribution/AttributionViewModel.d.ts +2 -2
  503. package/widgets/BasemapGallery/support/LocalBasemapsSource.d.ts +1 -1
  504. package/widgets/BasemapGallery/support/PortalBasemapsSource.d.ts +1 -1
  505. package/widgets/BasemapGallery.d.ts +1 -1
  506. package/widgets/BasemapLayerList/BasemapLayerListViewModel.d.ts +3 -3
  507. package/widgets/BasemapLayerList.d.ts +2 -2
  508. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.d.ts +4 -4
  509. package/widgets/BatchAttributeForm/inputs/BatchFormInputs.d.ts +1 -1
  510. package/widgets/BatchAttributeForm/inputs/EditableInput.d.ts +1 -1
  511. package/widgets/BatchAttributeForm/inputs/FieldInput.d.ts +1 -1
  512. package/widgets/BatchAttributeForm/inputs/GroupInput.d.ts +1 -1
  513. package/widgets/BatchAttributeForm/inputs/InputBase.d.ts +1 -1
  514. package/widgets/BatchAttributeForm/inputs/SingleFeatureInput.d.ts +1 -1
  515. package/widgets/BatchAttributeForm.d.ts +2 -2
  516. package/widgets/Bookmarks/BookmarksViewModel.d.ts +5 -5
  517. package/widgets/Bookmarks/{interfaces.d.ts → types.d.ts} +1 -1
  518. package/widgets/Bookmarks.d.ts +6 -7
  519. package/widgets/BuildingExplorer/BuildingExplorerViewModel.d.ts +1 -0
  520. package/widgets/BuildingExplorer/BuildingLevel.d.ts +1 -0
  521. package/widgets/BuildingExplorer/BuildingNumericFilterViewModel.d.ts +1 -0
  522. package/widgets/BuildingExplorer/BuildingPhase.d.ts +1 -0
  523. package/widgets/BuildingExplorer.d.ts +4 -1
  524. package/widgets/CatalogLayerList/CatalogLayerListViewModel.d.ts +3 -3
  525. package/widgets/CatalogLayerList.d.ts +2 -2
  526. package/widgets/Compass/CompassViewModel.d.ts +1 -1
  527. package/widgets/Compass.d.ts +1 -1
  528. package/widgets/CoordinateConversion/CoordinateConversionViewModel.d.ts +4 -4
  529. package/widgets/CoordinateConversion/support/Conversion.d.ts +1 -1
  530. package/widgets/CoordinateConversion/support/Format.d.ts +2 -2
  531. package/widgets/CoordinateConversion.d.ts +2 -3
  532. package/widgets/Daylight/DaylightViewModel.d.ts +3 -1
  533. package/widgets/Daylight/VisibleElements.d.ts +3 -0
  534. package/widgets/Daylight/types.d.ts +6 -0
  535. package/widgets/Daylight.d.ts +5 -3
  536. package/widgets/DirectLineMeasurement3D/DirectLineMeasurement3DViewModel.d.ts +7 -1
  537. package/widgets/DirectLineMeasurement3D.d.ts +1 -0
  538. package/widgets/DirectionalPad/DirectionalPadViewModel.d.ts +1 -2
  539. package/widgets/DirectionalPad/{utils.d.ts → types.d.ts} +3 -1
  540. package/widgets/Directions/DirectionsViewModel.d.ts +3 -3
  541. package/widgets/Directions.d.ts +4 -5
  542. package/widgets/DistanceMeasurement2D/DistanceMeasurement2DViewModel.d.ts +1 -1
  543. package/widgets/Editor/CreateFeaturesWorkflow.d.ts +1 -1
  544. package/widgets/Editor/CreateFeaturesWorkflowData.d.ts +2 -2
  545. package/widgets/Editor/EditorViewModel.d.ts +5 -6
  546. package/widgets/Editor/MergeFeaturesWorkflow.d.ts +1 -1
  547. package/widgets/Editor/SplitFeatureWorkflow.d.ts +1 -2
  548. package/widgets/Editor/SplitFeatureWorkflowData.d.ts +2 -2
  549. package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
  550. package/widgets/Editor/UpdateFeaturesWorkflow.d.ts +1 -1
  551. package/widgets/Editor/UpdateFeaturesWorkflowData.d.ts +1 -1
  552. package/widgets/Editor/UpdateWorkflow.d.ts +1 -1
  553. package/widgets/Editor/Workflow.d.ts +1 -1
  554. package/widgets/Editor/support/EditorEditingCapabilities.d.ts +9 -9
  555. package/widgets/Editor/support/EditorItem.d.ts +4 -4
  556. package/widgets/Editor/support/SketchController.js +1 -1
  557. package/widgets/Editor/{interfaces.d.ts → types.d.ts} +9 -2
  558. package/widgets/Editor/workflowUtils.js +1 -1
  559. package/widgets/Editor.d.ts +10 -11
  560. package/widgets/ElevationProfile/ElevationProfileLine.d.ts +2 -1
  561. package/widgets/ElevationProfile/ElevationProfileLineGround.d.ts +1 -0
  562. package/widgets/ElevationProfile/ElevationProfileLineInput.d.ts +1 -0
  563. package/widgets/ElevationProfile/ElevationProfileLineQuery.d.ts +2 -1
  564. package/widgets/ElevationProfile/ElevationProfileLineView.d.ts +2 -0
  565. package/widgets/ElevationProfile/ElevationProfileViewModel.d.ts +3 -5
  566. package/widgets/ElevationProfile/ElevationProfileVisibleElements.d.ts +3 -0
  567. package/widgets/ElevationProfile/support/ProfileLines3D.js +1 -1
  568. package/widgets/ElevationProfile/types.d.ts +149 -0
  569. package/widgets/ElevationProfile.d.ts +6 -5
  570. package/widgets/Expand/ExpandViewModel.d.ts +1 -1
  571. package/widgets/Expand.d.ts +2 -2
  572. package/widgets/Feature/FeatureViewModel.d.ts +5 -5
  573. package/widgets/Feature/{interfaces.d.ts → types.d.ts} +5 -1
  574. package/widgets/Feature.d.ts +3 -3
  575. package/widgets/FeatureForm/EditableInput.d.ts +1 -1
  576. package/widgets/FeatureForm/FeatureFormViewModel.d.ts +3 -3
  577. package/widgets/FeatureForm/FieldInput.d.ts +1 -1
  578. package/widgets/FeatureForm/GroupInput.d.ts +1 -1
  579. package/widgets/FeatureForm.d.ts +3 -3
  580. package/widgets/FeatureTable/AttachmentsColumn.d.ts +1 -1
  581. package/widgets/FeatureTable/FeatureTableViewModel.d.ts +3 -4
  582. package/widgets/FeatureTable/Grid/Column.d.ts +2 -3
  583. package/widgets/FeatureTable/Grid/{support/interfaces.d.ts → types.d.ts} +57 -0
  584. package/widgets/FeatureTable/RelationshipColumn.d.ts +1 -1
  585. package/widgets/FeatureTable/support/ColumnTemplateBase.d.ts +2 -3
  586. package/widgets/FeatureTable/support/interfaces.d.ts +2 -3
  587. package/widgets/FeatureTable.d.ts +3 -4
  588. package/widgets/FeatureTemplates/FeatureTemplatesViewModel.d.ts +4 -4
  589. package/widgets/FeatureTemplates/TemplateItem.d.ts +1 -1
  590. package/widgets/FeatureTemplates/{interfaces.d.ts → types.d.ts} +1 -1
  591. package/widgets/FeatureTemplates.d.ts +4 -4
  592. package/widgets/Features/FeaturesViewModel.d.ts +12 -12
  593. package/widgets/Features.d.ts +11 -12
  594. package/widgets/FloorFilter.d.ts +1 -1
  595. package/widgets/Histogram/HistogramViewModel.d.ts +3 -3
  596. package/widgets/Histogram.d.ts +3 -3
  597. package/widgets/HistogramRangeSlider/HistogramRangeSliderViewModel.d.ts +3 -3
  598. package/widgets/HistogramRangeSlider.d.ts +11 -11
  599. package/widgets/Home.d.ts +1 -1
  600. package/widgets/LayerList/LayerListViewModel.d.ts +1 -1
  601. package/widgets/LayerList/ListItem.d.ts +1 -1
  602. package/widgets/LayerList/ListItemPanel.d.ts +1 -1
  603. package/widgets/LayerList/{interfaces.d.ts → types.d.ts} +2 -2
  604. package/widgets/LayerList.d.ts +2 -2
  605. package/widgets/Legend/LegendViewModel.d.ts +1 -1
  606. package/widgets/Legend/support/ActiveLayerInfo.d.ts +1 -1
  607. package/widgets/Legend.d.ts +2 -2
  608. package/widgets/LineOfSight/LineOfSightTarget.d.ts +1 -0
  609. package/widgets/LineOfSight/LineOfSightViewModel.d.ts +1 -0
  610. package/widgets/LineOfSight.d.ts +1 -0
  611. package/widgets/Locate/LocateViewModel.d.ts +1 -1
  612. package/widgets/Locate.d.ts +2 -2
  613. package/widgets/Measurement/MeasurementViewModel.d.ts +2 -2
  614. package/widgets/Measurement.d.ts +1 -1
  615. package/widgets/Popup/{interfaces.d.ts → types.d.ts} +2 -0
  616. package/widgets/Popup.d.ts +8 -9
  617. package/widgets/Print/CustomTemplate.d.ts +1 -1
  618. package/widgets/Print/PrintViewModel.d.ts +2 -2
  619. package/widgets/Print.d.ts +2 -2
  620. package/widgets/ScaleRangeSlider.d.ts +2 -2
  621. package/widgets/Search/LocatorSearchSource.d.ts +2 -2
  622. package/widgets/Search/SearchSource.d.ts +3 -3
  623. package/widgets/Search/types.d.ts +64 -0
  624. package/widgets/Search.d.ts +2 -2
  625. package/widgets/ShadowCast/DurationOptions.d.ts +1 -1
  626. package/widgets/ShadowCast/ShadowCastViewModel.d.ts +2 -2
  627. package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
  628. package/widgets/ShadowCast/{ShadowVisualizationType.d.ts → types.d.ts} +4 -1
  629. package/widgets/ShadowCast.d.ts +1 -1
  630. package/widgets/Sketch/SketchViewModel.d.ts +5 -5
  631. package/widgets/Sketch/{support/interfaces.d.ts → types.d.ts} +17 -17
  632. package/widgets/Sketch.d.ts +1 -1
  633. package/widgets/Slice/SliceViewModel.d.ts +1 -0
  634. package/widgets/Slice.d.ts +2 -1
  635. package/widgets/Slider/SliderViewModel.d.ts +3 -3
  636. package/widgets/Slider/{interfaces.d.ts → types.d.ts} +2 -2
  637. package/widgets/Slider.d.ts +4 -4
  638. package/widgets/Swipe/SwipeViewModel.d.ts +1 -1
  639. package/widgets/Swipe.d.ts +1 -1
  640. package/widgets/TableList/ListItem.d.ts +1 -1
  641. package/widgets/TableList/TableListViewModel.d.ts +2 -2
  642. package/widgets/TableList.d.ts +2 -2
  643. package/widgets/TimeSlider/TimeSliderViewModel.d.ts +5 -5
  644. package/widgets/TimeSlider.d.ts +14 -15
  645. package/widgets/TimeZoneLabel.d.ts +1 -2
  646. package/widgets/Track/TrackViewModel.d.ts +1 -1
  647. package/widgets/Track.d.ts +1 -1
  648. package/widgets/UtilityNetworkAssociations/UtilityNetworkAssociationsViewModel.js +1 -1
  649. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.d.ts +3 -3
  650. package/widgets/UtilityNetworkTrace/{support/ResultAreaHandler.d.ts → types.d.ts} +2 -2
  651. package/widgets/UtilityNetworkValidateTopology/UtilityNetworkValidateTopologyViewModel.js +1 -1
  652. package/widgets/ValuePicker/ValuePickerSlider.d.ts +1 -1
  653. package/widgets/ValuePicker.d.ts +2 -2
  654. package/widgets/VersionManagement/VersionManagementViewModel.d.ts +3 -3
  655. package/widgets/Weather/VisibleElements.d.ts +3 -0
  656. package/widgets/Weather/WeatherViewModel.d.ts +4 -3
  657. package/widgets/Weather/types.d.ts +9 -0
  658. package/widgets/Weather.d.ts +2 -1
  659. package/widgets/Widget.d.ts +2 -1
  660. package/widgets/smartMapping/BinaryColorSizeSlider.d.ts +0 -3
  661. package/widgets/smartMapping/ClassedColorSlider/ClassedColorSliderViewModel.d.ts +1 -3
  662. package/widgets/smartMapping/ClassedColorSlider.d.ts +2 -2
  663. package/widgets/smartMapping/ClassedSizeSlider/ClassedSizeSliderViewModel.d.ts +1 -2
  664. package/widgets/smartMapping/ClassedSizeSlider.d.ts +2 -2
  665. package/widgets/smartMapping/ColorSizeSlider/ColorSizeSliderViewModel.d.ts +5 -5
  666. package/widgets/smartMapping/ColorSizeSlider.d.ts +3 -2
  667. package/widgets/smartMapping/ColorSlider/ColorSliderViewModel.d.ts +1 -1
  668. package/widgets/smartMapping/ColorSlider.d.ts +1 -1
  669. package/widgets/smartMapping/HeatmapSlider/HeatmapSliderViewModel.d.ts +2 -4
  670. package/widgets/smartMapping/HeatmapSlider.d.ts +2 -4
  671. package/widgets/smartMapping/OpacitySlider/OpacitySliderViewModel.d.ts +1 -1
  672. package/widgets/smartMapping/OpacitySlider.d.ts +1 -1
  673. package/widgets/smartMapping/SizeSlider.d.ts +2 -2
  674. package/widgets/smartMapping/SmartMappingPrimaryHandleSliderViewModel.d.ts +2 -2
  675. package/widgets/smartMapping/SmartMappingSliderBase.d.ts +11 -14
  676. package/widgets/smartMapping/SmartMappingSliderViewModel.d.ts +5 -6
  677. package/widgets/smartMapping/{support/interfaces.d.ts → types.d.ts} +52 -5
  678. package/widgets/support/GeolocationPositioning.d.ts +1 -1
  679. package/widgets/support/GoTo.d.ts +1 -1
  680. package/widgets/support/GridControls/GridControlsViewModel.d.ts +1 -1
  681. package/widgets/support/forms/types.d.ts +4 -0
  682. package/widgets/support/{goToUtils.d.ts → types.d.ts} +9 -2
  683. package/widgets/{interfaces.d.ts → types.d.ts} +71 -15
  684. package/arcade/featureset/support/shared.d.ts +0 -16
  685. package/assets/esri/core/workers/chunks/0359ac6d938e0df936d0.js +0 -1
  686. package/assets/esri/core/workers/chunks/1db058f91a8e17b24db6.js +0 -1
  687. package/assets/esri/core/workers/chunks/1e286fb7bb833f00dd88.js +0 -1
  688. package/assets/esri/core/workers/chunks/262232437d37a7460b11.js +0 -1
  689. package/assets/esri/core/workers/chunks/2d6fa00273a73d44297d.js +0 -1
  690. package/assets/esri/core/workers/chunks/2fae37f34b28a46841e3.js +0 -1
  691. package/assets/esri/core/workers/chunks/3b1471f908fdecec2815.js +0 -1
  692. package/assets/esri/core/workers/chunks/48b3906ac3ec57253d90.js +0 -1
  693. package/assets/esri/core/workers/chunks/49b581782f63abb6dd9f.js +0 -1
  694. package/assets/esri/core/workers/chunks/4abe2c56aecc9e9b8e86.js +0 -1
  695. package/assets/esri/core/workers/chunks/51b78eca012eac92dd07.js +0 -1
  696. package/assets/esri/core/workers/chunks/5ce524e0060053f35592.js +0 -316
  697. package/assets/esri/core/workers/chunks/5d244fcf5c075afccdc6.js +0 -1
  698. package/assets/esri/core/workers/chunks/6b8c15f3970289e73a47.js +0 -1
  699. package/assets/esri/core/workers/chunks/6cfcfebe9a4c491e453a.js +0 -1
  700. package/assets/esri/core/workers/chunks/710b29729f252f11115d.js +0 -1
  701. package/assets/esri/core/workers/chunks/72a520802b8accfd4512.js +0 -1
  702. package/assets/esri/core/workers/chunks/73892ac79b24b05e6863.js +0 -33
  703. package/assets/esri/core/workers/chunks/75d8244b725a2aee2003.js +0 -1
  704. package/assets/esri/core/workers/chunks/93b139be6488a1b4ba19.js +0 -1
  705. package/assets/esri/core/workers/chunks/a5e7c9517939f762c518.js +0 -1
  706. package/assets/esri/core/workers/chunks/a63ff3e9a9f3853d12f3.js +0 -1
  707. package/assets/esri/core/workers/chunks/a81a7cba815adb575c36.js +0 -1
  708. package/assets/esri/core/workers/chunks/a8fd635d1165db8616ab.js +0 -1
  709. package/assets/esri/core/workers/chunks/b638ce18b93d3cfb9967.js +0 -1
  710. package/assets/esri/core/workers/chunks/ba7e97b1e324118b8156.js +0 -1
  711. package/assets/esri/core/workers/chunks/c0d6336c10b4081c4e32.js +0 -1
  712. package/assets/esri/core/workers/chunks/cc4ae105e727d9211d82.js +0 -1
  713. package/assets/esri/core/workers/chunks/d7a62504e00989202c45.js +0 -1
  714. package/assets/esri/core/workers/chunks/e25be3b6b67ce6b03011.js +0 -1
  715. package/assets/esri/core/workers/chunks/e5ac9b048b16fef9840c.js +0 -1
  716. package/assets/esri/core/workers/chunks/ec7e6427d99cf3148a61.js +0 -1
  717. package/assets/esri/core/workers/chunks/efa95c50d1ed8e74219f.js +0 -1
  718. package/assets/esri/core/workers/chunks/f379fd459a103f42d447.js +0 -1
  719. package/assets/esri/core/workers/chunks/ffcdc7ae03b0570e0db8.js +0 -1
  720. package/geometry/interfaces.d.ts +0 -2
  721. package/geometry/support/interfaces.d.ts +0 -3
  722. package/geometry/support/meshUtils/exporters/gltf/interfaces.d.ts +0 -11
  723. package/renderers/support/interfaces.d.ts +0 -2
  724. package/smartMapping/statistics/interfaces.d.ts +0 -571
  725. package/smartMapping/support/adapters/interfaces.d.ts +0 -18
  726. package/views/2d/ViewStateManager.d.ts +0 -2
  727. package/views/2d/interfaces.d.ts +0 -67
  728. package/views/2d/layers/support/clusterUtils.d.ts +0 -6
  729. package/views/3d/environment/lightingUtils.d.ts +0 -4
  730. package/views/3d/environment/weather.d.ts +0 -9
  731. package/views/3d/interactive/visualElements/DrapedVisualElementResources.d.ts +0 -2
  732. package/views/3d/support/QualityProfile.d.ts +0 -2
  733. package/views/SceneViewHitTestResult.d.ts +0 -64
  734. package/views/ViewingMode.d.ts +0 -2
  735. package/views/analysis/ElevationProfile/ElevationProfileHoveredPointsVisualization.js +0 -5
  736. package/views/analysis/ElevationProfile/interfaces.d.ts +0 -73
  737. package/views/draw/DrawingMode.d.ts +0 -2
  738. package/views/draw/support/drawUtils.d.ts +0 -7
  739. package/views/interactive/sketch/interfaces.d.ts +0 -2
  740. package/views/interactive/tooltip/interfaces.d.ts +0 -2
  741. package/views/support/interfaces.d.ts +0 -87
  742. package/views/ui/Padding.d.ts +0 -11
  743. package/views/viewType.d.ts +0 -2
  744. package/views/webgl/enums.d.ts +0 -38
  745. package/webscene/support/featureReferenceUtils.d.ts +0 -4
  746. package/widgets/Daylight/support/daylightUtils.d.ts +0 -4
  747. package/widgets/DirectionalPad/constants.d.ts +0 -2
  748. package/widgets/Editor/support/splitFeatureUtils.d.ts +0 -7
  749. package/widgets/ElevationProfile/ElevationProfileInteraction.d.ts +0 -13
  750. package/widgets/ElevationProfile/elevationProfileLineTypes.d.ts +0 -6
  751. package/widgets/ElevationProfile/interfaces.d.ts +0 -103
  752. package/widgets/ElevationProfile/support/constants.d.ts +0 -14
  753. package/widgets/Feature/support/arcadeFeatureUtils.d.ts +0 -4
  754. package/widgets/FeatureTable/Grid/interfaces.d.ts +0 -57
  755. package/widgets/Popup/actions.d.ts +0 -4
  756. package/widgets/Search/support/interfaces.d.ts +0 -67
  757. package/widgets/ShadowCast/DurationMode.d.ts +0 -3
  758. package/widgets/Weather/enums.d.ts +0 -9
  759. package/widgets/smartMapping/ClassedColorSlider/interfaces.d.ts +0 -19
  760. package/widgets/smartMapping/ClassedSizeSlider/interfaces.d.ts +0 -18
  761. package/widgets/smartMapping/interfaces.d.ts +0 -13
  762. package/widgets/support/Heading.d.ts +0 -7
  763. package/widgets/support/forms/formUtils.d.ts +0 -2
  764. package/widgets/support/forms/interfaces.d.ts +0 -2
  765. package/widgets/support/interfaces.d.ts +0 -56
  766. /package/analysis/{interfaces.d.ts → types.d.ts} +0 -0
  767. /package/core/accessorSupport/{interfaces.d.ts → types.d.ts} +0 -0
  768. /package/core/{interfaces.d.ts → types.d.ts} +0 -0
  769. /package/editing/sharedTemplates/{interfaces.d.ts → types.d.ts} +0 -0
  770. /package/editing/{interfaces.d.ts → types.d.ts} +0 -0
  771. /package/layers/effects/{interfaces.d.ts → types.d.ts} +0 -0
  772. /package/layers/orientedImagery/{interfaces.d.ts → types.d.ts} +0 -0
  773. /package/layers/raster/datasets/{interfaces.d.ts → types.d.ts} +0 -0
  774. /package/layers/raster/functions/{interfaces.d.ts → types.d.ts} +0 -0
  775. /package/linkChart/{interfaces.d.ts → types.d.ts} +0 -0
  776. /package/popup/{interfaces.d.ts → types.d.ts} +0 -0
  777. /package/rest/lastMileDelivery/{interfaces.d.ts → types.d.ts} +0 -0
  778. /package/rest/{interfaces.d.ts → types.d.ts} +0 -0
  779. /package/smartMapping/popup/{interfaces.d.ts → types.d.ts} +0 -0
  780. /package/smartMapping/raster/support/adapters/{interfaces.d.ts → types.d.ts} +0 -0
  781. /package/smartMapping/symbology/{interfaces.d.ts → types.d.ts} +0 -0
  782. /package/statistics/{interfaces.d.ts → types.d.ts} +0 -0
  783. /package/symbols/support/{interfaces.d.ts → types.d.ts} +0 -0
  784. /package/symbols/{interfaces.d.ts → types.d.ts} +0 -0
  785. /package/time/{interfaces.d.ts → types.d.ts} +0 -0
  786. /package/versionManagement/versionAdapters/{interfaces.d.ts → types.d.ts} +0 -0
  787. /package/views/2d/analysis/{interfaces.d.ts → types.d.ts} +0 -0
  788. /package/views/3d/analysis/{interfaces.d.ts → types.d.ts} +0 -0
  789. /package/views/3d/{interfaces.d.ts → types.d.ts} +0 -0
  790. /package/views/animation/{easing.d.ts → types.d.ts} +0 -0
  791. /package/views/draw/{DrawingMode.js → drawingModes.js} +0 -0
  792. /package/views/input/{interfaces.d.ts → types.d.ts} +0 -0
  793. /package/views/navigation/{interfaces.d.ts → types.d.ts} +0 -0
  794. /package/widgets/Attachments/{interfaces.d.ts → types.d.ts} +0 -0
  795. /package/widgets/BasemapGallery/{interfaces.d.ts → types.d.ts} +0 -0
  796. /package/widgets/BasemapLayerList/{interfaces.d.ts → types.d.ts} +0 -0
  797. /package/widgets/BatchAttributeForm/inputs/{interfaces.d.ts → types.d.ts} +0 -0
  798. /package/widgets/BatchAttributeForm/{interfaces.d.ts → types.d.ts} +0 -0
  799. /package/widgets/CatalogLayerList/{interfaces.d.ts → types.d.ts} +0 -0
  800. /package/widgets/FeatureForm/{interfaces.d.ts → types.d.ts} +0 -0
  801. /package/widgets/Histogram/{interfaces.d.ts → types.d.ts} +0 -0
  802. /package/widgets/HistogramRangeSlider/{interfaces.d.ts → types.d.ts} +0 -0
  803. /package/widgets/Measurement/{interfaces.d.ts → types.d.ts} +0 -0
  804. /package/widgets/OrientedImageryViewer/{interfaces.d.ts → types.d.ts} +0 -0
  805. /package/widgets/Print/{interfaces.d.ts → types.d.ts} +0 -0
  806. /package/widgets/ScaleRangeSlider/{interfaces.d.ts → types.d.ts} +0 -0
  807. /package/widgets/Swipe/{interfaces.d.ts → types.d.ts} +0 -0
  808. /package/widgets/TableList/{interfaces.d.ts → types.d.ts} +0 -0
  809. /package/widgets/TimeSlider/{interfaces.d.ts → types.d.ts} +0 -0
  810. /package/widgets/Track/{interfaces.d.ts → types.d.ts} +0 -0
  811. /package/widgets/ValuePicker/{interfaces.d.ts → types.d.ts} +0 -0
  812. /package/widgets/support/GridControls/{interfaces.d.ts → types.d.ts} +0 -0
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as o}from"tslib";import t from"../../../../Color.js";import e from"../../../../core/Accessor.js";import{getContrast as l,multiplyOpacity as i,desaturate as s,unitRGBAFromColor as r}from"../../../../core/colorUtils.js";import{property as n,subclass as c}from"../../../../core/accessorSupport/decorators.js";import{createStipplePatternSimple as h}from"../../webgl-engine/materials/lineStippleUtils.js";const a=.3;function d(o,t){t&&Object.assign(o,t)}class p{constructor(o){this.height=90,this.coneHeight=40,this.coneWidth=23,this.width=3,this.renderOccluded=16,this.color=o.accent}}class u{constructor({colors:o,...t}){this.size=11,this.outlineSize=1,this.collisionPadding=9,this.color=o.accent,this.outlineColor=o.outline,this.renderOccluded=16,this.hoverOutlineColor=o.selectedOutline,d(this,t)}applyColor(o){this._apply(this.color,o)}applyOutline(o){this._apply(this.outlineColor,o)}applyHoverOutline(o){this._apply(this.hoverOutlineColor,o)}_apply(o,t){t.setParameters({color:r(o),renderOccluded:this.renderOccluded})}}class g{constructor({colors:o,...t}){this.size=40,this.height=.2,this.offset=.25,this.collisionPadding=2,this.renderOccluded=2,this.minSquaredEdgeLength=900,this.color=i(o.accent,.5),this.hoverColor=o.accent,d(this,t)}applyColor(o){this._apply(this.color,o)}applyHover(o){this._apply(this.hoverColor,o)}_apply(o,t){t.setParameters({color:r(o),renderOccluded:this.renderOccluded})}}class f{constructor(o){this.vertex=new u({colors:o,color:o.accent,outlineColor:o.outline}),this.edge=new u({colors:o,color:s(i(o.accent,2/3),.5),outlineColor:i(o.outline,.5),size:8,collisionPadding:8}),this.selected=new u({colors:o,color:o.selected,outlineColor:o.outline}),this.edgeOffset=new g({colors:o})}}class w{constructor({colors:o,...t}){this.width=1.5,this.stipplePattern=h(3.3),this.falloff=0,this.innerWidth=1.5,this.renderOccluded=4,this.color=o.selected,this.stippleOffColor=o.outline,this.innerColor=o.selected,d(this,t)}apply(o){o.color=r(this.color),o.width=this.width,o.stipplePattern=this.stipplePattern,o.stippleOffColor=r(this.stippleOffColor),o.falloff=this.falloff,o.innerWidth=this.innerWidth,o.innerColor=r(this.innerColor),o.renderOccluded=this.renderOccluded}}class C{constructor({colors:o,...t}){this.size=4,this.outlineSize=1,this.shape="square",this.color=o.selected,this.outlineColor=o.outline,d(this,t)}apply(o){o.color=r(this.color),o.size=this.size,o.outlineSize=this.outlineSize,o.outlineColor=r(this.outlineColor),o.primitive=this.shape}}class y{constructor({colors:o,...t}){this.innerWidth=1,this.glowWidth=8,this.glowFalloff=8,this.globalAlpha=a,this.globalAlphaContrastBoost=1.5,this.radius=3,this.innerColor=o.selected,this.glowColor=o.accent,this.heightFillColor=o.accent,d(this,t)}apply(o,e=1){const l={glowColor:t.toUnitRGB(this.glowColor),glowFalloff:this.glowFalloff,glowWidth:this.glowWidth,innerColor:t.toUnitRGB(this.innerColor),innerWidth:this.innerWidth,globalAlpha:this.globalAlpha*e*this.glowColor.a,globalAlphaContrastBoost:this.globalAlphaContrastBoost,intersectsLineRadius:this.radius};"style"in o?o.style=l:o.laserlineStyle=l}}class O{constructor(o){this.outline=new w({colors:o,color:o.stippleOff,renderOccluded:8,stippleOffColor:o.stippleOn,innerWidth:0}),this.staged=new w({colors:o,color:o.stippleOn,renderOccluded:8,innerColor:o.stagedSolid,stippleOffColor:o.stippleOff}),this.shadowStyle=new y({colors:o,globalAlpha:a,glowColor:o.accent,glowFalloff:8,glowWidth:8,innerColor:o.selected,innerWidth:1})}}class m{constructor(o){this.outline=new C({colors:o,color:o.selected,outlineColor:o.outline,outlineSize:1,shape:"circle",size:4}),this.shadowStyle=new y({colors:o,globalAlpha:a,glowColor:o.accent,glowFalloff:1.5,glowWidth:6,innerColor:o.selected,innerWidth:1,radius:2})}}class A extends w{constructor({colors:o,...t}){super({colors:o}),this.extensionType=2,d(this,t)}}class W{constructor(o){this.laserlineAlphaMultiplier=1.5,this.heightPlaneAngleCutoff=20,this.lineObjects=new O(o),this.pointObjects=new m(o),this.heightPlane=new y({colors:o,globalAlpha:a,glowColor:o.accent,glowFalloff:8,glowWidth:8,innerColor:o.selected,innerWidth:1}),this.heightBox=new y({colors:o,globalAlpha:a,glowColor:o.accent,glowFalloff:8,glowWidth:8,innerColor:o.selected,innerWidth:0,heightFillColor:o.accent}),this.zVerticalLine=new A({colors:o,color:i(o.accent,5*a/3),falloff:2,innerColor:i(o.selected,0),renderOccluded:4,stipplePattern:null,width:5,extensionType:2})}}let b=class extends e{constructor(o){super(o)}get colors(){const o=this.getTheme().accentColor,e=o.a;return{accent:o,contrast:l(o),selected:t.fromArray([255,255,255,e]),selectedOutline:t.fromArray([255,255,255,e]),staged:t.fromArray([12,207,255,e]),stagedSolid:t.fromArray([12,207,255,1]),outline:t.fromArray([0,0,0,.5*e]),stippleOn:t.fromArray([255,255,255,1]),stippleOff:t.fromArray([0,0,0,.5])}}get visualElements(){return new W(this.colors)}get manipulators(){return new f(this.colors)}get zManipulator(){return new p(this.colors)}};o([n()],b.prototype,"colors",null),o([n()],b.prototype,"visualElements",null),o([n()],b.prototype,"manipulators",null),o([n()],b.prototype,"zManipulator",null),o([n()],b.prototype,"getTheme",void 0),b=o([c("esri.views.3d.interactive.editingTools.settings")],b);export{b as Settings};
5
+ import{__decorate as o}from"tslib";import t from"../../../../Color.js";import e from"../../../../core/Accessor.js";import{getContrast as l,multiplyOpacity as i,desaturate as s}from"../../../../core/colorUtils.js";import{property as r,subclass as n}from"../../../../core/accessorSupport/decorators.js";import{createStipplePatternSimple as c}from"../../webgl-engine/materials/lineStippleUtils.js";const h=.3;function a(o,t){t&&Object.assign(o,t)}class d{constructor(o){this.height=90,this.coneHeight=40,this.coneWidth=23,this.width=3,this.renderOccluded=16,this.color=o.accent}}class p{constructor({colors:o,...t}){this.size=11,this.outlineSize=1,this.collisionPadding=9,this.color=o.accent,this.outlineColor=o.outline,this.renderOccluded=16,this.hoverOutlineColor=o.selectedOutline,a(this,t)}applyColor(o){this._apply(this.color,o)}applyOutline(o){this._apply(this.outlineColor,o)}applyHoverOutline(o){this._apply(this.hoverOutlineColor,o)}_apply(o,t){t.setParameters({color:o.toUnitRGBA(),renderOccluded:this.renderOccluded})}}class u{constructor({colors:o,...t}){this.size=40,this.height=.2,this.offset=.25,this.collisionPadding=2,this.renderOccluded=2,this.minSquaredEdgeLength=900,this.color=i(o.accent,.5),this.hoverColor=o.accent,a(this,t)}applyColor(o){this._apply(this.color,o)}applyHover(o){this._apply(this.hoverColor,o)}_apply(o,t){t.setParameters({color:o.toUnitRGBA(),renderOccluded:this.renderOccluded})}}class g{constructor(o){this.vertex=new p({colors:o,color:o.accent,outlineColor:o.outline}),this.edge=new p({colors:o,color:s(i(o.accent,2/3),.5),outlineColor:i(o.outline,.5),size:8,collisionPadding:8}),this.selected=new p({colors:o,color:o.selected,outlineColor:o.outline}),this.edgeOffset=new u({colors:o})}}class f{constructor({colors:o,...t}){this.width=1.5,this.stipplePattern=c(3.3),this.falloff=0,this.innerWidth=1.5,this.renderOccluded=4,this.color=o.selected,this.stippleOffColor=o.outline,this.innerColor=o.selected,a(this,t)}apply(o){o.color=this.color.toUnitRGBA(),o.width=this.width,o.stipplePattern=this.stipplePattern,o.stippleOffColor=this.stippleOffColor.toUnitRGBA(),o.falloff=this.falloff,o.innerWidth=this.innerWidth,o.innerColor=this.innerColor.toUnitRGBA(),o.renderOccluded=this.renderOccluded}}class w{constructor({colors:o,...t}){this.size=4,this.outlineSize=1,this.shape="square",this.color=o.selected,this.outlineColor=o.outline,a(this,t)}apply(o){o.color=this.color.toUnitRGBA(),o.size=this.size,o.outlineSize=this.outlineSize,o.outlineColor=this.outlineColor.toUnitRGBA(),o.primitive=this.shape}}class C{constructor({colors:o,...t}){this.innerWidth=1,this.glowWidth=8,this.glowFalloff=8,this.globalAlpha=h,this.globalAlphaContrastBoost=1.5,this.radius=3,this.innerColor=o.selected,this.glowColor=o.accent,this.heightFillColor=o.accent,a(this,t)}apply(o,t=1){const e={glowColor:this.glowColor.toUnitRGB(),glowFalloff:this.glowFalloff,glowWidth:this.glowWidth,innerColor:this.innerColor.toUnitRGB(),innerWidth:this.innerWidth,globalAlpha:this.globalAlpha*t*this.glowColor.a,globalAlphaContrastBoost:this.globalAlphaContrastBoost,intersectsLineRadius:this.radius};"style"in o?o.style=e:o.laserlineStyle=e}}class y{constructor(o){this.outline=new f({colors:o,color:o.stippleOff,renderOccluded:8,stippleOffColor:o.stippleOn,innerWidth:0}),this.staged=new f({colors:o,color:o.stippleOn,renderOccluded:8,innerColor:o.stagedSolid,stippleOffColor:o.stippleOff}),this.shadowStyle=new C({colors:o,globalAlpha:h,glowColor:o.accent,glowFalloff:8,glowWidth:8,innerColor:o.selected,innerWidth:1})}}class O{constructor(o){this.outline=new w({colors:o,color:o.selected,outlineColor:o.outline,outlineSize:1,shape:"circle",size:4}),this.shadowStyle=new C({colors:o,globalAlpha:h,glowColor:o.accent,glowFalloff:1.5,glowWidth:6,innerColor:o.selected,innerWidth:1,radius:2})}}class m extends f{constructor({colors:o,...t}){super({colors:o}),this.extensionType=2,a(this,t)}}class A{constructor(o){this.laserlineAlphaMultiplier=1.5,this.heightPlaneAngleCutoff=20,this.lineObjects=new y(o),this.pointObjects=new O(o),this.heightPlane=new C({colors:o,globalAlpha:h,glowColor:o.accent,glowFalloff:8,glowWidth:8,innerColor:o.selected,innerWidth:1}),this.heightBox=new C({colors:o,globalAlpha:h,glowColor:o.accent,glowFalloff:8,glowWidth:8,innerColor:o.selected,innerWidth:0,heightFillColor:o.accent}),this.zVerticalLine=new m({colors:o,color:i(o.accent,5*h/3),falloff:2,innerColor:i(o.selected,0),renderOccluded:4,stipplePattern:null,width:5,extensionType:2})}}let W=class extends e{constructor(o){super(o)}get colors(){const o=this.getTheme().accentColor,e=o.a;return{accent:o,contrast:l(o),selected:t.fromArray([255,255,255,e]),selectedOutline:t.fromArray([255,255,255,e]),staged:t.fromArray([12,207,255,e]),stagedSolid:t.fromArray([12,207,255,1]),outline:t.fromArray([0,0,0,.5*e]),stippleOn:t.fromArray([255,255,255,1]),stippleOff:t.fromArray([0,0,0,.5])}}get visualElements(){return new A(this.colors)}get manipulators(){return new g(this.colors)}get zManipulator(){return new d(this.colors)}};o([r()],W.prototype,"colors",null),o([r()],W.prototype,"visualElements",null),o([r()],W.prototype,"manipulators",null),o([r()],W.prototype,"zManipulator",null),o([r()],W.prototype,"getTheme",void 0),W=o([n("esri.views.3d.interactive.editingTools.settings")],W);export{W as Settings};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import t from"../../../../../Color.js";import{multiplyOpacityToUnitRGBA as e,colorEquals as i,getContrast as s}from"../../../../../core/colorUtils.js";import a from"../../../../../core/Handles.js";import"../../../../../core/has.js";import{destroyMaybe as r}from"../../../../../core/maybe.js";import{watch as o,sync as n}from"../../../../../core/reactiveUtils.js";import{screenPointObjectToArray as l}from"../../../../../core/screenUtils.js";import{create as h}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import _ from"../../../../../geometry/Point.js";import{Manipulator3D as u}from"../../Manipulator3D.js";import{createManipulatorMaterial as p}from"../../manipulatorUtils.js";import{RenderObject as c}from"../../RenderObject.js";import{PickResult as d}from"../support/PickRequest.js";import{LaserlineVisualElement as m}from"../../visualElements/LaserlineVisualElement.js";import{createSphereGeometry as w}from"../../../webgl-engine/lib/GeometryUtil.js";import{ManipulatorCollection as v}from"../../../../interactive/ManipulatorCollection.js";import{newToolIntersector as g}from"../../../../interactive/ToolIntersector.js";class y{constructor(t){this.vertexManipulators=[],this._destroyed=!1,this._isManipulatorsOwner=!0,this._visible=!0,this._listenerHandles=null,this._tempHandlePosition=h();const{analysisViewData:e,manipulators:i,toolState:s,view:a,visible:r}=t;this._analysisViewData=e,this._toolState=s,null!=i?(this._manipulators=i,this._isManipulatorsOwner=!1):this._manipulators=new v,this._view=a,this._intersector=g(a.state.viewingMode);const o=p(this._handleColor),n=[new c(w(o,1,32,32))],l=new u({view:a,renderObjects:n});l.available=!1,l.radius=D,l.interactive=!1,this._manipulators.add(l),this._cursorManipulator=l,this._cursorManipulatorMaterial=o,this._laserLine=new m({view:a,attached:!0,style:{glowWidth:V,glowFalloff:M,innerWidth:b},isDecoration:!0}),this._updateVisibility(r??!0)}destroy(){this._listenerHandles=r(this._listenerHandles),this._isManipulatorsOwner?this._manipulators=r(this._manipulators):this._manipulators=null,this._laserLine=r(this._laserLine),this._destroyed=!0}get destroyed(){return this._destroyed}get visible(){return this._visible}set visible(t){t?this.show():this.hide()}get testData(){}show(){this._setVisibility(!0)}hide(){this._setVisibility(!1)}_setVisibility(t){this._destroyed||this._visible===t||this._updateVisibility(t)}_updateVisibility(t){this._visible=t,this._laserLine.visible=t,t?(this._initializeListeners(),this._updateAll()):(this._destroyListeners(),this.vertexManipulators.forEach(({manipulator:t})=>this._removeVertexManipulator(t)),this.vertexManipulators=[])}vertexHandleAt(t,e){const i=this._manipulators.intersect(t,e);return i?.metadata}pick(t){const e=this._view.spatialReference,i=l(t.screenPoint);this._view.sceneIntersectionHelper.intersectToolIntersectorScreen(i,this._intersector);const s=this._intersector.results.min,a=h();if(!s.getIntersectionPoint(a))return null;const r=this._view.renderCoordsHelper.fromRenderCoords(a,new _({spatialReference:e}));return null==r?null:new d(a,r)}_updateAll(){this._visible&&(this._updateVertexManipulators(),this._updateLaserLine())}_createVertexManipulator(){const t=p(this._handleColor),e=[new c(w(t,1,32,32))],i=new u({view:this._view,renderObjects:e});return i.radius=D,this._manipulators.add(i),{manipulator:i,material:t}}_removeVertexManipulator(t){this._manipulators.remove(t)}_updateVertexManipulators(){const{viewData:t}=this._analysisViewData,e=this._analysisViewData.path?this._analysisViewData.path.vertices:[],i=this.vertexManipulators;f(i,e.length,()=>this._createVertexManipulator(),({manipulator:t})=>this._removeVertexManipulator(t)),i.forEach(({manipulator:i},s)=>{i.metadata=e[s],i.renderLocation=t.positionsRender[s],i.cursor=0===s&&"drawing"===this._toolState.polygonState?"crosshair":null}),"drawing"===this._toolState.polygonState&&null!=this._analysisViewData.stagedPoint?(this._cursorManipulator.available=!0,this._cursorManipulator.location=this._analysisViewData.stagedPoint):this._cursorManipulator.available=!1}get _handleColor(){return e(this._view.effectiveTheme.accentColor,.5)}_getFocusPoint(){const{lastDraggedVertex:t}=this._analysisViewData;switch(this._toolState.polygonState){case"drawing":return null!=this._analysisViewData.stagedPoint?this._analysisViewData.stagedPoint:null!=t?this._analysisViewData.path.getVertexPositionAsPoint(t):this._analysisViewData.path.lastPoint;case"editing":return null!=t?this._analysisViewData.path.getVertexPositionAsPoint(t):null;default:return this._analysisViewData.stagedPoint}}_updateLaserLine(){const t="measured"!==this._toolState.polygonState&&this._toolState.active,e=this._getFocusPoint();if(t&&null!=e){const t=this._tempHandlePosition;this._view.renderCoordsHelper.toRenderCoords(e,t),this._laserLine.heightManifoldTarget=t}else this._laserLine.heightManifoldTarget=null}_initializeListeners(){this._listenerHandles=new a,this._listenerHandles.add([o(()=>this._toolState.polygonState,()=>this._updateLaserLine()),o(()=>this._analysisViewData.viewData,()=>this._updateAll(),n),o(()=>({lastDraggedVertex:this._analysisViewData.lastDraggedVertex,cursorPoint:this._analysisViewData.stagedPoint}),()=>this._updateLaserLine()),o(()=>this._toolState.active,()=>this._updateAll()),o(()=>this._view.effectiveTheme.accentColor,i=>{const a=e(i,.5);for(const{material:t}of this.vertexManipulators)t.setParameters({color:a});this._cursorManipulatorMaterial.setParameters({color:a});const r=t.toUnitRGB(i),o=t.toUnitRGB(s(i)),n=.75*i.a,l=this._laserLine,h=l.style;l.style={...h,glowColor:r,innerColor:o,globalAlpha:n}},{initial:!0,equals:i})])}_destroyListeners(){this._listenerHandles=r(this._listenerHandles)}}function f(t,e,i,s){for(;t.length<e;)t.push(i());if(s)for(;t.length>e;){s(t.pop())}else t.length=e}const V=8,M=8,b=1,D=5;export{y as default};
5
+ import{multiplyOpacityToUnitRGBA as t,colorEquals as e,getContrast as i}from"../../../../../core/colorUtils.js";import s from"../../../../../core/Handles.js";import"../../../../../core/has.js";import{destroyMaybe as a}from"../../../../../core/maybe.js";import{watch as r,sync as o}from"../../../../../core/reactiveUtils.js";import{screenPointObjectToArray as n}from"../../../../../core/screenUtils.js";import{create as l}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import h from"../../../../../geometry/Point.js";import{Manipulator3D as _}from"../../Manipulator3D.js";import{createManipulatorMaterial as u}from"../../manipulatorUtils.js";import{RenderObject as p}from"../../RenderObject.js";import{PickResult as c}from"../support/PickRequest.js";import{LaserlineVisualElement as d}from"../../visualElements/LaserlineVisualElement.js";import{createSphereGeometry as m}from"../../../webgl-engine/lib/GeometryUtil.js";import{ManipulatorCollection as w}from"../../../../interactive/ManipulatorCollection.js";import{newToolIntersector as v}from"../../../../interactive/ToolIntersector.js";class g{constructor(t){this.vertexManipulators=[],this._destroyed=!1,this._isManipulatorsOwner=!0,this._visible=!0,this._listenerHandles=null,this._tempHandlePosition=l();const{analysisViewData:e,manipulators:i,toolState:s,view:a,visible:r}=t;this._analysisViewData=e,this._toolState=s,null!=i?(this._manipulators=i,this._isManipulatorsOwner=!1):this._manipulators=new w,this._view=a,this._intersector=v(a.state.viewingMode);const o=u(this._handleColor),n=[new p(m(o,1,32,32))],h=new _({view:a,renderObjects:n});h.available=!1,h.radius=b,h.interactive=!1,this._manipulators.add(h),this._cursorManipulator=h,this._cursorManipulatorMaterial=o,this._laserLine=new d({view:a,attached:!0,style:{glowWidth:f,glowFalloff:V,innerWidth:M},isDecoration:!0}),this._updateVisibility(r??!0)}destroy(){this._listenerHandles=a(this._listenerHandles),this._isManipulatorsOwner?this._manipulators=a(this._manipulators):this._manipulators=null,this._laserLine=a(this._laserLine),this._destroyed=!0}get destroyed(){return this._destroyed}get visible(){return this._visible}set visible(t){t?this.show():this.hide()}get testData(){}show(){this._setVisibility(!0)}hide(){this._setVisibility(!1)}_setVisibility(t){this._destroyed||this._visible===t||this._updateVisibility(t)}_updateVisibility(t){this._visible=t,this._laserLine.visible=t,t?(this._initializeListeners(),this._updateAll()):(this._destroyListeners(),this.vertexManipulators.forEach(({manipulator:t})=>this._removeVertexManipulator(t)),this.vertexManipulators=[])}vertexHandleAt(t,e){const i=this._manipulators.intersect(t,e);return i?.metadata}pick(t){const e=this._view.spatialReference,i=n(t.screenPoint);this._view.sceneIntersectionHelper.intersectToolIntersectorScreen(i,this._intersector);const s=this._intersector.results.min,a=l();if(!s.getIntersectionPoint(a))return null;const r=this._view.renderCoordsHelper.fromRenderCoords(a,new h({spatialReference:e}));return null==r?null:new c(a,r)}_updateAll(){this._visible&&(this._updateVertexManipulators(),this._updateLaserLine())}_createVertexManipulator(){const t=u(this._handleColor),e=[new p(m(t,1,32,32))],i=new _({view:this._view,renderObjects:e});return i.radius=b,this._manipulators.add(i),{manipulator:i,material:t}}_removeVertexManipulator(t){this._manipulators.remove(t)}_updateVertexManipulators(){const{viewData:t}=this._analysisViewData,e=this._analysisViewData.path?this._analysisViewData.path.vertices:[],i=this.vertexManipulators;y(i,e.length,()=>this._createVertexManipulator(),({manipulator:t})=>this._removeVertexManipulator(t)),i.forEach(({manipulator:i},s)=>{i.metadata=e[s],i.renderLocation=t.positionsRender[s],i.cursor=0===s&&"drawing"===this._toolState.polygonState?"crosshair":null}),"drawing"===this._toolState.polygonState&&null!=this._analysisViewData.stagedPoint?(this._cursorManipulator.available=!0,this._cursorManipulator.location=this._analysisViewData.stagedPoint):this._cursorManipulator.available=!1}get _handleColor(){return t(this._view.effectiveTheme.accentColor,.5)}_getFocusPoint(){const{lastDraggedVertex:t}=this._analysisViewData;switch(this._toolState.polygonState){case"drawing":return null!=this._analysisViewData.stagedPoint?this._analysisViewData.stagedPoint:null!=t?this._analysisViewData.path.getVertexPositionAsPoint(t):this._analysisViewData.path.lastPoint;case"editing":return null!=t?this._analysisViewData.path.getVertexPositionAsPoint(t):null;default:return this._analysisViewData.stagedPoint}}_updateLaserLine(){const t="measured"!==this._toolState.polygonState&&this._toolState.active,e=this._getFocusPoint();if(t&&null!=e){const t=this._tempHandlePosition;this._view.renderCoordsHelper.toRenderCoords(e,t),this._laserLine.heightManifoldTarget=t}else this._laserLine.heightManifoldTarget=null}_initializeListeners(){this._listenerHandles=new s,this._listenerHandles.add([r(()=>this._toolState.polygonState,()=>this._updateLaserLine()),r(()=>this._analysisViewData.viewData,()=>this._updateAll(),o),r(()=>({lastDraggedVertex:this._analysisViewData.lastDraggedVertex,cursorPoint:this._analysisViewData.stagedPoint}),()=>this._updateLaserLine()),r(()=>this._toolState.active,()=>this._updateAll()),r(()=>this._view.effectiveTheme.accentColor,e=>{const s=t(e,.5);for(const{material:t}of this.vertexManipulators)t.setParameters({color:s});this._cursorManipulatorMaterial.setParameters({color:s});const a=e.toUnitRGB(),r=i(e).toUnitRGB(),o=.75*e.a,n=this._laserLine,l=n.style;n.style={...l,glowColor:a,innerColor:r,globalAlpha:o}},{initial:!0,equals:e})])}_destroyListeners(){this._listenerHandles=a(this._listenerHandles)}}function y(t,e,i,s){for(;t.length<e;)t.push(i());if(s)for(;t.length>e;){s(t.pop())}else t.length=e}const f=8,V=8,M=1,b=5;export{g as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as t}from"tslib";import e from"../../../../../Color.js";import i from"../../../../../core/Accessor.js";import{multiplyOpacityToUnitRGBA as s,getContrast as o,colorVectorEquals as n,colorVectorToColorAndOpacity as a}from"../../../../../core/colorUtils.js";import"../../../../../core/has.js";import{destroyMaybe as r}from"../../../../../core/maybe.js";import{watch as l,initial as h}from"../../../../../core/reactiveUtils.js";import{property as d,subclass as c}from"../../../../../core/accessorSupport/decorators.js";import{create as p}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromPoints as u}from"../../../../../geometry/support/lineSegment.js";import{Manipulator3D as m}from"../../Manipulator3D.js";import{createManipulatorMaterial as g}from"../../manipulatorUtils.js";import{RenderObject as _}from"../../RenderObject.js";import{LaserlineVisualElement as y}from"../../visualElements/LaserlineVisualElement.js";import{createSphereGeometry as v}from"../../../webgl-engine/lib/GeometryUtil.js";let b=class extends i{constructor(t){super(t),this.cursorPoint=null,this._visible=!1,this._laserLine=null,this.laserLineEnabled=!0,this._lastDraggedHandle=null}initialize(){this._laserLine=new y({view:this.view,attached:!0,isDecoration:!0}),this._updateVisibility(this._visible),this._connectToAnalysisView(),this.addHandles(l(()=>this._params,({laserLineGlowColor:t,laserLineInnerColor:e,laserLineGlobalAlpha:i})=>{const s=this._laserLine,o=s.style;s.style={...o,innerColor:e,glowColor:t,globalAlpha:i}}))}destroy(){this._laserLine=r(this._laserLine)}get _params(){const{accentColor:t}=this.view.effectiveTheme;return{laserLineGlowColor:e.toUnitRGB(t),laserLineGlowWidth:8,laserLineGlowFalloff:8,laserLineInnerColor:e.toUnitRGB(o(t)),laserLineInnerWidth:.75,laserLineGlobalAlpha:.75*t.a,handleColor:s(t,.5),handleRadius:5}}get visible(){return this._visible}set visible(t){t?this.show():this.hide()}get testData(){}get _cursorPosition(){const t=p(),e=this.cursorPoint;return e&&this.view.renderCoordsHelper.toRenderCoords(e,t),t}get _startPosition(){const t=p(),e=this.analysis.startPoint;return e&&this.view.renderCoordsHelper.toRenderCoords(e,t),t}get _endPosition(){const t=p(),e=this.analysis.endPoint;return e&&this.view.renderCoordsHelper.toRenderCoords(e,t),t}get _laserLineParams(){const t=this._focusPosition,{active:e,lineState:i}=this.toolState,s=this.analysisViewData,o=this.laserLineEnabled&&!!t&&"measured"!==i&&e;if(!o||!this.visible||null==s||s.destroyed)return{heightManifoldTarget:null,pointDistanceLine:null,lineVerticalPlaneSegment:null};const n=s.actualVisualizedMeasurement,a="local"!==this.view.viewingMode&&o&&!!this.analysis.startPoint&&"geodesic"===n,r=o&&2===s.viewMode;return{heightManifoldTarget:"euclidean"===n?t:null,pointDistanceLine:a?this._pointDistanceLine:null,lineVerticalPlaneSegment:r?u(this._startPosition,this._endPosition):null}}get _focusPosition(){const{lineState:t}=this.toolState,e=this.analysisViewData,i=null!=e&&!e.destroyed&&1===e.measurementMode&&1===e.viewMode;switch(t){case"drawing":return i?this._startPosition:this.analysis.endPoint?this._endPosition:this._startPosition;case"editing":return i?"start"===this._lastDraggedHandle?this._endPosition:this._startPosition:"start"===this._lastDraggedHandle?this._startPosition:this._endPosition;default:return null!=this.cursorPoint?this._cursorPosition:null}}get _pointDistanceLine(){return{origin:"drawing"===this.toolState.lineState||"end"===this._lastDraggedHandle?this._startPosition:this._endPosition,target:this._focusPosition}}createManipulators(){const t=this._params,{view:e}=this,i=()=>{const i=g(t.handleColor),s=[new _(v(i,1,32,32))],o=new m({view:e,renderObjects:s});return o.available=!1,o.radius=t.handleRadius,[o,i]},[s,o]=i(),[r,h]=i(),d=new m({view:this.view,available:!1,interactive:!1});null!=this.analysis.startPoint&&(s.location=this.analysis.startPoint,s.available=!0),null!=this.analysis.endPoint&&(r.location=this.analysis.endPoint,r.available=!0);const c=()=>{let t=this._lastDraggedHandle;s.grabbing&&!r.grabbing&&(t="start"),r.grabbing&&!s.grabbing&&(t="end"),s.grabbing||r.grabbing||(t=null),this._lastDraggedHandle=t},p=s.events.on("grab-changed",c),u=r.events.on("grab-changed",c);return this.addHandles([p,u,l(()=>a(this._params.handleColor),t=>{o.setParameters({color:t}),h.setParameters({color:t})},{equals:n})],"manipulators"),{start:s,end:r,cursor:d}}show(){this.destroyed||this._visible||this._updateVisibility(!0)}hide(){!this.destroyed&&this._visible&&this._updateVisibility(!1)}_connectToAnalysisView(){this.removeHandles("analysis-view"),this.addHandles([l(()=>this.analysisViewData?.destroyed,t=>{t&&this.removeHandles("analysis-view")},h),l(()=>["measured"===this.toolState.lineState,this.analysisViewData],([t,e])=>{null==e||e.destroyed||(e.allowVisualElementsOrientationChange=!t)},h),l(()=>this._laserLineParams,t=>{const e=this._laserLine;e.heightManifoldTarget=t.heightManifoldTarget,e.pointDistanceLine=t.pointDistanceLine,e.lineVerticalPlaneSegment=t.lineVerticalPlaneSegment},h)],"analysis-view")}_updateVisibility(t){this.initialized&&(this._visible=t,t&&(this._laserLine.style={innerColor:this._params.laserLineInnerColor,innerWidth:this._params.laserLineInnerWidth,glowColor:this._params.laserLineGlowColor,glowWidth:this._params.laserLineGlowWidth,glowFalloff:this._params.laserLineGlowFalloff,globalAlpha:this._params.laserLineGlobalAlpha}),this._laserLine.visible=t)}};t([d({constructOnly:!0})],b.prototype,"view",void 0),t([d()],b.prototype,"_params",null),t([d({constructOnly:!0})],b.prototype,"analysis",void 0),t([d({constructOnly:!0})],b.prototype,"analysisViewData",void 0),t([d()],b.prototype,"cursorPoint",void 0),t([d()],b.prototype,"toolState",void 0),t([d()],b.prototype,"visible",null),t([d()],b.prototype,"testData",null),t([d()],b.prototype,"_visible",void 0),t([d()],b.prototype,"_laserLine",void 0),t([d({constructOnly:!0})],b.prototype,"laserLineEnabled",void 0),t([d()],b.prototype,"_cursorPosition",null),t([d()],b.prototype,"_startPosition",null),t([d()],b.prototype,"_endPosition",null),t([d()],b.prototype,"_lastDraggedHandle",void 0),t([d()],b.prototype,"_laserLineParams",null),t([d()],b.prototype,"_focusPosition",null),t([d()],b.prototype,"_pointDistanceLine",null),b=t([c("esri.views.3d.interactive.measurementTools.directLineMeasurement3D.DirectLineMeasurement3DView")],b);export{b as DirectLineMeasurement3DView};
5
+ import{__decorate as t}from"tslib";import e from"../../../../../core/Accessor.js";import{multiplyOpacityToUnitRGBA as i,getContrast as s,colorVectorEquals as o,colorVectorToColorAndOpacity as n}from"../../../../../core/colorUtils.js";import"../../../../../core/has.js";import{destroyMaybe as a}from"../../../../../core/maybe.js";import{watch as r,initial as l}from"../../../../../core/reactiveUtils.js";import{property as h,subclass as d}from"../../../../../core/accessorSupport/decorators.js";import{create as c}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromPoints as p}from"../../../../../geometry/support/lineSegment.js";import{Manipulator3D as u}from"../../Manipulator3D.js";import{createManipulatorMaterial as g}from"../../manipulatorUtils.js";import{RenderObject as m}from"../../RenderObject.js";import{LaserlineVisualElement as _}from"../../visualElements/LaserlineVisualElement.js";import{createSphereGeometry as y}from"../../../webgl-engine/lib/GeometryUtil.js";let v=class extends e{constructor(t){super(t),this.cursorPoint=null,this._visible=!1,this._laserLine=null,this.laserLineEnabled=!0,this._lastDraggedHandle=null}initialize(){this._laserLine=new _({view:this.view,attached:!0,isDecoration:!0}),this._updateVisibility(this._visible),this._connectToAnalysisView(),this.addHandles(r(()=>this._params,({laserLineGlowColor:t,laserLineInnerColor:e,laserLineGlobalAlpha:i})=>{const s=this._laserLine,o=s.style;s.style={...o,innerColor:e,glowColor:t,globalAlpha:i}}))}destroy(){this._laserLine=a(this._laserLine)}get _params(){const{accentColor:t}=this.view.effectiveTheme;return{laserLineGlowColor:t.toUnitRGB(),laserLineGlowWidth:8,laserLineGlowFalloff:8,laserLineInnerColor:s(t).toUnitRGB(),laserLineInnerWidth:.75,laserLineGlobalAlpha:.75*t.a,handleColor:i(t,.5),handleRadius:5}}get visible(){return this._visible}set visible(t){t?this.show():this.hide()}get testData(){}get _cursorPosition(){const t=c(),e=this.cursorPoint;return e&&this.view.renderCoordsHelper.toRenderCoords(e,t),t}get _startPosition(){const t=c(),e=this.analysis.startPoint;return e&&this.view.renderCoordsHelper.toRenderCoords(e,t),t}get _endPosition(){const t=c(),e=this.analysis.endPoint;return e&&this.view.renderCoordsHelper.toRenderCoords(e,t),t}get _laserLineParams(){const t=this._focusPosition,{active:e,lineState:i}=this.toolState,s=this.analysisViewData,o=this.laserLineEnabled&&!!t&&"measured"!==i&&e;if(!o||!this.visible||null==s||s.destroyed)return{heightManifoldTarget:null,pointDistanceLine:null,lineVerticalPlaneSegment:null};const n=s.actualVisualizedMeasurement,a="local"!==this.view.viewingMode&&o&&!!this.analysis.startPoint&&"geodesic"===n,r=o&&2===s.viewMode;return{heightManifoldTarget:"euclidean"===n?t:null,pointDistanceLine:a?this._pointDistanceLine:null,lineVerticalPlaneSegment:r?p(this._startPosition,this._endPosition):null}}get _focusPosition(){const{lineState:t}=this.toolState,e=this.analysisViewData,i=null!=e&&!e.destroyed&&1===e.measurementMode&&1===e.viewMode;switch(t){case"drawing":return i?this._startPosition:this.analysis.endPoint?this._endPosition:this._startPosition;case"editing":return i?"start"===this._lastDraggedHandle?this._endPosition:this._startPosition:"start"===this._lastDraggedHandle?this._startPosition:this._endPosition;default:return null!=this.cursorPoint?this._cursorPosition:null}}get _pointDistanceLine(){return{origin:"drawing"===this.toolState.lineState||"end"===this._lastDraggedHandle?this._startPosition:this._endPosition,target:this._focusPosition}}createManipulators(){const t=this._params,{view:e}=this,i=()=>{const i=g(t.handleColor),s=[new m(y(i,1,32,32))],o=new u({view:e,renderObjects:s});return o.available=!1,o.radius=t.handleRadius,[o,i]},[s,a]=i(),[l,h]=i(),d=new u({view:this.view,available:!1,interactive:!1});null!=this.analysis.startPoint&&(s.location=this.analysis.startPoint,s.available=!0),null!=this.analysis.endPoint&&(l.location=this.analysis.endPoint,l.available=!0);const c=()=>{let t=this._lastDraggedHandle;s.grabbing&&!l.grabbing&&(t="start"),l.grabbing&&!s.grabbing&&(t="end"),s.grabbing||l.grabbing||(t=null),this._lastDraggedHandle=t},p=s.events.on("grab-changed",c),_=l.events.on("grab-changed",c);return this.addHandles([p,_,r(()=>n(this._params.handleColor),t=>{a.setParameters({color:t}),h.setParameters({color:t})},{equals:o})],"manipulators"),{start:s,end:l,cursor:d}}show(){this.destroyed||this._visible||this._updateVisibility(!0)}hide(){!this.destroyed&&this._visible&&this._updateVisibility(!1)}_connectToAnalysisView(){this.removeHandles("analysis-view"),this.addHandles([r(()=>this.analysisViewData?.destroyed,t=>{t&&this.removeHandles("analysis-view")},l),r(()=>["measured"===this.toolState.lineState,this.analysisViewData],([t,e])=>{null==e||e.destroyed||(e.allowVisualElementsOrientationChange=!t)},l),r(()=>this._laserLineParams,t=>{const e=this._laserLine;e.heightManifoldTarget=t.heightManifoldTarget,e.pointDistanceLine=t.pointDistanceLine,e.lineVerticalPlaneSegment=t.lineVerticalPlaneSegment},l)],"analysis-view")}_updateVisibility(t){this.initialized&&(this._visible=t,t&&(this._laserLine.style={innerColor:this._params.laserLineInnerColor,innerWidth:this._params.laserLineInnerWidth,glowColor:this._params.laserLineGlowColor,glowWidth:this._params.laserLineGlowWidth,glowFalloff:this._params.laserLineGlowFalloff,globalAlpha:this._params.laserLineGlobalAlpha}),this._laserLine.visible=t)}};t([h({constructOnly:!0})],v.prototype,"view",void 0),t([h()],v.prototype,"_params",null),t([h({constructOnly:!0})],v.prototype,"analysis",void 0),t([h({constructOnly:!0})],v.prototype,"analysisViewData",void 0),t([h()],v.prototype,"cursorPoint",void 0),t([h()],v.prototype,"toolState",void 0),t([h()],v.prototype,"visible",null),t([h()],v.prototype,"testData",null),t([h()],v.prototype,"_visible",void 0),t([h()],v.prototype,"_laserLine",void 0),t([h({constructOnly:!0})],v.prototype,"laserLineEnabled",void 0),t([h()],v.prototype,"_cursorPosition",null),t([h()],v.prototype,"_startPosition",null),t([h()],v.prototype,"_endPosition",null),t([h()],v.prototype,"_lastDraggedHandle",void 0),t([h()],v.prototype,"_laserLineParams",null),t([h()],v.prototype,"_focusPosition",null),t([h()],v.prototype,"_pointDistanceLine",null),v=t([d("esri.views.3d.interactive.measurementTools.directLineMeasurement3D.DirectLineMeasurement3DView")],v);export{v as DirectLineMeasurement3DView};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../../../Color.js";import i from"../../../Graphic.js";import{removeUnordered as s,isSome as r}from"../../../core/arrayUtils.js";import has from"../../../core/has.js";import o from"../../../core/Logger.js";import{equals as n}from"../../../core/MapUtils.js";import{destroyMaybe as a}from"../../../core/maybe.js";import l from"../../../core/PooledArray.js";import{ignoreAbortErrors as d,isAbortError as h,throwIfAborted as c,createResolver as u}from"../../../core/promiseUtils.js";import{initial as _,watch as g}from"../../../core/reactiveUtils.js";import{schedule as m}from"../../../core/scheduling.js";import{equals as f}from"../../../core/SetUtils.js";import{isArrayBuffer as p}from"../../../core/typedArrayUtil.js";import{property as y,subclass as b}from"../../../core/accessorSupport/decorators.js";import{fromMat4 as v,invert as I}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{create as C}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{multiply as M,getTranslation as w}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{clone as x,create as S}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{fromValues as E}from"../../../core/libs/gl-matrix-2/factories/quatf64.js";import{h as O,p as R,t as j,a as F,i as V,j as D,e as A,u as T}from"../../../chunks/vec32.js";import{create as H}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{c as N}from"../../../chunks/vec42.js";import{fromValues as P}from"../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{UpdatingHandles as k}from"../../../core/support/UpdatingHandles.js";import{getSphericalPCPF as U}from"../../../geometry/spatialReferenceEllipsoidUtils.js";import{localLinearScaleFactors as L}from"../../../geometry/projection/localLinearScaleFactors.js";import{projectBoundingSphere as G}from"../../../geometry/projection/projectBoundingSphere.js";import{projectBuffer as B}from"../../../geometry/projection/projectBuffer.js";import{getProjectorName as q}from"../../../geometry/projection/projectors.js";import{projectVectorToVector as z}from"../../../geometry/projection/projectVectorToVector.js";import{fromBuffer as W,create as $,toRect as K}from"../../../geometry/support/aaBoundingBox.js";import{create as Q,intersects as J}from"../../../geometry/support/aaBoundingRect.js";import{newDoubleArray as Y,ensurePackedMat4f64 as X}from"../../../geometry/support/DoubleArray.js";import{compactFloatArray as Z}from"../../../geometry/support/FloatArray.js";import{compactIndices as ee}from"../../../geometry/support/Indices.js";import{Sphere as te}from"../../../geometry/support/sphere.js";import{newUByteArray as ie}from"../../../geometry/support/UByteArray.js";import{fallbackObjectIDAttribute as se}from"../../../layers/LayerConstants.js";import re from"../../../layers/graphics/controllers/I3SOnDemandController.js";import{fixFields as oe}from"../../../layers/support/fieldUtils.js";import ne from"../../../layers/support/SceneModification.js";import{getColor as ae,getOpacity as le}from"../../../renderers/visualVariables/support/visualVariableUtils.js";import{isBasemapLayerView as de}from"../../../support/basemapUtils.js";import{getElevationOffset as he}from"../../../support/elevationInfoUtils.js";import{loadArcade as ce}from"../../../support/loadArcade.js";import ue from"../../../symbols/MeshSymbol3D.js";import _e from"../../../symbols/SimpleFillSymbol.js";import{ContentGeometryUpdateEvent as ge}from"./ContentGeometryLayerView.js";import me from"./I3SMeshViewLabeler.js";import{I3SMeshViewPerformanceInfo as fe}from"./I3SMeshViewPerformanceInfo.js";import{I3SMeshWorkerHandle as pe,toWasmModification as ye}from"./I3SMeshWorkerHandle.js";import{initialize as be,setModificationsSync as ve,filterObbsForModificationsSync as Ie,interpretObbModificationResults as Ce}from"./SceneLayerWorker.js";import{overrideColor as Me}from"./graphics/graphicUtils.js";import{areLabelsVisible as we}from"./graphics/Labeler.js";import xe from"./i3s/Highlights.js";import{I3SAsyncElevationUpdater as Se}from"./i3s/I3SAsyncElevationUpdater.js";import{getCachedAttributeValue as Ee}from"./i3s/I3SBinaryReader.js";import{I3SCrossfadeHelper as Oe,NodeCrossfadeMetaData as Re}from"./i3s/I3SCrossfadeHelper.js";import{boundingBoxCornerPoints as je}from"./i3s/I3SGeometryUtil.js";import{I3SIntersectionHandler as Fe}from"./i3s/I3SIntersectionHandler.js";import{getSupportedEncodings as Ve,selectEncoding as De,defaultMaterial as Ae,createTexture as Te,configureMaterial as He}from"./i3s/I3SMaterialUtil.js";import{I3SOverrides as Ne}from"./i3s/I3SOverrides.js";import{computeGlobalTransformation as Pe}from"./i3s/I3SProjectionUtil.js";import{rendererNeedsTextures as ke,checkSceneLayerValid as Ue,checkSceneLayerCompatibleWithView as Le,whenGraphicAttributes as Ge,computeVisibilityObb as Be,filterInPlace as qe,intersectBoundingRectWithMbs as ze,addWraparound as We,getSymbolInfo as $e,transparentEdgeMaterial as Ke,getClipRect as Qe}from"./i3s/I3SUtil.js";import{IDBCache as Je}from"./i3s/IDBCache.js";import{IDBMockCache as Ye}from"./i3s/IDBMockCache.js";import{LayerElevationProvider as Xe}from"./i3s/LayerElevationProvider.js";import{SymbologyInfo as Ze}from"./i3s/SymbologyInfo.js";import{attributeLookup as et}from"./support/attributeUtils.js";import{normalizeHighlightTarget as tt,emptyHighlightHandle as it}from"./support/highlightUtils.js";import{makeScheduleFunction as st}from"./support/makeScheduleFunction.js";import{debugFlags as rt}from"../support/debugFlags.js";import{ElevationRange as ot}from"../support/ElevationRange.js";import{toBoundingRect as nt}from"../support/extentUtils.js";import{Obb as at,ensurePackedObbData as lt}from"../support/orientedBoundingBox.js";import{updatingProgress as dt}from"../support/updatingProperties.js";import{glLayout as ht}from"../support/buffer/glUtil.js";import{ObjectParameters as ct}from"../webgl-engine/collections/Component/ObjectParameters.js";import{createVertexBufferLayout as ut,SourceGeometry as _t,GeometryParameters as gt}from"../webgl-engine/collections/Component/SourceGeometry.js";import{Transform as mt}from"../webgl-engine/collections/Component/Transform.js";import{emissiveStrengthDefault as ft}from"../webgl-engine/core/shaderLibrary/output/Emissions.glsl.js";import{loadBasisTranscoder as pt}from"../webgl-engine/lib/BasisUtil.js";import{getHighlightName as yt}from"../../support/highlightOptionsUtils.js";import{TextureCompressionTracker as bt}from"../../support/TextureCompressionTracker.js";import{alphaCutoff as vt}from"../../../webscene/support/AlphaCutoff.js";const It=[1,1,1,1];class Ct extends Re{constructor(e,t,i,s,r,o,n,a,l){super(),this.node=e,this.featureIds=t,this.objectHandle=i,this.cachedRendererVersion=s,this.attributeInfo=r,this.material=o,this.textures=n,this.anchorIds=a,this.anchors=l,this.cachedElevationAnchors=null,this.cachedEdgeMaterials=new Array,this.edgeMemoryUsage=0,this.cachedSymbologyStride=5}get usedMemory(){return this.node.memory}get featureExtents(){return this._featureExtents??=new Float64Array(6*this.featureIds.length).fill(Number.POSITIVE_INFINITY),this._featureExtents}}const Mt=26,wt=104857600,xt=t=>{const p=t;let T=class extends p{constructor(){super(...arguments),this._applySSAO=!0,this._shadeNormals=!0,this._updatingHandles=new k,this._highlights=null,this._nodeId2Meta=new Map,this._nodeId2MetaReloading=new Map,this._i3sWasmLoaded=!1,this._snappingSourcesTrackers=[],this._compressionTracker=new bt,this._hasLoadedPBRTextures=!1,this._asyncModuleLoading=0,this._addTasks=new Map,this._currentRenderer=null,this._rendererVersion=0,this._colorVariable=null,this._opacityVariable=null,this._rendererFields=null,this._symbologyFields=null,this._symbologyOverride=null,this._symbologyOverrideFields=null,this._symbolInfos=new Map,this._visibleGeometryChangedSchedulerHandle=null,this._hasComponentData=!1,this._hasVertexColors=!1,this._nodeColorOverride=null,this.updating=!0,this.holeFilling="auto",this._hasColors=!1,this._hasTextures=!1,this._hasData=!1,this.slicePlaneEnabled=!1,this._modifications=new Array,this.ignoresMemoryFactor=!1,this._layerUrl="",this._cacheKeySuffix=null,this._planetRadiusInGlobalMode=0,this._elevationTask=null,this._needFilterResolve=!1,this._filters=[],this._arcade=null,this._tmpAttributeOnlyGraphic=new i,this._crossfadeHelper=new Oe(this)}get lodCrossfadeoutDuration(){return 0}get lodCrossfadeinDuration(){return 0}get lodCrossfadeUncoveredDuration(){return 0}get layerViewUid(){return this.uid}get layerId(){return this.i3slayer.id}get sublayerId(){return null}get _isIntegratedMesh(){return"integrated-mesh"===this.i3slayer.type}get contentVisible(){return!this.suspended&&this._controller?.rootNodeVisible&&this.fullOpacity>vt}get legendEnabled(){return this.contentVisible&&!0===this.i3slayer?.legendEnabled}get updatingProgressValue(){return this._controller?.updatingProgress??0}get hasTexturesOrVertexColors(){return this._hasData?this._hasTextures||this._hasColors?"yes":"probably-not":"unknown"}get rendererTextureUsage(){return ke(this._currentRenderer)?this._usePBR||this._hasLoadedPBRTextures?63:37:this._usePBR||this._hasLoadedPBRTextures?44:36}get elevationOffset(){const e=null!=this.i3slayer?this.i3slayer.elevationInfo:null;return null!=e&&"absolute-height"===e.mode?he(e,this.i3slayer.spatialReference):0}get elevationInfo(){const e=null!=this.i3slayer?this.i3slayer.elevationInfo:null;if(null==e)return new kt(0,0);const t=he(e,this.i3slayer.spatialReference);switch(e.mode){case"absolute-height":return new kt(0,t);case"relative-to-ground":return new kt(1,t);case"on-the-ground":return new kt(2,0);default:return new kt(0,0)}}get supportedTextureEncodings(){return Ve(this.view.stage.renderView.capabilities)}get clientGeometry(){return this.i3sOverrides.geometryOverrides}get elevationRange(){const e=this._nodeId2Meta,t=new ot;for(const i of e.values()){const e=i?.node.serviceMbsInIndexSR;e&&t.expandElevationRangeValues(e.center[2]-e.radius,e.center[2]+e.radius)}return t.elevationRangeValid?t:null}get fullExtent(){return this.i3slayer.fullExtent}initialize(){const e=has("enable-feature:idb-mock-cache");this._idbCache=e?new Ye(this.view,e):new Je("esri-scenelayer-cache","geometries"),this._preLoadBasis(),this.addResolvingPromise(this.i3slayer.indexInfo);const t=this.view.resourceController,i=t.memoryController;this.i3sOverrides=new Ne({view:this.view,layer:this.i3slayer,memoryController:i}),this._workerHandle=new pe(st(t)),this.addResolvingPromise(this._workerHandle.promise);const s=this.i3slayer.store;this.addResolvingPromise(this._workerHandle.setLegacySchema(this.uid,s.defaultGeometrySchema).catch(d)),Ue(this.i3slayer),Le(this.i3slayer,this.view),this._layerUrl=this.i3slayer.parsedUrl.path,this._controller=new re({layerView:this,worker:this._workerHandle}),this._gpuMemoryEstimate=0,this._texMemoryEstimate=0,this._geoMemoryEstimate=0,this._stage=this.view.stage,this._collection=this._stage.renderView.componentObjectCollection;const r=s.defaultGeometrySchema;if(this._isIntegratedMesh||!r)this._hasComponentData=!1;else{const e=r.featureAttributes;this._hasComponentData=!!(e&&e.faceRange&&e.id)}this._hasVertexColors=null!=(r?.vertexAttributes.color??null)&&!this.i3slayer.cachedDrawingInfo?.color;const n=this.view.resourceController.memoryController.newCache(`sl-${this.uid}`,e=>this._deleteComponentObject(e));this._memCache=n;const l=this._controller,h=this._nodeId2Meta,c=this._nodeId2MetaReloading,u=e=>{const t=l.index;if(!t)return;const i=t.rootNode;if(!i)return;const s=t=>{const i=t.index,s=h.get(i)||c.get(i);return e(t,s?.objectHandle??null)};t.traverse(i,s)};this._intersectionHandler=new Fe({layerViewUid:this.layerViewUid,sublayerId:this.sublayerId,collection:this._collection,slicePlaneEnabled:this.slicePlaneEnabled,isGround:this._isIntegratedMesh,traverseNodeHierarchy:u}),this._elevationProvider=new Xe({view:this.view,layerElevationSource:this,intersectionHandler:this._intersectionHandler}),this._hasLoadedPBRTextures=this._usePBR,this._updatingHandles.add(()=>this.view.clippingArea,()=>this._clippingAreaChanged(),_),this._updatingHandles.add(()=>this.fullOpacity,e=>this._opacityChange(e)),this._updatingHandles.add(()=>this.slicePlaneEnabled,e=>this._slicePlaneEnabledChange(e)),this._updatingHandles.add(()=>this.elevationOffset,(e,t)=>{this._reloadAll(t),this._controller.invalidateVisibilityObbs()}),this._updatingHandles.add(()=>this.elevationInfo,(e,t)=>this._elevationInfoChanged(e,t),_),this._updatingHandles.add(()=>!this.suspended&&0!==this.elevationInfo.mode,(e,t)=>{e?this.addHandles(this.view.basemapTerrain.on("elevation-change",({extent:e})=>this._ensureElevationTask().addExtent(e)),Gt):t&&this.removeHandles(Gt)},_),this._updatingHandles.add(()=>this._usePBR,e=>this._updatePBR(e));const m=()=>{this._reloadAll(),this.clearMemCache()};this._updatingHandles.add(()=>this.rendererTextureUsage,m),this._updatingHandles.add(()=>this.contentVisible,e=>this._contentVisibleChanged(e),_),this._updatingHandles.add(()=>this.i3slayer.labelsVisible,()=>this._labelingChanged(),_),this._updatingHandles.add(()=>this.i3slayer.labelingInfo,()=>this._labelingChanged(),_),this._updatingHandles.add(()=>this._modifications,()=>this._modificationsChanged(),_),this.addHandles([g(()=>rt.I3S_TREE_SHOW_TILES,e=>{if(e&&!this._treeDebugger){const e=this._controller.crsIndex;import("./support/I3STreeDebugger.js").then(({I3STreeDebugger:t})=>{!this._treeDebugger&&rt.I3S_TREE_SHOW_TILES&&(this._treeDebugger=new t({lv:this,view:this.view,nodeSR:e}))})}else e||rt.I3S_TREE_SHOW_TILES||(this._treeDebugger=a(this._treeDebugger))},_),g(()=>rt.I3S_SHOW_MODIFICATIONS,()=>this._showModifications(),_)]),this._cacheKeySuffix=this._getCacheKeySuffix(),this._idbCache.init().catch(e=>o.getLogger(this).warn(`Failed to initialize IndexedDB cache: ${e}`));const{view:f}=this,{viewingMode:p,renderCoordsHelper:y}=f;this._planetRadiusInGlobalMode="local"===p?0:y.referenceEllipsoid.radius}destroy(){this._clearAddTasks(),this._elevationTask=a(this._elevationTask),this.i3sOverrides=a(this.i3sOverrides),this._elevationProvider&&(this._elevationProvider.notifyObjectsChanged(this.getVisibleObbs()),this.view.elevationProvider.unregister(this._elevationProvider),this._elevationProvider=null),this._intersectionHandler&&(this._stage.view.sceneIntersectionHelper.removeIntersectionHandler(this._intersectionHandler),this._intersectionHandler=null);const e=this._workerHandle;e&&(e.destroyContextAndSelf(this.uid),this._workerHandle=null),this._removeAllNodeDataFromStage(),this._memCache=a(this._memCache),this._collection=null,this._stage=null,this._edgeView=null,this._labeler=a(this._labeler),this._treeDebugger=a(this._treeDebugger),this._controller=a(this._controller),this._highlights=a(this._highlights),this._nodeId2Meta.clear(),this._nodeId2MetaReloading.clear(),this._crossfadeHelper=a(this._crossfadeHelper),this.emit("visible-geometry-changed"),this._visibleGeometryChangedSchedulerHandle&&(this._visibleGeometryChangedSchedulerHandle.remove(),this._visibleGeometryChangedSchedulerHandle=null),this._updatingHandles=a(this._updatingHandles)}_memEstimateTextureAdded(e){const t=e.usedMemory;return this._gpuMemoryEstimate+=t,this._texMemoryEstimate+=t,t}_memEstimateTextureRemoved(e){if(null!=e){const t=e.usedMemory;this._gpuMemoryEstimate-=t,this._texMemoryEstimate-=t}}_memEstimateGeometryAdded(e){const t=this._collection.getObjectGPUMemoryUsage(e);return this._gpuMemoryEstimate+=t,this._geoMemoryEstimate+=t,t}_memEstimateGeometryRemoved(e){const t=this._collection.getObjectGPUMemoryUsage(e);this._gpuMemoryEstimate-=t,this._geoMemoryEstimate-=t}isNodeLoaded(e){return this._nodeId2Meta.has(e)}isNodeReloading(e){return this._nodeId2MetaReloading.has(e)}get usedMemory(){let e=null!=this._labeler?this._labeler.usedMemory:0;return this._nodeId2Meta.forEach(t=>e+=null!=t?t.node.memory:0),this._nodeId2MetaReloading.forEach(t=>e+=null!=t?t.node.memory:0),e}get unloadedMemory(){return(null!=this._controller?this._controller.unloadedMemoryEstimate:0)+(null!=this._labeler?this._labeler.unloadedMemoryEstimate:0)}_labelingChanged(){if(!(we(this.i3slayer)&&this._supportsLabeling))return void(null!=this._labeler&&(this._labeler.destroy(),this._labeler=null));if(null!=this._labeler)return;const e=new me({view:this.view,layer:this.i3slayer,collection:this._collection,overrides:this.i3sOverrides,layerViewUid:this.uid});this._nodeId2Meta.forEach(t=>null!=t&&this._addMetaToLabeler(e,t)),this._labeler=e}_loadAsyncModule(e){return++this._asyncModuleLoading,e.then(e=>(--this._asyncModuleLoading,e),e=>{throw--this._asyncModuleLoading,e})}_modificationsChanged(){if(!this._i3sWasmLoaded&&this.hasModifications)return this._i3sWasmLoaded=be().then(()=>{this._i3sWasmLoaded=!0,this._modificationsChanged(),this.notifyUpdate()}),void this.notifyUpdate();if(!0!==this._i3sWasmLoaded)return;const e=e=>o.getLogger(this).error("set-modifications-error","Error when setting modifications:",e),t=this.uid,i=this.i3slayer.spatialReference,s=i.isGeographic,r=ye(this._layerClippingArea,this._modifications,i);this._workerHandle.setModifications(t,r,s).catch(e);try{ve({context:t,modifications:r,isGeodetic:s})}catch(a){e(a)}this._controller.modificationsChanged();const n=this.hasModifications?new l:null;this._nodeId2Meta.forEach((e,t)=>{null==e?(this._nodeId2Meta.delete(t),this._controller.updateLoadStatus(t,!1)):e.node.hasModifications?(this._updateFeatureIdCounts(e,-1),this._nodeId2Meta.delete(t),this._nodeId2MetaReloading.set(t,e)):null!=n&&n.push(e.node)}),this.notifyChange("elevationRange"),null!=n&&this._nodeId2MetaReloading.forEach(e=>n.push(e.node)),null!=n&&n.length>0&&(this.updateNodeModificationStatus(n),n.forAll(e=>{if(2!==e.imModificationImpact){const t=this._nodeId2Meta.get(e.index);this._controller.invalidateGeometryVisibility(e.index),null!=t?(this._updateFeatureIdCounts(t,-1),this._nodeId2Meta.delete(e.index),this._nodeId2MetaReloading.set(e.index,t),this.notifyChange("elevationRange")):this._nodeId2Meta.has(e.index)&&(this._nodeId2Meta.delete(e.index),this._controller.updateLoadStatus(e.index,!1))}})),this.clearMemCache(),this._controller.restartNodeLoading(),this._showModifications()}_showModifications(){if(null!=this._modificationGraphics&&(this.view.graphics.removeMany(this._modificationGraphics),this._modificationGraphics=null),!rt.I3S_SHOW_MODIFICATIONS||0===this._modifications.length)return;const e={clip:[227,227,79,.8],mask:[227,139,79,.8],replace:[139,227,79,.8]},t={outline:{color:[255,255,255],width:1}};this._modificationGraphics=[];for(const s of this._modifications){const r=s.geometry;r.spatialReference=this.i3slayer.spatialReference;const o=new _e({...t,color:e[s.type]});this._modificationGraphics.push(new i({geometry:r,symbol:o}))}this.view.graphics.addMany(this._modificationGraphics)}_addMetaToLabeler(e,t){e.addNodeMeta(t,(e,t)=>this._createAttributes(e,t))}_contentVisibleChanged(e){e?(this.view.elevationProvider.register(this._elevationContext,this._elevationProvider),this._stage.view.sceneIntersectionHelper.addIntersectionHandler(this._intersectionHandler)):(this._removeAllNodeDataFromStage(),this.view.elevationProvider&&this.view.elevationProvider.unregister(this._elevationProvider),this._stage.view.sceneIntersectionHelper.removeIntersectionHandler(this._intersectionHandler))}getLoadedAttributes(e){const t=this._nodeId2Meta.get(e);if(null!=t?.attributeInfo)return t.attributeInfo.loadedAttributes}getAttributeData(e){const t=this._nodeId2Meta.get(e);if(null!=t?.attributeInfo)return t.attributeInfo.attributeData}setAttributeData(e,t){const i=this._nodeId2Meta.get(e);null!=i?.attributeInfo&&(i.attributeInfo.attributeData=t,this._attributeValuesChanged(i))}async updateAttributes(e,t,i){const s=this._nodeId2Meta.get(e);null!=s&&(await this.i3sOverrides.applyAttributeOverrides(s.featureIds,t,i,this._controller.requiredAttributes),s.attributeInfo=t,this._controller.reschedule(()=>{this._nodeId2Meta.get(e)===s&&this._attributeValuesChanged(s)},i).catch(e=>{h(e)||o.getLogger(this).warn("Error while updating attribute values. Layer might not display correctly.",e)}))}_attributeValuesChanged(e){e.cachedRendererVersion=this._getInvalidRendererVersion(),e.appliedFilters=null,null!=this._labeler&&this._labeler.setNodeMetaAttributes(e,(e,t)=>this._createAttributes(e,t)),this._updateEngineObject(e)}clearMemCache(){null!=this._memCache&&this._memCache.clear(),this._addTasks.forEach(e=>e.allowMemCache=!1)}getVisibleNodes(){const e=new Array;return this._nodeId2Meta.forEach(t=>null!=t&&e.push(t.node)),e}getVisibleObbs(){const e=new Array;return this._nodeId2Meta.forEach(t=>t&&e.push(this._collection.getComponentObb(t.objectHandle))),e}getLoadedNodeIndices(e){this._nodeId2Meta.forEach((t,i)=>e.push(i)),this._nodeId2MetaReloading.forEach((t,i)=>e.push(i))}_preLoadBasis(){!has("disable-feature:i3s-basis")&&2&this.supportedTextureEncodings&&this.i3slayer.textureSetDefinitions?.some(e=>e.formats.some(e=>"basis"===e.format||"ktx2"===e.format))&&pt()}_getVertexBufferLayout(e,t){return ht(ut(this._getGeometryParameters({hasTexture:Vt(e.params.material),hasNormals:t.normal,hasRegions:t.uvRegion})))}_getObjectIdField(){return this.i3slayer.objectIdField||se}_getGlobalIdField(){return this.i3slayer.globalIdField}_findGraphicNodeAndIndex(e){const t=et(this.i3slayer.fieldsIndex,e.attributes,this._getObjectIdField());for(const i of this._nodeId2Meta.values()){const e=i?.featureIds.indexOf(t);if(null!=e&&e>=0)return{node:i.node,index:e}}return null}_getGraphicIndices(e,t){const i=this._nodeId2Meta.get(e.index);if(null==i)return[];const s=[],r=this._getObjectIdField(),o=this.i3slayer.fieldsIndex;for(const n of t){const e=et(o,n.attributes,r),t=i.featureIds.indexOf(e);-1!==t&&s.push(t)}return s}whenGraphicBounds(e){const t=this._findGraphicNodeAndIndex(e);if(!t)return Promise.reject();const i=this.getAABB(t.node.index,t.index);return null==i?Promise.reject():Promise.resolve({boundingBox:i,screenSpaceObjects:[]})}getAABBFromIntersectorTarget(e){return null==e.nodeIndex||null==e.componentIndex?null:this.getAABB(e.nodeIndex,e.componentIndex)}getAABB(e,t){const i=this._nodeId2Meta.get(e);if(null==i?.featureIds||t>=i.featureIds.length)return null;const s=i.objectHandle,r=je(t,this._collection,s,Y(24),0),o=this.view.renderSpatialReference,n=this.view.spatialReference;return B(r,o,0,r,n,0)?W(r):null}whenGraphicAttributes(e,t){return Ge(this.i3slayer,e,this._getObjectIdField(),t,()=>[...this._nodeId2Meta.values()].filter(r))}getGraphicFromIntersectorTarget(e,t){if(null==e.nodeIndex||null==e.componentIndex)return null;const i=this._nodeId2Meta.get(e.nodeIndex);if(null==i?.featureIds||e.componentIndex>=i.featureIds.length)return null;const s=this._createLayerGraphic(this._createAttributes(e.componentIndex,i));return s?t.defer?(t.defer(async()=>(s.geometry=(await import("./i3s/meshUtils.js")).createMesh({layerView:this,nodeIndex:e.nodeIndex,featureIndex:e.componentIndex}),s)),null):s:null}_getCacheKey(e){return`${this._layerUrl}/v${Mt}/${e}${this._cacheKeySuffix}`}_getCacheKeySuffix(){const e=this.view.renderSpatialReference;if(null==e)return qt;if(e===U(e))return zt;return this.i3slayer.spatialReference.equals(e)?Bt:null!=e.wkid?`@${e.wkid}`:null}_getMemCacheKey(e,t=this.elevationOffset){return e+"#"+t}get _idbCacheEnabled(){return!this._controller.disableIDBCache&&!this.hasModifications&&0===this.elevationOffset&&null!=this._cacheKeySuffix}loadCachedGPUData(e){return null!=this._memCache?this._memCache.pop(this._getMemCacheKey(e)):null}deleteCachedGPUData(e){null!=e&&this._deleteComponentObject(e)}_cacheGPUData(e,t=this.elevationOffset){if(null==this._memCache)return void this._deleteComponentObject(e);const i=this._controller.indexDepth-e.node.level;this._memCache.put(this._getMemCacheKey(e.node.index,t),e,i)}loadMissingTextures(e,t,i,s){const r=e?.filter((e,i)=>{if(0===(e.usage&this.rendererTextureUsage))return!1;if(null==t)return!0;const s=De(e.encodings,this.supportedTextureEncodings),r=t[i];return!!(null==r?.data||s&&r.encoding!==s.encoding)})??[];return 0===r.length?Promise.resolve(!1):i(r,s).then(i=>{let s=0;for(let r=0;r<e.length;r++)s<i.length&&i[s].id===e[r].id&&(t[r]=i[s],s++);return!0})}loadCachedNodeData(e,t,i){return this._idbCacheEnabled?this._idbCache.get(this._getCacheKey(e.id),t).then(s=>null==s?null:(s.globalTrafo=X(s.globalTrafo),s.nodeVersion!==e.version?(this._idbCache.remove(this._getCacheKey(e.id)),null):(0===this.elevationInfo.mode&&(e.geometryObbInRenderSR=at.fromData(s.geometryObbData)),this.loadMissingTextures(s.requiredTextures,s.textureData,i,t).then(i=>(i&&this._idbCache.initialized&&null!=s.textureData&&(s.byteSize=Tt(s.transformedGeometry,s.textureData),s.textureData.every(At)&&this._indexedDbSizeCheck(e,s)&&this._idbCache.put(this._getCacheKey(e.id),s).catch(t=>o.getLogger(this).warn(`Failed to update node with textures in IndexedDB cache: ${e.id}: ${t}`))),c(t),s))))):Promise.resolve(null)}addNode(e,t,i){return Dt(t)?null==t.geometryBuffer?(this._addNodeMeta(e.index,null),Promise.resolve()):this._addData(e,t.attributeDataInfo,()=>this._transformNode(e,t,i).then(s=>this._safeReschedule(()=>{if(null==s)return e.hasModifications=!1,this._addCachedNodeData(e,null,i);e.hasModifications=s.transformedGeometry.hasModifications;const{obb:r,componentOffsets:n,featureIds:a,anchorIds:l,anchors:d,transformedGeometry:h}=s,c=X(s.globalTrafo),u=O(Ut,r.center.x,r.center.y,r.center.z);R(u,u,c);const _=new at(u,[r.extents.x,r.extents.y,r.extents.z],E(r.orientation.x,r.orientation.y,r.orientation.z,r.orientation.w));0===this.elevationInfo.mode&&(e.geometryObbInRenderSR=_),t.geometryData.componentOffsets=n,a&&(t.geometryData.featureIds=Array.from(a)),t.geometryData.anchorIds=l,t.geometryData.anchors=d;const g={nodeVersion:e.version,geometryData:t.geometryData,requiredTextures:t.requiredTextures,textureData:t.textureData,transformedGeometry:h,globalTrafo:c,geometryObbData:_.data,byteSize:Tt(h,t.textureData)};if(this._idbCacheEnabled&&this._idbCache.initialized&&this._indexedDbSizeCheck(e,g)){const t=null!=g.textureData?g.textureData.map(e=>At(e)?e:null):null;this._idbCache.put(this._getCacheKey(e.id),{...g,textureData:t}).catch(t=>o.getLogger(this).warn(`Failed to store node in IndexedDB cache: ${e.id}: ${t}`))}return this._addCachedNodeData(e,g,i)},i))):Promise.reject()}getElevationRange(e){const t=new ot,i=this._controller,{index:s}=i;if(!s)return t;const{rootNode:r}=s;if(!r)return t;const o=this._nodeId2Meta,n=e.radius,a=i.viewportQueries,l=this._planetRadiusInGlobalMode,{view:d}=this,{renderCoordsHelper:h}=d,c=h.referenceEllipsoid.radius,u=this._collection,_=i=>{const{childrenLoaded:s}=i;if(0===s)return!1;const r=a.getAndUpdateVisibilityObbInRenderSR(i);let d=null,_=-1;if(r){if(_=r.radius,!r.intersectSphereWithMBS(e,_))return!1}else d=a.getServiceMbsInRenderSR(i),d&&(_=d.radius);if(_>=0&&n>=1*_)return null!=r?Kt(t,r,l):null!=d&&d.radius>=0&&Qt(t,d,l),!1;const g=$t;if(g.minElevation=1/0,g.maxElevation=-1/0,(null!=r||null!=d)&&(null!=r?Kt(g,r,l):null!=d&&Qt(g,d,l),g.minElevation>=t.minElevation&&g.maxElevation<=t.maxElevation))return!1;const m=o.get(i.index);if(m){const{geometryObbInRenderSR:s}=i;if(!s||s.intersectSphereWithMBS(e)){if(s){if(n>0*s.radius)return Kt(t,s,l),!1}const{objectHandle:e}=m,i=u.getObjectTransform(e),r=h.getAltitude(i.position);u.expandRangeWithComponentObjectElevationRange(e,r,c,t)}}return s-(m?1:0)>0};return s.traverse(r,_),t}computeVisibilityObb(e){return Be(e,this.view.renderSpatialReference,this._controller.crsIndex,this.i3slayer.spatialReference,this.elevationOffset,this._modifications,this.view.renderCoordsHelper.sphericalPCPF)}_transformNode(e,t,i){const s=t.geometryData.geometries??[],r=new Array(s.length);for(let f=0;f<s.length;++f)r[f]=this._getVertexBufferLayout(s[f],t.geometryDescriptor);const o=this.i3slayer.normalReferenceFrame,n=t.normalReferenceFrame??o??"none",a=e.serviceMbsInIndexSR,l=this.elevationOffset,d=this._controller.crsIndex,h=this._controller.crsVertex,c=this.view.renderSpatialReference,u=Pe(a,l,n,d,c),_=q(d,h),g=q(h,c);if(null==_||null==g)return Promise.resolve(null);const m={context:this.uid,geometryBuffer:t.geometryBuffer,geometryData:t.geometryData,geometryDescriptor:t.geometryDescriptor,layouts:r,globalTrafo:u,mbs:a.toJSON(),obbData:e.serviceObbInIndexSR?.data,elevationOffset:l,needNormals:this._controller.isMeshPyramid,normalReferenceFrame:n,indexToVertexProjector:_,vertexToRenderProjector:g};return this._workerHandle.invoke(m,i)}get _supportsNodeCrossFading(){return!this.view?.stage?.renderer.shadowsEnabled}get nodeCrossfadingEnabled(){return this._supportsNodeCrossFading&&(this.lodCrossfadeinDuration>0||this.lodCrossfadeoutDuration>0||this.lodCrossfadeUncoveredDuration>0)}get nodeFadeoutEnabled(){return this._supportsNodeCrossFading&&this.lodCrossfadeoutDuration>0}_setNewNodeOpacity(e){const t=this.nodeCrossfadingEnabled?0:this.fullOpacity;this._setNodeOpacity(e,t)}addCachedGPUData(e,t,i){if(0===this.elevationInfo.mode&&(e.geometryObbInRenderSR=this._collection.getComponentObb(t.objectHandle).clone()),!this._controller.isGeometryVisible(e))return void this._cacheGPUData(t);null!=this._labeler&&this._addMetaToLabeler(this._labeler,t);const s=e.index;this._addNodeMeta(s,t),this.updateNodeState(s,i),this._collection.setObjectVisibility(t.objectHandle,!0),this._updateMaterial(t),this._setNewNodeOpacity(t),0!==this.elevationInfo.mode&&this._ensureElevationTask().schedule(s),this._updateEngineObject(t),this._highlights?.objectCreated(t),null!=this._treeDebugger&&this._treeDebugger.update()}addCachedNodeData(e,t,i,s){return this._addData(e,i,()=>this._addCachedNodeData(e,t,s))}async deleteCachedNodeData(e){if(this._idbCacheEnabled)return this._idbCache.remove(this._getCacheKey(e))}async _addCachedNodeData(e,t,i){if(!this.contentVisible||!this._controller.isGeometryVisible(e))return void this._removeNodeStageData(e.index,this.elevationOffset,this._nodeId2MetaReloading);if(null==t)return void this._addNodeMeta(e.index,null);const s=this._addTasks.get(e.index),{geometryData:r,transformedGeometry:n}=t;await this.i3sOverrides.applyAttributeOverrides(r.featureIds,s.attributeInfo,i,this._controller.requiredAttributes);const a=null!=t.textureData?t.textureData.filter(e=>null!=e&&0!==(e.usage&this.rendererTextureUsage)):[];!has("disable-feature:i3s-basis")&&a.some(e=>null!=e&&(2===e.encoding||1===e.encoding))&&await pt(),e.memory=0;const{componentOffsets:l,geometries:d,featureIds:h,anchorIds:c,anchors:u}=r,_=this._collection,g=d[0],{layout:m,indices:f,interleavedVertexData:p,positionData:y,hasColors:b}=n,{material:E,geometryParameters:O}=this._materialParameters(g,m),R=l||new Uint32Array([0,f?f.length:p.byteLength/m[0].stride]),V=new _t({data:p,count:p.byteLength/m[0].stride,layoutParameters:O},{positions:Z(y.data),indices:ee(y.indices)},f,R),D=g.transformation?x(g.transformation):S(),A=X(t.globalTrafo);M(D,A,D);const T=w(H(),D),N=v(C(),D),k=this.view.renderSpatialReference,U=this.view.basemapTerrain.spatialReference,G=at.fromData(lt(t.geometryObbData)).center,B=[1,1,1];L(G,k,B,U)||o.getLogger(this).errorOnce("Unsupported coordinate system for IM overlay");const q=H();z(G,k,q,U);const W=C();I(W,N);const $=H();j($,F($,G,T),W);const K=q[0]-$[0]*B[0],Q=q[1]-$[1]*B[1],J=_.createObject(new ct(P(K,Q,B[0],B[1]),new mt(T,N),at.fromData(lt(t.geometryObbData)),V,!this._isIntegratedMesh)),Y=2===O.textureCoordinateType,{textures:te,texturePromise:ie}=this._initMaterialAndTextures(J,E,a,Y,e);e.memory+=this._memEstimateGeometryAdded(J),e.memory+=te.reduce((e,t)=>e+(null!=t?this._memEstimateTextureAdded(t):0),0);const se=!!E.hasParametersFromSource,re="blend"!==E.alphaMode&&E.metallicRoughness.baseColorFactor[3]>=1,oe=new Ct(e,h,J,this._getInvalidRendererVersion(),s.attributeInfo,{hasParametersFromSource:se,isOpaque:re},te,c,u);s.meta=oe,this._hasTextures||=t.requiredTextures?.some(({usage:e})=>!!(19&e))||!!e.resources.texture,this._hasData=!0,this._hasColors||=b,this.notifyChange("hasTexturesOrVertexColors");const ne=this.slicePlaneEnabled;return Promise.all([this._addOrUpdateEdgeRendering(oe),ie]).then(([t,s])=>(this._addTasks.has(e.index)&&t?.updateObjectVisibility(oe.objectHandle,!1).catch(e=>this._logEdgeViewError(e,this.i3slayer.title)),this._safeReschedule(()=>{const i=this._addTasks.get(e.index);if(!i)return;if(this._addNodeMeta(e.index,oe),i.meta=null,!this.contentVisible)return void this._removeNodeStageData(e.index,this.elevationOffset);_.setObjectVisibility(J,!0),t?.updateObjectVisibility(oe.objectHandle,!0).catch(e=>this._logEdgeViewError(e,this.i3slayer.title)),oe.attributeInfo=i.attributeInfo;const s=oe.cachedRendererVersion!==this._rendererVersion,r=ne!==this.slicePlaneEnabled;this._updateElevationOffsets(oe);const o=oe.elevationOffsets;this._updateComponentData(oe);const n=this._applyFiltersToNode(oe);(s||null!=t&&(r||n||o))&&this._addOrUpdateEdgeRendering(oe),null!=this._labeler&&this._addMetaToLabeler(this._labeler,oe),this._visibleGeometryChanged(oe,0),this._highlights?.objectCreated(oe),this._updateMaterial(oe),this._setNewNodeOpacity(oe),null!=this._treeDebugger&&this._treeDebugger.update()},i))).catch(e=>{const{meta:t,allowMemCache:i}=s;throw s.meta=null,t&&i?this._cacheGPUData(t):t&&this._deleteComponentObject(t),e})}_addNodeMeta(e,t){if(this._removeNodeStageData(e,this.elevationOffset,this._nodeId2MetaReloading),this._nodeId2Meta.has(e)){o.getLogger(this).error("Removing duplicated node");const t=this._nodeId2Meta.get(e);t&&(this._deleteComponentObject(t),this._updateFeatureIdCounts(t,-1))}else this._controller.updateLoadStatus(e,!0);t&&(t.lodCrossfadeProgress=null,this.nodeCrossfadingEnabled&&Pt(t.cachedEdgeMaterials,0),this._updateFeatureIdCounts(t,1)),this._nodeId2Meta.set(e,t),this.notifyChange("elevationRange")}_updateElevationOffsets(e){if(!e.node.serviceMbsInIndexSR)return;const{view:t,elevationInfo:i}=this,s=this._controller.crsIndex,{groundView:r,groundSpatialReference:o,renderSpatialReference:n}=t,a=i.mode;if(null==n||null==o||0===a)return void(e.elevationOffsets=null);const l=this._collection.getObjectTransform(e.objectHandle);e.elevationOffsets=e.elevationOffsets??[];const d=Ut,h=Lt,c=2===a,u=this.view.renderCoordsHelper,_=e.featureIds.length,g=(()=>{if(e.cachedElevationAnchors)return e.cachedElevationAnchors;const t=Y(3*_);e.cachedElevationAnchors=t;const{center:i}=e.node.serviceMbsInIndexSR;for(let r=0;r<_;r++){const a=3*r,c=e.anchorIds?.indexOf(r)??-1;e.anchors&&c>=0?(O(d,e.anchors[3*c],e.anchors[3*c+1],e.anchors[3*c+2]),V(d,d,i),z(d,s,d,o),t[a]=d[0],t[a+1]=d[1],t[a+2]=u.getAltitude(d)):(this._collection.getComponentAabb(e.objectHandle,r,h,!0),O(d,(h[0]+h[3])/2,(h[1]+h[4])/2,h[2]),j(d,d,l.rotationScale),V(d,d,l.position),t[a+2]=u.getAltitude(d),z(d,n,d,o),t[a]=d[0],t[a+1]=d[1])}return t})(),m=i.offset,f=e.elevationOffsets,p=(e,t)=>{const i=c?g[3*e+2]:0;f[e]=m+(t??0)-i};r.getElevations(g,_,p)}_ensureElevationTask(){return null!=this._elevationTask||(this._elevationTask=new Se(this.view.resourceController.scheduler,e=>this._controller.updateElevationChanged(e,this.view.basemapTerrain.spatialReference)?.filterInPlace(e=>null!=this._nodeId2Meta.get(e)),e=>this._nodeElevationAlignmentChanged(this._nodeId2Meta.get(e)),()=>this.elevationInfo?.mode)),this._elevationTask}_elevationInfoChanged(e,t){const i=0!==e.mode,s=!!t&&t!==e&&0!==t.mode;this._intersectionHandler.updateElevationAlignState(i,this.view.state.viewingMode),i&&!s&&this._controller.removeAllGeometryObbs(),this._nodeId2Meta.forEach(e=>this._nodeElevationAlignmentChanged(e))}_nodeElevationAlignmentChanged(e){null!=e&&(this._updateElevationOffsets(e),this._updateComponentData(e),this._updateEdgeRendering(e),null!=this._labeler&&this._labeler.updateLabelPositions(e),this._updateSnappingSources(e,2),this._elevationProvider.notifyObjectChanged(this._collection.getComponentObb(e.objectHandle)))}_safeReschedule(e,t){return c(t),this._controller.reschedule(e,t)}_materialParameters(e,t){const i=null!=e.params.material?e.params.material:Ae(),s=t.some(e=>"uvRegion"===e.name),r=t.some(e=>"normalCompressed"===e.name),o=Vt(i);return{geometryParameters:this._getGeometryParameters({hasTexture:o,hasNormals:r,hasRegions:s}),material:i}}_initMaterialAndTextures(e,t,i,s,r){const o=this._stage.renderView,n=e=>{this._gpuMemoryEstimate-=e,this._texMemoryEstimate-=e,r.memory-=e},a=i.map(e=>Te(e,t,s,o,this._compressionTracker,n));this._stage.addTextures(a);let l=null;return this._collection.updateMaterial(e,e=>{l=He(e,t,a,i,this.view.stage.renderView.textures,{rendererTextureUsage:this.rendererTextureUsage,usePBR:this._usePBR,isIntegratedMesh:this._isIntegratedMesh,slicePlaneEnabled:this.slicePlaneEnabled,viewSpatialReference:this.view.spatialReference}),this._updateMaterialOverlay(e)}),{textures:a,texturePromise:l}}_getGeometryParameters(e){return new gt(this._hasVertexColors,e.hasTexture?e.hasRegions?2:1:0,e.hasNormals,this._shadeNormals,this._applySSAO)}_addData(e,t,i){let s=this._addTasks.get(e.index);if(s)s.attributeInfo=t;else{const r=u();s=new Nt(t,null,r.promise),this._addTasks.set(e.index,s),i().then(r.resolve,r.reject).then(()=>this._addTasks.delete(e.index)).catch(t=>{throw this._addTasks.delete(e.index),t})}return s.promise}_clearAddTasks(){this._addTasks.forEach(e=>{null!=e.meta&&(this._cacheGPUData(e.meta),e.meta=null)}),this._addTasks.clear()}_clippingAreaChanged(){const e=this.view.renderSpatialReference,t=this.i3slayer.spatialReference,i=Q();this._renderClippingArea=nt(this.view.clippingArea,i,e)?i:null;const s=Q();this._layerClippingArea=nt(this.view.clippingArea,s,t)?s:null,this._filterChange(),this._controller&&this._controller.updateClippingArea(this.view.clippingArea),this._isIntegratedMesh&&this._modificationsChanged()}get hasGeometryFilter(){return!1}_geometryFilterChange(){const e=this.hasGeometryFilter;this._controller.geometryFilterChanged(e),this._applyFilters(e),this._assertFeatureIdNodeCounts(e)}_assertFeatureIdNodeCounts(e){e&&!this._featureIdCounts?(this._featureIdCounts=Zt(this._nodeId2Meta.values()),this._filteredIdCounts=Zt(this._nodeId2Meta.values(),1),this._weaklyRemovedIdCounts=Zt(this._nodeId2Meta.values(),2),this.addHandles(g(()=>this._controller.updating,e=>{!e&&this._needFilterResolve&&(this.multiGeometryFilterResolve(),this._needFilterResolve=!1,this.notifyUpdate())},{sync:!0}),"updateFinished")):!e&&this._featureIdCounts&&(this._featureIdCounts=null,this._filteredIdCounts=null,this._weaklyRemovedIdCounts=null,this._mismatchShow=null,this._mismatchHide=null,this.removeHandles("updateFinished"),this._needFilterResolve=!1,this.notifyUpdate())}_updateFeatureIdCounts(e,t){this._featureIdCounts&&(this._needFilterResolve=!0,Xt(this._featureIdCounts,e.featureIds,t),Xt(this._filteredIdCounts,e.filteredIds,t),Xt(this._weaklyRemovedIdCounts,e.weaklyRemovedIds,t))}_updateFilteredIdCounts(e,t,i){this._filteredIdCounts&&(this._needFilterResolve=!0,Xt(this._filteredIdCounts,t,-1),Xt(this._filteredIdCounts,e.filteredIds,1),Xt(this._weaklyRemovedIdCounts,i,-1),Xt(this._weaklyRemovedIdCounts,e.weaklyRemovedIds,1))}_checkFeatureIdNodeCountInvariant(){const e=null!=this._featureIdCounts;if(this.hasGeometryFilter!==e&&o.getLogger(this).error("checkFeatureIdNodeCountInvariant()","LayerView should have feature id node counts if and only if it has a geometry filter",{layerView:this,hasNodeCounts:e}),!this._featureIdCounts||!this._filteredIdCounts)return;const t=Zt(this._nodeId2Meta.values());n(this._featureIdCounts,t)||o.getLogger(this).error("checkFeatureIdNodeCountInvariant()","Incorrect _featureIdCounts",{layerView:this,counts:this._featureIdCounts,expected:t});const i=Zt(this._nodeId2Meta.values(),1);n(this._filteredIdCounts,i)||o.getLogger(this).error("checkFeatureIdNodeCountInvariant()","Incorrect _filteredIdCounts",{layerView:this,counts:this._filteredIdCounts,expected:i});const s=Zt(this._nodeId2Meta.values(),2);n(this._weaklyRemovedIdCounts,s)||o.getLogger(this).error("checkFeatureIdNodeCountInvariant()","Incorrect _weaklyRemovedIdCounts",{layerView:this,counts:this._weaklyRemovedIdCounts,expected:i})}multiGeometryFilterResolve(){if(!this._featureIdCounts||!this._filteredIdCounts)return;let e=null,t=null;for(const[i,s]of this._filteredIdCounts){const r=this._featureIdCounts.get(i);if(r!==s){s+(this._weaklyRemovedIdCounts?.get(i)??0)===r?(e??=new Set,e.add(i)):(t??=new Set,t.add(i))}}f(e,this._mismatchShow)&&f(t,this._mismatchHide)||(this._mismatchShow=e,this._mismatchHide=t,this._nodeId2Meta.forEach(e=>{if(!e?.filteredIds)return;const t=Yt(e,this._mismatchShow,this._mismatchHide);this._collection.setAllComponentVisibilities(e.objectHandle,t),this._visibleGeometryChanged(e,2)}))}_filterChange(){this._applyFilters(this.hasGeometryFilter)}_applyFilters(e){this._filters=this.getFilters(),e?this._controller&&this._controller.requestUpdate():this._nodeId2Meta.forEach(e=>{e&&this._applyFiltersToNode(e)&&(this._addOrUpdateEdgeRendering(e),this._visibleGeometryChanged(e,2))})}getFilters(){const e=[],t=this._renderClippingArea;return null!=t&&e.push((e,i)=>this._boundingRectFilter(e,i,t)),e}addSqlFilter(e,t,i){if(null!=t){const s=t.fieldNames;e.push((e,r)=>this._sqlFilter(e,r,t,s,i))}}_sqlFilter(e,t,i,s,r){const o={},n=this._createLayerGraphic(o);if(!n)return;const a=this.i3slayer.objectIdField,l=t.featureIds,d=t.attributeInfo?.attributeData;s.every(e=>e===a||null!=d?.[e])&&qe(e,l,e=>{o[a]=l[e];for(const i of s)i!==a&&(o[i]=d?Ee(d[i],e):null);try{return i.testFeature(n)}catch(t){return r(t),!1}})}_boundingRectNodeTest(e,t){return G(e.node.serviceMbsInIndexSR,this._controller.crsIndex,Ft,this.view.renderSpatialReference),ze(t,Ft)}_boundingRectFeatureTest(e,t,i){return this._collection.getComponentAabb(e.objectHandle,t,St),K(St,Et),J(i,Et)}_boundingRectFilter(e,t,i){const s=this._collection,r=this._boundingRectNodeTest(t,i);if(3===r)return;if(0===r)return void(e.length=0);const o=s.getComponentCount(t.objectHandle);if(o.invisible+o.visible!==t.featureIds.length)return;const n=this._transformClippingArea(Ot,i,t.objectHandle);qe(e,t.featureIds,e=>this._boundingRectFeatureTest(t,e,n))}_transformClippingArea(e,t,i){const s=this._collection.getObjectTransform(i),r=s.position,o=s.rotationScale;return e[0]=(t[0]-r[0])/o[0],e[1]=(t[1]-r[1])/o[4],e[2]=(t[2]-r[0])/o[0],e[3]=(t[3]-r[1])/o[4],e}async _addOrUpdateEdgeRendering(e,t=!0){const i=e.objectHandle,{hasEdges:s,perFeatureEdgeMaterials:r}=this._getFilteredEdgeMaterials(e);s&&!this._edgeView&&(this._edgeView=await this._stage.renderer.loadEdgeView());const o=this._edgeView;if(!o)return null;const n=o.hasObject(i);if(s){if(n){if(this.nodeCrossfadingEnabled){Pt(r,this.getNodeOpacity(e))}return o.updateAllComponentMaterials(i,r,this.slicePlaneEnabled,t).catch(e=>this._logEdgeViewError(e,this.i3slayer.title)),o.updateObjectVisibility(i,!0).catch(e=>this._logEdgeViewError(e,this.i3slayer.title)),o.updateAllVerticalOffsets(i,e.elevationOffsets).catch(e=>this._logEdgeViewError(e,this.i3slayer.title)),o}const s=await this._collection.addEdges(i,o,r,this.slicePlaneEnabled,e.elevationOffsets);return e.edgeMemoryUsage=s,e.node.memory+=s,o}return n&&(e.node.memory-=e.edgeMemoryUsage,e.edgeMemoryUsage=0,o.removeObject(i)),null}_applyFiltersToNode(e){const{filteredIds:t,weaklyRemovedIds:i}=e,s=this._applyFiltersToNodeComponents(e);return this._updateFilteredIdCounts(e,t,i),s&&this._labeler?.applyFilterChange(e),s}_applyFiltersToNodeComponents(e){const t=this._collection,i=t.getComponentCount(e.objectHandle),s=null!=e.filteredIds,r=0===i.invisible;if(t.setAllComponentVisibilities(e.objectHandle,"all"),0===this._filters.length)return e.filteredIds=null,!r;if(null!=e.filteredIds&&e.appliedFilters===this._filters||(e.weaklyRemovedIds=null,e.filteredIds=Jt(e,this._filters),e.appliedFilters=this._filters),s&&e.filteredIds===e.featureIds&&(!this._mismatchHide||e.filteredIds.every(e=>!this._mismatchHide?.has(e))))return!r;const o=Yt(e,this._mismatchShow,this._mismatchHide);return t.setAllComponentVisibilities(e.objectHandle,o),!0}_removeAllNodeDataFromStage(e=this.elevationOffset){this._nodeId2Meta.forEach((t,i)=>this._removeNodeStageData(i,e)),this._nodeId2MetaReloading.forEach((t,i)=>this._removeNodeStageData(i,e,this._nodeId2MetaReloading)),this._elevationTask=a(this._elevationTask)}removeNode(e){const t=this.elevationOffset;this._removeNodeStageData(e,t),this._removeNodeStageData(e,t,this._nodeId2MetaReloading),null!=this._elevationTask&&this._elevationTask.remove(e)}_removeNodeStageData(e,t,i=this._nodeId2Meta){i.has(e)&&this._controller.updateLoadStatus(e,!1);const s=i.get(e);null!=s?(this._collection.setObjectVisibility(s.objectHandle,!1),null!=this._edgeView&&this._edgeView.hasObject(s.objectHandle)&&this._edgeView.updateObjectVisibility(s.objectHandle,!1).catch(e=>this._logEdgeViewError(e,this.i3slayer.title)),this._visibleGeometryChanged(s,1),null!=this._labeler&&this._labeler.removeNodeMeta(s),i.delete(e),this._highlights?.objectDeleted(s),i===this._nodeId2Meta?(this._updateFeatureIdCounts(s,-1),this._cacheGPUData(s,t),this.nodeCrossfadingEnabled&&this._crossfadeHelper.stopNodeFading(s)):this._deleteComponentObject(s),null!=this._treeDebugger&&this._treeDebugger.update()):i.delete(e)}_deleteComponentObject(e){if(null!=this._edgeView&&this._edgeView.removeObject(e.objectHandle),this._memEstimateGeometryRemoved(e.objectHandle),this._collection.destroyObject(e.objectHandle),e.textures)for(const t of e.textures)this._memEstimateTextureRemoved(t),this._stage.removeTexture(t)}updateNodeState(e,t){const i=this._nodeId2Meta.get(e);null!=i&&this._collection.updateMaterial(i.objectHandle,e=>e.polygonOffsetEnabled=0===t)}updateNodeIndex(e,t){if(this._nodeId2Meta.has(e)){const i=this._nodeId2Meta.get(e);this._nodeId2Meta.delete(e),this._nodeId2Meta.set(t,i),this.notifyChange("elevationRange")}const i=this._nodeId2MetaReloading.get(e);i&&(this._nodeId2MetaReloading.delete(e),this._nodeId2MetaReloading.set(t,i))}_invalidateAllSymbols(){this._rendererVersion=We(this._rendererVersion,1),this._controller?.requestUpdate()}_getInvalidRendererVersion(){return We(this._rendererVersion,-1)}async _rendererChange(e){if(this._currentRenderer=e,this.notifyChange("rendererTextureUsage"),this._rendererVersion=We(this._rendererVersion,1),this._rendererFields=null,this._colorVariable=null,this._opacityVariable=null,this._invalidateAllSymbols(),e&&(this._rendererFields=await e.getRequiredFields(this.i3slayer.fieldsIndex)),this._updateSymbologyFields(),!this._arcade&&e&&"arcadeRequired"in e&&e.arcadeRequired&&(this._arcade=await ce()),e&&"visualVariables"in e&&e.visualVariables)for(const t of e.visualVariables)"color"===t.type?this._colorVariable=t:"opacity"===t.type?this._opacityVariable=t:o.getLogger(this).warn(`Unsupported visual variable type for 3D Object Scene Services: ${t.type}`);if(e)for(const t of e.symbols)"mesh-3d"!==t.type&&o.getLogger(this).error(`Symbols of type '${t.type}' are not supported for 3D Object Scene Services.`);this._controller&&this._controller.requestUpdate()}_getCachedEdgeMaterials(e){return this._hasComponentData&&e.cachedRendererVersion!==this._rendererVersion&&this._updateCachedRendererData(e),e.cachedEdgeMaterials}_getComponentParameters(e){this._hasComponentData&&e.cachedRendererVersion!==this._rendererVersion&&this._updateCachedRendererData(e);const t=e.cachedSymbology;return(i,s)=>{const r=i*e.cachedSymbologyStride;N(s.externalColor,t[r]/255,t[r+1]/255,t[r+2]/255,t[r+3]/255);const o=this._stage.renderView.olidRenderHelper;if(o){const t=e.featureIds[i],r=this.sublayerId?`${this.layerViewUid}_${this.sublayerId}`:this.layerViewUid,n=de(this.view,this.uid);o.setUidToObjectAndLayerId(t,t,this.layerId,r,this.layerPopupEnabledAndHasTemplate&&!n,e.node.resources.attributes,i,this.sublayerId),s.olidColor=o.getObjectAndLayerIdColor({graphicUid:t,layerViewUid:r})}s.externalColorMixMode=15&t[r+4],s.castShadows=!!(16&t[r+4]),s.pickable=!!(32&t[r+4]),s.elevationOffset=e.elevationOffsets?.[i]??0,s.emissiveStrength=e.emissiveStrengths?.[i]??1,s.emissiveSource=e.emissiveSources?.[i]??0}}_getSymbolInfo(e,t){const i=e?.getSymbol(t,{arcade:this._arcade});if(!(i instanceof ue))return null;const s=i.id;if(this._symbolInfos.has(s))return this._symbolInfos.get(s);const r=$e(i);return this._symbolInfos.set(s,r),r}_setSymbologyOverride(e,t){this._symbologyOverride!==e&&(this._symbologyOverride=e,this._symbologyOverrideFields=t,this._invalidateAllSymbols(),this._updateSymbologyFields())}_updateSymbologyFields(){this._symbologyFields=null!=this._symbologyOverrideFields&&this._symbologyOverrideFields.length>0?null!=this._rendererFields&&this._rendererFields.length>0?oe(this.i3slayer.fieldsIndex,[...this._rendererFields,...this._symbologyOverrideFields]):this._symbologyOverrideFields:this._rendererFields}_updateCachedRendererData(e){if(e.cachedRendererVersion=this._rendererVersion,!this._hasComponentData)return;const t=this._tmpAttributeOnlyGraphic,i={};t.attributes=i;const s=this._currentRenderer,r=e.attributeInfo?.attributeData,o=e.featureIds?this.i3slayer.objectIdField:null,n=null!=r&&null!=this._symbologyFields&&this._symbologyFields.length>0;let a=null,l=null;if(n&&null!=this._symbologyFields){a=[],l=[];for(const e of this._symbologyFields){const t=r[e];t&&(a.push(e),l.push(t))}}e.cachedSymbology||(e.cachedSymbology=ie(e.featureIds.length*e.cachedSymbologyStride));const d=new Ze,h=this.fullOpacity,c=this.nodeCrossfadingEnabled?this.getNodeOpacity(e):h;let u=null,_=1,g=Ke,m=0;for(let f=0;f<e.featureIds.length;f++){if(null!=o&&(i[o]=e.featureIds[f]),n&&a)for(let e=0;e<a.length;e++)i[a[e]]=Ee(l[e],f);const r=s?this._getSymbolInfo(s,t):null;let h,p;if(d.pickable=!0,s&&"visualVariables"in s){if(this._colorVariable){const e=ae(this._colorVariable,t,{color:jt,arcade:this._arcade});e&&(h=d.color,h[0]=e.r/255,h[1]=e.g/255,h[2]=e.b/255,h[3]=e.a??1,this._opacityVariable||null===e.a||(p=e.a))}this._opacityVariable&&(p=le(this._opacityVariable,t,{arcade:this._arcade}))}if(r?.material){const e=r.material;h=null==h||null==p?Me(h,p,e.color,e.alpha,It,d.color):Me(h,p,null,null,It,d.color)}h??=N(d.color,1,1,1,1);const y=r?.material;if(d.colorMixMode=y?.colorMixMode??1,d.edgeMaterial=r?.edgeMaterial,this._symbologyOverride?.(t,d),null!=this._nodeColorOverride&&(this._nodeColorOverride(e.node,h),d.colorMixMode=3),d.pickable&&=h[3]>=vt,d.castShadows=r?r.castShadows:d.pickable,null!=d.edgeMaterial){const t=h[3]>=1&&(e.material.isOpaque||3===d.colorMixMode)?1:0;d.edgeMaterial===u&&t===_||(g={...d.edgeMaterial,opacity:c,objectTransparency:t},u=d.edgeMaterial,_=t),e.cachedEdgeMaterials[f]=g}else e.cachedEdgeMaterials[f]=Ke;e.cachedSymbology[m++]=Math.round(255*h[0]),e.cachedSymbology[m++]=Math.round(255*h[1]),e.cachedSymbology[m++]=Math.round(255*h[2]),e.cachedSymbology[m++]=Math.round(255*h[3]),e.cachedSymbology[m++]=d.colorMixMode|+d.castShadows<<4|+d.pickable<<5;const b=y?.emissive?.strength??ft;b===ft||e.emissiveStrengths||(e.emissiveStrengths=new Array(e.featureIds.length).fill(ft)),e.emissiveStrengths&&(e.emissiveStrengths[f]=b);const v=y?.emissive?.source||0;0===v||e.emissiveSources||(e.emissiveSources=new Array(e.featureIds.length).fill(0)),e.emissiveSources&&(e.emissiveSources[f]=v)}}_getFilteredEdgeMaterials(e){const t=this._getCachedEdgeMaterials(e);this.nodeCrossfadingEnabled||Pt(t,this.fullOpacity);const i=e.filteredIds;if(null==i){return{hasEdges:t.some(e=>e!==Ke),perFeatureEdgeMaterials:t}}let s=0,r=!1;const o=t.map((t,o)=>e.featureIds[o]!==i[s]?Ke:(r=r||t!==Ke,s++,t));return{hasEdges:r,perFeatureEdgeMaterials:o}}_updateComponentData(e){if(!this._hasComponentData)return;const t=e.objectHandle,i=this._getComponentParameters(e);this._collection.setComponentData(t,i),this._stage.renderView.requestRender()}_reloadAll(e=this.elevationOffset){this._removeAllNodeDataFromStage(e),null!=this._controller&&this._controller.restartNodeLoading()}_opacityChange(e){this.nodeCrossfadingEnabled&&this._crossfadeHelper.stopAllNodeFading(),this._nodeId2Meta.forEach(t=>{null!=t&&(this._collection.updateMaterial(t.objectHandle,t=>t.objectOpacity=e),Pt(t.cachedEdgeMaterials,e),this._updateEdgeRendering(t))})}_updateMaterial(e){this._collection.updateMaterial(e.objectHandle,e=>{e.commonMaterialParameters.hasSlicePlane=this.slicePlaneEnabled,e.usePBR=this._usePBR,this._updateMaterialOverlay(e)})}_updateMaterialOverlay(e){}_updateEngineObject(e){this._updateComponentData(e),this._applyFiltersToNode(e),this._addOrUpdateEdgeRendering(e),this._visibleGeometryChanged(e,2)}intersect(e,t,i,s){this._intersectionHandler.intersect(e,t,i,s,null,!1)}_slicePlaneEnabledChange(e){this._intersectionHandler&&(this._intersectionHandler.slicePlaneEnabled=e),null!=this._labeler&&(this._labeler.slicePlaneEnabled=e),this._nodeId2Meta.forEach(t=>{null!=t&&(this._collection.updateMaterial(t.objectHandle,t=>t.commonMaterialParameters.hasSlicePlane=e),this._updateEdgeRendering(t,!1))})}_updatePBR(e){this._nodeId2Meta.forEach(t=>{null!=t&&this._collection.updateMaterial(t.objectHandle,t=>t.usePBR=e)}),this._hasLoadedPBRTextures=!0}get _usePBR(){return this._shadeNormals&&this.view.qualitySettings.physicallyBasedRenderingEnabled}_updateEdgeRendering(e,t=!0){null!=this._edgeView&&this._edgeView.hasObject(e.objectHandle)&&this._addOrUpdateEdgeRendering(e,t)}_forAllNodes(e){this._nodeId2Meta.forEach(e)}_ignoreClientNodeOverriddenFeatures(e){return this.i3sOverrides.hasGeometryChanges?(t,i,s)=>s.node.index>=0&&this.i3sOverrides.featureHasGeometryChanges(t)?0:e(t,i,s):e}_forAllFeatures(e,t,i){for(const s of this._nodeId2Meta.values())if(!(null==s||t&&s.node.serviceMbsInIndexSR&&1===t(s.node.serviceMbsInIndexSR)))switch(i){case 1:this._forAllFeaturesOfNode(s,e);break;case 0:this._forAllVisibleFeaturesOfNode(s,e);break;case 2:this._forAllQueryableFeaturesOfNode(s,e)}}_forAllFeaturesOfNode(e,t){e.featureIds.forEach((i,s)=>t(i,s,e))}_forAllVisibleFeaturesOfNode(e,t){const i=e.featureIds;this._collection.forEachVisibleComponent(e.objectHandle,s=>0===t(i[s],s,e))}_forAllQueryableFeaturesOfNode(e,t){const i=this._ignoreClientNodeOverriddenFeatures(t);if(null==this._renderClippingArea)return this._forAllFeaturesOfNode(e,i);const s=this._boundingRectNodeTest(e,this._renderClippingArea);if(0===s)return;if(3===s)return this._forAllFeaturesOfNode(e,i);const r=e.featureIds,o=e.objectHandle,n=Qe(this._renderClippingArea,this._collection.getObjectTransform(o));for(let a=0;a<r.length;a++)this._boundingRectFeatureTest(e,a,n)&&i(r[a],a,e)}_createAttributes(e,t){const i={};null!=t.featureIds&&(i[this._getObjectIdField()]=t.featureIds[e]);const s=t.attributeInfo?.attributeData;if(null!=s)for(const r of Object.keys(s))i[r]=Ee(s[r],e);return i}_createGraphic(e,t){return this._createLayerGraphic(this._createAttributes(e,t))}highlight(e,t){const s=tt(e);if(0===s.length)return it;const r=yt(t),o=s[0]instanceof i?this._featureIdsFromGraphics(s):"number"==typeof s[0]?s:null;if(!o)return it;const n=this._ensureHighlights(),{set:a,handle:l}=n.acquireSet(r);return n.setFeatureIds(a,o),l}_featureIdsFromGraphics(e){const t=this.i3slayer.fieldsIndex,i=this._getObjectIdField();return e.map(e=>et(t,e.attributes,i))}_ensureHighlights(){return this._highlights??=new xe({collection:this._collection,forAllFeatures:e=>this._forAllFeatures(e,null,1),forAllFeaturesOfNode:(e,t)=>this._forAllFeaturesOfNode(e,t)}),this._highlights}resetHighlights(){this._highlights=a(this._highlights)}_visibleGeometryChanged(e,t){this._elevationProvider&&(null==this._visibleGeometryChangedSchedulerHandle&&(this._visibleGeometryChangedSchedulerHandle=m(()=>{const{node:t}=e,i=t.visibilityObbInRenderSR??t.geometryObbInRenderSR??t.serviceObbInRenderSR;if(null!=i){const e=$();i.toAaBoundingBox(e),this.emit("visible-geometry-changed",new ge(e))}else this.emit("visible-geometry-changed");this._visibleGeometryChangedSchedulerHandle=null})),this._updateSnappingSources(e,t),this._elevationProvider.notifyObjectChanged(this._collection.getComponentObb(e.objectHandle)))}get performanceInfo(){return new fe(this.usedMemory,this._nodeId2Meta.size,Math.round(this._gpuMemoryEstimate/1048576),Math.round(this._geoMemoryEstimate/1048576),Math.round(this._texMemoryEstimate/1048576),Math.round(this.unloadedMemory/1048576),this._idbCacheEnabled?Math.round(100*this._idbCache.getHitRate()):0)}checkInvariants(){}get test(){}getNodeOpacityByIndex(e){const t=this._nodeId2Meta.get(e);return this.getNodeOpacity(t)}getNodeOpacity(e){return null!=e?this._collection.getMaterial(e.objectHandle).objectOpacity:0}isNodeFullyFadedIn(e){return this._crossfadeHelper.isNodeFullyFadedIn(e)}getNodeCrossfadeMetaData(e){return this._nodeId2Meta.get(e)}getNodeComponentHandle(e){return this._nodeId2Meta.get(e)?.objectHandle}markNodeToRemove(e){this._controller&&this._controller.markNodeToRemove(e)}removeMarkedNodes(){this._controller&&this._controller.removeMarkedNodes()}foreachCrossfadeNode(e){this._nodeId2Meta.forEach(e)}fadeNode(e,t,i){if(!this.nodeCrossfadingEnabled)return;const s=this._nodeId2Meta.get(e);null!=s&&this._crossfadeHelper.fadeNode(e,s,t,i)}setNodeOpacityByIndex(e,t){const i=this._nodeId2Meta.get(e);null!=i&&this._setNodeOpacity(i,t)}_setNodeOpacity(e,t){this._collection.updateMaterial(e.objectHandle,e=>e.objectOpacity=t),this._setNodeEdgeOpacity(e,t)}_setNodeEdgeOpacity(e,t){if(null==this._edgeView||!e.cachedEdgeMaterials)return;Pt(e.cachedEdgeMaterials,t);const i=e.objectHandle;this._edgeView.hasObject(i)&&this._edgeView.updateAllComponentOpacities(i,t).catch(e=>this._logEdgeViewError(e,this.i3slayer.title))}get hasModifications(){return this._isIntegratedMesh&&null!=this._layerClippingArea||this._modifications&&this._modifications.length>0}updateNodeModificationStatus(e){const t=e.length;if(!this.hasModifications||t<=0||!0!==this._i3sWasmLoaded)return;const i=this.uid,s=Ht(e);if(s){const t={context:i,buffer:s.buffer};Ie(t);const r=new Float64Array(s.buffer);e.forAll((e,t)=>{const i=r[t],s=Ce(i);e.imModificationImpact=s,0!==s&&this._controller.invalidateGeometryVisibility(e.index)})}}notifyUpdate(){this.notifyChange("updating")}notifyLODUpdate(){this._controller.notifyLODUpdate()}isUpdating(){return!(!this._controller||!this._controller.updating)||!!this._visibleGeometryChangedSchedulerHandle||null!=this._labeler&&this._labeler.updating||this._crossfadeHelper?.updating||this._i3sWasmLoaded instanceof Promise||this._asyncModuleLoading>0||null!=this._elevationTask&&this._elevationTask.readyToRun||this._needFilterResolve||this._compressionTracker.compressing}trackSnappingSources(e){const t={events:e,fetchEdgeLocations:async(e,t,i)=>{const s=this._nodeId2Meta.get(e);if(null==s)throw new Error("invalid-node");const{origin:r,buffer:o}=await this._collection.extractEdgeInformation(s.objectHandle,t,i);return this._snappingLocationsApplyElevation(s,o,r),{type:"components",objectIds:s.featureIds,locations:o,origin:r}},remove:()=>s(this._snappingSourcesTrackers,t)};return this._snappingSourcesTrackers.push(t),this._nodeId2Meta.forEach((t,i)=>{if(null==t)return;const s=this._controller.getRenderMbs(t.node);s&&e.add(i,s)}),t}_snappingLocationsApplyElevation(e,t,i){if(!e.elevationOffsets||0===this.elevationInfo.mode)return;const s=t.position0,r=t.position1,o=t.componentIndex,n=H(),a=H(),l=(e,t)=>{V(e,e,i),this.view.renderCoordsHelper.worldUpAtPosition(e,a),V(e,e,D(a,a,t)),A(e,e,i)};for(let d=0;d<s.count;d++){const t=e.elevationOffsets[o.get(d)];s.getVec(d,n),l(n,t),s.setVec(d,n),r.getVec(d,n),l(n,t),r.setVec(d,n)}}_updateSnappingSources(e,t){const{index:i}=e.node,s=this._controller.getRenderMbs(e.node);if(null!=s)for(const r of this._snappingSourcesTrackers)1!==t&&2!==t||r.events.remove(i),0!==t&&2!==t||r.events.add(i,s)}_logEdgeViewError(e,t){h(e)||o.getLogger(this).warn("Error while processing edges. Edges on this layer might not display correctly",t,e)}_indexedDbSizeCheck(e,t){return t.byteSize>wt?(o.getLogger(this).warn(`Node is too big to store in IndexedDB cache: ${e.id} (${t.byteSize} bytes)`),!1):t.byteSize>0}get elevationProvider(){return this._elevationProvider}};return e([y()],T.prototype,"_hasLoadedPBRTextures",void 0),e([y()],T.prototype,"_asyncModuleLoading",void 0),e([y()],T.prototype,"_visibleGeometryChangedSchedulerHandle",void 0),e([y()],T.prototype,"view",void 0),e([y()],T.prototype,"i3slayer",void 0),e([y()],T.prototype,"_controller",void 0),e([y()],T.prototype,"_labeler",void 0),e([y()],T.prototype,"updating",void 0),e([y()],T.prototype,"suspended",void 0),e([y()],T.prototype,"contentVisible",null),e([y({readOnly:!0})],T.prototype,"legendEnabled",null),e([y(dt)],T.prototype,"updatingProgress",void 0),e([y()],T.prototype,"updatingProgressValue",null),e([y()],T.prototype,"hasTexturesOrVertexColors",null),e([y()],T.prototype,"rendererTextureUsage",null),e([y()],T.prototype,"elevationOffset",null),e([y()],T.prototype,"elevationInfo",null),e([y({type:Boolean})],T.prototype,"slicePlaneEnabled",void 0),e([y()],T.prototype,"supportedTextureEncodings",null),e([y({type:[ne]})],T.prototype,"_modifications",void 0),e([y({readOnly:!0})],T.prototype,"clientGeometry",null),e([y()],T.prototype,"elevationRange",null),e([y()],T.prototype,"fullExtent",null),e([y()],T.prototype,"_elevationTask",void 0),e([y({readOnly:!0})],T.prototype,"_usePBR",null),T=e([b("esri.views.3d.layers.I3SMeshView3D")],T),T},St=$(),Et=Q(),Ot=Q(),Rt=new at,jt=new t([0,0,0,0]),Ft=new te(0,0,0,0);function Vt(e){if(null==e)return!1;const t=e.metallicRoughness;return t&&t.baseColorTextureId>=0||t&&t.metallicRoughnessTextureId>=0||e.normalTextureId>=0||e.emissiveTextureId>=0||e.occlusionTextureId>=0}function Dt(e){return"geometryData"in e}function At(e){return null!=e&&p(e.data)}function Tt(e,t){let i=1024+e.interleavedVertexData.byteLength+(e.indices?e.indices.byteLength:0)+e.positionData.data.byteLength+e.positionData.indices.byteLength;if(null!=t)for(const s of t)null!=s&&p(s.data)&&(i+=s.data.byteLength);return i}function Ht(e){if(0===e.length)return;const t=10*e.length,i=new Float64Array(t);let s=0;return e.forAll(e=>{let t=e.serviceObbInIndexSR;null==t&&(t=Rt,e.serviceMbsInIndexSR?(t.center=e.serviceMbsInIndexSR.center,t.halfSize=[e.serviceMbsInIndexSR.radius,e.serviceMbsInIndexSR.radius,e.serviceMbsInIndexSR.radius]):t.invalidate());const r=t.data;i[s++]=r[0],i[s++]=r[1],i[s++]=r[2],i[s++]=r[3],i[s++]=r[4],i[s++]=r[5],i[s++]=r[6],i[s++]=r[7],i[s++]=r[8],i[s++]=r[9]}),i}class Nt{constructor(e,t,i){this.attributeInfo=e,this.meta=t,this.promise=i,this.allowMemCache=!0}}function Pt(e,t){e.forEach(e=>e.opacity=t)}class kt{constructor(e,t){this.mode=e,this.offset=t}}const Ut=H(),Lt=$(),Gt="elevation-change",Bt="",qt="@null",zt="@ECEF",Wt=[[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]],$t=new ot;function Kt(e,t,i){let s=e.minElevation,r=e.maxElevation;const o=i;if(o>0){t.getCorners(Wt);for(const e of Wt){const t=T(e)-o;s=Math.min(s,t),r=Math.max(r,t)}}else{t.getCorners(Wt);for(const e of Wt){const t=e[2];s=Math.min(s,t),r=Math.max(r,t)}}e.expandElevationRangeValues(s,r)}function Qt(e,t,i){const{center:s,radius:r}=t,o=i>0?T(s)-i:s[2];e.expandElevationRangeValues(o-r,o+r)}function Jt(e,t){const i=e.featureIds.slice();for(const s of t)if(s(i,e),0===i.length)break;return i.length===e.featureIds.length?e.featureIds:i}function Yt(e,t,i){const s=new Array,r=e.filteredIds;if(null==r||t?.size||i?.size){if(null!=r){let o=0;e.featureIds.forEach((e,n)=>{if(r[o]===e)++o;else if(!t?.has(e))return;i?.has(e)||s.push(n)})}}else e.featureIds.forEach((e,t)=>{r[s.length]===e&&s.push(t)});return s}function Xt(e,t,i){if(e&&t)for(const s of t){const t=(e.get(s)??0)+i;t>0?e.set(s,t):e.delete(s)}}function Zt(e,t=0){const i=new Map;for(const s of e){Xt(i,0===t?s?.featureIds:1===t?s?.filteredIds:s?.weaklyRemovedIds,1)}return i}export{xt as I3SMeshView3D};
5
+ import{__decorate as e}from"tslib";import t from"../../../Color.js";import i from"../../../Graphic.js";import{removeUnordered as s,isSome as r}from"../../../core/arrayUtils.js";import has from"../../../core/has.js";import o from"../../../core/Logger.js";import{equals as n}from"../../../core/MapUtils.js";import{destroyMaybe as a}from"../../../core/maybe.js";import l from"../../../core/PooledArray.js";import{ignoreAbortErrors as d,isAbortError as h,throwIfAborted as c,createResolver as u}from"../../../core/promiseUtils.js";import{initial as _,watch as g}from"../../../core/reactiveUtils.js";import{schedule as m}from"../../../core/scheduling.js";import{equals as f}from"../../../core/SetUtils.js";import{isArrayBuffer as p}from"../../../core/typedArrayUtil.js";import{property as y,subclass as b}from"../../../core/accessorSupport/decorators.js";import{fromMat4 as v,invert as I}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{create as C}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{multiply as M,getTranslation as w}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{clone as x,create as S}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{fromValues as E}from"../../../core/libs/gl-matrix-2/factories/quatf64.js";import{h as O,p as R,t as j,a as F,i as V,j as D,e as A,u as T}from"../../../chunks/vec32.js";import{create as H}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{c as N}from"../../../chunks/vec42.js";import{fromValues as P}from"../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{UpdatingHandles as k}from"../../../core/support/UpdatingHandles.js";import{getSphericalPCPF as L}from"../../../geometry/spatialReferenceEllipsoidUtils.js";import{localLinearScaleFactors as U}from"../../../geometry/projection/localLinearScaleFactors.js";import{projectBoundingSphere as G}from"../../../geometry/projection/projectBoundingSphere.js";import{projectBuffer as B}from"../../../geometry/projection/projectBuffer.js";import{getProjectorName as q}from"../../../geometry/projection/projectors.js";import{projectVectorToVector as z}from"../../../geometry/projection/projectVectorToVector.js";import{fromBuffer as W,create as $,toRect as K}from"../../../geometry/support/aaBoundingBox.js";import{create as Q,intersects as J}from"../../../geometry/support/aaBoundingRect.js";import{newDoubleArray as Y,ensurePackedMat4f64 as X}from"../../../geometry/support/DoubleArray.js";import{compactFloatArray as Z}from"../../../geometry/support/FloatArray.js";import{compactIndices as ee}from"../../../geometry/support/Indices.js";import{Sphere as te}from"../../../geometry/support/sphere.js";import{newUByteArray as ie}from"../../../geometry/support/UByteArray.js";import{fallbackObjectIDAttribute as se}from"../../../layers/LayerConstants.js";import re from"../../../layers/graphics/controllers/I3SOnDemandController.js";import{fixFields as oe}from"../../../layers/support/fieldUtils.js";import ne from"../../../layers/support/SceneModification.js";import{getColor as ae,getOpacity as le}from"../../../renderers/visualVariables/support/visualVariableUtils.js";import{isBasemapLayerView as de}from"../../../support/basemapUtils.js";import{getElevationOffset as he}from"../../../support/elevationInfoUtils.js";import{loadArcade as ce}from"../../../support/loadArcade.js";import ue from"../../../symbols/MeshSymbol3D.js";import _e from"../../../symbols/SimpleFillSymbol.js";import{ContentGeometryUpdateEvent as ge}from"./ContentGeometryLayerView.js";import me from"./I3SMeshViewLabeler.js";import{I3SMeshViewPerformanceInfo as fe}from"./I3SMeshViewPerformanceInfo.js";import{initialize as pe,setModificationsSync as ye,filterObbsForModificationsSync as be,interpretObbModificationResults as ve}from"./SceneLayerWorker.js";import{SceneLayerWorkerHandle as Ie,toWasmModification as Ce}from"./SceneLayerWorkerHandle.js";import{overrideColor as Me}from"./graphics/graphicUtils.js";import{areLabelsVisible as we}from"./graphics/Labeler.js";import xe from"./i3s/Highlights.js";import{I3SAsyncElevationUpdater as Se}from"./i3s/I3SAsyncElevationUpdater.js";import{getCachedAttributeValue as Ee}from"./i3s/I3SBinaryReader.js";import{I3SCrossfadeHelper as Oe,NodeCrossfadeMetaData as Re}from"./i3s/I3SCrossfadeHelper.js";import{boundingBoxCornerPoints as je}from"./i3s/I3SGeometryUtil.js";import{I3SIntersectionHandler as Fe}from"./i3s/I3SIntersectionHandler.js";import{getSupportedEncodings as Ve,selectEncoding as De,defaultMaterial as Ae,createTexture as Te,configureMaterial as He}from"./i3s/I3SMaterialUtil.js";import{I3SOverrides as Ne}from"./i3s/I3SOverrides.js";import{computeGlobalTransformation as Pe}from"./i3s/I3SProjectionUtil.js";import{rendererNeedsTextures as ke,checkSceneLayerValid as Le,checkSceneLayerCompatibleWithView as Ue,whenGraphicAttributes as Ge,computeVisibilityObb as Be,filterInPlace as qe,intersectBoundingRectWithMbs as ze,addWraparound as We,getSymbolInfo as $e,transparentEdgeMaterial as Ke,getClipRect as Qe}from"./i3s/I3SUtil.js";import{IDBCache as Je}from"./i3s/IDBCache.js";import{IDBMockCache as Ye}from"./i3s/IDBMockCache.js";import{LayerElevationProvider as Xe}from"./i3s/LayerElevationProvider.js";import{SymbologyInfo as Ze}from"./i3s/SymbologyInfo.js";import{attributeLookup as et}from"./support/attributeUtils.js";import{normalizeHighlightTarget as tt,emptyHighlightHandle as it}from"./support/highlightUtils.js";import{makeScheduleFunction as st}from"./support/makeScheduleFunction.js";import{debugFlags as rt}from"../support/debugFlags.js";import{ElevationRange as ot}from"../support/ElevationRange.js";import{toBoundingRect as nt}from"../support/extentUtils.js";import{Obb as at,ensurePackedObbData as lt}from"../support/orientedBoundingBox.js";import{updatingProgress as dt}from"../support/updatingProperties.js";import{glLayout as ht}from"../support/buffer/glUtil.js";import{ObjectParameters as ct}from"../webgl-engine/collections/Component/ObjectParameters.js";import{createVertexBufferLayout as ut,SourceParameters as _t,SourceGeometry as gt,GeometryParameters as mt}from"../webgl-engine/collections/Component/SourceGeometry.js";import{Transform as ft}from"../webgl-engine/collections/Component/Transform.js";import{emissiveStrengthDefault as pt}from"../webgl-engine/core/shaderLibrary/output/Emissions.glsl.js";import{loadBasisTranscoder as yt}from"../webgl-engine/lib/BasisUtil.js";import{getHighlightName as bt}from"../../support/highlightOptionsUtils.js";import{TextureCompressionTracker as vt}from"../../support/TextureCompressionTracker.js";import{alphaCutoff as It}from"../../../webscene/support/AlphaCutoff.js";const Ct=[1,1,1,1];class Mt extends Re{constructor(e,t,i,s,r,o,n,a,l){super(),this.node=e,this.featureIds=t,this.objectHandle=i,this.cachedRendererVersion=s,this.attributeInfo=r,this.material=o,this.textures=n,this.anchorIds=a,this.anchors=l,this.cachedElevationAnchors=null,this.cachedEdgeMaterials=new Array,this.edgeMemoryUsage=0,this.cachedSymbologyStride=5}get usedMemory(){return this.node.memory}get featureExtents(){return this._featureExtents??=new Float64Array(6*this.featureIds.length).fill(Number.POSITIVE_INFINITY),this._featureExtents}}const wt=26,xt=104857600,St=t=>{const p=t;let T=class extends p{constructor(){super(...arguments),this._applySSAO=!0,this._shadeNormals=!0,this._updatingHandles=new k,this._highlights=null,this._nodeId2Meta=new Map,this._nodeId2MetaReloading=new Map,this._i3sWasmLoaded=!1,this._snappingSourcesTrackers=[],this._compressionTracker=new vt,this._hasLoadedPBRTextures=!1,this._asyncModuleLoading=0,this._addTasks=new Map,this._currentRenderer=null,this._rendererVersion=0,this._colorVariable=null,this._opacityVariable=null,this._rendererFields=null,this._symbologyFields=null,this._symbologyOverride=null,this._symbologyOverrideFields=null,this._symbolInfos=new Map,this._visibleGeometryChangedSchedulerHandle=null,this._hasComponentData=!1,this._hasVertexColors=!1,this._nodeColorOverride=null,this.updating=!0,this.holeFilling="auto",this._hasColors=!1,this._hasTextures=!1,this._hasData=!1,this.slicePlaneEnabled=!1,this._modifications=new Array,this.ignoresMemoryFactor=!1,this._layerUrl="",this._cacheKeySuffix=null,this._planetRadiusInGlobalMode=0,this._elevationTask=null,this._needFilterResolve=!1,this._filters=[],this._arcade=null,this._tmpAttributeOnlyGraphic=new i,this._crossfadeHelper=new Oe(this)}get lodCrossfadeoutDuration(){return 0}get lodCrossfadeinDuration(){return 0}get lodCrossfadeUncoveredDuration(){return 0}get layerViewUid(){return this.uid}get layerId(){return this.i3slayer.id}get sublayerId(){return null}get _isIntegratedMesh(){return"integrated-mesh"===this.i3slayer.type}get contentVisible(){return!this.suspended&&this._controller?.rootNodeVisible&&this.fullOpacity>It}get legendEnabled(){return this.contentVisible&&!0===this.i3slayer?.legendEnabled}get updatingProgressValue(){return this._controller?.updatingProgress??0}get hasTexturesOrVertexColors(){return this._hasData?this._hasTextures||this._hasColors?"yes":"probably-not":"unknown"}get rendererTextureUsage(){return ke(this._currentRenderer)?this._usePBR||this._hasLoadedPBRTextures?63:37:this._usePBR||this._hasLoadedPBRTextures?44:36}get elevationOffset(){const e=null!=this.i3slayer?this.i3slayer.elevationInfo:null;return null!=e&&"absolute-height"===e.mode?he(e,this.i3slayer.spatialReference):0}get elevationInfo(){const e=null!=this.i3slayer?this.i3slayer.elevationInfo:null;if(null==e)return new Lt(0,0);const t=he(e,this.i3slayer.spatialReference);switch(e.mode){case"absolute-height":return new Lt(0,t);case"relative-to-ground":return new Lt(1,t);case"on-the-ground":return new Lt(2,0);default:return new Lt(0,0)}}get supportedTextureEncodings(){return Ve(this.view.stage.renderView.capabilities)}get clientGeometry(){return this.i3sOverrides.geometryOverrides}get elevationRange(){const e=this._nodeId2Meta,t=new ot;for(const i of e.values()){const e=i?.node.serviceMbsInIndexSR;e&&t.expandElevationRangeValues(e.center[2]-e.radius,e.center[2]+e.radius)}return t.elevationRangeValid?t:null}get fullExtent(){return this.i3slayer.fullExtent}initialize(){const e=has("enable-feature:idb-mock-cache");this._idbCache=e?new Ye(this.view,e):new Je("esri-scenelayer-cache","geometries"),this._preLoadBasis(),this.addResolvingPromise(this.i3slayer.indexInfo);const t=this.view.resourceController,i=t.memoryController;this.i3sOverrides=new Ne({view:this.view,layer:this.i3slayer,memoryController:i}),this._workerHandle=new Ie(st(t)),this.addResolvingPromise(this._workerHandle.promise);const s=this.i3slayer.store;this.addResolvingPromise(this._workerHandle.setLegacySchema(this.uid,s.defaultGeometrySchema).catch(d)),Le(this.i3slayer),Ue(this.i3slayer,this.view),this._layerUrl=this.i3slayer.parsedUrl.path,this._controller=new re({layerView:this,worker:this._workerHandle}),this._gpuMemoryEstimate=0,this._texMemoryEstimate=0,this._geoMemoryEstimate=0,this._stage=this.view.stage,this._collection=this._stage.renderView.componentObjectCollection;const r=s.defaultGeometrySchema;if(this._isIntegratedMesh||!r)this._hasComponentData=!1;else{const e=r.featureAttributes;this._hasComponentData=!!(e&&e.faceRange&&e.id)}this._hasVertexColors=null!=(r?.vertexAttributes.color??null)&&!this.i3slayer.cachedDrawingInfo?.color;const n=this.view.resourceController.memoryController.newCache(`sl-${this.uid}`,e=>this._deleteComponentObject(e));this._memCache=n;const l=this._controller,h=this._nodeId2Meta,c=this._nodeId2MetaReloading,u=e=>{const t=l.index;if(!t)return;const i=t.rootNode;if(!i)return;const s=t=>{const i=t.index,s=h.get(i)||c.get(i);return e(t,s?.objectHandle??null)};t.traverse(i,s)};this._intersectionHandler=new Fe({layerViewUid:this.layerViewUid,sublayerId:this.sublayerId,collection:this._collection,slicePlaneEnabled:this.slicePlaneEnabled,isGround:this._isIntegratedMesh,traverseNodeHierarchy:u}),this._elevationProvider=new Xe({view:this.view,layerElevationSource:this,intersectionHandler:this._intersectionHandler}),this._hasLoadedPBRTextures=this._usePBR,this._updatingHandles.add(()=>this.view.clippingArea,()=>this._clippingAreaChanged(),_),this._updatingHandles.add(()=>this.fullOpacity,e=>this._opacityChange(e)),this._updatingHandles.add(()=>this.slicePlaneEnabled,e=>this._slicePlaneEnabledChange(e)),this._updatingHandles.add(()=>this.elevationOffset,(e,t)=>{this._reloadAll(t),this._controller.invalidateVisibilityObbs()}),this._updatingHandles.add(()=>this.elevationInfo,(e,t)=>this._elevationInfoChanged(e,t),_),this._updatingHandles.add(()=>!this.suspended&&0!==this.elevationInfo.mode,(e,t)=>{e?this.addHandles(this.view.basemapTerrain.on("elevation-change",({extent:e})=>this._ensureElevationTask().addExtent(e)),Bt):t&&this.removeHandles(Bt)},_),this._updatingHandles.add(()=>this._usePBR,e=>this._updatePBR(e));const m=()=>{this._reloadAll(),this.clearMemCache()};this._updatingHandles.add(()=>this.rendererTextureUsage,m),this._updatingHandles.add(()=>this.contentVisible,e=>this._contentVisibleChanged(e),_),this._updatingHandles.add(()=>this.i3slayer.labelsVisible,()=>this._labelingChanged(),_),this._updatingHandles.add(()=>this.i3slayer.labelingInfo,()=>this._labelingChanged(),_),this._updatingHandles.add(()=>this._modifications,()=>this._modificationsChanged(),_),this.addHandles([g(()=>rt.I3S_TREE_SHOW_TILES,e=>{if(e&&!this._treeDebugger){const e=this._controller.crsIndex;import("./support/I3STreeDebugger.js").then(({I3STreeDebugger:t})=>{!this._treeDebugger&&rt.I3S_TREE_SHOW_TILES&&(this._treeDebugger=new t({lv:this,view:this.view,nodeSR:e}))})}else e||rt.I3S_TREE_SHOW_TILES||(this._treeDebugger=a(this._treeDebugger))},_),g(()=>rt.I3S_SHOW_MODIFICATIONS,()=>this._showModifications(),_)]),this._cacheKeySuffix=this._getCacheKeySuffix(),this._idbCache.init().catch(e=>o.getLogger(this).warn(`Failed to initialize IndexedDB cache: ${e}`));const{view:f}=this,{viewingMode:p,renderCoordsHelper:y}=f;this._planetRadiusInGlobalMode="local"===p?0:y.referenceEllipsoid.radius}destroy(){this._clearAddTasks(),this._elevationTask=a(this._elevationTask),this.i3sOverrides=a(this.i3sOverrides),this._elevationProvider&&(this._elevationProvider.notifyObjectsChanged(this.getVisibleObbs()),this.view.elevationProvider.unregister(this._elevationProvider),this._elevationProvider=null),this._intersectionHandler&&(this._stage.view.sceneIntersectionHelper.removeIntersectionHandler(this._intersectionHandler),this._intersectionHandler=null);const e=this._workerHandle;e&&(e.destroyContextAndSelf(this.uid),this._workerHandle=null),this._removeAllNodeDataFromStage(),this._memCache=a(this._memCache),this._collection=null,this._stage=null,this._edgeView=null,this._labeler=a(this._labeler),this._treeDebugger=a(this._treeDebugger),this._controller=a(this._controller),this._highlights=a(this._highlights),this._nodeId2Meta.clear(),this._nodeId2MetaReloading.clear(),this._crossfadeHelper=a(this._crossfadeHelper),this.emit("visible-geometry-changed"),this._visibleGeometryChangedSchedulerHandle&&(this._visibleGeometryChangedSchedulerHandle.remove(),this._visibleGeometryChangedSchedulerHandle=null),this._updatingHandles=a(this._updatingHandles)}_memEstimateTextureAdded(e){const t=e.usedMemory;return this._gpuMemoryEstimate+=t,this._texMemoryEstimate+=t,t}_memEstimateTextureRemoved(e){if(null!=e){const t=e.usedMemory;this._gpuMemoryEstimate-=t,this._texMemoryEstimate-=t}}_memEstimateGeometryAdded(e){const t=this._collection.getObjectGPUMemoryUsage(e);return this._gpuMemoryEstimate+=t,this._geoMemoryEstimate+=t,t}_memEstimateGeometryRemoved(e){const t=this._collection.getObjectGPUMemoryUsage(e);this._gpuMemoryEstimate-=t,this._geoMemoryEstimate-=t}isNodeLoaded(e){return this._nodeId2Meta.has(e)}isNodeReloading(e){return this._nodeId2MetaReloading.has(e)}get usedMemory(){let e=null!=this._labeler?this._labeler.usedMemory:0;return this._nodeId2Meta.forEach(t=>e+=null!=t?t.node.memory:0),this._nodeId2MetaReloading.forEach(t=>e+=null!=t?t.node.memory:0),e}get unloadedMemory(){return(null!=this._controller?this._controller.unloadedMemoryEstimate:0)+(null!=this._labeler?this._labeler.unloadedMemoryEstimate:0)}_labelingChanged(){if(!(we(this.i3slayer)&&this._supportsLabeling))return void(null!=this._labeler&&(this._labeler.destroy(),this._labeler=null));if(null!=this._labeler)return;const e=new me({view:this.view,layer:this.i3slayer,collection:this._collection,overrides:this.i3sOverrides,layerViewUid:this.uid});this._nodeId2Meta.forEach(t=>null!=t&&this._addMetaToLabeler(e,t)),this._labeler=e}_loadAsyncModule(e){return++this._asyncModuleLoading,e.then(e=>(--this._asyncModuleLoading,e),e=>{throw--this._asyncModuleLoading,e})}_modificationsChanged(){if(!this._i3sWasmLoaded&&this.hasModifications)return this._i3sWasmLoaded=pe().then(()=>{this._i3sWasmLoaded=!0,this._modificationsChanged(),this.notifyUpdate()}),void this.notifyUpdate();if(!0!==this._i3sWasmLoaded)return;const e=e=>o.getLogger(this).error("set-modifications-error","Error when setting modifications:",e),t=this.uid,i=this.i3slayer.spatialReference,s=i.isGeographic,r=Ce(this._layerClippingArea,this._modifications,i);this._workerHandle.setModifications(t,r,s).catch(e);try{ye({context:t,modifications:r,isGeodetic:s})}catch(a){e(a)}this._controller.modificationsChanged();const n=this.hasModifications?new l:null;this._nodeId2Meta.forEach((e,t)=>{null==e?(this._nodeId2Meta.delete(t),this._controller.updateLoadStatus(t,!1)):e.node.hasModifications?(this._updateFeatureIdCounts(e,-1),this._nodeId2Meta.delete(t),this._nodeId2MetaReloading.set(t,e)):null!=n&&n.push(e.node)}),this.notifyChange("elevationRange"),null!=n&&this._nodeId2MetaReloading.forEach(e=>n.push(e.node)),null!=n&&n.length>0&&(this.updateNodeModificationStatus(n),n.forAll(e=>{if(2!==e.imModificationImpact){const t=this._nodeId2Meta.get(e.index);this._controller.invalidateGeometryVisibility(e.index),null!=t?(this._updateFeatureIdCounts(t,-1),this._nodeId2Meta.delete(e.index),this._nodeId2MetaReloading.set(e.index,t),this.notifyChange("elevationRange")):this._nodeId2Meta.has(e.index)&&(this._nodeId2Meta.delete(e.index),this._controller.updateLoadStatus(e.index,!1))}})),this.clearMemCache(),this._controller.restartNodeLoading(),this._showModifications()}_showModifications(){if(null!=this._modificationGraphics&&(this.view.graphics.removeMany(this._modificationGraphics),this._modificationGraphics=null),!rt.I3S_SHOW_MODIFICATIONS||0===this._modifications.length)return;const e={clip:[227,227,79,.8],mask:[227,139,79,.8],replace:[139,227,79,.8]},t={outline:{color:[255,255,255],width:1}};this._modificationGraphics=[];for(const s of this._modifications){const r=s.geometry;r.spatialReference=this.i3slayer.spatialReference;const o=new _e({...t,color:e[s.type]});this._modificationGraphics.push(new i({geometry:r,symbol:o}))}this.view.graphics.addMany(this._modificationGraphics)}_addMetaToLabeler(e,t){e.addNodeMeta(t,(e,t)=>this._createAttributes(e,t))}_contentVisibleChanged(e){e?(this.view.elevationProvider.register(this._elevationContext,this._elevationProvider),this._stage.view.sceneIntersectionHelper.addIntersectionHandler(this._intersectionHandler)):(this._removeAllNodeDataFromStage(),this.view.elevationProvider&&this.view.elevationProvider.unregister(this._elevationProvider),this._stage.view.sceneIntersectionHelper.removeIntersectionHandler(this._intersectionHandler))}getLoadedAttributes(e){const t=this._nodeId2Meta.get(e);if(null!=t?.attributeInfo)return t.attributeInfo.loadedAttributes}getAttributeData(e){const t=this._nodeId2Meta.get(e);if(null!=t?.attributeInfo)return t.attributeInfo.attributeData}setAttributeData(e,t){const i=this._nodeId2Meta.get(e);null!=i?.attributeInfo&&(i.attributeInfo.attributeData=t,this._attributeValuesChanged(i))}async updateAttributes(e,t,i){const s=this._nodeId2Meta.get(e);null!=s&&(await this.i3sOverrides.applyAttributeOverrides(s.featureIds,t,i,this._controller.requiredAttributes),s.attributeInfo=t,this._controller.reschedule(()=>{this._nodeId2Meta.get(e)===s&&this._attributeValuesChanged(s)},i).catch(e=>{h(e)||o.getLogger(this).warn("Error while updating attribute values. Layer might not display correctly.",e)}))}_attributeValuesChanged(e){e.cachedRendererVersion=this._getInvalidRendererVersion(),e.appliedFilters=null,null!=this._labeler&&this._labeler.setNodeMetaAttributes(e,(e,t)=>this._createAttributes(e,t)),this._updateEngineObject(e)}clearMemCache(){null!=this._memCache&&this._memCache.clear(),this._addTasks.forEach(e=>e.allowMemCache=!1)}getVisibleNodes(){const e=new Array;return this._nodeId2Meta.forEach(t=>null!=t&&e.push(t.node)),e}getVisibleObbs(){const e=new Array;return this._nodeId2Meta.forEach(t=>t&&e.push(this._collection.getComponentObb(t.objectHandle))),e}getLoadedNodeIndices(e){this._nodeId2Meta.forEach((t,i)=>e.push(i)),this._nodeId2MetaReloading.forEach((t,i)=>e.push(i))}_preLoadBasis(){!has("disable-feature:i3s-basis")&&2&this.supportedTextureEncodings&&this.i3slayer.textureSetDefinitions?.some(e=>e.formats.some(e=>"basis"===e.format||"ktx2"===e.format))&&yt()}_getVertexBufferLayout(e,t){return ht(ut(this._getGeometryParameters({hasTexture:Dt(e.params.material),hasNormals:t.normal,hasRegions:t.uvRegion})))}_getObjectIdField(){return this.i3slayer.objectIdField||se}_getGlobalIdField(){return this.i3slayer.globalIdField}_findGraphicNodeAndIndex(e){const t=et(this.i3slayer.fieldsIndex,e.attributes,this._getObjectIdField());for(const i of this._nodeId2Meta.values()){const e=i?.featureIds.indexOf(t);if(null!=e&&e>=0)return{node:i.node,index:e}}return null}_getGraphicIndices(e,t){const i=this._nodeId2Meta.get(e.index);if(null==i)return[];const s=[],r=this._getObjectIdField(),o=this.i3slayer.fieldsIndex;for(const n of t){const e=et(o,n.attributes,r),t=i.featureIds.indexOf(e);-1!==t&&s.push(t)}return s}whenGraphicBounds(e){const t=this._findGraphicNodeAndIndex(e);if(!t)return Promise.reject();const i=this.getAABB(t.node.index,t.index);return null==i?Promise.reject():Promise.resolve({boundingBox:i,screenSpaceObjects:[]})}getAABBFromIntersectorTarget(e){return null==e.nodeIndex||null==e.componentIndex?null:this.getAABB(e.nodeIndex,e.componentIndex)}getAABB(e,t){const i=this._nodeId2Meta.get(e);if(null==i?.featureIds||t>=i.featureIds.length)return null;const s=i.objectHandle,r=je(t,this._collection,s,Y(24),0),o=this.view.renderSpatialReference,n=this.view.spatialReference;return B(r,o,0,r,n,0)?W(r):null}whenGraphicAttributes(e,t){return Ge(this.i3slayer,e,this._getObjectIdField(),t,()=>[...this._nodeId2Meta.values()].filter(r))}getGraphicFromIntersectorTarget(e,t){if(null==e.nodeIndex||null==e.componentIndex)return null;const i=this._nodeId2Meta.get(e.nodeIndex);if(null==i?.featureIds||e.componentIndex>=i.featureIds.length)return null;const s=this._createLayerGraphic(this._createAttributes(e.componentIndex,i));return s?t.defer?(t.defer(async()=>(s.geometry=(await import("./i3s/meshUtils.js")).createMesh({layerView:this,nodeIndex:e.nodeIndex,featureIndex:e.componentIndex}),s)),null):s:null}_getCacheKey(e){return`${this._layerUrl}/v${wt}/${e}${this._cacheKeySuffix}`}_getCacheKeySuffix(){const e=this.view.renderSpatialReference;if(null==e)return zt;if(e===L(e))return Wt;return this.i3slayer.spatialReference.equals(e)?qt:null!=e.wkid?`@${e.wkid}`:null}_getMemCacheKey(e,t=this.elevationOffset){return e+"#"+t}get _idbCacheEnabled(){return!this._controller.disableIDBCache&&!this.hasModifications&&0===this.elevationOffset&&null!=this._cacheKeySuffix}loadCachedGPUData(e){return null!=this._memCache?this._memCache.pop(this._getMemCacheKey(e)):null}deleteCachedGPUData(e){null!=e&&this._deleteComponentObject(e)}_cacheGPUData(e,t=this.elevationOffset){if(null==this._memCache)return void this._deleteComponentObject(e);const i=this._controller.indexDepth-e.node.level;this._memCache.put(this._getMemCacheKey(e.node.index,t),e,i)}loadMissingTextures(e,t,i,s){const r=e?.filter((e,i)=>{if(0===(e.usage&this.rendererTextureUsage))return!1;if(null==t)return!0;const s=De(e.encodings,this.supportedTextureEncodings),r=t[i];return!!(null==r?.data||s&&r.encoding!==s.encoding)})??[];return 0===r.length?Promise.resolve(!1):i(r,s).then(i=>{let s=0;for(let r=0;r<e.length;r++)s<i.length&&i[s].id===e[r].id&&(t[r]=i[s],s++);return!0})}loadCachedNodeData(e,t,i){return this._idbCacheEnabled?this._idbCache.get(this._getCacheKey(e.id),t).then(s=>null==s?null:(s.globalTrafo=X(s.globalTrafo),s.nodeVersion!==e.version?(this._idbCache.remove(this._getCacheKey(e.id)),null):(0===this.elevationInfo.mode&&(e.geometryObbInRenderSR=at.fromData(s.geometryObbData)),this.loadMissingTextures(s.requiredTextures,s.textureData,i,t).then(i=>(i&&this._idbCache.initialized&&null!=s.textureData&&(s.byteSize=Ht(s.transformedGeometry,s.textureData),s.textureData.every(Tt)&&this._indexedDbSizeCheck(e,s)&&this._idbCache.put(this._getCacheKey(e.id),s).catch(t=>o.getLogger(this).warn(`Failed to update node with textures in IndexedDB cache: ${e.id}: ${t}`))),c(t),s))))):Promise.resolve(null)}addNode(e,t,i){return At(t)?null==t.geometryBuffer?(this._addNodeMeta(e.index,null),Promise.resolve()):this._addData(e,t.attributeDataInfo,()=>this._transformNode(e,t,i).then(s=>this._safeReschedule(()=>{if(null==s)return e.hasModifications=!1,this._addCachedNodeData(e,null,i);const{obb:r,componentOffsets:n,featureIds:a,anchorIds:l,anchors:d,transformedGeometry:h}=s;e.hasModifications=h.hasModifications;const c=X(s.globalTrafo),u=O(Ut,r.center.x,r.center.y,r.center.z);R(u,u,c);const _=new at(u,[r.extents.x,r.extents.y,r.extents.z],E(r.orientation.x,r.orientation.y,r.orientation.z,r.orientation.w));0===this.elevationInfo.mode&&(e.geometryObbInRenderSR=_),t.geometryData.componentOffsets=n,a&&(t.geometryData.featureIds=Array.from(a)),t.geometryData.anchorIds=l,t.geometryData.anchors=d;const g={nodeVersion:e.version,geometryData:t.geometryData,requiredTextures:t.requiredTextures,textureData:t.textureData,transformedGeometry:h,globalTrafo:c,geometryObbData:_.data,byteSize:Ht(h,t.textureData)};if(this._idbCacheEnabled&&this._idbCache.initialized&&this._indexedDbSizeCheck(e,g)){const t=null!=g.textureData?g.textureData.map(e=>Tt(e)?e:null):null;this._idbCache.put(this._getCacheKey(e.id),{...g,textureData:t}).catch(t=>o.getLogger(this).warn(`Failed to store node in IndexedDB cache: ${e.id}: ${t}`))}return this._addCachedNodeData(e,g,i)},i))):Promise.reject()}getElevationRange(e){const t=new ot,i=this._controller,{index:s}=i;if(!s)return t;const{rootNode:r}=s;if(!r)return t;const o=this._nodeId2Meta,n=e.radius,a=i.viewportQueries,l=this._planetRadiusInGlobalMode,{view:d}=this,{renderCoordsHelper:h}=d,c=h.referenceEllipsoid.radius,u=this._collection,_=i=>{const{childrenLoaded:s}=i;if(0===s)return!1;const r=a.getAndUpdateVisibilityObbInRenderSR(i);let d=null,_=-1;if(r){if(_=r.radius,!r.intersectSphereWithMBS(e,_))return!1}else d=a.getServiceMbsInRenderSR(i),d&&(_=d.radius);if(_>=0&&n>=1*_)return null!=r?Qt(t,r,l):null!=d&&d.radius>=0&&Jt(t,d,l),!1;const g=Kt;if(g.minElevation=1/0,g.maxElevation=-1/0,(null!=r||null!=d)&&(null!=r?Qt(g,r,l):null!=d&&Jt(g,d,l),g.minElevation>=t.minElevation&&g.maxElevation<=t.maxElevation))return!1;const m=o.get(i.index);if(m){const{geometryObbInRenderSR:s}=i;if(!s||s.intersectSphereWithMBS(e)){if(s){if(n>0*s.radius)return Qt(t,s,l),!1}const{objectHandle:e}=m,i=u.getObjectTransform(e),r=h.getAltitude(i.position);u.expandRangeWithComponentObjectElevationRange(e,r,c,t)}}return s-(m?1:0)>0};return s.traverse(r,_),t}computeVisibilityObb(e){return Be(e,this.view.renderSpatialReference,this._controller.crsIndex,this.i3slayer.spatialReference,this.elevationOffset,this._modifications,this.view.renderCoordsHelper.sphericalPCPF)}_transformNode(e,t,i){const s=t.geometryData.geometries??[],r=new Array(s.length);for(let f=0;f<s.length;++f)r[f]=this._getVertexBufferLayout(s[f],t.geometryDescriptor);const o=this.i3slayer.normalReferenceFrame,n=t.normalReferenceFrame??o??"none",a=e.serviceMbsInIndexSR,l=this.elevationOffset,d=this._controller.crsIndex,h=this._controller.crsVertex,c=this.view.renderSpatialReference,u=Pe(a,l,n,d,c),_=q(d,h),g=q(h,c);if(null==_||null==g)return Promise.resolve(null);const m={context:this.uid,geometryBuffer:t.geometryBuffer,geometryData:t.geometryData,geometryDescriptor:t.geometryDescriptor,layouts:r,globalTrafo:u,mbs:a.toJSON(),obbData:e.serviceObbInIndexSR?.data,elevationOffset:l,needNormals:this._controller.isMeshPyramid,normalReferenceFrame:n,indexToVertexProjector:_,vertexToRenderProjector:g};return this._workerHandle.invoke(m,i)}get _supportsNodeCrossFading(){return!this.view?.stage?.renderer.shadowsEnabled}get nodeCrossfadingEnabled(){return this._supportsNodeCrossFading&&(this.lodCrossfadeinDuration>0||this.lodCrossfadeoutDuration>0||this.lodCrossfadeUncoveredDuration>0)}get nodeFadeoutEnabled(){return this._supportsNodeCrossFading&&this.lodCrossfadeoutDuration>0}_setNewNodeOpacity(e){const t=this.nodeCrossfadingEnabled?0:this.fullOpacity;this._setNodeOpacity(e,t)}addCachedGPUData(e,t,i){if(0===this.elevationInfo.mode&&(e.geometryObbInRenderSR=this._collection.getComponentObb(t.objectHandle).clone()),!this._controller.isGeometryVisible(e))return void this._cacheGPUData(t);null!=this._labeler&&this._addMetaToLabeler(this._labeler,t);const s=e.index;this._addNodeMeta(s,t),this.updateNodeState(s,i),this._collection.setObjectVisibility(t.objectHandle,!0),this._updateMaterial(t),this._setNewNodeOpacity(t),0!==this.elevationInfo.mode&&this._ensureElevationTask().schedule(s),this._updateEngineObject(t),this._highlights?.objectCreated(t),null!=this._treeDebugger&&this._treeDebugger.update()}addCachedNodeData(e,t,i,s){return this._addData(e,i,()=>this._addCachedNodeData(e,t,s))}async deleteCachedNodeData(e){if(this._idbCacheEnabled)return this._idbCache.remove(this._getCacheKey(e))}async _addCachedNodeData(e,t,i){if(!this.contentVisible||!this._controller.isGeometryVisible(e))return void this._removeNodeStageData(e.index,this.elevationOffset,this._nodeId2MetaReloading);if(null==t)return void this._addNodeMeta(e.index,null);const s=this._addTasks.get(e.index),{geometryData:r,transformedGeometry:n}=t;await this.i3sOverrides.applyAttributeOverrides(r.featureIds,s.attributeInfo,i,this._controller.requiredAttributes);const a=null!=t.textureData?t.textureData.filter(e=>null!=e&&0!==(e.usage&this.rendererTextureUsage)):[];!has("disable-feature:i3s-basis")&&a.some(e=>null!=e&&(2===e.encoding||1===e.encoding))&&await yt(),e.memory=0;const{componentOffsets:l,geometries:d,featureIds:h,anchorIds:c,anchors:u}=r,_=this._collection,g=d[0],{layout:m,indices:f,interleavedVertexData:p,positionData:y,hasColors:b}=n,{material:E,geometryParameters:O}=this._materialParameters(g,m),R=l||new Uint32Array([0,f?f.length:p.byteLength/m[0].stride]),V=new _t(m,O.shadeNormals,O.applySSAO,O.textureCoordinateType),D=new gt({data:p,count:p.byteLength/m[0].stride},{positions:Z(y.data),indices:ee(y.indices)},f,R,V),A=g.transformation?x(g.transformation):S(),T=X(t.globalTrafo);M(A,T,A);const N=w(H(),A),k=v(C(),A),L=this.view.renderSpatialReference,G=this.view.basemapTerrain.spatialReference,B=at.fromData(lt(t.geometryObbData)).center,q=[1,1,1];U(B,L,q,G)||o.getLogger(this).errorOnce("Unsupported coordinate system for IM overlay");const W=H();z(B,L,W,G);const $=C();I($,k);const K=H();j(K,F(K,B,N),$);const Q=W[0]-K[0]*q[0],J=W[1]-K[1]*q[1],Y=_.createObject(new ct(P(Q,J,q[0],q[1]),new ft(N,k),at.fromData(lt(t.geometryObbData)),D,!this._isIntegratedMesh)),te=2===O.textureCoordinateType,{textures:ie,texturePromise:se}=this._initMaterialAndTextures(Y,E,a,te,e);e.memory+=this._memEstimateGeometryAdded(Y),e.memory+=ie.reduce((e,t)=>e+(null!=t?this._memEstimateTextureAdded(t):0),0);const re=!!E.hasParametersFromSource,oe="blend"!==E.alphaMode&&E.metallicRoughness.baseColorFactor[3]>=1,ne=new Mt(e,h,Y,this._getInvalidRendererVersion(),s.attributeInfo,{hasParametersFromSource:re,isOpaque:oe},ie,c,u);s.meta=ne,this._hasTextures||=t.requiredTextures?.some(({usage:e})=>!!(19&e))||!!e.resources.texture,this._hasData=!0,this._hasColors||=b,this.notifyChange("hasTexturesOrVertexColors");const ae=this.slicePlaneEnabled;return Promise.all([this._addOrUpdateEdgeRendering(ne),se]).then(([t,s])=>(this._addTasks.has(e.index)&&t?.updateObjectVisibility(ne.objectHandle,!1).catch(e=>this._logEdgeViewError(e,this.i3slayer.title)),this._safeReschedule(()=>{const i=this._addTasks.get(e.index);if(!i)return;if(this._addNodeMeta(e.index,ne),i.meta=null,!this.contentVisible)return void this._removeNodeStageData(e.index,this.elevationOffset);_.setObjectVisibility(Y,!0),t?.updateObjectVisibility(ne.objectHandle,!0).catch(e=>this._logEdgeViewError(e,this.i3slayer.title)),ne.attributeInfo=i.attributeInfo;const s=ne.cachedRendererVersion!==this._rendererVersion,r=ae!==this.slicePlaneEnabled;this._updateElevationOffsets(ne);const o=ne.elevationOffsets;this._updateComponentData(ne);const n=this._applyFiltersToNode(ne);(s||null!=t&&(r||n||o))&&this._addOrUpdateEdgeRendering(ne),null!=this._labeler&&this._addMetaToLabeler(this._labeler,ne),this._visibleGeometryChanged(ne,0),this._highlights?.objectCreated(ne),this._updateMaterial(ne),this._setNewNodeOpacity(ne),null!=this._treeDebugger&&this._treeDebugger.update()},i))).catch(e=>{const{meta:t,allowMemCache:i}=s;throw s.meta=null,t&&i?this._cacheGPUData(t):t&&this._deleteComponentObject(t),e})}_addNodeMeta(e,t){if(this._removeNodeStageData(e,this.elevationOffset,this._nodeId2MetaReloading),this._nodeId2Meta.has(e)){o.getLogger(this).error("Removing duplicated node");const t=this._nodeId2Meta.get(e);t&&(this._deleteComponentObject(t),this._updateFeatureIdCounts(t,-1))}else this._controller.updateLoadStatus(e,!0);t&&(t.lodCrossfadeProgress=null,this.nodeCrossfadingEnabled&&kt(t.cachedEdgeMaterials,0),this._updateFeatureIdCounts(t,1)),this._nodeId2Meta.set(e,t),this.notifyChange("elevationRange")}_updateElevationOffsets(e){if(!e.node.serviceMbsInIndexSR)return;const{view:t,elevationInfo:i}=this,s=this._controller.crsIndex,{groundView:r,groundSpatialReference:o,renderSpatialReference:n}=t,a=i.mode;if(null==n||null==o||0===a)return void(e.elevationOffsets=null);const l=this._collection.getObjectTransform(e.objectHandle);e.elevationOffsets=e.elevationOffsets??[];const d=Ut,h=Gt,c=2===a,u=this.view.renderCoordsHelper,_=e.featureIds.length,g=(()=>{if(e.cachedElevationAnchors)return e.cachedElevationAnchors;const t=Y(3*_);e.cachedElevationAnchors=t;const{center:i}=e.node.serviceMbsInIndexSR;for(let r=0;r<_;r++){const a=3*r,c=e.anchorIds?.indexOf(r)??-1;e.anchors&&c>=0?(O(d,e.anchors[3*c],e.anchors[3*c+1],e.anchors[3*c+2]),V(d,d,i),z(d,s,d,o),t[a]=d[0],t[a+1]=d[1],t[a+2]=u.getAltitude(d)):(this._collection.getComponentAabb(e.objectHandle,r,h,!0),O(d,(h[0]+h[3])/2,(h[1]+h[4])/2,h[2]),j(d,d,l.rotationScale),V(d,d,l.position),t[a+2]=u.getAltitude(d),z(d,n,d,o),t[a]=d[0],t[a+1]=d[1])}return t})(),m=i.offset,f=e.elevationOffsets,p=(e,t)=>{const i=c?g[3*e+2]:0;f[e]=m+(t??0)-i};r.getElevations(g,_,p)}_ensureElevationTask(){return null!=this._elevationTask||(this._elevationTask=new Se(this.view.resourceController.scheduler,e=>this._controller.updateElevationChanged(e,this.view.basemapTerrain.spatialReference)?.filterInPlace(e=>null!=this._nodeId2Meta.get(e)),e=>this._nodeElevationAlignmentChanged(this._nodeId2Meta.get(e)),()=>this.elevationInfo?.mode)),this._elevationTask}_elevationInfoChanged(e,t){const i=0!==e.mode,s=!!t&&t!==e&&0!==t.mode;this._intersectionHandler.updateElevationAlignState(i,this.view.state.viewingMode),i&&!s&&this._controller.removeAllGeometryObbs(),this._nodeId2Meta.forEach(e=>this._nodeElevationAlignmentChanged(e))}_nodeElevationAlignmentChanged(e){null!=e&&(this._updateElevationOffsets(e),this._updateComponentData(e),this._updateEdgeRendering(e),null!=this._labeler&&this._labeler.updateLabelPositions(e),this._updateSnappingSources(e,2),this._elevationProvider.notifyObjectChanged(this._collection.getComponentObb(e.objectHandle)))}_safeReschedule(e,t){return c(t),this._controller.reschedule(e,t)}_materialParameters(e,t){const i=null!=e.params.material?e.params.material:Ae(),s=t.some(({name:e})=>"uvRegion"===e),r=t.some(({name:e})=>"normalCompressed"===e),o=Dt(i);return{geometryParameters:this._getGeometryParameters({hasTexture:o,hasNormals:r,hasRegions:s}),material:i}}_initMaterialAndTextures(e,t,i,s,r){const o=this._stage.renderView,n=e=>{this._gpuMemoryEstimate-=e,this._texMemoryEstimate-=e,r.memory-=e},a=i.map(e=>Te(e,t,s,o,this._compressionTracker,n));this._stage.addTextures(a);let l=null;return this._collection.updateMaterial(e,e=>{l=He(e,t,a,i,this.view.stage.renderView.textures,{rendererTextureUsage:this.rendererTextureUsage,usePBR:this._usePBR,isIntegratedMesh:this._isIntegratedMesh,slicePlaneEnabled:this.slicePlaneEnabled,viewSpatialReference:this.view.spatialReference}),this._updateMaterialOverlay(e)}),{textures:a,texturePromise:l}}_getGeometryParameters(e){return new mt(this._hasVertexColors,e.hasTexture?e.hasRegions?2:1:0,e.hasNormals,this._shadeNormals,this._applySSAO)}_addData(e,t,i){let s=this._addTasks.get(e.index);if(s)s.attributeInfo=t;else{const r=u();s=new Pt(t,null,r.promise),this._addTasks.set(e.index,s),i().then(r.resolve,r.reject).then(()=>this._addTasks.delete(e.index)).catch(t=>{throw this._addTasks.delete(e.index),t})}return s.promise}_clearAddTasks(){this._addTasks.forEach(e=>{null!=e.meta&&(this._cacheGPUData(e.meta),e.meta=null)}),this._addTasks.clear()}_clippingAreaChanged(){const e=this.view.renderSpatialReference,t=this.i3slayer.spatialReference,i=Q();this._renderClippingArea=nt(this.view.clippingArea,i,e)?i:null;const s=Q();this._layerClippingArea=nt(this.view.clippingArea,s,t)?s:null,this._filterChange(),this._controller&&this._controller.updateClippingArea(this.view.clippingArea),this._isIntegratedMesh&&this._modificationsChanged()}get hasGeometryFilter(){return!1}_geometryFilterChange(){const e=this.hasGeometryFilter;this._controller.geometryFilterChanged(e),this._applyFilters(e),this._assertFeatureIdNodeCounts(e)}_assertFeatureIdNodeCounts(e){e&&!this._featureIdCounts?(this._featureIdCounts=ei(this._nodeId2Meta.values()),this._filteredIdCounts=ei(this._nodeId2Meta.values(),1),this._weaklyRemovedIdCounts=ei(this._nodeId2Meta.values(),2),this.addHandles(g(()=>this._controller.updating,e=>{!e&&this._needFilterResolve&&(this.multiGeometryFilterResolve(),this._needFilterResolve=!1,this.notifyUpdate())},{sync:!0}),"updateFinished")):!e&&this._featureIdCounts&&(this._featureIdCounts=null,this._filteredIdCounts=null,this._weaklyRemovedIdCounts=null,this._mismatchShow=null,this._mismatchHide=null,this.removeHandles("updateFinished"),this._needFilterResolve=!1,this.notifyUpdate())}_updateFeatureIdCounts(e,t){this._featureIdCounts&&(this._needFilterResolve=!0,Zt(this._featureIdCounts,e.featureIds,t),Zt(this._filteredIdCounts,e.filteredIds,t),Zt(this._weaklyRemovedIdCounts,e.weaklyRemovedIds,t))}_updateFilteredIdCounts(e,t,i){this._filteredIdCounts&&(this._needFilterResolve=!0,Zt(this._filteredIdCounts,t,-1),Zt(this._filteredIdCounts,e.filteredIds,1),Zt(this._weaklyRemovedIdCounts,i,-1),Zt(this._weaklyRemovedIdCounts,e.weaklyRemovedIds,1))}_checkFeatureIdNodeCountInvariant(){const e=null!=this._featureIdCounts;if(this.hasGeometryFilter!==e&&o.getLogger(this).error("checkFeatureIdNodeCountInvariant()","LayerView should have feature id node counts if and only if it has a geometry filter",{layerView:this,hasNodeCounts:e}),!this._featureIdCounts||!this._filteredIdCounts)return;const t=ei(this._nodeId2Meta.values());n(this._featureIdCounts,t)||o.getLogger(this).error("checkFeatureIdNodeCountInvariant()","Incorrect _featureIdCounts",{layerView:this,counts:this._featureIdCounts,expected:t});const i=ei(this._nodeId2Meta.values(),1);n(this._filteredIdCounts,i)||o.getLogger(this).error("checkFeatureIdNodeCountInvariant()","Incorrect _filteredIdCounts",{layerView:this,counts:this._filteredIdCounts,expected:i});const s=ei(this._nodeId2Meta.values(),2);n(this._weaklyRemovedIdCounts,s)||o.getLogger(this).error("checkFeatureIdNodeCountInvariant()","Incorrect _weaklyRemovedIdCounts",{layerView:this,counts:this._weaklyRemovedIdCounts,expected:i})}multiGeometryFilterResolve(){if(!this._featureIdCounts||!this._filteredIdCounts)return;let e=null,t=null;for(const[i,s]of this._filteredIdCounts){const r=this._featureIdCounts.get(i);if(r!==s){s+(this._weaklyRemovedIdCounts?.get(i)??0)===r?(e??=new Set,e.add(i)):(t??=new Set,t.add(i))}}f(e,this._mismatchShow)&&f(t,this._mismatchHide)||(this._mismatchShow=e,this._mismatchHide=t,this._nodeId2Meta.forEach(e=>{if(!e?.filteredIds)return;const t=Xt(e,this._mismatchShow,this._mismatchHide);this._collection.setAllComponentVisibilities(e.objectHandle,t),this._visibleGeometryChanged(e,2)}))}_filterChange(){this._applyFilters(this.hasGeometryFilter)}_applyFilters(e){this._filters=this.getFilters(),e?this._controller&&this._controller.requestUpdate():this._nodeId2Meta.forEach(e=>{e&&this._applyFiltersToNode(e)&&(this._addOrUpdateEdgeRendering(e),this._visibleGeometryChanged(e,2))})}getFilters(){const e=[],t=this._renderClippingArea;return null!=t&&e.push((e,i)=>this._boundingRectFilter(e,i,t)),e}addSqlFilter(e,t,i){if(null!=t){const s=t.fieldNames;e.push((e,r)=>this._sqlFilter(e,r,t,s,i))}}_sqlFilter(e,t,i,s,r){const o={},n=this._createLayerGraphic(o);if(!n)return;const a=this.i3slayer.objectIdField,l=t.featureIds,d=t.attributeInfo?.attributeData;s.every(e=>e===a||null!=d?.[e])&&qe(e,l,e=>{o[a]=l[e];for(const i of s)i!==a&&(o[i]=d?Ee(d[i],e):null);try{return i.testFeature(n)}catch(t){return r(t),!1}})}_boundingRectNodeTest(e,t){return G(e.node.serviceMbsInIndexSR,this._controller.crsIndex,Vt,this.view.renderSpatialReference),ze(t,Vt)}_boundingRectFeatureTest(e,t,i){return this._collection.getComponentAabb(e.objectHandle,t,Et),K(Et,Ot),J(i,Ot)}_boundingRectFilter(e,t,i){const s=this._collection,r=this._boundingRectNodeTest(t,i);if(3===r)return;if(0===r)return void(e.length=0);const o=s.getComponentCount(t.objectHandle);if(o.invisible+o.visible!==t.featureIds.length)return;const n=this._transformClippingArea(Rt,i,t.objectHandle);qe(e,t.featureIds,e=>this._boundingRectFeatureTest(t,e,n))}_transformClippingArea(e,t,i){const s=this._collection.getObjectTransform(i),r=s.position,o=s.rotationScale;return e[0]=(t[0]-r[0])/o[0],e[1]=(t[1]-r[1])/o[4],e[2]=(t[2]-r[0])/o[0],e[3]=(t[3]-r[1])/o[4],e}async _addOrUpdateEdgeRendering(e,t=!0){const i=e.objectHandle,{hasEdges:s,perFeatureEdgeMaterials:r}=this._getFilteredEdgeMaterials(e);s&&!this._edgeView&&(this._edgeView=await this._stage.renderer.loadEdgeView());const o=this._edgeView;if(!o)return null;const n=o.hasObject(i);if(s){if(n){if(this.nodeCrossfadingEnabled){kt(r,this.getNodeOpacity(e))}return o.updateAllComponentMaterials(i,r,this.slicePlaneEnabled,t).catch(e=>this._logEdgeViewError(e,this.i3slayer.title)),o.updateObjectVisibility(i,!0).catch(e=>this._logEdgeViewError(e,this.i3slayer.title)),o.updateAllVerticalOffsets(i,e.elevationOffsets).catch(e=>this._logEdgeViewError(e,this.i3slayer.title)),o}const s=await this._collection.addEdges(i,o,r,this.slicePlaneEnabled,e.elevationOffsets);return e.edgeMemoryUsage=s,e.node.memory+=s,o}return n&&(e.node.memory-=e.edgeMemoryUsage,e.edgeMemoryUsage=0,o.removeObject(i)),null}_applyFiltersToNode(e){const{filteredIds:t,weaklyRemovedIds:i}=e,s=this._applyFiltersToNodeComponents(e);return this._updateFilteredIdCounts(e,t,i),s&&this._labeler?.applyFilterChange(e),s}_applyFiltersToNodeComponents(e){const t=this._collection,i=t.getComponentCount(e.objectHandle),s=null!=e.filteredIds,r=0===i.invisible;if(t.setAllComponentVisibilities(e.objectHandle,"all"),0===this._filters.length)return e.filteredIds=null,!r;if(null!=e.filteredIds&&e.appliedFilters===this._filters||(e.weaklyRemovedIds=null,e.filteredIds=Yt(e,this._filters),e.appliedFilters=this._filters),s&&e.filteredIds===e.featureIds&&(!this._mismatchHide||e.filteredIds.every(e=>!this._mismatchHide?.has(e))))return!r;const o=Xt(e,this._mismatchShow,this._mismatchHide);return t.setAllComponentVisibilities(e.objectHandle,o),!0}_removeAllNodeDataFromStage(e=this.elevationOffset){this._nodeId2Meta.forEach((t,i)=>this._removeNodeStageData(i,e)),this._nodeId2MetaReloading.forEach((t,i)=>this._removeNodeStageData(i,e,this._nodeId2MetaReloading)),this._elevationTask=a(this._elevationTask)}removeNode(e){const t=this.elevationOffset;this._removeNodeStageData(e,t),this._removeNodeStageData(e,t,this._nodeId2MetaReloading),null!=this._elevationTask&&this._elevationTask.remove(e)}_removeNodeStageData(e,t,i=this._nodeId2Meta){i.has(e)&&this._controller.updateLoadStatus(e,!1);const s=i.get(e);null!=s?(this._collection.setObjectVisibility(s.objectHandle,!1),null!=this._edgeView&&this._edgeView.hasObject(s.objectHandle)&&this._edgeView.updateObjectVisibility(s.objectHandle,!1).catch(e=>this._logEdgeViewError(e,this.i3slayer.title)),this._visibleGeometryChanged(s,1),null!=this._labeler&&this._labeler.removeNodeMeta(s),i.delete(e),this._highlights?.objectDeleted(s),i===this._nodeId2Meta?(this._updateFeatureIdCounts(s,-1),this._cacheGPUData(s,t),this.nodeCrossfadingEnabled&&this._crossfadeHelper.stopNodeFading(s)):this._deleteComponentObject(s),null!=this._treeDebugger&&this._treeDebugger.update()):i.delete(e)}_deleteComponentObject(e){if(null!=this._edgeView&&this._edgeView.removeObject(e.objectHandle),this._memEstimateGeometryRemoved(e.objectHandle),this._collection.destroyObject(e.objectHandle),e.textures)for(const t of e.textures)this._memEstimateTextureRemoved(t),this._stage.removeTexture(t)}updateNodeState(e,t){const i=this._nodeId2Meta.get(e);null!=i&&this._collection.updateMaterial(i.objectHandle,e=>e.polygonOffsetEnabled=0===t)}updateNodeIndex(e,t){if(this._nodeId2Meta.has(e)){const i=this._nodeId2Meta.get(e);this._nodeId2Meta.delete(e),this._nodeId2Meta.set(t,i),this.notifyChange("elevationRange")}const i=this._nodeId2MetaReloading.get(e);i&&(this._nodeId2MetaReloading.delete(e),this._nodeId2MetaReloading.set(t,i))}_invalidateAllSymbols(){this._rendererVersion=We(this._rendererVersion,1),this._controller?.requestUpdate()}_getInvalidRendererVersion(){return We(this._rendererVersion,-1)}async _rendererChange(e){if(this._currentRenderer=e,this.notifyChange("rendererTextureUsage"),this._rendererVersion=We(this._rendererVersion,1),this._rendererFields=null,this._colorVariable=null,this._opacityVariable=null,this._invalidateAllSymbols(),e&&(this._rendererFields=await e.getRequiredFields(this.i3slayer.fieldsIndex)),this._updateSymbologyFields(),!this._arcade&&e&&"arcadeRequired"in e&&e.arcadeRequired&&(this._arcade=await ce()),e&&"visualVariables"in e&&e.visualVariables)for(const t of e.visualVariables)"color"===t.type?this._colorVariable=t:"opacity"===t.type?this._opacityVariable=t:o.getLogger(this).warn(`Unsupported visual variable type for 3D Object Scene Services: ${t.type}`);if(e)for(const t of e.symbols)"mesh-3d"!==t.type&&o.getLogger(this).error(`Symbols of type '${t.type}' are not supported for 3D Object Scene Services.`);this._controller&&this._controller.requestUpdate()}_getCachedEdgeMaterials(e){return this._hasComponentData&&e.cachedRendererVersion!==this._rendererVersion&&this._updateCachedRendererData(e),e.cachedEdgeMaterials}_getComponentParameters(e){this._hasComponentData&&e.cachedRendererVersion!==this._rendererVersion&&this._updateCachedRendererData(e);const t=e.cachedSymbology;return(i,s)=>{const r=i*e.cachedSymbologyStride;N(s.externalColor,t[r]/255,t[r+1]/255,t[r+2]/255,t[r+3]/255);const o=this._stage.renderView.olidRenderHelper;if(o){const t=e.featureIds[i],r=this.sublayerId?`${this.layerViewUid}_${this.sublayerId}`:this.layerViewUid,n=de(this.view,this.uid);o.setUidToObjectAndLayerId(t,t,this.layerId,r,this.layerPopupEnabledAndHasTemplate&&!n,e.node.resources.attributes,i,this.sublayerId),s.olidColor=o.getObjectAndLayerIdColor({graphicUid:t,layerViewUid:r})}s.externalColorMixMode=15&t[r+4],s.castShadows=!!(16&t[r+4]),s.pickable=!!(32&t[r+4]),s.elevationOffset=e.elevationOffsets?.[i]??0,s.emissiveStrength=e.emissiveStrengths?.[i]??1,s.emissiveSource=e.emissiveSources?.[i]??0}}_getSymbolInfo(e,t){const i=e?.getSymbol(t,{arcade:this._arcade});if(!(i instanceof ue))return null;const s=i.id;if(this._symbolInfos.has(s))return this._symbolInfos.get(s);const r=$e(i);return this._symbolInfos.set(s,r),r}_setSymbologyOverride(e,t){this._symbologyOverride!==e&&(this._symbologyOverride=e,this._symbologyOverrideFields=t,this._invalidateAllSymbols(),this._updateSymbologyFields())}_updateSymbologyFields(){this._symbologyFields=null!=this._symbologyOverrideFields&&this._symbologyOverrideFields.length>0?null!=this._rendererFields&&this._rendererFields.length>0?oe(this.i3slayer.fieldsIndex,[...this._rendererFields,...this._symbologyOverrideFields]):this._symbologyOverrideFields:this._rendererFields}_updateCachedRendererData(e){if(e.cachedRendererVersion=this._rendererVersion,!this._hasComponentData)return;const t=this._tmpAttributeOnlyGraphic,i={};t.attributes=i;const s=this._currentRenderer,r=e.attributeInfo?.attributeData,o=e.featureIds?this.i3slayer.objectIdField:null,n=null!=r&&null!=this._symbologyFields&&this._symbologyFields.length>0;let a=null,l=null;if(n&&null!=this._symbologyFields){a=[],l=[];for(const e of this._symbologyFields){const t=r[e];t&&(a.push(e),l.push(t))}}e.cachedSymbology||(e.cachedSymbology=ie(e.featureIds.length*e.cachedSymbologyStride));const d=new Ze,h=this.fullOpacity,c=this.nodeCrossfadingEnabled?this.getNodeOpacity(e):h;let u=null,_=1,g=Ke,m=0;for(let f=0;f<e.featureIds.length;f++){if(null!=o&&(i[o]=e.featureIds[f]),n&&a)for(let e=0;e<a.length;e++)i[a[e]]=Ee(l[e],f);const r=s?this._getSymbolInfo(s,t):null;let h,p;if(d.pickable=!0,s&&"visualVariables"in s){if(this._colorVariable){const e=ae(this._colorVariable,t,{color:Ft,arcade:this._arcade});e&&(h=d.color,h[0]=e.r/255,h[1]=e.g/255,h[2]=e.b/255,h[3]=e.a??1,this._opacityVariable||null===e.a||(p=e.a))}this._opacityVariable&&(p=le(this._opacityVariable,t,{arcade:this._arcade}))}if(r?.material){const e=r.material;h=null==h||null==p?Me(h,p,e.color,e.alpha,Ct,d.color):Me(h,p,null,null,Ct,d.color)}h??=N(d.color,1,1,1,1);const y=r?.material;if(d.colorMixMode=y?.colorMixMode??1,d.edgeMaterial=r?.edgeMaterial,this._symbologyOverride?.(t,d),null!=this._nodeColorOverride&&(this._nodeColorOverride(e.node,h),d.colorMixMode=3),d.pickable&&=h[3]>=It,d.castShadows=r?r.castShadows:d.pickable,null!=d.edgeMaterial){const t=h[3]>=1&&(e.material.isOpaque||3===d.colorMixMode)?1:0;d.edgeMaterial===u&&t===_||(g={...d.edgeMaterial,opacity:c,objectTransparency:t},u=d.edgeMaterial,_=t),e.cachedEdgeMaterials[f]=g}else e.cachedEdgeMaterials[f]=Ke;e.cachedSymbology[m++]=Math.round(255*h[0]),e.cachedSymbology[m++]=Math.round(255*h[1]),e.cachedSymbology[m++]=Math.round(255*h[2]),e.cachedSymbology[m++]=Math.round(255*h[3]),e.cachedSymbology[m++]=d.colorMixMode|+d.castShadows<<4|+d.pickable<<5;const b=y?.emissive?.strength??pt;b===pt||e.emissiveStrengths||(e.emissiveStrengths=new Array(e.featureIds.length).fill(pt)),e.emissiveStrengths&&(e.emissiveStrengths[f]=b);const v=y?.emissive?.source||0;0===v||e.emissiveSources||(e.emissiveSources=new Array(e.featureIds.length).fill(0)),e.emissiveSources&&(e.emissiveSources[f]=v)}}_getFilteredEdgeMaterials(e){const t=this._getCachedEdgeMaterials(e);this.nodeCrossfadingEnabled||kt(t,this.fullOpacity);const i=e.filteredIds;if(null==i){return{hasEdges:t.some(e=>e!==Ke),perFeatureEdgeMaterials:t}}let s=0,r=!1;const o=t.map((t,o)=>e.featureIds[o]!==i[s]?Ke:(r=r||t!==Ke,s++,t));return{hasEdges:r,perFeatureEdgeMaterials:o}}_updateComponentData(e){if(!this._hasComponentData)return;const t=e.objectHandle,i=this._getComponentParameters(e);this._collection.setComponentData(t,i),this._stage.renderView.requestRender()}_reloadAll(e=this.elevationOffset){this._removeAllNodeDataFromStage(e),null!=this._controller&&this._controller.restartNodeLoading()}_opacityChange(e){this.nodeCrossfadingEnabled&&this._crossfadeHelper.stopAllNodeFading(),this._nodeId2Meta.forEach(t=>{null!=t&&(this._collection.updateMaterial(t.objectHandle,t=>t.objectOpacity=e),kt(t.cachedEdgeMaterials,e),this._updateEdgeRendering(t))})}_updateMaterial(e){this._collection.updateMaterial(e.objectHandle,e=>{e.commonMaterialParameters.hasSlicePlane=this.slicePlaneEnabled,e.usePBR=this._usePBR,this._updateMaterialOverlay(e)})}_updateMaterialOverlay(e){}_updateEngineObject(e){this._updateComponentData(e),this._applyFiltersToNode(e),this._addOrUpdateEdgeRendering(e),this._visibleGeometryChanged(e,2)}intersect(e,t,i,s){this._intersectionHandler.intersect(e,t,i,s,null,!1)}_slicePlaneEnabledChange(e){this._intersectionHandler&&(this._intersectionHandler.slicePlaneEnabled=e),null!=this._labeler&&(this._labeler.slicePlaneEnabled=e),this._nodeId2Meta.forEach(t=>{null!=t&&(this._collection.updateMaterial(t.objectHandle,t=>t.commonMaterialParameters.hasSlicePlane=e),this._updateEdgeRendering(t,!1))})}_updatePBR(e){this._nodeId2Meta.forEach(t=>{null!=t&&this._collection.updateMaterial(t.objectHandle,t=>t.usePBR=e)}),this._hasLoadedPBRTextures=!0}get _usePBR(){return this._shadeNormals&&this.view.qualitySettings.physicallyBasedRenderingEnabled}_updateEdgeRendering(e,t=!0){null!=this._edgeView&&this._edgeView.hasObject(e.objectHandle)&&this._addOrUpdateEdgeRendering(e,t)}_forAllNodes(e){this._nodeId2Meta.forEach(e)}_ignoreClientNodeOverriddenFeatures(e){return this.i3sOverrides.hasGeometryChanges?(t,i,s)=>s.node.index>=0&&this.i3sOverrides.featureHasGeometryChanges(t)?0:e(t,i,s):e}_forAllFeatures(e,t,i){for(const s of this._nodeId2Meta.values())if(!(null==s||t&&s.node.serviceMbsInIndexSR&&1===t(s.node.serviceMbsInIndexSR)))switch(i){case 1:this._forAllFeaturesOfNode(s,e);break;case 0:this._forAllVisibleFeaturesOfNode(s,e);break;case 2:this._forAllQueryableFeaturesOfNode(s,e)}}_forAllFeaturesOfNode(e,t){e.featureIds.forEach((i,s)=>t(i,s,e))}_forAllVisibleFeaturesOfNode(e,t){const i=e.featureIds;this._collection.forEachVisibleComponent(e.objectHandle,s=>0===t(i[s],s,e))}_forAllQueryableFeaturesOfNode(e,t){const i=this._ignoreClientNodeOverriddenFeatures(t);if(null==this._renderClippingArea)return this._forAllFeaturesOfNode(e,i);const s=this._boundingRectNodeTest(e,this._renderClippingArea);if(0===s)return;if(3===s)return this._forAllFeaturesOfNode(e,i);const r=e.featureIds,o=e.objectHandle,n=Qe(this._renderClippingArea,this._collection.getObjectTransform(o));for(let a=0;a<r.length;a++)this._boundingRectFeatureTest(e,a,n)&&i(r[a],a,e)}_createAttributes(e,t){const i={};null!=t.featureIds&&(i[this._getObjectIdField()]=t.featureIds[e]);const s=t.attributeInfo?.attributeData;if(null!=s)for(const r of Object.keys(s))i[r]=Ee(s[r],e);return i}_createGraphic(e,t){return this._createLayerGraphic(this._createAttributes(e,t))}highlight(e,t){const s=tt(e);if(0===s.length)return it;const r=bt(t),o=s[0]instanceof i?this._featureIdsFromGraphics(s):"number"==typeof s[0]?s:null;if(!o)return it;const n=this._ensureHighlights(),{set:a,handle:l}=n.acquireSet(r);return n.setFeatureIds(a,o),l}_featureIdsFromGraphics(e){const t=this.i3slayer.fieldsIndex,i=this._getObjectIdField();return e.map(e=>et(t,e.attributes,i))}_ensureHighlights(){return this._highlights??=new xe({collection:this._collection,forAllFeatures:e=>this._forAllFeatures(e,null,1),forAllFeaturesOfNode:(e,t)=>this._forAllFeaturesOfNode(e,t)}),this._highlights}resetHighlights(){this._highlights=a(this._highlights)}_visibleGeometryChanged(e,t){this._elevationProvider&&(null==this._visibleGeometryChangedSchedulerHandle&&(this._visibleGeometryChangedSchedulerHandle=m(()=>{const{node:t}=e,i=t.visibilityObbInRenderSR??t.geometryObbInRenderSR??t.serviceObbInRenderSR;if(null!=i){const e=$();i.toAaBoundingBox(e),this.emit("visible-geometry-changed",new ge(e))}else this.emit("visible-geometry-changed");this._visibleGeometryChangedSchedulerHandle=null})),this._updateSnappingSources(e,t),this._elevationProvider.notifyObjectChanged(this._collection.getComponentObb(e.objectHandle)))}get performanceInfo(){return new fe(this.usedMemory,this._nodeId2Meta.size,Math.round(this._gpuMemoryEstimate/1048576),Math.round(this._geoMemoryEstimate/1048576),Math.round(this._texMemoryEstimate/1048576),Math.round(this.unloadedMemory/1048576),this._idbCacheEnabled?Math.round(100*this._idbCache.getHitRate()):0)}checkInvariants(){}get test(){}getNodeOpacityByIndex(e){const t=this._nodeId2Meta.get(e);return this.getNodeOpacity(t)}getNodeOpacity(e){return null!=e?this._collection.getMaterial(e.objectHandle).objectOpacity:0}isNodeFullyFadedIn(e){return this._crossfadeHelper.isNodeFullyFadedIn(e)}getNodeCrossfadeMetaData(e){return this._nodeId2Meta.get(e)}getNodeComponentHandle(e){return this._nodeId2Meta.get(e)?.objectHandle}markNodeToRemove(e){this._controller&&this._controller.markNodeToRemove(e)}removeMarkedNodes(){this._controller&&this._controller.removeMarkedNodes()}foreachCrossfadeNode(e){this._nodeId2Meta.forEach(e)}fadeNode(e,t,i){if(!this.nodeCrossfadingEnabled)return;const s=this._nodeId2Meta.get(e);null!=s&&this._crossfadeHelper.fadeNode(e,s,t,i)}setNodeOpacityByIndex(e,t){const i=this._nodeId2Meta.get(e);null!=i&&this._setNodeOpacity(i,t)}_setNodeOpacity(e,t){this._collection.updateMaterial(e.objectHandle,e=>e.objectOpacity=t),this._setNodeEdgeOpacity(e,t)}_setNodeEdgeOpacity(e,t){if(null==this._edgeView||!e.cachedEdgeMaterials)return;kt(e.cachedEdgeMaterials,t);const i=e.objectHandle;this._edgeView.hasObject(i)&&this._edgeView.updateAllComponentOpacities(i,t).catch(e=>this._logEdgeViewError(e,this.i3slayer.title))}get hasModifications(){return this._isIntegratedMesh&&null!=this._layerClippingArea||this._modifications&&this._modifications.length>0}updateNodeModificationStatus(e){const t=e.length;if(!this.hasModifications||t<=0||!0!==this._i3sWasmLoaded)return;const i=this.uid,s=Nt(e);if(s){const t={context:i,buffer:s.buffer};be(t);const r=new Float64Array(s.buffer);e.forAll((e,t)=>{const i=r[t],s=ve(i);e.imModificationImpact=s,0!==s&&this._controller.invalidateGeometryVisibility(e.index)})}}notifyUpdate(){this.notifyChange("updating")}notifyLODUpdate(){this._controller.notifyLODUpdate()}isUpdating(){return!(!this._controller||!this._controller.updating)||!!this._visibleGeometryChangedSchedulerHandle||null!=this._labeler&&this._labeler.updating||this._crossfadeHelper?.updating||this._i3sWasmLoaded instanceof Promise||this._asyncModuleLoading>0||null!=this._elevationTask&&this._elevationTask.readyToRun||this._needFilterResolve||this._compressionTracker.compressing}trackSnappingSources(e){const t={events:e,fetchEdgeLocations:async(e,t,i)=>{const s=this._nodeId2Meta.get(e);if(null==s)throw new Error("invalid-node");const{origin:r,buffer:o}=await this._collection.extractEdgeInformation(s.objectHandle,t,i);return this._snappingLocationsApplyElevation(s,o,r),{type:"components",objectIds:s.featureIds,locations:o,origin:r}},remove:()=>s(this._snappingSourcesTrackers,t)};return this._snappingSourcesTrackers.push(t),this._nodeId2Meta.forEach((t,i)=>{if(null==t)return;const s=this._controller.getRenderMbs(t.node);s&&e.add(i,s)}),t}_snappingLocationsApplyElevation(e,t,i){if(!e.elevationOffsets||0===this.elevationInfo.mode)return;const s=t.position0,r=t.position1,o=t.componentIndex,n=H(),a=H(),l=(e,t)=>{V(e,e,i),this.view.renderCoordsHelper.worldUpAtPosition(e,a),V(e,e,D(a,a,t)),A(e,e,i)};for(let d=0;d<s.count;d++){const t=e.elevationOffsets[o.get(d)];s.getVec(d,n),l(n,t),s.setVec(d,n),r.getVec(d,n),l(n,t),r.setVec(d,n)}}_updateSnappingSources(e,t){const{index:i}=e.node,s=this._controller.getRenderMbs(e.node);if(null!=s)for(const r of this._snappingSourcesTrackers)1!==t&&2!==t||r.events.remove(i),0!==t&&2!==t||r.events.add(i,s)}_logEdgeViewError(e,t){h(e)||o.getLogger(this).warn("Error while processing edges. Edges on this layer might not display correctly",t,e)}_indexedDbSizeCheck(e,t){return t.byteSize>xt?(o.getLogger(this).warn(`Node is too big to store in IndexedDB cache: ${e.id} (${t.byteSize} bytes)`),!1):t.byteSize>0}get elevationProvider(){return this._elevationProvider}};return e([y()],T.prototype,"_hasLoadedPBRTextures",void 0),e([y()],T.prototype,"_asyncModuleLoading",void 0),e([y()],T.prototype,"_visibleGeometryChangedSchedulerHandle",void 0),e([y()],T.prototype,"view",void 0),e([y()],T.prototype,"i3slayer",void 0),e([y()],T.prototype,"_controller",void 0),e([y()],T.prototype,"_labeler",void 0),e([y()],T.prototype,"updating",void 0),e([y()],T.prototype,"suspended",void 0),e([y()],T.prototype,"contentVisible",null),e([y({readOnly:!0})],T.prototype,"legendEnabled",null),e([y(dt)],T.prototype,"updatingProgress",void 0),e([y()],T.prototype,"updatingProgressValue",null),e([y()],T.prototype,"hasTexturesOrVertexColors",null),e([y()],T.prototype,"rendererTextureUsage",null),e([y()],T.prototype,"elevationOffset",null),e([y()],T.prototype,"elevationInfo",null),e([y({type:Boolean})],T.prototype,"slicePlaneEnabled",void 0),e([y()],T.prototype,"supportedTextureEncodings",null),e([y({type:[ne]})],T.prototype,"_modifications",void 0),e([y({readOnly:!0})],T.prototype,"clientGeometry",null),e([y()],T.prototype,"elevationRange",null),e([y()],T.prototype,"fullExtent",null),e([y()],T.prototype,"_elevationTask",void 0),e([y({readOnly:!0})],T.prototype,"_usePBR",null),T=e([b("esri.views.3d.layers.I3SMeshView3D")],T),T},Et=$(),Ot=Q(),Rt=Q(),jt=new at,Ft=new t([0,0,0,0]),Vt=new te(0,0,0,0);function Dt(e){if(null==e)return!1;const t=e.metallicRoughness;return t&&t.baseColorTextureId>=0||t&&t.metallicRoughnessTextureId>=0||e.normalTextureId>=0||e.emissiveTextureId>=0||e.occlusionTextureId>=0}function At(e){return"geometryData"in e}function Tt(e){return null!=e&&p(e.data)}function Ht(e,t){let i=1024+e.interleavedVertexData.byteLength+(e.indices?e.indices.byteLength:0)+e.positionData.data.byteLength+e.positionData.indices.byteLength;if(null!=t)for(const s of t)null!=s&&p(s.data)&&(i+=s.data.byteLength);return i}function Nt(e){if(0===e.length)return;const t=10*e.length,i=new Float64Array(t);let s=0;return e.forAll(e=>{let t=e.serviceObbInIndexSR;null==t&&(t=jt,e.serviceMbsInIndexSR?(t.center=e.serviceMbsInIndexSR.center,t.halfSize=[e.serviceMbsInIndexSR.radius,e.serviceMbsInIndexSR.radius,e.serviceMbsInIndexSR.radius]):t.invalidate());const r=t.data;i[s++]=r[0],i[s++]=r[1],i[s++]=r[2],i[s++]=r[3],i[s++]=r[4],i[s++]=r[5],i[s++]=r[6],i[s++]=r[7],i[s++]=r[8],i[s++]=r[9]}),i}class Pt{constructor(e,t,i){this.attributeInfo=e,this.meta=t,this.promise=i,this.allowMemCache=!0}}function kt(e,t){e.forEach(e=>e.opacity=t)}class Lt{constructor(e,t){this.mode=e,this.offset=t}}const Ut=H(),Gt=$(),Bt="elevation-change",qt="",zt="@null",Wt="@ECEF",$t=[[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]],Kt=new ot;function Qt(e,t,i){let s=e.minElevation,r=e.maxElevation;const o=i;if(o>0){t.getCorners($t);for(const e of $t){const t=T(e)-o;s=Math.min(s,t),r=Math.max(r,t)}}else{t.getCorners($t);for(const e of $t){const t=e[2];s=Math.min(s,t),r=Math.max(r,t)}}e.expandElevationRangeValues(s,r)}function Jt(e,t,i){const{center:s,radius:r}=t,o=i>0?T(s)-i:s[2];e.expandElevationRangeValues(o-r,o+r)}function Yt(e,t){const i=e.featureIds.slice();for(const s of t)if(s(i,e),0===i.length)break;return i.length===e.featureIds.length?e.featureIds:i}function Xt(e,t,i){const s=new Array,r=e.filteredIds;if(null==r||t?.size||i?.size){if(null!=r){let o=0;e.featureIds.forEach((e,n)=>{if(r[o]===e)++o;else if(!t?.has(e))return;i?.has(e)||s.push(n)})}}else e.featureIds.forEach((e,t)=>{r[s.length]===e&&s.push(t)});return s}function Zt(e,t,i){if(e&&t)for(const s of t){const t=(e.get(s)??0)+i;t>0?e.set(s,t):e.delete(s)}}function ei(e,t=0){const i=new Map;for(const s of e){Zt(i,0===t?s?.featureIds:1===t?s?.filteredIds:s?.weaklyRemovedIds,1)}return i}export{St as I3SMeshView3D};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import{destroyHandle as t}from"../../../core/handleUtils.js";import{watch as i,syncAndInitial as r,initial as s}from"../../../core/reactiveUtils.js";import{property as h,subclass as a}from"../../../core/accessorSupport/decorators.js";import l from"./DynamicLayerView3D.js";import n from"./ImagerySubView3D.js";import{ImageHighlightHelper3D as o}from"./support/ImageHighlightHelper3D.js";import p from"../support/flow/FlowSubViewExtent3D.js";import{ImageryLayerViewMixin as d}from"../../layers/ImageryLayerViewMixin.js";let g=class extends(d(l)){constructor(){super(...arguments),this.type="imagery-3d"}get highlightOptions(){return null}get pixelData(){return null}initialize(){const e=()=>this._updatingHandles.addPromise(this.refreshDebounced());this._updatingHandles.add(()=>this.layer?.exportImageServiceParameters?.version,e),this._updatingHandles.add(()=>this.layer?.renderer,e),this._updatingHandles.add(()=>this.timeExtent,e),this._highlightHelper=new o({view:this.view,layer:this.layer,updatingHandles:this._updatingHandles}),this.addHandles([t(this._highlightHelper),i(()=>this.suspended,e=>this._highlightHelper.suspended=e,r)])}_initSubView(){this.addHandles([i(()=>this.layer.renderer,e=>this._recreateSubView(e),s)])}_recreateSubView(e){const t="flow"===e?.type,i="flow"===this.subView?.type,r=this.subView;r&&t===i||(this.subView=t?new p({layerView:this}):new n({layerView:this}),r?.destroy())}getFetchOptions(){return{timeExtent:this.timeExtent}}highlight(e,t){return this._highlightHelper.highlight(e,t)}isUpdating(){return super.isUpdating()||this._highlightHelper.updating}};e([h()],g.prototype,"highlightOptions",null),e([h()],g.prototype,"pixelData",null),g=e([a("esri.views.3d.layers.ImageryLayerView3D")],g);const u=g;export{u as default};
5
+ import{__decorate as e}from"tslib";import t from"../../../core/Collection.js";import{destroyHandle as i,makeHandle as r}from"../../../core/handleUtils.js";import{watch as s,syncAndInitial as l,initial as o}from"../../../core/reactiveUtils.js";import{property as h,subclass as a}from"../../../core/accessorSupport/decorators.js";import n from"./DynamicLayerView3D.js";import p from"./ImagerySubView3D.js";import{ImageHighlightHelper3D as d}from"./support/ImageHighlightHelper3D.js";import g from"../support/flow/FlowSubViewExtent3D.js";import{ImageryLayerViewMixin as u}from"../../layers/ImageryLayerViewMixin.js";import{isPixelHighlightTarget as m}from"../../layers/support/highlightUtils.js";let y=class extends(u(n)){constructor(){super(...arguments),this.type="imagery-3d"}get highlightOptions(){return null}get pixelData(){return null}initialize(){const e=()=>this._updatingHandles.addPromise(this.refreshDebounced());this._updatingHandles.add(()=>this.layer?.exportImageServiceParameters?.version,e),this._updatingHandles.add(()=>this.layer?.renderer,e),this._updatingHandles.add(()=>this.timeExtent,e),this._highlightHelper=new d({view:this.view,layer:this.layer,updatingHandles:this._updatingHandles}),this.addHandles([i(this._highlightHelper),s(()=>this.suspended,e=>this._highlightHelper.suspended=e,l)])}_initSubView(){this.addHandles([s(()=>this.layer.renderer,e=>this._recreateSubView(e),o)])}_recreateSubView(e){const t="flow"===e?.type,i="flow"===this.subView?.type,r=this.subView;r&&t===i||(this.subView=t?new g({layerView:this}):new p({layerView:this}),r?.destroy())}getFetchOptions(){return{timeExtent:this.timeExtent}}highlight(e,i){if("number"==typeof e||"string"==typeof e||m(e))return r();if(Array.isArray(e)||t.isCollection(e)){const t=e.at(0);if(null==t||"number"==typeof t||"string"==typeof t)return r()}return this._highlightHelper.highlight(e,i)}isUpdating(){return super.isUpdating()||this._highlightHelper.updating}};e([h()],y.prototype,"highlightOptions",null),e([h()],y.prototype,"pixelData",null),y=e([a("esri.views.3d.layers.ImageryLayerView3D")],y);const c=y;export{c as default};