@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
@@ -8,10 +8,9 @@ import{betaRayleigh as e,betaCombined as t,betaMie as a}from"./atmosphereUtils.j
8
8
  if(ray.x == 1.0) {
9
9
  return vec3(0);
10
10
  }
11
- ${r(p,"if (terrainDepth != -1.0) { ray.w = terrainDepth; }")}
11
+ ${r(p,"\n if (terrainDepth != -1.0) ray.w = terrainDepth;\n float multiplier = ray.y == 1.0 ? -1.0 : 1.0;\n ","\n if (ray.y == 1.0) return vec3(0);\n const float multiplier = 1.0;\n ")}
12
12
 
13
13
  vec3 samplePoint = cameraPosition + rayDir * ray.w;
14
- float multiplier = ray.y == 1.0 ? -1.0 : 1.0;
15
14
 
16
15
  vec3 scattering = vec3(0);
17
16
  float scaleFract = (length(samplePoint) - radii[0]) / scaleHeight;
@@ -39,12 +38,11 @@ import{betaRayleigh as e,betaCombined as t,betaMie as a}from"./atmosphereUtils.j
39
38
 
40
39
  float mu = dot(rayDir, lightDir);
41
40
  float mumu = 1.0 + mu * mu;
42
-
43
41
  float phaseRayleigh = 0.0596831 * mumu;
