@arcgis/core 4.34.0-next.36 → 4.34.0-next.37

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 (613) hide show
  1. package/AttributeBinsGraphic.js +1 -1
  2. package/Basemap.js +1 -1
  3. package/Camera.js +1 -1
  4. package/CameraLayout.js +1 -1
  5. package/Graphic.js +1 -1
  6. package/Ground.js +1 -1
  7. package/Map.js +1 -1
  8. package/PopupTemplate.js +1 -1
  9. package/WebDocument2D.js +1 -1
  10. package/WebScene.js +1 -1
  11. package/analysis/Analysis.js +1 -1
  12. package/analysis/DimensionSimpleStyle.js +1 -1
  13. package/analysis/ElevationProfileLine.js +1 -1
  14. package/analysis/ElevationProfileLineChartOptions.js +1 -1
  15. package/analysis/ElevationProfileLineViewOptions.js +1 -1
  16. package/analysis/ElevationProfileUnits.js +1 -1
  17. package/analysis/LengthDimension.js +1 -1
  18. package/analysis/LineOfSightAnalysisObserver.js +1 -1
  19. package/analysis/LineOfSightAnalysisTarget.js +1 -1
  20. package/analysis/SlicePlane.js +1 -1
  21. package/analysis/Viewshed.js +1 -1
  22. package/analysis/VolumeMeasurement/CutFillOptions.js +1 -1
  23. package/analysis/support/AnalysisOriginWebScene.js +1 -1
  24. package/arcade/featureSetUtils.js +1 -1
  25. package/assets/esri/core/workers/RemoteClient.js +1 -1
  26. package/assets/esri/core/workers/chunks/02435c653064f879f547.js +1 -0
  27. package/assets/esri/core/workers/chunks/040a233ce6fbcc061cdb.js +1 -0
  28. package/assets/esri/core/workers/chunks/{4930bf8f57f481f3a4a3.js → 053086e0a043b00f1cca.js} +1 -1
  29. package/assets/esri/core/workers/chunks/05d6ccca0cf38c012873.js +1 -0
  30. package/assets/esri/core/workers/chunks/06bd2f5358c6b85d5420.js +1 -0
  31. package/assets/esri/core/workers/chunks/0801f9dde41ec5f36cca.js +1 -0
  32. package/assets/esri/core/workers/chunks/08b4a4c9f3d6478df40a.js +1 -0
  33. package/assets/esri/core/workers/chunks/0906f977d50b1c5d6ed5.js +1 -0
  34. package/assets/esri/core/workers/chunks/170fa807b71babedd185.js +1 -0
  35. package/assets/esri/core/workers/chunks/183130521210c855c565.js +1 -0
  36. package/assets/esri/core/workers/chunks/{ce8f0ed9179c0d314df8.js → 1a5ddb6d36249fe09cc8.js} +1 -1
  37. package/assets/esri/core/workers/chunks/1c87ed3a5960f8f06fc8.js +1 -0
  38. package/assets/esri/core/workers/chunks/1c8dbdb833a66f7183fc.js +1 -0
  39. package/assets/esri/core/workers/chunks/2177c0ef06c8e7e3e28e.js +1 -0
  40. package/assets/esri/core/workers/chunks/{a82d7e2eecfe654a65de.js → 21ea48186d01bf459ef6.js} +1 -1
  41. package/assets/esri/core/workers/chunks/23e0fd2d921f74834b12.js +1 -0
  42. package/assets/esri/core/workers/chunks/2b9c403f4b20b8f62804.js +1 -0
  43. package/assets/esri/core/workers/chunks/2d7bbd001b64138db3c1.js +1 -0
  44. package/assets/esri/core/workers/chunks/2f52a57e8c05a3ca1de8.js +1 -0
  45. package/assets/esri/core/workers/chunks/307df66d00ba5f88780d.js +1 -0
  46. package/assets/esri/core/workers/chunks/33aafaabea07b4f80209.js +1 -0
  47. package/assets/esri/core/workers/chunks/{209c70ba2925171ef742.js → 36d15d1dd19417b37d2f.js} +1 -1
  48. package/assets/esri/core/workers/chunks/{d6b2ab614f308db50c4a.js → 47cdd5a6351e0db3b2e9.js} +10 -10
  49. package/assets/esri/core/workers/chunks/4c7162883b228db563c6.js +1 -0
  50. package/assets/esri/core/workers/chunks/{236fc659747e812f6424.js → 4c77102f083198ae2a6a.js} +1 -1
  51. package/assets/esri/core/workers/chunks/4d2dcd667b30a98dd341.js +1 -0
  52. package/assets/esri/core/workers/chunks/4ff7c8420c77256f595a.js +1 -0
  53. package/assets/esri/core/workers/chunks/{82c10f2418e2f754388c.js → 50f56b417992eb30243e.js} +1 -1
  54. package/assets/esri/core/workers/chunks/5228f535719f5fc38b28.js +1 -0
  55. package/assets/esri/core/workers/chunks/{bd6c6acf23db2a2e8ef8.js → 53e166944a42af027345.js} +1 -1
  56. package/assets/esri/core/workers/chunks/54a686643e1ec1ea00ac.js +1 -0
  57. package/assets/esri/core/workers/chunks/568f49f9e50c505b2736.js +1 -0
  58. package/assets/esri/core/workers/chunks/56aafa6f8862629070d8.js +1 -0
  59. package/assets/esri/core/workers/chunks/5c5509147bda78ce338a.js +1 -0
  60. package/assets/esri/core/workers/chunks/{9742804f8ee350bf8052.js → 5c5678b15b59f9964bf0.js} +1 -1
  61. package/assets/esri/core/workers/chunks/5cdeb6dc72f452d6d1bc.js +1 -0
  62. package/assets/esri/core/workers/chunks/5d4e74eb4c659e8f42d6.js +1 -0
  63. package/assets/esri/core/workers/chunks/5fac0b2a5aa33e8a3a84.js +1 -0
  64. package/assets/esri/core/workers/chunks/64553b5eae4edc7f46dc.js +1 -0
  65. package/assets/esri/core/workers/chunks/67627b1965b27b2f1857.js +1 -0
  66. package/assets/esri/core/workers/chunks/{0e7e4426daba4a008849.js → 68edbc3b124eb8e28dd6.js} +1 -1
  67. package/assets/esri/core/workers/chunks/69dc5a7abc1fda2474ad.js +1 -0
  68. package/assets/esri/core/workers/chunks/{d6eff6cc30acdca04835.js → 6c167daf115cd6abb3e5.js} +1 -1
  69. package/assets/esri/core/workers/chunks/6f122e4a2a1f913523b4.js +1 -0
  70. package/assets/esri/core/workers/chunks/{1dc410bc070cabb7198d.js → 72e0fda211d980572292.js} +1 -1
  71. package/assets/esri/core/workers/chunks/761dab8780495286ec4e.js +1 -0
  72. package/assets/esri/core/workers/chunks/7641e24ffa0215d51c34.js +1 -0
  73. package/assets/esri/core/workers/chunks/7e9d5beca1991c961ed8.js +1 -0
  74. package/assets/esri/core/workers/chunks/826e4bf6374f324d7f19.js +1 -0
  75. package/assets/esri/core/workers/chunks/{69d44e08861fb8cdd954.js → 82de1b50ae286f1e6c44.js} +1 -1
  76. package/assets/esri/core/workers/chunks/860bd6d6f0c74ca301a4.js +1 -0
  77. package/assets/esri/core/workers/chunks/8e7dced4a8d089185c3a.js +1 -0
  78. package/assets/esri/core/workers/chunks/{7d25f57299c642e727a6.js → 938baf4f99332dfdf29d.js} +1 -1
  79. package/assets/esri/core/workers/chunks/9a4d0006c118ae5b45c0.js +1 -0
  80. package/assets/esri/core/workers/chunks/a1591d7f82e06cab5de4.js +1 -0
  81. package/assets/esri/core/workers/chunks/a76792c4edd1d688fba2.js +1 -0
  82. package/assets/esri/core/workers/chunks/ada46055fafb8ae21dbe.js +1 -0
  83. package/assets/esri/core/workers/chunks/{9f43736d6d80c8e858b2.js → ae667084cb6a08b97c37.js} +1 -1
  84. package/assets/esri/core/workers/chunks/{0550e775677597f3752c.js → afb51b8562f8cb29b97e.js} +1 -1
  85. package/assets/esri/core/workers/chunks/{b00ad853fa4826d0ceb3.js → b12c44faa1efa60067b0.js} +1 -1
  86. package/assets/esri/core/workers/chunks/{c9fe9792312f0161ef5a.js → b1b6300451cc4ccefd46.js} +1 -1
  87. package/assets/esri/core/workers/chunks/b2f2c1108fb7cbdd1a68.js +1 -0
  88. package/assets/esri/core/workers/chunks/{37bfc1a771792b6697fd.js → b3466edccd553ae0a5d0.js} +2 -2
  89. package/assets/esri/core/workers/chunks/b45dbbeae54cea2bbc10.js +1 -0
  90. package/assets/esri/core/workers/chunks/b49b73e2d0d643dfa351.js +1 -0
  91. package/assets/esri/core/workers/chunks/b810e2f87c9c59ae04b1.js +1 -0
  92. package/assets/esri/core/workers/chunks/{20a96c17d1a117dfdf77.js → b8c1a08020d44ee03a17.js} +1 -1
  93. package/assets/esri/core/workers/chunks/bb0c5275e51d170ac795.js +1 -0
  94. package/assets/esri/core/workers/chunks/{7a4730c1e6a5355b7a05.js → bb1213adeb05d89fbfdb.js} +1 -1
  95. package/assets/esri/core/workers/chunks/bd1ba44362b967977003.js +1 -0
  96. package/assets/esri/core/workers/chunks/c18ac2018aea6ba97eec.js +1 -0
  97. package/assets/esri/core/workers/chunks/c3d3e55abf01dae271fb.js +1 -0
  98. package/assets/esri/core/workers/chunks/c5c9f0c8da5f7bf41728.js +1 -0
  99. package/assets/esri/core/workers/chunks/c78d98ab82f31ddda362.js +1 -0
  100. package/assets/esri/core/workers/chunks/ca5f63c0297612059486.js +1 -0
  101. package/assets/esri/core/workers/chunks/cab294fd04f2a5eda81d.js +1 -0
  102. package/assets/esri/core/workers/chunks/cca36750c86352c6d1f9.js +1 -0
  103. package/assets/esri/core/workers/chunks/ccf3f29d0b1bde90c3cf.js +1 -0
  104. package/assets/esri/core/workers/chunks/cd9e6b86ab0103044370.js +1 -0
  105. package/assets/esri/core/workers/chunks/ce211163d078d3d742ce.js +1 -0
  106. package/assets/esri/core/workers/chunks/{0ca8d6516323fc28dd58.js → cf1f8fd1d62be0e02e10.js} +1 -1
  107. package/assets/esri/core/workers/chunks/d16484b389d56a43d204.js +1 -0
  108. package/assets/esri/core/workers/chunks/d54e18e0f30734610f35.js +1 -0
  109. package/assets/esri/core/workers/chunks/d7ec905d87a19a1061e7.js +1 -0
  110. package/assets/esri/core/workers/chunks/{e9a366c225b0687293e3.js → d80e26a1f4a61b1c4cf9.js} +1 -1
  111. package/assets/esri/core/workers/chunks/{eec36628e638e244f452.js → ddeaf688d72b2873c4ac.js} +1 -1
  112. package/assets/esri/core/workers/chunks/debd832b6c2c0b2ea362.js +1 -0
  113. package/assets/esri/core/workers/chunks/dfa3ad5d750d7b143a06.js +1 -0
  114. package/assets/esri/core/workers/chunks/dfc5936fbbd26f27a92a.js +1 -0
  115. package/assets/esri/core/workers/chunks/e01fa6389bd0b1ae51a5.js +1 -0
  116. package/assets/esri/core/workers/chunks/e4d08a85d158c705aa3d.js +1 -0
  117. package/assets/esri/core/workers/chunks/e59fdb8f625e9080f097.js +1 -0
  118. package/assets/esri/core/workers/chunks/ed1cd90e899dc9c15ee3.js +1 -0
  119. package/assets/esri/core/workers/chunks/ee28cd411a93245fb90c.js +1 -0
  120. package/assets/esri/core/workers/chunks/f5bb7c90f48cae594bc3.js +1 -0
  121. package/assets/esri/core/workers/chunks/f79c9b37f2842ed88a9b.js +1 -0
  122. package/assets/esri/core/workers/chunks/f88fe2e8fbc763bdc940.js +1 -0
  123. package/assets/esri/core/workers/chunks/faa0cfee8c1de9b5b78c.js +1 -0
  124. package/assets/esri/core/workers/chunks/fae53d825dd9fef0426c.js +1 -0
  125. package/chunks/TimeInterval.js +1 -1
  126. package/chunks/languageUtils.js +1 -1
  127. package/config.js +1 -1
  128. package/core/Clonable.d.ts +1 -1
  129. package/core/Clonable.js +1 -1
  130. package/core/Collection.js +1 -1
  131. package/core/Evented.d.ts +1 -1
  132. package/core/Evented.js +1 -1
  133. package/core/Identifiable.d.ts +1 -1
  134. package/core/Identifiable.js +1 -1
  135. package/core/Loadable.d.ts +1 -1
  136. package/core/Loadable.js +1 -1
  137. package/core/loadAll.js +1 -1
  138. package/editing/sharedTemplates/SharedTemplate.js +1 -1
  139. package/editing/sharedTemplates/SharedTemplateProvider.js +1 -1
  140. package/editing/sharedTemplates/templateDefinitions/TemplateDefinitionBase.js +1 -1
  141. package/effects/FocusArea.js +1 -1
  142. package/effects/FocusAreaOutline.js +1 -1
  143. package/effects/FocusAreas.js +1 -1
  144. package/form/elements/UtilityNetworkAssociationsElement.js +1 -1
  145. package/form/elements/inputs/attachments/Input.js +1 -1
  146. package/geometry/Mesh.js +1 -1
  147. package/geometry/support/MeshComponent.js +1 -1
  148. package/geometry/support/MeshGeoreferencedVertexSpace.js +1 -1
  149. package/geometry/support/MeshLocalVertexSpace.js +1 -1
  150. package/geometry/support/MeshMaterial.js +1 -1
  151. package/geometry/support/MeshTexture.js +1 -1
  152. package/geometry/support/MeshTextureTransform.js +1 -1
  153. package/geometry/support/MeshTransform.js +1 -1
  154. package/geometry/support/MeshVertexAttributes.js +1 -1
  155. package/geometry/support/meshUtils/Metadata.js +1 -1
  156. package/graphic/GeoRSSGraphicOrigin.d.ts +4 -0
  157. package/graphic/GeoRSSGraphicOrigin.js +5 -0
  158. package/graphic/GraphicOrigin.js +1 -1
  159. package/graphic/KnowledgeGraphGraphicOrigin.d.ts +4 -0
  160. package/graphic/KnowledgeGraphGraphicOrigin.js +5 -0
  161. package/graphic/MapImageGraphicOrigin.d.ts +4 -0
  162. package/graphic/MapImageGraphicOrigin.js +5 -0
  163. package/graphic/MapNotesGraphicOrigin.d.ts +4 -0
  164. package/graphic/MapNotesGraphicOrigin.js +5 -0
  165. package/graphic/OrientedImageryGraphicOrigin.d.ts +4 -0
  166. package/graphic/OrientedImageryGraphicOrigin.js +5 -0
  167. package/graphic/ParquetGraphicOrigin.d.ts +4 -0
  168. package/graphic/ParquetGraphicOrigin.js +5 -0
  169. package/graphic/SubtypeGroupGraphicOrigin.d.ts +4 -0
  170. package/graphic/SubtypeGroupGraphicOrigin.js +5 -0
  171. package/graphic/TileGraphicOrigin.d.ts +4 -0
  172. package/graphic/TileGraphicOrigin.js +5 -0
  173. package/graphic/graphicOrigins.d.ts +8 -0
  174. package/graphic/graphicOrigins.js +1 -1
  175. package/{views/3d/terrain/RenderOrder.js → graphic/isGeoRSSGraphicOrigin.js} +1 -0
  176. package/graphic/isKnowledgeGraphGraphicOrigin.js +5 -0
  177. package/graphic/isMapImageGraphicOrigin.js +5 -0
  178. package/graphic/isMapNotesGraphicOrigin.js +5 -0
  179. package/graphic/isOrientedImageryGraphicOrigin.js +5 -0
  180. package/graphic/isParquetGraphicOrigin.js +5 -0
  181. package/graphic/isSubtypeGroupGraphicOrigin.js +5 -0
  182. package/graphic/isTileGraphicOrigin.js +5 -0
  183. package/identity/IdentityManagerBase.js +1 -1
  184. package/interfaces.d.ts +228 -0
  185. package/kernel.js +1 -1
  186. package/layers/CSVLayer.js +1 -1
  187. package/layers/FeatureLayer.js +1 -1
  188. package/layers/GeoJSONLayer.js +1 -1
  189. package/layers/ImageryLayer.js +1 -1
  190. package/layers/ImageryTileLayer.js +1 -1
  191. package/layers/Layer.js +1 -1
  192. package/layers/MapNotesLayer.js +1 -1
  193. package/layers/OGCFeatureLayer.js +1 -1
  194. package/layers/OrientedImageryLayer.js +1 -1
  195. package/layers/ParquetLayer.js +1 -1
  196. package/layers/SceneLayer.js +1 -1
  197. package/layers/StreamLayer.js +1 -1
  198. package/layers/SubtypeGroupLayer.js +1 -1
  199. package/layers/WCSLayer.js +1 -1
  200. package/layers/WFSLayer.js +1 -1
  201. package/layers/buildingSublayers/BuildingComponentSublayer.js +1 -1
  202. package/layers/buildingSublayers/BuildingSublayer.js +1 -1
  203. package/layers/graphics/data/FeatureStore.js +1 -1
  204. package/layers/graphics/sources/CSVSource.js +1 -1
  205. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  206. package/layers/graphics/sources/GeoJSONSource.js +1 -1
  207. package/layers/graphics/sources/MemorySource.js +1 -1
  208. package/layers/graphics/sources/OGCFeatureSource.js +1 -1
  209. package/layers/graphics/sources/ParquetSource.js +1 -1
  210. package/layers/graphics/sources/WFSSource.js +1 -1
  211. package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
  212. package/layers/mixins/EditBusLayer.js +1 -1
  213. package/layers/orientedImagery/core/CameraOrientationHPR.js +1 -1
  214. package/layers/orientedImagery/core/CameraOrientationLTP.js +1 -1
  215. package/layers/orientedImagery/core/CameraOrientationOPK.js +1 -1
  216. package/layers/orientedImagery/core/CameraOrientationYPR.js +1 -1
  217. package/layers/orientedImagery/core/ElevationSourceDefinitions.js +1 -1
  218. package/layers/orientedImagery/core/ExposurePoint.js +1 -1
  219. package/layers/support/BuildingSummaryStatistics.js +1 -1
  220. package/layers/support/ControlPointsGeoreference.js +1 -1
  221. package/layers/support/DisplayFilter.js +1 -1
  222. package/layers/support/DisplayFilterInfo.js +1 -1
  223. package/layers/support/EditFieldsInfo.js +1 -1
  224. package/layers/support/ExpressionInfo.js +1 -1
  225. package/layers/support/FeatureIndex.js +1 -1
  226. package/layers/support/FeatureTemplate.js +1 -1
  227. package/layers/support/FeatureType.js +1 -1
  228. package/layers/support/GeometryFieldsInfo.js +1 -1
  229. package/layers/support/GeoreferenceBase.js +1 -1
  230. package/layers/support/KMLSublayer.js +1 -1
  231. package/layers/support/LayerContingentValuesCache.js +1 -1
  232. package/layers/support/LocalMediaElementSource.js +1 -1
  233. package/layers/support/MediaElementBase.js +1 -1
  234. package/layers/support/PlaybackInfo.js +1 -1
  235. package/layers/support/Relationship.js +1 -1
  236. package/layers/support/StreamConnection.js +1 -1
  237. package/layers/support/Sublayer.js +1 -1
  238. package/layers/support/Subtype.js +1 -1
  239. package/layers/support/SubtypeSublayer.js +1 -1
  240. package/layers/support/TelemetryData.js +1 -1
  241. package/layers/support/TelemetryDisplay.js +1 -1
  242. package/layers/support/TimeInfo.js +1 -1
  243. package/layers/support/TrackInfo.js +1 -1
  244. package/layers/support/TrackPartInfo.js +1 -1
  245. package/layers/support/VideoFrame.js +1 -1
  246. package/layers/support/VideoTimeExtent.js +1 -1
  247. package/layers/support/WMSSublayer.js +1 -1
  248. package/layers/voxel/VoxelColorStop.js +1 -1
  249. package/layers/voxel/VoxelDynamicSection.js +1 -1
  250. package/layers/voxel/VoxelIsosurface.js +1 -1
  251. package/layers/voxel/VoxelOpacityStop.js +1 -1
  252. package/layers/voxel/VoxelRangeFilter.js +1 -1
  253. package/layers/voxel/VoxelSection.js +1 -1
  254. package/layers/voxel/VoxelSlice.js +1 -1
  255. package/layers/voxel/VoxelTransferFunctionStyle.js +1 -1
  256. package/layers/voxel/VoxelUniqueValue.js +1 -1
  257. package/linkChart/ChronologicalLayoutSettings.js +1 -1
  258. package/linkChart/LayoutSettings.js +1 -1
  259. package/linkChart/LinkChartProperties.js +1 -1
  260. package/linkChart/NonspatialDataDisplay.js +1 -1
  261. package/linkChart/OrganicLayoutSettings.js +1 -1
  262. package/networks/Network.js +1 -1
  263. package/networks/RulesTable.js +1 -1
  264. package/networks/UtilityNetwork.js +1 -1
  265. package/networks/support/NetworkSystemLayers.js +1 -1
  266. package/networks/support/UtilityNetworkLookupHelper.js +1 -1
  267. package/package.json +1 -1
  268. package/popup/content/AttachmentsContent.js +1 -1
  269. package/popup/content/RelationshipContent.js +1 -1
  270. package/popup/content/UtilityNetworkAssociationsContent.js +1 -1
  271. package/popup/support/AttachmentsOrderByInfo.js +1 -1
  272. package/popup/support/FieldInfoFormat.js +1 -1
  273. package/popup/support/UtilityNetworkAssociationType.js +1 -1
  274. package/portal/Portal.js +1 -1
  275. package/portal/PortalItem.js +1 -1
  276. package/renderers/PieChartRenderer.js +1 -1
  277. package/renderers/support/HeatmapLegendOptions.js +1 -1
  278. package/renderers/support/OthersCategory.js +1 -1
  279. package/renderers/support/RasterPresetRenderer.js +1 -1
  280. package/renderers/support/RendererLegendOptions.js +1 -1
  281. package/renderers/support/UniqueValue.js +1 -1
  282. package/renderers/support/UniqueValueClass.js +1 -1
  283. package/renderers/support/UniqueValueGroup.js +1 -1
  284. package/renderers/visualVariables/support/VisualVariableLegendOptions.js +1 -1
  285. package/rest/featureService/FeatureService.js +1 -1
  286. package/rest/support/AttributeBinsFeatureSet.js +1 -1
  287. package/rest/support/AttributeBinsGrouping.js +1 -1
  288. package/rest/support/AttributeBinsQuery.js +1 -1
  289. package/rest/support/BinParametersBase.js +1 -1
  290. package/rest/support/ClosestFacilityParameters.js +1 -1
  291. package/rest/support/DataLayer.js +1 -1
  292. package/rest/support/DateBinTimeInterval.js +1 -1
  293. package/rest/support/DirectionLine.js +1 -1
  294. package/rest/support/DirectionPoint.js +1 -1
  295. package/rest/support/FindImagesParameters.js +1 -1
  296. package/rest/support/FullTextSearch.js +1 -1
  297. package/rest/support/ImageBoundaryParameters.js +1 -1
  298. package/rest/support/ImageGPSInfoParameters.js +1 -1
  299. package/rest/support/ImageToMapMultirayParameters.js +1 -1
  300. package/rest/support/ImageToMapParameters.js +1 -1
  301. package/rest/support/ImageUrlParameters.js +1 -1
  302. package/rest/support/ImageVolumeParameters.js +1 -1
  303. package/rest/support/MapToImageParameters.js +1 -1
  304. package/rest/support/NetworkUrl.js +1 -1
  305. package/rest/support/PointBarrier.js +1 -1
  306. package/rest/support/PolygonBarrier.js +1 -1
  307. package/rest/support/PolylineBarrier.js +1 -1
  308. package/rest/support/RouteInfo.js +1 -1
  309. package/rest/support/RouteParameters.js +1 -1
  310. package/rest/support/ServiceAreaParameters.js +1 -1
  311. package/rest/support/Stop.js +1 -1
  312. package/rest/support/TravelMode.js +1 -1
  313. package/smartMapping/raster/support/adapters/RasterLayerAdapter.js +1 -1
  314. package/smartMapping/support/adapters/LayerAdapter.js +1 -1
  315. package/support/actions/ActionBase.js +1 -1
  316. package/support/revision.js +1 -1
  317. package/symbols/LineStyleMarker3D.js +1 -1
  318. package/symbols/PathSymbol3DLayer.js +1 -1
  319. package/symbols/support/ElevationInfo.js +1 -1
  320. package/symbols/support/Symbol3DTextBackground.js +1 -1
  321. package/symbols/support/previewSymbol3D.js +1 -1
  322. package/tables/elements/AttributeTableAttachmentElement.js +1 -1
  323. package/tables/elements/AttributeTableFieldElement.js +1 -1
  324. package/tables/elements/AttributeTableGroupElement.js +1 -1
  325. package/tables/elements/AttributeTableRelationshipElement.js +1 -1
  326. package/tables/support/FieldOrder.js +1 -1
  327. package/undoredo/support/Services.js +1 -1
  328. package/versionManagement/VersionManagementService.js +1 -1
  329. package/versionManagement/VersioningState.js +1 -1
  330. package/views/2d/constraints/GeometryConstraint.js +1 -1
  331. package/views/2d/constraints/RotationConstraint.js +1 -1
  332. package/views/2d/constraints/ZoomConstraint.js +1 -1
  333. package/views/2d/engine/DisplayObject.js +1 -1
  334. package/views/2d/engine/ManagedCanvas.js +1 -1
  335. package/views/2d/engine/vectorTiles/decluttering/CollisionJob.js +1 -1
  336. package/views/2d/engine/vectorTiles/shaders/VTLBackgroundMaterial.js +1 -1
  337. package/views/2d/engine/vectorTiles/shaders/VTLCircleMaterial.js +1 -1
  338. package/views/2d/engine/vectorTiles/shaders/VTLFillMaterial.js +1 -1
  339. package/views/2d/engine/vectorTiles/shaders/VTLLineMaterial.js +1 -1
  340. package/views/2d/engine/vectorTiles/shaders/VTLMaterial.js +1 -1
  341. package/views/2d/engine/vectorTiles/shaders/VTLSymbolMaterial.js +1 -1
  342. package/views/2d/engine/webgl/Profiler.js +1 -1
  343. package/views/2d/engine/webgl/TextureManager.js +1 -1
  344. package/views/2d/engine/webgl/collisions/LabelMetric.js +1 -1
  345. package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
  346. package/views/2d/interactive/editingTools/ControlPointsTransformTool.js +1 -1
  347. package/views/2d/interactive/editingTools/TransformTool.js +1 -1
  348. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  349. package/views/2d/layers/GeoRSSLayerView2D.js +1 -1
  350. package/views/2d/layers/StreamLayerView2D.js +1 -1
  351. package/views/2d/layers/features/FeatureSourceEventLog.js +1 -1
  352. package/views/2d/layers/features/layerAdapters/CatalogFootprintLayerAdapter.js +1 -1
  353. package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +1 -1
  354. package/views/2d/layers/features/layerAdapters/InMemoryLayerAdapter.js +1 -1
  355. package/views/2d/layers/features/layerAdapters/KnowledgeGraphSublayerAdapter.js +1 -1
  356. package/views/2d/layers/features/layerAdapters/OGCFeatureLayerAdapter.js +1 -1
  357. package/views/2d/layers/features/layerAdapters/OrientedImageryLayerAdapter.js +1 -1
  358. package/views/2d/layers/features/layerAdapters/ParquetLayerAdapter.js +1 -1
  359. package/views/2d/layers/features/layerAdapters/StreamLayerAdapter.js +1 -1
  360. package/views/2d/layers/features/layerAdapters/SubtypeGroupLayerAdapter.js +1 -1
  361. package/views/2d/layers/features/processor/AAggregateStrategy.js +1 -1
  362. package/views/2d/layers/features/schema/processor/LabelMatcherSchema.js +1 -1
  363. package/views/2d/layers/features/schema/processor/SimpleProcessorSchema.js +1 -1
  364. package/views/2d/layers/features/schema/processor/SubtypeProcessorSchema.js +1 -1
  365. package/views/2d/layers/features/sources/strategies/StreamLoadStrategy.js +1 -1
  366. package/views/2d/layers/features/sources/strategies/chunks/SourceChunkStore.js +1 -1
  367. package/views/2d/layers/features/support/TileStore.js +1 -1
  368. package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
  369. package/views/2d/layers/support/RouteLayerInteraction.js +1 -1
  370. package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementPathHelper.js +1 -1
  371. package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
  372. package/views/3d/analysis/LineOfSightAnalysisView3D.js +1 -1
  373. package/views/3d/constraints/AltitudeConstraint.js +1 -1
  374. package/views/3d/constraints/ClipDistanceConstraint.js +1 -1
  375. package/views/3d/constraints/Constraints.js +1 -1
  376. package/views/3d/constraints/TiltConstraint.js +1 -1
  377. package/views/3d/environment/EnvironmentManager.js +1 -1
  378. package/views/3d/environment/SunLighting.js +1 -1
  379. package/views/3d/environment/VirtualLighting.js +1 -1
  380. package/views/3d/interactive/Manipulator3D.js +1 -1
  381. package/views/3d/interactive/editingTools/ManipulatedObject3DGraphic.js +1 -1
  382. package/views/3d/interactive/editingTools/ManipulatedObject3DMediaElement.js +1 -1
  383. package/views/3d/interactive/editingTools/manipulations/MoveXYAxisManipulation.js +1 -1
  384. package/views/3d/interactive/editingTools/manipulations/MoveZManipulation.js +1 -1
  385. package/views/3d/interactive/editingTools/media/MediaElementManipulator3D.js +1 -1
  386. package/views/3d/interactive/editingTools/move/MoveTool3D.js +1 -1
  387. package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
  388. package/views/3d/interactive/editingTools/reshape/ReshapeTool3D.js +1 -1
  389. package/views/3d/interactive/editingTools/transform/ExtentTransformTool.js +1 -1
  390. package/views/3d/interactive/editingTools/transform/ScaleRotateTransform.js +1 -1
  391. package/views/3d/interactive/editingTools/transform/TransformTool3D.js +1 -1
  392. package/views/3d/interactive/visualElements/DrapedVisualElementResources.js +1 -1
  393. package/views/3d/interactive/visualElements/OutlineVisualElement.js +1 -1
  394. package/views/3d/layers/BuildingSublayerView3D.js +1 -1
  395. package/views/3d/layers/FlowSubView3D.js +1 -1
  396. package/views/3d/layers/GraphicsView3D.js +1 -1
  397. package/views/3d/layers/GraphicsView3DDummyLayer.js +1 -1
  398. package/views/3d/layers/TiledLayerView3D.js +1 -1
  399. package/views/3d/layers/graphics/GraphicState.js +1 -1
  400. package/views/3d/layers/graphics/Graphics3DElevationAlignment.js +1 -1
  401. package/views/3d/layers/graphics/Graphics3DFeatureStore.js +1 -1
  402. package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorker.js +1 -1
  403. package/views/3d/layers/graphics/pipeline/featureSet/TiledFeatureStore.js +1 -1
  404. package/views/3d/layers/i3s/I3SGraphicsMap.js +1 -1
  405. package/views/3d/layers/i3s/I3SQueryFeatureStore.js +1 -1
  406. package/views/3d/layers/i3s/LayerElevationProvider.js +1 -1
  407. package/views/3d/layers/support/StageLayerElevationProvider.js +1 -1
  408. package/views/3d/state/ViewState.js +1 -1
  409. package/views/3d/support/CombinedElevationProvider.js +1 -1
  410. package/views/3d/support/EventedSet.js +1 -1
  411. package/views/3d/support/GraphicsMap.js +1 -1
  412. package/views/3d/support/LimitGraphicsMap.js +1 -1
  413. package/views/3d/support/flow/geometryUtils.js +1 -1
  414. package/views/3d/support/pointsOfInterest/ContentGeometryUpdates.js +1 -1
  415. package/views/3d/support/pointsOfInterest/SurfaceGeometryUpdates.js +1 -1
  416. package/views/3d/terrain/OverlayRenderer.js +1 -1
  417. package/views/3d/terrain/TerrainRenderer.js +1 -1
  418. package/views/3d/terrain/TerrainSurface.js +1 -1
  419. package/views/3d/terrain/tileUtils.js +1 -1
  420. package/views/3d/webgl-engine/lib/TextTextureAtlas.js +1 -1
  421. package/views/3d/webgl-engine/lib/Texture.js +1 -1
  422. package/views/3d/webgl-engine/lib/TextureRepository.js +1 -1
  423. package/views/3d/webgl-engine/lib/WebGLLayer.js +1 -1
  424. package/views/3d/webgl-engine/lib/lodRendering/InstanceData.js +1 -1
  425. package/views/SelectionManager.js +1 -1
  426. package/views/Theme.js +1 -1
  427. package/views/VideoView.js +1 -1
  428. package/views/View.js +1 -1
  429. package/views/analysis/ElevationProfileResult.js +1 -1
  430. package/views/draw/DrawAction.js +1 -1
  431. package/views/draw/DrawGraphicTool.js +1 -1
  432. package/views/draw/DrawManipulator.js +1 -1
  433. package/views/draw/DrawOperation.js +1 -1
  434. package/views/draw/support/Box.js +1 -1
  435. package/views/draw/support/GraphicMover.js +1 -1
  436. package/views/draw/support/Reshape.js +1 -1
  437. package/views/interactive/GraphicManipulator.js +1 -1
  438. package/views/interactive/InteractiveToolBase.js +1 -1
  439. package/views/interactive/Tooltip.js +1 -1
  440. package/views/interactive/editGeometry/EditGeometry.js +1 -1
  441. package/views/interactive/editGeometry/EditGeometryOperations.js +1 -1
  442. package/views/interactive/snapping/SnappingManager.js +1 -1
  443. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorker.js +1 -1
  444. package/views/layers/LayerView.js +1 -1
  445. package/views/support/GroundViewElevationSampler.js +1 -1
  446. package/views/ui/UI.js +1 -1
  447. package/webdoc/GeotriggersInfo.js +1 -1
  448. package/webdoc/IPSInfo.js +1 -1
  449. package/webdoc/geotriggersInfo/DeviceLocationFeed.js +1 -1
  450. package/webdoc/geotriggersInfo/ExpressionInfo.js +1 -1
  451. package/webdoc/geotriggersInfo/FeatureFenceParameters.js +1 -1
  452. package/webdoc/geotriggersInfo/FeatureFilter.js +1 -1
  453. package/webdoc/geotriggersInfo/FeatureLayerSource.js +1 -1
  454. package/webdoc/geotriggersInfo/Geotrigger.js +1 -1
  455. package/webdoc/geotriggersInfo/GeotriggerNotificationOptions.js +1 -1
  456. package/webdoc/ips/AppleIPSProperties.js +1 -1
  457. package/webdoc/ips/Configuration.js +1 -1
  458. package/webdoc/ips/GNSSProperties.js +1 -1
  459. package/webdoc/ips/PathSnappingProperties.js +1 -1
  460. package/webdoc/ips/PositioningService.js +1 -1
  461. package/webdoc/ips/SmoothingProperties.js +1 -1
  462. package/webmap/Bookmark.js +1 -1
  463. package/webmap/InitialViewProperties.js +1 -1
  464. package/webscene/InitialViewProperties.js +1 -1
  465. package/webscene/Presentation.js +1 -1
  466. package/webscene/Slide.js +1 -1
  467. package/webscene/SlideLegendInfo.js +1 -1
  468. package/webscene/support/Description.js +1 -1
  469. package/webscene/support/FeatureReference.js +1 -1
  470. package/webscene/support/FeatureReferenceId.js +1 -1
  471. package/webscene/support/LayerReference.js +1 -1
  472. package/webscene/support/SlideElements.js +1 -1
  473. package/webscene/support/SlideEnvironment.js +1 -1
  474. package/webscene/support/SlideGround.js +1 -1
  475. package/webscene/support/SlidePopupInfo.js +1 -1
  476. package/webscene/support/SlideVisibleLayer.js +1 -1
  477. package/webscene/support/Title.js +1 -1
  478. package/widgets/AreaMeasurement2D/AreaMeasurement2DTool.js +1 -1
  479. package/widgets/BasemapGallery/BasemapGalleryViewModel.js +1 -1
  480. package/widgets/BasemapGallery/support/BasemapGalleryItem.js +1 -1
  481. package/widgets/BasemapGallery/support/PortalBasemapsSource.js +1 -1
  482. package/widgets/BasemapLayerList/BasemapLayerListViewModel.js +1 -1
  483. package/widgets/BasemapLayerList.js +1 -1
  484. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
  485. package/widgets/BatchAttributeForm/templates/ElementTemplateBase.js +1 -1
  486. package/widgets/Bookmarks/BookmarksViewModel.js +1 -1
  487. package/widgets/Bookmarks.js +1 -1
  488. package/widgets/CatalogLayerList/CatalogLayerListViewModel.js +1 -1
  489. package/widgets/CatalogLayerList.js +1 -1
  490. package/widgets/CoordinateConversion/CoordinateConversionViewModel.js +1 -1
  491. package/widgets/Daylight/DaylightViewModel.js +1 -1
  492. package/widgets/DirectionalPad/DirectionalPadViewModel.js +1 -1
  493. package/widgets/Directions/DirectionsViewModel.js +1 -1
  494. package/widgets/DistanceMeasurement2D/DistanceMeasurement2DTool.js +1 -1
  495. package/widgets/Editor/EditorViewModel.js +1 -1
  496. package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
  497. package/widgets/Editor/Workflow.js +1 -1
  498. package/widgets/Editor/support/SketchController.js +1 -1
  499. package/widgets/ElevationProfile/ElevationProfileInteraction.js +1 -1
  500. package/widgets/ElevationProfile/ElevationProfileLine.js +1 -1
  501. package/widgets/Feature/FeatureRelationship/FeatureRelationshipViewModel.js +1 -1
  502. package/widgets/Feature/FeatureViewModel.js +1 -1
  503. package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
  504. package/widgets/FeatureForm/UtilityNetworkAssociationInput.js +1 -1
  505. package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
  506. package/widgets/FeatureTemplates/FeatureTemplatesViewModel.js +1 -1
  507. package/widgets/FeatureTemplates/TemplateItemGroup.js +1 -1
  508. package/widgets/Home/HomeViewModel.js +1 -1
  509. package/widgets/LayerList/LayerListViewModel.js +1 -1
  510. package/widgets/LayerList/ListItem.js +1 -1
  511. package/widgets/LayerList/ListItemPanel.js +1 -1
  512. package/widgets/LayerList.js +1 -1
  513. package/widgets/LinkChartLayoutSwitcher/LinkChartLayoutSwitcherViewModel.js +1 -1
  514. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  515. package/widgets/OrientedImageryViewer/components/ImageOverlays.js +1 -1
  516. package/widgets/OrientedImageryViewer/components/ImageViewerViewModel.js +1 -1
  517. package/widgets/OrientedImageryViewer/components/NavigationAction.js +1 -1
  518. package/widgets/PanoramicViewer/PanoramicViewerViewModel.js +1 -1
  519. package/widgets/PanoramicViewer/PanoramicZoomConditions.js +1 -1
  520. package/widgets/Print/PrintViewModel.js +1 -1
  521. package/widgets/Search/SearchSource.js +1 -1
  522. package/widgets/Search/SearchViewModel.js +1 -1
  523. package/widgets/Sketch/SketchViewModel.js +1 -1
  524. package/widgets/Sketch/support/OperationHandle.js +1 -1
  525. package/widgets/TableList/ListItem.js +1 -1
  526. package/widgets/TableList/ListItemPanel.js +1 -1
  527. package/widgets/TableList/TableListViewModel.js +1 -1
  528. package/widgets/TableList.js +1 -1
  529. package/widgets/TimeSlider/TimeSliderViewModel.js +1 -1
  530. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
  531. package/widgets/ValuePicker/ValuePickerViewModel.js +1 -1
  532. package/widgets/Widget.js +1 -1
  533. package/widgets/support/AnchorElementViewModel.js +1 -1
  534. package/widgets/support/GeolocationPositioning.js +1 -1
  535. package/widgets/support/GridControls/GridControlsViewModel.js +1 -1
  536. package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.js +1 -1
  537. package/widgets/support/Selector2D/SelectionOperation.js +1 -1
  538. package/widgets/support/UtilityNetworkAssociations/FeatureUtilityNetworkAssociationsViewModel.js +1 -1
  539. package/assets/esri/core/workers/chunks/038bd2fec9a91b5a949d.js +0 -1
  540. package/assets/esri/core/workers/chunks/093de3942e1ead231990.js +0 -1
  541. package/assets/esri/core/workers/chunks/0997e09fe5b0aba1f804.js +0 -1
  542. package/assets/esri/core/workers/chunks/0c0080b652cf8afc4e6b.js +0 -1
  543. package/assets/esri/core/workers/chunks/0f6207d84d15484a3181.js +0 -1
  544. package/assets/esri/core/workers/chunks/125fdea50620d4db2678.js +0 -1
  545. package/assets/esri/core/workers/chunks/152128775b4740e779ab.js +0 -1
  546. package/assets/esri/core/workers/chunks/173c5b8fa1ac7aa6e072.js +0 -1
  547. package/assets/esri/core/workers/chunks/1e58b1e191498417c21d.js +0 -1
  548. package/assets/esri/core/workers/chunks/2032b649350a75ba294f.js +0 -1
  549. package/assets/esri/core/workers/chunks/2105d2cc75e75bf8f1c0.js +0 -1
  550. package/assets/esri/core/workers/chunks/21246dfe99a4c5906f71.js +0 -1
  551. package/assets/esri/core/workers/chunks/221748295a5ec633177e.js +0 -1
  552. package/assets/esri/core/workers/chunks/2a695b50a384c45ace9a.js +0 -1
  553. package/assets/esri/core/workers/chunks/2ad63b8d6986ac21c398.js +0 -1
  554. package/assets/esri/core/workers/chunks/2c29f8a708a03cb703ab.js +0 -1
  555. package/assets/esri/core/workers/chunks/2df9bfddc737d89c94b8.js +0 -1
  556. package/assets/esri/core/workers/chunks/34ddb8da5c5c8533bd71.js +0 -1
  557. package/assets/esri/core/workers/chunks/40b0c5368b8322498189.js +0 -1
  558. package/assets/esri/core/workers/chunks/427deb82fae9c500b375.js +0 -1
  559. package/assets/esri/core/workers/chunks/4433c195c62a59739c06.js +0 -1
  560. package/assets/esri/core/workers/chunks/4ac6bf9ff1cfbde87c7b.js +0 -1
  561. package/assets/esri/core/workers/chunks/4b9003ddfe61dc3729f4.js +0 -1
  562. package/assets/esri/core/workers/chunks/4bb6148df66e62a5fcf0.js +0 -1
  563. package/assets/esri/core/workers/chunks/4fb13252a985131d3dae.js +0 -1
  564. package/assets/esri/core/workers/chunks/528212fb0474bdb2ec92.js +0 -1
  565. package/assets/esri/core/workers/chunks/5dba8c0c957becedf7f7.js +0 -1
  566. package/assets/esri/core/workers/chunks/5f995450f720483fcffa.js +0 -1
  567. package/assets/esri/core/workers/chunks/61aed9a292c981921869.js +0 -1
  568. package/assets/esri/core/workers/chunks/6aeff5908c41600a5dfc.js +0 -1
  569. package/assets/esri/core/workers/chunks/6c72e2c09ed62cb2fd79.js +0 -1
  570. package/assets/esri/core/workers/chunks/7099ff8dc699fedea931.js +0 -1
  571. package/assets/esri/core/workers/chunks/752eabfbed7b8b65cf3f.js +0 -1
  572. package/assets/esri/core/workers/chunks/7848ea5ca13ec350779a.js +0 -1
  573. package/assets/esri/core/workers/chunks/7a4ec66a577f7f7996c5.js +0 -1
  574. package/assets/esri/core/workers/chunks/81be8d23b8dfa4937eaf.js +0 -1
  575. package/assets/esri/core/workers/chunks/831d58235b8b9eb4cdc8.js +0 -1
  576. package/assets/esri/core/workers/chunks/90a0c1c5c851cc9b6d6d.js +0 -1
  577. package/assets/esri/core/workers/chunks/969a9edba4be8dcbcedd.js +0 -1
  578. package/assets/esri/core/workers/chunks/9a54c96b48e94d816881.js +0 -1
  579. package/assets/esri/core/workers/chunks/a53f2529b7067c28f320.js +0 -1
  580. package/assets/esri/core/workers/chunks/a6b6915b7321f77f765f.js +0 -1
  581. package/assets/esri/core/workers/chunks/aa12ba96fb8c91105473.js +0 -1
  582. package/assets/esri/core/workers/chunks/ab73df4f809430db6249.js +0 -1
  583. package/assets/esri/core/workers/chunks/acb95ae6203f708d71b4.js +0 -1
  584. package/assets/esri/core/workers/chunks/ae7f1499912c86973921.js +0 -1
  585. package/assets/esri/core/workers/chunks/b28855db6a30d4d4f348.js +0 -1
  586. package/assets/esri/core/workers/chunks/b4bbd38df56e57783cc0.js +0 -1
  587. package/assets/esri/core/workers/chunks/b98a049561b12a0555b7.js +0 -1
  588. package/assets/esri/core/workers/chunks/c0718a0461839be41a2a.js +0 -1
  589. package/assets/esri/core/workers/chunks/c0aee315b6218d6456cd.js +0 -1
  590. package/assets/esri/core/workers/chunks/c0ec1600a86bb9a848d4.js +0 -1
  591. package/assets/esri/core/workers/chunks/c9b11c7170c99f9e0e93.js +0 -1
  592. package/assets/esri/core/workers/chunks/ca88859fc69fcb4568c0.js +0 -1
  593. package/assets/esri/core/workers/chunks/cc3ca1729af33688c1e3.js +0 -1
  594. package/assets/esri/core/workers/chunks/cd150c7e1516134c7437.js +0 -1
  595. package/assets/esri/core/workers/chunks/cde79c3644166d4798a8.js +0 -1
  596. package/assets/esri/core/workers/chunks/d092a4b8fe3d37a6333d.js +0 -1
  597. package/assets/esri/core/workers/chunks/d4cadde4a9cbfe2c51d8.js +0 -1
  598. package/assets/esri/core/workers/chunks/d6a188a7d55db69ba30b.js +0 -1
  599. package/assets/esri/core/workers/chunks/d7172dc531b4548a8c60.js +0 -1
  600. package/assets/esri/core/workers/chunks/d88935ae5669d14c5b29.js +0 -1
  601. package/assets/esri/core/workers/chunks/dab82564928265b9f22d.js +0 -1
  602. package/assets/esri/core/workers/chunks/e82b1f91465d569012c4.js +0 -1
  603. package/assets/esri/core/workers/chunks/e892ed8b0b990d7eba28.js +0 -1
  604. package/assets/esri/core/workers/chunks/e897c5ce83db8a71b0a2.js +0 -1
  605. package/assets/esri/core/workers/chunks/efec0f496491a0647051.js +0 -1
  606. package/assets/esri/core/workers/chunks/f01a939af200616eb169.js +0 -1
  607. package/assets/esri/core/workers/chunks/f19426eb53d8430ded51.js +0 -1
  608. package/assets/esri/core/workers/chunks/f255b2232f6f049d462d.js +0 -1
  609. package/assets/esri/core/workers/chunks/f3358b19af0f03f16543.js +0 -1
  610. package/assets/esri/core/workers/chunks/f4c38a9c01c29b5a6244.js +0 -1
  611. package/assets/esri/core/workers/chunks/f6c1854f36b029fa6c37.js +0 -1
  612. package/assets/esri/core/workers/chunks/fa01d418237d7fa67efc.js +0 -1
  613. package/assets/esri/core/workers/chunks/ff736cb5a9fd18368244.js +0 -1
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../../../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}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as h}from"../../../core/accessorSupport/decorators/subclass.js";import{G as l,c,g,m as p}from"../../../chunks/vec32.js";import{create as m,clone as d,fromValues as u}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{isLoadedOrLoadFor as _}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 S,AmbientLight as U,FillLight as C}from"../webgl-engine/lighting/Lightsources.js";let E=class extends t.EventedAccessor{constructor(){super(),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 S,this._ambientLight=new U,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 _(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.qualitySettings.ambientOcclusion,t,o),n(()=>e.qualitySettings.reflections,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,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=d(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 m=this._moonLight;p(m.intensity,H,R,s.globalFactor);const d=(1-.5*s.globalFactor)*(1-.4*s.noonFactor*(1-s.globalFactor));g(m.intensity,m.intensity,d),c(m.direction,h.directionToLightSource),this._view.stage?.renderer.updateLighting([a,l,m],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,qualitySettings:this._view.qualitySettings})}_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 H=u(.22,.22,.33),R=u(.22,.22,.22),k=m();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}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as h}from"../../../core/accessorSupport/decorators/subclass.js";import{G as l,c,g,m as p}from"../../../chunks/vec32.js";import{create as m,clone as d,fromValues as u}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{isLoadedOrLoadFor as _}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 S,AmbientLight as U,FillLight as C}from"../webgl-engine/lighting/Lightsources.js";let H=class extends t{constructor(){super(),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 S,this._ambientLight=new U,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 _(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.qualitySettings.ambientOcclusion,t,o),n(()=>e.qualitySettings.reflections,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,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=d(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 m=this._moonLight;p(m.intensity,E,R,s.globalFactor);const d=(1-.5*s.globalFactor)*(1-.4*s.noonFactor*(1-s.globalFactor));g(m.intensity,m.intensity,d),c(m.direction,h.directionToLightSource),this._view.stage?.renderer.updateLighting([a,l,m],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,qualitySettings:this._view.qualitySettings})}_resetReferencePosition(e=!1){this._referencePositionGeographic=null,e&&this._cameraHandler()}get test(){}};e([a({type:Boolean,readOnly:!0})],H.prototype,"updating",null),e([a()],H.prototype,"_disableWeather",void 0),e([a()],H.prototype,"weatherEnabled",null),e([a()],H.prototype,"_weatherAvailable",null),e([a()],H.prototype,"referencePositionGeographic",null),e([a()],H.prototype,"_referencePositionGeographic",void 0),e([a()],H.prototype,"_renderer",void 0),e([a()],H.prototype,"_canProjectCameraPosition",null),H=e([h("esri.views.3d.environment.EnvironmentManager")],H);const E=u(.22,.22,.33),R=u(.22,.22,.22),k=m();export{H 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/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../../../core/Evented.js";import{property as o}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as i}from"../../../core/accessorSupport/decorators/subclass.js";import n from"../../../webscene/SunLighting.js";var s;let a=s=class extends(t.EventedMixin(n)){constructor(e){super(e),this.cameraTrackingEnabled=!0,this.positionTimezoneInfo={hours:0,minutes:0,seconds:0,autoUpdated:!0};const t=(new Date).getFullYear(),o=new Date("March 15, "+t+" 12:00:00 UTC");this._set("defaultDate",o),this._set("date",o)}get defaultDate(){return new Date(this._get("defaultDate").getTime())}static fromWebsceneLighting(e){return new s(e.cloneConstructProperties())}set defaultDate(e){const t=this._get("date")===this._get("defaultDate");e=new Date(e.getTime()),this._set("defaultDate",e),t&&this._set("date",e)}set date(e){null!=e&&(this.positionTimezoneInfo.autoUpdated=!1,this._set("date",new Date(e.getTime())))}autoUpdate(e,t){const o=s.calculateTimezoneOffset(this.positionTimezoneInfo);this.positionTimezoneInfo.hours=t.hours,this.positionTimezoneInfo.minutes=t.minutes,this.positionTimezoneInfo.seconds=t.seconds;let i=null;null!=e&&(this.positionTimezoneInfo.autoUpdated=!0,isNaN(e.getTime())?(i=this.defaultDate.getTime(),this._set("date",this.defaultDate)):(i=this.date&&this.date.getTime(),this._set("date",new Date(e.getTime()))));const n=s.calculateTimezoneOffset(this.positionTimezoneInfo);if(o!==n&&(r.target=this,r.timezoneOffset=n,this.emit("timezone-will-change",r),r.target=null),null!=e)return isNaN(e.getTime())||i!==e.getTime()}clone(){const e=this._get("date")===this._get("defaultDate"),t=new s({...this.cloneConstructProperties(),defaultDate:this.defaultDate,cameraTrackingEnabled:this.cameraTrackingEnabled});return e&&t._set("date",t._get("defaultDate")),t.positionTimezoneInfo.autoUpdated=this.positionTimezoneInfo.autoUpdated,t.positionTimezoneInfo.hours=this.positionTimezoneInfo.hours,t.positionTimezoneInfo.minutes=this.positionTimezoneInfo.minutes,t.positionTimezoneInfo.seconds=this.positionTimezoneInfo.seconds,t}cloneWithWebsceneLighting(e){const t=this.clone();return null!=e.date&&(t.date=e.date),t.directShadowsEnabled=e.directShadowsEnabled,t.displayUTCOffset=e.displayUTCOffset,t}cloneNonPersistentConstructProperties(){return{cameraTrackingEnabled:this.cameraTrackingEnabled}}};e([o({type:Boolean})],a.prototype,"cameraTrackingEnabled",void 0),e([o({type:Date})],a.prototype,"defaultDate",null),e([o({type:Date})],a.prototype,"date",null),a=s=e([i("esri.views.3d.environment.SunLighting")],a),function(e){function t({hours:e,minutes:t,seconds:o}){return Math.round(e+t/60+o/3600)}e.calculateTimezoneOffset=t}(a||(a={}));const r={target:null,timezoneOffset:0},d=a;export{d as default};
5
+ import{__decorate as e}from"tslib";import{EventedMixin as t}from"../../../core/Evented.js";import{property as o}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as i}from"../../../core/accessorSupport/decorators/subclass.js";import n from"../../../webscene/SunLighting.js";var s;let a=s=class extends(t(n)){constructor(e){super(e),this.cameraTrackingEnabled=!0,this.positionTimezoneInfo={hours:0,minutes:0,seconds:0,autoUpdated:!0};const t=(new Date).getFullYear(),o=new Date("March 15, "+t+" 12:00:00 UTC");this._set("defaultDate",o),this._set("date",o)}get defaultDate(){return new Date(this._get("defaultDate").getTime())}static fromWebsceneLighting(e){return new s(e.cloneConstructProperties())}set defaultDate(e){const t=this._get("date")===this._get("defaultDate");e=new Date(e.getTime()),this._set("defaultDate",e),t&&this._set("date",e)}set date(e){null!=e&&(this.positionTimezoneInfo.autoUpdated=!1,this._set("date",new Date(e.getTime())))}autoUpdate(e,t){const o=s.calculateTimezoneOffset(this.positionTimezoneInfo);this.positionTimezoneInfo.hours=t.hours,this.positionTimezoneInfo.minutes=t.minutes,this.positionTimezoneInfo.seconds=t.seconds;let i=null;null!=e&&(this.positionTimezoneInfo.autoUpdated=!0,isNaN(e.getTime())?(i=this.defaultDate.getTime(),this._set("date",this.defaultDate)):(i=this.date&&this.date.getTime(),this._set("date",new Date(e.getTime()))));const n=s.calculateTimezoneOffset(this.positionTimezoneInfo);if(o!==n&&(r.target=this,r.timezoneOffset=n,this.emit("timezone-will-change",r),r.target=null),null!=e)return isNaN(e.getTime())||i!==e.getTime()}clone(){const e=this._get("date")===this._get("defaultDate"),t=new s({...this.cloneConstructProperties(),defaultDate:this.defaultDate,cameraTrackingEnabled:this.cameraTrackingEnabled});return e&&t._set("date",t._get("defaultDate")),t.positionTimezoneInfo.autoUpdated=this.positionTimezoneInfo.autoUpdated,t.positionTimezoneInfo.hours=this.positionTimezoneInfo.hours,t.positionTimezoneInfo.minutes=this.positionTimezoneInfo.minutes,t.positionTimezoneInfo.seconds=this.positionTimezoneInfo.seconds,t}cloneWithWebsceneLighting(e){const t=this.clone();return null!=e.date&&(t.date=e.date),t.directShadowsEnabled=e.directShadowsEnabled,t.displayUTCOffset=e.displayUTCOffset,t}cloneNonPersistentConstructProperties(){return{cameraTrackingEnabled:this.cameraTrackingEnabled}}};e([o({type:Boolean})],a.prototype,"cameraTrackingEnabled",void 0),e([o({type:Date})],a.prototype,"defaultDate",null),e([o({type:Date})],a.prototype,"date",null),a=s=e([i("esri.views.3d.environment.SunLighting")],a),function(e){function t({hours:e,minutes:t,seconds:o}){return Math.round(e+t/60+o/3600)}e.calculateTimezoneOffset=t}(a||(a={}));const r={target:null,timezoneOffset:0},d=a;export{d as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import r from"../../../core/Evented.js";import{property as t}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import n from"../../../webscene/VirtualLighting.js";var s;let c=s=class extends(r.EventedMixin(n)){constructor(e){super(e),this.cameraTrackingEnabled=!0}clone(){return new s({...this.cloneConstructProperties(),cameraTrackingEnabled:this.cameraTrackingEnabled})}static fromWebsceneLighting(e){return new s(e.cloneConstructProperties())}cloneWithWebsceneLighting(e){const r=this.clone();return r.directShadowsEnabled=e.directShadowsEnabled,r}cloneNonPersistentConstructProperties(){return{cameraTrackingEnabled:this.cameraTrackingEnabled}}};e([t({type:Boolean})],c.prototype,"cameraTrackingEnabled",void 0),c=s=e([o("esri.views.3d.environment.VirtualLighting")],c);const i=c;export{i as default};
5
+ import{__decorate as r}from"tslib";import{EventedMixin as e}from"../../../core/Evented.js";import{property as t}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import n from"../../../webscene/VirtualLighting.js";var s;let c=s=class extends(e(n)){constructor(r){super(r),this.cameraTrackingEnabled=!0}clone(){return new s({...this.cloneConstructProperties(),cameraTrackingEnabled:this.cameraTrackingEnabled})}static fromWebsceneLighting(r){return new s(r.cloneConstructProperties())}cloneWithWebsceneLighting(r){const e=this.clone();return e.directShadowsEnabled=r.directShadowsEnabled,e}cloneNonPersistentConstructProperties(){return{cameraTrackingEnabled:this.cameraTrackingEnabled}}};r([t({type:Boolean})],c.prototype,"cameraTrackingEnabled",void 0),c=s=r([o("esri.views.3d.environment.VirtualLighting")],c);const a=c;export{a as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{neverReached as e}from"../../../core/compilerUtils.js";import t from"../../../core/Evented.js";import{makeHandle as i}from"../../../core/handleUtils.js";import"../../../core/has.js";import{deg2rad as s}from"../../../core/mathUtils.js";import{destroyMaybe as o}from"../../../core/maybe.js";import{createRenderScreenPointArray3 as r,createScreenPointArray as n,screenPointObjectToArray as a,castRenderScreenPointArray as c}from"../../../core/screenUtils.js";import{fromMat4 as l}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{create as h}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{copy as d,set as _,multiply as u,identity as g}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{create as m}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{squaredDistance as f}from"../../../core/libs/gl-matrix-2/math/vec2.js";import{f as p,o as b,t as v,g as y,c as j,s as L,i as S,d as O}from"../../../chunks/vec32.js";import{create as R,ZEROS as w}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as T}from"../../../geometry/ellipsoidUtils.js";import A from"../../../geometry/Point.js";import{canProjectWithoutEngine as E,projectPoint as D}from"../../../geometry/projectionUtils.js";import{computeENUToPCPFLocalRotation as F}from"../../../geometry/projection/localRotationUtils.js";import{sphericalPCPFtoLonLatElevation as z}from"../../../geometry/projection/projectors.js";import{containsPointObject as P}from"../../../geometry/support/aaBoundingRect.js";import{distance2 as C,fromPoints as x,create as M,closestRayDistance2 as k}from"../../../geometry/support/lineSegment.js";import{fromPositionAndNormal as I,create as U,intersectRay as W}from"../../../geometry/support/plane.js";import{create as B}from"../../../geometry/support/ray.js";import{sv3d as H}from"../../../geometry/support/vectorStacks.js";import{clonePoint as q,hydratedSpatialReference as G}from"../../../layers/graphics/hydratedFeatures.js";import{getElevationOffset as V}from"../../../support/elevationInfoUtils.js";import{getElevationAtPoint as J}from"../support/ElevationProvider.js";import{fromScreen as K}from"../support/geometryUtils/ray.js";import N from"../webgl/RenderCamera.js";import{Object3D as Q}from"../webgl-engine/lib/Object3D.js";import{WebGLLayer as X}from"../webgl-engine/lib/WebGLLayer.js";class Y{constructor(e){this.metadata=void 0,this._camera=new N,this._elevation={offset:0,override:null},this.collisionType={type:"point"},this.collisionPriority=0,this._renderObjects=new Array,this.autoScaleRenderObjects=!0,this._available=!0,this._noDisplayCount=0,this._radius=10,this._worldSized=!1,this.focusMultiplier=2,this.touchMultiplier=2.5,this.worldOriented=!1,this._modelTransform=m(),this._worldFrame=null,this._renderLocation=R(),this._renderLocationDirty=!0,this._location=new A({x:0,y:0,z:0}),this._elevationAlignedLocation=new A,this._elevationAlignedLocationDirty=!0,this.interactive=!0,this.selectable=!1,this.grabbable=!0,this.consumesClicks=!0,this.cursor=null,this.grabCursor=null,this._grabbing=!1,this.dragging=!1,this._hovering=!1,this._selected=!1,this._state=0,this._focused=!1,this.events=new t.EventEmitter,this._screenLocation={screenPointArray:n(),renderScreenPointArray:r(),pixelSize:0},this._screenLocationDirty=!0,this._engineResourcesAddedToStage=!1,this._attached=!1,this._location.spatialReference=e.view.spatialReference,Object.assign(this,e);const i=this.view.state?.camera;i&&this._camera.copyFrom(i)}destroy(){this._applyObjectTransform=ge,this._removeResourcesFromStage(),this._engineResources=null,this.view=null,this._camera=null}get _stage(){return this.view?.stage}get elevationInfo(){return this._elevationInfo}set elevationInfo(e){this._elevationInfo=e,this._elevationAlignedLocationDirty=!0,this._renderLocationDirty=!0,this._updateEngineObject()}get renderObjects(){return this._renderObjects}set renderObjects(e){this._removeResourcesFromStage(),this._engineResources=null,this._renderObjects=e.slice(),this._updateEngineObject()}set available(e){e!==this._available&&(this._available=e,this._updateEngineObject())}get available(){return this._available}disableDisplay(){return this._noDisplayCount++,1===this._noDisplayCount&&this._updateEngineObject(),i(()=>{this._noDisplayCount--,0===this._noDisplayCount&&this._updateEngineObject()})}set radius(e){e!==this._radius&&(this._radius=e,this._updateEngineObject())}get radius(){return this._radius}set worldSized(e){e!==this._worldSized&&(this._worldSized=e,this._updateEngineObject())}get worldSized(){return this._worldSized}get modelTransform(){return this._modelTransform}set modelTransform(e){Z(e)&&(this._screenLocationDirty=!0),d(this._modelTransform,e),this._updateEngineObject()}get renderLocation(){return this._renderLocationDirty&&(this._renderLocationDirty=!1,this.view.renderCoordsHelper.toRenderCoords(this.elevationAlignedLocation,this._renderLocation),this.worldOriented?(this._worldFrame||(this._worldFrame=m()),$(this.view,this._renderLocation,this._worldFrame)):this._worldFrame&&(this._worldFrame=null)),this._renderLocation}set renderLocation(e){this.view.renderCoordsHelper.fromRenderCoords(e,this._location),this.elevationAlignedLocation=this._location}get location(){return this._location}set location(e){q(e,this._location),this._notifyLocationChanged()}_notifyLocationChanged(){this._renderLocationDirty=!0,this._screenLocationDirty=!0,this._elevationAlignedLocationDirty=!0,this._updateEngineObject(),this.events.emit("location-update",{location:this._location})}get elevationAlignedLocation(){return this._elevationAlignedLocationDirty?(this._evaluateElevationAlignment(),this._updateElevationAlignedLocation(),this._elevationAlignedLocation):this._elevationAlignedLocation}set elevationAlignedLocation(e){q(e,this._location),this._evaluateElevationAlignment(),this._location.z-=this._elevation.offset,this._updateElevationAlignedLocation(),this._updateEngineObject(),this.events.emit("location-update",{location:this._location})}_updateElevationAlignedLocation(){const e=null!=this._elevation.override?this._elevation.override:this.location.z||0;this._elevationAlignedLocation.x=this.location.x,this._elevationAlignedLocation.y=this.location.y,this._elevationAlignedLocation.z=e+this._elevation.offset,this._elevationAlignedLocation.spatialReference=G(this.location.spatialReference),this._renderLocationDirty=!0,this._screenLocationDirty=!0,this._elevationAlignedLocationDirty=!1}grabbableForEvent(){return!0}get grabbing(){return this._grabbing}set grabbing(e){e!==this._grabbing&&(this._grabbing=e,this._setFocused(this._hovering||this._grabbing),this._updateEngineObject())}get hovering(){return this._hovering}set hovering(e){e!==this._hovering&&(this._hovering=e,this._setFocused(this._hovering||this._grabbing),this._updateEngineObject())}get selected(){return this._selected}set selected(e){e!==this._selected&&(this._selected=e,this._updateEngineObject(),this.events.emit("select-changed",{action:e?"select":"deselect"}))}get state(){return this._state}set state(e){e!==this._state&&(this._state=e,this._updateEngineObject())}updateStateEnabled(e,t){t?this.state|=e:this.state&=~e}_setFocused(e){e!==this._focused&&(this._focused=e,this.events.emit("focus-changed",{action:!0===e?"focus":"unfocus"}))}get focused(){return this._focused}get screenLocation(){return this._ensureScreenLocation(),this._screenLocation}_ensureScreenLocation(){if(!this._screenLocationDirty)return;this._screenLocation.pixelSize=this._camera.computeScreenPixelSizeAt(this.renderLocation),this._screenLocationDirty=!1;let e;if(Z(this._modelTransform)){const t=this._calculateModelTransformOffset(_e);e=p(t,t,this.renderLocation)}else e=this.renderLocation;this._camera.projectToRenderScreen(e,this._screenLocation.renderScreenPointArray),this._camera.renderToScreen(this._screenLocation.renderScreenPointArray,this._screenLocation.screenPointArray)}get applyObjectTransform(){return this._applyObjectTransform}set applyObjectTransform(e){this._applyObjectTransform=e,this._screenLocationDirty=!0,this._updateEngineObject()}get attached(){return this._attached}intersectionDistance(t,i){if(!this.available)return null;const s=a(t,ee),o=this._getCollisionRadius(i),r=-1*this.collisionPriority;switch(this.collisionType.type){case"point":if(f(this.screenLocation.screenPointArray,s)<o*o)return this.screenLocation.renderScreenPointArray[2]+r;break;case"line":{const e=this.collisionType.paths,t=this._getWorldToScreenObjectScale(),i=this._calculateObjectTransform(t,re),n=o*this.screenLocation.pixelSize,a=K(this._camera,s,ie);if(null==a)return null;for(const s of e){if(0===s.length)continue;const e=v(ae,s[0],i);for(let t=1;t<s.length;t++){const o=v(ce,s[t],i),l=k(x(e,o,te),a);if(null!=l&&l<n*n){const t=p(H.get(),e,o);y(t,t,.5);const i=c(H.get());return this._camera.projectToRenderScreen(t,i),i[2]+r}j(e,o)}}break}case"disc":{const e=this.collisionType.direction,t=this.collisionType.offset??w,i=this._getWorldToScreenObjectScale(),n=this._calculateObjectTransform(i,re),a=o*this.screenLocation.pixelSize,c=K(this._camera,s,ie);if(null==c)return null;const h=l(se,n),d=b(he,e,h),_=v(de,t,n);I(_,d,ne);const u=le;if(W(ne,c,u)&&L(u,_)<a*a)return this.screenLocation.renderScreenPointArray[2]+r;break}case"ribbon":{const{paths:e,direction:t}=this.collisionType,i=this._getWorldToScreenObjectScale(),n=this._calculateObjectTransform(i,re),a=o*this._camera.computeScreenPixelSizeAt(this.renderLocation),h=K(this._camera,s,ie);if(null==h)return null;const d=l(se,n),_=b(he,t,d),u=this._calculateModelTransformPosition(de);I(u,_,ne);const g=le;if(!W(ne,h,g))break;for(const s of e){if(0===s.length)continue;const e=v(ae,s[0],n);for(let t=1;t<s.length;t++){const i=v(ce,s[t],n),o=C(x(e,i,te),g);if(null!=o&&o<a*a){const t=p(H.get(),e,i);y(t,t,.5);const s=c(H.get());return this._camera.projectToRenderScreen(t,s),s[2]+r}j(e,i)}}break}default:e(this.collisionType)}return null}attach(e={manipulator3D:{}}){const t=this._stage;if(!t)return;const i=e.manipulator3D;null==i.engineLayerId?(this._engineLayer=new X(t,{pickable:!1,updatePolicy:1}),i.engineLayerId=this._engineLayer.id):t?.getLayer&&(this._engineLayer=t.getLayer(i.engineLayerId)),i.engineLayerReferences=(i.engineLayerReferences||0)+1,this._camera.copyFrom(this.view.state.camera),this._attached=!0,this._updateEngineObject(),E(this._location.spatialReference,this.view.spatialReference)||(this.location=new A({x:0,y:0,z:0,spatialReference:this.view.spatialReference}))}detach(e={manipulator3D:{}}){const t=e.manipulator3D;t.engineLayerReferences--;const i=0===t.engineLayerReferences;this._removeResourcesFromStage(),i&&(t.engineLayerId=null,o(this._engineLayer)),this._engineResources=null,this._engineLayer=null,this._attached=!1}onViewChange(){this._camera.copyFrom(this.view.state.camera),this._screenLocationDirty=!0,this._updateEngineObject()}onElevationChange(e){D(this.location,ue,e.spatialReference)&&P(e.extent,ue)&&this._notifyLocationChanged()}_evaluateElevationAlignment(){if(null==this.elevationInfo)return;let e=null,t=0;const i=V(this.elevationInfo,this.location.spatialReference??this.view.elevationProvider.spatialReference);switch(this.elevationInfo.mode){case"on-the-ground":e=J(this.view.elevationProvider,this.location,"ground")??0;break;case"relative-to-ground":t=(J(this.view.elevationProvider,this.location,"ground")??0)+i;break;case"relative-to-scene":t=(J(this.view.elevationProvider,this.location,"scene")??0)+i;break;case"absolute-height":t=i}return t!==this._elevation.offset||e!==this._elevation.override?(this._elevation.offset=t,void(this._elevation.override=e)):void 0}_updateEngineObject(){if(!this._attached)return;if(!this.available)return void this._removeResourcesFromStage();const e=this._getWorldToScreenObjectScale(),t=re;if(!0===this.autoScaleRenderObjects){const i=this._getFocusedSize(this._radius,this.focused)*e;this._calculateObjectTransform(i,t)}else this._calculateObjectTransform(e,t);const{objectsByState:i}=this._ensureEngineResources(),s=(this.focused?2:1)|(this.selected?8:4),o=this._noDisplayCount>0;for(const{stateMask:r,objects:n}of i){if(o){for(const e of n)e.visible=!1;continue}const e=!!!(15&r)||(s&r)===(15&r),i=!!!(65520&r)||(this.state&r)===(65520&r);if(e&&i)for(const s of n)s.visible=!0,s.transformation=t;else for(const t of n)t.visible=!1}}_ensureEngineResources(){if(null==this._engineResources){const e=this._engineLayer,t=[],i=new Set;this.renderObjects.forEach(({geometry:{material:e}})=>{i.has(e)||(t.push(e),i.add(e))});const s=new Map;this._renderObjects.forEach(e=>{const t=new Q({castShadow:!1,geometries:[e.geometry]}),i=s.get(e.stateMask)||[];i.push(t),s.set(e.stateMask,i)});const o=[];s.forEach((e,t)=>o.push({stateMask:t,objects:e})),this._engineResources={objectsByState:o,layer:e,materials:t}}return this._addResourcesToStage(),this._engineResources}_addResourcesToStage(){const e=this._stage;if(this._engineResourcesAddedToStage||null==this._engineResources||!e)return;const{objectsByState:t,layer:i}=this._engineResources;t.forEach(({objects:e})=>i.addMany(e)),this._engineResourcesAddedToStage=!0}_removeResourcesFromStage(){const e=this._stage;if(!this._engineResourcesAddedToStage||null==this._engineResources||!e)return;const{objectsByState:t,layer:i}=this._engineResources;t.forEach(({objects:e})=>i.removeMany(e)),this._engineResourcesAddedToStage=!1}_getCollisionRadius(e){return this._getFocusedSize(this.radius,!0)*("touch"===e?this.touchMultiplier:1)}_getFocusedSize(e,t){return e*(t?this.focusMultiplier:1)}_getWorldToScreenObjectScale(){return this._worldSized?1:this.screenLocation.pixelSize}_calculateModelTransformPosition(e){const t=this._getWorldToScreenObjectScale(),i=this._calculateObjectTransform(t,oe);return S(e,i[12],i[13],i[14])}_calculateModelTransformOffset(e){const t=this._calculateModelTransformPosition(e);return O(e,t,this.renderLocation)}_calculateObjectTransform(e,t){return _(t,e,0,0,0,0,e,0,0,0,0,e,0,0,0,0,1),this._worldFrame&&u(t,t,this._worldFrame),u(t,t,this._modelTransform),t[12]+=this.renderLocation[0],t[13]+=this.renderLocation[1],t[14]+=this.renderLocation[2],t[15]=1,null!=this._applyObjectTransform&&this._applyObjectTransform(t),t}get test(){}}function Z(e){return 0!==e[12]||0!==e[13]||0!==e[14]}function $(e,t,i){switch(e.viewingMode){case"local":return g(i),!0;case"global":{const o=T(e.renderCoordsHelper.spatialReference);return z(t,0,ae,0,o.radius),F(s(ae[0]),s(ae[1]),i),!0}}}const ee=n(),te=M(),ie=B(),se=h(),oe=m(),re=m(),ne=U(),ae=R(),ce=R(),le=R(),he=R(),de=R(),_e=R(),ue=new A({x:0,y:0,z:0,spatialReference:null}),ge=()=>{};export{Y as Manipulator3D};
5
+ import{neverReached as e}from"../../../core/compilerUtils.js";import{EventEmitter as t}from"../../../core/Evented.js";import{makeHandle as i}from"../../../core/handleUtils.js";import"../../../core/has.js";import{deg2rad as s}from"../../../core/mathUtils.js";import{destroyMaybe as o}from"../../../core/maybe.js";import{createRenderScreenPointArray3 as r,createScreenPointArray as n,screenPointObjectToArray as a,castRenderScreenPointArray as c}from"../../../core/screenUtils.js";import{fromMat4 as l}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{create as h}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{copy as d,set as _,multiply as u,identity as g}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{create as m}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{squaredDistance as f}from"../../../core/libs/gl-matrix-2/math/vec2.js";import{f as p,o as b,t as v,g as y,c as j,s as L,i as S,d as O}from"../../../chunks/vec32.js";import{create as R,ZEROS as w}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as T}from"../../../geometry/ellipsoidUtils.js";import A from"../../../geometry/Point.js";import{canProjectWithoutEngine as E,projectPoint as D}from"../../../geometry/projectionUtils.js";import{computeENUToPCPFLocalRotation as F}from"../../../geometry/projection/localRotationUtils.js";import{sphericalPCPFtoLonLatElevation as z}from"../../../geometry/projection/projectors.js";import{containsPointObject as P}from"../../../geometry/support/aaBoundingRect.js";import{distance2 as C,fromPoints as x,create as M,closestRayDistance2 as k}from"../../../geometry/support/lineSegment.js";import{fromPositionAndNormal as I,create as U,intersectRay as W}from"../../../geometry/support/plane.js";import{create as B}from"../../../geometry/support/ray.js";import{sv3d as H}from"../../../geometry/support/vectorStacks.js";import{clonePoint as q,hydratedSpatialReference as G}from"../../../layers/graphics/hydratedFeatures.js";import{getElevationOffset as V}from"../../../support/elevationInfoUtils.js";import{getElevationAtPoint as J}from"../support/ElevationProvider.js";import{fromScreen as K}from"../support/geometryUtils/ray.js";import N from"../webgl/RenderCamera.js";import{Object3D as Q}from"../webgl-engine/lib/Object3D.js";import{WebGLLayer as X}from"../webgl-engine/lib/WebGLLayer.js";class Y{constructor(e){this.metadata=void 0,this._camera=new N,this._elevation={offset:0,override:null},this.collisionType={type:"point"},this.collisionPriority=0,this._renderObjects=new Array,this.autoScaleRenderObjects=!0,this._available=!0,this._noDisplayCount=0,this._radius=10,this._worldSized=!1,this.focusMultiplier=2,this.touchMultiplier=2.5,this.worldOriented=!1,this._modelTransform=m(),this._worldFrame=null,this._renderLocation=R(),this._renderLocationDirty=!0,this._location=new A({x:0,y:0,z:0}),this._elevationAlignedLocation=new A,this._elevationAlignedLocationDirty=!0,this.interactive=!0,this.selectable=!1,this.grabbable=!0,this.consumesClicks=!0,this.cursor=null,this.grabCursor=null,this._grabbing=!1,this.dragging=!1,this._hovering=!1,this._selected=!1,this._state=0,this._focused=!1,this.events=new t,this._screenLocation={screenPointArray:n(),renderScreenPointArray:r(),pixelSize:0},this._screenLocationDirty=!0,this._engineResourcesAddedToStage=!1,this._attached=!1,this._location.spatialReference=e.view.spatialReference,Object.assign(this,e);const i=this.view.state?.camera;i&&this._camera.copyFrom(i)}destroy(){this._applyObjectTransform=ge,this._removeResourcesFromStage(),this._engineResources=null,this.view=null,this._camera=null}get _stage(){return this.view?.stage}get elevationInfo(){return this._elevationInfo}set elevationInfo(e){this._elevationInfo=e,this._elevationAlignedLocationDirty=!0,this._renderLocationDirty=!0,this._updateEngineObject()}get renderObjects(){return this._renderObjects}set renderObjects(e){this._removeResourcesFromStage(),this._engineResources=null,this._renderObjects=e.slice(),this._updateEngineObject()}set available(e){e!==this._available&&(this._available=e,this._updateEngineObject())}get available(){return this._available}disableDisplay(){return this._noDisplayCount++,1===this._noDisplayCount&&this._updateEngineObject(),i(()=>{this._noDisplayCount--,0===this._noDisplayCount&&this._updateEngineObject()})}set radius(e){e!==this._radius&&(this._radius=e,this._updateEngineObject())}get radius(){return this._radius}set worldSized(e){e!==this._worldSized&&(this._worldSized=e,this._updateEngineObject())}get worldSized(){return this._worldSized}get modelTransform(){return this._modelTransform}set modelTransform(e){Z(e)&&(this._screenLocationDirty=!0),d(this._modelTransform,e),this._updateEngineObject()}get renderLocation(){return this._renderLocationDirty&&(this._renderLocationDirty=!1,this.view.renderCoordsHelper.toRenderCoords(this.elevationAlignedLocation,this._renderLocation),this.worldOriented?(this._worldFrame||(this._worldFrame=m()),$(this.view,this._renderLocation,this._worldFrame)):this._worldFrame&&(this._worldFrame=null)),this._renderLocation}set renderLocation(e){this.view.renderCoordsHelper.fromRenderCoords(e,this._location),this.elevationAlignedLocation=this._location}get location(){return this._location}set location(e){q(e,this._location),this._notifyLocationChanged()}_notifyLocationChanged(){this._renderLocationDirty=!0,this._screenLocationDirty=!0,this._elevationAlignedLocationDirty=!0,this._updateEngineObject(),this.events.emit("location-update",{location:this._location})}get elevationAlignedLocation(){return this._elevationAlignedLocationDirty?(this._evaluateElevationAlignment(),this._updateElevationAlignedLocation(),this._elevationAlignedLocation):this._elevationAlignedLocation}set elevationAlignedLocation(e){q(e,this._location),this._evaluateElevationAlignment(),this._location.z-=this._elevation.offset,this._updateElevationAlignedLocation(),this._updateEngineObject(),this.events.emit("location-update",{location:this._location})}_updateElevationAlignedLocation(){const e=null!=this._elevation.override?this._elevation.override:this.location.z||0;this._elevationAlignedLocation.x=this.location.x,this._elevationAlignedLocation.y=this.location.y,this._elevationAlignedLocation.z=e+this._elevation.offset,this._elevationAlignedLocation.spatialReference=G(this.location.spatialReference),this._renderLocationDirty=!0,this._screenLocationDirty=!0,this._elevationAlignedLocationDirty=!1}grabbableForEvent(){return!0}get grabbing(){return this._grabbing}set grabbing(e){e!==this._grabbing&&(this._grabbing=e,this._setFocused(this._hovering||this._grabbing),this._updateEngineObject())}get hovering(){return this._hovering}set hovering(e){e!==this._hovering&&(this._hovering=e,this._setFocused(this._hovering||this._grabbing),this._updateEngineObject())}get selected(){return this._selected}set selected(e){e!==this._selected&&(this._selected=e,this._updateEngineObject(),this.events.emit("select-changed",{action:e?"select":"deselect"}))}get state(){return this._state}set state(e){e!==this._state&&(this._state=e,this._updateEngineObject())}updateStateEnabled(e,t){t?this.state|=e:this.state&=~e}_setFocused(e){e!==this._focused&&(this._focused=e,this.events.emit("focus-changed",{action:!0===e?"focus":"unfocus"}))}get focused(){return this._focused}get screenLocation(){return this._ensureScreenLocation(),this._screenLocation}_ensureScreenLocation(){if(!this._screenLocationDirty)return;this._screenLocation.pixelSize=this._camera.computeScreenPixelSizeAt(this.renderLocation),this._screenLocationDirty=!1;let e;if(Z(this._modelTransform)){const t=this._calculateModelTransformOffset(_e);e=p(t,t,this.renderLocation)}else e=this.renderLocation;this._camera.projectToRenderScreen(e,this._screenLocation.renderScreenPointArray),this._camera.renderToScreen(this._screenLocation.renderScreenPointArray,this._screenLocation.screenPointArray)}get applyObjectTransform(){return this._applyObjectTransform}set applyObjectTransform(e){this._applyObjectTransform=e,this._screenLocationDirty=!0,this._updateEngineObject()}get attached(){return this._attached}intersectionDistance(t,i){if(!this.available)return null;const s=a(t,ee),o=this._getCollisionRadius(i),r=-1*this.collisionPriority;switch(this.collisionType.type){case"point":if(f(this.screenLocation.screenPointArray,s)<o*o)return this.screenLocation.renderScreenPointArray[2]+r;break;case"line":{const e=this.collisionType.paths,t=this._getWorldToScreenObjectScale(),i=this._calculateObjectTransform(t,re),n=o*this.screenLocation.pixelSize,a=K(this._camera,s,ie);if(null==a)return null;for(const s of e){if(0===s.length)continue;const e=v(ae,s[0],i);for(let t=1;t<s.length;t++){const o=v(ce,s[t],i),l=k(x(e,o,te),a);if(null!=l&&l<n*n){const t=p(H.get(),e,o);y(t,t,.5);const i=c(H.get());return this._camera.projectToRenderScreen(t,i),i[2]+r}j(e,o)}}break}case"disc":{const e=this.collisionType.direction,t=this.collisionType.offset??w,i=this._getWorldToScreenObjectScale(),n=this._calculateObjectTransform(i,re),a=o*this.screenLocation.pixelSize,c=K(this._camera,s,ie);if(null==c)return null;const h=l(se,n),d=b(he,e,h),_=v(de,t,n);I(_,d,ne);const u=le;if(W(ne,c,u)&&L(u,_)<a*a)return this.screenLocation.renderScreenPointArray[2]+r;break}case"ribbon":{const{paths:e,direction:t}=this.collisionType,i=this._getWorldToScreenObjectScale(),n=this._calculateObjectTransform(i,re),a=o*this._camera.computeScreenPixelSizeAt(this.renderLocation),h=K(this._camera,s,ie);if(null==h)return null;const d=l(se,n),_=b(he,t,d),u=this._calculateModelTransformPosition(de);I(u,_,ne);const g=le;if(!W(ne,h,g))break;for(const s of e){if(0===s.length)continue;const e=v(ae,s[0],n);for(let t=1;t<s.length;t++){const i=v(ce,s[t],n),o=C(x(e,i,te),g);if(null!=o&&o<a*a){const t=p(H.get(),e,i);y(t,t,.5);const s=c(H.get());return this._camera.projectToRenderScreen(t,s),s[2]+r}j(e,i)}}break}default:e(this.collisionType)}return null}attach(e={manipulator3D:{}}){const t=this._stage;if(!t)return;const i=e.manipulator3D;null==i.engineLayerId?(this._engineLayer=new X(t,{pickable:!1,updatePolicy:1}),i.engineLayerId=this._engineLayer.id):t?.getLayer&&(this._engineLayer=t.getLayer(i.engineLayerId)),i.engineLayerReferences=(i.engineLayerReferences||0)+1,this._camera.copyFrom(this.view.state.camera),this._attached=!0,this._updateEngineObject(),E(this._location.spatialReference,this.view.spatialReference)||(this.location=new A({x:0,y:0,z:0,spatialReference:this.view.spatialReference}))}detach(e={manipulator3D:{}}){const t=e.manipulator3D;t.engineLayerReferences--;const i=0===t.engineLayerReferences;this._removeResourcesFromStage(),i&&(t.engineLayerId=null,o(this._engineLayer)),this._engineResources=null,this._engineLayer=null,this._attached=!1}onViewChange(){this._camera.copyFrom(this.view.state.camera),this._screenLocationDirty=!0,this._updateEngineObject()}onElevationChange(e){D(this.location,ue,e.spatialReference)&&P(e.extent,ue)&&this._notifyLocationChanged()}_evaluateElevationAlignment(){if(null==this.elevationInfo)return;let e=null,t=0;const i=V(this.elevationInfo,this.location.spatialReference??this.view.elevationProvider.spatialReference);switch(this.elevationInfo.mode){case"on-the-ground":e=J(this.view.elevationProvider,this.location,"ground")??0;break;case"relative-to-ground":t=(J(this.view.elevationProvider,this.location,"ground")??0)+i;break;case"relative-to-scene":t=(J(this.view.elevationProvider,this.location,"scene")??0)+i;break;case"absolute-height":t=i}return t!==this._elevation.offset||e!==this._elevation.override?(this._elevation.offset=t,void(this._elevation.override=e)):void 0}_updateEngineObject(){if(!this._attached)return;if(!this.available)return void this._removeResourcesFromStage();const e=this._getWorldToScreenObjectScale(),t=re;if(!0===this.autoScaleRenderObjects){const i=this._getFocusedSize(this._radius,this.focused)*e;this._calculateObjectTransform(i,t)}else this._calculateObjectTransform(e,t);const{objectsByState:i}=this._ensureEngineResources(),s=(this.focused?2:1)|(this.selected?8:4),o=this._noDisplayCount>0;for(const{stateMask:r,objects:n}of i){if(o){for(const e of n)e.visible=!1;continue}const e=!!!(15&r)||(s&r)===(15&r),i=!!!(65520&r)||(this.state&r)===(65520&r);if(e&&i)for(const s of n)s.visible=!0,s.transformation=t;else for(const t of n)t.visible=!1}}_ensureEngineResources(){if(null==this._engineResources){const e=this._engineLayer,t=[],i=new Set;this.renderObjects.forEach(({geometry:{material:e}})=>{i.has(e)||(t.push(e),i.add(e))});const s=new Map;this._renderObjects.forEach(e=>{const t=new Q({castShadow:!1,geometries:[e.geometry]}),i=s.get(e.stateMask)||[];i.push(t),s.set(e.stateMask,i)});const o=[];s.forEach((e,t)=>o.push({stateMask:t,objects:e})),this._engineResources={objectsByState:o,layer:e,materials:t}}return this._addResourcesToStage(),this._engineResources}_addResourcesToStage(){const e=this._stage;if(this._engineResourcesAddedToStage||null==this._engineResources||!e)return;const{objectsByState:t,layer:i}=this._engineResources;t.forEach(({objects:e})=>i.addMany(e)),this._engineResourcesAddedToStage=!0}_removeResourcesFromStage(){const e=this._stage;if(!this._engineResourcesAddedToStage||null==this._engineResources||!e)return;const{objectsByState:t,layer:i}=this._engineResources;t.forEach(({objects:e})=>i.removeMany(e)),this._engineResourcesAddedToStage=!1}_getCollisionRadius(e){return this._getFocusedSize(this.radius,!0)*("touch"===e?this.touchMultiplier:1)}_getFocusedSize(e,t){return e*(t?this.focusMultiplier:1)}_getWorldToScreenObjectScale(){return this._worldSized?1:this.screenLocation.pixelSize}_calculateModelTransformPosition(e){const t=this._getWorldToScreenObjectScale(),i=this._calculateObjectTransform(t,oe);return S(e,i[12],i[13],i[14])}_calculateModelTransformOffset(e){const t=this._calculateModelTransformPosition(e);return O(e,t,this.renderLocation)}_calculateObjectTransform(e,t){return _(t,e,0,0,0,0,e,0,0,0,0,e,0,0,0,0,1),this._worldFrame&&u(t,t,this._worldFrame),u(t,t,this._modelTransform),t[12]+=this.renderLocation[0],t[13]+=this.renderLocation[1],t[14]+=this.renderLocation[2],t[15]=1,null!=this._applyObjectTransform&&this._applyObjectTransform(t),t}get test(){}}function Z(e){return 0!==e[12]||0!==e[13]||0!==e[14]}function $(e,t,i){switch(e.viewingMode){case"local":return g(i),!0;case"global":{const o=T(e.renderCoordsHelper.spatialReference);return z(t,0,ae,0,o.radius),F(s(ae[0]),s(ae[1]),i),!0}}}const ee=n(),te=M(),ie=B(),se=h(),oe=m(),re=m(),ne=U(),ae=R(),ce=R(),le=R(),he=R(),de=R(),_e=R(),ue=new A({x:0,y:0,z:0,spatialReference:null}),ge=()=>{};export{Y as Manipulator3D};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as t}from"tslib";import e from"../../../../core/Evented.js";import{destroyMaybe as i}from"../../../../core/maybe.js";import{syncAndInitial as r}from"../../../../core/reactiveUtils.js";import{property as o}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as s}from"../../../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as a}from"../../../../core/support/UpdatingHandles.js";import{getGraphicEffectiveElevationInfo as p}from"../../../../support/elevationInfoUtils.js";import{getGraphicAttachmentOrigin as n}from"../manipulatorUtils.js";import{createGraphicGeometryUndoRecord as c}from"./undoRecords.js";import{GraphicState as h}from"../../layers/graphics/GraphicState.js";import{GraphicManipulator as d}from"../../../interactive/GraphicManipulator.js";import{EditGeometryOperations as m}from"../../../interactive/editGeometry/EditGeometryOperations.js";const g=Symbol();let l=class extends e.EventedAccessor{get operations(){return this._operations}get updating(){return this._updatingHandles.updating}get elevationInfo(){return p(this.graphic)}get visible(){return this._graphicState.displaying}get isDraped(){return this._graphicState.isDraped}get origin(){return n(this.view,this.graphic)}constructor(t){super(t),this._updatingHandles=new a}destroy(){this._operations=i(this._operations),this._updatingHandles.destroy()}initialize(){this._graphicState=new h({graphic:this.graphic}),this._graphicState.on("changed",()=>this.emit("committed")),this.addHandles(this.view.trackGraphicState(this._graphicState)),this.addHandles(this._updatingHandles.add(()=>this.graphic.geometry,t=>{const e=this._operations?.data.geometry;if(t!==e){if(!t||"multipoint"===t?.type||"extent"===t?.type)return i(this._operations),this.removeHandles(g),void(this._operations=null);if(this._operations?.trySetGeometry(t))this.emit("modified-externally");else{i(this._operations),this.removeHandles(g);const e=m.fromGeometry(t,this.view.state.viewingMode);this._operations=e,this.addHandles(e.data.on("change",()=>this.graphic.geometry=e.data.geometry),g)}}},r))}createManipulator(t){return new d({view:this.view,graphic:this.graphic,...t})}maskOccludee(){return this.view.maskOccludee(this.graphic)}endInteraction(){const t=this.graphic.geometry;"mesh"===t?.type&&this.graphic.notifyMeshTransformChanged({action:2})}toMap(t){return this.view.toMap(t,{include:[this.graphic]})}createUndoRecord(){const{graphic:{geometry:t}}=this;return c(t)}};t([o({constructOnly:!0})],l.prototype,"view",void 0),t([o({constructOnly:!0})],l.prototype,"graphic",void 0),t([o()],l.prototype,"_operations",void 0),t([o()],l.prototype,"operations",null),t([o()],l.prototype,"updating",null),l=t([s("esri.views.3d.interactive.editingTools.ManipulatedObject3DGraphic")],l);export{l as ManipulatedObject3DGraphic};
5
+ import{__decorate as t}from"tslib";import{EventedAccessor as e}from"../../../../core/Evented.js";import{destroyMaybe as i}from"../../../../core/maybe.js";import{syncAndInitial as r}from"../../../../core/reactiveUtils.js";import{property as o}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as s}from"../../../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as a}from"../../../../core/support/UpdatingHandles.js";import{getGraphicEffectiveElevationInfo as p}from"../../../../support/elevationInfoUtils.js";import{getGraphicAttachmentOrigin as n}from"../manipulatorUtils.js";import{createGraphicGeometryUndoRecord as c}from"./undoRecords.js";import{GraphicState as h}from"../../layers/graphics/GraphicState.js";import{GraphicManipulator as d}from"../../../interactive/GraphicManipulator.js";import{EditGeometryOperations as m}from"../../../interactive/editGeometry/EditGeometryOperations.js";const g=Symbol();let l=class extends e{get operations(){return this._operations}get updating(){return this._updatingHandles.updating}get elevationInfo(){return p(this.graphic)}get visible(){return this._graphicState.displaying}get isDraped(){return this._graphicState.isDraped}get origin(){return n(this.view,this.graphic)}constructor(t){super(t),this._updatingHandles=new a}destroy(){this._operations=i(this._operations),this._updatingHandles.destroy()}initialize(){this._graphicState=new h({graphic:this.graphic}),this._graphicState.on("changed",()=>this.emit("committed")),this.addHandles(this.view.trackGraphicState(this._graphicState)),this.addHandles(this._updatingHandles.add(()=>this.graphic.geometry,t=>{const e=this._operations?.data.geometry;if(t!==e){if(!t||"multipoint"===t?.type||"extent"===t?.type)return i(this._operations),this.removeHandles(g),void(this._operations=null);if(this._operations?.trySetGeometry(t))this.emit("modified-externally");else{i(this._operations),this.removeHandles(g);const e=m.fromGeometry(t,this.view.state.viewingMode);this._operations=e,this.addHandles(e.data.on("change",()=>this.graphic.geometry=e.data.geometry),g)}}},r))}createManipulator(t){return new d({view:this.view,graphic:this.graphic,...t})}maskOccludee(){return this.view.maskOccludee(this.graphic)}endInteraction(){const t=this.graphic.geometry;"mesh"===t?.type&&this.graphic.notifyMeshTransformChanged({action:2})}toMap(t){return this.view.toMap(t,{include:[this.graphic]})}createUndoRecord(){const{graphic:{geometry:t}}=this;return c(t)}};t([o({constructOnly:!0})],l.prototype,"view",void 0),t([o({constructOnly:!0})],l.prototype,"graphic",void 0),t([o()],l.prototype,"_operations",void 0),t([o()],l.prototype,"operations",null),t([o()],l.prototype,"updating",null),l=t([s("esri.views.3d.interactive.editingTools.ManipulatedObject3DGraphic")],l);export{l as ManipulatedObject3DGraphic};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../../../../core/Evented.js";import{destroyHandle as o}from"../../../../core/handleUtils.js";import{watch as r,on as i,syncAndInitial as l}from"../../../../core/reactiveUtils.js";import{property as n}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as s}from"../../../../core/accessorSupport/decorators/subclass.js";import{MediaElementControllerControlPoints as a}from"./media/MediaElementControllerControlPoints.js";import{MediaElementControllerShape as p}from"./media/MediaElementControllerShape.js";import{MediaElementManipulator3D as m}from"./media/MediaElementManipulator3D.js";import{isMediaElementVisibleLayerView as c}from"./media/mediaElementUtils.js";const d=Symbol();let u=class extends t.EventedAccessor{get operations(){return this._controller?.operations}get elevationInfo(){return{mode:"on-the-ground",offset:0}}get _layerView(){const e=this.view.allLayerViews.find(e=>e.layer===this.layer);return"media-3d"===e?.type?e:null}get visible(){return c(this._layerView,this.element)}get isDraped(){return!0}get origin(){return null}get updating(){return!!this._controller?.updating}get _controllerClass(){return"transform"===this.tool||"control-points"!==this.element.georeference?.type?p:a}constructor(e){super(e),this.tool="transform"}initialize(){this.addHandles([r(()=>this._controllerClass,e=>this._updateController(e),l),i(()=>this._layerView,"element-render-changed",({element:e})=>{this.element===e&&this.emit("committed")})])}toMap(e){const{layer:t,element:o}=this;return this.view.toMap(e,{include:{layer:t,element:o}})}createManipulator(e){const{view:t,layer:o,element:r}=this;return new m({view:t,layer:o,element:r,...e})}_updateController(e){if(this._controller&&this._controller instanceof e)return;this.removeHandles(d);const{view:t,layer:r,element:i}=this,l=()=>{this.emit("modified-externally")};this._controller=new e({view:t,layer:r,element:i,onModifiedExternally:l}),l(),this.addHandles(o(this._controller),d)}};e([n({constructOnly:!0})],u.prototype,"view",void 0),e([n({constructOnly:!0})],u.prototype,"layer",void 0),e([n({constructOnly:!0})],u.prototype,"element",void 0),e([n()],u.prototype,"tool",void 0),e([n()],u.prototype,"_controller",void 0),e([n()],u.prototype,"elevationInfo",null),e([n()],u.prototype,"_layerView",null),e([n()],u.prototype,"visible",null),e([n()],u.prototype,"updating",null),e([n()],u.prototype,"_controllerClass",null),u=e([s("esri.views.3d.interactive.editingTools.ManipulatedObject3DMediaElement")],u);export{u as ManipulatedObject3DMediaElement};
5
+ import{__decorate as e}from"tslib";import{EventedAccessor as t}from"../../../../core/Evented.js";import{destroyHandle as o}from"../../../../core/handleUtils.js";import{watch as r,on as i,syncAndInitial as l}from"../../../../core/reactiveUtils.js";import{property as n}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as s}from"../../../../core/accessorSupport/decorators/subclass.js";import{MediaElementControllerControlPoints as a}from"./media/MediaElementControllerControlPoints.js";import{MediaElementControllerShape as p}from"./media/MediaElementControllerShape.js";import{MediaElementManipulator3D as m}from"./media/MediaElementManipulator3D.js";import{isMediaElementVisibleLayerView as c}from"./media/mediaElementUtils.js";const d=Symbol();let u=class extends t{get operations(){return this._controller?.operations}get elevationInfo(){return{mode:"on-the-ground",offset:0}}get _layerView(){const e=this.view.allLayerViews.find(e=>e.layer===this.layer);return"media-3d"===e?.type?e:null}get visible(){return c(this._layerView,this.element)}get isDraped(){return!0}get origin(){return null}get updating(){return!!this._controller?.updating}get _controllerClass(){return"transform"===this.tool||"control-points"!==this.element.georeference?.type?p:a}constructor(e){super(e),this.tool="transform"}initialize(){this.addHandles([r(()=>this._controllerClass,e=>this._updateController(e),l),i(()=>this._layerView,"element-render-changed",({element:e})=>{this.element===e&&this.emit("committed")})])}toMap(e){const{layer:t,element:o}=this;return this.view.toMap(e,{include:{layer:t,element:o}})}createManipulator(e){const{view:t,layer:o,element:r}=this;return new m({view:t,layer:o,element:r,...e})}_updateController(e){if(this._controller&&this._controller instanceof e)return;this.removeHandles(d);const{view:t,layer:r,element:i}=this,l=()=>{this.emit("modified-externally")};this._controller=new e({view:t,layer:r,element:i,onModifiedExternally:l}),l(),this.addHandles(o(this._controller),d)}};e([n({constructOnly:!0})],u.prototype,"view",void 0),e([n({constructOnly:!0})],u.prototype,"layer",void 0),e([n({constructOnly:!0})],u.prototype,"element",void 0),e([n()],u.prototype,"tool",void 0),e([n()],u.prototype,"_controller",void 0),e([n()],u.prototype,"elevationInfo",null),e([n()],u.prototype,"_layerView",null),e([n()],u.prototype,"visible",null),e([n()],u.prototype,"updating",null),e([n()],u.prototype,"_controllerClass",null),u=e([s("esri.views.3d.interactive.editingTools.ManipulatedObject3DMediaElement")],u);export{u as ManipulatedObject3DMediaElement};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import t from"../../../../../Color.js";import 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{i 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 E}from"../../../webgl-engine/materials/ColorMaterial.js";import{createManipulatorDragEventPipeline as P,dragAtLocation as S,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.EventEmitter,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)=>P(i,(i,s,n,l,p)=>{const u=s.next(t=>({...t,manipulatorType:1})).next(S(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 E({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 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{i 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};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import t from"../../../../../Color.js";import{darken as e}from"../../../../../core/colorUtils.js";import 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{F as m,d,n as u,e as p,h,g as f}from"../../../../../chunks/vec32.js";import{fromValues as _,create as j}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{Manipulator3D as v}from"../../Manipulator3D.js";import{createManipulatorMaterial as w}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 E}from"../../../../interactive/dragEventPipeline.js";class T extends b{constructor(t){super(),this._radius=U,this.events=new i.EventEmitter,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:w(F(r,1,.25),1),materialFocused:w(F(r,1,0),1),materialOccludedUnfocused:w(F(r,.7,0),e.zManipulator.renderOccluded),materialOccludedFocused:w(F(r,.85,0),e.zManipulator.renderOccluded)},this._themeHandle=s(()=>this._view.effectiveTheme.accentColor,t=>{const e=F(t,1,.25),i=F(t,1,0),r=F(t,.7,0),a=F(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(E());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),v=z(u,r,a/2,16,!1);v.transformation=d,this._manipulator.renderObjects=[new g(v,1),new g(j,1),new g(v.instantiate({material:p}),2),new g(j.instantiate({material:p}),2),new g(v.instantiate({material:h}),1),new g(j.instantiate({material:h}),1),new g(v.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 v({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=C;t.renderCoordsHelper.toRenderCoords(this._manipulator.elevationAlignedLocation,r);const o=m(i.eye,r),s=i.computeRenderPixelSizeAtDist(o),n=d(D,r,i.eye);u(n,n);const l=H;t.renderCoordsHelper.worldUpAtPosition(C,l);const c=Math.abs(p(n,l)),_=h(D,n,l),j=h(D,_,l),v=a(c,.01,1),w=1-Math.sqrt(1-v*v)/v/i.fullWidth,g=this._settings,M=this._radius/U,O=g.zManipulator.width*M;f(j,u(j,j),(1/w-1)*o+s*O),e[12]-=D[0],e[13]-=D[1],e[14]-=D[2]},this._manipulator=e,this._updateManipulator()}get test(){}}function F(i,r,a){const o=e(i,a);return o.a*=r,t.toUnitRGBA(o)}const C=j(),D=j(),H=j(),R=()=>{};export{T as MoveZManipulation};
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{F as m,d,n as u,e as p,h,g 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 F 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=H;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(),H=j(),R=()=>{};export{F 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/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../../../../../core/Accessor.js";import o from"../../../../../core/Evented.js";import{watch as r,sync as i}from"../../../../../core/reactiveUtils.js";import{property as s}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as n}from"../../../../../core/accessorSupport/decorators/subclass.js";import{j as c}from"../../../../../chunks/vec32.js";import{create as l}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{projectPointToVector as a}from"../../../../../geometry/projection/projectPointToVector.js";import{isMediaElementVisibleView as p}from"./mediaElementUtils.js";let m=class extends t{grabbableForEvent(){return!0}constructor(e){super(e),this.interactive=!0,this.selectable=!1,this.grabbable=!0,this.grabbing=!1,this.dragging=!1,this.hovering=!0,this.selected=!1,this.cursor=null,this.consumesClicks=!0,this.events=new o.EventEmitter,this.addHandles(r(()=>this.selected,e=>this.events.emit("select-changed",{action:e?"select":"deselect"}),i))}destroy(){this._set("view",null)}intersectionDistance(e){const{view:t,layer:o,element:r}=this;if(!p(t,o,r))return null;const i=t.toMap(e,{include:{layer:o,element:r}});return i&&a(i,d,t.renderSpatialReference)?c(d,t.state.camera.eye):null}onElevationChange(){}onViewChange(){}};e([s({constructOnly:!0,nonNullable:!0})],m.prototype,"element",void 0),e([s({constructOnly:!0,nonNullable:!0})],m.prototype,"layer",void 0),e([s({constructOnly:!0,nonNullable:!0})],m.prototype,"view",void 0),e([s()],m.prototype,"interactive",void 0),e([s()],m.prototype,"selectable",void 0),e([s()],m.prototype,"grabbable",void 0),e([s()],m.prototype,"grabbing",void 0),e([s()],m.prototype,"dragging",void 0),e([s()],m.prototype,"hovering",void 0),e([s()],m.prototype,"selected",void 0),e([s()],m.prototype,"cursor",void 0),m=e([n("esri.views.3d.interactive.editingTools.media.MediaElementManipulator3D")],m);const d=l();export{m as MediaElementManipulator3D};
5
+ import{__decorate as e}from"tslib";import t from"../../../../../core/Accessor.js";import{EventEmitter as o}from"../../../../../core/Evented.js";import{watch as r,sync as i}from"../../../../../core/reactiveUtils.js";import{property as s}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as n}from"../../../../../core/accessorSupport/decorators/subclass.js";import{j as c}from"../../../../../chunks/vec32.js";import{create as l}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{projectPointToVector as a}from"../../../../../geometry/projection/projectPointToVector.js";import{isMediaElementVisibleView as p}from"./mediaElementUtils.js";let m=class extends t{grabbableForEvent(){return!0}constructor(e){super(e),this.interactive=!0,this.selectable=!1,this.grabbable=!0,this.grabbing=!1,this.dragging=!1,this.hovering=!0,this.selected=!1,this.cursor=null,this.consumesClicks=!0,this.events=new o,this.addHandles(r(()=>this.selected,e=>this.events.emit("select-changed",{action:e?"select":"deselect"}),i))}destroy(){this._set("view",null)}intersectionDistance(e){const{view:t,layer:o,element:r}=this;if(!p(t,o,r))return null;const i=t.toMap(e,{include:{layer:o,element:r}});return i&&a(i,d,t.renderSpatialReference)?c(d,t.state.camera.eye):null}onElevationChange(){}onViewChange(){}};e([s({constructOnly:!0,nonNullable:!0})],m.prototype,"element",void 0),e([s({constructOnly:!0,nonNullable:!0})],m.prototype,"layer",void 0),e([s({constructOnly:!0,nonNullable:!0})],m.prototype,"view",void 0),e([s()],m.prototype,"interactive",void 0),e([s()],m.prototype,"selectable",void 0),e([s()],m.prototype,"grabbable",void 0),e([s()],m.prototype,"grabbing",void 0),e([s()],m.prototype,"dragging",void 0),e([s()],m.prototype,"hovering",void 0),e([s()],m.prototype,"selected",void 0),e([s()],m.prototype,"cursor",void 0),m=e([n("esri.views.3d.interactive.editingTools.media.MediaElementManipulator3D")],m);const d=l();export{m as MediaElementManipulator3D};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as t}from"tslib";import{isSome as o}from"../../../../../core/arrayUtils.js";import e from"../../../../../core/Collection.js";import i from"../../../../../core/Evented.js";import{makeHandle as n}from"../../../../../core/handleUtils.js";import{destroyMaybe as s}from"../../../../../core/maybe.js";import{zeroMeters as a,scale as l}from"../../../../../core/quantityUtils.js";import{watch as r,syncAndInitial as p}from"../../../../../core/reactiveUtils.js";import{property as c}from"../../../../../core/accessorSupport/decorators/property.js";import{ensureType as h}from"../../../../../core/accessorSupport/ensureType.js";import"../../../../../core/has.js";import{subclass as u}from"../../../../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as m}from"../../../../../core/support/UpdatingHandles.js";import d from"../../../../../geometry/Point.js";import{makeDehydratedPoint as f}from"../../../../../layers/graphics/dehydratedPoint.js";import{getConvertedElevation as v}from"../../../../../support/elevationInfoUtils.js";import{SnappingVisualizer3D as g}from"../../SnappingVisualizer3D.js";import{orientation as _}from"../geometryUtils.js";import{manipulatedObjectGeometry as M}from"../manipulatedObjectUtils.js";import{canMoveZOperations as j}from"../manipulatorUtils.js";import{meshTransformFastUpdateHandles as b}from"../meshFastUpdateUtils.js";import{connectTooltipToManipulatedObject as y}from"../tooltipUtils3D.js";import{createVisualElements as T}from"../visualElementUtils.js";import{discRadius as w}from"../manipulations/config.js";import{MoveManipulation as I}from"../manipulations/MoveManipulation.js";import{axisConstrainedDragSign as S}from"../manipulations/moveUtils.js";import{MoveXYObjectManipulation as O}from"../manipulations/MoveXYObjectManipulation.js";import{isSupportedObject as x}from"./isSupportedObject.js";import{OutlineVisualElement as E}from"../../visualElements/OutlineVisualElement.js";import{dragManipulatedObjectMany as P,resetManipulatedObjectMany as U}from"../../../../interactive/dragEventPipeline.js";import{InteractiveToolBase as k}from"../../../../interactive/InteractiveToolBase.js";import{EditGeometryOperations as H}from"../../../../interactive/editGeometry/EditGeometryOperations.js";import D from"../../../../interactive/sketch/SketchOptions.js";import{SnappingContext as R}from"../../../../interactive/snapping/SnappingContext.js";import{createSnapDragEventPipelineStep as z}from"../../../../interactive/snapping/SnappingDragPipelineStep.js";import{makeTooltip as A,enterInputModeIfAvailable as X}from"../../../../interactive/tooltip/tooltipCommonUtils.js";import{MovePointTooltipInfo as Y}from"../../../../interactive/tooltip/infos/MovePointTooltipInfo.js";import{TranslateTooltipInfo as Z}from"../../../../interactive/tooltip/infos/TranslateTooltipInfo.js";import{TranslateXYTooltipInfo as C}from"../../../../interactive/tooltip/infos/TranslateXYTooltipInfo.js";import{TranslateZTooltipInfo as F}from"../../../../interactive/tooltip/infos/TranslateZTooltipInfo.js";import{verticalSignedDistanceBetweenPoints as V}from"../../../../support/euclideanLengthMeasurementUtils.js";class B{constructor(t){this.objects=t,this.type="move-start"}}class G{constructor(t,o,e){this.dx=t,this.dy=o,this.objects=e,this.type="move"}}class L{constructor(t){this.objects=t,this.type="move-stop"}}const N=Symbol("manipulators"),q=Symbol("tooltips");let J=class extends k{constructor(t){super(t),this._infos=new Map,this.events=new i.EventEmitter,this.objects=new e,this.enableZ=!0,this.sketchOptions=new D,this.type="move-3d",this._latestTooltipInfo=null,this._translateTooltipInfo=null,this._translateXYTooltipInfo=null,this._translateZTooltipInfo=null,this._updatingHandles=new m,this._moveManipulation=null}initialize(){const{view:t}=this;this.tooltip=A(()=>({view:t,options:this.sketchOptions.tooltips})),this.addHandles([this.objects.on("change",t=>{t.removed.forEach(t=>this.removeHandles(t)),this._updateObjectInfos(t),this._setupFastTransformUpdates(t.added),this._refreshManipulators()}),this.objects.on("change",()=>this._connectTooltips())]);const o=this.objects.toArray();this._updateObjectInfos({added:o,removed:[]}),this._setupFastTransformUpdates(o),this._refreshManipulators(),this._connectTooltips(),this.finishToolCreation()}destroy(){this.tooltip=s(this.tooltip),this._moveManipulation=s(this._moveManipulation),this._set("view",null),this._updatingHandles.destroy()}onInputEvent(t){if(!this.destroyed&&!X(t,this.tooltip))return super.onInputEvent(t)}get updating(){return this._updatingHandles.updating}get _shouldShowMovePointTooltip(){const{objects:t}=this;if(1!==t.length)return!1;const o=M(t.at(0))?.type;return"point"===o||"mesh"===o}get activeTooltipInfo(){return this._shouldShowMovePointTooltip?this._movePointTooltipInfo:this._latestTooltipInfo}reset(){}_updateObjectInfos({added:t,removed:o}){for(const e of t){if(0!==x(e))continue;const t=new Q(e);this._infos.set(e,t)}for(const e of o)this._infos.delete(e)}_setupFastTransformUpdates(t){for(const o of t){const t=this._infos.get(o);this.addHandles(b(t.object),o)}}_refreshManipulators(){if(this.removeHandles(N),this._moveManipulation=s(this._moveManipulation),this.manipulators.removeAll(),0===this._infos.size)return;const t=Array.from(this._infos.values());this._createManipulators(t),this._createVisualElements(t),this._updateMoveManipulation(t)}_createManipulators(t){for(const o of t){const e=o.object;o.manipulationXY=new O({tool:this,view:this.view,object:e}),o.manipulationXY.forEachManipulator(t=>{this.addHandles([t.events.on("immediate-click",t=>{this.events.emit("immediate-click",{...t,object:e}),t.stopPropagation()}),t.events.on("grab-changed",({action:t})=>{"start"===t?this._showTooltip(0):this._hideTooltip()})],N)}),this.addHandles(o.manipulationXY.createDragPipeline((o,e,i,n)=>this._buildDragEventPipeline(t,0,o,e,i,n)),N)}this._createMoveManipulation(t)}_createMoveManipulation(t){const o=new I({tool:this,view:this.view,snapToScene:!1,xyAvailable:!0,xyAxisAvailable:!0,zAvailable:!0,radius:1===t.length?I.radiusForSymbol(t[0].object.graphic?.symbol):w});this._moveManipulation=o,o.elevationInfo={mode:"absolute-height",offset:0},o.forEachManipulator(t=>{this.addHandles(t.events.on("immediate-click",e=>{const i=this.objects.at(0);!o.zManipulation.hasManipulator(t)&&1===this.objects.length&&i&&this.events.emit("immediate-click",{...e,object:i}),e.stopPropagation()}),N)});const e=t=>o=>{this.addHandles([o.events.on("focus-changed",({action:o})=>{"focus"===o?this._showTooltip(t):this._hideTooltip()}),o.events.on("grab-changed",()=>{this._latestTooltipInfo&&(this._latestTooltipInfo.distance=a)})],N)};this._moveManipulation.xyManipulation.forEachManipulator(e(0)),this._moveManipulation.xyAxisManipulation.forEachManipulator(e(1)),this._moveManipulation.zManipulation.forEachManipulator(e(2));const i=()=>this._updateMoveManipulation(t);for(const a of t)this.addHandles([a.object.on("committed",i),r(()=>a.object.visible,i)],N);const n=t[t.length-1];this.addHandles(n.object.on("committed",()=>this._updateMoveManipulationAngle(n)),N);const{object:s}=n,{operations:l}=s;if(l){const e=s.graphic;this.addHandles(o.createDragPipeline((o,e,i,n,s)=>this._buildDragEventPipeline(t,o,e,i,n,s),s.elevationInfo,l.data.spatialReference,e),N)}this._updateMoveManipulationAngle(n)}_createVisualElements(t){for(const o of t){const e=o.object,i=T({view:this.view,object:e,forEachManipulator:t=>{o.manipulationXY?.forEachManipulator(t),this._moveManipulation?.forEachManipulator(t)},onManipulatorsChanged:()=>n()});null!=i&&(o.geometryRepresentation=i.visualElement,o.geometryRepresentation instanceof E&&this.addHandles([o.geometryRepresentation.events.on("attachment-origin-changed",()=>{o.object.isDraped||this._updateMoveManipulation(t)}),r(()=>o.object.isDraped,()=>this._updateMoveManipulation(t))],N),this.addHandles(i,N))}}_updateMoveManipulationAngle(t){this._moveManipulation&&(this._moveManipulation.angle=_(M(t.object)))}_updateMoveManipulation(t){const o=f(0,0,0,this.view.spatialReference);let e=0,i=!1;const n=this._moveManipulation;if(n){for(const n of t){if(!n.object.visible)continue;this.enableZ&&j(n.object.operations,n.object.elevationInfo)&&(i=!0);const t=n.geometryRepresentation instanceof E&&!n.object.isDraped?n.geometryRepresentation.attachmentOrigin:n.object.origin;if(null!=t){const{x:i,y:n,z:s}=t;o.x+=i,o.y+=n,s&&(o.z??=0,o.z+=s),e++}}e>0?(o.x/=e,o.y/=e,o.z??=0,o.z/=e,n.location=o,n.xyManipulation.available=!0,n.xyAxisManipulation.available=!0,n.zManipulation.available=i):n.available=!1}}_buildDragEventPipeline(t,o,e,i,n,s){const a=[],l=[];let r=null,p=null;const c=()=>{for(const t of a)t.dragging=!1;a.length=0,l.length=0,r=null,p=null,this._moveManipulation&&(this._moveManipulation.interactive=!0)};if(1===t.length&&0===o){const o=t[0].object;({steps:i,cancel:n}=this._buildSnappingPipelineSteps(o,o.elevationInfo,i,n,s))}return n=n.next(t=>p?.(t)).next(()=>(l.length&&this.events.emit("move-stop",new L(l)),this.destroyed||c(),null)),{steps:i=i.next(o=>{if("start"===o.action){a.length=0,l.length=0;for(const o of t)o.dragging||!o.manipulationXY?.hasManipulator(e)&&o.manipulationXY?.grabbing||(a.push(o),l.push(o.object),o.dragging=!0);if(0!==l.length&&(this._moveManipulation&&(this._moveManipulation.interactive=!1),r=P(l),p=U(l),this._emitRecordUndo(),this.events.emit("move-start",new B(l)),this.destroyed))return null}return 0!==l.length?o:null}).next(t=>r?.(t)).next(t=>(this._updateMoveTooltip(o,t),t)).next(t=>{switch(t.action){case"start":case"update":if(t.translationX||t.translationY||t.translationZ){const o=this.view.toScreen(t.mapStart),e=this.view.toScreen(t.mapEnd);if(!o||!e)return null;const i=e.x-o.x,n=e.y-o.y;if(this.events.emit("move",new G(i,n,l)),this.destroyed)return null}break;case"end":if(this.events.emit("move-stop",new L(l)),this.destroyed)return null;c()}return null}),cancel:n}}_connectTooltips(){let t;if(this.removeHandles(q),this._shouldShowMovePointTooltip){const o=this.objects.at(0),{events:e}=this;this._movePointTooltipInfo??=new Y({viewType:this.view.type,sketchOptions:this.sketchOptions});const i={onBeforeUpdate:()=>this.endDrag(),onMoveStart:()=>{this._emitRecordUndo(),e.emit("move-start",new B([o]))},onMove:()=>e.emit("move",new G(0,0,[o])),onMoveStop:()=>e.emit("move-stop",new L([o])),onRotateStart:()=>{},onRotate:()=>{},onRotateStop:()=>{},onScaleStart:()=>{},onScale:()=>{},onScaleStop:()=>{}};t=y(this.tooltip,o,()=>({sketchOptions:this.sketchOptions,activeTooltipInfo:this._movePointTooltipInfo,callbacks:i}))}else t=r(()=>this.sketchOptions.tooltips.effectiveEnabled?this._latestTooltipInfo:null,t=>{this.tooltip.info=t},p);this.addHandles(t,q)}_showTooltip(t){this._shouldShowMovePointTooltip||this._updateMoveTooltip(t)}_hideTooltip(){this._shouldShowMovePointTooltip||(this.tooltip?.clear(),this._latestTooltipInfo=null)}_updateMoveTooltip(t,o){if(this._shouldShowMovePointTooltip)return;const{sketchOptions:e,autoLengthMeasurementUtils:i}=this;switch(t){case 0:this._latestTooltipInfo=this._translateTooltipInfo??=new Z({sketchOptions:e}),W(this._latestTooltipInfo,o,(t,o)=>i.autoDistanceBetweenPoints2D(K(t),K(o)));break;case 1:this._latestTooltipInfo=this._translateXYTooltipInfo??=new C({sketchOptions:e}),W(this._latestTooltipInfo,o,(t,e)=>l(i.autoDistanceBetweenPoints2D(K(t),K(e)),S(o)));break;case 2:this._latestTooltipInfo=this._translateZTooltipInfo??=new F({sketchOptions:e}),W(this._latestTooltipInfo,o,V)}this._latestTooltipInfo.sketchOptions=e}_emitRecordUndo(){const t=this.objects.toArray().map(t=>t.createUndoRecord?.()).filter(o);t.length>0&&this.events.emit("record-undo",{updates:t})}_buildSnappingPipelineSteps(t,o,e,i,n){const s=M(t);if(null==s||"point"!==s.type&&"mesh"!==s.type)return{steps:e,cancel:i};const a=("point"===s.type?s:s.origin).clone(),l=new R({elevationInfo:o,pointer:n,editGeometryOperations:H.fromGeometry(a,this.view.state.viewingMode),visualizer:new g,excludeFeature:t.graphic}),r=this.snappingManager,{snappingStep:p,cancelSnapping:c}=z({snappingContext:l,snappingManager:r,updatingHandles:this._updatingHandles});return i=i.next(c),{steps:e=e.next(o=>{a.z=v(this.view,a,t.elevationInfo,{mode:"absolute-height",offset:0});return{...o,snapOrigin:l.coordinateHelper.pointToVector(a)}}).next(...p),cancel:i}}};t([c({constructOnly:!0,nonNullable:!0})],J.prototype,"view",void 0),t([c({constructOnly:!0})],J.prototype,"autoLengthMeasurementUtils",void 0),t([c()],J.prototype,"objects",void 0),t([c({constructOnly:!0,nonNullable:!0})],J.prototype,"enableZ",void 0),t([c({constructOnly:!0,type:D})],J.prototype,"sketchOptions",void 0),t([c({constructOnly:!0})],J.prototype,"snappingManager",void 0),t([c()],J.prototype,"type",void 0),t([c()],J.prototype,"updating",null),t([c()],J.prototype,"_latestTooltipInfo",void 0),t([c()],J.prototype,"_shouldShowMovePointTooltip",null),t([c()],J.prototype,"activeTooltipInfo",null),J=t([u("esri.views.3d.interactive.editingTools.move.MoveTool3D")],J);const K=h(d);class Q{constructor(t){this.object=t,this.geometryRepresentation=null,this.manipulationXY=null,this.dragging=!1}}function W(t,o,e){if(null==o||"end"===o.action)return void(t.distance=a);const{mapStart:i,mapEnd:n}=o,s=e(i,n);t.distance=null!=s?s:a}export{G as MoveEvent,B as MoveStartEvent,L as MoveStopEvent,J as MoveTool3D};
5
+ import{__decorate as t}from"tslib";import{isSome as o}from"../../../../../core/arrayUtils.js";import e from"../../../../../core/Collection.js";import{EventEmitter as i}from"../../../../../core/Evented.js";import{makeHandle as n}from"../../../../../core/handleUtils.js";import{destroyMaybe as s}from"../../../../../core/maybe.js";import{zeroMeters as a,scale as l}from"../../../../../core/quantityUtils.js";import{watch as r,syncAndInitial as p}from"../../../../../core/reactiveUtils.js";import{property as c}from"../../../../../core/accessorSupport/decorators/property.js";import{ensureType as h}from"../../../../../core/accessorSupport/ensureType.js";import"../../../../../core/has.js";import{subclass as u}from"../../../../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as m}from"../../../../../core/support/UpdatingHandles.js";import d from"../../../../../geometry/Point.js";import{makeDehydratedPoint as f}from"../../../../../layers/graphics/dehydratedPoint.js";import{getConvertedElevation as v}from"../../../../../support/elevationInfoUtils.js";import{SnappingVisualizer3D as g}from"../../SnappingVisualizer3D.js";import{orientation as _}from"../geometryUtils.js";import{manipulatedObjectGeometry as M}from"../manipulatedObjectUtils.js";import{canMoveZOperations as j}from"../manipulatorUtils.js";import{meshTransformFastUpdateHandles as b}from"../meshFastUpdateUtils.js";import{connectTooltipToManipulatedObject as y}from"../tooltipUtils3D.js";import{createVisualElements as T}from"../visualElementUtils.js";import{discRadius as w}from"../manipulations/config.js";import{MoveManipulation as I}from"../manipulations/MoveManipulation.js";import{axisConstrainedDragSign as S}from"../manipulations/moveUtils.js";import{MoveXYObjectManipulation as O}from"../manipulations/MoveXYObjectManipulation.js";import{isSupportedObject as x}from"./isSupportedObject.js";import{OutlineVisualElement as E}from"../../visualElements/OutlineVisualElement.js";import{dragManipulatedObjectMany as P,resetManipulatedObjectMany as U}from"../../../../interactive/dragEventPipeline.js";import{InteractiveToolBase as k}from"../../../../interactive/InteractiveToolBase.js";import{EditGeometryOperations as H}from"../../../../interactive/editGeometry/EditGeometryOperations.js";import D from"../../../../interactive/sketch/SketchOptions.js";import{SnappingContext as R}from"../../../../interactive/snapping/SnappingContext.js";import{createSnapDragEventPipelineStep as z}from"../../../../interactive/snapping/SnappingDragPipelineStep.js";import{makeTooltip as A,enterInputModeIfAvailable as X}from"../../../../interactive/tooltip/tooltipCommonUtils.js";import{MovePointTooltipInfo as Y}from"../../../../interactive/tooltip/infos/MovePointTooltipInfo.js";import{TranslateTooltipInfo as Z}from"../../../../interactive/tooltip/infos/TranslateTooltipInfo.js";import{TranslateXYTooltipInfo as C}from"../../../../interactive/tooltip/infos/TranslateXYTooltipInfo.js";import{TranslateZTooltipInfo as F}from"../../../../interactive/tooltip/infos/TranslateZTooltipInfo.js";import{verticalSignedDistanceBetweenPoints as V}from"../../../../support/euclideanLengthMeasurementUtils.js";class B{constructor(t){this.objects=t,this.type="move-start"}}class G{constructor(t,o,e){this.dx=t,this.dy=o,this.objects=e,this.type="move"}}class L{constructor(t){this.objects=t,this.type="move-stop"}}const N=Symbol("manipulators"),q=Symbol("tooltips");let J=class extends k{constructor(t){super(t),this._infos=new Map,this.events=new i,this.objects=new e,this.enableZ=!0,this.sketchOptions=new D,this.type="move-3d",this._latestTooltipInfo=null,this._translateTooltipInfo=null,this._translateXYTooltipInfo=null,this._translateZTooltipInfo=null,this._updatingHandles=new m,this._moveManipulation=null}initialize(){const{view:t}=this;this.tooltip=A(()=>({view:t,options:this.sketchOptions.tooltips})),this.addHandles([this.objects.on("change",t=>{t.removed.forEach(t=>this.removeHandles(t)),this._updateObjectInfos(t),this._setupFastTransformUpdates(t.added),this._refreshManipulators()}),this.objects.on("change",()=>this._connectTooltips())]);const o=this.objects.toArray();this._updateObjectInfos({added:o,removed:[]}),this._setupFastTransformUpdates(o),this._refreshManipulators(),this._connectTooltips(),this.finishToolCreation()}destroy(){this.tooltip=s(this.tooltip),this._moveManipulation=s(this._moveManipulation),this._set("view",null),this._updatingHandles.destroy()}onInputEvent(t){if(!this.destroyed&&!X(t,this.tooltip))return super.onInputEvent(t)}get updating(){return this._updatingHandles.updating}get _shouldShowMovePointTooltip(){const{objects:t}=this;if(1!==t.length)return!1;const o=M(t.at(0))?.type;return"point"===o||"mesh"===o}get activeTooltipInfo(){return this._shouldShowMovePointTooltip?this._movePointTooltipInfo:this._latestTooltipInfo}reset(){}_updateObjectInfos({added:t,removed:o}){for(const e of t){if(0!==x(e))continue;const t=new Q(e);this._infos.set(e,t)}for(const e of o)this._infos.delete(e)}_setupFastTransformUpdates(t){for(const o of t){const t=this._infos.get(o);this.addHandles(b(t.object),o)}}_refreshManipulators(){if(this.removeHandles(N),this._moveManipulation=s(this._moveManipulation),this.manipulators.removeAll(),0===this._infos.size)return;const t=Array.from(this._infos.values());this._createManipulators(t),this._createVisualElements(t),this._updateMoveManipulation(t)}_createManipulators(t){for(const o of t){const e=o.object;o.manipulationXY=new O({tool:this,view:this.view,object:e}),o.manipulationXY.forEachManipulator(t=>{this.addHandles([t.events.on("immediate-click",t=>{this.events.emit("immediate-click",{...t,object:e}),t.stopPropagation()}),t.events.on("grab-changed",({action:t})=>{"start"===t?this._showTooltip(0):this._hideTooltip()})],N)}),this.addHandles(o.manipulationXY.createDragPipeline((o,e,i,n)=>this._buildDragEventPipeline(t,0,o,e,i,n)),N)}this._createMoveManipulation(t)}_createMoveManipulation(t){const o=new I({tool:this,view:this.view,snapToScene:!1,xyAvailable:!0,xyAxisAvailable:!0,zAvailable:!0,radius:1===t.length?I.radiusForSymbol(t[0].object.graphic?.symbol):w});this._moveManipulation=o,o.elevationInfo={mode:"absolute-height",offset:0},o.forEachManipulator(t=>{this.addHandles(t.events.on("immediate-click",e=>{const i=this.objects.at(0);!o.zManipulation.hasManipulator(t)&&1===this.objects.length&&i&&this.events.emit("immediate-click",{...e,object:i}),e.stopPropagation()}),N)});const e=t=>o=>{this.addHandles([o.events.on("focus-changed",({action:o})=>{"focus"===o?this._showTooltip(t):this._hideTooltip()}),o.events.on("grab-changed",()=>{this._latestTooltipInfo&&(this._latestTooltipInfo.distance=a)})],N)};this._moveManipulation.xyManipulation.forEachManipulator(e(0)),this._moveManipulation.xyAxisManipulation.forEachManipulator(e(1)),this._moveManipulation.zManipulation.forEachManipulator(e(2));const i=()=>this._updateMoveManipulation(t);for(const a of t)this.addHandles([a.object.on("committed",i),r(()=>a.object.visible,i)],N);const n=t[t.length-1];this.addHandles(n.object.on("committed",()=>this._updateMoveManipulationAngle(n)),N);const{object:s}=n,{operations:l}=s;if(l){const e=s.graphic;this.addHandles(o.createDragPipeline((o,e,i,n,s)=>this._buildDragEventPipeline(t,o,e,i,n,s),s.elevationInfo,l.data.spatialReference,e),N)}this._updateMoveManipulationAngle(n)}_createVisualElements(t){for(const o of t){const e=o.object,i=T({view:this.view,object:e,forEachManipulator:t=>{o.manipulationXY?.forEachManipulator(t),this._moveManipulation?.forEachManipulator(t)},onManipulatorsChanged:()=>n()});null!=i&&(o.geometryRepresentation=i.visualElement,o.geometryRepresentation instanceof E&&this.addHandles([o.geometryRepresentation.events.on("attachment-origin-changed",()=>{o.object.isDraped||this._updateMoveManipulation(t)}),r(()=>o.object.isDraped,()=>this._updateMoveManipulation(t))],N),this.addHandles(i,N))}}_updateMoveManipulationAngle(t){this._moveManipulation&&(this._moveManipulation.angle=_(M(t.object)))}_updateMoveManipulation(t){const o=f(0,0,0,this.view.spatialReference);let e=0,i=!1;const n=this._moveManipulation;if(n){for(const n of t){if(!n.object.visible)continue;this.enableZ&&j(n.object.operations,n.object.elevationInfo)&&(i=!0);const t=n.geometryRepresentation instanceof E&&!n.object.isDraped?n.geometryRepresentation.attachmentOrigin:n.object.origin;if(null!=t){const{x:i,y:n,z:s}=t;o.x+=i,o.y+=n,s&&(o.z??=0,o.z+=s),e++}}e>0?(o.x/=e,o.y/=e,o.z??=0,o.z/=e,n.location=o,n.xyManipulation.available=!0,n.xyAxisManipulation.available=!0,n.zManipulation.available=i):n.available=!1}}_buildDragEventPipeline(t,o,e,i,n,s){const a=[],l=[];let r=null,p=null;const c=()=>{for(const t of a)t.dragging=!1;a.length=0,l.length=0,r=null,p=null,this._moveManipulation&&(this._moveManipulation.interactive=!0)};if(1===t.length&&0===o){const o=t[0].object;({steps:i,cancel:n}=this._buildSnappingPipelineSteps(o,o.elevationInfo,i,n,s))}return n=n.next(t=>p?.(t)).next(()=>(l.length&&this.events.emit("move-stop",new L(l)),this.destroyed||c(),null)),{steps:i=i.next(o=>{if("start"===o.action){a.length=0,l.length=0;for(const o of t)o.dragging||!o.manipulationXY?.hasManipulator(e)&&o.manipulationXY?.grabbing||(a.push(o),l.push(o.object),o.dragging=!0);if(0!==l.length&&(this._moveManipulation&&(this._moveManipulation.interactive=!1),r=P(l),p=U(l),this._emitRecordUndo(),this.events.emit("move-start",new B(l)),this.destroyed))return null}return 0!==l.length?o:null}).next(t=>r?.(t)).next(t=>(this._updateMoveTooltip(o,t),t)).next(t=>{switch(t.action){case"start":case"update":if(t.translationX||t.translationY||t.translationZ){const o=this.view.toScreen(t.mapStart),e=this.view.toScreen(t.mapEnd);if(!o||!e)return null;const i=e.x-o.x,n=e.y-o.y;if(this.events.emit("move",new G(i,n,l)),this.destroyed)return null}break;case"end":if(this.events.emit("move-stop",new L(l)),this.destroyed)return null;c()}return null}),cancel:n}}_connectTooltips(){let t;if(this.removeHandles(q),this._shouldShowMovePointTooltip){const o=this.objects.at(0),{events:e}=this;this._movePointTooltipInfo??=new Y({viewType:this.view.type,sketchOptions:this.sketchOptions});const i={onBeforeUpdate:()=>this.endDrag(),onMoveStart:()=>{this._emitRecordUndo(),e.emit("move-start",new B([o]))},onMove:()=>e.emit("move",new G(0,0,[o])),onMoveStop:()=>e.emit("move-stop",new L([o])),onRotateStart:()=>{},onRotate:()=>{},onRotateStop:()=>{},onScaleStart:()=>{},onScale:()=>{},onScaleStop:()=>{}};t=y(this.tooltip,o,()=>({sketchOptions:this.sketchOptions,activeTooltipInfo:this._movePointTooltipInfo,callbacks:i}))}else t=r(()=>this.sketchOptions.tooltips.effectiveEnabled?this._latestTooltipInfo:null,t=>{this.tooltip.info=t},p);this.addHandles(t,q)}_showTooltip(t){this._shouldShowMovePointTooltip||this._updateMoveTooltip(t)}_hideTooltip(){this._shouldShowMovePointTooltip||(this.tooltip?.clear(),this._latestTooltipInfo=null)}_updateMoveTooltip(t,o){if(this._shouldShowMovePointTooltip)return;const{sketchOptions:e,autoLengthMeasurementUtils:i}=this;switch(t){case 0:this._latestTooltipInfo=this._translateTooltipInfo??=new Z({sketchOptions:e}),W(this._latestTooltipInfo,o,(t,o)=>i.autoDistanceBetweenPoints2D(K(t),K(o)));break;case 1:this._latestTooltipInfo=this._translateXYTooltipInfo??=new C({sketchOptions:e}),W(this._latestTooltipInfo,o,(t,e)=>l(i.autoDistanceBetweenPoints2D(K(t),K(e)),S(o)));break;case 2:this._latestTooltipInfo=this._translateZTooltipInfo??=new F({sketchOptions:e}),W(this._latestTooltipInfo,o,V)}this._latestTooltipInfo.sketchOptions=e}_emitRecordUndo(){const t=this.objects.toArray().map(t=>t.createUndoRecord?.()).filter(o);t.length>0&&this.events.emit("record-undo",{updates:t})}_buildSnappingPipelineSteps(t,o,e,i,n){const s=M(t);if(null==s||"point"!==s.type&&"mesh"!==s.type)return{steps:e,cancel:i};const a=("point"===s.type?s:s.origin).clone(),l=new R({elevationInfo:o,pointer:n,editGeometryOperations:H.fromGeometry(a,this.view.state.viewingMode),visualizer:new g,excludeFeature:t.graphic}),r=this.snappingManager,{snappingStep:p,cancelSnapping:c}=z({snappingContext:l,snappingManager:r,updatingHandles:this._updatingHandles});return i=i.next(c),{steps:e=e.next(o=>{a.z=v(this.view,a,t.elevationInfo,{mode:"absolute-height",offset:0});return{...o,snapOrigin:l.coordinateHelper.pointToVector(a)}}).next(...p),cancel:i}}};t([c({constructOnly:!0,nonNullable:!0})],J.prototype,"view",void 0),t([c({constructOnly:!0})],J.prototype,"autoLengthMeasurementUtils",void 0),t([c()],J.prototype,"objects",void 0),t([c({constructOnly:!0,nonNullable:!0})],J.prototype,"enableZ",void 0),t([c({constructOnly:!0,type:D})],J.prototype,"sketchOptions",void 0),t([c({constructOnly:!0})],J.prototype,"snappingManager",void 0),t([c()],J.prototype,"type",void 0),t([c()],J.prototype,"updating",null),t([c()],J.prototype,"_latestTooltipInfo",void 0),t([c()],J.prototype,"_shouldShowMovePointTooltip",null),t([c()],J.prototype,"activeTooltipInfo",null),J=t([u("esri.views.3d.interactive.editingTools.move.MoveTool3D")],J);const K=h(d);class Q{constructor(t){this.object=t,this.geometryRepresentation=null,this.manipulationXY=null,this.dragging=!1}}function W(t,o,e){if(null==o||"end"===o.action)return void(t.distance=a);const{mapStart:i,mapEnd:n}=o,s=e(i,n);t.distance=null!=s?s:a}export{G as MoveEvent,B as MoveStartEvent,L as MoveStopEvent,J as MoveTool3D};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../../../../../core/Accessor.js";import{removeUnordered as i}from"../../../../../core/arrayUtils.js";import{unitRGBAFromColor as a}from"../../../../../core/colorUtils.js";import"../../../../../core/has.js";import 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{destroyMaybe as p,removeMaybe as d}from"../../../../../core/maybe.js";import{watch as h,on as u,initial as c,syncAndInitial as m,when as g,sync as f}from"../../../../../core/reactiveUtils.js";import{property as _}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/Logger.js";import{subclass as v}from"../../../../../core/accessorSupport/decorators/subclass.js";import{IDENTITY as M}from"../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{l as b,d as x,m as y,i as O,f as E,g as 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 G}from"../../Manipulator3D.js";import{createManipulatorMaterial as P,createManipulatorOutlineMaterial as C,placeAtObject as k}from"../../manipulatorUtils.js";import{RenderObject as L}from"../../RenderObject.js";import{SegmentLabels3D as U}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{sceneSnappingAtLocation as de,addMapDelta as he,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 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.EventEmitter,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=P(a(i.color),i.renderOccluded),this._vertexManipulatorOutlineMaterial=C(a(i.outlineColor),i.renderOccluded),this._vertexManipulatorHoverOutlineMaterial=C(a(i.hoverOutlineColor),i.renderOccluded);const n=t.edge;this._edgeManipulatorMaterial=P(a(n.color),n.renderOccluded),this._edgeManipulatorOutlineMaterial=C(a(n.outlineColor),n.renderOccluded);const o=t.edgeOffset;this._edgeOffsetManipulatorMaterial=P(a(o.color),o.renderOccluded,!1),this._edgeOffsetManipulatorHoverMaterial=P(a(o.hoverColor),o.renderOccluded,!1);const s=t.selected;this._selectedManipulatorMaterial=P(a(s.color),s.renderOccluded),this._selectedManipulatorOutlineMaterial=C(a(s.outlineColor),s.renderOccluded),this._selectedManipulatorHoverOutlineMaterial=C(a(s.hoverOutlineColor),s.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")},c),ne(this.tooltip,this.object,()=>this._tooltipsContext),h(()=>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===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=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 i of this._operations.data.components){const a=e?.byComponentIndex.get(i.index);for(const e of i.vertices){const i=a?.has(e.index);this._createVertexOrEdgeManipulator(e,t,i)}for(const e of i.edges)this._createVertexOrEdgeManipulator(e,t)}this._createObjectMoveManipulation(),this._createMoveManipulation(t),this._createVisualElements()}get canRedo(){return null!=this._operations&&this._operations.canRedo}get canUndo(){return null!=this._operations&&this._operations.canUndo}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 U({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 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=d(e))}),n.next(()=>this._onDragCancel(!0,()=>e=d(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:d}=_e({predicate:e=>!!e.info,snappingManager:i.snappingManager,snappingContext:new fe({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(d),{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(he()).next(e=>this._perObjectManipulatorDragAction(1,e)).next(e=>(this._updateTranslateTooltip(a,e),e)),cancel:r}},e,s,t.graphic),h(()=>t.visible,()=>this._updateMoveManipulationPosition(),c),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)},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.component.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,d=p/2,h=p*Math.sqrt(3)/2,{height:u,offset:c}=o,m=this._edgeOffsetManipulatorMaterial;if(!this._edgeOffsetManipulatorGeometryInside){const e=le(m,h,d,d,u,c);this._edgeOffsetManipulatorGeometryInside=e}if(!this._edgeOffsetManipulatorGeometryOutside){const e=le(m,-h,d,d,u,-c);this._edgeOffsetManipulatorGeometryOutside=e}const g=[new L(this._edgeOffsetManipulatorGeometryInside.instantiate(),1),new L(this._edgeOffsetManipulatorGeometryInside.instantiate({material:this._edgeOffsetManipulatorHoverMaterial}),2),new L(this._edgeOffsetManipulatorGeometryOutside.instantiate(),1),new L(this._edgeOffsetManipulatorGeometryOutside.instantiate({material:this._edgeOffsetManipulatorHoverMaterial}),2)],f=new G({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:je(n)}),_=new G({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,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),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?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=d(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(()=>{d(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(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(he()).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(F(this.view)).next(Z(this.view,i.data.spatialReference)).next(he()).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:o}=this,r=$(i.data.coordinateHelper,e.handle,t),l=i.createUndoGroup(),p=Q(n,e.manipulator.elevationAlignedLocation,r);let h;this._splitEdgesBeforeEdgeOffset(e,r),this._selectEdgeOffsetArrow(e,r);const u=()=>{this._cleanEdgeOffsetCollapsedEdges(e,i),h=d(h)},c=this.events.on("undo",u);return h=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([h(()=>({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.leftEdge?.leftVertex,a=e.handle.leftVertex,n=e.handle.rightVertex.rightEdge?.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=$(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.leftEdge);null!=t&&this._splitEdgeManipulator(t,1)}if(t.requiresSplitEdgeRight){const t=this._getManipulatorInfoFromHandle(e.handle.rightVertex.rightEdge);null!=t&&this._splitEdgeManipulator(t,0)}}_selectEdgeOffsetArrow(e,t){const i=e.grabMapPoint??J(this.view.inputManager?.latestPointerLocation,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("edge"===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(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}=Oe(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 L(this._vertexManipulatorGeometry.instantiate(),4|Ve.Vertex),new L(this._vertexManipulatorOutlineGeometry.instantiate(),5|Ve.Vertex),new L(this._vertexManipulatorOutlineGeometry.instantiate({material:this._vertexManipulatorHoverOutlineMaterial}),6|Ve.Vertex),new L(this._vertexManipulatorGeometry.instantiate({material:this._selectedManipulatorMaterial}),8),new L(this._vertexManipulatorOutlineGeometry.instantiate({material:this._selectedManipulatorOutlineMaterial}),9),new L(this._vertexManipulatorOutlineGeometry.instantiate({material:this._selectedManipulatorHoverOutlineMaterial}),10)];this.enableMidpoints&&p.push(new L(this._edgeManipulatorGeometry.instantiate({material:this._vertexManipulatorMaterial}),6|Ve.Edge),new L(this._edgeManipulatorOutlineGeometry.instantiate({material:this._vertexManipulatorHoverOutlineMaterial}),6|Ve.Edge),new L(this._edgeManipulatorGeometry.instantiate(),5|Ve.Edge),new L(this._edgeManipulatorOutlineGeometry.instantiate(),5|Ve.Edge));const h=new G({view:a,renderObjects:p,elevationInfo:t,focusMultiplier:1,touchMultiplier:1,available:this.object.visible,metadata:{deleting:!1},location:je(l)});h.selected=i,this._setTypeSpecificManipulatorSettings(h,e,t);const u="edge"===e.type?{manipulator:h,handle:e,locationUpdateHandle:null,type:"edge",selectedIndex:0}:{manipulator:h,handle:e,type:"vertex",selectedIndex:0};if(this._manipulatorInfos.push(u),this.manipulators.add(h),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,h)}this._manipulatorHandles.add(this._watchAndUpdateGrabState(h,!0),h);const c=ue(h,(e,i,o,s)=>{let r=null;const{snappingStep:p,cancelSnapping:h}=_e({predicate:()=>!this._isMultiVertexSelection(),snappingManager:this.tool.snappingManager,snappingContext:new fe({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=d(r)),t)).next(h);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(de(a,t,m)).next(...p).next(he()).next(e=>{this._perVertexManipulatorDragAction(e),"end"===e.action&&(r=d(r)),this._resetTooltip()})});return this._manipulatorHandles.add([c,h.events.on("immediate-click",e=>this._manipulatorClickCallback(e,u)),h.events.on("select-changed",()=>{u.selectedIndex=++this._selectedIndex,this._updateMoveManipulationPosition(),this._resetTooltip()}),h.events.on("focus-changed",()=>{this._resetTooltip()})],h),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.Vertex,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"edge":{e.state=Ve.Edge,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=T(r,l,p,t.data.spatialReference)}else y(we,n.renderLocation,o.renderLocation,.5),e.manipulator.renderLocation=we}}_splitEdgeManipulator(e,t=.5){const i=this._operations,a=i.splitEdge(e.handle,t).createdVertex;e.locationUpdateHandle=d(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)),a.leftEdge&&this._createVertexOrEdgeManipulator(a.leftEdge),a.rightEdge&&this._createVertexOrEdgeManipulator(a.rightEdge),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.components.indexOf(a.component);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(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++,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.leftEdge?.leftVertex?a.handle.leftEdge.leftVertex.pos:null,o=null==n&&a.handle.rightEdge?.rightVertex?a.handle.rightEdge.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=B}0!==t&&i?(j(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?k(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.component;if("vertex"===a.type&&i.canRemoveVertex(e)){t.push(a.handle),this._removeManipulator(a),this._removeManipulator(this._getManipulatorInfoFromHandle(a.handle.leftEdge)),this._removeManipulator(this._getManipulatorInfoFromHandle(a.handle.rightEdge));const n=i.removeVertices([a.handle]),o=n.removedVertices?.[0].createdEdge;o?this._createVertexOrEdgeManipulator(o):this.enableEdgeOffset&&e.vertices.length<=2&&this._removeManipulator(this._getManipulatorInfoFromHandle(e.edges[0]))}}if(t.length>0){const e=t.map(e=>{const t=i.data.components.indexOf(e.component);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&&2===e.button&&this._removeVertices([t])),"edge"===t.type&&0===e.button&&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 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 H({x:0,y:0,z:0,spatialReference:e})}function Ie(e){return"edge"===e.type&&"edgeManipulator"in e}e([_()],xe.prototype,"_numGrabbing",void 0),e([_()],xe.prototype,"_numDragging",void 0),e([_()],xe.prototype,"_pendingEdgeOffsetInfo",void 0),e([_()],xe.prototype,"_operations",null),e([_()],xe.prototype,"_segmentLabels",void 0),e([_({constructOnly:!0})],xe.prototype,"tool",void 0),e([_()],xe.prototype,"tooltip",void 0),e([_()],xe.prototype,"activeTooltipInfo",void 0),e([_({readOnly:!0})],xe.prototype,"updating",null),e([_()],xe.prototype,"manipulators",null),e([_()],xe.prototype,"view",null),e([_()],xe.prototype,"automaticAreaMeasurementUtils",null),e([_()],xe.prototype,"automaticLengthMeasurementUtils",null),e([_()],xe.prototype,"object",null),e([_()],xe.prototype,"enableZShape",null),e([_()],xe.prototype,"enableDeleteVertices",null),e([_()],xe.prototype,"enableZVertex",null),e([_()],xe.prototype,"autoHideManipulators",null),e([_()],xe.prototype,"enableMoveObject",null),e([_()],xe.prototype,"enableMidpoints",null),e([_()],xe.prototype,"enableEdgeOffset",null),e([_()],xe.prototype,"_sketchOptions",null),e([_()],xe.prototype,"_accentColor",null),e([_()],xe.prototype,"_tooltipsContext",null),xe=e([v("esri.views.3d.interactive.editingTools.reshape.ReshapeOperation")],xe);const Se=T(0,0,void 0,D.WGS84),we=S(),He=1e-6;var Ve;!function(e){e.Vertex=16,e.Edge=32}(Ve||(Ve={}));export{xe as ReshapeOperation};
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"../../../../../core/has.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{destroyMaybe as p,removeMaybe as d}from"../../../../../core/maybe.js";import{watch as h,on as u,initial as c,syncAndInitial as m,when as g,sync as f}from"../../../../../core/reactiveUtils.js";import{property as _}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/Logger.js";import{subclass as v}from"../../../../../core/accessorSupport/decorators/subclass.js";import{IDENTITY as M}from"../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{l as b,d as x,m as y,i as O,f as E,g as 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 G}from"../../Manipulator3D.js";import{createManipulatorMaterial as P,createManipulatorOutlineMaterial as C,placeAtObject as k}from"../../manipulatorUtils.js";import{RenderObject as L}from"../../RenderObject.js";import{SegmentLabels3D as U}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{sceneSnappingAtLocation as de,addMapDelta as he,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 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=P(a(i.color),i.renderOccluded),this._vertexManipulatorOutlineMaterial=C(a(i.outlineColor),i.renderOccluded),this._vertexManipulatorHoverOutlineMaterial=C(a(i.hoverOutlineColor),i.renderOccluded);const n=t.edge;this._edgeManipulatorMaterial=P(a(n.color),n.renderOccluded),this._edgeManipulatorOutlineMaterial=C(a(n.outlineColor),n.renderOccluded);const o=t.edgeOffset;this._edgeOffsetManipulatorMaterial=P(a(o.color),o.renderOccluded,!1),this._edgeOffsetManipulatorHoverMaterial=P(a(o.hoverColor),o.renderOccluded,!1);const s=t.selected;this._selectedManipulatorMaterial=P(a(s.color),s.renderOccluded),this._selectedManipulatorOutlineMaterial=C(a(s.outlineColor),s.renderOccluded),this._selectedManipulatorHoverOutlineMaterial=C(a(s.hoverOutlineColor),s.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")},c),ne(this.tooltip,this.object,()=>this._tooltipsContext),h(()=>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===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=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 i of this._operations.data.components){const a=e?.byComponentIndex.get(i.index);for(const e of i.vertices){const i=a?.has(e.index);this._createVertexOrEdgeManipulator(e,t,i)}for(const e of i.edges)this._createVertexOrEdgeManipulator(e,t)}this._createObjectMoveManipulation(),this._createMoveManipulation(t),this._createVisualElements()}get canRedo(){return null!=this._operations&&this._operations.canRedo}get canUndo(){return null!=this._operations&&this._operations.canUndo}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 U({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 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=d(e))}),n.next(()=>this._onDragCancel(!0,()=>e=d(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:d}=_e({predicate:e=>!!e.info,snappingManager:i.snappingManager,snappingContext:new fe({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(d),{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(he()).next(e=>this._perObjectManipulatorDragAction(1,e)).next(e=>(this._updateTranslateTooltip(a,e),e)),cancel:r}},e,s,t.graphic),h(()=>t.visible,()=>this._updateMoveManipulationPosition(),c),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)},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.component.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,d=p/2,h=p*Math.sqrt(3)/2,{height:u,offset:c}=o,m=this._edgeOffsetManipulatorMaterial;if(!this._edgeOffsetManipulatorGeometryInside){const e=le(m,h,d,d,u,c);this._edgeOffsetManipulatorGeometryInside=e}if(!this._edgeOffsetManipulatorGeometryOutside){const e=le(m,-h,d,d,u,-c);this._edgeOffsetManipulatorGeometryOutside=e}const g=[new L(this._edgeOffsetManipulatorGeometryInside.instantiate(),1),new L(this._edgeOffsetManipulatorGeometryInside.instantiate({material:this._edgeOffsetManipulatorHoverMaterial}),2),new L(this._edgeOffsetManipulatorGeometryOutside.instantiate(),1),new L(this._edgeOffsetManipulatorGeometryOutside.instantiate({material:this._edgeOffsetManipulatorHoverMaterial}),2)],f=new G({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:je(n)}),_=new G({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,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),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?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=d(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(()=>{d(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(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(he()).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(F(this.view)).next(Z(this.view,i.data.spatialReference)).next(he()).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:o}=this,r=$(i.data.coordinateHelper,e.handle,t),l=i.createUndoGroup(),p=Q(n,e.manipulator.elevationAlignedLocation,r);let h;this._splitEdgesBeforeEdgeOffset(e,r),this._selectEdgeOffsetArrow(e,r);const u=()=>{this._cleanEdgeOffsetCollapsedEdges(e,i),h=d(h)},c=this.events.on("undo",u);return h=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([h(()=>({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.leftEdge?.leftVertex,a=e.handle.leftVertex,n=e.handle.rightVertex.rightEdge?.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=$(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.leftEdge);null!=t&&this._splitEdgeManipulator(t,1)}if(t.requiresSplitEdgeRight){const t=this._getManipulatorInfoFromHandle(e.handle.rightVertex.rightEdge);null!=t&&this._splitEdgeManipulator(t,0)}}_selectEdgeOffsetArrow(e,t){const i=e.grabMapPoint??J(this.view.inputManager?.latestPointerLocation,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("edge"===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(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}=Oe(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 L(this._vertexManipulatorGeometry.instantiate(),4|Ve.Vertex),new L(this._vertexManipulatorOutlineGeometry.instantiate(),5|Ve.Vertex),new L(this._vertexManipulatorOutlineGeometry.instantiate({material:this._vertexManipulatorHoverOutlineMaterial}),6|Ve.Vertex),new L(this._vertexManipulatorGeometry.instantiate({material:this._selectedManipulatorMaterial}),8),new L(this._vertexManipulatorOutlineGeometry.instantiate({material:this._selectedManipulatorOutlineMaterial}),9),new L(this._vertexManipulatorOutlineGeometry.instantiate({material:this._selectedManipulatorHoverOutlineMaterial}),10)];this.enableMidpoints&&p.push(new L(this._edgeManipulatorGeometry.instantiate({material:this._vertexManipulatorMaterial}),6|Ve.Edge),new L(this._edgeManipulatorOutlineGeometry.instantiate({material:this._vertexManipulatorHoverOutlineMaterial}),6|Ve.Edge),new L(this._edgeManipulatorGeometry.instantiate(),5|Ve.Edge),new L(this._edgeManipulatorOutlineGeometry.instantiate(),5|Ve.Edge));const h=new G({view:a,renderObjects:p,elevationInfo:t,focusMultiplier:1,touchMultiplier:1,available:this.object.visible,metadata:{deleting:!1},location:je(l)});h.selected=i,this._setTypeSpecificManipulatorSettings(h,e,t);const u="edge"===e.type?{manipulator:h,handle:e,locationUpdateHandle:null,type:"edge",selectedIndex:0}:{manipulator:h,handle:e,type:"vertex",selectedIndex:0};if(this._manipulatorInfos.push(u),this.manipulators.add(h),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,h)}this._manipulatorHandles.add(this._watchAndUpdateGrabState(h,!0),h);const c=ue(h,(e,i,o,s)=>{let r=null;const{snappingStep:p,cancelSnapping:h}=_e({predicate:()=>!this._isMultiVertexSelection(),snappingManager:this.tool.snappingManager,snappingContext:new fe({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=d(r)),t)).next(h);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(de(a,t,m)).next(...p).next(he()).next(e=>{this._perVertexManipulatorDragAction(e),"end"===e.action&&(r=d(r)),this._resetTooltip()})});return this._manipulatorHandles.add([c,h.events.on("immediate-click",e=>this._manipulatorClickCallback(e,u)),h.events.on("select-changed",()=>{u.selectedIndex=++this._selectedIndex,this._updateMoveManipulationPosition(),this._resetTooltip()}),h.events.on("focus-changed",()=>{this._resetTooltip()})],h),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.Vertex,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"edge":{e.state=Ve.Edge,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=T(r,l,p,t.data.spatialReference)}else y(we,n.renderLocation,o.renderLocation,.5),e.manipulator.renderLocation=we}}_splitEdgeManipulator(e,t=.5){const i=this._operations,a=i.splitEdge(e.handle,t).createdVertex;e.locationUpdateHandle=d(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)),a.leftEdge&&this._createVertexOrEdgeManipulator(a.leftEdge),a.rightEdge&&this._createVertexOrEdgeManipulator(a.rightEdge),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.components.indexOf(a.component);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(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++,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.leftEdge?.leftVertex?a.handle.leftEdge.leftVertex.pos:null,o=null==n&&a.handle.rightEdge?.rightVertex?a.handle.rightEdge.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=B}0!==t&&i?(j(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?k(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.component;if("vertex"===a.type&&i.canRemoveVertex(e)){t.push(a.handle),this._removeManipulator(a),this._removeManipulator(this._getManipulatorInfoFromHandle(a.handle.leftEdge)),this._removeManipulator(this._getManipulatorInfoFromHandle(a.handle.rightEdge));const n=i.removeVertices([a.handle]),o=n.removedVertices?.[0].createdEdge;o?this._createVertexOrEdgeManipulator(o):this.enableEdgeOffset&&e.vertices.length<=2&&this._removeManipulator(this._getManipulatorInfoFromHandle(e.edges[0]))}}if(t.length>0){const e=t.map(e=>{const t=i.data.components.indexOf(e.component);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&&2===e.button&&this._removeVertices([t])),"edge"===t.type&&0===e.button&&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 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 H({x:0,y:0,z:0,spatialReference:e})}function Ie(e){return"edge"===e.type&&"edgeManipulator"in e}e([_()],xe.prototype,"_numGrabbing",void 0),e([_()],xe.prototype,"_numDragging",void 0),e([_()],xe.prototype,"_pendingEdgeOffsetInfo",void 0),e([_()],xe.prototype,"_operations",null),e([_()],xe.prototype,"_segmentLabels",void 0),e([_({constructOnly:!0})],xe.prototype,"tool",void 0),e([_()],xe.prototype,"tooltip",void 0),e([_()],xe.prototype,"activeTooltipInfo",void 0),e([_({readOnly:!0})],xe.prototype,"updating",null),e([_()],xe.prototype,"manipulators",null),e([_()],xe.prototype,"view",null),e([_()],xe.prototype,"automaticAreaMeasurementUtils",null),e([_()],xe.prototype,"automaticLengthMeasurementUtils",null),e([_()],xe.prototype,"object",null),e([_()],xe.prototype,"enableZShape",null),e([_()],xe.prototype,"enableDeleteVertices",null),e([_()],xe.prototype,"enableZVertex",null),e([_()],xe.prototype,"autoHideManipulators",null),e([_()],xe.prototype,"enableMoveObject",null),e([_()],xe.prototype,"enableMidpoints",null),e([_()],xe.prototype,"enableEdgeOffset",null),e([_()],xe.prototype,"_sketchOptions",null),e([_()],xe.prototype,"_accentColor",null),e([_()],xe.prototype,"_tooltipsContext",null),xe=e([v("esri.views.3d.interactive.editingTools.reshape.ReshapeOperation")],xe);const Se=T(0,0,void 0,D.WGS84),we=S(),He=1e-6;var Ve;!function(e){e.Vertex=16,e.Edge=32}(Ve||(Ve={}));export{xe as ReshapeOperation};