44
- ${p?"return 3.0 * scattering * stepSize * phaseRayleigh * betaRayleigh;":s`
45
- const float g = 0.8;
46
- const float gg = g * g;
47
- float phaseMie = 0.1193662 * ((1.0 - gg) * mumu) / (pow(1.0 + gg - 2.0 * mu * g, 1.5) * (2.0 + gg));
48
- phaseMie = clamp(phaseMie, 0.0, 128.0);
49
- return 3.0 * scattering * stepSize * (phaseRayleigh * betaRayleigh + 0.025 * phaseMie * betaMie);`}
42
+ ${r(p,"return 3.0 * scattering * stepSize * phaseRayleigh * betaRayleigh;",s`
43
+ const float g = 0.8;
44
+ const float gg = g * g;
45
+ float phaseMie = 0.1193662 * ((1.0 - gg) * mumu) / (pow(1.0 + gg - 2.0 * mu * g, 1.5) * (2.0 + gg));
46
+ phaseMie = clamp(phaseMie, 0.0, 128.0);
47
+ return 3.0 * scattering * stepSize * (phaseRayleigh * betaRayleigh + 0.025 * phaseMie * betaMie);`)}
50
48
  }`)}export{o as ChapmanRaymarching};
@@ -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{neverReached as t}from"../../../core/compilerUtils.js";import{clamp as a}from"../../../core/mathUtils.js";import{signal as e}from"../../../core/signal.js";import{rotate as s}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{IDENTITY as i,create as r}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{F as h,n as o,j as n,d as c,b as d,e as l}from"../../../chunks/vec32.js";import{create as _,fromValues as u}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as f,fromPoints as p,axis as m}from"../../../geometry/support/axisAngleDegrees.js";import{earth as F}from"../../../geometry/support/Ellipsoid.js";import{ensureClouds as P}from"./Clouds.js";import{heightLimit as x}from"./weather.js";class v{constructor(){this.startTime=0,this._data=e(null),this.coverage=0,this.absorption=0,this._readChannels=0,this.parallax=new g,this.parallaxNew=new g,this._anchorPoint=_(),this._fadeState=e(0),this._fadeFactor=e(1)}get data(){return this._data.value}set data(t){this._data.value=t}get readChannels(){return this._readChannels}get fadeState(){return this._fadeState.value}get fadeFactor(){return this._fadeFactor.value}get opacity(){switch(this.fadeState){case 0:return 0;case 4:return 1-this.fadeFactor;case 1:return this.fadeFactor;case 2:case 3:return 1}}fade(t,e,s){this.isFading&&this.fadeFactor<1&&(this._fadeFactor.value=s?a((e-this.startTime)/(b*s),0,1):1,1===this.fadeFactor&&this._endFade()),this._evaluateState(t,e),this._updateParallax(t)}_evaluateState(t,a){const e=t.relativeElevation,s=this._updateAnchorPoint(t);(e>1.7*x||e<-x||s>k)&&this.opacity>0?this._startFade(0,a):this.isFading||(e>x||e<-.35*x||s>j*k?this.opacity>0&&this._startFade(4,a):P(this.data)&&(0===this.opacity?this._startFade(1,a):2===this.data.state&&(2===this.fadeState?this._startFade(3,a):this._startFade(2,a))))}_updateParallax(t){const a=h(t.eye);this.parallax.radiusCurvatureCorrection=.84*Math.sqrt(Math.max(a-F.radius*F.radius,0))/Math.sqrt(a),p(w,this.parallax.anchorPoint,S),s(this.parallax.transform,i,S[3],m(S)),p(w,this.parallaxNew.anchorPoint,S),s(this.parallaxNew.transform,i,S[3],m(S))}_updateAnchorPoint(t){return o(this._anchorPoint,t.eye),n(this._anchorPoint,this._anchorPoint,F.radius),0===this.fadeState&&2===this.data?.state?(c(this.parallax.anchorPoint,this._anchorPoint),0):d(l(C,this.parallax.anchorPoint,this._anchorPoint))}requestFade(){this._fadeFactor.value=0}_startFade(t,a){switch(this._fadeState.value=t,this.startTime=a,t){case 3:this.requestFade(),this._switchReadChannels(),c(this.parallaxNew.anchorPoint,this._anchorPoint);break;case 1:this.requestFade(),this._switchReadChannels(),c(this.parallax.anchorPoint,this._anchorPoint),c(this.parallaxNew.anchorPoint,this._anchorPoint);break;case 4:this.requestFade();break;case 2:this._switchReadChannels(),c(this.parallax.anchorPoint,this._anchorPoint),c(this.parallaxNew.anchorPoint,this._anchorPoint),this._endFade();break;case 0:this._endFade()}}_endFade(){switch(this._fadeFactor.value=1,this.data&&2!==this.data.state&&(this.data.state=0),this.fadeState){case 3:c(this.parallax.anchorPoint,this.parallaxNew.anchorPoint),this._fadeState.value=2;break;case 1:this._fadeState.value=2;break;case 4:this._fadeState.value=0;break;case 2:case 0:break;default:t(this.fadeState)}}_switchReadChannels(){2===this.data?.state&&(this._readChannels=1-this._readChannels,this.data.state=3)}get isFading(){return 4===this.fadeState||1===this.fadeState||3===this.fadeState}}class g{constructor(){this.anchorPoint=_(),this.radiusCurvatureCorrection=0,this.transform=r()}}const w=u(0,0,1),S=f(),C=_(),b=1.25,j=.5,k=2e5;export{v as CloudsParameters};
5
+ import{neverReached as t}from"../../../core/compilerUtils.js";import{clamp as a}from"../../../core/mathUtils.js";import{signal as e}from"../../../core/signal.js";import{rotate as s}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{IDENTITY as i,create as r}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{F as h,n as o,j as n,d as c,b as d,e as l}from"../../../chunks/vec32.js";import{create as _,fromValues as u}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as f,fromPoints as p,axis as m}from"../../../geometry/support/axisAngleDegrees.js";import{earth as F}from"../../../geometry/support/Ellipsoid.js";import{ensureClouds as P}from"./Clouds.js";import{heightLimit as x}from"./weather.js";class v{constructor(){this.startTime=0,this._data=e(null),this.coverage=0,this.absorption=0,this._readChannels=0,this.parallax=new g,this.parallaxNew=new g,this._anchorPoint=_(),this._fadeState=e(0),this._fadeFactor=e(1)}get data(){return this._data.value}set data(t){this._data.value=t}get readChannels(){return this._readChannels}get fadeState(){return this._fadeState.value}get fadeFactor(){return this._fadeFactor.value}get opacity(){switch(this.fadeState){case 0:return 0;case 4:return 1-this.fadeFactor;case 1:return this.fadeFactor;case 2:case 3:return 1}}fade(t,e,s){this.isFading&&this.fadeFactor<1&&(this._fadeFactor.value=s?a((e-this.startTime)/(C*s),0,1):1,1===this.fadeFactor&&this._endFade()),this._evaluateState(t,e),this._updateParallax(t)}_evaluateState(t,a){const e=t.relativeElevation,s=this._updateAnchorPoint(t);(Math.abs(e)>1.7*x||s>k)&&this.opacity>0?this._startFade(0,a):this.isFading||(Math.abs(e)>x||s>j*k?this.opacity>0&&this._startFade(4,a):P(this.data)&&(0===this.opacity?this._startFade(1,a):2===this.data.state&&(2===this.fadeState?this._startFade(3,a):this._startFade(2,a))))}_updateParallax(t){const a=h(t.eye);this.parallax.radiusCurvatureCorrection=.84*Math.sqrt(Math.max(a-F.radius*F.radius,0))/Math.sqrt(a),p(w,this.parallax.anchorPoint,S),s(this.parallax.transform,i,S[3],m(S)),p(w,this.parallaxNew.anchorPoint,S),s(this.parallaxNew.transform,i,S[3],m(S))}_updateAnchorPoint(t){return o(this._anchorPoint,t.eye),n(this._anchorPoint,this._anchorPoint,F.radius),0===this.fadeState&&2===this.data?.state?(c(this.parallax.anchorPoint,this._anchorPoint),0):d(l(b,this.parallax.anchorPoint,this._anchorPoint))}requestFade(){this._fadeFactor.value=0}_startFade(t,a){switch(this._fadeState.value=t,this.startTime=a,t){case 3:this.requestFade(),this._switchReadChannels(),c(this.parallaxNew.anchorPoint,this._anchorPoint);break;case 1:this.requestFade(),this._switchReadChannels(),c(this.parallax.anchorPoint,this._anchorPoint),c(this.parallaxNew.anchorPoint,this._anchorPoint);break;case 4:this.requestFade();break;case 2:this._switchReadChannels(),c(this.parallax.anchorPoint,this._anchorPoint),c(this.parallaxNew.anchorPoint,this._anchorPoint),this._endFade();break;case 0:this._endFade()}}_endFade(){switch(this._fadeFactor.value=1,this.data&&2!==this.data.state&&(this.data.state=0),this.fadeState){case 3:c(this.parallax.anchorPoint,this.parallaxNew.anchorPoint),this._fadeState.value=2;break;case 1:this._fadeState.value=2;break;case 4:this._fadeState.value=0;break;case 2:case 0:break;default:t(this.fadeState)}}_switchReadChannels(){2===this.data?.state&&(this._readChannels=1-this._readChannels,this.data.state=3)}get isFading(){return 4===this.fadeState||1===this.fadeState||3===this.fadeState}}class g{constructor(){this.anchorPoint=_(),this.radiusCurvatureCorrection=0,this.transform=r()}}const w=u(0,0,1),S=f(),b=_(),C=1.25,j=.5,k=2e5;export{v as CloudsParameters};
@@ -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{EventedAccessor as t}from"../../../core/Evented.js";import"../../../core/has.js";import{destroyMaybe as i}from"../../../core/maybe.js";import{watch as n,when as r,sync as o,syncAndInitial as a}from"../../../core/reactiveUtils.js";import{property as s,subclass as h}from"../../../core/accessorSupport/decorators.js";import{G as l,d as c,j as g,l as p}from"../../../chunks/vec32.js";import{create as d,clone as m,fromValues as _}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{isLoadedOrLoadFor as u}from"../../../geometry/projectionUtils.js";import v from"../../../geometry/SpatialReference.js";import{projectPointToVector as f}from"../../../geometry/projection/projectPointToVector.js";import{getGCSForPlanet as w}from"../../../geometry/support/planetGCSUtils.js";import{isEarth as y}from"../../../geometry/support/spatialReferenceUtils.js";import{EnvironmentRenderer as P}from"./EnvironmentRenderer.js";import{positionToTimezoneInfo as b}from"../support/earthUtils.js";import{ColorAndIntensity as T,computeColorAndIntensity as j,computeVirtualLightDirection as L,computeShadowsEnabled as G}from"../support/sunUtils.js";import{MainLight as U,AmbientLight as H,FillLight as C}from"../webgl-engine/lighting/Lightsources.js";let E=class extends t{constructor(e){super(e),this._tmpLightParameters=new T,this._defaultLightParameters=new T,this._tmpDate=new Date,this._tmpTz={hours:0,minutes:0,seconds:0},this._viewHandlesKey="viewHandles",this._trackingEnabled=!1,this._mainLight=new U,this._ambientLight=new H,this._moonLight=new C,this._disableWeather=!1,this._renderer=null,this._resetReferencePosition()}destroy(){this.disconnectView()}get _view(){return this._renderer?.view}get updating(){return!!this._renderer?.updating||!this._canProjectCameraPosition}get weatherEnabled(){return this._view?.environment.atmosphereEnabled&&!this._disableWeather&&1===this._view?.state?.viewingMode&&y(this._view.spatialReference)}get _weatherAvailable(){return this.weatherEnabled&&this._renderer?.weatherAvailable}get referencePositionGeographic(){return this._referencePositionGeographic}get _canProjectCameraPosition(){const e=this._view?.stateManager?.camera?.position?.spatialReference??v.WGS84,t=w(e);return u(e,t)}connectView(e){if(this._renderer)return;this._renderer=new P({view:e});const t=()=>this._updateRenderParameters(),i=()=>this._cameraHandler();this.addHandles([n(()=>e.environment.lighting,e=>this._updateLightingHandler(e),o),n(()=>"virtual"!==e.environment.lighting.type?e.environment.lighting.date:null,e=>this._lightingDateHandler(e),o),n(()=>e.environment.lighting.directShadowsEnabled,t,o),n(()=>e.spatialReference,()=>this._resetReferencePosition(!0),o),n(()=>[e.environment.weather.type,this.weatherEnabled],()=>this._updateLighting(null,1),o),n(()=>"snowy"===e.environment.weather.type&&e.environment.weather.snowCover,t,o),n(()=>e.environment,e=>e.setComputeWeatherAvailable(()=>this._weatherAvailable),a),n(()=>e.viewingMode,()=>this._resetReferencePosition(!0),a),n(()=>"virtual"!==e.environment.lighting.type&&e.environment.lighting.cameraTrackingEnabled,e=>this._updateCameraTracking(e),a),n(()=>e.state.camera,i,a),r(()=>this._canProjectCameraPosition,i,o)],this._viewHandlesKey),this._updateRenderParameters(),this._updateLighting(),this._cameraHandler(),this.notifyChange("updating")}disconnectView(){this.removeHandles(this._viewHandlesKey),this._resetReferencePosition(),this._renderer=i(this._renderer)}_updateLightingHandler(e){this._updateCameraTracking("virtual"!==e.type&&e.cameraTrackingEnabled),this._lightingDateHandler("virtual"!==e.type?e.date:null),this._updateRenderParameters()}_updateCameraTracking(e){if(this._trackingEnabled=e,e)this._cameraHandler();else{const e=this._view.environment.lighting;"virtual"!==e?.type&&(e.positionTimezoneInfo.autoUpdated=!1)}}_lightingDateHandler(e){const t=this._view.environment.lighting;if("virtual"!==t?.type){if(e){if(!t.positionTimezoneInfo.autoUpdated&&(this._preupdateTracking(e),null!=this._referencePositionGeographic)){const e=b(this._referencePositionGeographic,this._tmpTz);null!=e&&(t.autoUpdate(null,e),this._trackingEnabled&&(t.positionTimezoneInfo.autoUpdated=!0))}this._updateLighting(e)}}else this._updateLighting()}_preupdateTracking(e){!this._trackingEnabled&&"virtual"!==this._view.environment.lighting.type&&this._view.environment.lighting.cameraTrackingEnabled&&this._cameraHandler(e)}_cameraHandler(e=null){const t=this._view;if(!t.ready)return;const i=t.stateManager.camera;if(!i)return;const{position:n}=i,r=n.spatialReference??v.WGS84,o=w(r);if(!f(n,k,o)){if(null==this._referencePositionGeographic)return;return this._referencePositionGeographic=null,void this._updateLighting()}this._referencePositionGeographic?l(this._referencePositionGeographic,k)||(c(this._referencePositionGeographic,k),this.notifyChange("referencePositionGeographic")):this._referencePositionGeographic=m(k),this._autoUpdateTimezone(this._referencePositionGeographic,e)||this._updateLighting(e)}_updateLighting(e,t=0){const i=this._view,{lighting:n}=i.environment,r="virtual"===n.type,o=this._referencePositionGeographic,a=null!=o?this._tmpLightParameters:this._defaultLightParameters;if(o){e??=r?null:n.date;const t=this._weatherAvailable?i.environment.weather.type:"disabled";j(e,o,i.state.viewingMode,t,i.state.camera,a)}else r&&L(i.state.camera,i.state.viewingMode,a.direct.directionToLightSource);const s=this._mainLight,h=a.direct;g(s.intensity,h.color,h.intensity*Math.PI),c(s.direction,h.directionToLightSource),s.specularStrength=a.specularStrength,s.environmentStrength=a.environmentStrength;const l=this._ambientLight;g(l.intensity,a.ambient.color,a.ambient.intensity);const d=this._moonLight;p(d.intensity,R,S,a.globalFactor);const m=(1-.5*a.globalFactor)*(1-.4*a.noonFactor*(1-a.globalFactor));g(d.intensity,d.intensity,m),c(d.direction,h.directionToLightSource),this._view.stage?.renderer.updateLighting([s,l,d],a.noonFactor,a.globalFactor,this._weatherAvailable?t:0),this._updateRenderParameters()}_autoUpdateTimezone(e,t=null){if("virtual"===this._view.environment.lighting.type||!this._view.environment.lighting.cameraTrackingEnabled||null==e)return!1;const i=this._tmpDate;i.setTime((t||this._view.environment.lighting.date).getTime());const n=b(e,this._tmpTz);if(null==n)return!1;let r=this._view.environment.lighting.positionTimezoneInfo;if(r.autoUpdated){if(r.hours===n.hours&&r.minutes===n.minutes&&r.seconds===n.seconds)return!1}else r=n;const o=i.getUTCHours()-(n.hours-r.hours),a=i.getUTCMinutes()-(n.minutes-r.minutes),s=i.getUTCSeconds()-(n.seconds-r.seconds);return i.setUTCHours(o),i.setUTCMinutes(a),i.setUTCSeconds(s),!t&&this._view.environment.lighting.autoUpdate(i,n)}_updateRenderParameters(){const e=this._view.stage;if(!e)return;const t=null==this._referencePositionGeographic||G(this._referencePositionGeographic[2],this._view.state.viewingMode);e.renderer.setParameters({shadowMap:this._view.environment.lighting.directShadowsEnabled&&t,environment:this._view.environment,weatherVisible:this._weatherAvailable})}_resetReferencePosition(e=!1){this._referencePositionGeographic=null,e&&this._cameraHandler()}get test(){}};e([s({type:Boolean,readOnly:!0})],E.prototype,"updating",null),e([s()],E.prototype,"_disableWeather",void 0),e([s()],E.prototype,"weatherEnabled",null),e([s()],E.prototype,"_weatherAvailable",null),e([s()],E.prototype,"referencePositionGeographic",null),e([s()],E.prototype,"_referencePositionGeographic",void 0),e([s()],E.prototype,"_renderer",void 0),e([s()],E.prototype,"_canProjectCameraPosition",null),E=e([h("esri.views.3d.environment.EnvironmentManager")],E);const R=_(.22,.22,.33),S=_(.22,.22,.22),k=d();export{E as EnvironmentManager};
5
+ import{__decorate as e}from"tslib";import{EventedAccessor as t}from"../../../core/Evented.js";import"../../../core/has.js";import{destroyMaybe as i}from"../../../core/maybe.js";import{watch as n,when as r,sync as o,syncAndInitial as s}from"../../../core/reactiveUtils.js";import{property as a,subclass as h}from"../../../core/accessorSupport/decorators.js";import{G as l,d as c,j as g,l as p}from"../../../chunks/vec32.js";import{create as d,clone as m,fromValues as _}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{isLoadedOrLoadFor as u}from"../../../geometry/projectionUtils.js";import v from"../../../geometry/SpatialReference.js";import{projectPointToVector as f}from"../../../geometry/projection/projectPointToVector.js";import{getGCSForPlanet as w}from"../../../geometry/support/planetGCSUtils.js";import{isEarth as P}from"../../../geometry/support/spatialReferenceUtils.js";import{EnvironmentRenderer as y}from"./EnvironmentRenderer.js";import{positionToTimezoneInfo as b}from"../support/earthUtils.js";import{ColorAndIntensity as T,computeColorAndIntensity as j,computeVirtualLightDirection as L,computeShadowsEnabled as G}from"../support/sunUtils.js";import{MainLight as U,AmbientLight as C,FillLight as H}from"../webgl-engine/lighting/Lightsources.js";let E=class extends t{constructor(e){super(e),this._tmpLightParameters=new T,this._defaultLightParameters=new T,this._tmpDate=new Date,this._tmpTz={hours:0,minutes:0,seconds:0},this._viewHandlesKey="viewHandles",this._trackingEnabled=!1,this._mainLight=new U,this._ambientLight=new C,this._moonLight=new H,this._disableWeather=!1,this._renderer=null,this._resetReferencePosition()}destroy(){this.disconnectView()}get _view(){return this._renderer?.view}get updating(){return!!this._renderer?.updating||!this._canProjectCameraPosition}get weatherEnabled(){return this._view?.environment.atmosphereEnabled&&!this._disableWeather&&1===this._view?.state?.viewingMode&&P(this._view.spatialReference)}get _weatherAvailable(){return this.weatherEnabled&&this._renderer?.weatherAvailable}get referencePositionGeographic(){return this._referencePositionGeographic}get _canProjectCameraPosition(){const e=this._view?.stateManager?.camera?.position?.spatialReference??v.WGS84,t=w(e);return u(e,t)}connectView(e){if(this._renderer)return;this._renderer=new y({view:e});const t=()=>this._updateRenderParameters(),i=()=>this._cameraHandler();this.addHandles([n(()=>e.environment.lighting,e=>this._updateLightingHandler(e),o),n(()=>"virtual"!==e.environment.lighting.type?e.environment.lighting.date:null,e=>this._lightingDateHandler(e),o),n(()=>e.environment.lighting.directShadowsEnabled,t,o),n(()=>e.spatialReference,()=>this._resetReferencePosition(!0),o),n(()=>[e.environment.weather.type,this.weatherEnabled],()=>this._updateLighting(null,1),o),n(()=>"snowy"===e.environment.weather.type&&e.environment.weather.snowCover,t,o),n(()=>e.environment,e=>e.setComputeWeatherAvailable(()=>this._weatherAvailable),s),n(()=>e.viewingMode,()=>this._resetReferencePosition(!0),s),n(()=>"virtual"!==e.environment.lighting.type&&e.environment.lighting.cameraTrackingEnabled,e=>this._updateCameraTracking(e),s),n(()=>e.state.camera,i,s),r(()=>this._canProjectCameraPosition,()=>this._resetReferencePosition(!0),o)],this._viewHandlesKey),this._updateRenderParameters(),this._updateLighting(),this._cameraHandler(),this.notifyChange("updating")}disconnectView(){this.removeHandles(this._viewHandlesKey),this._resetReferencePosition(),this._renderer=i(this._renderer)}_updateLightingHandler(e){this._updateCameraTracking("virtual"!==e.type&&e.cameraTrackingEnabled),this._lightingDateHandler("virtual"!==e.type?e.date:null),this._updateRenderParameters()}_updateCameraTracking(e){if(this._trackingEnabled=e,e)this._cameraHandler();else{const e=this._view.environment.lighting;"virtual"!==e?.type&&(e.positionTimezoneInfo.autoUpdated=!1)}}_lightingDateHandler(e){const t=this._view.environment.lighting;if("virtual"!==t?.type){if(e){if(!t.positionTimezoneInfo.autoUpdated&&(this._preupdateTracking(e),null!=this._referencePositionGeographic)){const e=b(this._referencePositionGeographic,this._tmpTz);null!=e&&(t.autoUpdate(null,e),this._trackingEnabled&&(t.positionTimezoneInfo.autoUpdated=!0))}this._updateLighting(e)}}else this._updateLighting()}_preupdateTracking(e){!this._trackingEnabled&&"virtual"!==this._view.environment.lighting.type&&this._view.environment.lighting.cameraTrackingEnabled&&this._cameraHandler(e)}_cameraHandler(e=null){const t=this._view;if(!t.ready)return;const i=t.stateManager.camera;if(!i)return;const n=i.position,r=n.spatialReference??v.WGS84,o=w(r);if(!f(n,k,o,M)){if(null==this._referencePositionGeographic)return;return this._referencePositionGeographic=null,void this._updateLighting()}this._referencePositionGeographic?l(this._referencePositionGeographic,k)||(c(this._referencePositionGeographic,k),this.notifyChange("referencePositionGeographic")):this._referencePositionGeographic=m(k),this._autoUpdateTimezone(this._referencePositionGeographic,e)||this._updateLighting(e)}_updateLighting(e,t=0){const i=this._view,{lighting:n}=i.environment,r="virtual"===n.type,o=this._referencePositionGeographic,s=null!=o?this._tmpLightParameters:this._defaultLightParameters;if(o){e??=r?null:n.date;const t=this._weatherAvailable?i.environment.weather.type:"disabled";j(e,o,i.state.viewingMode,t,i.state.camera,s)}else r&&L(i.state.camera,i.state.viewingMode,s.direct.directionToLightSource);const a=this._mainLight,h=s.direct;g(a.intensity,h.color,h.intensity*Math.PI),c(a.direction,h.directionToLightSource),a.specularStrength=s.specularStrength,a.environmentStrength=s.environmentStrength;const l=this._ambientLight;g(l.intensity,s.ambient.color,s.ambient.intensity);const d=this._moonLight;p(d.intensity,R,S,s.globalFactor);const m=(1-.5*s.globalFactor)*(1-.4*s.noonFactor*(1-s.globalFactor));g(d.intensity,d.intensity,m),c(d.direction,h.directionToLightSource),this._view.stage?.renderer.updateLighting([a,l,d],s.noonFactor,s.globalFactor,this._weatherAvailable?t:0),this._updateRenderParameters()}_autoUpdateTimezone(e,t=null){if("virtual"===this._view.environment.lighting.type||!this._view.environment.lighting.cameraTrackingEnabled||null==e)return!1;const i=this._tmpDate;i.setTime((t||this._view.environment.lighting.date).getTime());const n=b(e,this._tmpTz);if(null==n)return!1;let r=this._view.environment.lighting.positionTimezoneInfo;if(r.autoUpdated){if(r.hours===n.hours&&r.minutes===n.minutes&&r.seconds===n.seconds)return!1}else r=n;const o=i.getUTCHours()-(n.hours-r.hours),s=i.getUTCMinutes()-(n.minutes-r.minutes),a=i.getUTCSeconds()-(n.seconds-r.seconds);return i.setUTCHours(o),i.setUTCMinutes(s),i.setUTCSeconds(a),!t&&this._view.environment.lighting.autoUpdate(i,n)}_updateRenderParameters(){const e=this._view.stage;if(!e)return;const t=null==this._referencePositionGeographic||G(this._referencePositionGeographic[2],this._view.state.viewingMode);e.renderer.setParameters({shadowMap:this._view.environment.lighting.directShadowsEnabled&&t,environment:this._view.environment,weatherVisible:this._weatherAvailable})}_resetReferencePosition(e=!1){this._referencePositionGeographic=null,e&&this._cameraHandler()}get test(){}};e([a({type:Boolean,readOnly:!0})],E.prototype,"updating",null),e([a()],E.prototype,"_disableWeather",void 0),e([a()],E.prototype,"weatherEnabled",null),e([a()],E.prototype,"_weatherAvailable",null),e([a()],E.prototype,"referencePositionGeographic",null),e([a()],E.prototype,"_referencePositionGeographic",void 0),e([a()],E.prototype,"_renderer",void 0),e([a()],E.prototype,"_canProjectCameraPosition",null),E=e([h("esri.views.3d.environment.EnvironmentManager")],E);const R=_(.22,.22,.33),S=_(.22,.22,.22),k=d(),M={zConversionDisabled:!0};export{E as EnvironmentManager};
@@ -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{subclass as r}from"../../../core/accessorSupport/decorators.js";import{P as i}from"../../../chunks/Precipitation.glsl.js";import{ReloadableShader as t}from"../webgl-engine/core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as s}from"../webgl-engine/core/shaderTechnique/ShaderTechnique.js";import{NoParameters as o}from"../../webgl/NoParameters.js";import{makePipelineState as n,defaultColorWrite as a,premultipliedAlpha as c}from"../../webgl/renderState.js";class p extends o{constructor(){super(...arguments),this.time=0,this.radius=1,this.width=500,this.opacity=0}}let l=class extends s{constructor(e,r){super(e,r,new Map([["position",0],["instanceFeatureAttribute",1]])),this.shader=new t(i,()=>import("./Precipitation.glsl.js"))}initializePipeline(){return n({blending:c,depthTest:{func:515},colorWrite:a})}};l=e([r("esri.views.3d.environment.PrecipitationTechnique")],l);export{p as PrecipitationPassParameters,l as PrecipitationTechnique};
5
+ import{__decorate as e}from"tslib";import{subclass as r}from"../../../core/accessorSupport/decorators.js";import{P as t}from"../../../chunks/Precipitation.glsl.js";import{ReloadableShader as i}from"../webgl-engine/core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as s}from"../webgl-engine/core/shaderTechnique/ShaderTechnique.js";import{DataType as o}from"../../webgl/enums.js";import{NoParameters as n}from"../../webgl/NoParameters.js";import{makePipelineState as c,defaultColorWrite as m,premultipliedAlpha as a}from"../../webgl/renderState.js";import{VertexElementDescriptor as p}from"../../webgl/VertexElementDescriptor.js";class l extends n{constructor(){super(...arguments),this.time=0,this.radius=1,this.width=500,this.opacity=0}}let h=class extends s{constructor(e,r){super(e,r,[new p("position",2,o.FLOAT,0,16),new p("instanceFeatureAttribute",2,o.FLOAT,8,16)]),this.shader=new i(t,()=>import("./Precipitation.glsl.js"))}initializePipeline(){return c({blending:a,depthTest:{func:515},colorWrite:m})}};h=e([r("esri.views.3d.environment.PrecipitationTechnique")],h);export{l as PrecipitationPassParameters,h as PrecipitationTechnique};
@@ -1,6 +1,6 @@
1
1
  import type Environment from "../../../webscene/Environment.js";
2
- import type { LightingUnion } from "./lightingUtils.js";
3
2
  import type { SunLightingProperties } from "./SunLighting.js";
3
+ import type { LightingUnion } from "./types.js";
4
4
  import type { VirtualLightingProperties } from "./VirtualLighting.js";
5
5
  import type { EnvironmentProperties } from "../../../webscene/Environment.js";
6
6
 
@@ -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{subclass as r}from"../../../core/accessorSupport/decorators.js";import{a as o}from"../../../chunks/SimpleAtmosphere.glsl.js";import{newLayout as t}from"../support/buffer/InterleavedLayout.js";import{ReloadableShader as i}from"../webgl-engine/core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as s}from"../webgl-engine/core/shaderTechnique/ShaderTechnique.js";import{makePipelineState as n,defaultColorWrite as l,backFaceCullingParams as m,unpremultipliedAlphaToPremultipliedAlpha as p}from"../../webgl/renderState.js";let c=class extends s{constructor(e,r){super(e,r,a.locations),this.shader=new i(o,()=>import("./SimpleAtmosphere.glsl.js"))}initializePipeline(e){const r=1===e.geometry;return n({blending:p,culling:r?m:void 0,depthTest:{func:515},colorWrite:l})}};c=e([r("esri.views.3d.environment.SimpleAtmosphereTechnique")],c);const a=t().vec3f("position").freeze();export{c as SimpleAtmosphereTechnique,a as layout};
5
+ import{__decorate as e}from"tslib";import{subclass as r}from"../../../core/accessorSupport/decorators.js";import{a as o}from"../../../chunks/SimpleAtmosphere.glsl.js";import{glLayout as t}from"../support/buffer/glUtil.js";import{newLayout as i}from"../support/buffer/InterleavedLayout.js";import{ReloadableShader as s}from"../webgl-engine/core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as n}from"../webgl-engine/core/shaderTechnique/ShaderTechnique.js";import{makePipelineState as p,defaultColorWrite as m,backFaceCullingParams as l,unpremultipliedAlphaToPremultipliedAlpha as c}from"../../webgl/renderState.js";let a=class extends n{constructor(e,r){super(e,r,t(u)),this.shader=new s(o,()=>import("./SimpleAtmosphere.glsl.js"))}initializePipeline(e){const r=1===e.geometry;return p({blending:c,culling:r?l:void 0,depthTest:{func:515},colorWrite:m})}};a=e([r("esri.views.3d.environment.SimpleAtmosphereTechnique")],a);const u=i().vec3f("position").freeze();export{a as SimpleAtmosphereTechnique,u as layout};
@@ -0,0 +1,13 @@
1
+ import type CloudyWeather from "./CloudyWeather.js";
2
+ import type FoggyWeather from "./FoggyWeather.js";
3
+ import type RainyWeather from "./RainyWeather.js";
4
+ import type SnowyWeather from "./SnowyWeather.js";
5
+ import type SunLighting from "./SunLighting.js";
6
+ import type SunnyWeather from "./SunnyWeather.js";
7
+ import type VirtualLighting from "./VirtualLighting.js";
8
+
9
+ export type LightingUnion = SunLighting | VirtualLighting;
10
+
11
+ export type WeatherType = "sunny" | "cloudy" | "rainy" | "snowy" | "foggy";
12
+
13
+ export type WeatherUnion = SunnyWeather | CloudyWeather | RainyWeather | SnowyWeather | FoggyWeather;
@@ -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 e from"../../../Color.js";import{multiplyOpacity as i}from"../../../core/colorUtils.js";import"../../../core/has.js";import{destroyHandle as n}from"../../../core/handleUtils.js";import{l as t}from"../../../chunks/vec32.js";import{create as o}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{projectVectorToVector as r}from"../../../geometry/projection/projectVectorToVector.js";import{onTheGroundElevationInfo as l,absoluteHeightElevationInfo as a}from"../../../support/elevationInfoUtils.js";import{vectorToRender as s}from"./support/viewUtils.js";import{ExtendedLineVisualElement as c}from"./visualElements/ExtendedLineVisualElement.js";import{ParallelLineVisualElement as p}from"./visualElements/ParallelLineVisualElement.js";import{PointVisualElement as d}from"./visualElements/PointVisualElement.js";import{RightAngleQuadVisualElement as u}from"./visualElements/RightAngleQuadVisualElement.js";import{toDehydratedPoint as m,isTarget as f,withSelfSnappingZ as g}from"../../interactive/sketch/normalizedPoint.js";import{defaults as v}from"../../interactive/snapping/Settings.js";import{SnappingVisualizer as h}from"../../interactive/snapping/SnappingVisualizer.js";import{LineSnappingHint as C}from"../../interactive/snapping/hints/LineSnappingHint.js";class w extends h{sortUniqueHints(e){return e.sort((e,i)=>(i instanceof C?i.length:0)-(e instanceof C?e.length:0))}visualizeIntersectionPoint(e,i){const{spatialReference:t,view:o}=i,r=j(i);return n(new d({view:o,primitive:"circle",geometry:m(e.intersectionPoint,t),elevationInfo:e.isDraped?l:a,size:20,outlineSize:2,color:r.intersectionPointColor,outlineColor:r.intersectionPointOutlineColor,pixelSnappingEnabled:!1,isDecoration:!0,attached:!0}))}visualizePoint(e,i){const{view:t,spatialReference:o}=i,r=j(i),l=E(e.point,e.domain,i);return n(new d({view:t,primitive:"circle",geometry:m(l,o),elevationInfo:x(e),size:20,outlineSize:2,color:r.pointColor,outlineColor:r.pointOutlineColor,pixelSnappingEnabled:!1,isDecoration:!0,attached:!0}))}visualizeLine(e,i){const{view:t,spatialReference:o}=i,r=j(i),l=E(e.lineStart,e.domain,i),a=E(e.lineEnd,e.domain,i);return n(D(e.type,l,a,o,x(e),t,r,e.isDraped,e.fadeLeft,e.fadeRight))}visualizeParallelSign(e,i){const{view:o,spatialReference:r}=i,l=j(i),{isDraped:a}=e,s=x(e),c=E(e.lineStart,e.domain,i),d=E(e.lineEnd,e.domain,i),u=S(c,r,s,o,a),m=S(d,r,s,o,a),f=t(m,u,m,.5),g=new p({view:o,attached:!1,offset:v.parallelLineHintOffset,length:v.parallelLineHintLength,width:v.parallelLineHintWidth,color:l.parallelSignColor,location:f,renderOccluded:a?4:16,isDraped:a,renderGroup:3,isDecoration:!0});return g.setDirectionFromPoints(u,f),g.attached=!0,n(g)}visualizeRightAngleQuad(e,i){const{view:t,spatialReference:o}=i,r=j(i),l=x(e),{isDraped:a}=e,s=E(e.previousVertex,e.domain,i),c=E(e.centerVertex,e.domain,i),p=E(e.nextVertex,e.domain,i),d=S(s,o,l,t,a),m=S(c,o,l,t,a),f=S(p,o,l,t,a);return n(new u({view:t,attached:!0,color:a?r.rightAngleColorDraped:r.rightAngleColor,renderOccluded:a?4:2,outlineRenderOccluded:a?4:16,outlineColor:r.rightAngleOutlineColor,outlineSize:v.rightAngleHintOutlineSize,size:v.rightAngleHintSize,isDraped:a,geometry:{previous:d,center:m,next:f},renderGroup:3,isDecoration:!0}))}}function j(n){const{effectiveTheme:t}=n.view,o=e.toUnitRGBA(t.accentColor),r=[0,0,0,0];return{intersectionPointColor:r,intersectionPointOutlineColor:o,pointColor:r,pointOutlineColor:o,lineColor:o,lineOutlineColor:void 0,parallelSignColor:o,rightAngleColor:o,rightAngleColorDraped:e.toUnitRGBA(i(t.accentColor,.5)),rightAngleOutlineColor:o}}function E(e,i,{selfSnappingZ:n,view:t,spatialReference:o}){return 2&i&&f(e)&&null!=n?g(e,n,t,o):e}function x(e){return e.isDraped?l:a}function D(e,i,n,t,o,r,l,a=!1,s=!0,p=!0){const d=S(i,t,o,r,a),u=S(n,t,o,r,a),m=new c({view:r,extensionType:3,start:d,end:u,isDraped:a,color:l.lineColor,renderOccluded:a?4:16,renderGroup:3,isDecoration:!0});switch(e){case 0:m.width=v.lineHintWidthTarget,m.fadedExtensions={start:0,end:v.lineHintFadedExtensions};break;case 2:m.width=v.lineHintWidthReference,m.fadedExtensions={start:0,end:0};break;case 1:m.width=v.lineHintWidthReference,m.fadedExtensions={start:s?v.lineHintFadedExtensions:0,end:p?v.lineHintFadedExtensions:0}}return m.attached=!0,m}function S(e,i,n,t,l){const a=o();if(l){const n=t.overlayManager.spatialReference;r(e,i,a,n)}else s(e,i,n,t,a);return a}export{w as SnappingVisualizer3D};
5
+ import{multiplyOpacity as e}from"../../../core/colorUtils.js";import"../../../core/has.js";import{destroyHandle as i}from"../../../core/handleUtils.js";import{l as n}from"../../../chunks/vec32.js";import{create as t}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{projectVectorToVector as o}from"../../../geometry/projection/projectVectorToVector.js";import{onTheGroundElevationInfo as r,absoluteHeightElevationInfo as l}from"../../../support/elevationInfoUtils.js";import{vectorToRender as a}from"./support/viewUtils.js";import{ExtendedLineVisualElement as s}from"./visualElements/ExtendedLineVisualElement.js";import{ParallelLineVisualElement as c}from"./visualElements/ParallelLineVisualElement.js";import{PointVisualElement as d}from"./visualElements/PointVisualElement.js";import{RightAngleQuadVisualElement as p}from"./visualElements/RightAngleQuadVisualElement.js";import{toDehydratedPoint as u,isTarget as m,withSelfSnappingZ as f}from"../../interactive/sketch/normalizedPoint.js";import{defaults as g}from"../../interactive/snapping/Settings.js";import{SnappingVisualizer as v}from"../../interactive/snapping/SnappingVisualizer.js";import{LineSnappingHint as h}from"../../interactive/snapping/hints/LineSnappingHint.js";class C extends v{sortUniqueHints(e){return e.sort((e,i)=>(i instanceof h?i.length:0)-(e instanceof h?e.length:0))}visualizeIntersectionPoint(e,n){const{spatialReference:t,view:o}=n,a=w(n);return i(new d({view:o,primitive:"circle",geometry:u(e.intersectionPoint,t),elevationInfo:e.isDraped?r:l,size:20,outlineSize:2,color:a.intersectionPointColor,outlineColor:a.intersectionPointOutlineColor,pixelSnappingEnabled:!1,isDecoration:!0,attached:!0}))}visualizePoint(e,n){const{view:t,spatialReference:o}=n,r=w(n),l=E(e.point,e.domain,n);return i(new d({view:t,primitive:"circle",geometry:u(l,o),elevationInfo:j(e),size:20,outlineSize:2,color:r.pointColor,outlineColor:r.pointOutlineColor,pixelSnappingEnabled:!1,isDecoration:!0,attached:!0}))}visualizeLine(e,n){const{view:t,spatialReference:o}=n,r=w(n),l=E(e.lineStart,e.domain,n),a=E(e.lineEnd,e.domain,n);return i(x(e.type,l,a,o,j(e),t,r,e.isDraped,e.fadeLeft,e.fadeRight))}visualizeParallelSign(e,t){const{view:o,spatialReference:r}=t,l=w(t),{isDraped:a}=e,s=j(e),d=E(e.lineStart,e.domain,t),p=E(e.lineEnd,e.domain,t),u=D(d,r,s,o,a),m=D(p,r,s,o,a),f=n(m,u,m,.5),v=new c({view:o,attached:!1,offset:g.parallelLineHintOffset,length:g.parallelLineHintLength,width:g.parallelLineHintWidth,color:l.parallelSignColor,location:f,renderOccluded:a?4:16,isDraped:a,renderGroup:3,isDecoration:!0});return v.setDirectionFromPoints(u,f),v.attached=!0,i(v)}visualizeRightAngleQuad(e,n){const{view:t,spatialReference:o}=n,r=w(n),l=j(e),{isDraped:a}=e,s=E(e.previousVertex,e.domain,n),c=E(e.centerVertex,e.domain,n),d=E(e.nextVertex,e.domain,n),u=D(s,o,l,t,a),m=D(c,o,l,t,a),f=D(d,o,l,t,a);return i(new p({view:t,attached:!0,color:a?r.rightAngleColorDraped:r.rightAngleColor,renderOccluded:a?4:2,outlineRenderOccluded:a?4:16,outlineColor:r.rightAngleOutlineColor,outlineSize:g.rightAngleHintOutlineSize,size:g.rightAngleHintSize,isDraped:a,geometry:{previous:u,center:m,next:f},renderGroup:3,isDecoration:!0}))}}function w(i){const{effectiveTheme:n}=i.view,t=n.accentColor.toUnitRGBA(),o=[0,0,0,0];return{intersectionPointColor:o,intersectionPointOutlineColor:t,pointColor:o,pointOutlineColor:t,lineColor:t,lineOutlineColor:void 0,parallelSignColor:t,rightAngleColor:t,rightAngleColorDraped:e(n.accentColor,.5).toUnitRGBA(),rightAngleOutlineColor:t}}function E(e,i,{selfSnappingZ:n,view:t,spatialReference:o}){return 2&i&&m(e)&&null!=n?f(e,n,t,o):e}function j(e){return e.isDraped?r:l}function x(e,i,n,t,o,r,l,a=!1,c=!0,d=!0){const p=D(i,t,o,r,a),u=D(n,t,o,r,a),m=new s({view:r,extensionType:3,start:p,end:u,isDraped:a,color:l.lineColor,renderOccluded:a?4:16,renderGroup:3,isDecoration:!0});switch(e){case 0:m.width=g.lineHintWidthTarget,m.fadedExtensions={start:0,end:g.lineHintFadedExtensions};break;case 2:m.width=g.lineHintWidthReference,m.fadedExtensions={start:0,end:0};break;case 1:m.width=g.lineHintWidthReference,m.fadedExtensions={start:c?g.lineHintFadedExtensions:0,end:d?g.lineHintFadedExtensions:0}}return m.attached=!0,m}function D(e,i,n,r,l){const s=t();if(l){const n=r.overlayManager.spatialReference;o(e,i,s,n)}else a(e,i,n,r,s);return s}export{C as SnappingVisualizer3D};
@@ -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{unitRGBAFromColor as t}from"../../../../../core/colorUtils.js";import{handlesGroup as i,makeHandle as s}from"../../../../../core/handleUtils.js";import{destroyMaybe as r}from"../../../../../core/maybe.js";import{watch as n,syncAndInitial as o,initial as a,when as l}from"../../../../../core/reactiveUtils.js";import{property as c,subclass as h}from"../../../../../core/accessorSupport/decorators.js";import{h as m}from"../../../../../chunks/vec32.js";import{create as p}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getEffectiveElevationInfo as u,getEffectiveElevationMode as d}from"../../../../../support/elevationInfoUtils.js";import v from"../../../../../symbols/support/ElevationInfo.js";import{SegmentLabels3D as f}from"../../SegmentLabels3D.js";import{SnappingVisualizer3D as g}from"../../SnappingVisualizer3D.js";import{meshTransformFastUpdateHandles as E}from"../meshFastUpdateUtils.js";import{Settings as y}from"../settings.js";import{ExtendedLineVisualElement as V}from"../../visualElements/ExtendedLineVisualElement.js";import{OutlineVisualElement as w}from"../../visualElements/OutlineVisualElement.js";import{VerticesVisualElement as _}from"../../visualElements/VerticesVisualElement.js";import{evaluateElevationAlignmentAtPoint as j}from"../../../layers/graphics/elevationAlignmentUtils.js";import{ElevationContext as I}from"../../../layers/graphics/ElevationContext.js";import{GraphicState as L}from"../../../layers/graphics/GraphicState.js";import{DrawGraphicTool as S,geometryTypeToDrawOperationGeometryType as x}from"../../../../draw/DrawGraphicTool.js";import{DrawOperation as D}from"../../../../draw/DrawOperation.js";import{ElevationDrawSurface as G,SceneDrawSurface as C}from"../../../../draw/drawSurfaces.js";import{updateMeshTransformFromTooltipInfo as O}from"../../../../interactive/tooltip/tooltipCommonUtils.js";import{autorun as T}from"../../../../../core/accessorSupport/trackingUtils.js";let z=class extends S{constructor(e){super(e),this._activeVertexVisualElement=null,this._createGraphicState=null,this._outlineVisualElement=null,this._verticesVisualElement=null,this._verticalLineVisualElement=null,this._settings=new y({getTheme:()=>this.view.effectiveTheme}),this.geometryType=null,this.type="draw-3d"}initialize(){const{mode:e,offset:t,unit:i,featureExpressionInfo:s}=this.elevationInfo;this.internalGraphicsLayer.elevationInfo=new v({mode:e,offset:t,unit:i,featureExpressionInfo:s})}normalizeCtorArgs(e){if(!e.elevationInfo){const t=e.hasZ??!0;return{...e,elevationInfo:u(t)}}return e}initializeGraphic(e){const{view:t}=this,s=this._createGraphicState=new L({graphic:e});return i([t.maskOccludee(e),t.trackGraphicState(s),n(()=>({element:this._outlineVisualElement,isDraped:s.isDraped}),({element:e,isDraped:t})=>{e&&(e.isDraped=t)},o),T(()=>{O(this.tooltipInfos.mesh,this.geometryToPlace)}),this._setupLoadingIndicator(s),...E(s)])}makeDrawOperation(){const{geometryType:e}=this,t="circle"!==e&&"rectangle"!==e;return new D({view:this.view,manipulators:this.manipulators,geometryType:x(e),drawingMode:this.mode,hasZ:this.hasZ,defaultZ:this.defaultZ,snapToSceneEnabled:this.snapToScene,drawSurface:new C(this.view,this.elevationInfo,[this.internalGraphicsLayer]),elevationDrawSurface:new G(this.elevationInfo,this.defaultZ,this.view,this.internalGraphicsLayer),hasM:!1,elevationInfo:this.elevationInfo,snappingManager:this.snappingManager,snappingVisualizer:new g,segmentLabels:t?new f:null,labelOptions:this.sketchOptions.labels,isDraped:this._createGraphicState?this._createGraphicState.isDraped:"on-the-ground"===d(this.hasZ,this.elevationInfo),cursor:this.cursor,constraintsEnabled:!0,automaticLengthMeasurementUtils:this.automaticLengthMeasurementUtils})}onActiveVertexChanged(e){const{view:o}=this;if(this._activeVertexVisualElement)return this._activeVertexVisualElement.vertices=[e],this._activeVertexVisualElement.recreate(),this._updateVerticalLineVisualElement(e),s();const l=this._settings,c=l.manipulators.vertex,h=new _({view:o,spatialReference:o.spatialReference,vertices:[e],elevationInfo:this.internalGraphicsLayer.elevationInfo,size:c.size,outlineSize:c.outlineSize,renderOccluded:c.renderOccluded,attached:!1,isDecoration:!0});this._activeVertexVisualElement=h;const m=l.visualElements.zVerticalLine,p=new V({view:o,extensionType:m.extensionType,innerWidth:1,attached:!1,writeDepthEnabled:!1,renderOccluded:4,isDecoration:!0});this._verticalLineVisualElement=p;const u=i([n(()=>l.visualElements.zVerticalLine,e=>e.apply(p),a),n(()=>({selectedColor:t(l.colors.selected),outlineColor:t(l.manipulators.vertex.outlineColor)}),({selectedColor:e,outlineColor:t})=>{h.color=e,h.outlineColor=t},a),s(()=>{this._activeVertexVisualElement=r(this._activeVertexVisualElement),this._verticalLineVisualElement=r(this._verticalLineVisualElement)})]);return h.attached=!0,this._updateVerticalLineVisualElement(e),u}_updateVerticalLineVisualElement(e){const t=this._verticalLineVisualElement;if(!t)return;const{renderCoordsHelper:i,elevationProvider:s}=this.view;m(U,e[0],e[1],e[2]),b.setFromElevationInfo(this.elevationInfo),U[2]=j(U,s,b,i);i.toRenderCoords(U,this.view.spatialReference,U)?(t.setStartEndFromWorldDownAtLocation(U),t.attached=!0):t.attached=!1}onOutlineChanged(e){if(this._outlineVisualElement)return this._outlineVisualElement.geometry=e,s();const t=this.internalGraphicsLayer.elevationInfo,{view:o}=this,l=this._settings,c=new w({view:o,geometry:e,elevationInfo:t,isDraped:this._createGraphicState?this._createGraphicState.isDraped:"on-the-ground"===d(this.hasZ,t),attached:!1,isDecoration:!0});this._outlineVisualElement=c;const h=i([n(()=>l.visualElements.lineObjects.outline,e=>e.apply(c),a),n(()=>l.visualElements.lineObjects.shadowStyle,e=>e.apply(c),a),s(()=>{this._outlineVisualElement=r(this._outlineVisualElement)})]);return c.attached=!0,c.laserlineEnabled=!0,h}onRegularVerticesChanged(e){if(this._verticesVisualElement)return this._verticesVisualElement.vertices=e,s();const{view:o}=this,l=this._settings,c=l.manipulators.vertex,h=new _({view:o,spatialReference:o.spatialReference,vertices:e,elevationInfo:this.internalGraphicsLayer.elevationInfo,size:c.size,outlineSize:c.outlineSize,renderOccluded:c.renderOccluded,attached:!1,isDecoration:!0}),m=i([n(()=>({color:t(l.manipulators.vertex.color),outlineColor:t(l.manipulators.vertex.outlineColor)}),({color:e,outlineColor:t})=>{h.color=e,h.outlineColor=t},a),s(()=>{this._verticesVisualElement=r(this._verticesVisualElement)})]);return h.attached=!0,this._verticesVisualElement=h,m}updateGraphicGeometry(e){if("mesh"===this.geometryType&&"point"===e?.type){const t=this.geometryToPlace;t?.centerAt(e),O(this.tooltipInfos.mesh,t);const i=this._graphic;return void(t&&i.geometry===t||(i.geometry=t))}super.updateGraphicGeometry(e)}_setupLoadingIndicator(e){const{drawOperation:t}=this;if(!this.geometryToPlace||e.displaying)return t.loading=!1,null;t.loading=!0;const r=s(()=>{t.loading=!1});let n;const a=()=>{n&&cancelAnimationFrame(n)};return i([l(()=>e.displaying,()=>{a(),n=requestAnimationFrame(()=>r.remove())},{...o,once:!0}),s(a),r])}};e([c({constructOnly:!0})],z.prototype,"elevationInfo",void 0),e([c({constructOnly:!0})],z.prototype,"geometryType",void 0),e([c()],z.prototype,"type",void 0),e([c({constructOnly:!0})],z.prototype,"view",void 0),z=e([h("esri.views.3d.interactive.editingTools.draw.DrawGraphicTool3D")],z);const b=new I,U=p();export{z as DrawGraphicTool3D};
5
+ import{__decorate as e}from"tslib";import{handlesGroup as t,makeHandle as i}from"../../../../../core/handleUtils.js";import{destroyMaybe as s}from"../../../../../core/maybe.js";import{watch as r,syncAndInitial as n,initial as o,when as a}from"../../../../../core/reactiveUtils.js";import{property as l,subclass as c}from"../../../../../core/accessorSupport/decorators.js";import{h}from"../../../../../chunks/vec32.js";import{create as m}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getEffectiveElevationInfo as p,getEffectiveElevationMode as u}from"../../../../../support/elevationInfoUtils.js";import d from"../../../../../symbols/support/ElevationInfo.js";import{SegmentLabels3D as v}from"../../SegmentLabels3D.js";import{SnappingVisualizer3D as f}from"../../SnappingVisualizer3D.js";import{meshTransformFastUpdateHandles as g}from"../meshFastUpdateUtils.js";import{Settings as E}from"../settings.js";import{ExtendedLineVisualElement as y}from"../../visualElements/ExtendedLineVisualElement.js";import{OutlineVisualElement as V}from"../../visualElements/OutlineVisualElement.js";import{VerticesVisualElement as w}from"../../visualElements/VerticesVisualElement.js";import{evaluateElevationAlignmentAtPoint as _}from"../../../layers/graphics/elevationAlignmentUtils.js";import{ElevationContext as I}from"../../../layers/graphics/ElevationContext.js";import{GraphicState as j}from"../../../layers/graphics/GraphicState.js";import{DrawGraphicTool as G,geometryTypeToDrawOperationGeometryType as L}from"../../../../draw/DrawGraphicTool.js";import{DrawOperation as S}from"../../../../draw/DrawOperation.js";import{ElevationDrawSurface as x,SceneDrawSurface as D}from"../../../../draw/drawSurfaces.js";import{updateMeshTransformFromTooltipInfo as C}from"../../../../interactive/tooltip/tooltipCommonUtils.js";import{autorun as O}from"../../../../../core/accessorSupport/trackingUtils.js";let T=class extends G{constructor(e){super(e),this._activeVertexVisualElement=null,this._createGraphicState=null,this._outlineVisualElement=null,this._verticesVisualElement=null,this._verticalLineVisualElement=null,this._settings=new E({getTheme:()=>this.view.effectiveTheme}),this.geometryType=null,this.type="draw-3d"}initialize(){const{mode:e,offset:t,unit:i,featureExpressionInfo:s}=this.elevationInfo;this.internalGraphicsLayer.elevationInfo=new d({mode:e,offset:t,unit:i,featureExpressionInfo:s})}normalizeCtorArgs(e){if(!e.elevationInfo){const t=e.hasZ??!0;return{...e,elevationInfo:p(t)}}return e}initializeGraphic(e){const{view:i}=this,s=this._createGraphicState=new j({graphic:e});return t([i.maskOccludee(e),i.trackGraphicState(s),r(()=>({element:this._outlineVisualElement,isDraped:s.isDraped}),({element:e,isDraped:t})=>{e&&(e.isDraped=t)},n),O(()=>{C(this.tooltipInfos.mesh,this.geometryToPlace)}),this._setupLoadingIndicator(s),...g(s)])}makeDrawOperation(){const{geometryType:e}=this,t="circle"!==e&&"rectangle"!==e;return new S({view:this.view,manipulators:this.manipulators,geometryType:L(e),drawingMode:this.mode,hasZ:this.hasZ,defaultZ:this.defaultZ,snapToSceneEnabled:this.snapToScene,drawSurface:new D(this.view,this.elevationInfo,[this.internalGraphicsLayer]),elevationDrawSurface:new x(this.elevationInfo,this.defaultZ,this.view,this.internalGraphicsLayer),hasM:!1,elevationInfo:this.elevationInfo,snappingManager:this.snappingManager,snappingVisualizer:new f,segmentLabels:t?new v:null,labelOptions:this.sketchOptions.labels,isDraped:this._createGraphicState?this._createGraphicState.isDraped:"on-the-ground"===u(this.hasZ,this.elevationInfo),cursor:this.cursor,constraintsEnabled:!0,automaticLengthMeasurementUtils:this.automaticLengthMeasurementUtils})}onActiveVertexChanged(e){const{view:n}=this;if(this._activeVertexVisualElement)return this._activeVertexVisualElement.vertices=[e],this._activeVertexVisualElement.recreate(),this._updateVerticalLineVisualElement(e),i();const a=this._settings,l=a.manipulators.vertex,c=new w({view:n,spatialReference:n.spatialReference,vertices:[e],elevationInfo:this.internalGraphicsLayer.elevationInfo,size:l.size,outlineSize:l.outlineSize,renderOccluded:l.renderOccluded,attached:!1,isDecoration:!0});this._activeVertexVisualElement=c;const h=a.visualElements.zVerticalLine,m=new y({view:n,extensionType:h.extensionType,innerWidth:1,attached:!1,writeDepthEnabled:!1,renderOccluded:4,isDecoration:!0});this._verticalLineVisualElement=m;const p=t([r(()=>a.visualElements.zVerticalLine,e=>e.apply(m),o),r(()=>({selectedColor:a.colors.selected.toUnitRGBA(),outlineColor:a.manipulators.vertex.outlineColor.toUnitRGBA()}),({selectedColor:e,outlineColor:t})=>{c.color=e,c.outlineColor=t},o),i(()=>{this._activeVertexVisualElement=s(this._activeVertexVisualElement),this._verticalLineVisualElement=s(this._verticalLineVisualElement)})]);return c.attached=!0,this._updateVerticalLineVisualElement(e),p}_updateVerticalLineVisualElement(e){const t=this._verticalLineVisualElement;if(!t)return;const{renderCoordsHelper:i,elevationProvider:s}=this.view;h(b,e[0],e[1],e[2]),z.setFromElevationInfo(this.elevationInfo),b[2]=_(b,s,z,i);i.toRenderCoords(b,this.view.spatialReference,b)?(t.setStartEndFromWorldDownAtLocation(b),t.attached=!0):t.attached=!1}onOutlineChanged(e){if(this._outlineVisualElement)return this._outlineVisualElement.geometry=e,i();const n=this.internalGraphicsLayer.elevationInfo,{view:a}=this,l=this._settings,c=new V({view:a,geometry:e,elevationInfo:n,isDraped:this._createGraphicState?this._createGraphicState.isDraped:"on-the-ground"===u(this.hasZ,n),attached:!1,isDecoration:!0});this._outlineVisualElement=c;const h=t([r(()=>l.visualElements.lineObjects.outline,e=>e.apply(c),o),r(()=>l.visualElements.lineObjects.shadowStyle,e=>e.apply(c),o),i(()=>{this._outlineVisualElement=s(this._outlineVisualElement)})]);return c.attached=!0,c.laserlineEnabled=!0,h}onRegularVerticesChanged(e){if(this._verticesVisualElement)return this._verticesVisualElement.vertices=e,i();const{view:n}=this,a=this._settings,l=a.manipulators.vertex,c=new w({view:n,spatialReference:n.spatialReference,vertices:e,elevationInfo:this.internalGraphicsLayer.elevationInfo,size:l.size,outlineSize:l.outlineSize,renderOccluded:l.renderOccluded,attached:!1,isDecoration:!0}),h=t([r(()=>({color:a.manipulators.vertex.color.toUnitRGBA(),outlineColor:a.manipulators.vertex.outlineColor.toUnitRGBA()}),({color:e,outlineColor:t})=>{c.color=e,c.outlineColor=t},o),i(()=>{this._verticesVisualElement=s(this._verticesVisualElement)})]);return c.attached=!0,this._verticesVisualElement=c,h}updateGraphicGeometry(e){if("mesh"===this.geometryType&&"point"===e?.type){const t=this.geometryToPlace;t?.centerAt(e),C(this.tooltipInfos.mesh,t);const i=this._graphic;return void(t&&i.geometry===t||(i.geometry=t))}super.updateGraphicGeometry(e)}_setupLoadingIndicator(e){const{drawOperation:s}=this;if(!this.geometryToPlace||e.displaying)return s.loading=!1,null;s.loading=!0;const r=i(()=>{s.loading=!1});let o;const l=()=>{o&&cancelAnimationFrame(o)};return t([a(()=>e.displaying,()=>{l(),o=requestAnimationFrame(()=>r.remove())},{...n,once:!0}),i(l),r])}};e([l({constructOnly:!0})],T.prototype,"elevationInfo",void 0),e([l({constructOnly:!0})],T.prototype,"geometryType",void 0),e([l()],T.prototype,"type",void 0),e([l({constructOnly:!0})],T.prototype,"view",void 0),T=e([c("esri.views.3d.interactive.editingTools.draw.DrawGraphicTool3D")],T);const z=new I,b=m();export{T as DrawGraphicTool3D};
@@ -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{EventEmitter as a}from"../../../../../core/Evented.js";import r from"../../../../../core/Handles.js";import{makeHandle as e,handlesGroup as i}from"../../../../../core/handleUtils.js";import"../../../../../core/has.js";import{destroyMaybe as o}from"../../../../../core/maybe.js";import{watch as s,initial as n}from"../../../../../core/reactiveUtils.js";import{fromTranslation as l,fromZRotation as p,multiply as u,fromRotation as h,fromScaling as c}from"../../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as m}from"../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{h as d}from"../../../../../chunks/vec32.js";import{fromValues as f}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{sv3d as _,sm4d as g}from"../../../../../geometry/support/vectorStacks.js";import{Manipulator3D as M}from"../../Manipulator3D.js";import{RenderObject as w}from"../../RenderObject.js";import{screenToMapXYAtLocation as v}from"../dragEventPipeline3D.js";import{discRadius as j,discTranslateArrowOffset as b,discTranslateArrowSize as y,discHeight as A}from"./config.js";import{Manipulation as I}from"./Manipulation.js";import{createManipulatedMoveDragPipeline as x}from"./moveUtils.js";import{createExtrudedTriangle as D,transformInPlace as T}from"../../../webgl-engine/lib/GeometryUtil.js";import{ColorMaterial as P}from"../../../webgl-engine/materials/ColorMaterial.js";import{createManipulatorDragEventPipeline as S,dragAtLocation as E,constrainToMapAxis as O,addScreenDelta as U}from"../../../../interactive/dragEventPipeline.js";class R extends I{constructor(t){super(),this._handles=new r,this._arrowManipulatorInfos=new Array,this._angle=0,this._scale=1,this._radius=j,this._updateAfterDrag=!1,this.events=new a,this._tool=t.tool,this._view=t.view,this._opaqueMaterial=this._createMaterial(),this._transparentMaterial=this._createMaterial(.5),null!=t.radius&&(this._radius=t.radius),this._createManipulators(),this.forEachManipulator(t=>this._tool.manipulators.add(t))}set orthogonalAvailable(t){this._arrowManipulatorInfos.length>=3&&(this._arrowManipulatorInfos[1].manipulator.available=t,this._arrowManipulatorInfos[3].manipulator.available=t)}destroy(){this._handles=o(this._handles),this.forEachManipulator(t=>{this._tool.manipulators.remove(t),t.destroy()}),this._tool=null,this._view=null,this._arrowManipulatorInfos.length=0}forEachManipulator(t){for(const{manipulator:a}of this._arrowManipulatorInfos)t(a,1)}createManipulatedObjectDragPipeline(t,a,r){if(!a.operations)return e();const i=a.operations.data.spatialReference,o=a.graphic;return x(a,r,r=>this.createDragPipeline((a,e,i,o,s)=>(({steps:e,cancel:i}=t(a,e,i,o,s)),r(a,e,i)),a.elevationInfo,i,o))}createDragPipeline(t,a,r,e){return i(this._arrowManipulatorInfos.map(({manipulator:i},o)=>S(i,(i,s,n,l,p)=>{const u=s.next(t=>({...t,manipulatorType:1})).next(E(this._view,i.elevationAlignedLocation)).next(v(this._view,i.elevationAlignedLocation,a,r,e)).next(O(i.location,this.angle+(o+1)*Math.PI*.5)).next(U());t(i,u,n,l,p)})))}get angle(){return this._angle}set angle(t){this._angle=t,this.dragging?this._updateAfterDrag=!0:this._updateManipulatorTransform()}get displayScale(){return this._scale}set displayScale(t){this._scale=t,this._updateManipulatorTransform()}get radius(){return this._radius}set radius(t){this._radius!==t&&(this._radius=t,this._updateManipulators())}_updateManipulators(){for(let t=0;t<this._arrowManipulatorInfos.length;t++)this._updateArrowManipulator(this._arrowManipulatorInfos[t],t);this._updateManipulatorTransform()}_updateArrowManipulator({manipulator:t,transform:a},r){const e=this._radius/j,i=y*e,o=i*Math.sqrt(3)/2,s=D(this._opaqueMaterial,o,i/2,i/2,A);T(s,l(g.get(),d(_.get(),0,-o/3,0))),t.renderObjects=[new w(s,2),new w(s.instantiate({material:this._transparentMaterial}),1)],t.radius=o/3*2*1.2;const n=p(g.get(),r*Math.PI/2),h=l(g.get(),d(_.get(),0,b*e,0));u(a,n,h)}_createManipulators(){for(let t=0;t<4;t++){const a=this._createArrowManipulator(t);this._arrowManipulatorInfos.push(a)}this._updateManipulatorTransform()}_updateManipulatorTransform(){const t=this.angle,a=h(g.get(),t,f(0,0,1));if(null==a)return;const r=c(g.get(),d(_.get(),this.displayScale,this.displayScale,this.displayScale)),e=u(g.get(),r,a);for(const i of this._arrowManipulatorInfos){const t=u(g.get(),e,i.transform);i.manipulator.modelTransform=t}}_createArrowManipulator(t){const a=new M({view:this._view,autoScaleRenderObjects:!1,worldOriented:!0,focusMultiplier:1,touchMultiplier:1,collisionType:{type:"disc",direction:f(0,0,1)}}),r={manipulator:a,transform:m()};return this._updateArrowManipulator(r,t),this._handles.add(a.events.on("drag",t=>{this._updateAfterDrag&&"end"===t.action&&!this.dragging&&(this._updateManipulatorTransform(),this._updateAfterDrag=!1)})),r}_createMaterial(a=1){const r=new P({cullFace:2,renderOccluded:2,isDecoration:!0});return this._handles.add(s(()=>t.toUnitRGBA(this._view.effectiveTheme.accentColor),t=>{t[3]*=a,r.setParameters({color:t})},n)),r}get test(){}}export{R as MoveXYAxisManipulation};
5
+ import{EventEmitter as t}from"../../../../../core/Evented.js";import a from"../../../../../core/Handles.js";import{makeHandle as r,handlesGroup as e}from"../../../../../core/handleUtils.js";import"../../../../../core/has.js";import{destroyMaybe as i}from"../../../../../core/maybe.js";import{watch as o,initial as s}from"../../../../../core/reactiveUtils.js";import{fromTranslation as n,fromZRotation as l,multiply as p,fromRotation as u,fromScaling as h}from"../../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as c}from"../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{h as m}from"../../../../../chunks/vec32.js";import{fromValues as d}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{sv3d as f,sm4d as _}from"../../../../../geometry/support/vectorStacks.js";import{Manipulator3D as g}from"../../Manipulator3D.js";import{RenderObject as M}from"../../RenderObject.js";import{screenToMapXYAtLocation as w}from"../dragEventPipeline3D.js";import{discRadius as v,discTranslateArrowOffset as j,discTranslateArrowSize as b,discHeight as y}from"./config.js";import{Manipulation as A}from"./Manipulation.js";import{createManipulatedMoveDragPipeline as I}from"./moveUtils.js";import{createExtrudedTriangle as x,transformInPlace as D}from"../../../webgl-engine/lib/GeometryUtil.js";import{ColorMaterial as T}from"../../../webgl-engine/materials/ColorMaterial.js";import{createManipulatorDragEventPipeline as P,dragAtLocation as S,constrainToMapAxis as E,addScreenDelta as O}from"../../../../interactive/dragEventPipeline.js";class U extends A{constructor(r){super(),this._handles=new a,this._arrowManipulatorInfos=new Array,this._angle=0,this._scale=1,this._radius=v,this._updateAfterDrag=!1,this.events=new t,this._tool=r.tool,this._view=r.view,this._opaqueMaterial=this._createMaterial(),this._transparentMaterial=this._createMaterial(.5),null!=r.radius&&(this._radius=r.radius),this._createManipulators(),this.forEachManipulator(t=>this._tool.manipulators.add(t))}set orthogonalAvailable(t){this._arrowManipulatorInfos.length>=3&&(this._arrowManipulatorInfos[1].manipulator.available=t,this._arrowManipulatorInfos[3].manipulator.available=t)}destroy(){this._handles=i(this._handles),this.forEachManipulator(t=>{this._tool.manipulators.remove(t),t.destroy()}),this._tool=null,this._view=null,this._arrowManipulatorInfos.length=0}forEachManipulator(t){for(const{manipulator:a}of this._arrowManipulatorInfos)t(a,1)}createManipulatedObjectDragPipeline(t,a,e){if(!a.operations)return r();const i=a.operations.data.spatialReference,o=a.graphic;return I(a,e,r=>this.createDragPipeline((a,e,i,o,s)=>(({steps:e,cancel:i}=t(a,e,i,o,s)),r(a,e,i)),a.elevationInfo,i,o))}createDragPipeline(t,a,r,i){return e(this._arrowManipulatorInfos.map(({manipulator:e},o)=>P(e,(e,s,n,l,p)=>{const u=s.next(t=>({...t,manipulatorType:1})).next(S(this._view,e.elevationAlignedLocation)).next(w(this._view,e.elevationAlignedLocation,a,r,i)).next(E(e.location,this.angle+(o+1)*Math.PI*.5)).next(O());t(e,u,n,l,p)})))}get angle(){return this._angle}set angle(t){this._angle=t,this.dragging?this._updateAfterDrag=!0:this._updateManipulatorTransform()}get displayScale(){return this._scale}set displayScale(t){this._scale=t,this._updateManipulatorTransform()}get radius(){return this._radius}set radius(t){this._radius!==t&&(this._radius=t,this._updateManipulators())}_updateManipulators(){for(let t=0;t<this._arrowManipulatorInfos.length;t++)this._updateArrowManipulator(this._arrowManipulatorInfos[t],t);this._updateManipulatorTransform()}_updateArrowManipulator({manipulator:t,transform:a},r){const e=this._radius/v,i=b*e,o=i*Math.sqrt(3)/2,s=x(this._opaqueMaterial,o,i/2,i/2,y);D(s,n(_.get(),m(f.get(),0,-o/3,0))),t.renderObjects=[new M(s,2),new M(s.instantiate({material:this._transparentMaterial}),1)],t.radius=o/3*2*1.2;const u=l(_.get(),r*Math.PI/2),h=n(_.get(),m(f.get(),0,j*e,0));p(a,u,h)}_createManipulators(){for(let t=0;t<4;t++){const a=this._createArrowManipulator(t);this._arrowManipulatorInfos.push(a)}this._updateManipulatorTransform()}_updateManipulatorTransform(){const t=this.angle,a=u(_.get(),t,d(0,0,1));if(null==a)return;const r=h(_.get(),m(f.get(),this.displayScale,this.displayScale,this.displayScale)),e=p(_.get(),r,a);for(const i of this._arrowManipulatorInfos){const t=p(_.get(),e,i.transform);i.manipulator.modelTransform=t}}_createArrowManipulator(t){const a=new g({view:this._view,autoScaleRenderObjects:!1,worldOriented:!0,focusMultiplier:1,touchMultiplier:1,collisionType:{type:"disc",direction:d(0,0,1)}}),r={manipulator:a,transform:c()};return this._updateArrowManipulator(r,t),this._handles.add(a.events.on("drag",t=>{this._updateAfterDrag&&"end"===t.action&&!this.dragging&&(this._updateManipulatorTransform(),this._updateAfterDrag=!1)})),r}_createMaterial(t=1){const a=new T({cullFace:2,renderOccluded:2,isDecoration:!0});return this._handles.add(o(()=>this._view.effectiveTheme.accentColor.toUnitRGBA(),r=>{r[3]*=t,a.setParameters({color:r})},s)),a}get test(){}}export{U as MoveXYAxisManipulation};
@@ -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 e from"../../../../../core/Handles.js";import{makeHandle as i}from"../../../../../core/handleUtils.js";import"../../../../../core/has.js";import{destroyMaybe as a}from"../../../../../core/maybe.js";import{watch as r,initial as s}from"../../../../../core/reactiveUtils.js";import{fromScaling as o}from"../../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as n}from"../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{h as l}from"../../../../../chunks/vec32.js";import{fromValues as p}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{sv3d as c,sm4d as m}from"../../../../../geometry/support/vectorStacks.js";import{Manipulator3D as h}from"../../Manipulator3D.js";import{RenderObject as u}from"../../RenderObject.js";import{screenToMapXYAtLocation as d}from"../dragEventPipeline3D.js";import{discRadius as _,discCollisionRadius as f,geometrySegments as g,discHeight as j}from"./config.js";import{Manipulation as M}from"./Manipulation.js";import{createManipulatedMoveDragPipeline as v}from"./moveUtils.js";import{SnapToScene as S}from"../snapping/SnapToScene.js";import{createCylinderGeometry as T}from"../../../webgl-engine/lib/GeometryUtil.js";import{ColorMaterial as w}from"../../../webgl-engine/materials/ColorMaterial.js";import{createManipulatorDragEventPipeline as b,dragAtLocation as y,addScreenDelta as x}from"../../../../interactive/dragEventPipeline.js";class D extends M{constructor(t){super(),this._handles=new e,this._snapToScene=new S,this._scale=1,this._radius=_,this._view=t.view,this._tool=t.tool,this._discMaterial=this._createMaterial(),this._discMaterialTransparent=this._createMaterial(.5),null!=t.snapToScene&&(this.snapToScene=t.snapToScene),null!=t.radius&&(this._radius=t.radius),this._createManipulator(),this.forEachManipulator(t=>this._tool.manipulators.add(t))}destroy(){this._handles=a(this._handles),this.forEachManipulator(t=>{this._tool.manipulators.remove(t),t.destroy()}),this._tool=null,this._view=null,this._manipulator=null}forEachManipulator(t){t(this._manipulator,1)}get displayScale(){return this._scale}set displayScale(t){this._scale=t,this._updateManipulatorTransform()}get snapToScene(){return this._snapToScene.enabled}set snapToScene(t){this._snapToScene.enabled=t}get radius(){return this._radius}set radius(t){t!==this._radius&&(this._radius=t,this._updateManipulator())}get discManipulator(){return this._manipulator}createManipulatedObjectDragPipeline(t,e,a){if(!e.operations)return i();const r=e.graphic,s=e.elevationInfo,o=e.operations.data.spatialReference;return v(e,a,e=>this.createDragPipeline((i,a,r,s,o)=>(({steps:a,cancel:r}=t(i,a,r,s,o)),e(i,a,r)),s,o,r))}createDragPipeline(t,e,i,a){const r=this._view;return b(this._manipulator,(s,o,n,l,p)=>{const c=o.next(y(r,s.elevationAlignedLocation)).next(d(r,s.elevationAlignedLocation,e,i,a)).next(...this._snapToScene.createDragEventPipelineStep(r,e)).next(t=>({...t,manipulatorType:1})).next(x());t(s,c,n,l,p)})}_updateManipulatorTransform(){const t=o(m.get(),l(c.get(),this.displayScale,this.displayScale,this.displayScale));this._manipulator.modelTransform=t}_createManipulator(){const t=this._view;this._manipulator=new h({view:t,worldSized:!1,autoScaleRenderObjects:!1,focusMultiplier:1,touchMultiplier:1,collisionType:{type:"disc",direction:p(0,0,1)},worldOriented:!0}),this._updateManipulator()}_updateManipulator(){const t=T(this._discMaterial,j,1,g,p(0,0,1),p(0,0,0));t.transformation=o(n(),p(this._radius,this._radius,this._radius)),this._manipulator.renderObjects=[new u(t,2),new u(t.instantiate({material:this._discMaterialTransparent}),1)],this._manipulator.radius=f*(this._radius/_)}_createMaterial(e=1){const i=new w({cullFace:2,renderOccluded:2,isDecoration:!0});return this._handles.add(r(()=>t.toUnitRGBA(this._view.effectiveTheme.accentColor),t=>{t[3]*=e,i.setParameters({color:t})},s)),i}get test(){}}export{D as MoveXYDiscManipulation};
5
+ import t from"../../../../../core/Handles.js";import{makeHandle as e}from"../../../../../core/handleUtils.js";import"../../../../../core/has.js";import{destroyMaybe as i}from"../../../../../core/maybe.js";import{watch as a,initial as r}from"../../../../../core/reactiveUtils.js";import{fromScaling as s}from"../../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as o}from"../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{h as n}from"../../../../../chunks/vec32.js";import{fromValues as l}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{sv3d as p,sm4d as c}from"../../../../../geometry/support/vectorStacks.js";import{Manipulator3D as m}from"../../Manipulator3D.js";import{RenderObject as h}from"../../RenderObject.js";import{screenToMapXYAtLocation as u}from"../dragEventPipeline3D.js";import{discRadius as d,discCollisionRadius as _,geometrySegments as f,discHeight as g}from"./config.js";import{Manipulation as j}from"./Manipulation.js";import{createManipulatedMoveDragPipeline as M}from"./moveUtils.js";import{SnapToScene as v}from"../snapping/SnapToScene.js";import{createCylinderGeometry as S}from"../../../webgl-engine/lib/GeometryUtil.js";import{ColorMaterial as T}from"../../../webgl-engine/materials/ColorMaterial.js";import{createManipulatorDragEventPipeline as w,dragAtLocation as b,addScreenDelta as y}from"../../../../interactive/dragEventPipeline.js";class x extends j{constructor(e){super(),this._handles=new t,this._snapToScene=new v,this._scale=1,this._radius=d,this._view=e.view,this._tool=e.tool,this._discMaterial=this._createMaterial(),this._discMaterialTransparent=this._createMaterial(.5),null!=e.snapToScene&&(this.snapToScene=e.snapToScene),null!=e.radius&&(this._radius=e.radius),this._createManipulator(),this.forEachManipulator(t=>this._tool.manipulators.add(t))}destroy(){this._handles=i(this._handles),this.forEachManipulator(t=>{this._tool.manipulators.remove(t),t.destroy()}),this._tool=null,this._view=null,this._manipulator=null}forEachManipulator(t){t(this._manipulator,1)}get displayScale(){return this._scale}set displayScale(t){this._scale=t,this._updateManipulatorTransform()}get snapToScene(){return this._snapToScene.enabled}set snapToScene(t){this._snapToScene.enabled=t}get radius(){return this._radius}set radius(t){t!==this._radius&&(this._radius=t,this._updateManipulator())}get discManipulator(){return this._manipulator}createManipulatedObjectDragPipeline(t,i,a){if(!i.operations)return e();const r=i.graphic,s=i.elevationInfo,o=i.operations.data.spatialReference;return M(i,a,e=>this.createDragPipeline((i,a,r,s,o)=>(({steps:a,cancel:r}=t(i,a,r,s,o)),e(i,a,r)),s,o,r))}createDragPipeline(t,e,i,a){const r=this._view;return w(this._manipulator,(s,o,n,l,p)=>{const c=o.next(b(r,s.elevationAlignedLocation)).next(u(r,s.elevationAlignedLocation,e,i,a)).next(...this._snapToScene.createDragEventPipelineStep(r,e)).next(t=>({...t,manipulatorType:1})).next(y());t(s,c,n,l,p)})}_updateManipulatorTransform(){const t=s(c.get(),n(p.get(),this.displayScale,this.displayScale,this.displayScale));this._manipulator.modelTransform=t}_createManipulator(){const t=this._view;this._manipulator=new m({view:t,worldSized:!1,autoScaleRenderObjects:!1,focusMultiplier:1,touchMultiplier:1,collisionType:{type:"disc",direction:l(0,0,1)},worldOriented:!0}),this._updateManipulator()}_updateManipulator(){const t=S(this._discMaterial,g,1,f,l(0,0,1),l(0,0,0));t.transformation=s(o(),l(this._radius,this._radius,this._radius)),this._manipulator.renderObjects=[new h(t,2),new h(t.instantiate({material:this._discMaterialTransparent}),1)],this._manipulator.radius=_*(this._radius/d)}_createMaterial(t=1){const e=new T({cullFace:2,renderOccluded:2,isDecoration:!0});return this._handles.add(a(()=>this._view.effectiveTheme.accentColor.toUnitRGBA(),i=>{i[3]*=t,e.setParameters({color:i})},r)),e}get test(){}}export{x as MoveXYDiscManipulation};
@@ -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{darken as e}from"../../../../../core/colorUtils.js";import{EventEmitter as i}from"../../../../../core/Evented.js";import{makeHandle as r}from"../../../../../core/handleUtils.js";import"../../../../../core/has.js";import{clamp as a}from"../../../../../core/mathUtils.js";import{removeMaybe as o}from"../../../../../core/maybe.js";import{watch as s}from"../../../../../core/reactiveUtils.js";import{translate as n,rotateX as l}from"../../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as c}from"../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{H as m,e as d,n as u,g as p,f as h,j as f}from"../../../../../chunks/vec32.js";import{fromValues as _,create as j}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{Manipulator3D as w}from"../../Manipulator3D.js";import{createManipulatorMaterial as v}from"../../manipulatorUtils.js";import{RenderObject as g}from"../../RenderObject.js";import{screenToZConstrained as M}from"../dragEventPipeline3D.js";import{Settings as O}from"../settings.js";import{discRadius as U}from"./config.js";import{Manipulation as b}from"./Manipulation.js";import{createManipulatedMoveDragPipeline as P}from"./moveUtils.js";import{createTubeGeometry as y,createConeGeometry as z}from"../../../webgl-engine/lib/GeometryUtil.js";import{createManipulatorDragEventPipeline as x,addScreenDelta as T}from"../../../../interactive/dragEventPipeline.js";class H extends b{constructor(t){super(),this._radius=U,this.events=new i,this._tool=t.tool,this._view=t.view;const e=new O({getTheme:()=>this._view.effectiveTheme});this._settings=e,null!=t.radius&&(this._radius=t.radius);const r=this._view.effectiveTheme.accentColor;this._materials={materialUnfocused:v(C(r,1,.25),1),materialFocused:v(C(r,1,0),1),materialOccludedUnfocused:v(C(r,.7,0),e.zManipulator.renderOccluded),materialOccludedFocused:v(C(r,.85,0),e.zManipulator.renderOccluded)},this._themeHandle=s(()=>this._view.effectiveTheme.accentColor,t=>{const e=C(t,1,.25),i=C(t,1,0),r=C(t,.7,0),a=C(t,.85,0),{materialUnfocused:o,materialFocused:s,materialOccludedUnfocused:n,materialOccludedFocused:l}=this._materials;o.setParameters({color:e}),s.setParameters({color:i}),n.setParameters({color:r}),l.setParameters({color:a})}),this._createManipulator(),this.forEachManipulator(t=>this._tool.manipulators.add(t))}destroy(){this._themeHandle=o(this._themeHandle),this._manipulator.applyObjectTransform=R,this.forEachManipulator(t=>{this._tool.manipulators.remove(t),t.destroy()})}forEachManipulator(t){t(this._manipulator,0)}createManipulatedObjectDragPipeline(t,e,i){if(!e.operations)return r();const a=e.operations.data.spatialReference;return P(e,i,e=>this.createDragPipeline((i,r,a,o,s)=>(({steps:r,cancel:a}=t(i,r,a,o,s)),e(i,r,a)),a))}createDragPipeline(t,e){const i=this._view;return x(this._manipulator,(r,a,o,s,n)=>{const l=a.next(t=>({...t,manipulatorType:0})).next(M(i,r.renderLocation,e)).next(T());t(r,l,o,s,n)})}get radius(){return this._radius}set radius(t){t!==this._radius&&(this._radius=t,this._updateManipulator())}_updateManipulator(){const t=this._settings,e=this._radius/U,i=t.zManipulator.height*e,r=t.zManipulator.coneHeight*e,a=t.zManipulator.coneWidth*e,o=t.zManipulator.width*e,s=[_(0,0,0),_(0,0,i)],m=[_(0,0,0),_(0,0,i+r)],d=(()=>{const t=c();return n(t,t,[0,0,i]),l(t,t,Math.PI/2),t})(),{materialUnfocused:u,materialFocused:p,materialOccludedUnfocused:h,materialOccludedFocused:f}=this._materials,j=y(u,s,o/2,16,!1),w=z(u,r,a/2,16,!1);w.transformation=d,this._manipulator.renderObjects=[new g(w,1),new g(j,1),new g(w.instantiate({material:p}),2),new g(j.instantiate({material:p}),2),new g(w.instantiate({material:h}),1),new g(j.instantiate({material:h}),1),new g(w.instantiate({material:f}),2),new g(j.instantiate({material:f}),2)],this._manipulator.radius=o/2+2,this._manipulator.collisionType={type:"line",paths:[m]}}_createManipulator(){const t=this._view,e=new w({view:t,autoScaleRenderObjects:!1,worldSized:!1,selectable:!1,cursor:"ns-resize",elevationInfo:this.elevationInfo,worldOriented:!0,collisionPriority:1.6});e.applyObjectTransform=e=>{const i=t.state.camera,r=D;t.renderCoordsHelper.toRenderCoords(this._manipulator.elevationAlignedLocation,r);const o=m(i.eye,r),s=i.computeRenderPixelSizeAtDist(o),n=d(E,r,i.eye);u(n,n);const l=F;t.renderCoordsHelper.worldUpAtPosition(D,l);const c=Math.abs(p(n,l)),_=h(E,n,l),j=h(E,_,l),w=a(c,.01,1),v=1-Math.sqrt(1-w*w)/w/i.fullWidth,g=this._settings,M=this._radius/U,O=g.zManipulator.width*M;f(j,u(j,j),(1/v-1)*o+s*O),e[12]-=E[0],e[13]-=E[1],e[14]-=E[2]},this._manipulator=e,this._updateManipulator()}get test(){}}function C(i,r,a){const o=e(i,a);return o.a*=r,t.toUnitRGBA(o)}const D=j(),E=j(),F=j(),R=()=>{};export{H as MoveZManipulation};
5
+ import{darken as t}from"../../../../../core/colorUtils.js";import{EventEmitter as e}from"../../../../../core/Evented.js";import{makeHandle as i}from"../../../../../core/handleUtils.js";import"../../../../../core/has.js";import{clamp as a}from"../../../../../core/mathUtils.js";import{removeMaybe as r}from"../../../../../core/maybe.js";import{watch as o}from"../../../../../core/reactiveUtils.js";import{translate as s,rotateX as n}from"../../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as l}from"../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{H as c,e as m,n as d,g as u,f as p,j as h}from"../../../../../chunks/vec32.js";import{fromValues as f,create as _}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{Manipulator3D as j}from"../../Manipulator3D.js";import{createManipulatorMaterial as w}from"../../manipulatorUtils.js";import{RenderObject as v}from"../../RenderObject.js";import{screenToZConstrained as g}from"../dragEventPipeline3D.js";import{Settings as M}from"../settings.js";import{discRadius as O}from"./config.js";import{Manipulation as U}from"./Manipulation.js";import{createManipulatedMoveDragPipeline as b}from"./moveUtils.js";import{createTubeGeometry as P,createConeGeometry as y}from"../../../webgl-engine/lib/GeometryUtil.js";import{createManipulatorDragEventPipeline as z,addScreenDelta as x}from"../../../../interactive/dragEventPipeline.js";class T extends U{constructor(t){super(),this._radius=O,this.events=new e,this._tool=t.tool,this._view=t.view;const i=new M({getTheme:()=>this._view.effectiveTheme});this._settings=i,null!=t.radius&&(this._radius=t.radius);const a=this._view.effectiveTheme.accentColor;this._materials={materialUnfocused:w(H(a,1,.25),1),materialFocused:w(H(a,1,0),1),materialOccludedUnfocused:w(H(a,.7,0),i.zManipulator.renderOccluded),materialOccludedFocused:w(H(a,.85,0),i.zManipulator.renderOccluded)},this._themeHandle=o(()=>this._view.effectiveTheme.accentColor,t=>{const e=H(t,1,.25),i=H(t,1,0),a=H(t,.7,0),r=H(t,.85,0),{materialUnfocused:o,materialFocused:s,materialOccludedUnfocused:n,materialOccludedFocused:l}=this._materials;o.setParameters({color:e}),s.setParameters({color:i}),n.setParameters({color:a}),l.setParameters({color:r})}),this._createManipulator(),this.forEachManipulator(t=>this._tool.manipulators.add(t))}destroy(){this._themeHandle=r(this._themeHandle),this._manipulator.applyObjectTransform=R,this.forEachManipulator(t=>{this._tool.manipulators.remove(t),t.destroy()})}forEachManipulator(t){t(this._manipulator,0)}createManipulatedObjectDragPipeline(t,e,a){if(!e.operations)return i();const r=e.operations.data.spatialReference;return b(e,a,e=>this.createDragPipeline((i,a,r,o,s)=>(({steps:a,cancel:r}=t(i,a,r,o,s)),e(i,a,r)),r))}createDragPipeline(t,e){const i=this._view;return z(this._manipulator,(a,r,o,s,n)=>{const l=r.next(t=>({...t,manipulatorType:0})).next(g(i,a.renderLocation,e)).next(x());t(a,l,o,s,n)})}get radius(){return this._radius}set radius(t){t!==this._radius&&(this._radius=t,this._updateManipulator())}_updateManipulator(){const t=this._settings,e=this._radius/O,i=t.zManipulator.height*e,a=t.zManipulator.coneHeight*e,r=t.zManipulator.coneWidth*e,o=t.zManipulator.width*e,c=[f(0,0,0),f(0,0,i)],m=[f(0,0,0),f(0,0,i+a)],d=(()=>{const t=l();return s(t,t,[0,0,i]),n(t,t,Math.PI/2),t})(),{materialUnfocused:u,materialFocused:p,materialOccludedUnfocused:h,materialOccludedFocused:_}=this._materials,j=P(u,c,o/2,16,!1),w=y(u,a,r/2,16,!1);w.transformation=d,this._manipulator.renderObjects=[new v(w,1),new v(j,1),new v(w.instantiate({material:p}),2),new v(j.instantiate({material:p}),2),new v(w.instantiate({material:h}),1),new v(j.instantiate({material:h}),1),new v(w.instantiate({material:_}),2),new v(j.instantiate({material:_}),2)],this._manipulator.radius=o/2+2,this._manipulator.collisionType={type:"line",paths:[m]}}_createManipulator(){const t=this._view,e=new j({view:t,autoScaleRenderObjects:!1,worldSized:!1,selectable:!1,cursor:"ns-resize",elevationInfo:this.elevationInfo,worldOriented:!0,collisionPriority:1.6});e.applyObjectTransform=e=>{const i=t.state.camera,r=D;t.renderCoordsHelper.toRenderCoords(this._manipulator.elevationAlignedLocation,r);const o=c(i.eye,r),s=i.computeRenderPixelSizeAtDist(o),n=m(E,r,i.eye);d(n,n);const l=F;t.renderCoordsHelper.worldUpAtPosition(D,l);const f=Math.abs(u(n,l)),_=p(E,n,l),j=p(E,_,l),w=a(f,.01,1),v=1-Math.sqrt(1-w*w)/w/i.fullWidth,g=this._settings,M=this._radius/O,U=g.zManipulator.width*M;h(j,d(j,j),(1/v-1)*o+s*U),e[12]-=E[0],e[13]-=E[1],e[14]-=E[2]},this._manipulator=e,this._updateManipulator()}get test(){}}function H(e,i,a){const r=t(e,a);return r.a*=i,r.toUnitRGBA()}const D=_(),E=_(),F=_(),R=()=>{};export{T as MoveZManipulation};
@@ -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"../../../../../core/Accessor.js";import{removeUnordered as i}from"../../../../../core/arrayUtils.js";import{unitRGBAFromColor as a}from"../../../../../core/colorUtils.js";import{EventEmitter as n}from"../../../../../core/Evented.js";import o from"../../../../../core/Handles.js";import{handlesGroup as s,makeHandle as r,destroyHandle as l}from"../../../../../core/handleUtils.js";import"../../../../../core/has.js";import{destroyMaybe as p,removeMaybe as h}from"../../../../../core/maybe.js";import{watch as d,on as u,initial as c,syncAndInitial as m,when as g,sync as f}from"../../../../../core/reactiveUtils.js";import{property as _,subclass as v}from"../../../../../core/accessorSupport/decorators.js";import{IDENTITY as M}from"../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{b,e as x,l as y,h as O,i as E,j}from"../../../../../chunks/vec32.js";import{fromValues as I,create as S}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{UpdatingHandles as w}from"../../../../../core/support/UpdatingHandles.js";import H from"../../../../../geometry/Point.js";import V from"../../../../../geometry/Polyline.js";import D from"../../../../../geometry/SpatialReference.js";import{makeDehydratedPoint as T}from"../../../../../layers/graphics/dehydratedPoint.js";import{isVolumetricSymbol as A}from"../../../../../symbols/support/utils.js";import{Manipulator3D as P}from"../../Manipulator3D.js";import{createManipulatorMaterial as G,createManipulatorOutlineMaterial as k,placeAtObject as C}from"../../manipulatorUtils.js";import{RenderObject as U}from"../../RenderObject.js";import{SegmentLabels3D as L}from"../../SegmentLabels3D.js";import{SnappingVisualizer3D as z}from"../../SnappingVisualizer3D.js";import{screenToMapXYAtLocation as R,screenToRenderPlaneFromEvent as F,convertToMapCoordinates as Z}from"../dragEventPipeline3D.js";import{orientation as N}from"../geometryUtils.js";import{canMoveZOperations as q}from"../manipulatorUtils.js";import{Settings as X}from"../settings.js";import{createVisualElements as Y}from"../visualElementUtils.js";import{discRadiusSmall as B}from"../manipulations/config.js";import{MoveManipulation as W}from"../manipulations/MoveManipulation.js";import{MoveXYObjectManipulation as K}from"../manipulations/MoveXYObjectManipulation.js";import{getMapPointAtEdgeOffsetManipulatorElevation as J,createEdgeOffsetIntersectionPlane as Q,createEdgeOffsetOperation as $,edgeOffsetRotationMatrix as ee,screenEdgeLengthSquared as te,getDistanceInGeometrySR as ie}from"./edgeOffsetUtils.js";import{createTooltipInfos as ae,connectTooltipToManipulatedObject as ne,getUpdatedTranslateObjectTooltipInfo as oe,getUpdatedEdgeOffsetTooltipInfo as se}from"./reshapeTooltipUtils3D.js";import{OutlineVisualElement as re}from"../../visualElements/OutlineVisualElement.js";import{createExtrudedTriangle as le,createSphereGeometry as pe}from"../../../webgl-engine/lib/GeometryUtil.js";import{MouseButton as he}from"../../../../input/IViewEvents.js";import{sceneSnappingAtLocation as de,addMapDelta as ue,createManipulatorDragEventPipeline as ce,dragAtLocation as me,addScreenDelta as ge}from"../../../../interactive/dragEventPipeline.js";import{tooltipKeys as fe}from"../../../../interactive/keybindings.js";import{SnappingContext as _e}from"../../../../interactive/snapping/SnappingContext.js";import{createSnapDragEventPipelineStep as ve}from"../../../../interactive/snapping/SnappingDragPipelineStep.js";import{makeTooltip as Me,enterInputModeIfAvailable as be}from"../../../../interactive/tooltip/tooltipCommonUtils.js";const xe=Symbol();let ye=class extends t{get _operations(){return this.object.operations}constructor(e){super(e),this._selectedIndex=0,this._manipulatorHandles=new o,this._manipulatorInfos=[],this._numGrabbing=0,this._numDragging=0,this._reshapeEventState=0,this._pendingEdgeOffsetInfo=null,this._updatingHandles=new w,this._recreatingManipulators=!1,this._settings=new X({getTheme:()=>this.view.effectiveTheme}),this.events=new n,this.activeTooltipInfo=null,this._vertexLaserLineVisualElement=null,this._tooltipCallbacks={onBeforeReshape:()=>this.tool.endDrag(),onReshapeStart:()=>this._updateEventState(2),onReshape:()=>this.events.emit("reshape",{type:"reshape",object:this.object}),onReshapeStop:()=>this._updateEventState(0,{forceEnd:!0}),onMoveStart:()=>this._updateEventState(1),onMove:()=>this.events.emit("move",{type:"move",object:this.object,dx:0,dy:0}),onMoveStop:()=>this._updateEventState(0,{forceEnd:!0})}}initialize(){const{view:e}=this,t=this._settings.manipulators,i=t.vertex;this.tooltipInfos=ae(this._sketchOptions,e),this._vertexManipulatorMaterial=G(a(i.color),i.renderOccluded),this._vertexManipulatorOutlineMaterial=k(a(i.outlineColor),i.renderOccluded),this._vertexManipulatorHoverOutlineMaterial=k(a(i.hoverOutlineColor),i.renderOccluded);const n=t.edge;this._edgeManipulatorMaterial=G(a(n.color),n.renderOccluded),this._edgeManipulatorOutlineMaterial=k(a(n.outlineColor),n.renderOccluded);const o=t.edgeOffset;this._edgeOffsetManipulatorMaterial=G(a(o.color),o.renderOccluded,!1),this._edgeOffsetManipulatorHoverMaterial=G(a(o.hoverColor),o.renderOccluded,!1);const s=t.selected;this._selectedManipulatorMaterial=G(a(s.color),s.renderOccluded),this._selectedManipulatorOutlineMaterial=k(a(s.outlineColor),s.renderOccluded),this._selectedManipulatorHoverOutlineMaterial=k(a(s.hoverOutlineColor),s.renderOccluded),this.tooltip=Me(()=>({view:e,options:this._sketchOptions.tooltips})),this.addHandles([d(()=>{const e=this._settings.manipulators;return{vertexSettings:e.vertex,edgeSettings:e.edge,edgeOffsetSettings:e.edgeOffset,selectedSettings:e.selected}},({vertexSettings:e,edgeSettings:t,edgeOffsetSettings:i,selectedSettings:a})=>{e.applyColor(this._vertexManipulatorMaterial),e.applyOutline(this._vertexManipulatorOutlineMaterial),e.applyHoverOutline(this._vertexManipulatorHoverOutlineMaterial),t.applyColor(this._edgeManipulatorMaterial),t.applyOutline(this._edgeManipulatorOutlineMaterial),i.applyColor(this._edgeOffsetManipulatorMaterial),i.applyHover(this._edgeOffsetManipulatorHoverMaterial),a.applyColor(this._selectedManipulatorMaterial),a.applyOutline(this._selectedManipulatorOutlineMaterial),a.applyHoverOutline(this._selectedManipulatorHoverOutlineMaterial)}),d(()=>this.object.visible,e=>{for(const t of this._manipulatorInfos)t.manipulator.available=e,Se(t)&&(t.edgeManipulator.available=e)}),d(()=>this._numGrabbing+this._numDragging===0,e=>this._toggleAutoHideManipulators(e)),d(()=>({labels:this._segmentLabels,enabled:this._sketchOptions.labels.enabled,edgeOffsetEnabled:this.enableEdgeOffset}),({labels:e,enabled:t,edgeOffsetEnabled:i})=>{null!=e&&(e.visible=t,e.edgeDistance=i?"far":"default")},c),ne(this.tooltip,this.object,()=>this._tooltipsContext),d(()=>this.tooltip.mode,(e,t)=>{"input"===t&&"input"!==e&&this._resetTooltip()}),u(()=>this._operations,"vertex-update",e=>this._updateManipulatorPositions(e.vertices),{onListenerAdd:()=>this._recreateManipulators()}),u(()=>this._operations?.data,"change",e=>{"undo"!==e.operation&&"redo"!==e.operation||this._recreateManipulators()})])}destroy(){this._removeManipulators(),this._updatingHandles.destroy(),this._segmentLabels=p(this._segmentLabels),this.tooltip=p(this.tooltip)}get updating(){return this._updatingHandles.updating}get manipulators(){return this.tool.manipulators}get view(){return this.tool.view}get automaticAreaMeasurementUtils(){return this.tool.automaticAreaMeasurementUtils}get automaticLengthMeasurementUtils(){return this.tool.automaticLengthMeasurementUtils}get object(){return this.tool.object}get enableZShape(){return this.tool.enableZShape}get enableDeleteVertices(){return this.tool.enableDeleteVertices}get enableZVertex(){return this.tool.enableZVertex}get autoHideManipulators(){return this.tool.autoHideManipulators}get enableMoveObject(){return this.tool.enableMoveObject}get enableMidpoints(){return this.tool.enableMidpoints}get enableEdgeOffset(){return this.tool.enableEdgeOffset}get _sketchOptions(){return this.tool.sketchOptions}get _accentColor(){return this.view.effectiveTheme.accentColor}enterInputModeIfAvailable(e){return"key-down"===e.type&&e.key===fe.enterInputMode&&("reshape-edge-offset"===this.activeTooltipInfo?.type?this._enterInputModeDuringEdgeOffset(e):!!be(e,this.tooltip)&&(this.tool.endDrag(),!0))}removeSelectedVertices(){const e=this._manipulatorInfos.filter(e=>e.manipulator.selected&&"vertex"===e.type);return this._removeVertices(e),e.length}onManipulatorSelectionChanged(){this.events.emit("manipulators-changed")}_removeManipulators(){this._manipulatorHandles.removeAll(),this._moveManipulation=p(this._moveManipulation),this._objectMoveManipulation=p(this._objectMoveManipulation),this.manipulators.removeAll(),this._manipulatorInfos=[],this._numGrabbing=0,this._numDragging=0}_createManipulators(e){if(null==this._operations)return;const t=this.object.elevationInfo;for(const{vertices:i,segments:a,index:n}of this._operations.data.parts){const o=e?.byPartIndex.get(n);for(const e of i){const i=o?.has(e.index);this._createVertexOrEdgeManipulator(e,t,i)}for(const e of a)"line"===e.type&&this._createVertexOrEdgeManipulator(e,t)}this._createObjectMoveManipulation(),this._createMoveManipulation(t),this._createVisualElements()}recordUndo(e){this._operations?.recordUndo(e)}get canRedo(){return this._operations?.canRedo??!1}get canUndo(){return this._operations?.canUndo??!1}redo(){return this._operations?.redo()}undo(){return this.events.emit("undo"),this._operations?.undo()}_recreateManipulators(){if(!this._recreatingManipulators){if(this._recreatingManipulators=!0,this._removeManipulators(),this._resetTooltip(),this._operations&&this._segmentLabels?.context?.editGeometryOperations===this._operations||(this._segmentLabels=p(this._segmentLabels)),this._createManipulators(),!this._segmentLabels&&this._operations){const e=this._sketchOptions.labels;this._segmentLabels=new L({context:{view:this.view,editGeometryOperations:this._operations,elevationInfo:this.object.elevationInfo,labelOptions:e,automaticLengthMeasurementUtils:this.automaticLengthMeasurementUtils},visible:e.enabled})}this._recreatingManipulators=!1}}_perObjectManipulatorDragAction(e,t){if("end"===t.action)return t;let i=0;const a=[],n=this._manipulatorInfos.some(e=>"vertex"===e.type&&e.manipulator.selected),o=1===e&&n;for(const s of this._manipulatorInfos)"vertex"===s.type&&(s.manipulator.grabbing||o&&!s.manipulator.selected||a.push(s),i++);this._moveVertices(a,t);if(a.length===i){if(this._updateEventState(1),this.destroyed)return t;this.events.emit("move",{type:"move",dx:t.screenDeltaX,dy:t.screenDeltaY,object:this.object})}else{if(this._updateEventState(2),this.destroyed)return t;this.events.emit("reshape",{type:"reshape",object:this.object})}return t}_toggleAutoHideManipulators(e){this.autoHideManipulators&&(e?this.removeHandles(xe):this.tool.manipulators.forEach(({manipulator:e})=>{const t=e.disableDisplay?.();t&&this.addHandles(t,xe)}))}_isMultiVertexSelection(){return this._manipulatorInfos.reduce((e,t)=>"vertex"===t.type&&t.manipulator.selected?e+1:e,0)>1}_perVertexManipulatorDragAction(e){if(this._updateEventState(2),this.destroyed)return;const{mapDeltaX:t,mapDeltaY:i,mapDeltaZ:a}=e;if(!t&&!i&&!a)return;const n=[];for(const o of this._manipulatorInfos)"vertex"===o.type&&(o.manipulator.selected&&!o.manipulator.grabbing||o===e.info)&&n.push(o);this._moveVertices(n,e,1),this.events.emit("reshape",{type:"reshape",object:this.object})}_updateEventState(e,t={}){if(e===this._reshapeEventState)return!1;switch(e){case 0:if(!t.forceEnd&&(0!==this._numGrabbing||0!==this._numDragging))return!1;switch(this._reshapeEventState){case 1:this.events.emit("move",{type:"move-stop",dx:0,dy:0,object:this.object});break;case 2:this.events.emit("reshape",{type:"reshape-stop",object:this.object})}break;case 1:switch(this._reshapeEventState){case 0:this.events.emit("move",{type:"move-start",dx:0,dy:0,object:this.object});break;case 2:this.events.emit("reshape",{type:"reshape-stop",object:this.object}),this.destroyed||this.events.emit("move",{type:"move-start",dx:0,dy:0,object:this.object})}break;case 2:switch(this._reshapeEventState){case 0:this.events.emit("reshape",{type:"reshape-start",object:this.object});break;case 1:this.events.emit("move",{type:"move-stop",dx:0,dy:0,object:this.object}),this.destroyed||this.events.emit("reshape",{type:"reshape-start",object:this.object})}}if(this.destroyed)return!1;const i=this._reshapeEventState!==e;return this._reshapeEventState=e,i}_createObjectMoveManipulation(){const{tool:e,view:t,object:i,_operations:a}=this;if(a){if(this._objectMoveManipulation=new K({tool:e,view:t,object:i}),this.enableMoveObject){let e=null;this._manipulatorHandles.add(this._objectMoveManipulation.createDragPipeline((t,i,n)=>{i.next(e=>this._trackNumDragging(e)).next(t=>("start"===t.action&&(e=a.createUndoGroup()),t)).next(e=>this._perObjectManipulatorDragAction(0,e)).next(e=>(this._updateTranslateObjectTooltip(0,e),e)).next(t=>{"end"===t.action&&(this._resetTooltip(),e=h(e))}),n.next(()=>this._onDragCancel(!0,()=>e=h(e)))})),this._objectMoveManipulation.forEachManipulator(e=>this._manipulatorHandles.add(this._watchAndUpdateGrabState(e,!1)))}else this._objectMoveManipulation.forEachManipulator(e=>{e.grabbable=!1,e.cursor=null});this._objectMoveManipulation.forEachManipulator(e=>this._manipulatorHandles.add(e.events.on("immediate-click",e=>{this._manipulatorInfos.some(e=>e.manipulator.selected)?this._clearSelection():this.events.emit("immediate-click",{...e,object:this.object}),e.stopPropagation()})))}}_createMoveManipulation(e){const{object:t,tool:i,view:a,_operations:n}=this;if(!n)return;this._moveManipulation=new W({tool:i,view:a,xyAvailable:!0,xyAxisAvailable:!0,zAvailable:this.enableZShape&&q(t.operations,t.elevationInfo),snapToScene:!1,radius:W.radiusForSymbol(t.graphic?.symbol)}),this._moveManipulation.forEachManipulator(e=>this.addHandles([e.events.on("immediate-click",t=>{this._moveManipulation.zManipulation.hasManipulator(e)||this._manipulatorInfos.some(e=>e.manipulator.selected)||this.events.emit("immediate-click",{...t,object:this.object}),t.stopPropagation()}),this._watchAndUpdateGrabState(e,!1)]));const o=e=>t=>{this.addHandles([t.events.on("focus-changed",({action:t})=>{"focus"===t?this._updateTranslateTooltip(e):this._resetTooltip()})])};this._moveManipulation.xyManipulation.forEachManipulator(o(0)),this._moveManipulation.xyAxisManipulation.forEachManipulator(o(1)),this._moveManipulation.zManipulation.forEachManipulator(o(2)),this._moveManipulation.elevationInfo={mode:"absolute-height",offset:0};const s=n.data.spatialReference;this.addHandles([this._moveManipulation.createDragPipeline((a,o,s,r,l)=>{const{snappingStep:p,cancelSnapping:h}=ve({predicate:e=>!!e.info,snappingManager:i.snappingManager,snappingContext:new _e({editGeometryOperations:n,elevationInfo:e,pointer:l,excludeFeature:t.graphic,visualizer:new z}),updatingHandles:this._updatingHandles,useZ:!1});return r=r.next(e=>(this._onDragCancel(),e)).next(h),{steps:s=s.next(e=>this._trackNumDragging(e)).next(e=>{const t=this._manipulatorInfos.filter(e=>"vertex"===e.type&&e.manipulator.selected);return 1===e.manipulatorType&&1===t.length?{...e,info:t[0],snapOrigin:t[0].handle.pos}:e}).next(de(this.view,e,t.graphic??void 0)).next(...p).next(ue()).next(e=>this._perObjectManipulatorDragAction(1,e)).next(e=>(this._updateTranslateTooltip(a,e),e)),cancel:r}},e,s,t.graphic),d(()=>t.visible,()=>this._updateMoveManipulationPosition(),c),t.on("committed",()=>{this._recreatingManipulators||this._updateMoveManipulationPosition()}),d(()=>t.isDraped,e=>{this._updateMoveManipulationPosition();const t="align-move-manipulation";e?this.addHandles(this.view.elevationProvider.on("elevation-change",()=>this._updateMoveManipulationPosition()),t):this.removeHandles(t)},c)])}_createVisualElements(){const{object:e,view:t}=this,i=Y({view:t,object:e,forEachManipulator:e=>{if(!this.destroyed&&!this._recreatingManipulators){this._objectMoveManipulation.forEachManipulator(e),this._moveManipulation.forEachManipulator(e);for(const t of this._manipulatorInfos)e(t.manipulator,1)}},onManipulatorsChanged:e=>this.events.on("manipulators-changed",e)});null!=i&&(this._outlineVisualElement=i.visualElement instanceof re?i.visualElement:null);const a=this._outlineVisualElement;if(null!=a){const t=()=>{e.isDraped||this._updateMoveManipulationPosition()};this._manipulatorHandles.add(u(()=>a.events,"attachment-origin-changed",t,{onListenerAdd:t}))}this._manipulatorHandles.add(i)}_createEdgeOffsetManipulator(e,t=this.object.elevationInfo){const i=this.view,a=this._operations;if(e.part.vertices.length<=2||!a)return null;const n=a.data.spatialReference,o=this._settings.manipulators.edgeOffset,r=o.size/2,l=r+o.collisionPadding,p=r/l,h=p/2,d=p*Math.sqrt(3)/2,{height:u,offset:c}=o,m=this._edgeOffsetManipulatorMaterial;if(!this._edgeOffsetManipulatorGeometryInside){const e=le(m,d,h,h,u,c);this._edgeOffsetManipulatorGeometryInside=e}if(!this._edgeOffsetManipulatorGeometryOutside){const e=le(m,-d,h,h,u,-c);this._edgeOffsetManipulatorGeometryOutside=e}const g=[new U(this._edgeOffsetManipulatorGeometryInside.instantiate(),1),new U(this._edgeOffsetManipulatorGeometryInside.instantiate({material:this._edgeOffsetManipulatorHoverMaterial}),2),new U(this._edgeOffsetManipulatorGeometryOutside.instantiate(),1),new U(this._edgeOffsetManipulatorGeometryOutside.instantiate({material:this._edgeOffsetManipulatorHoverMaterial}),2)],f=new P({view:i,renderObjects:g,elevationInfo:"on-the-ground"!==t.mode||A(this.object.graphic?.symbol)?{mode:"absolute-height",offset:0}:t,worldOriented:!1,focusMultiplier:1,radius:l,available:this.object.visible,collisionType:{type:"disc",direction:I(0,0,1)},collisionPriority:1,metadata:{deleting:!1},location:Ie(n)}),_=new P({view:i,worldSized:!0,worldOriented:!1,available:this.object.visible,collisionPriority:-10,cursor:this.enableMoveObject?"move":"default",metadata:{deleting:!1},location:Ie(n)}),v={manipulator:f,handle:e,locationUpdateHandle:null,type:"edge",selectedIndex:0,edgeManipulator:_,visibilityHandle:null};this._autoHideEdgeOffsetManipulator(v,o.minSquaredEdgeLength);const M=()=>this._updateEdgeOffsetManipulator(v);M(),v.locationUpdateHandle=s([e.leftVertex,e.rightVertex].map(e=>{const t=this._getManipulatorInfoFromHandle(e);return t?.manipulator.events.on("location-update",M)}));const b=e=>{this._manipulatorInfos.some(e=>e.manipulator.selected)?this._clearSelection():this.events.emit("immediate-click",{...e,object:this.object}),e.stopPropagation()};return this._manipulatorHandles.add([v.locationUpdateHandle,this._watchAndUpdateGrabState(f,!0),this._watchAndUpdateGrabState(_,!0),ce(f,this._createEdgeOffsetPipeline(v,t,a)),ce(_,this._createEdgePipeline(v,t,a)),_.events.on("immediate-click",b),f.events.on("immediate-click",b),f.events.on("focus-changed",()=>this._resetTooltip()),f.events.on("grab-changed",({screenPoint:e,action:t})=>{v.grabMapPoint="start"===t?J(e,this.view,this.object,v):null})],f),this._manipulatorInfos.push(v),this.manipulators.addMany([f,_]),this.events.emit("manipulators-changed"),v}_autoHideEdgeOffsetManipulator(e,t){const i=e.manipulator,a=e.edgeManipulator,n=()=>{e.visibilityHandle=h(e.visibilityHandle);const n=this._getManipulatorInfoFromHandle(e.handle.leftVertex),o=this._getManipulatorInfoFromHandle(e.handle.rightVertex),l=null!=n&&null!=o&&te(n.manipulator.renderLocation,o.manipulator.renderLocation,this.view.state.camera)<t;(!i.focused&&!a.focused||l)&&(i.grabbable=!l,a.grabbable=!l,e.visibilityHandle=s([i.disableDisplay(),r(()=>{i.grabbable=!0,a.grabbable=this.enableMoveObject})]))};this._manipulatorHandles.add([i.events.on("focus-changed",n),a.events.on("focus-changed",n),r(()=>{h(e.visibilityHandle),a.metadata.deleting=!0,this.manipulators.remove(a)})],i),n()}_updateEdgeOffsetManipulator(e){if(!this._operations)return;this._updateManipulatorPosition(e);const{coordinateHelper:t}=this._operations.data,i=Q(this.view,e.manipulator.elevationAlignedLocation,$(t,e.handle,e.manipulator.elevationInfo)),a=this._getManipulatorInfoFromHandle(e.handle.leftVertex),n=this._getManipulatorInfoFromHandle(e.handle.rightVertex);if(null==a||null==n)return;const o=a.manipulator.renderLocation,s=n.manipulator.renderLocation,r=null!=i?ee(i,o,s):M;e.manipulator.modelTransform=r,e.edgeManipulator.elevationAlignedLocation=e.manipulator.elevationAlignedLocation,e.edgeManipulator.modelTransform=r;const l=b(x(He,o,s))/2;e.edgeManipulator.collisionType={type:"line",paths:[[[-l,0,0],[l,0,0]]]}}_createEdgePipeline(e,t,i){return(a,n,o,s)=>{if("touch"===s){this._createEdgeOffsetPipeline(e,t,i)(a,n,o)}else if(this.enableMoveObject){const e=this.object.graphic,s=i.data.spatialReference,{elevationAlignedLocation:r}=a;n.next(e=>this._trackNumDragging(e)).next(me(this.view,r)).next(R(this.view,r,t,s,e)).next(ge()).next(ue()).next(e=>this._perObjectManipulatorDragAction(0,e)).next(e=>(this._updateTranslateObjectTooltip(0,e),e)).next(e=>{"end"===e.action&&this._resetTooltip()}),o.next(()=>this._onDragCancel(!a.metadata.deleting))}}}_createEdgeOffsetPipeline(e,t,i){return(a,n,o)=>{const s=this._pendingEdgeOffsetInfo;if(s?.manipulatorInfo===e&&"drag"!==s.mode)return void o.execute({action:"cancel"});this._clearSelection();const{initializeStep:r,cleanup:l}=this._initializeEdgeOffset(e,t,i,o),p=this._applyEdgeOffsetStep(e);n.next(e=>this._trackNumDragging(e)).next(me(this.view,a.elevationAlignedLocation)).next(r).next(F(this.view)).next(Z(this.view,i.data.spatialReference)).next(ue()).next(Oe()).next(e=>this._pendingEdgeOffsetInfo?e:p(e)).next(e=>{"end"!==e.action||this._pendingEdgeOffsetInfo||l()}),o.next(()=>{this._exitEdgeOffsetInputMode(),a.metadata.deleting||(l(),this._onDragCancel())})}}_initializeEdgeOffset(e,t,i,a){const{view:n,object:o}=this,r=$(i.data.coordinateHelper,e.handle,t),l=i.createUndoGroup(),p=Q(n,e.manipulator.elevationAlignedLocation,r);let d;this._splitEdgesBeforeEdgeOffset(e,r),this._selectEdgeOffsetArrow(e,r);const u=()=>{this._cleanEdgeOffsetCollapsedEdges(e,i),d=h(d)},c=this.events.on("undo",u);return d=s([this._initializeEdgeOffsetVisualElement(e,o,t,i),l,c,this._connectEdgeOffsetTooltip(e,r,i,()=>{a.execute({action:"cancel"})})]),{initializeStep:e=>null==r||null==p?(u(),null):{...e,operation:r,plane:p},cleanup:u}}_initializeEdgeOffsetVisualElement(e,t,i,n){const o=()=>new V({paths:[[e.handle.leftVertex.pos,e.handle.rightVertex.pos]],spatialReference:n.data.spatialReference}),r=new re({view:this.view,isDraped:t.isDraped,geometry:o(),elevationInfo:i,width:this._settings.visualElements.lineObjects.outline.width,attached:!1,isDecoration:!0}),p=s([d(()=>({color:this._accentColor,draped:t.isDraped}),({color:e,draped:t})=>{r.color=a(e),r.isDraped=t},m),t.on("committed",()=>{r.geometry=o()}),l(r)]);return r.attached=!0,p}_applyEdgeOffsetStep(e){return t=>(this.destroyed||null==t.operation||!this._operations||(this._updateEventState(2),null==t.signedDistance?this._resetTooltip():((t.mapDeltaX||t.mapDeltaY||t.mapDeltaZ)&&(this._offsetEdge(e,t.operation,t.signedDistance),this.events.emit("reshape",{type:"reshape",object:this.object})),this._updateEdgeOffsetTooltip(t))),t)}_cleanEdgeOffsetCollapsedEdges(e,t){const i=e.handle.leftVertex.leftSegment?.leftVertex,a=e.handle.leftVertex,n=e.handle.rightVertex.rightSegment?.rightVertex,o=e.handle.rightVertex,s=t.data.coordinateHelper,r=this.view.pixelSizeAt(s.vectorToDehydratedPoint(a.pos),s.spatialReference),l=[];if(i&&s.distance(i.pos,a.pos)<Ve){const e=this._getManipulatorInfoFromHandle(a);null!=e&&l.push(e)}if(s.distance(a.pos,o.pos)<r||n&&s.distance(n.pos,o.pos)<Ve){const e=this._getManipulatorInfoFromHandle(o);null!=e&&l.push(e)}l.length&&this._removeVertices(l)}_enterInputModeDuringEdgeOffset(e){const t=this._findActiveEdgeOffsetManipulatorInfo();return!!t&&(!!be(e,this.tooltip)&&(t.manipulator.dragging?(this._pendingEdgeOffsetInfo={manipulatorInfo:t,mode:"drag"},!0):(this._clearSelection(),this._pendingEdgeOffsetInfo={manipulatorInfo:t,mode:"hover"},this._connectEdgeOffsetTooltipOnHover(t),!0)))}_exitEdgeOffsetInputMode(){this.tooltip&&(this._pendingEdgeOffsetInfo=null,this._resetTooltip(),this.tooltip.exitInputMode())}_findActiveEdgeOffsetManipulatorInfo(){return this._manipulatorInfos.filter(Se).find(({manipulator:e})=>e.hovering||e.grabbing||e.dragging)}_connectEdgeOffsetTooltipOnHover(e){const{_operations:t,object:i}=this;if(!t)return;const{elevationInfo:a}=i,n=$(t.data.coordinateHelper,e.handle,a);this._selectEdgeOffsetArrow(e,n),this.addHandles([this._initializeEdgeOffsetVisualElement(e,i,a,t),this._connectEdgeOffsetTooltip(e,n,t,()=>{this.removeHandles(n),this._exitEdgeOffsetInputMode()})],n)}_splitEdgesBeforeEdgeOffset(e,t){if(t.requiresSplitEdgeLeft){const t=this._getManipulatorInfoFromHandle(e.handle.leftVertex.leftSegment);null!=t&&this._splitEdgeManipulator(t,1)}if(t.requiresSplitEdgeRight){const t=this._getManipulatorInfoFromHandle(e.handle.rightVertex.rightSegment);null!=t&&this._splitEdgeManipulator(t,0)}}_selectEdgeOffsetArrow(e,t){const i=e.grabMapPoint??J(this.view.inputManager?.latestPointerInfo?.location,this.view,this.object,e);i&&t.selectArrowFromStartPoint(i)}_connectEdgeOffsetTooltip(e,t,i,a){const n=()=>this.tooltipInfos.edgeOffset.distance.actual,o=n=>{a(),queueMicrotask(()=>{this.view.focus();const a=i.createUndoGroup();this._tooltipCallbacks.onReshapeStart?.(),this._splitEdgesBeforeEdgeOffset(e,t),this._offsetEdge(e,t,ie(n,e.manipulator.location,t,i)),this._tooltipCallbacks.onReshape?.(),this._tooltipCallbacks.onReshapeStop?.(),this._cleanEdgeOffsetCollapsedEdges(e,i),a.remove()})},r=()=>{const e=n();null!=e?o(e):a()};return s([g(()=>this.tooltip&&!this.tooltip.focused,()=>r(),f),this.tooltip.on("discard",a),this.tooltip.on("commit",e=>{"commit-and-exit"===e.type&&r()})])}_createVertexOrEdgeManipulator(e,t=this.object.elevationInfo,i=!1){const a=this.view,n=this._operations,o=this._settings;if(!n)return null;const r=n.data.type,l=n.data.spatialReference;if("line"===e.type){if(this.enableEdgeOffset)return this._createEdgeOffsetManipulator(e,t);if(!this.enableMidpoints)return null}if(null==this._vertexManipulatorGeometry||null==this._vertexManipulatorOutlineGeometry){const{size:e,outlineSize:t}=Ee(o.manipulators.vertex);this._vertexManipulatorGeometry=pe(this._vertexManipulatorMaterial,e,16,16),this._vertexManipulatorOutlineGeometry=pe(this._vertexManipulatorOutlineMaterial,t,16,16)}if(null==this._edgeManipulatorGeometry||null==this._edgeManipulatorOutlineGeometry){const{size:e,outlineSize:t}=Ee(o.manipulators.edge);this._edgeManipulatorGeometry=pe(this._edgeManipulatorMaterial,e,16,16),this._edgeManipulatorOutlineGeometry=pe(this._edgeManipulatorOutlineMaterial,t,16,16)}const p="point"===r||"mesh"===r?[]:[new U(this._vertexManipulatorGeometry.instantiate(),4|De),new U(this._vertexManipulatorOutlineGeometry.instantiate(),5|De),new U(this._vertexManipulatorOutlineGeometry.instantiate({material:this._vertexManipulatorHoverOutlineMaterial}),6|De),new U(this._vertexManipulatorGeometry.instantiate({material:this._selectedManipulatorMaterial}),8),new U(this._vertexManipulatorOutlineGeometry.instantiate({material:this._selectedManipulatorOutlineMaterial}),9),new U(this._vertexManipulatorOutlineGeometry.instantiate({material:this._selectedManipulatorHoverOutlineMaterial}),10)];this.enableMidpoints&&p.push(new U(this._edgeManipulatorGeometry.instantiate({material:this._vertexManipulatorMaterial}),6|Te),new U(this._edgeManipulatorOutlineGeometry.instantiate({material:this._vertexManipulatorHoverOutlineMaterial}),6|Te),new U(this._edgeManipulatorGeometry.instantiate(),5|Te),new U(this._edgeManipulatorOutlineGeometry.instantiate(),5|Te));const d=new P({view:a,renderObjects:p,elevationInfo:t,focusMultiplier:1,touchMultiplier:1,available:this.object.visible,metadata:{deleting:!1},location:Ie(l)});d.selected=i,this._setTypeSpecificManipulatorSettings(d,e,t);const u="vertex"===e.type?{manipulator:d,handle:e,type:"vertex",selectedIndex:0}:{manipulator:d,handle:e,locationUpdateHandle:null,type:"edge",selectedIndex:0};if(this._manipulatorInfos.push(u),this.manipulators.add(d),this._updateManipulatorPosition(u),"edge"===u.type){const e=[];for(const t of[u.handle.leftVertex,u.handle.rightVertex]){const i=this._getManipulatorInfoFromHandle(t);null!=i&&e.push(i.manipulator.events.on("location-update",()=>this._updateManipulatorPosition(u)))}u.locationUpdateHandle=s(e),this._manipulatorHandles.add(u.locationUpdateHandle,d)}this._manipulatorHandles.add(this._watchAndUpdateGrabState(d,!0),d);const c=ce(d,(e,i,o,s)=>{let r=null;const{snappingStep:p,cancelSnapping:d}=ve({predicate:()=>!this._isMultiVertexSelection(),snappingManager:this.tool.snappingManager,snappingContext:new _e({editGeometryOperations:n,elevationInfo:t,pointer:s,excludeFeature:this.object.graphic,visualizer:new z}),updatingHandles:this._updatingHandles,useZ:!1});o=o.next(t=>(this._onDragCancel(!e.metadata.deleting,()=>r=h(r)),t)).next(d);const{elevationAlignedLocation:c}=e,m=this.object.graphic??void 0;i.next(e=>this._trackNumDragging(e)).next(e=>{if("start"===e.action&&n&&(r=n.createUndoGroup()),"edge"===u.type){const t=this._splitEdgeManipulator(u);return{...e,info:t,snapOrigin:t.handle.pos}}return{...e,info:u,snapOrigin:u.handle.pos}}).next(me(a,c)).next(R(a,c,t,l,m)).next(de(a,t,m)).next(...p).next(ue()).next(e=>{this._perVertexManipulatorDragAction(e),"end"===e.action&&(r=h(r)),this._resetTooltip()})});return this._manipulatorHandles.add([c,d.events.on("immediate-click",e=>this._manipulatorClickCallback(e,u)),d.events.on("select-changed",()=>{u.selectedIndex=++this._selectedIndex,this._updateMoveManipulationPosition(),this._resetTooltip()}),d.events.on("focus-changed",()=>{this._resetTooltip()})],d),this.events.emit("manipulators-changed"),u}_trackNumDragging(e){switch(e.action){case"start":this._numDragging++;break;case"end":this._numDragging--}return e}_onDragCancel(e=!0,t){switch(this._numDragging--,e&&this.undo(),this.tool.snappingManager?.doneSnapping(),this._resetTooltip(),this._reshapeEventState){case 0:break;case 1:this.events.emit("move",{type:"move",dx:0,dy:0,object:this.object});break;case 2:this.events.emit("reshape",{type:"reshape",object:this.object})}t?.(),this.destroyed||this._updateEventState(0)}_setTypeSpecificManipulatorSettings(e,t,i){const a=this._settings;switch(t.type){case"vertex":{e.state=De,e.selectable=!0,e.cursor="move",e.collisionPriority=2;const{size:t,collisionPadding:n}=a.manipulators.vertex;e.radius=t/2+n,e.elevationInfo=i;const o=this._operations?.data.type;e.interactive=null!=o&&"point"!==o&&"mesh"!==o;break}case"line":{e.state=Te,e.selectable=!1,e.cursor="copy",e.collisionPriority=-1;const{size:t,collisionPadding:n}=a.manipulators.edge;e.radius=t/2+n,e.elevationInfo="on-the-ground"!==i.mode||A(this.object.graphic?.symbol)?{mode:"absolute-height",offset:0}:i;break}}}_watchAndUpdateGrabState(e,t){return e.events.on("grab-changed",i=>{this._onGrabStateChanged(e,t,i.action,i.pointerType)})}_onGrabStateChanged(e,t,i,a="mouse"){if(!this._recreatingManipulators){if("start"===i)t&&this._updateSelection(e),this._numGrabbing++;else if(this._numGrabbing--,this._updateEventState(0),this.destroyed)return;this._moveManipulation.interactive=!this._numGrabbing,("touch"!==a||this.enableEdgeOffset)&&(this._manipulatorInfos.forEach(e=>{const{manipulator:t}=e,i=this._operations?.data.type;t.interactive=t.grabbing||!this._numGrabbing&&null!=i&&"point"!==i&&"mesh"!==i,Se(e)&&(e.edgeManipulator.interactive=e.edgeManipulator.grabbing||!this._numGrabbing)}),this._objectMoveManipulation.forEachManipulator(e=>{e.interactive=e.grabbing||!this._numGrabbing}))}}_clearSelection(){for(const e of this._manipulatorInfos)e.manipulator.grabbing||(e.manipulator.selected=!1);this._pendingEdgeOffsetInfo=null}_updateSelection(e){e.grabbing&&!e.selected&&e.selectable&&(this._clearSelection(),e.selected=!0,this.events.emit("manipulators-changed"))}_removeManipulator(e){null!=e&&(e.manipulator.metadata.deleting=!0,this.manipulators.remove(e.manipulator),this._manipulatorHandles.remove(e.manipulator),i(this._manipulatorInfos,e),this.events.emit("manipulators-changed"),this._resetTooltip())}_getManipulatorInfoFromHandle(e){return this._manipulatorInfos.find(t=>t.handle===e)}_updateManipulatorPositions(e){for(const t of e)this._updateManipulatorPosition(this._getManipulatorInfoFromHandle(t))}_updateManipulatorPosition(e){const t=this._operations;if(null!=e&&t)if("vertex"===e.type)e.manipulator.location=t.data.coordinateHelper.vectorToDehydratedPoint(e.handle.pos,we),e.manipulator.grabbing&&null!=this._vertexLaserLineVisualElement&&(this._vertexLaserLineVisualElement.visualElement.intersectsWorldUpAtLocation=e.manipulator.renderLocation);else if("edge"===e.type){const i=this._getManipulatorInfoFromHandle(e.handle.leftVertex),a=this._getManipulatorInfoFromHandle(e.handle.rightVertex);if(null==i||null==a)return;const n=i.manipulator,o=a.manipulator;if("on-the-ground"===e.manipulator.elevationInfo?.mode){const i=n.location,a=o.location,s=.5,r=i.x+s*(a.x-i.x),l=i.y+s*(a.y-i.y),p=i.hasZ&&a.hasZ?0:void 0;e.manipulator.location=T(r,l,p,t.data.spatialReference)}else y(He,n.renderLocation,o.renderLocation,.5),e.manipulator.renderLocation=He}}_splitEdgeManipulator(e,t=.5){const i=this._operations,a=i.splitSegment(e.handle,t).createdVertex;e.locationUpdateHandle=h(e.locationUpdateHandle);const n=this.object.elevationInfo;let o;this.enableEdgeOffset?(this._removeManipulator(e),o=this._createVertexOrEdgeManipulator(a)):(o=e,o.handle=a,o.type="vertex",this._setTypeSpecificManipulatorSettings(e.manipulator,e.handle,n)),"line"===a.leftSegment?.type&&this._createVertexOrEdgeManipulator(a.leftSegment),"line"===a.rightSegment?.type&&this._createVertexOrEdgeManipulator(a.rightSegment),this._updateManipulatorPosition(o),this.enableEdgeOffset||this._resetTooltip(),this._updateSelection(e.manipulator);const s=this._updateEventState(2),r=i.data.coordinateHelper.vectorToArray(o.handle.pos),l=i.data.parts.indexOf(a.part);return this.events.emit("vertex-add",{type:"vertex-add",object:this.object,vertices:[{coordinates:r,componentIndex:l,vertexIndex:a.index}],added:r}),s&&this._updateEventState(0),o}_updateMoveManipulationPosition(){const e=O(He,0,0,0);let t=0,i=!1,a=null,n=null;for(const r of this._manipulatorInfos)"vertex"===r.type&&(r.manipulator.selected?(t++,E(e,e,r.manipulator.renderLocation),null==a||r.selectedIndex>a.selectedIndex?(n=a,a=r):(null==n||r.selectedIndex>n.selectedIndex)&&(n=r)):i=!0);const o=this.object,s=this._operations?.data.geometry;if(0===t){const e=o.visible&&this.enableMoveObject;this._moveManipulation.xyManipulation.available=e,this._moveManipulation.xyAxisManipulation.available=e,this._moveManipulation.xyAxisManipulation.orthogonalAvailable=e,this._moveManipulation.zManipulation.available=e&&this.enableZShape&&q(this._operations,o.elevationInfo),this._moveManipulation.angle=N(s),this._moveManipulation.radius=W.radiusForSymbol(o.graphic?.symbol)}else{const e=o.visible;this._moveManipulation.xyManipulation.available=e,this._moveManipulation.xyAxisManipulation.available=e,this._moveManipulation.zManipulation.available=e&&this.enableZVertex&&q(this._operations,this.object.elevationInfo),this._moveManipulation.xyAxisManipulation.orthogonalAvailable=e&&1!==t;let i=0;if(null!=a){const e=a.handle.pos,t=null!=n?n.handle.pos:a.handle.leftSegment?.leftVertex?a.handle.leftSegment.leftVertex.pos:null,o=null==n&&a.handle.rightSegment?.rightVertex?a.handle.rightSegment.rightVertex.pos:null;t&&o?this._moveManipulation.xyAxisManipulation.available=!1:t?i=je(t,e):o&&(i=je(e,o))}this._moveManipulation.angle=i,this._moveManipulation.radius=B}0!==t&&i?(j(e,e,1/t),we.spatialReference=this._operations.data.spatialReference,we.hasZ=!0,this.view.renderCoordsHelper.fromRenderCoords(e,we),this._moveManipulation.elevationAlignedLocation=we):null==this._outlineVisualElement||this.object.isDraped||null==this._outlineVisualElement.attachmentOrigin?C(this._moveManipulation,this.object):this._moveManipulation.elevationAlignedLocation=this._outlineVisualElement.attachmentOrigin}_removeVertices(e){const t=new Array,i=this._operations;if(i){for(const a of e){const e=a.handle.part;if("vertex"===a.type&&i.canRemoveVertex(e)){t.push(a.handle),this._removeManipulator(a),this._removeManipulator(this._getManipulatorInfoFromHandle(a.handle.leftSegment)),this._removeManipulator(this._getManipulatorInfoFromHandle(a.handle.rightSegment));const n=i.removeVertices([a.handle]),o=n.removedVertices?.[0].createdSegment;o&&"line"===o.type?this._createVertexOrEdgeManipulator(o):this.enableEdgeOffset&&e.vertices.length<=2&&this._removeManipulator(this._getManipulatorInfoFromHandle(e.segments[0]))}}if(t.length>0){const e=t.map(e=>{const t=i.data.parts.indexOf(e.part);return{coordinates:i.data.coordinateHelper.vectorToArray(e.pos),componentIndex:t,vertexIndex:e.index}}),a=this._updateEventState(2);if(this.destroyed)return;if(this.events.emit("vertex-remove",{type:"vertex-remove",object:this.object,removed:e.map(e=>e.coordinates),vertices:e}),this.destroyed)return;if(a&&(this._updateEventState(0),this.destroyed))return;this._updateMoveManipulationPosition()}}}_moveVertices(e,t,i=("start"===t.action?0:1)){const a=this._operations;if(a){e.length>0&&a.moveVertices(e.map(e=>e.handle),t.mapDeltaX,t.mapDeltaY,t.mapDeltaZ,i);for(const t of e)this._updateManipulatorPosition(t)}}_offsetEdge(e,t,i){if(!this._operations)return;const a=t.clone();a.distance=i,this._operations.updateVertices([e.handle.leftVertex,e.handle.rightVertex],a),this._updateManipulatorPosition(this._getManipulatorInfoFromHandle(e.handle.leftVertex)),this._updateManipulatorPosition(this._getManipulatorInfoFromHandle(e.handle.rightVertex))}_manipulatorClickCallback(e,t){e.shiftKey||this._clearSelection(),"vertex"===t.type&&(t.manipulator.selected=!t.manipulator.selected,this.enableDeleteVertices&&e.button===he.Right&&this._removeVertices([t])),"edge"===t.type&&e.button===he.Left&&this._splitEdgeManipulator(t),e.stopPropagation()}_updateTranslateTooltip(e,t){null!=this._defaultTooltipInfo?this._resetTooltip():this._updateTranslateObjectTooltip(e,t)}_updateTranslateObjectTooltip(e,t){this._pendingEdgeOffsetInfo||(this.activeTooltipInfo=oe(e,t,this._tooltipsContext))}_updateEdgeOffsetTooltip(e){this._pendingEdgeOffsetInfo||(this.activeTooltipInfo=se(this.object,e,this._tooltipsContext))}_resetTooltip(){const e=this.activeTooltipInfo;if(this._pendingEdgeOffsetInfo&&"reshape-edge-offset"===e?.type)return;let t=null;t=this._pendingEdgeOffsetInfo||null!=this._findActiveEdgeOffsetManipulatorInfo()?se(this.object,null,this._tooltipsContext):this._defaultTooltipInfo,t!==e&&(null!=e&&null!=t&&"input"===this.tooltip.mode||(this.activeTooltipInfo=t))}get _defaultTooltipInfo(){const e=this._operations?.data.type;switch(e){case"polyline":case"polygon":return this._selectedVertexManipulatorInfo?this.tooltipInfos.selectedVertex:null;case"point":case"mesh":return this.tooltipInfos.movePoint;default:return null}}get _selectedVertexManipulatorInfo(){const e=this._manipulatorInfos.filter(e=>"vertex"===e.type&&e.manipulator.selected);return 1===e.length?e[0]:null}get _tooltipsContext(){const{tooltipInfos:e,activeTooltipInfo:t,automaticAreaMeasurementUtils:i,automaticLengthMeasurementUtils:a}=this;return{sketchOptions:this._sketchOptions,tooltipInfos:e,activeTooltipInfo:t,selectedVertexManipulatorInfo:this._selectedVertexManipulatorInfo,callbacks:this._tooltipCallbacks,automaticAreaMeasurementUtils:i,automaticLengthMeasurementUtils:a}}get test(){}};function Oe(){return e=>{const{operation:t,mapEnd:i}=e;return null==t||null==i?e:{...e,signedDistance:t.signedDistanceToPoint(i)}}}function Ee(e){const t=e.size/2,i=t+e.collisionPadding;return{size:t/i,outlineSize:(t+e.outlineSize)/i}}function je(e,t){return Math.atan2(t[1]-e[1],t[0]-e[0])+Math.PI/2}function Ie(e){return new H({x:0,y:0,z:0,spatialReference:e})}function Se(e){return"edge"===e.type&&"edgeManipulator"in e}e([_()],ye.prototype,"_numGrabbing",void 0),e([_()],ye.prototype,"_numDragging",void 0),e([_()],ye.prototype,"_pendingEdgeOffsetInfo",void 0),e([_()],ye.prototype,"_operations",null),e([_()],ye.prototype,"_segmentLabels",void 0),e([_({constructOnly:!0})],ye.prototype,"tool",void 0),e([_()],ye.prototype,"tooltip",void 0),e([_()],ye.prototype,"activeTooltipInfo",void 0),e([_({readOnly:!0})],ye.prototype,"updating",null),e([_()],ye.prototype,"manipulators",null),e([_()],ye.prototype,"view",null),e([_()],ye.prototype,"automaticAreaMeasurementUtils",null),e([_()],ye.prototype,"automaticLengthMeasurementUtils",null),e([_()],ye.prototype,"object",null),e([_()],ye.prototype,"enableZShape",null),e([_()],ye.prototype,"enableDeleteVertices",null),e([_()],ye.prototype,"enableZVertex",null),e([_()],ye.prototype,"autoHideManipulators",null),e([_()],ye.prototype,"enableMoveObject",null),e([_()],ye.prototype,"enableMidpoints",null),e([_()],ye.prototype,"enableEdgeOffset",null),e([_()],ye.prototype,"_sketchOptions",null),e([_()],ye.prototype,"_accentColor",null),e([_()],ye.prototype,"_tooltipsContext",null),ye=e([v("esri.views.3d.interactive.editingTools.reshape.ReshapeOperation")],ye);const we=T(0,0,void 0,D.WGS84),He=S(),Ve=1e-6,De=16,Te=32;export{ye as ReshapeOperation};
5
+ import{__decorate as e}from"tslib";import t from"../../../../../core/Accessor.js";import{removeUnordered as i}from"../../../../../core/arrayUtils.js";import{EventEmitter as a}from"../../../../../core/Evented.js";import n from"../../../../../core/Handles.js";import{handlesGroup as o,makeHandle as s,destroyHandle as r}from"../../../../../core/handleUtils.js";import"../../../../../core/has.js";import{destroyMaybe as l,removeMaybe as p}from"../../../../../core/maybe.js";import{watch as h,on as d,initial as u,syncAndInitial as c,when as m,sync as g}from"../../../../../core/reactiveUtils.js";import{property as f,subclass as _}from"../../../../../core/accessorSupport/decorators.js";import{IDENTITY as v}from"../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{b as M,e as b,l as x,h as y,i as O,j as E}from"../../../../../chunks/vec32.js";import{fromValues as j,create as I}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{UpdatingHandles as S}from"../../../../../core/support/UpdatingHandles.js";import w from"../../../../../geometry/Point.js";import H from"../../../../../geometry/Polyline.js";import V from"../../../../../geometry/SpatialReference.js";import{makeDehydratedPoint as D}from"../../../../../layers/graphics/dehydratedPoint.js";import{isVolumetricSymbol as A}from"../../../../../symbols/support/utils.js";import{Manipulator3D as T}from"../../Manipulator3D.js";import{createManipulatorMaterial as G,createManipulatorOutlineMaterial as U,placeAtObject as P}from"../../manipulatorUtils.js";import{RenderObject as k}from"../../RenderObject.js";import{SegmentLabels3D as C}from"../../SegmentLabels3D.js";import{SnappingVisualizer3D as L}from"../../SnappingVisualizer3D.js";import{screenToMapXYAtLocation as R,screenToRenderPlaneFromEvent as z,convertToMapCoordinates as F}from"../dragEventPipeline3D.js";import{orientation as Z}from"../geometryUtils.js";import{canMoveZOperations as B}from"../manipulatorUtils.js";import{Settings as N}from"../settings.js";import{createVisualElements as q}from"../visualElementUtils.js";import{discRadiusSmall as X}from"../manipulations/config.js";import{MoveManipulation as Y}from"../manipulations/MoveManipulation.js";import{MoveXYObjectManipulation as W}from"../manipulations/MoveXYObjectManipulation.js";import{getMapPointAtEdgeOffsetManipulatorElevation as K,createEdgeOffsetIntersectionPlane as J,createEdgeOffsetOperation as Q,edgeOffsetRotationMatrix as $,screenEdgeLengthSquared as ee,getDistanceInGeometrySR as te}from"./edgeOffsetUtils.js";import{createTooltipInfos as ie,connectTooltipToManipulatedObject as ae,getUpdatedTranslateObjectTooltipInfo as ne,getUpdatedEdgeOffsetTooltipInfo as oe}from"./reshapeTooltipUtils3D.js";import{OutlineVisualElement as se}from"../../visualElements/OutlineVisualElement.js";import{createExtrudedTriangle as re,createSphereGeometry as le}from"../../../webgl-engine/lib/GeometryUtil.js";import{MouseButton as pe}from"../../../../input/IViewEvents.js";import{sceneSnappingAtLocation as he,addMapDelta as de,createManipulatorDragEventPipeline as ue,dragAtLocation as ce,addScreenDelta as me}from"../../../../interactive/dragEventPipeline.js";import{tooltipKeys as ge}from"../../../../interactive/keybindings.js";import{SnappingContext as fe}from"../../../../interactive/snapping/SnappingContext.js";import{createSnapDragEventPipelineStep as _e}from"../../../../interactive/snapping/SnappingDragPipelineStep.js";import{makeTooltip as ve,enterInputModeIfAvailable as Me}from"../../../../interactive/tooltip/tooltipCommonUtils.js";const be=Symbol();let xe=class extends t{get _operations(){return this.object.operations}constructor(e){super(e),this._selectedIndex=0,this._manipulatorHandles=new n,this._manipulatorInfos=[],this._numGrabbing=0,this._numDragging=0,this._reshapeEventState=0,this._pendingEdgeOffsetInfo=null,this._updatingHandles=new S,this._recreatingManipulators=!1,this._settings=new N({getTheme:()=>this.view.effectiveTheme}),this.events=new a,this.activeTooltipInfo=null,this._vertexLaserLineVisualElement=null,this._tooltipCallbacks={onBeforeReshape:()=>this.tool.endDrag(),onReshapeStart:()=>this._updateEventState(2),onReshape:()=>this.events.emit("reshape",{type:"reshape",object:this.object}),onReshapeStop:()=>this._updateEventState(0,{forceEnd:!0}),onMoveStart:()=>this._updateEventState(1),onMove:()=>this.events.emit("move",{type:"move",object:this.object,dx:0,dy:0}),onMoveStop:()=>this._updateEventState(0,{forceEnd:!0})}}initialize(){const{view:e}=this,t=this._settings.manipulators,i=t.vertex;this.tooltipInfos=ie(this._sketchOptions,e),this._vertexManipulatorMaterial=G(i.color.toUnitRGBA(),i.renderOccluded),this._vertexManipulatorOutlineMaterial=U(i.outlineColor.toUnitRGBA(),i.renderOccluded),this._vertexManipulatorHoverOutlineMaterial=U(i.hoverOutlineColor.toUnitRGBA(),i.renderOccluded);const a=t.edge;this._edgeManipulatorMaterial=G(a.color.toUnitRGBA(),a.renderOccluded),this._edgeManipulatorOutlineMaterial=U(a.outlineColor.toUnitRGBA(),a.renderOccluded);const n=t.edgeOffset;this._edgeOffsetManipulatorMaterial=G(n.color.toUnitRGBA(),n.renderOccluded,!1),this._edgeOffsetManipulatorHoverMaterial=G(n.hoverColor.toUnitRGBA(),n.renderOccluded,!1);const o=t.selected;this._selectedManipulatorMaterial=G(o.color.toUnitRGBA(),o.renderOccluded),this._selectedManipulatorOutlineMaterial=U(o.outlineColor.toUnitRGBA(),o.renderOccluded),this._selectedManipulatorHoverOutlineMaterial=U(o.hoverOutlineColor.toUnitRGBA(),o.renderOccluded),this.tooltip=ve(()=>({view:e,options:this._sketchOptions.tooltips})),this.addHandles([h(()=>{const e=this._settings.manipulators;return{vertexSettings:e.vertex,edgeSettings:e.edge,edgeOffsetSettings:e.edgeOffset,selectedSettings:e.selected}},({vertexSettings:e,edgeSettings:t,edgeOffsetSettings:i,selectedSettings:a})=>{e.applyColor(this._vertexManipulatorMaterial),e.applyOutline(this._vertexManipulatorOutlineMaterial),e.applyHoverOutline(this._vertexManipulatorHoverOutlineMaterial),t.applyColor(this._edgeManipulatorMaterial),t.applyOutline(this._edgeManipulatorOutlineMaterial),i.applyColor(this._edgeOffsetManipulatorMaterial),i.applyHover(this._edgeOffsetManipulatorHoverMaterial),a.applyColor(this._selectedManipulatorMaterial),a.applyOutline(this._selectedManipulatorOutlineMaterial),a.applyHoverOutline(this._selectedManipulatorHoverOutlineMaterial)}),h(()=>this.object.visible,e=>{for(const t of this._manipulatorInfos)t.manipulator.available=e,Ie(t)&&(t.edgeManipulator.available=e)}),h(()=>this._numGrabbing+this._numDragging===0,e=>this._toggleAutoHideManipulators(e)),h(()=>({labels:this._segmentLabels,enabled:this._sketchOptions.labels.enabled,edgeOffsetEnabled:this.enableEdgeOffset}),({labels:e,enabled:t,edgeOffsetEnabled:i})=>{null!=e&&(e.visible=t,e.edgeDistance=i?"far":"default")},u),ae(this.tooltip,this.object,()=>this._tooltipsContext),h(()=>this.tooltip.mode,(e,t)=>{"input"===t&&"input"!==e&&this._resetTooltip()}),d(()=>this._operations,"vertex-update",e=>this._updateManipulatorPositions(e.vertices),{onListenerAdd:()=>this._recreateManipulators()}),d(()=>this._operations?.data,"change",e=>{"undo"!==e.operation&&"redo"!==e.operation||this._recreateManipulators()})])}destroy(){this._removeManipulators(),this._updatingHandles.destroy(),this._segmentLabels=l(this._segmentLabels),this.tooltip=l(this.tooltip)}get updating(){return this._updatingHandles.updating}get manipulators(){return this.tool.manipulators}get view(){return this.tool.view}get automaticAreaMeasurementUtils(){return this.tool.automaticAreaMeasurementUtils}get automaticLengthMeasurementUtils(){return this.tool.automaticLengthMeasurementUtils}get object(){return this.tool.object}get enableZShape(){return this.tool.enableZShape}get enableDeleteVertices(){return this.tool.enableDeleteVertices}get enableZVertex(){return this.tool.enableZVertex}get autoHideManipulators(){return this.tool.autoHideManipulators}get enableMoveObject(){return this.tool.enableMoveObject}get enableMidpoints(){return this.tool.enableMidpoints}get enableEdgeOffset(){return this.tool.enableEdgeOffset}get _sketchOptions(){return this.tool.sketchOptions}get _accentColor(){return this.view.effectiveTheme.accentColor}enterInputModeIfAvailable(e){return"key-down"===e.type&&e.key===ge.enterInputMode&&("reshape-edge-offset"===this.activeTooltipInfo?.type?this._enterInputModeDuringEdgeOffset(e):!!Me(e,this.tooltip)&&(this.tool.endDrag(),!0))}removeSelectedVertices(){const e=this._manipulatorInfos.filter(e=>e.manipulator.selected&&"vertex"===e.type);return this._removeVertices(e),e.length}onManipulatorSelectionChanged(){this.events.emit("manipulators-changed")}_removeManipulators(){this._manipulatorHandles.removeAll(),this._moveManipulation=l(this._moveManipulation),this._objectMoveManipulation=l(this._objectMoveManipulation),this.manipulators.removeAll(),this._manipulatorInfos=[],this._numGrabbing=0,this._numDragging=0}_createManipulators(e){if(null==this._operations)return;const t=this.object.elevationInfo;for(const{vertices:i,segments:a,index:n}of this._operations.data.parts){const o=e?.byPartIndex.get(n);for(const e of i){const i=o?.has(e.index);this._createVertexOrEdgeManipulator(e,t,i)}for(const e of a)"line"===e.type&&this._createVertexOrEdgeManipulator(e,t)}this._createObjectMoveManipulation(),this._createMoveManipulation(t),this._createVisualElements()}recordUndo(e){this._operations?.recordUndo(e)}get canRedo(){return this._operations?.canRedo??!1}get canUndo(){return this._operations?.canUndo??!1}redo(){return this._operations?.redo()}undo(){return this.events.emit("undo"),this._operations?.undo()}_recreateManipulators(){if(!this._recreatingManipulators){if(this._recreatingManipulators=!0,this._removeManipulators(),this._resetTooltip(),this._operations&&this._segmentLabels?.context?.editGeometryOperations===this._operations||(this._segmentLabels=l(this._segmentLabels)),this._createManipulators(),!this._segmentLabels&&this._operations){const e=this._sketchOptions.labels;this._segmentLabels=new C({context:{view:this.view,editGeometryOperations:this._operations,elevationInfo:this.object.elevationInfo,labelOptions:e,automaticLengthMeasurementUtils:this.automaticLengthMeasurementUtils},visible:e.enabled})}this._recreatingManipulators=!1}}_perObjectManipulatorDragAction(e,t){if("end"===t.action)return t;let i=0;const a=[],n=this._manipulatorInfos.some(e=>"vertex"===e.type&&e.manipulator.selected),o=1===e&&n;for(const s of this._manipulatorInfos)"vertex"===s.type&&(s.manipulator.grabbing||o&&!s.manipulator.selected||a.push(s),i++);this._moveVertices(a,t);if(a.length===i){if(this._updateEventState(1),this.destroyed)return t;this.events.emit("move",{type:"move",dx:t.screenDeltaX,dy:t.screenDeltaY,object:this.object})}else{if(this._updateEventState(2),this.destroyed)return t;this.events.emit("reshape",{type:"reshape",object:this.object})}return t}_toggleAutoHideManipulators(e){this.autoHideManipulators&&(e?this.removeHandles(be):this.tool.manipulators.forEach(({manipulator:e})=>{const t=e.disableDisplay?.();t&&this.addHandles(t,be)}))}_isMultiVertexSelection(){return this._manipulatorInfos.reduce((e,t)=>"vertex"===t.type&&t.manipulator.selected?e+1:e,0)>1}_perVertexManipulatorDragAction(e){if(this._updateEventState(2),this.destroyed)return;const{mapDeltaX:t,mapDeltaY:i,mapDeltaZ:a}=e;if(!t&&!i&&!a)return;const n=[];for(const o of this._manipulatorInfos)"vertex"===o.type&&(o.manipulator.selected&&!o.manipulator.grabbing||o===e.info)&&n.push(o);this._moveVertices(n,e,1),this.events.emit("reshape",{type:"reshape",object:this.object})}_updateEventState(e,t={}){if(e===this._reshapeEventState)return!1;switch(e){case 0:if(!t.forceEnd&&(0!==this._numGrabbing||0!==this._numDragging))return!1;switch(this._reshapeEventState){case 1:this.events.emit("move",{type:"move-stop",dx:0,dy:0,object:this.object});break;case 2:this.events.emit("reshape",{type:"reshape-stop",object:this.object})}break;case 1:switch(this._reshapeEventState){case 0:this.events.emit("move",{type:"move-start",dx:0,dy:0,object:this.object});break;case 2:this.events.emit("reshape",{type:"reshape-stop",object:this.object}),this.destroyed||this.events.emit("move",{type:"move-start",dx:0,dy:0,object:this.object})}break;case 2:switch(this._reshapeEventState){case 0:this.events.emit("reshape",{type:"reshape-start",object:this.object});break;case 1:this.events.emit("move",{type:"move-stop",dx:0,dy:0,object:this.object}),this.destroyed||this.events.emit("reshape",{type:"reshape-start",object:this.object})}}if(this.destroyed)return!1;const i=this._reshapeEventState!==e;return this._reshapeEventState=e,i}_createObjectMoveManipulation(){const{tool:e,view:t,object:i,_operations:a}=this;if(a){if(this._objectMoveManipulation=new W({tool:e,view:t,object:i}),this.enableMoveObject){let e=null;this._manipulatorHandles.add(this._objectMoveManipulation.createDragPipeline((t,i,n)=>{i.next(e=>this._trackNumDragging(e)).next(t=>("start"===t.action&&(e=a.createUndoGroup()),t)).next(e=>this._perObjectManipulatorDragAction(0,e)).next(e=>(this._updateTranslateObjectTooltip(0,e),e)).next(t=>{"end"===t.action&&(this._resetTooltip(),e=p(e))}),n.next(()=>this._onDragCancel(!0,()=>e=p(e)))})),this._objectMoveManipulation.forEachManipulator(e=>this._manipulatorHandles.add(this._watchAndUpdateGrabState(e,!1)))}else this._objectMoveManipulation.forEachManipulator(e=>{e.grabbable=!1,e.cursor=null});this._objectMoveManipulation.forEachManipulator(e=>this._manipulatorHandles.add(e.events.on("immediate-click",e=>{this._manipulatorInfos.some(e=>e.manipulator.selected)?this._clearSelection():this.events.emit("immediate-click",{...e,object:this.object}),e.stopPropagation()})))}}_createMoveManipulation(e){const{object:t,tool:i,view:a,_operations:n}=this;if(!n)return;this._moveManipulation=new Y({tool:i,view:a,xyAvailable:!0,xyAxisAvailable:!0,zAvailable:this.enableZShape&&B(t.operations,t.elevationInfo),snapToScene:!1,radius:Y.radiusForSymbol(t.graphic?.symbol)}),this._moveManipulation.forEachManipulator(e=>this.addHandles([e.events.on("immediate-click",t=>{this._moveManipulation.zManipulation.hasManipulator(e)||this._manipulatorInfos.some(e=>e.manipulator.selected)||this.events.emit("immediate-click",{...t,object:this.object}),t.stopPropagation()}),this._watchAndUpdateGrabState(e,!1)]));const o=e=>t=>{this.addHandles([t.events.on("focus-changed",({action:t})=>{"focus"===t?this._updateTranslateTooltip(e):this._resetTooltip()})])};this._moveManipulation.xyManipulation.forEachManipulator(o(0)),this._moveManipulation.xyAxisManipulation.forEachManipulator(o(1)),this._moveManipulation.zManipulation.forEachManipulator(o(2)),this._moveManipulation.elevationInfo={mode:"absolute-height",offset:0};const s=n.data.spatialReference;this.addHandles([this._moveManipulation.createDragPipeline((a,o,s,r,l)=>{const{snappingStep:p,cancelSnapping:h}=_e({predicate:e=>!!e.info,snappingManager:i.snappingManager,snappingContext:new fe({editGeometryOperations:n,elevationInfo:e,pointer:l,excludeFeature:t.graphic,visualizer:new L}),updatingHandles:this._updatingHandles,useZ:!1});return r=r.next(e=>(this._onDragCancel(),e)).next(h),{steps:s=s.next(e=>this._trackNumDragging(e)).next(e=>{const t=this._manipulatorInfos.filter(e=>"vertex"===e.type&&e.manipulator.selected);return 1===e.manipulatorType&&1===t.length?{...e,info:t[0],snapOrigin:t[0].handle.pos}:e}).next(he(this.view,e,t.graphic??void 0)).next(...p).next(de()).next(e=>this._perObjectManipulatorDragAction(1,e)).next(e=>(this._updateTranslateTooltip(a,e),e)),cancel:r}},e,s,t.graphic),h(()=>t.visible,()=>this._updateMoveManipulationPosition(),u),t.on("committed",()=>{this._recreatingManipulators||this._updateMoveManipulationPosition()}),h(()=>t.isDraped,e=>{this._updateMoveManipulationPosition();const t="align-move-manipulation";e?this.addHandles(this.view.elevationProvider.on("elevation-change",()=>this._updateMoveManipulationPosition()),t):this.removeHandles(t)},u)])}_createVisualElements(){const{object:e,view:t}=this,i=q({view:t,object:e,forEachManipulator:e=>{if(!this.destroyed&&!this._recreatingManipulators){this._objectMoveManipulation.forEachManipulator(e),this._moveManipulation.forEachManipulator(e);for(const t of this._manipulatorInfos)e(t.manipulator,1)}},onManipulatorsChanged:e=>this.events.on("manipulators-changed",e)});null!=i&&(this._outlineVisualElement=i.visualElement instanceof se?i.visualElement:null);const a=this._outlineVisualElement;if(null!=a){const t=()=>{e.isDraped||this._updateMoveManipulationPosition()};this._manipulatorHandles.add(d(()=>a.events,"attachment-origin-changed",t,{onListenerAdd:t}))}this._manipulatorHandles.add(i)}_createEdgeOffsetManipulator(e,t=this.object.elevationInfo){const i=this.view,a=this._operations;if(e.part.vertices.length<=2||!a)return null;const n=a.data.spatialReference,s=this._settings.manipulators.edgeOffset,r=s.size/2,l=r+s.collisionPadding,p=r/l,h=p/2,d=p*Math.sqrt(3)/2,{height:u,offset:c}=s,m=this._edgeOffsetManipulatorMaterial;if(!this._edgeOffsetManipulatorGeometryInside){const e=re(m,d,h,h,u,c);this._edgeOffsetManipulatorGeometryInside=e}if(!this._edgeOffsetManipulatorGeometryOutside){const e=re(m,-d,h,h,u,-c);this._edgeOffsetManipulatorGeometryOutside=e}const g=[new k(this._edgeOffsetManipulatorGeometryInside.instantiate(),1),new k(this._edgeOffsetManipulatorGeometryInside.instantiate({material:this._edgeOffsetManipulatorHoverMaterial}),2),new k(this._edgeOffsetManipulatorGeometryOutside.instantiate(),1),new k(this._edgeOffsetManipulatorGeometryOutside.instantiate({material:this._edgeOffsetManipulatorHoverMaterial}),2)],f=new T({view:i,renderObjects:g,elevationInfo:"on-the-ground"!==t.mode||A(this.object.graphic?.symbol)?{mode:"absolute-height",offset:0}:t,worldOriented:!1,focusMultiplier:1,radius:l,available:this.object.visible,collisionType:{type:"disc",direction:j(0,0,1)},collisionPriority:1,metadata:{deleting:!1},location:je(n)}),_=new T({view:i,worldSized:!0,worldOriented:!1,available:this.object.visible,collisionPriority:-10,cursor:this.enableMoveObject?"move":"default",metadata:{deleting:!1},location:je(n)}),v={manipulator:f,handle:e,locationUpdateHandle:null,type:"edge",selectedIndex:0,edgeManipulator:_,visibilityHandle:null};this._autoHideEdgeOffsetManipulator(v,s.minSquaredEdgeLength);const M=()=>this._updateEdgeOffsetManipulator(v);M(),v.locationUpdateHandle=o([e.leftVertex,e.rightVertex].map(e=>{const t=this._getManipulatorInfoFromHandle(e);return t?.manipulator.events.on("location-update",M)}));const b=e=>{this._manipulatorInfos.some(e=>e.manipulator.selected)?this._clearSelection():this.events.emit("immediate-click",{...e,object:this.object}),e.stopPropagation()};return this._manipulatorHandles.add([v.locationUpdateHandle,this._watchAndUpdateGrabState(f,!0),this._watchAndUpdateGrabState(_,!0),ue(f,this._createEdgeOffsetPipeline(v,t,a)),ue(_,this._createEdgePipeline(v,t,a)),_.events.on("immediate-click",b),f.events.on("immediate-click",b),f.events.on("focus-changed",()=>this._resetTooltip()),f.events.on("grab-changed",({screenPoint:e,action:t})=>{v.grabMapPoint="start"===t?K(e,this.view,this.object,v):null})],f),this._manipulatorInfos.push(v),this.manipulators.addMany([f,_]),this.events.emit("manipulators-changed"),v}_autoHideEdgeOffsetManipulator(e,t){const i=e.manipulator,a=e.edgeManipulator,n=()=>{e.visibilityHandle=p(e.visibilityHandle);const n=this._getManipulatorInfoFromHandle(e.handle.leftVertex),r=this._getManipulatorInfoFromHandle(e.handle.rightVertex),l=null!=n&&null!=r&&ee(n.manipulator.renderLocation,r.manipulator.renderLocation,this.view.state.camera)<t;(!i.focused&&!a.focused||l)&&(i.grabbable=!l,a.grabbable=!l,e.visibilityHandle=o([i.disableDisplay(),s(()=>{i.grabbable=!0,a.grabbable=this.enableMoveObject})]))};this._manipulatorHandles.add([i.events.on("focus-changed",n),a.events.on("focus-changed",n),s(()=>{p(e.visibilityHandle),a.metadata.deleting=!0,this.manipulators.remove(a)})],i),n()}_updateEdgeOffsetManipulator(e){if(!this._operations)return;this._updateManipulatorPosition(e);const{coordinateHelper:t}=this._operations.data,i=J(this.view,e.manipulator.elevationAlignedLocation,Q(t,e.handle,e.manipulator.elevationInfo)),a=this._getManipulatorInfoFromHandle(e.handle.leftVertex),n=this._getManipulatorInfoFromHandle(e.handle.rightVertex);if(null==a||null==n)return;const o=a.manipulator.renderLocation,s=n.manipulator.renderLocation,r=null!=i?$(i,o,s):v;e.manipulator.modelTransform=r,e.edgeManipulator.elevationAlignedLocation=e.manipulator.elevationAlignedLocation,e.edgeManipulator.modelTransform=r;const l=M(b(we,o,s))/2;e.edgeManipulator.collisionType={type:"line",paths:[[[-l,0,0],[l,0,0]]]}}_createEdgePipeline(e,t,i){return(a,n,o,s)=>{if("touch"===s){this._createEdgeOffsetPipeline(e,t,i)(a,n,o)}else if(this.enableMoveObject){const e=this.object.graphic,s=i.data.spatialReference,{elevationAlignedLocation:r}=a;n.next(e=>this._trackNumDragging(e)).next(ce(this.view,r)).next(R(this.view,r,t,s,e)).next(me()).next(de()).next(e=>this._perObjectManipulatorDragAction(0,e)).next(e=>(this._updateTranslateObjectTooltip(0,e),e)).next(e=>{"end"===e.action&&this._resetTooltip()}),o.next(()=>this._onDragCancel(!a.metadata.deleting))}}}_createEdgeOffsetPipeline(e,t,i){return(a,n,o)=>{const s=this._pendingEdgeOffsetInfo;if(s?.manipulatorInfo===e&&"drag"!==s.mode)return void o.execute({action:"cancel"});this._clearSelection();const{initializeStep:r,cleanup:l}=this._initializeEdgeOffset(e,t,i,o),p=this._applyEdgeOffsetStep(e);n.next(e=>this._trackNumDragging(e)).next(ce(this.view,a.elevationAlignedLocation)).next(r).next(z(this.view)).next(F(this.view,i.data.spatialReference)).next(de()).next(ye()).next(e=>this._pendingEdgeOffsetInfo?e:p(e)).next(e=>{"end"!==e.action||this._pendingEdgeOffsetInfo||l()}),o.next(()=>{this._exitEdgeOffsetInputMode(),a.metadata.deleting||(l(),this._onDragCancel())})}}_initializeEdgeOffset(e,t,i,a){const{view:n,object:s}=this,r=Q(i.data.coordinateHelper,e.handle,t),l=i.createUndoGroup(),h=J(n,e.manipulator.elevationAlignedLocation,r);let d;this._splitEdgesBeforeEdgeOffset(e,r),this._selectEdgeOffsetArrow(e,r);const u=()=>{this._cleanEdgeOffsetCollapsedEdges(e,i),d=p(d)},c=this.events.on("undo",u);return d=o([this._initializeEdgeOffsetVisualElement(e,s,t,i),l,c,this._connectEdgeOffsetTooltip(e,r,i,()=>{a.execute({action:"cancel"})})]),{initializeStep:e=>null==r||null==h?(u(),null):{...e,operation:r,plane:h},cleanup:u}}_initializeEdgeOffsetVisualElement(e,t,i,a){const n=()=>new H({paths:[[e.handle.leftVertex.pos,e.handle.rightVertex.pos]],spatialReference:a.data.spatialReference}),s=new se({view:this.view,isDraped:t.isDraped,geometry:n(),elevationInfo:i,width:this._settings.visualElements.lineObjects.outline.width,attached:!1,isDecoration:!0}),l=o([h(()=>({color:this._accentColor,draped:t.isDraped}),({color:e,draped:t})=>{s.color=e.toUnitRGBA(),s.isDraped=t},c),t.on("committed",()=>{s.geometry=n()}),r(s)]);return s.attached=!0,l}_applyEdgeOffsetStep(e){return t=>(this.destroyed||null==t.operation||!this._operations||(this._updateEventState(2),null==t.signedDistance?this._resetTooltip():((t.mapDeltaX||t.mapDeltaY||t.mapDeltaZ)&&(this._offsetEdge(e,t.operation,t.signedDistance),this.events.emit("reshape",{type:"reshape",object:this.object})),this._updateEdgeOffsetTooltip(t))),t)}_cleanEdgeOffsetCollapsedEdges(e,t){const i=e.handle.leftVertex.leftSegment?.leftVertex,a=e.handle.leftVertex,n=e.handle.rightVertex.rightSegment?.rightVertex,o=e.handle.rightVertex,s=t.data.coordinateHelper,r=this.view.pixelSizeAt(s.vectorToDehydratedPoint(a.pos),s.spatialReference),l=[];if(i&&s.distance(i.pos,a.pos)<He){const e=this._getManipulatorInfoFromHandle(a);null!=e&&l.push(e)}if(s.distance(a.pos,o.pos)<r||n&&s.distance(n.pos,o.pos)<He){const e=this._getManipulatorInfoFromHandle(o);null!=e&&l.push(e)}l.length&&this._removeVertices(l)}_enterInputModeDuringEdgeOffset(e){const t=this._findActiveEdgeOffsetManipulatorInfo();return!!t&&(!!Me(e,this.tooltip)&&(t.manipulator.dragging?(this._pendingEdgeOffsetInfo={manipulatorInfo:t,mode:"drag"},!0):(this._clearSelection(),this._pendingEdgeOffsetInfo={manipulatorInfo:t,mode:"hover"},this._connectEdgeOffsetTooltipOnHover(t),!0)))}_exitEdgeOffsetInputMode(){this.tooltip&&(this._pendingEdgeOffsetInfo=null,this._resetTooltip(),this.tooltip.exitInputMode())}_findActiveEdgeOffsetManipulatorInfo(){return this._manipulatorInfos.filter(Ie).find(({manipulator:e})=>e.hovering||e.grabbing||e.dragging)}_connectEdgeOffsetTooltipOnHover(e){const{_operations:t,object:i}=this;if(!t)return;const{elevationInfo:a}=i,n=Q(t.data.coordinateHelper,e.handle,a);this._selectEdgeOffsetArrow(e,n),this.addHandles([this._initializeEdgeOffsetVisualElement(e,i,a,t),this._connectEdgeOffsetTooltip(e,n,t,()=>{this.removeHandles(n),this._exitEdgeOffsetInputMode()})],n)}_splitEdgesBeforeEdgeOffset(e,t){if(t.requiresSplitEdgeLeft){const t=this._getManipulatorInfoFromHandle(e.handle.leftVertex.leftSegment);null!=t&&this._splitEdgeManipulator(t,1)}if(t.requiresSplitEdgeRight){const t=this._getManipulatorInfoFromHandle(e.handle.rightVertex.rightSegment);null!=t&&this._splitEdgeManipulator(t,0)}}_selectEdgeOffsetArrow(e,t){const i=e.grabMapPoint??K(this.view.inputManager?.latestPointerInfo?.location,this.view,this.object,e);i&&t.selectArrowFromStartPoint(i)}_connectEdgeOffsetTooltip(e,t,i,a){const n=()=>this.tooltipInfos.edgeOffset.distance.actual,s=n=>{a(),queueMicrotask(()=>{this.view.focus();const a=i.createUndoGroup();this._tooltipCallbacks.onReshapeStart?.(),this._splitEdgesBeforeEdgeOffset(e,t),this._offsetEdge(e,t,te(n,e.manipulator.location,t,i)),this._tooltipCallbacks.onReshape?.(),this._tooltipCallbacks.onReshapeStop?.(),this._cleanEdgeOffsetCollapsedEdges(e,i),a.remove()})},r=()=>{const e=n();null!=e?s(e):a()};return o([m(()=>this.tooltip&&!this.tooltip.focused,()=>r(),g),this.tooltip.on("discard",a),this.tooltip.on("commit",e=>{"commit-and-exit"===e.type&&r()})])}_createVertexOrEdgeManipulator(e,t=this.object.elevationInfo,i=!1){const a=this.view,n=this._operations,s=this._settings;if(!n)return null;const r=n.data.type,l=n.data.spatialReference;if("line"===e.type){if(this.enableEdgeOffset)return this._createEdgeOffsetManipulator(e,t);if(!this.enableMidpoints)return null}if(null==this._vertexManipulatorGeometry||null==this._vertexManipulatorOutlineGeometry){const{size:e,outlineSize:t}=Oe(s.manipulators.vertex);this._vertexManipulatorGeometry=le(this._vertexManipulatorMaterial,e,16,16),this._vertexManipulatorOutlineGeometry=le(this._vertexManipulatorOutlineMaterial,t,16,16)}if(null==this._edgeManipulatorGeometry||null==this._edgeManipulatorOutlineGeometry){const{size:e,outlineSize:t}=Oe(s.manipulators.edge);this._edgeManipulatorGeometry=le(this._edgeManipulatorMaterial,e,16,16),this._edgeManipulatorOutlineGeometry=le(this._edgeManipulatorOutlineMaterial,t,16,16)}const h="point"===r||"mesh"===r?[]:[new k(this._vertexManipulatorGeometry.instantiate(),4|Ve),new k(this._vertexManipulatorOutlineGeometry.instantiate(),5|Ve),new k(this._vertexManipulatorOutlineGeometry.instantiate({material:this._vertexManipulatorHoverOutlineMaterial}),6|Ve),new k(this._vertexManipulatorGeometry.instantiate({material:this._selectedManipulatorMaterial}),8),new k(this._vertexManipulatorOutlineGeometry.instantiate({material:this._selectedManipulatorOutlineMaterial}),9),new k(this._vertexManipulatorOutlineGeometry.instantiate({material:this._selectedManipulatorHoverOutlineMaterial}),10)];this.enableMidpoints&&h.push(new k(this._edgeManipulatorGeometry.instantiate({material:this._vertexManipulatorMaterial}),6|De),new k(this._edgeManipulatorOutlineGeometry.instantiate({material:this._vertexManipulatorHoverOutlineMaterial}),6|De),new k(this._edgeManipulatorGeometry.instantiate(),5|De),new k(this._edgeManipulatorOutlineGeometry.instantiate(),5|De));const d=new T({view:a,renderObjects:h,elevationInfo:t,focusMultiplier:1,touchMultiplier:1,available:this.object.visible,metadata:{deleting:!1},location:je(l)});d.selected=i,this._setTypeSpecificManipulatorSettings(d,e,t);const u="vertex"===e.type?{manipulator:d,handle:e,type:"vertex",selectedIndex:0}:{manipulator:d,handle:e,locationUpdateHandle:null,type:"edge",selectedIndex:0};if(this._manipulatorInfos.push(u),this.manipulators.add(d),this._updateManipulatorPosition(u),"edge"===u.type){const e=[];for(const t of[u.handle.leftVertex,u.handle.rightVertex]){const i=this._getManipulatorInfoFromHandle(t);null!=i&&e.push(i.manipulator.events.on("location-update",()=>this._updateManipulatorPosition(u)))}u.locationUpdateHandle=o(e),this._manipulatorHandles.add(u.locationUpdateHandle,d)}this._manipulatorHandles.add(this._watchAndUpdateGrabState(d,!0),d);const c=ue(d,(e,i,o,s)=>{let r=null;const{snappingStep:h,cancelSnapping:d}=_e({predicate:()=>!this._isMultiVertexSelection(),snappingManager:this.tool.snappingManager,snappingContext:new fe({editGeometryOperations:n,elevationInfo:t,pointer:s,excludeFeature:this.object.graphic,visualizer:new L}),updatingHandles:this._updatingHandles,useZ:!1});o=o.next(t=>(this._onDragCancel(!e.metadata.deleting,()=>r=p(r)),t)).next(d);const{elevationAlignedLocation:c}=e,m=this.object.graphic??void 0;i.next(e=>this._trackNumDragging(e)).next(e=>{if("start"===e.action&&n&&(r=n.createUndoGroup()),"edge"===u.type){const t=this._splitEdgeManipulator(u);return{...e,info:t,snapOrigin:t.handle.pos}}return{...e,info:u,snapOrigin:u.handle.pos}}).next(ce(a,c)).next(R(a,c,t,l,m)).next(he(a,t,m)).next(...h).next(de()).next(e=>{this._perVertexManipulatorDragAction(e),"end"===e.action&&(r=p(r)),this._resetTooltip()})});return this._manipulatorHandles.add([c,d.events.on("immediate-click",e=>this._manipulatorClickCallback(e,u)),d.events.on("select-changed",()=>{u.selectedIndex=++this._selectedIndex,this._updateMoveManipulationPosition(),this._resetTooltip()}),d.events.on("focus-changed",()=>{this._resetTooltip()})],d),this.events.emit("manipulators-changed"),u}_trackNumDragging(e){switch(e.action){case"start":this._numDragging++;break;case"end":this._numDragging--}return e}_onDragCancel(e=!0,t){switch(this._numDragging--,e&&this.undo(),this.tool.snappingManager?.doneSnapping(),this._resetTooltip(),this._reshapeEventState){case 0:break;case 1:this.events.emit("move",{type:"move",dx:0,dy:0,object:this.object});break;case 2:this.events.emit("reshape",{type:"reshape",object:this.object})}t?.(),this.destroyed||this._updateEventState(0)}_setTypeSpecificManipulatorSettings(e,t,i){const a=this._settings;switch(t.type){case"vertex":{e.state=Ve,e.selectable=!0,e.cursor="move",e.collisionPriority=2;const{size:t,collisionPadding:n}=a.manipulators.vertex;e.radius=t/2+n,e.elevationInfo=i;const o=this._operations?.data.type;e.interactive=null!=o&&"point"!==o&&"mesh"!==o;break}case"line":{e.state=De,e.selectable=!1,e.cursor="copy",e.collisionPriority=-1;const{size:t,collisionPadding:n}=a.manipulators.edge;e.radius=t/2+n,e.elevationInfo="on-the-ground"!==i.mode||A(this.object.graphic?.symbol)?{mode:"absolute-height",offset:0}:i;break}}}_watchAndUpdateGrabState(e,t){return e.events.on("grab-changed",i=>{this._onGrabStateChanged(e,t,i.action,i.pointerType)})}_onGrabStateChanged(e,t,i,a="mouse"){if(!this._recreatingManipulators){if("start"===i)t&&this._updateSelection(e),this._numGrabbing++;else if(this._numGrabbing--,this._updateEventState(0),this.destroyed)return;this._moveManipulation.interactive=!this._numGrabbing,("touch"!==a||this.enableEdgeOffset)&&(this._manipulatorInfos.forEach(e=>{const{manipulator:t}=e,i=this._operations?.data.type;t.interactive=t.grabbing||!this._numGrabbing&&null!=i&&"point"!==i&&"mesh"!==i,Ie(e)&&(e.edgeManipulator.interactive=e.edgeManipulator.grabbing||!this._numGrabbing)}),this._objectMoveManipulation.forEachManipulator(e=>{e.interactive=e.grabbing||!this._numGrabbing}))}}_clearSelection(){for(const e of this._manipulatorInfos)e.manipulator.grabbing||(e.manipulator.selected=!1);this._pendingEdgeOffsetInfo=null}_updateSelection(e){e.grabbing&&!e.selected&&e.selectable&&(this._clearSelection(),e.selected=!0,this.events.emit("manipulators-changed"))}_removeManipulator(e){null!=e&&(e.manipulator.metadata.deleting=!0,this.manipulators.remove(e.manipulator),this._manipulatorHandles.remove(e.manipulator),i(this._manipulatorInfos,e),this.events.emit("manipulators-changed"),this._resetTooltip())}_getManipulatorInfoFromHandle(e){return this._manipulatorInfos.find(t=>t.handle===e)}_updateManipulatorPositions(e){for(const t of e)this._updateManipulatorPosition(this._getManipulatorInfoFromHandle(t))}_updateManipulatorPosition(e){const t=this._operations;if(null!=e&&t)if("vertex"===e.type)e.manipulator.location=t.data.coordinateHelper.vectorToDehydratedPoint(e.handle.pos,Se),e.manipulator.grabbing&&null!=this._vertexLaserLineVisualElement&&(this._vertexLaserLineVisualElement.visualElement.intersectsWorldUpAtLocation=e.manipulator.renderLocation);else if("edge"===e.type){const i=this._getManipulatorInfoFromHandle(e.handle.leftVertex),a=this._getManipulatorInfoFromHandle(e.handle.rightVertex);if(null==i||null==a)return;const n=i.manipulator,o=a.manipulator;if("on-the-ground"===e.manipulator.elevationInfo?.mode){const i=n.location,a=o.location,s=.5,r=i.x+s*(a.x-i.x),l=i.y+s*(a.y-i.y),p=i.hasZ&&a.hasZ?0:void 0;e.manipulator.location=D(r,l,p,t.data.spatialReference)}else x(we,n.renderLocation,o.renderLocation,.5),e.manipulator.renderLocation=we}}_splitEdgeManipulator(e,t=.5){const i=this._operations,a=i.splitSegment(e.handle,t).createdVertex;e.locationUpdateHandle=p(e.locationUpdateHandle);const n=this.object.elevationInfo;let o;this.enableEdgeOffset?(this._removeManipulator(e),o=this._createVertexOrEdgeManipulator(a)):(o=e,o.handle=a,o.type="vertex",this._setTypeSpecificManipulatorSettings(e.manipulator,e.handle,n)),"line"===a.leftSegment?.type&&this._createVertexOrEdgeManipulator(a.leftSegment),"line"===a.rightSegment?.type&&this._createVertexOrEdgeManipulator(a.rightSegment),this._updateManipulatorPosition(o),this.enableEdgeOffset||this._resetTooltip(),this._updateSelection(e.manipulator);const s=this._updateEventState(2),r=i.data.coordinateHelper.vectorToArray(o.handle.pos),l=i.data.parts.indexOf(a.part);return this.events.emit("vertex-add",{type:"vertex-add",object:this.object,vertices:[{coordinates:r,componentIndex:l,vertexIndex:a.index}],added:r}),s&&this._updateEventState(0),o}_updateMoveManipulationPosition(){const e=y(we,0,0,0);let t=0,i=!1,a=null,n=null;for(const r of this._manipulatorInfos)"vertex"===r.type&&(r.manipulator.selected?(t++,O(e,e,r.manipulator.renderLocation),null==a||r.selectedIndex>a.selectedIndex?(n=a,a=r):(null==n||r.selectedIndex>n.selectedIndex)&&(n=r)):i=!0);const o=this.object,s=this._operations?.data.geometry;if(0===t){const e=o.visible&&this.enableMoveObject;this._moveManipulation.xyManipulation.available=e,this._moveManipulation.xyAxisManipulation.available=e,this._moveManipulation.xyAxisManipulation.orthogonalAvailable=e,this._moveManipulation.zManipulation.available=e&&this.enableZShape&&B(this._operations,o.elevationInfo),this._moveManipulation.angle=Z(s),this._moveManipulation.radius=Y.radiusForSymbol(o.graphic?.symbol)}else{const e=o.visible;this._moveManipulation.xyManipulation.available=e,this._moveManipulation.xyAxisManipulation.available=e,this._moveManipulation.zManipulation.available=e&&this.enableZVertex&&B(this._operations,this.object.elevationInfo),this._moveManipulation.xyAxisManipulation.orthogonalAvailable=e&&1!==t;let i=0;if(null!=a){const e=a.handle.pos,t=null!=n?n.handle.pos:a.handle.leftSegment?.leftVertex?a.handle.leftSegment.leftVertex.pos:null,o=null==n&&a.handle.rightSegment?.rightVertex?a.handle.rightSegment.rightVertex.pos:null;t&&o?this._moveManipulation.xyAxisManipulation.available=!1:t?i=Ee(t,e):o&&(i=Ee(e,o))}this._moveManipulation.angle=i,this._moveManipulation.radius=X}0!==t&&i?(E(e,e,1/t),Se.spatialReference=this._operations.data.spatialReference,Se.hasZ=!0,this.view.renderCoordsHelper.fromRenderCoords(e,Se),this._moveManipulation.elevationAlignedLocation=Se):null==this._outlineVisualElement||this.object.isDraped||null==this._outlineVisualElement.attachmentOrigin?P(this._moveManipulation,this.object):this._moveManipulation.elevationAlignedLocation=this._outlineVisualElement.attachmentOrigin}_removeVertices(e){const t=new Array,i=this._operations;if(i){for(const a of e){const e=a.handle.part;if("vertex"===a.type&&i.canRemoveVertex(e)){t.push(a.handle),this._removeManipulator(a),this._removeManipulator(this._getManipulatorInfoFromHandle(a.handle.leftSegment)),this._removeManipulator(this._getManipulatorInfoFromHandle(a.handle.rightSegment));const n=i.removeVertices([a.handle]),o=n.removedVertices?.[0].createdSegment;o&&"line"===o.type?this._createVertexOrEdgeManipulator(o):this.enableEdgeOffset&&e.vertices.length<=2&&this._removeManipulator(this._getManipulatorInfoFromHandle(e.segments[0]))}}if(t.length>0){const e=t.map(e=>{const t=i.data.parts.indexOf(e.part);return{coordinates:i.data.coordinateHelper.vectorToArray(e.pos),componentIndex:t,vertexIndex:e.index}}),a=this._updateEventState(2);if(this.destroyed)return;if(this.events.emit("vertex-remove",{type:"vertex-remove",object:this.object,removed:e.map(e=>e.coordinates),vertices:e}),this.destroyed)return;if(a&&(this._updateEventState(0),this.destroyed))return;this._updateMoveManipulationPosition()}}}_moveVertices(e,t,i=("start"===t.action?0:1)){const a=this._operations;if(a){e.length>0&&a.moveVertices(e.map(e=>e.handle),t.mapDeltaX,t.mapDeltaY,t.mapDeltaZ,i);for(const t of e)this._updateManipulatorPosition(t)}}_offsetEdge(e,t,i){if(!this._operations)return;const a=t.clone();a.distance=i,this._operations.updateVertices([e.handle.leftVertex,e.handle.rightVertex],a),this._updateManipulatorPosition(this._getManipulatorInfoFromHandle(e.handle.leftVertex)),this._updateManipulatorPosition(this._getManipulatorInfoFromHandle(e.handle.rightVertex))}_manipulatorClickCallback(e,t){e.shiftKey||this._clearSelection(),"vertex"===t.type&&(t.manipulator.selected=!t.manipulator.selected,this.enableDeleteVertices&&e.button===pe.Right&&this._removeVertices([t])),"edge"===t.type&&e.button===pe.Left&&this._splitEdgeManipulator(t),e.stopPropagation()}_updateTranslateTooltip(e,t){null!=this._defaultTooltipInfo?this._resetTooltip():this._updateTranslateObjectTooltip(e,t)}_updateTranslateObjectTooltip(e,t){this._pendingEdgeOffsetInfo||(this.activeTooltipInfo=ne(e,t,this._tooltipsContext))}_updateEdgeOffsetTooltip(e){this._pendingEdgeOffsetInfo||(this.activeTooltipInfo=oe(this.object,e,this._tooltipsContext))}_resetTooltip(){const e=this.activeTooltipInfo;if(this._pendingEdgeOffsetInfo&&"reshape-edge-offset"===e?.type)return;let t=null;t=this._pendingEdgeOffsetInfo||null!=this._findActiveEdgeOffsetManipulatorInfo()?oe(this.object,null,this._tooltipsContext):this._defaultTooltipInfo,t!==e&&(null!=e&&null!=t&&"input"===this.tooltip.mode||(this.activeTooltipInfo=t))}get _defaultTooltipInfo(){const e=this._operations?.data.type;switch(e){case"polyline":case"polygon":return this._selectedVertexManipulatorInfo?this.tooltipInfos.selectedVertex:null;case"point":case"mesh":return this.tooltipInfos.movePoint;default:return null}}get _selectedVertexManipulatorInfo(){const e=this._manipulatorInfos.filter(e=>"vertex"===e.type&&e.manipulator.selected);return 1===e.length?e[0]:null}get _tooltipsContext(){const{tooltipInfos:e,activeTooltipInfo:t,automaticAreaMeasurementUtils:i,automaticLengthMeasurementUtils:a}=this;return{sketchOptions:this._sketchOptions,tooltipInfos:e,activeTooltipInfo:t,selectedVertexManipulatorInfo:this._selectedVertexManipulatorInfo,callbacks:this._tooltipCallbacks,automaticAreaMeasurementUtils:i,automaticLengthMeasurementUtils:a}}get test(){}};function ye(){return e=>{const{operation:t,mapEnd:i}=e;return null==t||null==i?e:{...e,signedDistance:t.signedDistanceToPoint(i)}}}function Oe(e){const t=e.size/2,i=t+e.collisionPadding;return{size:t/i,outlineSize:(t+e.outlineSize)/i}}function Ee(e,t){return Math.atan2(t[1]-e[1],t[0]-e[0])+Math.PI/2}function je(e){return new w({x:0,y:0,z:0,spatialReference:e})}function Ie(e){return"edge"===e.type&&"edgeManipulator"in e}e([f()],xe.prototype,"_numGrabbing",void 0),e([f()],xe.prototype,"_numDragging",void 0),e([f()],xe.prototype,"_pendingEdgeOffsetInfo",void 0),e([f()],xe.prototype,"_operations",null),e([f()],xe.prototype,"_segmentLabels",void 0),e([f({constructOnly:!0})],xe.prototype,"tool",void 0),e([f()],xe.prototype,"tooltip",void 0),e([f()],xe.prototype,"activeTooltipInfo",void 0),e([f({readOnly:!0})],xe.prototype,"updating",null),e([f()],xe.prototype,"manipulators",null),e([f()],xe.prototype,"view",null),e([f()],xe.prototype,"automaticAreaMeasurementUtils",null),e([f()],xe.prototype,"automaticLengthMeasurementUtils",null),e([f()],xe.prototype,"object",null),e([f()],xe.prototype,"enableZShape",null),e([f()],xe.prototype,"enableDeleteVertices",null),e([f()],xe.prototype,"enableZVertex",null),e([f()],xe.prototype,"autoHideManipulators",null),e([f()],xe.prototype,"enableMoveObject",null),e([f()],xe.prototype,"enableMidpoints",null),e([f()],xe.prototype,"enableEdgeOffset",null),e([f()],xe.prototype,"_sketchOptions",null),e([f()],xe.prototype,"_accentColor",null),e([f()],xe.prototype,"_tooltipsContext",null),xe=e([_("esri.views.3d.interactive.editingTools.reshape.ReshapeOperation")],xe);const Se=D(0,0,void 0,V.WGS84),we=I(),He=1e-6,Ve=16,De=32;export{xe as ReshapeOperation};