@arcgis/core 5.1.0-next.77 → 5.1.0-next.79

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 (589) hide show
  1. package/analysis/ElevationProfile/ElevationProfileGroup.d.ts +74 -0
  2. package/analysis/ElevationProfile/ElevationProfileGroup.js +2 -0
  3. package/analysis/ElevationProfileAnalysis.d.ts +29 -14
  4. package/analysis/ElevationProfileAnalysis.js +1 -1
  5. package/analysis/ShadowCast/DiscreteOptions.d.ts +33 -6
  6. package/analysis/ShadowCast/DiscreteOptions.js +1 -1
  7. package/analysis/ShadowCast/MinDurationOptions.d.ts +6 -4
  8. package/analysis/ShadowCast/TotalDurationOptions.d.ts +33 -6
  9. package/analysis/ShadowCast/TotalDurationOptions.js +1 -1
  10. package/analysis/ShadowCast/colorStopsUtils.js +2 -0
  11. package/analysis/ShadowCastAnalysis.d.ts +24 -1
  12. package/analysis/ShadowCastAnalysis.js +1 -1
  13. package/analysis/Viewshed.d.ts +27 -0
  14. package/analysis/Viewshed.js +1 -1
  15. package/analysis/ViewshedAnalysis.js +1 -1
  16. package/applications/Components/OrientedImageryViewer/ImageViewer/utils.d.ts +34 -0
  17. package/applications/Components/OrientedImageryViewer/ImageViewer/utils.js +2 -0
  18. package/arcade/FunctionWrapper.js +1 -1
  19. package/arcade/arcadeAsyncRuntime.js +1 -1
  20. package/arcade/arcadeCompiler.js +1 -1
  21. package/arcade/arcadeRuntime.js +1 -1
  22. package/arcade/compilerUtils.js +1 -1
  23. package/arcade/debug.d.ts +139 -0
  24. package/arcade/debug.js +2 -0
  25. package/arcade/featureSetCollection.js +1 -1
  26. package/arcade/featureSetUtils.js +1 -1
  27. package/arcade/featureset/actions/GroupBy.js +1 -1
  28. package/arcade/featureset/actions/OrderBy.js +1 -1
  29. package/arcade/functions/featuresetstring.js +1 -1
  30. package/arcade/languageUtils.js +1 -1
  31. package/arcade.d.ts +46 -2
  32. package/arcade.js +1 -1
  33. package/assets/esri/core/workers/RemoteClient.js +1 -1
  34. package/assets/esri/core/workers/chunks/{1c7183551f5269bdcf13.js → 01bd1b86ba899c6aa4c0.js} +1 -1
  35. package/assets/esri/core/workers/chunks/{1f8ccf96069ac3a40c3d.js → 01ee18782a50279f907e.js} +1 -1
  36. package/assets/esri/core/workers/chunks/{34ea3ed78041437a8fc8.js → 022067e807905cabeaa1.js} +1 -1
  37. package/assets/esri/core/workers/chunks/{537fe2522dff1e6ce03b.js → 052cdc7aaa803b5873f0.js} +1 -1
  38. package/assets/esri/core/workers/chunks/{8d75f6f27c1c17c33992.js → 056fd7847caaff2c9514.js} +1 -1
  39. package/assets/esri/core/workers/chunks/{8acee3fba488f202f82f.js → 05c3146d87d917606193.js} +1 -1
  40. package/assets/esri/core/workers/chunks/{75d5ea0da181f9e7425f.js → 0aebcbf41cb193e76809.js} +11 -11
  41. package/assets/esri/core/workers/chunks/{54023458195549f66215.js → 0b77c124b743067e4155.js} +1 -1
  42. package/assets/esri/core/workers/chunks/10408183681fd6c7b4ed.js +2 -0
  43. package/assets/esri/core/workers/chunks/17acbf40e7c1cb42d9bd.js +1 -0
  44. package/assets/esri/core/workers/chunks/{baeb96aef03d4c566af7.js → 1f53620f82cc7c3daabe.js} +1 -1
  45. package/assets/esri/core/workers/chunks/2387613b855771a3e537.js +1 -0
  46. package/assets/esri/core/workers/chunks/283d39dfb1625b5a74db.js +1 -0
  47. package/assets/esri/core/workers/chunks/{7595ceba529ed01c7590.js → 2c87c3112a43db8624f6.js} +1 -1
  48. package/assets/esri/core/workers/chunks/{13e60f19f436b8d683ae.js → 3c9482764c9e4f8bcbb0.js} +1 -1
  49. package/assets/esri/core/workers/chunks/{5e1b847b116d21908a54.js → 3e37019eee1c49d2bf64.js} +1 -1
  50. package/assets/esri/core/workers/chunks/45c83eb7c2a06166e3b0.js +1 -0
  51. package/assets/esri/core/workers/chunks/48acd146bf0241d87647.js +1 -0
  52. package/assets/esri/core/workers/chunks/5818f1f526577068d6ca.js +2 -0
  53. package/assets/esri/core/workers/chunks/5b6f2bfdcdd207d8ae42.js +1 -0
  54. package/assets/esri/core/workers/chunks/{330b47ac0759c3c35cc5.js → 5ccc325d83cec4f5ccdb.js} +1 -1
  55. package/assets/esri/core/workers/chunks/{30e710ec4d22c43d4e7e.js → 5cffc7b49966201eccdb.js} +1 -1
  56. package/assets/esri/core/workers/chunks/{1a87e9bbd85ba29b1514.js → 5da2051f548c2942e01a.js} +1 -1
  57. package/assets/esri/core/workers/chunks/5ec66e39e53c11e75179.js +2 -0
  58. package/assets/esri/core/workers/chunks/{0b1454a77a6a682541dc.js.LICENSE.txt → 5ec66e39e53c11e75179.js.LICENSE.txt} +9 -1
  59. package/assets/esri/core/workers/chunks/5f6fd20a7f4e80eafa25.js +1 -0
  60. package/assets/esri/core/workers/chunks/{abc06d10c7ac8ba5b0e4.js → 67ec1694d6e18b7c234c.js} +1 -1
  61. package/assets/esri/core/workers/chunks/{32e22d6eee9fed1f70b0.js → 6d696beddcc5fbed5875.js} +1 -1
  62. package/assets/esri/core/workers/chunks/{f590b60fca607d66001a.js → 716a4d7e8b908b81870b.js} +1 -1
  63. package/assets/esri/core/workers/chunks/71fe127734f33d020a44.js +1 -0
  64. package/assets/esri/core/workers/chunks/7cdd0492b2191df95102.js +2 -0
  65. package/assets/esri/core/workers/chunks/7cea68257d24ffd205bb.js +1 -0
  66. package/assets/esri/core/workers/chunks/7e530e635325dba07864.js +1 -0
  67. package/assets/esri/core/workers/chunks/{6b66fc32451433129a88.js → 8508f238d99021e87f71.js} +1 -1
  68. package/assets/esri/core/workers/chunks/{bc75ab48f4c7609ef09d.js → 85d3475667c503ec4fc6.js} +1 -1
  69. package/assets/esri/core/workers/chunks/8f6f5dad52747d252aac.js +596 -0
  70. package/assets/esri/core/workers/chunks/{d950d5c2844206502ff0.js → 992cd87ba0ab6346f692.js} +1 -1
  71. package/assets/esri/core/workers/chunks/{73c87eb9bd8f0f848481.js → 9c11e1fe785e1385fdb1.js} +1 -1
  72. package/assets/esri/core/workers/chunks/{5ed8d8b5336c81fbcda3.js → 9d216e30d04ea21fc8a2.js} +1 -1
  73. package/assets/esri/core/workers/chunks/a54aa93b6012a2597f82.js +1 -0
  74. package/assets/esri/core/workers/chunks/{cf14b3a44705dacefac4.js → a9b5ce00323cd5574bf7.js} +1 -1
  75. package/assets/esri/core/workers/chunks/ae6b3dfe5f757df539d6.js +1 -0
  76. package/assets/esri/core/workers/chunks/b14c4c3f295970f731ab.js +1 -0
  77. package/assets/esri/core/workers/chunks/{c70df6ed190f9ebcf6aa.js → bf2c202dec5ab7bc770b.js} +1 -1
  78. package/assets/esri/core/workers/chunks/c1d4110aa494a1dba3c4.js +1 -0
  79. package/assets/esri/core/workers/chunks/{9d6491f996eeb0c646ed.js → c442916805975744dd92.js} +1 -1
  80. package/assets/esri/core/workers/chunks/dacc2e5fa462495ed1cc.js +2 -0
  81. package/assets/esri/core/workers/chunks/f227b34cce6843df0fb6.js +1 -0
  82. package/assets/esri/core/workers/chunks/{dda2cb5c073d1e65f14f.js → f43d628d47eec7d530c7.js} +1 -1
  83. package/assets/esri/core/workers/chunks/f7531aa69a87814c60d1.js +1 -0
  84. package/assets/esri/core/workers/chunks/{bf8f603848bad4a7deb4.js → fb100935fd8948d779f5.js} +1 -1
  85. package/assets/esri/core/workers/chunks/{88b480a1d1fb01778798.js → fb9e3e7cd532ac4353f1.js} +25 -30
  86. package/assets/esri/core/workers/chunks/fc6ca7ffb9f1b875059c.js +1 -0
  87. package/assets/esri/core/workers/chunks/{14eb2cc8e2ad6d8d03fd.js → ffc4f3406ce383b9bd88.js} +1 -1
  88. package/assets/esri/themes/base/_core.scss +2 -0
  89. package/assets/esri/themes/base/widgets/_BatchAttributeForm.scss +6 -0
  90. package/assets/esri/themes/base/widgets/_PluginSettingsControls.scss +29 -0
  91. package/assets/esri/themes/dark/main.css +1 -1
  92. package/assets/esri/themes/light/main.css +1 -1
  93. package/assets/esri/themes/light/view.css +1 -1
  94. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer.json +1 -1
  95. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ar.json +1 -1
  96. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bg.json +1 -1
  97. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bs.json +1 -1
  98. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ca.json +1 -1
  99. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_cs.json +1 -1
  100. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_da.json +1 -1
  101. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_de.json +1 -1
  102. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_el.json +1 -1
  103. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_en.json +1 -1
  104. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_es.json +1 -1
  105. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_et.json +1 -1
  106. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fi.json +1 -1
  107. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fr.json +1 -1
  108. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_he.json +1 -1
  109. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hr.json +1 -1
  110. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hu.json +1 -1
  111. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_id.json +1 -1
  112. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_it.json +1 -1
  113. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ja.json +1 -1
  114. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ko.json +1 -1
  115. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lt.json +1 -1
  116. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lv.json +1 -1
  117. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_nl.json +1 -1
  118. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_no.json +1 -1
  119. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pl.json +1 -1
  120. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-BR.json +1 -1
  121. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-PT.json +1 -1
  122. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ro.json +1 -1
  123. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ru.json +1 -1
  124. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sk.json +1 -1
  125. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sl.json +1 -1
  126. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sr.json +1 -1
  127. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sv.json +1 -1
  128. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_th.json +1 -1
  129. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_tr.json +1 -1
  130. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_uk.json +1 -1
  131. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_vi.json +1 -1
  132. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-CN.json +1 -1
  133. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-HK.json +1 -1
  134. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-TW.json +1 -1
  135. package/assets/esri/widgets/Sketch/t9n/Sketch.json +1 -1
  136. package/assets/esri/widgets/Sketch/t9n/Sketch_ar.json +1 -1
  137. package/assets/esri/widgets/Sketch/t9n/Sketch_bg.json +1 -1
  138. package/assets/esri/widgets/Sketch/t9n/Sketch_bs.json +1 -1
  139. package/assets/esri/widgets/Sketch/t9n/Sketch_ca.json +1 -1
  140. package/assets/esri/widgets/Sketch/t9n/Sketch_cs.json +1 -1
  141. package/assets/esri/widgets/Sketch/t9n/Sketch_da.json +1 -1
  142. package/assets/esri/widgets/Sketch/t9n/Sketch_de.json +1 -1
  143. package/assets/esri/widgets/Sketch/t9n/Sketch_el.json +1 -1
  144. package/assets/esri/widgets/Sketch/t9n/Sketch_en.json +1 -1
  145. package/assets/esri/widgets/Sketch/t9n/Sketch_es.json +1 -1
  146. package/assets/esri/widgets/Sketch/t9n/Sketch_et.json +1 -1
  147. package/assets/esri/widgets/Sketch/t9n/Sketch_fi.json +1 -1
  148. package/assets/esri/widgets/Sketch/t9n/Sketch_fr.json +1 -1
  149. package/assets/esri/widgets/Sketch/t9n/Sketch_he.json +1 -1
  150. package/assets/esri/widgets/Sketch/t9n/Sketch_hr.json +1 -1
  151. package/assets/esri/widgets/Sketch/t9n/Sketch_hu.json +1 -1
  152. package/assets/esri/widgets/Sketch/t9n/Sketch_id.json +1 -1
  153. package/assets/esri/widgets/Sketch/t9n/Sketch_it.json +1 -1
  154. package/assets/esri/widgets/Sketch/t9n/Sketch_ja.json +1 -1
  155. package/assets/esri/widgets/Sketch/t9n/Sketch_ko.json +1 -1
  156. package/assets/esri/widgets/Sketch/t9n/Sketch_lt.json +1 -1
  157. package/assets/esri/widgets/Sketch/t9n/Sketch_lv.json +1 -1
  158. package/assets/esri/widgets/Sketch/t9n/Sketch_nl.json +1 -1
  159. package/assets/esri/widgets/Sketch/t9n/Sketch_no.json +1 -1
  160. package/assets/esri/widgets/Sketch/t9n/Sketch_pl.json +1 -1
  161. package/assets/esri/widgets/Sketch/t9n/Sketch_pt-BR.json +1 -1
  162. package/assets/esri/widgets/Sketch/t9n/Sketch_pt-PT.json +1 -1
  163. package/assets/esri/widgets/Sketch/t9n/Sketch_ro.json +1 -1
  164. package/assets/esri/widgets/Sketch/t9n/Sketch_ru.json +1 -1
  165. package/assets/esri/widgets/Sketch/t9n/Sketch_sk.json +1 -1
  166. package/assets/esri/widgets/Sketch/t9n/Sketch_sl.json +1 -1
  167. package/assets/esri/widgets/Sketch/t9n/Sketch_sr.json +1 -1
  168. package/assets/esri/widgets/Sketch/t9n/Sketch_sv.json +1 -1
  169. package/assets/esri/widgets/Sketch/t9n/Sketch_th.json +1 -1
  170. package/assets/esri/widgets/Sketch/t9n/Sketch_tr.json +1 -1
  171. package/assets/esri/widgets/Sketch/t9n/Sketch_uk.json +1 -1
  172. package/assets/esri/widgets/Sketch/t9n/Sketch_vi.json +1 -1
  173. package/assets/esri/widgets/Sketch/t9n/Sketch_zh-CN.json +1 -1
  174. package/assets/esri/widgets/Sketch/t9n/Sketch_zh-HK.json +1 -1
  175. package/assets/esri/widgets/Sketch/t9n/Sketch_zh-TW.json +1 -1
  176. package/chunks/ImageMaterial.glsl.js +7 -5
  177. package/chunks/SlicePlaneMaterial.glsl.js +21 -13
  178. package/chunks/arcade.js +1 -1
  179. package/chunks/languageUtils.js +1 -1
  180. package/config.js +1 -1
  181. package/core/MapUtils.js +1 -1
  182. package/core/arrayUtils.js +1 -1
  183. package/core/types.d.ts +28 -0
  184. package/form/elements/inputs/MultipleChoiceInput.d.ts +2 -2
  185. package/form/elements/inputs/MultipleChoiceInput.js +1 -1
  186. package/geometry/operators/types.d.ts +2 -2
  187. package/interfaces.d.ts +4 -7
  188. package/kernel.js +1 -1
  189. package/layers/ImageryLayer.d.ts +7 -1
  190. package/layers/ImageryLayer.js +1 -1
  191. package/layers/ImageryTileLayer.d.ts +7 -1
  192. package/layers/ImageryTileLayer.js +1 -1
  193. package/layers/IntegratedMeshLayer.d.ts +18 -14
  194. package/layers/SceneLayer.d.ts +35 -1
  195. package/layers/SceneLayer.js +1 -1
  196. package/layers/WCSLayer.d.ts +7 -1
  197. package/layers/WCSLayer.js +1 -1
  198. package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
  199. package/layers/save/imageryUtils.js +1 -1
  200. package/layers/scene/ModelFileInfo.d.ts +29 -0
  201. package/layers/scene/ModelFileInfo.js +2 -0
  202. package/layers/scene/ModelInfo.d.ts +38 -0
  203. package/layers/scene/ModelInfo.js +2 -0
  204. package/layers/scene/modelQuerySupport.js +2 -0
  205. package/layers/scene/types.d.ts +14 -0
  206. package/layers/support/infoFor3D.js +1 -1
  207. package/layers/support/serviceCapabilitiesUtils.js +1 -1
  208. package/layers/types.d.ts +13 -1
  209. package/layers/video/VideoController.js +1 -1
  210. package/networks/UnitIdentifierManager.d.ts +15 -15
  211. package/networks/UnitIdentifierManager.js +1 -1
  212. package/networks/support/jsonTypes.d.ts +125 -13
  213. package/package.json +4 -4
  214. package/popup/Features.d.ts +1 -7
  215. package/popup/Features.js +1 -1
  216. package/popup/actions.js +1 -1
  217. package/renderers/visualVariables/support/ColorStop.js +1 -1
  218. package/rest/networks/unitIdentifiers/reserve.js +2 -0
  219. package/rest/networks/unitIdentifiers/support/ReserveParameters.js +2 -0
  220. package/rest/networks/unitIdentifiers/support/ResizeParameters.js +1 -1
  221. package/rest/networks/unitIdentifiers/support/UnitQueryResult.js +1 -1
  222. package/support/arcadeUtils.js +1 -1
  223. package/support/revision.js +1 -1
  224. package/views/2d/analysis/ElevationProfile/ElevationProfileVisualization2D.js +1 -1
  225. package/views/2d/analysis/ElevationProfileAnalysisView2D.d.ts +5 -1
  226. package/views/2d/analysis/ElevationProfileAnalysisView2D.js +1 -1
  227. package/views/2d/engine/flow/styles/Imagery.js +1 -1
  228. package/views/2d/engine/flow/styles/Particles.js +1 -1
  229. package/views/2d/engine/flow/styles/Streamlines.js +1 -1
  230. package/views/2d/engine/vectorTiles/Placement.js +1 -1
  231. package/views/2d/engine/vectorTiles/TextShaping.js +1 -1
  232. package/views/2d/engine/webgl/AFeatureTile.js +1 -1
  233. package/views/2d/engine/webgl/AttributeStoreView.js +1 -1
  234. package/views/2d/engine/webgl/GlyphMosaic.js +1 -1
  235. package/views/2d/engine/webgl/GlyphSource.js +1 -1
  236. package/views/2d/engine/webgl/Overlay.js +1 -1
  237. package/views/2d/engine/webgl/OverlayMultipoint.js +1 -1
  238. package/views/2d/engine/webgl/RenderingDevice.js +1 -1
  239. package/views/2d/engine/webgl/TextureManager.js +1 -1
  240. package/views/2d/engine/webgl/effects/HittestEffect.js +1 -1
  241. package/views/2d/engine/webgl/mesh/templates/shapingUtils.js +1 -1
  242. package/views/2d/engine/webgl/shaderGraph/GLSLShaderModule.js +1 -1
  243. package/views/2d/engine/webgl/shaderGraph/GraphShaderModule.js +1 -1
  244. package/views/2d/engine/webgl/shaderGraph/graph/ShaderGraphContext.js +1 -1
  245. package/views/2d/engine/webgl/shaderGraph/techniques/TechniqueProgramCache.js +1 -1
  246. package/views/2d/engine/webgl/shaderGraph/techniques/TestTechnique.js +1 -1
  247. package/views/2d/engine/webgl/shaderGraph/techniques/TextureStatisticsTechnique.js +1 -1
  248. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AAnimatedShader.js +1 -1
  249. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedTechnique.js +1 -1
  250. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimationUniformInfo.js +1 -1
  251. package/views/2d/engine/webgl/shaderGraph/techniques/bitmap/BitmapTechnique.js +1 -1
  252. package/views/2d/engine/webgl/shaderGraph/techniques/blend/BlendTechnique.js +1 -1
  253. package/views/2d/engine/webgl/shaderGraph/techniques/bloom/BloomTechnique.js +1 -1
  254. package/views/2d/engine/webgl/shaderGraph/techniques/blur/BlurTechnique.js +1 -1
  255. package/views/2d/engine/webgl/shaderGraph/techniques/clip/ClipTechnique.js +1 -1
  256. package/views/2d/engine/webgl/shaderGraph/techniques/colorize/ColorizeTechnique.js +1 -1
  257. package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityPointShader.js +1 -1
  258. package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityPolygonShader.js +1 -1
  259. package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityTechnique.js +1 -1
  260. package/views/2d/engine/webgl/shaderGraph/techniques/drop-shadow/DropShadowTechnique.js +1 -1
  261. package/views/2d/engine/webgl/shaderGraph/techniques/featureTechniqueUtils.js +1 -1
  262. package/views/2d/engine/webgl/shaderGraph/techniques/fill/ComplexFillTechnique.js +1 -1
  263. package/views/2d/engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillTechnique.js +1 -1
  264. package/views/2d/engine/webgl/shaderGraph/techniques/fill/FillTechnique.js +1 -1
  265. package/views/2d/engine/webgl/shaderGraph/techniques/fill/GradientFillTechnique.js +1 -1
  266. package/views/2d/engine/webgl/shaderGraph/techniques/fill/OutlineFillTechnique.js +1 -1
  267. package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternFillTechnique.js +1 -1
  268. package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillTechnique.js +1 -1
  269. package/views/2d/engine/webgl/shaderGraph/techniques/flow/FlowTechnique.js +1 -1
  270. package/views/2d/engine/webgl/shaderGraph/techniques/grid/GridTechnique.js +1 -1
  271. package/views/2d/engine/webgl/shaderGraph/techniques/heatmap/HeatmapTechnique.js +1 -1
  272. package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelTechnique.js +1 -1
  273. package/views/2d/engine/webgl/shaderGraph/techniques/line/GradientStrokeTechnique.js +1 -1
  274. package/views/2d/engine/webgl/shaderGraph/techniques/line/LineTechnique.js +1 -1
  275. package/views/2d/engine/webgl/shaderGraph/techniques/line/TexturedLineTechnique.js +1 -1
  276. package/views/2d/engine/webgl/shaderGraph/techniques/magnifier/MagnifierTechnique.js +1 -1
  277. package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerShader.js +1 -1
  278. package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerTechnique.js +1 -1
  279. package/views/2d/engine/webgl/shaderGraph/techniques/opacity/OpacityTechnique.js +1 -1
  280. package/views/2d/engine/webgl/shaderGraph/techniques/overlay/OverlayTechnique.js +1 -1
  281. package/views/2d/engine/webgl/shaderGraph/techniques/pieChart/PieChartShader.js +1 -1
  282. package/views/2d/engine/webgl/shaderGraph/techniques/pieChart/PieChartTechnique.js +1 -1
  283. package/views/2d/engine/webgl/shaderGraph/techniques/raster/RasterColorizerTechnique.js +1 -1
  284. package/views/2d/engine/webgl/shaderGraph/techniques/raster/RasterHighlightTechnique.js +1 -1
  285. package/views/2d/engine/webgl/shaderGraph/techniques/raster/VectorFieldTechnique.js +1 -1
  286. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/AspectTechnique.js +1 -1
  287. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/BandArithmeticTechnique.js +1 -1
  288. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/BaseRasterProcessorTechnique.js +1 -1
  289. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/ColormapToRGBTechnique.js +1 -1
  290. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/CompositeBandTechnique.js +1 -1
  291. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/ComputeChangeTechnique.js +1 -1
  292. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/ContrastBrightnessTechnique.js +1 -1
  293. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/ConvolutionTechnique.js +1 -1
  294. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/CurvatureTechnique.js +1 -1
  295. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/ExtractBandTechnique.js +1 -1
  296. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/FocalStatisticsTechnique.js +1 -1
  297. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/GrayscaleTechnique.js +1 -1
  298. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/HillshadeTechnique.js +1 -1
  299. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/LocalTechnique.js +1 -1
  300. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/MaskTechnique.js +1 -1
  301. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/NDVITechnique.js +1 -1
  302. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/RemapTechnique.js +1 -1
  303. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/ReprojectTechnique.js +1 -1
  304. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/ShadedReliefTechnique.js +1 -1
  305. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/SlopeTechnique.js +1 -1
  306. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/SpectralConversionTechnique.js +1 -1
  307. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/StretchTechnique.js +1 -1
  308. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/AFeatureShader.js +1 -1
  309. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/BitmapShader.js +1 -1
  310. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/BlendShader.js +1 -1
  311. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/BlitShader.js +1 -1
  312. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/BloomShader.js +1 -1
  313. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/BlurShader.js +1 -1
  314. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ColorizeShader.js +1 -1
  315. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ComplexFillShader.js +1 -1
  316. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ComplexOutlineFillShader.js +1 -1
  317. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/DropShadowShader.js +1 -1
  318. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/EntityStorage.js +1 -1
  319. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/GradientFillShader.js +1 -1
  320. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/GradientStrokeShader.js +1 -1
  321. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/HeatmapAccumulateShader.js +1 -1
  322. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/HeatmapResolveShader.js +1 -1
  323. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/LineShader.js +1 -1
  324. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/MagnifierShader.js +1 -1
  325. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/MosaicInfo.js +1 -1
  326. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/OpacityShader.js +1 -1
  327. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/OverlayShader.js +1 -1
  328. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/PatternFillShader.js +1 -1
  329. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/PatternOutlineFillShader.js +1 -1
  330. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ShaderHittest.js +1 -1
  331. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TextureStatisticsDiffShader.js +1 -1
  332. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TextureStatisticsMinMaxSumShader.js +1 -1
  333. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TextureStatisticsStdDevShader.js +1 -1
  334. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TextureStatisticsSumOfSquaredDiffShader.js +1 -1
  335. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TexturedLineShader.js +1 -1
  336. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TileDebugInfoShader.js +1 -1
  337. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/VideoScreenShader.js +1 -1
  338. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/flow/FlowImageryShader.js +1 -1
  339. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/flow/FlowUtils.js +1 -1
  340. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/hittestUtils.js +1 -1
  341. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/BaseRasterColorizerShader.js +1 -1
  342. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/BaseRasterHighlightShader.js +1 -1
  343. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/RasterColorizerLUTShader.js +1 -1
  344. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/RasterColorizerShadedReliefShader.js +1 -1
  345. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/RasterColorizerStretchShader.js +1 -1
  346. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/RasterXYBandHighlightShader.js +1 -1
  347. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/lut.js +1 -1
  348. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/AspectShader.js +1 -1
  349. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/BaseRasterProcessorShader.js +1 -1
  350. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/ColormapToRGBShader.js +1 -1
  351. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/ConvolutionShader.js +1 -1
  352. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/CurvatureShader.js +1 -1
  353. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/FocalStatisticsShader.js +1 -1
  354. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/HillshadeShader.js +1 -1
  355. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/MultiRasterMixin.js +1 -1
  356. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/ShadedReliefShader.js +1 -1
  357. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/SlopeShader.js +1 -1
  358. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/projection.js +1 -1
  359. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/stretch.js +1 -1
  360. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderBackground.js +1 -1
  361. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderFill.js +1 -1
  362. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderIcon.js +1 -1
  363. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderLine.js +1 -1
  364. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderText.js +1 -1
  365. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vvUtils.js +1 -1
  366. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
  367. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextTechnique.js +1 -1
  368. package/views/2d/engine/webgl/shaderGraph/techniques/tile/TileDebugInfoTechnique.js +1 -1
  369. package/views/2d/engine/webgl/shaderGraph/techniques/tile/TileStencilTechnique.js +1 -1
  370. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueBackground.js +1 -1
  371. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueCircle.js +1 -1
  372. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueFill.js +1 -1
  373. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueLine.js +1 -1
  374. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueSymbol.js +1 -1
  375. package/views/2d/engine/webgl/shaderGraph/techniques/videoScreenRenderer/VideoScreenTechnique.js +1 -1
  376. package/views/2d/engine/webgl/shaderGraph/typed/TypedShaderProgram.js +1 -1
  377. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  378. package/views/2d/layers/BaseLayerView2D.d.ts +3 -3
  379. package/views/2d/layers/BaseLayerViewGL2D.d.ts +3 -3
  380. package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
  381. package/views/2d/layers/TileLayerView2D.js +1 -1
  382. package/views/2d/layers/VectorTileLayerView2D.js +1 -1
  383. package/views/2d/layers/features/FeatureContainer.js +1 -1
  384. package/views/2d/support/clippingUtils.js +1 -1
  385. package/views/2d/support/hitTestUtils.js +1 -1
  386. package/views/3d/FocusAreasView.js +1 -1
  387. package/views/3d/StencilGeometry.js +2 -0
  388. package/views/3d/analysis/ElevationProfile/ElevationProfileVisualization3D.js +1 -1
  389. package/views/3d/analysis/ElevationProfileAnalysisView3D.d.ts +5 -1
  390. package/views/3d/analysis/ElevationProfileAnalysisView3D.js +1 -1
  391. package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
  392. package/views/3d/analysis/Viewshed/ViewshedComputedData.js +1 -1
  393. package/views/3d/analysis/Viewshed/ViewshedConfiguration.js +1 -1
  394. package/views/3d/analysis/Viewshed/ViewshedFieldOfViewManipulation.js +1 -1
  395. package/views/3d/analysis/Viewshed/ViewshedScaleOrientManipulation.js +1 -1
  396. package/views/3d/analysis/Viewshed/ViewshedShapeVisualElement.js +1 -1
  397. package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
  398. package/views/3d/analysis/Viewshed/ViewshedSubVisualization.js +1 -1
  399. package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
  400. package/views/3d/analysis/Viewshed/viewshedToolUtils.js +1 -1
  401. package/views/3d/analysis/ViewshedAnalysisView3D.js +1 -1
  402. package/views/3d/focusAreaUtils.js +2 -0
  403. package/views/3d/layers/BuildingComponentSublayerView3D.js +1 -1
  404. package/views/3d/layers/I3SMeshView3D.js +1 -1
  405. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  406. package/views/3d/layers/IntegratedMeshLayerView3D.js +1 -1
  407. package/views/3d/layers/IntegratedMeshNormals.js +1 -1
  408. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  409. package/views/3d/layers/SceneLayerView3D.js +1 -1
  410. package/views/3d/layers/SceneLayerWorker.js +1 -1
  411. package/views/3d/layers/i3s/I3SQueryEngine.js +1 -1
  412. package/views/3d/layers/i3s/I3SUtil.js +1 -1
  413. package/views/3d/layers/support/DefinitionExpressionSceneLayerView.js +1 -1
  414. package/views/3d/layers/support/TemporalSceneLayerView.js +1 -1
  415. package/views/3d/terrain/ElevationData.js +1 -1
  416. package/views/3d/terrain/PatchGeometryFactory.js +1 -1
  417. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  418. package/views/3d/webgl-engine/collections/Component/Renderable.js +1 -1
  419. package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadBaseColorTexture.glsl.js +1 -5
  420. package/views/3d/webgl-engine/core/shaderLibrary/util/DiscardOrAdjustAlpha.glsl.js +1 -5
  421. package/views/3d/webgl-engine/core/shaderLibrary/util/MixExternalColor.glsl.js +16 -21
  422. package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechniqueRepository.js +1 -1
  423. package/views/3d/webgl-engine/effects/atmosphere/ChapmanAtmosphere.js +1 -1
  424. package/views/3d/webgl-engine/effects/atmosphere/LocalAtmosphere.js +1 -1
  425. package/views/3d/webgl-engine/effects/atmosphere/MarsAtmosphere.js +1 -1
  426. package/views/3d/webgl-engine/effects/blit/Blit.js +1 -1
  427. package/views/3d/webgl-engine/effects/clouds/CloudsComposition.js +1 -1
  428. package/views/3d/webgl-engine/effects/clouds/CloudsRenderer.js +1 -1
  429. package/views/3d/webgl-engine/effects/clouds/CloudsTechnique.js +1 -1
  430. package/views/3d/webgl-engine/effects/clouds/NoiseTextureAtlas.js +1 -1
  431. package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorNode.js +1 -1
  432. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
  433. package/views/3d/webgl-engine/effects/focusArea/focusAreaMaskUtils.js +2 -0
  434. package/views/3d/webgl-engine/effects/fog/Fog.js +1 -1
  435. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
  436. package/views/3d/webgl-engine/effects/glow/GlowRenderNode.js +1 -1
  437. package/views/3d/webgl-engine/effects/haze/Haze.js +1 -1
  438. package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
  439. package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.js +1 -1
  440. package/views/3d/webgl-engine/effects/highlight/ShadowHighlightBuffer.js +1 -1
  441. package/views/3d/webgl-engine/effects/laserlines/LaserLineRenderer.js +1 -1
  442. package/views/3d/webgl-engine/effects/laserlines/LaserlinePathTechnique.js +1 -1
  443. package/views/3d/webgl-engine/effects/magnifier/Magnifier.js +1 -1
  444. package/views/3d/webgl-engine/effects/precipitation/Precipitation.js +1 -1
  445. package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
  446. package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
  447. package/views/3d/webgl-engine/effects/stars/Stars.js +1 -1
  448. package/views/3d/webgl-engine/effects/stars/StarsTechnique.js +1 -1
  449. package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
  450. package/views/3d/webgl-engine/lib/Compositor.js +1 -1
  451. package/views/3d/webgl-engine/lib/CutFillComputationRenderNode.js +1 -1
  452. package/views/3d/webgl-engine/lib/CutFillVisualizationRenderNode.js +1 -1
  453. package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
  454. package/views/3d/webgl-engine/lib/Material.js +1 -1
  455. package/views/3d/webgl-engine/lib/Normals.js +1 -1
  456. package/views/3d/webgl-engine/lib/OrderIndependentTransparency.js +1 -1
  457. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  458. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  459. package/views/3d/webgl-engine/lib/ShadowCastRenderer.js +1 -1
  460. package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
  461. package/views/3d/webgl-engine/lib/ViewshedShadowMap.js +1 -1
  462. package/views/3d/webgl-engine/materials/DefaultTechniqueConfiguration.js +1 -1
  463. package/views/3d/webgl-engine/shaders/BlackLevelLightSoftCompression.glsl.js +5 -1
  464. package/views/3d/webgl-engine/shaders/CheckerBoardTechnique.js +1 -1
  465. package/views/3d/webgl-engine/shaders/ColorMaterialTechnique.js +1 -1
  466. package/views/3d/webgl-engine/shaders/CompositingTechnique.js +1 -1
  467. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  468. package/views/3d/webgl-engine/shaders/ImageMaterialTechnique.js +1 -1
  469. package/views/3d/webgl-engine/shaders/LineMarkerTechnique.js +1 -1
  470. package/views/3d/webgl-engine/shaders/MeasurementArrowTechnique.js +1 -1
  471. package/views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js +10 -10
  472. package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
  473. package/views/3d/webgl-engine/shaders/ShadedColorMaterialTechnique.js +1 -1
  474. package/views/3d/webgl-engine/shaders/SlicePlaneMaterialTechnique.js +1 -1
  475. package/views/VideoView.js +1 -1
  476. package/views/View2D.js +1 -1
  477. package/views/analysis/ElevationProfile/ElevationProfileChart.js +1 -1
  478. package/views/analysis/ElevationProfile/ElevationProfileController.js +1 -1
  479. package/views/analysis/ElevationProfile/ElevationProfileIndicatorPointVisualization.js +1 -1
  480. package/views/analysis/ElevationProfile/ElevationProfileResult.d.ts +6 -4
  481. package/views/draw/DrawTool.js +1 -1
  482. package/views/draw/plugins/BezierSegmentPlugin.js +1 -1
  483. package/views/draw/plugins/FreehandSegmentPlugin.js +1 -1
  484. package/views/draw/support/GraphicMover.js +1 -1
  485. package/views/draw/support/PluginContext.js +1 -1
  486. package/views/draw/support/Reshape.js +1 -1
  487. package/views/draw/support/editingSessionUtils.js +1 -1
  488. package/views/draw/support/types.d.ts +21 -0
  489. package/views/draw/support/types.js +1 -1
  490. package/views/types.d.ts +2 -2
  491. package/views/webgl/FramebufferObject.js +1 -1
  492. package/widgets/BatchAttributeForm/css.js +1 -1
  493. package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
  494. package/widgets/BatchAttributeForm/inputs/GroupInput.d.ts +2 -1
  495. package/widgets/BatchAttributeForm/inputs/RelationshipElementInput.d.ts +54 -0
  496. package/widgets/BatchAttributeForm/inputs/RelationshipElementInput.js +2 -0
  497. package/widgets/BatchAttributeForm/inputs/support/createBatchFormInputs.js +1 -1
  498. package/widgets/BatchAttributeForm/inputs/support/inputUtils.js +1 -1
  499. package/widgets/BatchAttributeForm/inputs/types.d.ts +4 -3
  500. package/widgets/BatchAttributeForm/templates/AttachmentElementTemplate.js +1 -1
  501. package/widgets/BatchAttributeForm/templates/RelationshipElementTemplate.js +2 -0
  502. package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
  503. package/widgets/BatchAttributeForm/templates/support/hashElementTemplate.js +1 -1
  504. package/widgets/BatchAttributeForm/templates/support/templateUtils.js +1 -1
  505. package/widgets/BatchAttributeForm.js +1 -1
  506. package/widgets/CoordinateConversion/CoordinateConversionViewModel.d.ts +21 -1
  507. package/widgets/CoordinateConversion/CoordinateConversionViewModel.js +1 -1
  508. package/widgets/CoordinateConversion/support/Format.js +1 -1
  509. package/widgets/CoordinateConversion/support/coordinateConversionUtils.js +1 -1
  510. package/widgets/CoordinateConversion.d.ts +21 -1
  511. package/widgets/CoordinateConversion.js +1 -1
  512. package/widgets/Daylight/DaylightViewModel.js +1 -1
  513. package/widgets/Daylight/support/SliderWithDropdown.js +1 -1
  514. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  515. package/widgets/Editor/SplitFeatureWorkflow.js +1 -1
  516. package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
  517. package/widgets/Editor/components/Settings.js +1 -1
  518. package/widgets/Editor/support/SketchController.js +1 -1
  519. package/widgets/Editor/workflowUtils.js +1 -1
  520. package/widgets/ElevationProfile/ElevationProfileController.js +1 -1
  521. package/widgets/ElevationProfile/ElevationProfileViewModel.js +1 -1
  522. package/widgets/ElevationProfile/support/ElevationProfileView.js +1 -1
  523. package/widgets/ElevationProfile/support/ElevationProfileView2D.js +1 -1
  524. package/widgets/ElevationProfile/support/ElevationProfileView3D.js +1 -1
  525. package/widgets/ElevationProfile/support/InputRepresentation2D.js +1 -1
  526. package/widgets/ElevationProfile/support/InputRepresentation3D.js +1 -1
  527. package/widgets/ElevationProfile/support/ProfileLine2D.js +1 -1
  528. package/widgets/ElevationProfile/support/ProfileLines3D.js +1 -1
  529. package/widgets/FeatureForm/FieldInput.js +1 -1
  530. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  531. package/widgets/HistogramRangeSlider/HistogramRangeSliderViewModel.js +1 -1
  532. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  533. package/widgets/OrientedImageryViewer/OrientedImageryViewerVisibleElements.d.ts +5 -5
  534. package/widgets/OrientedImageryViewer/OrientedImageryViewerVisibleElements.js +1 -1
  535. package/widgets/OrientedImageryViewer/adapters/view/SceneViewAdapter.js +1 -1
  536. package/widgets/OrientedImageryViewer/constants.js +1 -1
  537. package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
  538. package/widgets/OrientedImageryViewer/services/SuperimposeService.js +2 -0
  539. package/widgets/OrientedImageryViewer/support/superimposeUtils.js +2 -0
  540. package/widgets/OrientedImageryViewer/types.d.ts +10 -0
  541. package/widgets/OrientedImageryViewer.d.ts +17 -2
  542. package/widgets/OrientedImageryViewer.js +1 -1
  543. package/widgets/ScaleRangeSlider/ScaleRangeSliderViewModel.js +1 -1
  544. package/widgets/Sketch/SketchViewModel.js +1 -1
  545. package/widgets/Sketch/support/PluginManager.js +1 -1
  546. package/widgets/Sketch/support/SettingsManager.js +2 -0
  547. package/widgets/Sketch.js +1 -1
  548. package/widgets/Slider/SliderViewModel.d.ts +2 -1
  549. package/widgets/Slider/SliderViewModel.js +1 -1
  550. package/widgets/Slider.js +1 -1
  551. package/widgets/smartMapping/ColorSlider/ColorSliderViewModel.js +1 -1
  552. package/widgets/smartMapping/OpacitySlider/OpacitySliderViewModel.js +1 -1
  553. package/widgets/smartMapping/SizeSlider/SizeSliderViewModel.js +1 -1
  554. package/widgets/smartMapping/SmartMappingSliderViewModel.js +1 -1
  555. package/widgets/support/ContingentValuesManager.js +1 -1
  556. package/widgets/support/PluginSettingsControls.js +2 -0
  557. package/widgets/support/SnappingControls.js +1 -1
  558. package/widgets/support/forms/formUtils.js +1 -1
  559. package/widgets/types.d.ts +1 -1
  560. package/analysis/ElevationProfile/elevationProfileLineTypes.js +0 -2
  561. package/assets/esri/core/workers/chunks/003476e950bd27a2f884.js +0 -596
  562. package/assets/esri/core/workers/chunks/07aca5ecad659d55e795.js +0 -2
  563. package/assets/esri/core/workers/chunks/07eff82916681fcff069.js +0 -1
  564. package/assets/esri/core/workers/chunks/0b1454a77a6a682541dc.js +0 -2
  565. package/assets/esri/core/workers/chunks/3697e51e1e4cf442f39a.js +0 -1
  566. package/assets/esri/core/workers/chunks/3cce9dad8ee0e4971d50.js +0 -1
  567. package/assets/esri/core/workers/chunks/68a313155ddc29bd024d.js +0 -1
  568. package/assets/esri/core/workers/chunks/751609831b283903ba48.js +0 -1
  569. package/assets/esri/core/workers/chunks/7540f7df86620f067b5a.js +0 -1
  570. package/assets/esri/core/workers/chunks/76e34f81bb4a7b0e694c.js +0 -1
  571. package/assets/esri/core/workers/chunks/7bacdd65a6cc4d284e0a.js +0 -2
  572. package/assets/esri/core/workers/chunks/7e97684e851274efd11f.js +0 -1
  573. package/assets/esri/core/workers/chunks/85aac8539996372f1ee8.js +0 -1
  574. package/assets/esri/core/workers/chunks/99c161fecae710b53b40.js +0 -1
  575. package/assets/esri/core/workers/chunks/99d298d0039c536fcf3e.js +0 -1
  576. package/assets/esri/core/workers/chunks/9aaf78b831f8739bc127.js +0 -1
  577. package/assets/esri/core/workers/chunks/bfe575da727ce7c8d331.js +0 -2
  578. package/assets/esri/core/workers/chunks/cb45e5d4a4ef82cda583.js +0 -1
  579. package/assets/esri/core/workers/chunks/e262c4864dc06c43b380.js +0 -1
  580. package/assets/esri/core/workers/chunks/ea59b81299acaf0d85ee.js +0 -1
  581. package/assets/esri/core/workers/chunks/ef0eae13408cbf83a64f.js +0 -1
  582. package/assets/esri/core/workers/chunks/f09a41ad239d467d9438.js +0 -2
  583. package/assets/esri/core/workers/chunks/f6912532aae1638cbe8f.js +0 -1
  584. package/rest/networks/unitIdentifiers/insertGap.js +0 -2
  585. package/rest/networks/unitIdentifiers/support/InsertGapParameters.js +0 -2
  586. /package/assets/esri/core/workers/chunks/{7bacdd65a6cc4d284e0a.js.LICENSE.txt → 10408183681fd6c7b4ed.js.LICENSE.txt} +0 -0
  587. /package/assets/esri/core/workers/chunks/{f09a41ad239d467d9438.js.LICENSE.txt → 5818f1f526577068d6ca.js.LICENSE.txt} +0 -0
  588. /package/assets/esri/core/workers/chunks/{bfe575da727ce7c8d331.js.LICENSE.txt → 7cdd0492b2191df95102.js.LICENSE.txt} +0 -0
  589. /package/assets/esri/core/workers/chunks/{07aca5ecad659d55e795.js.LICENSE.txt → dacc2e5fa462495ed1cc.js.LICENSE.txt} +0 -0
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{deg2rad as r}from"../../../../core/mathUtils.js";import{property as o,subclass as i}from"../../../../core/accessorSupport/decorators.js";import{create as s}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{sub as n,normalize as p,cross as a,negate as l,add as c,scale as h}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as d,fromValues as u,fromArray as f}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import v from"../../../../geometry/Point.js";import{rotateBy as g}from"./viewshedToolUtils.js";var S;let R=S=class extends t{constructor(e){super(e),this.observerRenderSpaceOverride=null,this.needUpdateByFeature=!1}get observer(){return this.viewshed.observer??new v}get effectiveObserverRenderSpace(){return this.observerRenderSpaceOverride??this.observerRenderSpace}get effectiveObserver(){return this.renderSpaceToPoint(this.effectiveObserverRenderSpace,this.observer.spatialReference)}get effectiveTargetRenderSpace(){return this._computeTargetRenderSpace(this.effectiveObserverRenderSpace)}get farDistance(){return this.viewshed.farDistance}get farDistanceRenderSpace(){return this.farDistance/this.metersPerUnit}get heading(){return this.viewshed.heading}get tilt(){return this.viewshed.tilt}get feature(){return this.viewshed.feature}get tiltParallelToSurface(){return this.tilt-90}get horizontalFieldOfView(){return this.viewshed.horizontalFieldOfView}get verticalFieldOfView(){return this.viewshed.verticalFieldOfView}get observerRenderSpace(){return this._pointToRenderSpace(this.observer,d())}get target(){const e=this.targetRenderSpace;return this.renderSpaceToPoint(e,this.observer.spatialReference)}get targetRenderSpace(){return this._computeTargetRenderSpace(this.observerRenderSpace)}get targetDirection(){const e=n(d(),this.targetRenderSpace,this.observerRenderSpace);return p(e,e)}get tiltedUpVector(){const e=g(d(),this.upVector,-r(this.tiltParallelToSurface),this.leftVector);return p(e,e)}get _basis(){return this.renderCoordsHelper.basisMatrixAtPosition(this.observerRenderSpace,s())}get upVector(){const e=this._basis;return u(e[8],e[9],e[10])}get northVector(){const e=this._basis;return u(e[4],e[5],e[6])}get leftVector(){const e=this.upVector,t=g(d(),this.northVector,-r(this.heading),e);return a(t,e,t)}get rightVector(){return l(d(),this.leftVector)}clone(){return new S({renderCoordsHelper:this.renderCoordsHelper,viewshed:this.viewshed.clone()})}get valid(){return this.viewshed.valid}get metersPerUnit(){return this.renderCoordsHelper.spatialReference.metersPerUnit}pointOnSphere(e,t,o){const{observerRenderSpace:i,targetRenderSpace:s}=this,p=n(m,s,i);return g(p,p,-r(t),this.leftVector),g(p,p,-r(e),this.tiltedUpVector),c(o,p,i)}cornerPoints(e){const t=this.horizontalFieldOfView/2,r=this.verticalFieldOfView/2;this.pointOnSphere(-t,r,e.topLeft),this.pointOnSphere(t,r,e.topRight),this.pointOnSphere(-t,-r,e.bottomLeft),this.pointOnSphere(t,-r,e.bottomRight)}arcCentersPoints(e){const t=this.horizontalFieldOfView/2,r=this.verticalFieldOfView/2;this.pointOnSphere(0,r,e.top),this.pointOnSphere(0,-r,e.bottom),this.pointOnSphere(-t,0,e.left),this.pointOnSphere(t,0,e.right)}parallelCenterPoints(e){const t=this.observerRenderSpace,o=this.farDistanceRenderSpace*Math.sin(r(this.verticalFieldOfView/2)),i=h(m,this.tiltedUpVector,o);c(e.top,t,i),n(e.bottom,t,i)}renderSpaceToPoint(e,t){const r=m;return this.renderCoordsHelper.fromRenderCoords(e,r,t),new v(r[0],r[1],r[2],t)}_pointToRenderSpace(e,t){const r=f(e.toArray());return this.renderCoordsHelper.toRenderCoords(r,e.spatialReference,t),t}_computeTargetRenderSpace(e){const{leftVector:t,northVector:o,upVector:i}=this,s=this.farDistanceRenderSpace,n=d();return h(n,o,s),g(n,n,-r(this.heading),i),g(n,n,-r(this.tiltParallelToSurface),t),c(n,e,n),n}};e([o()],R.prototype,"renderCoordsHelper",void 0),e([o()],R.prototype,"viewshed",void 0),e([o()],R.prototype,"observerRenderSpaceOverride",void 0),e([o()],R.prototype,"needUpdateByFeature",void 0),e([o()],R.prototype,"observer",null),e([o()],R.prototype,"effectiveObserverRenderSpace",null),e([o()],R.prototype,"effectiveObserver",null),e([o()],R.prototype,"effectiveTargetRenderSpace",null),e([o()],R.prototype,"farDistance",null),e([o()],R.prototype,"farDistanceRenderSpace",null),e([o()],R.prototype,"heading",null),e([o()],R.prototype,"tilt",null),e([o()],R.prototype,"feature",null),e([o()],R.prototype,"tiltParallelToSurface",null),e([o()],R.prototype,"horizontalFieldOfView",null),e([o()],R.prototype,"verticalFieldOfView",null),e([o()],R.prototype,"observerRenderSpace",null),e([o()],R.prototype,"target",null),e([o()],R.prototype,"targetRenderSpace",null),e([o()],R.prototype,"targetDirection",null),e([o()],R.prototype,"tiltedUpVector",null),e([o()],R.prototype,"_basis",null),e([o()],R.prototype,"upVector",null),e([o()],R.prototype,"northVector",null),e([o()],R.prototype,"leftVector",null),e([o()],R.prototype,"rightVector",null),e([o()],R.prototype,"valid",null),e([o()],R.prototype,"metersPerUnit",null),R=S=e([i("esri.views.3d.analysis.Viewshed.ViewshedComputedData")],R);const m=d();export{R as ViewshedComputedData};
2
+ import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{deg2rad as r}from"../../../../core/mathUtils.js";import{property as i,subclass as o}from"../../../../core/accessorSupport/decorators.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{sub as s,normalize as l,cross as p,negate as a,add as c,scale as h}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as d,fromValues as v,fromArray as u}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import f from"../../../../geometry/Point.js";import{zValueInAbsoluteHeightMode as g,getGeometryEffectiveElevationInfo as S}from"../../../../support/elevationInfoUtils.js";import{rotateBy as R}from"./viewshedToolUtils.js";var b;let m=b=class extends t{constructor(e){super(e),this.observerRenderSpaceOverride=null}get elevationAlignedObserver(){const{observer:e,view:t}=this,{x:r,y:i,z:o,spatialReference:n}=e,{absoluteZ:s}=g(r,i,o??0,n,t,this._effectiveElevationInfo),l=e.clone();return l.z=s,l}get observer(){return this.viewshed.observer??new f}get effectiveObserverRenderSpace(){return this.observerRenderSpaceOverride??this.elevationAlignedObserverRenderSpace}get effectiveObserver(){return this.renderSpaceToPoint(this.effectiveObserverRenderSpace,this.observer.spatialReference)}get effectiveTargetRenderSpace(){return this._computeTargetRenderSpace(this.effectiveObserverRenderSpace)}get farDistance(){return this.viewshed.farDistance}get farDistanceRenderSpace(){return this.farDistance/this.metersPerUnit}get heading(){return this.viewshed.heading}get tilt(){return this.viewshed.tilt}get feature(){return this.viewshed.feature}get tiltParallelToSurface(){return this.tilt-90}get horizontalFieldOfView(){return this.viewshed.horizontalFieldOfView}get verticalFieldOfView(){return this.viewshed.verticalFieldOfView}get observerRenderSpace(){return this._pointToRenderSpace(this.observer,d())}get elevationAlignedObserverRenderSpace(){return this._pointToRenderSpace(this.elevationAlignedObserver,d())}get target(){const e=this.targetRenderSpace;return this.renderSpaceToPoint(e,this.observer.spatialReference)}get targetRenderSpace(){return this._computeTargetRenderSpace(this.observerRenderSpace)}get elevationAlignedTargetRenderSpace(){return this._computeTargetRenderSpace(this.elevationAlignedObserverRenderSpace)}get targetDirection(){const e=s(d(),this.elevationAlignedTargetRenderSpace,this.elevationAlignedObserverRenderSpace);return l(e,e)}get tiltedUpVector(){const e=R(d(),this.upVector,-r(this.tiltParallelToSurface),this.leftVector);return l(e,e)}get renderCoordsHelper(){return this.view.renderCoordsHelper}get _basis(){return this.renderCoordsHelper.basisMatrixAtPosition(this.elevationAlignedObserverRenderSpace,n())}get _effectiveElevationInfo(){return S(this.viewshed.observer,this.viewshed.elevationInfo)}get upVector(){const e=this._basis;return v(e[8],e[9],e[10])}get northVector(){const e=this._basis;return v(e[4],e[5],e[6])}get leftVector(){const e=this.upVector,t=R(d(),this.northVector,-r(this.heading),e);return p(t,e,t)}get rightVector(){return a(d(),this.leftVector)}clone(){return new b({view:this.view,viewshed:this.viewshed.clone()})}get valid(){return this.viewshed.valid}get metersPerUnit(){return this.renderCoordsHelper.spatialReference.metersPerUnit}pointOnSphere(e,t,i){const{elevationAlignedObserverRenderSpace:o,elevationAlignedTargetRenderSpace:n}=this,l=s(O,n,o);return R(l,l,-r(t),this.leftVector),R(l,l,-r(e),this.tiltedUpVector),c(i,l,o)}cornerPoints(e){const t=this.horizontalFieldOfView/2,r=this.verticalFieldOfView/2;this.pointOnSphere(-t,r,e.topLeft),this.pointOnSphere(t,r,e.topRight),this.pointOnSphere(-t,-r,e.bottomLeft),this.pointOnSphere(t,-r,e.bottomRight)}arcCentersPoints(e){const t=this.horizontalFieldOfView/2,r=this.verticalFieldOfView/2;this.pointOnSphere(0,r,e.top),this.pointOnSphere(0,-r,e.bottom),this.pointOnSphere(-t,0,e.left),this.pointOnSphere(t,0,e.right)}parallelCenterPoints(e){const t=this.elevationAlignedObserverRenderSpace,i=this.farDistanceRenderSpace*Math.sin(r(this.verticalFieldOfView/2)),o=h(O,this.tiltedUpVector,i);c(e.top,t,o),s(e.bottom,t,o)}renderSpaceToPoint(e,t){const r=O;return this.renderCoordsHelper.fromRenderCoords(e,r,t),new f(r[0],r[1],r[2],t)}onElevationChange(){this.notifyChange("elevationAlignedObserver")}_pointToRenderSpace(e,t){const r=u(e.toArray());return this.renderCoordsHelper.toRenderCoords(r,e.spatialReference,t),t}_computeTargetRenderSpace(e){const{leftVector:t,northVector:i,upVector:o}=this,n=this.farDistanceRenderSpace,s=d();return h(s,i,n),R(s,s,-r(this.heading),o),R(s,s,-r(this.tiltParallelToSurface),t),c(s,e,s),s}};e([i()],m.prototype,"view",void 0),e([i()],m.prototype,"viewshed",void 0),e([i()],m.prototype,"observerRenderSpaceOverride",void 0),e([i()],m.prototype,"elevationAlignedObserver",null),e([i()],m.prototype,"observer",null),e([i()],m.prototype,"effectiveObserverRenderSpace",null),e([i()],m.prototype,"effectiveObserver",null),e([i()],m.prototype,"effectiveTargetRenderSpace",null),e([i()],m.prototype,"farDistance",null),e([i()],m.prototype,"farDistanceRenderSpace",null),e([i()],m.prototype,"heading",null),e([i()],m.prototype,"tilt",null),e([i()],m.prototype,"feature",null),e([i()],m.prototype,"tiltParallelToSurface",null),e([i()],m.prototype,"horizontalFieldOfView",null),e([i()],m.prototype,"verticalFieldOfView",null),e([i()],m.prototype,"observerRenderSpace",null),e([i()],m.prototype,"elevationAlignedObserverRenderSpace",null),e([i()],m.prototype,"target",null),e([i()],m.prototype,"targetRenderSpace",null),e([i()],m.prototype,"elevationAlignedTargetRenderSpace",null),e([i()],m.prototype,"targetDirection",null),e([i()],m.prototype,"tiltedUpVector",null),e([i()],m.prototype,"renderCoordsHelper",null),e([i()],m.prototype,"_basis",null),e([i()],m.prototype,"_effectiveElevationInfo",null),e([i()],m.prototype,"upVector",null),e([i()],m.prototype,"northVector",null),e([i()],m.prototype,"leftVector",null),e([i()],m.prototype,"rightVector",null),e([i()],m.prototype,"valid",null),e([i()],m.prototype,"metersPerUnit",null),m=b=e([o("esri.views.3d.analysis.Viewshed.ViewshedComputedData")],m);const O=d();export{m as ViewshedComputedData};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import e from"../../../../Color.js";import{deg2rad as i}from"../../../../core/mathUtils.js";import{fromValues as t}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";const r=2,s=4,o=i(2),c=1.5;class n{constructor(){this.collisionRadius=5,this.fovUnfocusedArcWidth=s,this.fovFocusedArcWidth=r*this.fovUnfocusedArcWidth,this.scaleOrientSize=90,this.scaleOrientHandleRadius=.025,this.scaleOrientMinDistance=1,this.scaleOrientArrowTipLength=.3,this.scaleOrientArrowTipFocusMultiplier=r/1.5,this.observerSize=5,this.hoverTimeoutMilliseconds=1e3,this.viewAngleThreshold=10}getFovArcWidth(e){return e?this.fovFocusedArcWidth:this.fovUnfocusedArcWidth}getScaleOrientArrowTipLength(e){return this.scaleOrientArrowTipLength*(e?this.scaleOrientArrowTipFocusMultiplier:1)}}const h=new n;class l{constructor(){this.frameWidthNotSelected=.3,this.frameWidthSelected=1,this.frameColor=new e([255,255,255,.99]),this.observerPointConfiguration={size:6,pixelSnappingEnabled:!1,primitive:"circle",elevationInfo:{mode:"absolute-height",offset:0},outlineSize:0,color:new e([3,252,111,1]).toUnitRGBA()},this.shapeMaterialParameters={color:t(.33,.33,.33,.25),renderOccluded:1,cullFace:2,writeDepth:!1}}}const a=new l;export{o as arcAnglePerSegment,c as creationVerticalOffset,h as viewshedToolManipulatorConfiguration,a as viewshedVisualizationConfiguration};
2
+ import e from"../../../../Color.js";import{deg2rad as t}from"../../../../core/mathUtils.js";import{fromValues as i}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import o from"../../../../symbols/support/ElevationInfo.js";const r=2,s=4,c=t(2),n=new o({mode:"absolute-height",offset:1.5});class l{constructor(){this.collisionRadius=5,this.fovUnfocusedArcWidth=s,this.fovFocusedArcWidth=r*this.fovUnfocusedArcWidth,this.scaleOrientSize=90,this.scaleOrientHandleRadius=.025,this.scaleOrientMinDistance=1,this.scaleOrientArrowTipLength=.3,this.scaleOrientArrowTipFocusMultiplier=r/1.5,this.observerSize=5,this.hoverTimeoutMilliseconds=1e3,this.viewAngleThreshold=10}getFovArcWidth(e){return e?this.fovFocusedArcWidth:this.fovUnfocusedArcWidth}getScaleOrientArrowTipLength(e){return this.scaleOrientArrowTipLength*(e?this.scaleOrientArrowTipFocusMultiplier:1)}}const h=new l;class a{constructor(){this.frameWidthNotSelected=.3,this.frameWidthSelected=1,this.frameColor=new e([255,255,255,.99]),this.observerPointConfiguration={size:6,pixelSnappingEnabled:!1,primitive:"circle",elevationInfo:{mode:"absolute-height",offset:0},outlineSize:0,color:new e([3,252,111,1]).toUnitRGBA()},this.shapeMaterialParameters={color:i(.33,.33,.33,.25),renderOccluded:1,cullFace:2,writeDepth:!1}}}const d=new a;export{c as arcAnglePerSegment,n as creationElevationInfo,h as viewshedToolManipulatorConfiguration,d as viewshedVisualizationConfiguration};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import t from"../../../../core/Handles.js";import{handlesGroup as r}from"../../../../core/handleUtils.js";import{deg2rad as e,clamp as i}from"../../../../core/mathUtils.js";import{destroyMaybe as a}from"../../../../core/maybe.js";import{watch as o,initial as n}from"../../../../core/reactiveUtils.js";import{fromYRotation as s,fromXRotation as l,fromScaling as c,fromZRotation as u,fromRotation as p,multiply as m}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as h}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as d,sub as f,scale as _}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as g,fromValues as M}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{f as b}from"../../../../chunks/boundedPlane.js";import{viewshedToolManipulatorConfiguration as v}from"./ViewshedConfiguration.js";import{getViewshedRotationMatrix as j,screenToCircleAngle as w}from"./viewshedToolUtils.js";import{Manipulator3D as A}from"../../interactive/Manipulator3D.js";import{RenderObject as V}from"../../interactive/RenderObject.js";import{InteractiveManipulation as O}from"../../interactive/editingTools/manipulations/InteractiveManipulation.js";import{createPolylineGeometry as E}from"../../webgl-engine/lib/GeometryUtil.js";import{assert as y}from"../../webgl-engine/lib/Util.js";import{RibbonLineMaterial as R}from"../../webgl-engine/materials/RibbonLineMaterial.js";import{createManipulatorDragEventPipeline as T}from"../../../interactive/dragEventPipeline.js";class U extends O{constructor(r){super(),this._handles=new t,this._tool=r.tool,this._view=r.view,this._focusedArcMaterial=this._createArcMaterial(!0),this._unfocusedArcMaterial=this._createArcMaterial(!1),this._createManipulators(),this.forEachManipulator(t=>this._tool.manipulators.add(t))}destroy(){this._handles=a(this._handles),this.forEachManipulator(t=>{this._tool.manipulators.remove(t),t.destroy()}),this._tool=null,this._view=null,this._manipulators=null}createDragPipeline(t,e){const i=Object.values(this._manipulators);return r(i.map(({manipulator:r,side:i})=>T(r,(r,a,o,n,s)=>{const l=G(i,e),c=a.next(t=>({...t,manipulatorType:2,side:i})),u=w(c,this._view,l,e);t(r,u,o)})))}updateManipulatorsTransform(t){t.arcCentersPoints(B),this._forEachManipulatorInfo(r=>this._updateArcManipulatorTransform(r,t,B[r.side]))}updateManipulatorVisuals(t){this._forEachManipulatorInfo(r=>this._updateArcManipulatorVisuals(r,t))}_updateArcManipulatorVisuals({manipulator:t,side:r},e){const i=[];if(null!=e){const[a,o]=x(r,e,this._unfocusedArcMaterial);i.push(new V(a,1),new V(a.instantiate({material:this._focusedArcMaterial}),2)),t.collisionType={type:"line",paths:[o]}}t.renderObjects=i,t.radius=v.collisionRadius}_updateArcManipulatorTransform({manipulator:t,side:r},i,a){const o=i.horizontalFieldOfView,n=e(i.verticalFieldOfView/2),f=e(o/2),_=F(r);t.renderLocation=a;const g=h(),M=t=>{m(g,t,g)};M(s(C,e(-90))),_||M(l(C,n));const b=i.farDistanceRenderSpace;let v,w;M(c(C,d(L,b,b,b))),M(u(C,D(r))),M(j(i,C)),_?(v=f,w=i.tiltedUpVector):(w=i.rightVector,v=n),v*="right"===r||"bottom"===r?-1:1;const A=p(C,v,w);null!=A&&M(A),t.modelTransform=g}_createManipulators(){const t=this._createArcManipulator("left"),r=this._createArcManipulator("right"),e=this._createArcManipulator("top"),i=this._createArcManipulator("bottom");this._manipulators={left:t,right:r,top:e,bottom:i};[[i.manipulator,e.manipulator],[t.manipulator,r.manipulator]].forEach(([t,r])=>{t.metadata={pairedManipulator:r},r.metadata={pairedManipulator:t}})}_createArcManipulator(t){const r=new A({view:this._view,autoScaleRenderObjects:!1,worldSized:!0}),e={manipulator:r,side:t};return this._updateArcManipulatorVisuals(e),this._handles.add(r.events.on(["focus-changed","grab-changed"],t=>{const e=r.metadata?.pairedManipulator;null!=e&&(e.hovering!==r.hovering&&(e.hovering=r.hovering),e.grabbing!==r.grabbing&&(e.grabbing=r.grabbing))})),e}_createArcMaterial(t){const r=v.getFovArcWidth(t),e=new R({renderOccluded:4,isDecoration:!0,width:r},this._view.state.isGlobal);return this._handles.add(o(()=>this._view.effectiveTheme.accentColor.toUnitRGBA(),t=>e.setParameters({color:t}),n)),e}forEachManipulator(t){Object.values(this._manipulators).forEach(({manipulator:r})=>t(r,2))}_forEachManipulatorInfo(t){Object.values(this._manipulators).forEach(r=>t(r))}get test(){return{manipulators:this._manipulators}}}function x(t,r,a){const{horizontalFieldOfView:o,verticalFieldOfView:n}=r,s=F(t),l=e(i((s?n:o)/2,0,15)),c=P(-l/2,l/2,s?1:Math.max(Math.sin(e(90-n/2)),.1));return[E(a,c),c]}function P(t,r,e,i=10){y(i>1,"createArcPolylineGeometry() needs at least 2 for numVertices");const a=r-t;if(a<=0||e<=0){const t=.01;return[M(0,0,t),M(0,0,-t)]}const o=[],n=a/i;for(let s=0;s<i;s++){let a=t+s*n;s===i-1&&(a=r);const l=Math.cos(a)*e,c=Math.sin(a)*e,u=M(l-e,0,c);o.push(u)}return o}function S(t){switch(t){case"left":return 0;case"bottom":return 1;case"right":return 2;case"top":return 3}}function D(t){return S(t)*z}function F(t){return"left"===t||"right"===t}function I(t){return"left"===t?"right":"right"===t?"left":"top"===t?"bottom":"top"}function G(t,{observerRenderSpace:r,targetRenderSpace:e,tiltedUpVector:i,rightVector:a,farDistanceRenderSpace:o}){const n=f(L,e,r),s=F(t)?a:i,l=_(k,s,o);return b(r,n,l)}const z=Math.PI/2,C=h(),L=g(),k=g(),B={top:g(),bottom:g(),left:g(),right:g()};export{U as ViewshedFieldOfViewManipulation,P as createArcPolylineVertices,I as flipSide,F as isSideHorizontal,D as sideToRad};
2
+ import t from"../../../../core/Handles.js";import{handlesGroup as e}from"../../../../core/handleUtils.js";import{deg2rad as r,clamp as i}from"../../../../core/mathUtils.js";import{destroyMaybe as a}from"../../../../core/maybe.js";import{watch as o,initial as n}from"../../../../core/reactiveUtils.js";import{fromYRotation as s,fromXRotation as l,fromScaling as c,fromZRotation as u,fromRotation as p,multiply as m}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as h}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as d,sub as f,scale as g}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as _,fromValues as M}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{f as b}from"../../../../chunks/boundedPlane.js";import{viewshedToolManipulatorConfiguration as v}from"./ViewshedConfiguration.js";import{getViewshedRotationMatrix as j,screenToCircleAngle as w}from"./viewshedToolUtils.js";import{Manipulator3D as A}from"../../interactive/Manipulator3D.js";import{RenderObject as V}from"../../interactive/RenderObject.js";import{InteractiveManipulation as O}from"../../interactive/editingTools/manipulations/InteractiveManipulation.js";import{createPolylineGeometry as E}from"../../webgl-engine/lib/GeometryUtil.js";import{assert as T}from"../../webgl-engine/lib/Util.js";import{RibbonLineMaterial as y}from"../../webgl-engine/materials/RibbonLineMaterial.js";import{createManipulatorDragEventPipeline as R}from"../../../interactive/dragEventPipeline.js";class U extends O{constructor(e){super(),this._handles=new t,this._tool=e.tool,this._view=e.view,this._focusedArcMaterial=this._createArcMaterial(!0),this._unfocusedArcMaterial=this._createArcMaterial(!1),this._createManipulators(),this.forEachManipulator(t=>this._tool.manipulators.add(t))}destroy(){this._handles=a(this._handles),this.forEachManipulator(t=>{this._tool.manipulators.remove(t),t.destroy()}),this._tool=null,this._view=null,this._manipulators=null}createDragPipeline(t,r){const i=Object.values(this._manipulators);return e(i.map(({manipulator:e,side:i})=>R(e,(e,a,o,n,s)=>{const l=G(i,r),c=a.next(t=>({...t,manipulatorType:2,side:i})),u=w(c,this._view,l,r);t(e,u,o)})))}updateManipulatorsTransform(t){t.arcCentersPoints(B),this._forEachManipulatorInfo(e=>this._updateArcManipulatorTransform(e,t,B[e.side]))}updateManipulatorVisuals(t){this._forEachManipulatorInfo(e=>this._updateArcManipulatorVisuals(e,t))}_updateArcManipulatorVisuals({manipulator:t,side:e},r){const i=[];if(null!=r){const[a,o]=x(e,r,this._unfocusedArcMaterial);i.push(new V(a,1),new V(a.instantiate({material:this._focusedArcMaterial}),2)),t.collisionType={type:"line",paths:[o]}}t.renderObjects=i,t.radius=v.collisionRadius}_updateArcManipulatorTransform({manipulator:t,side:e},i,a){const o=i.horizontalFieldOfView,n=r(i.verticalFieldOfView/2),f=r(o/2),g=F(e);t.renderLocation=a;const _=h(),M=t=>{m(_,t,_)};M(s(C,r(-90))),g||M(l(C,n));const b=i.farDistanceRenderSpace;let v,w;M(c(C,d(L,b,b,b))),M(u(C,D(e))),M(j(i,C)),g?(v=f,w=i.tiltedUpVector):(w=i.rightVector,v=n),v*="right"===e||"bottom"===e?-1:1;const A=p(C,v,w);null!=A&&M(A),t.modelTransform=_}_createManipulators(){const t=this._createArcManipulator("left"),e=this._createArcManipulator("right"),r=this._createArcManipulator("top"),i=this._createArcManipulator("bottom");this._manipulators={left:t,right:e,top:r,bottom:i};[[i.manipulator,r.manipulator],[t.manipulator,e.manipulator]].forEach(([t,e])=>{t.metadata={pairedManipulator:e},e.metadata={pairedManipulator:t}})}_createArcManipulator(t){const e=new A({view:this._view,autoScaleRenderObjects:!1,worldSized:!0}),r={manipulator:e,side:t};return this._updateArcManipulatorVisuals(r),this._handles.add(e.events.on(["focus-changed","grab-changed"],t=>{const r=e.metadata?.pairedManipulator;null!=r&&(r.hovering!==e.hovering&&(r.hovering=e.hovering),r.grabbing!==e.grabbing&&(r.grabbing=e.grabbing))})),r}_createArcMaterial(t){const e=v.getFovArcWidth(t),r=new y({renderOccluded:4,isDecoration:!0,width:e},this._view.state.isGlobal);return this._handles.add(o(()=>this._view.effectiveTheme.accentColor.toUnitRGBA(),t=>r.setParameters({color:t}),n)),r}forEachManipulator(t){Object.values(this._manipulators).forEach(({manipulator:e})=>t(e,2))}_forEachManipulatorInfo(t){Object.values(this._manipulators).forEach(e=>t(e))}get test(){return{manipulators:this._manipulators}}}function x(t,e,a){const{horizontalFieldOfView:o,verticalFieldOfView:n}=e,s=F(t),l=r(i((s?n:o)/2,0,15)),c=P(-l/2,l/2,s?1:Math.max(Math.sin(r(90-n/2)),.1));return[E(a,c),c]}function P(t,e,r,i=10){T(i>1,"createArcPolylineGeometry() needs at least 2 for numVertices");const a=e-t;if(a<=0||r<=0){const t=.01;return[M(0,0,t),M(0,0,-t)]}const o=[],n=a/i;for(let s=0;s<i;s++){let a=t+s*n;s===i-1&&(a=e);const l=Math.cos(a)*r,c=Math.sin(a)*r,u=M(l-r,0,c);o.push(u)}return o}function S(t){switch(t){case"left":return 0;case"bottom":return 1;case"right":return 2;case"top":return 3}}function D(t){return S(t)*z}function F(t){return"left"===t||"right"===t}function I(t){return"left"===t?"right":"right"===t?"left":"top"===t?"bottom":"top"}function G(t,e){const{elevationAlignedObserverRenderSpace:r,elevationAlignedTargetRenderSpace:i,tiltedUpVector:a,rightVector:o,farDistanceRenderSpace:n}=e,s=f(L,i,r),l=F(t)?o:a,c=g(k,l,n);return b(r,s,c)}const z=Math.PI/2,C=h(),L=_(),k=_(),B={top:_(),bottom:_(),left:_(),right:_()};export{U as ViewshedFieldOfViewManipulation,P as createArcPolylineVertices,I as flipSide,F as isSideHorizontal,D as sideToRad};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import t from"../../../../core/Handles.js";import{deg2rad as i}from"../../../../core/mathUtils.js";import{fromScaling as e,fromTranslation as r,fromZRotation as a,mul as o,fromYRotation as n,multiply as s}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as l}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as m,scale as c,add as p,sub as u,len as h,dot as d,scaleAndAdd as f,normalize as _}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as g}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{f as v}from"../../../../chunks/boundedPlane.js";import{fromValues as T}from"../../../../geometry/support/ray.js";import{displayFocusMultiplier as w}from"../Slice/sliceToolConfig.js";import{ViewshedArrowManipulator as j}from"./ViewshedArrowManipulator.js";import{viewshedToolManipulatorConfiguration as D}from"./ViewshedConfiguration.js";import{getViewshedRotationMatrix as x,screenToCircleAngle as H}from"./viewshedToolUtils.js";import{screenToRenderRay as S}from"../../interactive/editingTools/dragEventPipeline3D.js";import{discRadiusSmall as M,discRadius as P}from"../../interactive/editingTools/manipulations/config.js";import{InteractiveManipulation as R}from"../../interactive/editingTools/manipulations/InteractiveManipulation.js";import{createManipulatorDragEventPipeline as b,dragAtLocation as y}from"../../../interactive/dragEventPipeline.js";class V extends R{constructor(i){super(),this._handles=new t,this._tool=i.tool,this._view=i.view;const e=D.scaleOrientHandleRadius;this._manipulatorHeading=new j(this._view,e),this._manipulatorTilt=new j(this._view,e),this._manipulatorDistance=new j(this._view,e),this.forEachManipulator(t=>this._tool.manipulators.add(t))}destroy(){this._handles.destroy(),this.forEachManipulator(t=>{this._tool.manipulators.remove(t),t.destroy()}),this._manipulatorHeading=null,this._manipulatorTilt=null,this._manipulatorDistance=null,this._tool=null,this._view=null}createHeadingDragPipeline(t,e){return b(this._manipulatorHeading,(r,a,o,n,s)=>{const l=this._view,{tiltParallelToSurface:m,farDistanceRenderSpace:d,upVector:f,observerRenderSpace:_,targetRenderSpace:g,rightVector:T}=e,w=Math.sin(i(m))*d,j=p(L,_,c(O,f,w)),D=u(O,g,j),x=c(C,T,h(D)),S=v(j,D,x),M=H(a,l,S,e).next(t=>({...t,manipulatorType:3}));t(r,M,o)})}createTiltDragPipeline(t,i){return b(this._manipulatorTilt,(e,r,a,o,n)=>{const{observerRenderSpace:s,farDistanceRenderSpace:l,upVector:m,targetDirection:p}=i,u=d(p,m),h=f(L,p,m,-u);c(h,_(h,h),l);const g=c(O,m,l),T=v(s,h,g),w=H(r,this._view,T,i).next(t=>({...t,manipulatorType:3}));t(e,w,a)})}createDistanceDragPipeline(t,i){return b(this._manipulatorDistance,(e,r,a,o,n)=>{const s=T(i.observerRenderSpace,i.targetDirection),l=r.next(y(this._view,e.location)).next(S(this._view,s)).next(t=>({...t,manipulatorType:2}));t(e,l,a)})}updateManipulators(t){const{targetRenderSpace:i}=t;this._manipulatorHeading.renderLocation=i,this._manipulatorTilt.renderLocation=i,this._manipulatorDistance.renderLocation=i;const p=l(),u=t=>{s(p,t,p)},h=D.scaleOrientSize*(M/P);u(e(E,m(L,h,h,h))),u(x(t,E));const d=D.scaleOrientHandleRadius*w*h,f=c(L,t.targetDirection,d);u(r(E,f));const _=a(E,-U);o(_,_,n(I,-U)),this._manipulatorHeading.modelTransform=o(l(),p,_);const g=n(E,U);o(g,g,a(I,Math.PI)),this._manipulatorTilt.modelTransform=s(l(),p,g),this._manipulatorDistance.modelTransform=p}forEachManipulator(t){t(this._manipulatorHeading,3),t(this._manipulatorTilt,3),t(this._manipulatorDistance,2)}}const E=l(),I=l(),L=g(),O=g(),C=g(),U=Math.PI/2;export{V as ViewshedScaleOrientManipulation};
2
+ import t from"../../../../core/Handles.js";import{deg2rad as i}from"../../../../core/mathUtils.js";import{fromScaling as e,fromTranslation as a,fromZRotation as r,mul as o,fromYRotation as n,multiply as s}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as l}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as m,scale as c,add as p,sub as u,len as h,dot as d,scaleAndAdd as f,normalize as g}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as _}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{f as v}from"../../../../chunks/boundedPlane.js";import{fromValues as T}from"../../../../geometry/support/ray.js";import{displayFocusMultiplier as w}from"../Slice/sliceToolConfig.js";import{ViewshedArrowManipulator as j}from"./ViewshedArrowManipulator.js";import{viewshedToolManipulatorConfiguration as D}from"./ViewshedConfiguration.js";import{getViewshedRotationMatrix as x,screenToCircleAngle as H}from"./viewshedToolUtils.js";import{screenToRenderRay as S}from"../../interactive/editingTools/dragEventPipeline3D.js";import{discRadiusSmall as M,discRadius as P}from"../../interactive/editingTools/manipulations/config.js";import{InteractiveManipulation as R}from"../../interactive/editingTools/manipulations/InteractiveManipulation.js";import{createManipulatorDragEventPipeline as b,dragAtLocation as y}from"../../../interactive/dragEventPipeline.js";class A extends R{constructor(i){super(),this._handles=new t,this._tool=i.tool,this._view=i.view;const e=D.scaleOrientHandleRadius;this._manipulatorHeading=new j(this._view,e),this._manipulatorTilt=new j(this._view,e),this._manipulatorDistance=new j(this._view,e),this.forEachManipulator(t=>this._tool.manipulators.add(t))}destroy(){this._handles.destroy(),this.forEachManipulator(t=>{this._tool.manipulators.remove(t),t.destroy()}),this._manipulatorHeading=null,this._manipulatorTilt=null,this._manipulatorDistance=null,this._tool=null,this._view=null}createHeadingDragPipeline(t,e){return b(this._manipulatorHeading,(a,r,o,n,s)=>{const l=this._view,{tiltParallelToSurface:m,farDistanceRenderSpace:d,upVector:f,elevationAlignedObserverRenderSpace:g,elevationAlignedTargetRenderSpace:_,rightVector:T}=e,w=Math.sin(i(m))*d,j=p(E,g,c(I,f,w)),D=u(I,_,j),x=c(L,T,h(D)),S=v(j,D,x),M=H(r,l,S,e).next(t=>({...t,manipulatorType:3}));t(a,M,o)})}createTiltDragPipeline(t,i){return b(this._manipulatorTilt,(e,a,r,o,n)=>{const{elevationAlignedObserverRenderSpace:s,farDistanceRenderSpace:l,upVector:m,targetDirection:p}=i,u=d(p,m),h=f(E,p,m,-u);c(h,g(h,h),l);const _=c(I,m,l),T=v(s,h,_),w=H(a,this._view,T,i).next(t=>({...t,manipulatorType:3}));t(e,w,r)})}createDistanceDragPipeline(t,i){return b(this._manipulatorDistance,(e,a,r,o,n)=>{const s=T(i.elevationAlignedObserverRenderSpace,i.targetDirection),l=a.next(y(this._view,e.location)).next(S(this._view,s)).next(t=>({...t,manipulatorType:2}));t(e,l,r)})}updateManipulators(t){const{elevationAlignedTargetRenderSpace:i}=t;this._manipulatorHeading.renderLocation=i,this._manipulatorTilt.renderLocation=i,this._manipulatorDistance.renderLocation=i;const p=l(),u=t=>{s(p,t,p)},h=D.scaleOrientSize*(M/P);u(e(O,m(E,h,h,h))),u(x(t,O));const d=D.scaleOrientHandleRadius*w*h,f=c(E,t.targetDirection,d);u(a(O,f));const g=r(O,-C);o(g,g,n(V,-C)),this._manipulatorHeading.modelTransform=o(l(),p,g);const _=n(O,C);o(_,_,r(V,Math.PI)),this._manipulatorTilt.modelTransform=s(l(),p,_),this._manipulatorDistance.modelTransform=p}forEachManipulator(t){t(this._manipulatorHeading,3),t(this._manipulatorTilt,3),t(this._manipulatorDistance,2)}}const O=l(),V=l(),E=_(),I=_(),L=_(),C=Math.PI/2;export{A as ViewshedScaleOrientManipulation};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{deg2rad as t}from"../../../../core/mathUtils.js";import{fromScaling as e,mul as r,fromTranslation as o,fromRotation as i}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as s}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as a,copy as n,transformMat4 as l}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{fromValues as m,create as c}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{viewshedVisualizationConfiguration as f,arcAnglePerSegment as h}from"./ViewshedConfiguration.js";import{getViewshedRotationMatrix as p,rotateBy as u}from"./viewshedToolUtils.js";import{Object3DVisualElement as d}from"../../interactive/visualElements/Object3DVisualElement.js";import{Attribute as w}from"../../webgl-engine/lib/Attribute.js";import{Geometry as v}from"../../webgl-engine/lib/Geometry.js";import{ColorMaterial as b}from"../../webgl-engine/materials/ColorMaterial.js";class D extends d{constructor(t){super(t),this._material=null,this._viewshedComputedData=null,this._material=new b({...f.shapeMaterialParameters,isDecoration:this.isDecoration,writeDepth:!1}),this.applyProperties(t)}get viewshedComputedData(){return this._viewshedComputedData}set viewshedComputedData(t){this._viewshedComputedData=t,this.updateTransform()}updateTransform(){const t=this._viewshedComputedData;if(null==t)return;const i=s(),a=t.farDistanceRenderSpace;e(i,m(a,a,a)),p(t,M),r(i,M,i),o(M,this._viewshedComputedData.observerRenderSpace),r(i,M,i),this.transform=i}createExternalResources(){}destroyExternalResources(){}forEachMaterial(t){t(this._material)}createGeometries(t){const{_material:e,viewshedComputedData:r}=this;if(null==r||null==e||!r.valid)return;g(e,r).forEach(e=>t.addGeometry(e))}}function g(e,r){const{horizontalFieldOfView:o,verticalFieldOfView:s}=r,m=a(C,0,0,1),c=a(_,0,1,0),f=a(x,1,0,0);u(m,m,t(s/2),c),u(m,m,t(o/2),f);const p=t=>Math.ceil(Math.abs(t)/h)+1,d=t(o),b=n(E,f),D=p(d),g=j(-d/(D-1)),R=i(M,g,b),V=t(-s),G=p(V),O=j(V/(G-1)),T=n(_,c),F=i(y,t(o)/2,f);l(T,T,F);const N=y,P=[],S=n(x,m);for(let t=0;t<D;t++){i(N,O,T);for(let e=0;e<G;e++){const r=3*(e*D+t);P[r]=S[0],P[r+1]=S[1],P[r+2]=S[2],l(S,S,N)}l(T,T,R),l(m,m,R),n(S,m)}const U=D*G;P[3*U]=0,P[3*U+1]=0,P[3*U+2]=0;const z=[];for(let t=0;t<D-1;t++)for(let e=0;e<G-1;e++){const r=6*(e*(D-1)+t);z[r]=e*D+t,z[r+1]=(e+1)*D+t,z[r+2]=e*D+t+1,z[r+3]=e*D+t+1,z[r+4]=(e+1)*D+t,z[r+5]=(e+1)*D+t+1}const A=[z];if(360!==o&&0!==s){const t=[],e=[];for(let r=0;r<G-1;r++){const o=3*r;t[o]=U,t[o+1]=(r+1)*D,t[o+2]=r*D,e[o]=U,e[o+1]=r*D+D-1,e[o+2]=(r+1)*D+D-1}A.push(t,e)}if(180!==s&&0!==o){const t=[],e=[];for(let r=0;r<D-1;r++){const o=3*r;t[o]=U,t[o+1]=r,t[o+2]=r+1,e[o]=U,e[o+1]=r+(G-1)*D+1,e[o+2]=r+(G-1)*D}A.push(t,e)}return A.map(t=>{const r=[["position",new w(P,t,3,!0)]];return new v(e,r)})}function j(t){return isNaN(t)?1:t}const C=c(),_=c(),x=c(),E=c(),M=s(),y=s();export{D as ViewshedShapeVisualElement};
2
+ import{deg2rad as e}from"../../../../core/mathUtils.js";import{fromScaling as t,mul as r,fromTranslation as i,fromRotation as o}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as s}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as a,copy as n,transformMat4 as l}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{fromValues as m,create as c}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{viewshedVisualizationConfiguration as f,arcAnglePerSegment as h}from"./ViewshedConfiguration.js";import{getViewshedRotationMatrix as p,rotateBy as u}from"./viewshedToolUtils.js";import{Object3DVisualElement as d}from"../../interactive/visualElements/Object3DVisualElement.js";import{Attribute as w}from"../../webgl-engine/lib/Attribute.js";import{Geometry as v}from"../../webgl-engine/lib/Geometry.js";import{ColorMaterial as b}from"../../webgl-engine/materials/ColorMaterial.js";class g extends d{constructor(e){super(e),this._material=null,this._viewshedComputedData=null,this._material=new b({...f.shapeMaterialParameters,isDecoration:this.isDecoration,writeDepth:!1}),this.applyProperties(e)}get viewshedComputedData(){return this._viewshedComputedData}set viewshedComputedData(e){this._viewshedComputedData=e,this.updateTransform()}updateTransform(){const e=this._viewshedComputedData;if(null==e)return;const o=s(),a=e.farDistanceRenderSpace;t(o,m(a,a,a)),p(e,M),r(o,M,o),i(M,this._viewshedComputedData.elevationAlignedObserverRenderSpace),r(o,M,o),this.transform=o}createExternalResources(){}destroyExternalResources(){}forEachMaterial(e){e(this._material)}createGeometries(e){const{_material:t,viewshedComputedData:r}=this;if(null==r||null==t||!r.valid)return;D(t,r).forEach(t=>e.addGeometry(t))}}function D(t,r){const{horizontalFieldOfView:i,verticalFieldOfView:s}=r,m=a(C,0,0,1),c=a(_,0,1,0),f=a(x,1,0,0);u(m,m,e(s/2),c),u(m,m,e(i/2),f);const p=e=>Math.ceil(Math.abs(e)/h)+1,d=e(i),b=n(E,f),g=p(d),D=j(-d/(g-1)),O=o(M,D,b),R=e(-s),V=p(R),G=j(R/(V-1)),T=n(_,c),A=o(y,e(i)/2,f);l(T,T,A);const F=y,N=[],P=n(x,m);for(let e=0;e<g;e++){o(F,G,T);for(let t=0;t<V;t++){const r=3*(t*g+e);N[r]=P[0],N[r+1]=P[1],N[r+2]=P[2],l(P,P,F)}l(T,T,O),l(m,m,O),n(P,m)}const S=g*V;N[3*S]=0,N[3*S+1]=0,N[3*S+2]=0;const U=[];for(let e=0;e<g-1;e++)for(let t=0;t<V-1;t++){const r=6*(t*(g-1)+e);U[r]=t*g+e,U[r+1]=(t+1)*g+e,U[r+2]=t*g+e+1,U[r+3]=t*g+e+1,U[r+4]=(t+1)*g+e,U[r+5]=(t+1)*g+e+1}const z=[U];if(360!==i&&0!==s){const e=[],t=[];for(let r=0;r<V-1;r++){const i=3*r;e[i]=S,e[i+1]=(r+1)*g,e[i+2]=r*g,t[i]=S,t[i+1]=r*g+g-1,t[i+2]=(r+1)*g+g-1}z.push(e,t)}if(180!==s&&0!==i){const e=[],t=[];for(let r=0;r<g-1;r++){const i=3*r;e[i]=S,e[i+1]=r,e[i+2]=r+1,t[i]=S,t[i+1]=r+(V-1)*g+1,t[i+2]=r+(V-1)*g}z.push(e,t)}return z.map(e=>{const r=[["position",new w(N,e,3,!0)]];return new v(t,r)})}function j(e){return isNaN(e)?1:e}const C=c(),_=c(),x=c(),E=c(),M=s(),y=s();export{g as ViewshedShapeVisualElement};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as i}from"tslib";import e from"../../../../core/Accessor.js";import{isSome as t}from"../../../../core/arrayUtils.js";import{createTask as a}from"../../../../core/asyncUtils.js";import{cyclicalDegrees as o,Cyclical as n}from"../../../../core/Cyclical.js";import{handlesGroup as r}from"../../../../core/handleUtils.js";import"../../../../core/has.js";import{deg2rad as s}from"../../../../core/mathUtils.js";import{abortMaybe as l,destroyMaybe as p}from"../../../../core/maybe.js";import{after as h,throwIfAborted as u}from"../../../../core/promiseUtils.js";import{watch as d,syncAndInitial as c,initial as v}from"../../../../core/reactiveUtils.js";import{property as m,subclass as g}from"../../../../core/accessorSupport/decorators.js";import{sub as f,len as M,dot as _}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as b}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{tryProject as w}from"../../../../geometry/projectionUtils.js";import{viewingModeFromString as O}from"../../../ViewingMode.js";import{viewshedToolManipulatorConfiguration as V}from"./ViewshedConfiguration.js";import{ViewshedFieldOfViewManipulation as y,isSideHorizontal as D,flipSide as T}from"./ViewshedFieldOfViewManipulation.js";import{ViewshedScaleOrientManipulation as H}from"./ViewshedScaleOrientManipulation.js";import{ViewshedObserverManipulator as C}from"./viewshedToolManipulatorUtils.js";import{discRadiusSmall as j}from"../../interactive/editingTools/manipulations/config.js";import{MoveManipulation as F}from"../../interactive/editingTools/manipulations/MoveManipulation.js";import{resetProperties as S,dragManipulatedObject as P}from"../../../interactive/dragEventPipeline.js";import{EditGeometryOperations as k}from"../../../interactive/editGeometry/EditGeometryOperations.js";const x=Symbol("dragHandles"),E=Symbol("hideManipulators"),A=Symbol("hideFoVManipulators"),z=Symbol("hideObserverManipulator");let U=class extends e{constructor(i){super(i),this._moveManipulation=null,this._observerManipulator=null,this._fieldOfViewManipulation=null,this._scaleOrientManipulation=null,this._forceHoveringTask=null,this._forceHoveringTestPromise=null,this._grabbing=!1,this.viewshedComputedData=null}initialize(){this._moveManipulation=this._createMoveManipulation(),this._fieldOfViewManipulation=new y({view:this.view,tool:this.parentTool}),this._scaleOrientManipulation=new H({view:this.view,tool:this.parentTool}),this._observerManipulator=new C(this.view,this.parentTool),this.addHandles([d(()=>this.viewshedComputedData?.observerRenderSpace,i=>{null!=i&&(this._moveManipulation.renderLocation=i,this._observerManipulator.renderLocation=i)},c),d(()=>this.viewshedComputedData?.heading,i=>{i&&(this._moveManipulation.angle=s(90-i))},v),d(()=>{const{viewshedComputedData:i}=this;return{viewshedComputedData:i,observer:i?.observer}},({viewshedComputedData:i,observer:e},a)=>{this._grabbing&&e!==a?.observer||(this.removeHandles(x),i?.valid&&this.addHandles([this._buildObserverDragPipeline(i),this._buildFOVDragPipeline(i),this._buildScaleOrientDragPipeline(i)].filter(t),x))},v),d(()=>{const i=this.viewshedComputedData;return i?.valid?{viewshedCompData:i,target:i.targetRenderSpace,hFOV:i.horizontalFieldOfView,vFOV:i.verticalFieldOfView}:null},i=>{null!=i&&this._fieldOfViewManipulation.updateManipulatorsTransform(i.viewshedCompData)},v),d(()=>{const i=this.viewshedComputedData;return i?.valid?{viewshedCompData:i,hFOV:i.horizontalFieldOfView,vFOV:i.verticalFieldOfView,tilt:i.tilt}:null},i=>{null!=i&&this._fieldOfViewManipulation.updateManipulatorVisuals(i.viewshedCompData)},v),d(()=>{const i=this.analysisViewData.visible&&(this.viewshedComputedData?.valid??!1),e=this.parentTool.selectedViewshedComputedData===this.viewshedComputedData;return{fovManipulationAvailable:i&&!this.parentTool.isPlacingTarget,nonFOVManipulationAvailable:i&&(!this.parentTool.creating||e)}},({fovManipulationAvailable:i,nonFOVManipulationAvailable:e})=>{this._moveManipulation.available=e,this._scaleOrientManipulation.available=e,this._observerManipulator.available=e,this._fieldOfViewManipulation.available=i},v),d(()=>{const i=this.viewshedComputedData;if(!i?.valid)return null;const{observer:e,target:t,verticalFieldOfView:a,horizontalFieldOfView:o}=i;return{viewshedCompData:i,observer:e,target:t,verticalFieldOfView:a,horizontalFieldOfView:o}},i=>{null!=i&&this._scaleOrientManipulation.updateManipulators(i.viewshedCompData)},v)]);const i=i=>{const e=this.analysisViewData;this.addHandles([i.events.on("focus-changed",()=>{const i=this._someManipulatorHovering();i&&this.parentTool.subToolHandles.forEach(({subTool:i})=>{i._resetHoveringTask()}),this._someManipulatorSelected()||i||(this._forceHoveringTask=a(async i=>{await(this._forceHoveringTestPromise??h(V.hoverTimeoutMilliseconds,i)),u(i),this._forceHoveringTask=null,this._updateManipulatorVisibility()}))}),i.events.on("grab-changed",t=>{this._grabbing="start"===t.action,"end"===t.action&&e.tool?.updateInteractionVisualsVisibility(),this.parentTool.subToolHandles.forEach(({subTool:i})=>{i!==this&&i._setInteractive(!this._grabbing)}),this._setInteractive(e=>e.hasManipulator(i)||!this._grabbing)}),i.events.on("drag",i=>{"start"===i.action&&e.tool?.updateInteractionVisualsVisibility()})])};this._forEachManipulator(i)}destroy(){this._forceHoveringTask=l(this._forceHoveringTask),this._moveManipulation=p(this._moveManipulation),this._fieldOfViewManipulation=p(this._fieldOfViewManipulation),this._scaleOrientManipulation=p(this._scaleOrientManipulation),this.parentTool.manipulators.remove(this._observerManipulator),this._observerManipulator=p(this._observerManipulator)}get updating(){return null!=this._forceHoveringTask&&!this._forceHoveringTask.finished}get viewshed(){return this.viewshedComputedData?.viewshed}get grabbing(){return this._grabbing}get observer(){return this.viewshed?.observer}set observer(i){const e=this.viewshed;null!=e&&(e.observer=i)}get discManipulator(){return this._moveManipulation.xyManipulation.discManipulator}get moveInteractionState(){const{dragging:i,grabbing:e}=this._moveManipulation;return{dragging:i,grabbing:e}}get scaleOrientInteractionState(){const{dragging:i,grabbing:e}=this._scaleOrientManipulation;return{dragging:i,grabbing:e}}_setInteractive(i){const e="boolean"==typeof i;this._forEachManipulation(t=>t.interactive=e?i:i(t))}onManipulatorSelectionChanged(){if(this._updateManipulatorVisibility(),!this._someManipulatorSelected()){this.analysisViewData.selectedViewshed===this.viewshed&&(this.analysisViewData.selectedViewshed=null),this._resetHoveringTask()}}hasManipulator(i){let e=!1;return this._forEachManipulator(t=>{e=e||t===i}),e}_someManipulatorSelected(){return this._moveManipulation.selected||this._fieldOfViewManipulation.selected||this._scaleOrientManipulation.selected}_someManipulatorHovering(){return this._moveManipulation.hovering||this._fieldOfViewManipulation.hovering||this._scaleOrientManipulation.hovering}_createMoveManipulation(){return new F({view:this.view,tool:this.parentTool,snapToScene:!1,xyAvailable:!0,xyAxisAvailable:!0,zAvailable:!0,radius:j})}_buildObserverDragPipeline(i){const e={mode:"absolute-height",offset:0},t=i.observer;if(null==t)return null;const a=this.view.spatialReference;return this._moveManipulation.createDragPipeline((i,e,o,n,r)=>{n=n.next(S(this,["observer"]));const s=w(t,a);if(null==s)return{steps:o,cancel:n};const l=k.fromGeometry(s,O(this.view.viewingMode));return{steps:o.next(P({operations:l})).next(i=>(this.observer=l.data.geometry,i)),cancel:n}},e,a,void 0)}_buildFOVDragPipeline(i){let e=0,t=0;return this._fieldOfViewManipulation.createDragPipeline((a,n,r)=>{if(null==i)return{steps:n,cancel:r};const s=i.viewshed;let l=null;r=r.next(S(s,["horizontalFieldOfView","verticalFieldOfView"]));return{steps:n.next(a=>{"start"===a.action&&(l=null,e=i.horizontalFieldOfView,t=i.verticalFieldOfView);const n=a.deltaAngle;if(null==l&&0!==n){const i="bottom"===a.side||"left"===a.side?n>0:n<0;l=D(a.side)?0===e&&i||360===e&&!i:0===t&&i}const r=l?T(a.side):a.side;let p=0;switch(r){case"left":p=e/2-n;break;case"right":p=e/2+n;break;case"top":p=t+2*n;break;case"bottom":p=t-2*n}return D(r)?(p=o.normalize(p),p=p>270?0:p>180?180:p,s.horizontalFieldOfView=2*p):s.verticalFieldOfView=p,a}),cancel:r}},i)}_buildScaleOrientDragPipeline(i){let e=0,t=0;const a=(e,t)=>(a,o,n)=>{if(null==i)return{steps:o,cancel:n};const r=i.viewshed;return n=n.next(S(r,[e])),{steps:o=o.next(t(r,i)),cancel:n}};return r([this._scaleOrientManipulation.createHeadingDragPipeline(a("heading",(e,a)=>a=>("start"===a.action&&(t=i.heading),e.heading=o.normalize(t+a.deltaAngle),a)),i),this._scaleOrientManipulation.createTiltDragPipeline(a("tilt",(t,a)=>a=>{"start"===a.action&&(e=i.tilt);let o=e+a.deltaAngle;return o<-90?o=180:o>270&&(o=0),t.tilt=R.clamp(o),a}),i),this._scaleOrientManipulation.createDistanceDragPipeline(a("farDistance",(i,e)=>t=>{const a=f(I,t.renderEnd,e.observerRenderSpace),o=M(a)*e.metersPerUnit,n=_(a,e.targetDirection)<0?V.scaleOrientMinDistance:o;return i.farDistance=n,t}),i)])}_updateManipulatorVisibility(){const i=this._someManipulatorSelected(),e=null!=this._forceHoveringTask||this._someManipulatorHovering(),t=this._fieldOfViewManipulation.hovering,a=this.parentTool.creating;let o=[];const n=i=>{o.push(i.disableDisplay())};i||!a&&e?this.removeHandles(E):(this._scaleOrientManipulation.forEachManipulator(n),this._moveManipulation.forEachManipulator(n),this.addHandles(o,E),o=[]),i||!a&&e||a&&t?this.removeHandles(A):(this._fieldOfViewManipulation.forEachManipulator(n),this.addHandles(o,A)),i||!a?this.removeHandles(z):this.addHandles(this._observerManipulator.disableDisplay(),z)}_resetHoveringTask(){this._forceHoveringTask=l(this._forceHoveringTask),this._updateManipulatorVisibility()}_forEachManipulator(i){this._forEachManipulation(e=>{e.forEachManipulator(i)}),i(this._observerManipulator)}_forEachManipulation(i){i(this._moveManipulation),i(this._fieldOfViewManipulation),i(this._scaleOrientManipulation)}get test(){return{moveManipulation:this._moveManipulation,fieldOfViewManipulation:this._fieldOfViewManipulation,scaleOrientManipulation:this._scaleOrientManipulation,viewshedComputedData:this.viewshedComputedData,setHoveringTimeoutPromise:i=>{this._forceHoveringTestPromise=i}}}};i([m({constructOnly:!0})],U.prototype,"analysis",void 0),i([m({constructOnly:!0})],U.prototype,"analysisViewData",void 0),i([m({constructOnly:!0})],U.prototype,"parentTool",void 0),i([m({constructOnly:!0,nonNullable:!0})],U.prototype,"view",void 0),i([m()],U.prototype,"_forceHoveringTask",void 0),i([m()],U.prototype,"updating",null),i([m()],U.prototype,"viewshed",null),i([m()],U.prototype,"_grabbing",void 0),i([m()],U.prototype,"grabbing",null),i([m()],U.prototype,"viewshedComputedData",void 0),i([m()],U.prototype,"observer",null),U=i([g("esri.views.3d.analysis.Viewshed.ViewshedSubTool")],U);const I=b(),R=new n(0,180);export{U as ViewshedSubTool};
2
+ import{__decorate as e}from"tslib";import i from"../../../../core/Accessor.js";import{isSome as t}from"../../../../core/arrayUtils.js";import{createTask as a}from"../../../../core/asyncUtils.js";import{cyclicalDegrees as n,Cyclical as o}from"../../../../core/Cyclical.js";import{handlesGroup as r}from"../../../../core/handleUtils.js";import"../../../../core/has.js";import{deg2rad as s}from"../../../../core/mathUtils.js";import{abortMaybe as l,destroyMaybe as p}from"../../../../core/maybe.js";import{after as h,throwIfAborted as u}from"../../../../core/promiseUtils.js";import{watch as d,syncAndInitial as c,initial as v}from"../../../../core/reactiveUtils.js";import{property as m,subclass as g}from"../../../../core/accessorSupport/decorators.js";import{sub as f,len as M,dot as b}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as _}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{tryProject as w}from"../../../../geometry/projectionUtils.js";import{viewingModeFromString as O}from"../../../ViewingMode.js";import{viewshedToolManipulatorConfiguration as V}from"./ViewshedConfiguration.js";import{ViewshedFieldOfViewManipulation as y,isSideHorizontal as D,flipSide as T}from"./ViewshedFieldOfViewManipulation.js";import{ViewshedScaleOrientManipulation as H}from"./ViewshedScaleOrientManipulation.js";import{ViewshedObserverManipulator as C}from"./viewshedToolManipulatorUtils.js";import{discRadiusSmall as j}from"../../interactive/editingTools/manipulations/config.js";import{MoveManipulation as F}from"../../interactive/editingTools/manipulations/MoveManipulation.js";import{resetProperties as S,dragManipulatedObject as A}from"../../../interactive/dragEventPipeline.js";import{EditGeometryOperations as P}from"../../../interactive/editGeometry/EditGeometryOperations.js";const k=Symbol("dragHandles"),x=Symbol("hideManipulators"),E=Symbol("hideFoVManipulators"),z=Symbol("hideObserverManipulator");let U=class extends i{constructor(e){super(e),this._moveManipulation=null,this._observerManipulator=null,this._fieldOfViewManipulation=null,this._scaleOrientManipulation=null,this._forceHoveringTask=null,this._forceHoveringTestPromise=null,this._grabbing=!1,this.viewshedComputedData=null}initialize(){this._moveManipulation=this._createMoveManipulation(),this._fieldOfViewManipulation=new y({view:this.view,tool:this.parentTool}),this._scaleOrientManipulation=new H({view:this.view,tool:this.parentTool}),this._observerManipulator=new C(this.view,this.parentTool),this.addHandles([d(()=>this.elevationAlignedObserverRenderSpace,e=>{null!=e&&(this._moveManipulation.renderLocation=e,this._observerManipulator.renderLocation=e)},c),d(()=>this.viewshedComputedData?.heading,e=>{e&&(this._moveManipulation.angle=s(90-e))},v),d(()=>{const{viewshedComputedData:e}=this;return{viewshedComputedData:e,observer:this.elevationAlignedObserverRenderSpace}},({viewshedComputedData:e,observer:i},a)=>{this._grabbing&&i!==a?.observer||(this.removeHandles(k),e?.valid&&this.addHandles([this._buildObserverDragPipeline(e),this._buildFOVDragPipeline(e),this._buildScaleOrientDragPipeline(e)].filter(t),k))},v),d(()=>{const e=this.viewshedComputedData;return e?.valid?{viewshedCompData:e,target:e.elevationAlignedTargetRenderSpace,hFOV:e.horizontalFieldOfView,vFOV:e.verticalFieldOfView}:null},e=>{null!=e&&this._fieldOfViewManipulation.updateManipulatorsTransform(e.viewshedCompData)},v),d(()=>{const e=this.viewshedComputedData;return e?.valid?{viewshedCompData:e,hFOV:e.horizontalFieldOfView,vFOV:e.verticalFieldOfView,tilt:e.tilt}:null},e=>{null!=e&&this._fieldOfViewManipulation.updateManipulatorVisuals(e.viewshedCompData)},v),d(()=>{const e=this.analysisViewData.visible&&(this.viewshedComputedData?.valid??!1),i=this.parentTool.selectedViewshedComputedData===this.viewshedComputedData;return{fovManipulationAvailable:e&&!this.parentTool.isPlacingTarget,nonFOVManipulationAvailable:e&&(!this.parentTool.creating||i)}},({fovManipulationAvailable:e,nonFOVManipulationAvailable:i})=>{this._moveManipulation.available=i,this._scaleOrientManipulation.available=i,this._observerManipulator.available=i,this._fieldOfViewManipulation.available=e},v),d(()=>{const e=this.viewshedComputedData;if(!e?.valid)return null;const{observer:i,target:t,verticalFieldOfView:a,horizontalFieldOfView:n}=e;return{viewshedCompData:e,observer:i,target:t,verticalFieldOfView:a,horizontalFieldOfView:n}},e=>{null!=e&&this._scaleOrientManipulation.updateManipulators(e.viewshedCompData)},v)]);const e=e=>{const i=this.analysisViewData;this.addHandles([e.events.on("focus-changed",()=>{const e=this._someManipulatorHovering();e&&this.parentTool.subToolHandles.forEach(({subTool:e})=>{e._resetHoveringTask()}),this._someManipulatorSelected()||e||(this._forceHoveringTask=a(async e=>{await(this._forceHoveringTestPromise??h(V.hoverTimeoutMilliseconds,e)),u(e),this._forceHoveringTask=null,this._updateManipulatorVisibility()}))}),e.events.on("grab-changed",t=>{this._grabbing="start"===t.action,"end"===t.action&&i.tool?.updateInteractionVisualsVisibility(),this.parentTool.subToolHandles.forEach(({subTool:e})=>{e!==this&&e._setInteractive(!this._grabbing)}),this._setInteractive(i=>i.hasManipulator(e)||!this._grabbing)}),e.events.on("drag",e=>{"start"===e.action&&i.tool?.updateInteractionVisualsVisibility()})])};this._forEachManipulator(e)}destroy(){this._forceHoveringTask=l(this._forceHoveringTask),this._moveManipulation=p(this._moveManipulation),this._fieldOfViewManipulation=p(this._fieldOfViewManipulation),this._scaleOrientManipulation=p(this._scaleOrientManipulation),this.parentTool.manipulators.remove(this._observerManipulator),this._observerManipulator=p(this._observerManipulator)}get updating(){return null!=this._forceHoveringTask&&!this._forceHoveringTask.finished}get viewshed(){return this.viewshedComputedData?.viewshed}get grabbing(){return this._grabbing}get observer(){return this.viewshed?.observer}set observer(e){const i=this.viewshed;null!=i&&(i.observer=e)}get elevationAlignedObserverRenderSpace(){return this.viewshedComputedData?.elevationAlignedObserverRenderSpace}get discManipulator(){return this._moveManipulation.xyManipulation.discManipulator}get moveInteractionState(){const{dragging:e,grabbing:i}=this._moveManipulation;return{dragging:e,grabbing:i}}get scaleOrientInteractionState(){const{dragging:e,grabbing:i}=this._scaleOrientManipulation;return{dragging:e,grabbing:i}}_setInteractive(e){const i="boolean"==typeof e;this._forEachManipulation(t=>t.interactive=i?e:e(t))}onManipulatorSelectionChanged(){if(this._updateManipulatorVisibility(),!this._someManipulatorSelected()){this.analysisViewData.selectedViewshed===this.viewshed&&(this.analysisViewData.selectedViewshed=null),this._resetHoveringTask()}}hasManipulator(e){let i=!1;return this._forEachManipulator(t=>{i=i||t===e}),i}_someManipulatorSelected(){return this._moveManipulation.selected||this._fieldOfViewManipulation.selected||this._scaleOrientManipulation.selected}_someManipulatorHovering(){return this._moveManipulation.hovering||this._fieldOfViewManipulation.hovering||this._scaleOrientManipulation.hovering}_createMoveManipulation(){return new F({view:this.view,tool:this.parentTool,snapToScene:!1,xyAvailable:!0,xyAxisAvailable:!0,zAvailable:!0,radius:j})}_buildObserverDragPipeline(e){const i={mode:"absolute-height",offset:0},t=e.observer;if(null==t)return null;const a=this.view.spatialReference;return this._moveManipulation.createDragPipeline((e,i,n,o,r)=>{o=o.next(S(this,["observer"]));const s=w(t,a);if(null==s)return{steps:n,cancel:o};const l=P.fromGeometry(s,O(this.view.viewingMode));return{steps:n.next(A({operations:l})).next(e=>(this.observer=l.data.geometry,e)),cancel:o}},i,a,void 0)}_buildFOVDragPipeline(e){let i=0,t=0;return this._fieldOfViewManipulation.createDragPipeline((a,o,r)=>{if(null==e)return{steps:o,cancel:r};const s=e.viewshed;let l=null;r=r.next(S(s,["horizontalFieldOfView","verticalFieldOfView"]));return{steps:o.next(a=>{"start"===a.action&&(l=null,i=e.horizontalFieldOfView,t=e.verticalFieldOfView);const o=a.deltaAngle;if(null==l&&0!==o){const e="bottom"===a.side||"left"===a.side?o>0:o<0;l=D(a.side)?0===i&&e||360===i&&!e:0===t&&e}const r=l?T(a.side):a.side;let p=0;switch(r){case"left":p=i/2-o;break;case"right":p=i/2+o;break;case"top":p=t+2*o;break;case"bottom":p=t-2*o}return D(r)?(p=n.normalize(p),p=p>270?0:p>180?180:p,s.horizontalFieldOfView=2*p):s.verticalFieldOfView=p,a}),cancel:r}},e)}_buildScaleOrientDragPipeline(e){let i=0,t=0;const a=(i,t)=>(a,n,o)=>{if(null==e)return{steps:n,cancel:o};const r=e.viewshed;return o=o.next(S(r,[i])),{steps:n=n.next(t(r,e)),cancel:o}};return r([this._scaleOrientManipulation.createHeadingDragPipeline(a("heading",(i,a)=>a=>("start"===a.action&&(t=e.heading),i.heading=n.normalize(t+a.deltaAngle),a)),e),this._scaleOrientManipulation.createTiltDragPipeline(a("tilt",(t,a)=>a=>{"start"===a.action&&(i=e.tilt);let n=i+a.deltaAngle;return n<-90?n=180:n>270&&(n=0),t.tilt=I.clamp(n),a}),e),this._scaleOrientManipulation.createDistanceDragPipeline(a("farDistance",(e,i)=>t=>{const a=f(R,t.renderEnd,i.elevationAlignedObserverRenderSpace),n=M(a)*i.metersPerUnit,o=b(a,i.targetDirection)<0?V.scaleOrientMinDistance:n;return e.farDistance=o,t}),e)])}_updateManipulatorVisibility(){const e=this._someManipulatorSelected(),i=null!=this._forceHoveringTask||this._someManipulatorHovering(),t=this._fieldOfViewManipulation.hovering,a=this.parentTool.creating;let n=[];const o=e=>{n.push(e.disableDisplay())};e||!a&&i?this.removeHandles(x):(this._scaleOrientManipulation.forEachManipulator(o),this._moveManipulation.forEachManipulator(o),this.addHandles(n,x),n=[]),e||!a&&i||a&&t?this.removeHandles(E):(this._fieldOfViewManipulation.forEachManipulator(o),this.addHandles(n,E)),e||!a?this.removeHandles(z):this.addHandles(this._observerManipulator.disableDisplay(),z)}_resetHoveringTask(){this._forceHoveringTask=l(this._forceHoveringTask),this._updateManipulatorVisibility()}_forEachManipulator(e){this._forEachManipulation(i=>{i.forEachManipulator(e)}),e(this._observerManipulator)}_forEachManipulation(e){e(this._moveManipulation),e(this._fieldOfViewManipulation),e(this._scaleOrientManipulation)}get test(){return{moveManipulation:this._moveManipulation,fieldOfViewManipulation:this._fieldOfViewManipulation,scaleOrientManipulation:this._scaleOrientManipulation,viewshedComputedData:this.viewshedComputedData,setHoveringTimeoutPromise:e=>{this._forceHoveringTestPromise=e}}}};e([m({constructOnly:!0})],U.prototype,"analysis",void 0),e([m({constructOnly:!0})],U.prototype,"analysisViewData",void 0),e([m({constructOnly:!0})],U.prototype,"parentTool",void 0),e([m({constructOnly:!0,nonNullable:!0})],U.prototype,"view",void 0),e([m()],U.prototype,"_forceHoveringTask",void 0),e([m()],U.prototype,"updating",null),e([m()],U.prototype,"viewshed",null),e([m()],U.prototype,"_grabbing",void 0),e([m()],U.prototype,"grabbing",null),e([m()],U.prototype,"viewshedComputedData",void 0),e([m()],U.prototype,"observer",null),e([m()],U.prototype,"elevationAlignedObserverRenderSpace",null),U=e([g("esri.views.3d.analysis.Viewshed.ViewshedSubTool")],U);const R=_(),I=new o(0,180);export{U as ViewshedSubTool};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import"../../../../core/has.js";import{equals as i}from"../../../../core/lang.js";import{deg2rad as s}from"../../../../core/mathUtils.js";import{destroyMaybe as o}from"../../../../core/maybe.js";import{watch as r,initial as a}from"../../../../core/reactiveUtils.js";import{property as l,subclass as n}from"../../../../core/accessorSupport/decorators.js";import{fromRotation as h}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as c}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{transformMat4 as m,set as d,sub as u,len as p,normalize as _,scale as V,angle as f,negate as v,copy as w,add as E}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as b,clone as g}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{viewshedVisualizationConfiguration as C,arcAnglePerSegment as L}from"./ViewshedConfiguration.js";import{ViewshedShapeVisualElement as A}from"./ViewshedShapeVisualElement.js";import D from"./ViewshedTool.js";import{LineVisualElement as y}from"../../interactive/visualElements/LineVisualElement.js";import{PointVisualElement as j}from"../../interactive/visualElements/PointVisualElement.js";import{createStipplePatternSimple as F}from"../../webgl-engine/materials/lineStippleUtils.js";let R=class extends t{constructor(e){super(e),this.visible=!0,this._viewshedCorners={topLeft:b(),topRight:b(),bottomLeft:b(),bottomRight:b()},this._arcCenterPoints={top:b(),bottom:b(),left:b(),right:b()},this._parallelCenters={top:b(),bottom:b()}}initialize(){const e={view:this.view,isDecoration:!0},t={...e,color:this._color,renderOccluded:4},s={...t,stipplePattern:F(2)};this._observerVisualElement=new j({...e,...C.observerPointConfiguration}),this._shapeVisualElement=new A({...e,isDecoration:this.isDecoration}),this._frameLinesVisualElement=new y(t),this._leftArcVisualElement=new y(t),this._rightArcVisualElement=new y(t),this._topArcVisualElement=new y(t),this._bottomArcVisualElement=new y(t),this._centralLongitude=new y(s),this._centralLatitude=new y(s),this.addHandles([r(()=>{const e=this.viewshedComputedData;if(!e?.valid)return null;const t=this._viewshedCorners,i=this._arcCenterPoints,s=this._parallelCenters;return e.cornerPoints(t),e.arcCentersPoints(i),e.parallelCenterPoints(s),{viewshedComputedData:e,corners:t,arcCenters:i,parallelCenters:s,interactive:this.analysisViewData.interactive,selected:this._selected}},e=>{const t=null!=e;this._forEachVisualElement(e=>e.attached=t),t&&this._updateVisualElements(e)},{initial:!0,equals:i}),r(()=>{const{viewshedComputedData:e}=this,{horizontalFieldOfView:t,verticalFieldOfView:i}=e??{};return{viewshedComputedData:e,horizontalFieldOfView:t,verticalFieldOfView:i}},({viewshedComputedData:e})=>{const{_shapeVisualElement:t}=this;e!==t.viewshedComputedData&&(t.viewshedComputedData=e),this._shapeVisualElement.recreateGeometry()},a),r(()=>{const{interactive:e}=this.analysisViewData;return{visible:this.visible,selected:e&&this._selected,staged:e&&this._staged,horFovNot360:360!==this.viewshedComputedData?.horizontalFieldOfView}},({visible:e,selected:t,staged:i,horFovNot360:s})=>{const o=t||i;this._shapeVisualElement.visible=e,this._topArcVisualElement.visible=e,this._bottomArcVisualElement.visible=e,this._frameLinesVisualElement.visible=e&&s;const r=e&&(t||s);this._leftArcVisualElement.visible=r,this._rightArcVisualElement.visible=r,this._forEachLineVisualElement(e=>{e.width=o?C.frameWidthSelected:C.frameWidthNotSelected,e.renderOccluded=t?4:1}),[this._centralLatitude,this._centralLongitude].forEach(i=>{i.width=2*(o?C.frameWidthSelected:C.frameWidthNotSelected),i.visible=e&&t})},a),r(()=>{const{analysisViewData:{interactive:e,tool:t},_selected:i,visible:s}=this,o=this.view.activeTool,r=!t?.active&&o instanceof D&&o.creating;return{observerVisible:s&&!i&&(!e||(t?.creating??!1)||r),color:this._color}},({observerVisible:e,color:t})=>{this._observerVisualElement.visible=e,this._forEachLineVisualElement(e=>e.color=t)},a)])}get _color(){const{viewshedComputedData:e,_selected:t,analysisViewData:i}=this;if(null==e)return C.frameColor.toUnitRGBA();const s=i.tool?.active||i.interactive,o=e.viewshed===i.tool?.stagedViewshed;return(s&&(t||o)?this.view.effectiveTheme.accentColor:C.frameColor).toUnitRGBA()}get _selected(){const{viewshedComputedData:e,analysisViewData:{selectedViewshedComputedData:t}}=this;return null!=e&&e===t}get _staged(){const{analysisViewData:{tool:e},viewshedComputedData:t}=this;return null!=e&&e.creating&&e.stagedViewshed===t?.viewshed}destroy(){this._observerVisualElement=o(this._observerVisualElement),this._shapeVisualElement=o(this._shapeVisualElement),this._frameLinesVisualElement=o(this._frameLinesVisualElement),this._leftArcVisualElement=o(this._leftArcVisualElement),this._rightArcVisualElement=o(this._rightArcVisualElement),this._topArcVisualElement=o(this._topArcVisualElement),this._bottomArcVisualElement=o(this._bottomArcVisualElement),this._centralLongitude=o(this._centralLongitude),this._centralLatitude=o(this._centralLatitude)}_forEachLineVisualElement(e){[this._frameLinesVisualElement,this._leftArcVisualElement,this._rightArcVisualElement,this._topArcVisualElement,this._bottomArcVisualElement,this._centralLatitude,this._centralLongitude].forEach(e)}_forEachVisualElement(e){this._forEachLineVisualElement(e),e(this._observerVisualElement),e(this._shapeVisualElement)}_updateVisualElements(e){const{viewshedComputedData:t,corners:i,arcCenters:s,parallelCenters:o}=e,r=g(t.observerRenderSpace);this._observerVisualElement.geometry=t.observer,this._shapeVisualElement.updateTransform(),this._updateFrameLines(r,i),this._updateFrameArcs(t,i,o),this._updateCentralHelperArcs(t,s)}_updateFrameLines(e,t){this._frameLinesVisualElement.geometry=[[e,t.topLeft],[e,t.topRight],[e,t.bottomLeft],[e,t.bottomRight]]}_updateFrameArcs(e,t,i){const{observerRenderSpace:o,rightVector:r,horizontalFieldOfView:a,tiltedUpVector:l}=e,n=s(a),u=b(),p=c();h(p,n/2,l),m(u,r,p),S(this._leftArcVisualElement,o,t.bottomLeft,t.topLeft,"forward",u),h(p,-n/2,l),d(u,0,0,0),m(u,r,p),S(this._rightArcVisualElement,o,t.bottomRight,t.topRight,"forward",u);const _=a>180?"backward":"forward";S(this._topArcVisualElement,i.top,t.topRight,t.topLeft,_,l),S(this._bottomArcVisualElement,i.bottom,t.bottomRight,t.bottomLeft,_,l)}_updateCentralHelperArcs(e,t){const i=e.observerRenderSpace,s=e.horizontalFieldOfView>=180?"backward":"forward";S(this._centralLatitude,i,t.right,t.left,s,e.tiltedUpVector),S(this._centralLongitude,i,t.top,t.bottom,"forward",e.leftVector)}get test(){}};function S(e,t,i,s,o,r,a=L){const l=b();u(l,i,t);const n=p(l),d=b();u(d,s,t),_(d,d),V(d,d,n);let C=f(l,d);const A=g(r);"backward"===o&&(v(A,A),C=-(2*Math.PI-C));const D=[],y=Math.ceil(Math.abs(C)/a),j=c();h(j,C/y,A);const F=b();w(F,l);const R=b();w(R,i);for(let h=0;h<y;h++){const e=b();w(e,R),m(F,F,j),E(R,t,F);const i=b();w(i,R),D.push([e,i])}e.geometry=D}e([l()],R.prototype,"view",void 0),e([l({constructOnly:!0})],R.prototype,"isDecoration",void 0),e([l()],R.prototype,"analysisViewData",void 0),e([l()],R.prototype,"viewshedComputedData",void 0),e([l()],R.prototype,"visible",void 0),e([l()],R.prototype,"_color",null),e([l()],R.prototype,"_selected",null),e([l()],R.prototype,"_staged",null),R=e([n("esri.views.3d.analysis.Viewshed.ViewshedSubVisualization")],R);export{R as default};
2
+ import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import"../../../../core/has.js";import{equals as i}from"../../../../core/lang.js";import{deg2rad as s}from"../../../../core/mathUtils.js";import{destroyMaybe as o}from"../../../../core/maybe.js";import{watch as r,initial as a}from"../../../../core/reactiveUtils.js";import{property as l,subclass as n}from"../../../../core/accessorSupport/decorators.js";import{fromRotation as c}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as h}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{transformMat4 as m,set as d,sub as u,len as p,normalize as _,scale as V,angle as f,negate as v,copy as w,add as E}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as b,clone as g}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{viewshedVisualizationConfiguration as A,arcAnglePerSegment as C}from"./ViewshedConfiguration.js";import{ViewshedShapeVisualElement as L}from"./ViewshedShapeVisualElement.js";import D from"./ViewshedTool.js";import{LineVisualElement as y}from"../../interactive/visualElements/LineVisualElement.js";import{PointVisualElement as j}from"../../interactive/visualElements/PointVisualElement.js";import{createStipplePatternSimple as O}from"../../webgl-engine/materials/lineStippleUtils.js";let F=class extends t{constructor(e){super(e),this.visible=!0,this._viewshedCorners={topLeft:b(),topRight:b(),bottomLeft:b(),bottomRight:b()},this._arcCenterPoints={top:b(),bottom:b(),left:b(),right:b()},this._parallelCenters={top:b(),bottom:b()}}initialize(){const e={view:this.view,isDecoration:!0},t={...e,color:this._color,renderOccluded:4},s={...t,stipplePattern:O(2)};this._observerVisualElement=new j({...e,...A.observerPointConfiguration}),this._shapeVisualElement=new L({...e,isDecoration:this.isDecoration}),this._frameLinesVisualElement=new y(t),this._leftArcVisualElement=new y(t),this._rightArcVisualElement=new y(t),this._topArcVisualElement=new y(t),this._bottomArcVisualElement=new y(t),this._centralLongitude=new y(s),this._centralLatitude=new y(s),this.addHandles([r(()=>{const e=this.viewshedComputedData;if(!e?.valid)return null;const t=this._viewshedCorners,i=this._arcCenterPoints,s=this._parallelCenters;return e.cornerPoints(t),e.arcCentersPoints(i),e.parallelCenterPoints(s),{viewshedComputedData:e,corners:t,arcCenters:i,parallelCenters:s,interactive:this.analysisViewData.interactive,selected:this._selected}},e=>{const t=null!=e;this._forEachVisualElement(e=>e.attached=t),t&&this._updateVisualElements(e)},{initial:!0,equals:i}),r(()=>{const{viewshedComputedData:e}=this,{horizontalFieldOfView:t,verticalFieldOfView:i}=e??{};return{viewshedComputedData:e,horizontalFieldOfView:t,verticalFieldOfView:i}},({viewshedComputedData:e})=>{const{_shapeVisualElement:t}=this;e!==t.viewshedComputedData&&(t.viewshedComputedData=e),this._shapeVisualElement.recreateGeometry()},a),r(()=>{const{interactive:e}=this.analysisViewData;return{visible:this.visible,selected:e&&this._selected,staged:e&&this._staged,horFovNot360:360!==this.viewshedComputedData?.horizontalFieldOfView}},({visible:e,selected:t,staged:i,horFovNot360:s})=>{const o=t||i;this._shapeVisualElement.visible=e,this._topArcVisualElement.visible=e,this._bottomArcVisualElement.visible=e,this._frameLinesVisualElement.visible=e&&s;const r=e&&(t||s);this._leftArcVisualElement.visible=r,this._rightArcVisualElement.visible=r,this._forEachLineVisualElement(e=>{e.width=o?A.frameWidthSelected:A.frameWidthNotSelected,e.renderOccluded=t?4:1}),[this._centralLatitude,this._centralLongitude].forEach(i=>{i.width=2*(o?A.frameWidthSelected:A.frameWidthNotSelected),i.visible=e&&t})},a),r(()=>{const{analysisViewData:{interactive:e,tool:t},_selected:i,visible:s}=this,o=this.view.activeTool,r=!t?.active&&o instanceof D&&o.creating;return{observerVisible:s&&!i&&(!e||(t?.creating??!1)||r),color:this._color}},({observerVisible:e,color:t})=>{this._observerVisualElement.visible=e,this._forEachLineVisualElement(e=>e.color=t)},a)])}get _color(){const{viewshedComputedData:e,_selected:t,analysisViewData:i}=this;if(null==e)return A.frameColor.toUnitRGBA();const s=i.tool?.active||i.interactive,o=e.viewshed===i.tool?.stagedViewshed;return(s&&(t||o)?this.view.effectiveTheme.accentColor:A.frameColor).toUnitRGBA()}get _selected(){const{viewshedComputedData:e,analysisViewData:{selectedViewshedComputedData:t}}=this;return null!=e&&e===t}get _staged(){const{analysisViewData:{tool:e},viewshedComputedData:t}=this;return null!=e&&e.creating&&e.stagedViewshed===t?.viewshed}destroy(){this._observerVisualElement=o(this._observerVisualElement),this._shapeVisualElement=o(this._shapeVisualElement),this._frameLinesVisualElement=o(this._frameLinesVisualElement),this._leftArcVisualElement=o(this._leftArcVisualElement),this._rightArcVisualElement=o(this._rightArcVisualElement),this._topArcVisualElement=o(this._topArcVisualElement),this._bottomArcVisualElement=o(this._bottomArcVisualElement),this._centralLongitude=o(this._centralLongitude),this._centralLatitude=o(this._centralLatitude)}_forEachLineVisualElement(e){[this._frameLinesVisualElement,this._leftArcVisualElement,this._rightArcVisualElement,this._topArcVisualElement,this._bottomArcVisualElement,this._centralLatitude,this._centralLongitude].forEach(e)}_forEachVisualElement(e){this._forEachLineVisualElement(e),e(this._observerVisualElement),e(this._shapeVisualElement)}_updateVisualElements(e){const{viewshedComputedData:t,corners:i,arcCenters:s,parallelCenters:o}=e;this._observerVisualElement.geometry=t.elevationAlignedObserver,this._shapeVisualElement.updateTransform(),this._updateFrameLines(t,i),this._updateFrameArcs(t,i,o),this._updateCentralHelperArcs(t,s)}_updateFrameLines(e,t){const i=e.elevationAlignedObserverRenderSpace;this._frameLinesVisualElement.geometry=[[i,t.topLeft],[i,t.topRight],[i,t.bottomLeft],[i,t.bottomRight]]}_updateFrameArcs(e,t,i){const{elevationAlignedObserverRenderSpace:o,rightVector:r,horizontalFieldOfView:a,tiltedUpVector:l}=e,n=s(a),u=b(),p=h();c(p,n/2,l),m(u,r,p),R(this._leftArcVisualElement,o,t.bottomLeft,t.topLeft,"forward",u),c(p,-n/2,l),d(u,0,0,0),m(u,r,p),R(this._rightArcVisualElement,o,t.bottomRight,t.topRight,"forward",u);const _=a>180?"backward":"forward";R(this._topArcVisualElement,i.top,t.topRight,t.topLeft,_,l),R(this._bottomArcVisualElement,i.bottom,t.bottomRight,t.bottomLeft,_,l)}_updateCentralHelperArcs(e,t){const i=e.elevationAlignedObserverRenderSpace,s=e.horizontalFieldOfView>=180?"backward":"forward";R(this._centralLatitude,i,t.right,t.left,s,e.tiltedUpVector),R(this._centralLongitude,i,t.top,t.bottom,"forward",e.leftVector)}get test(){}};function R(e,t,i,s,o,r,a=C){const l=b();u(l,i,t);const n=p(l),d=b();u(d,s,t),_(d,d),V(d,d,n);let A=f(l,d);const L=g(r);"backward"===o&&(v(L,L),A=-(2*Math.PI-A));const D=[],y=Math.ceil(Math.abs(A)/a),j=h();c(j,A/y,L);const O=b();w(O,l);const F=b();w(F,i);for(let c=0;c<y;c++){const e=b();w(e,F),m(O,O,j),E(F,t,O);const i=b();w(i,F),D.push([e,i])}e.geometry=D}e([l()],F.prototype,"view",void 0),e([l({constructOnly:!0})],F.prototype,"isDecoration",void 0),e([l()],F.prototype,"analysisViewData",void 0),e([l()],F.prototype,"viewshedComputedData",void 0),e([l()],F.prototype,"visible",void 0),e([l()],F.prototype,"_color",null),e([l()],F.prototype,"_selected",null),e([l()],F.prototype,"_staged",null),F=e([n("esri.views.3d.analysis.Viewshed.ViewshedSubVisualization")],F);export{F as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../../analysis/Viewshed.js";import{makeHandle as i}from"../../../../core/handleUtils.js";import"../../../../core/has.js";import{mapCollection as s}from"../../../../core/mapCollectionUtils.js";import{rad2deg as a}from"../../../../core/mathUtils.js";import{destroyMaybe as n}from"../../../../core/maybe.js";import{when as o,syncAndInitial as l,watch as r,sync as d,initial as c}from"../../../../core/reactiveUtils.js";import{property as h,subclass as u}from"../../../../core/accessorSupport/decorators.js";import{create as p}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{sub as m,len as g,set as v,angle as w,dot as _}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as V}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import b from"../../../../geometry/Point.js";import{fromPositionAndNormal as f,projectPoint as y,create as S}from"../../../../geometry/support/plane.js";import{creationVerticalOffset as T}from"./ViewshedConfiguration.js";import{ViewshedSubTool as C}from"./ViewshedSubTool.js";import{Manipulator3D as D}from"../../interactive/Manipulator3D.js";import{Settings as M}from"../../interactive/editingTools/settings.js";import{ExtendedLineVisualElement as H}from"../../interactive/visualElements/ExtendedLineVisualElement.js";import{LaserlineVisualElement as I}from"../../interactive/visualElements/LaserlineVisualElement.js";import{toGraphic as P}from"../../webgl-engine/lib/intersectorUtilsConversions.js";import{AnalysisToolBase as j}from"../../../interactive/AnalysisToolBase.js";import{sketchKeys as E}from"../../../interactive/keybindings.js";import{newToolIntersector as L}from"../../../interactive/ToolIntersector.js";import{createScreenPointArrayFromEvent as k}from"../../../support/screenUtils.js";const x=Symbol("interactionVisuals");let W=class extends j{constructor(e){super(e),this.removeIncompleteOnCancel=!1,this.automaticManipulatorSelection=!1,this.multiTouchEnabled=!1,this._stagedViewshed=null,this._stagedViewshedComputedData=null,this._placementMode=G,this._creationState=!1,this._interactionVisualElements=null,this._settings=new M({getTheme:()=>this.view.effectiveTheme}),this._selectedManipulator=null}initialize(){this._intersector=L(this.view.state.viewingMode),this._createInteractionVisuals();const e=this.analysisViewData.viewshedComputedDataHandles;this.subToolHandles=s(()=>e,({viewshedComputedData:e})=>{const t=new C({analysis:this.analysis,analysisViewData:this.analysisViewData,parentTool:this,view:this.view,viewshedComputedData:e});return{subTool:t,remove:()=>{this.selectedViewshed===e.viewshed&&(this.selectedViewshed=null),t.destroy()}}}),this.addHandles([o(()=>this._valid,()=>this.finishToolCreation(),l),r(()=>this._stagedViewshed,e=>{const t=this.analysisViewData.viewshedComputedDataHandles;this._stagedViewshedComputedData=null!=e&&null!=t?this._findSubTool(e)?.viewshedComputedData:null},l),this.analysis.viewsheds.on("after-remove",e=>{const t=this._stagedViewshed;null!=t&&e.item===t&&this.analysis.viewsheds.add(t)}),r(()=>this.firstGrabbedManipulator,e=>{if(null!=e){const t=this._findSubTool(e)?.viewshed;this.selectedViewshed=t,this._selectManipulator(e)}else this._selectedSubTool?.onManipulatorSelectionChanged()},d),r(()=>this.view.activeTool,e=>{e!==this&&null!=e&&(this.selectedViewshed=null)}),o(()=>{const e=this.selectedViewshedComputedData;return null==e?null:{subTool:this._selectedSubTool,observer:e.observerRenderSpace,target:e.targetRenderSpace}},e=>{const{subTool:t,observer:i,target:s}=e;t?.moveInteractionState.dragging?this._updateInteractionVisualsLocation(i,!0):t?.scaleOrientInteractionState.dragging&&this._updateInteractionVisualsLocation(s,!1)},c),r(()=>this.creating,()=>this.updateInteractionVisualsVisibility()),r(()=>this.selectedViewshed,e=>{const t=this._selectedManipulator,i=this._selectedSubTool;null==e?this._selectManipulator(null):null!=t&&i.hasManipulator(t)||this._selectManipulator(i.discManipulator)},c)])}destroy(){this.subToolHandles=n(this.subToolHandles),this.removeHandles(x)}onDeactivate(){this.removeStaged(),this._creationState=!1}get updating(){return this.subToolHandles.some(({subTool:e})=>e.updating)}get _valid(){return this.analysisViewData.viewshedComputedDataHandles?.some(e=>e.viewshedComputedData.valid)??!1}get cursor(){return this.creating?"crosshair":null}get _selectedSubTool(){return this._findSubTool(this.selectedViewshed)}_selectManipulator(e){const t=this._selectedManipulator;t!==e&&(this._selectedManipulator=e,null!=t&&(t.selected=!1),null!=e&&(e.selected=!0),this._findSubTool(t)?.onManipulatorSelectionChanged(),this._selectedSubTool?.onManipulatorSelectionChanged())}get selectedViewshed(){return this.analysisViewData.selectedViewshed}set selectedViewshed(e){this.analysisViewData.selectedViewshed=e}get selectedViewshedComputedData(){return this._selectedSubTool?.viewshedComputedData}get stagedViewshed(){return this._stagedViewshed}get grabbing(){return this.subToolHandles.some(({subTool:e})=>e.grabbing)}get creating(){return this._creationState&&this.active}get isPlacingTarget(){return"placing-target"===this._creationState}place(e){this.selectedViewshed=null,this._placementMode=e,this._creationState="placing-observer",this._finishToolCreationIfValid()}onManipulatorSelectionChanged(){this.subToolHandles.forEach(e=>e.subTool.onManipulatorSelectionChanged())}onInputEvent(e){switch(e.type){case"immediate-double-click":this._doubleClickHandler(e);break;case"pointer-move":this._pointerMoveHandler(e);break;case"key-down":E.cancel===e.key?this._cancelKeyHandler(e):E.delete.includes(e.key)&&this._deleteKeyHandler();break;case"hold":this.updateInteractionVisualsVisibility(!0)}}onInputEventAfter(e){if("immediate-click"===e.type)this._clickPlacementHandler(e)}onActivate(){this._placementMode=G}_clickPlacementHandler(e){if(!this.creating||this.hasFocusedManipulators)return;const i=this._intersectScreen(e,B);if(null!=i){if("placing-observer"===this._creationState){i.mapPoint.z=(i.mapPoint.z??0)+T;const e=new t({observer:i.mapPoint.clone(),feature:i.feature});this.analysis.viewsheds.add(e),this._stagedViewshed=e,this._creationState="placing-target",this._updateStagedViewshed(i.scenePoint)}else if("placing-target"===this._creationState){this._updateStagedViewshed(i.scenePoint);const e=this._stagedViewshed;this._stagedViewshed=null,"multiple"===this._placementMode?this._creationState="placing-observer":(this._creationState=!1,this._stagedViewshed=null,this._finishToolCreationIfValid(),this.view.activeTool=null),this.selectedViewshed=e}e.stopPropagation()}}_doubleClickHandler(e){this.creating&&(this.removeStaged(),this._creationState=!1,this.view.activeTool=null,e.stopPropagation())}_pointerMoveHandler(e){if(!this.creating)return;const t=this._intersectScreen(e,B);null!=t&&(this._updateInteractionVisualsLocation(t.scenePoint,!1),this._updateStagedViewshed(t.scenePoint))}_cancelKeyHandler(e){this.creating?this._onCancelWhileCreating(e):this.grabbing||(this.selectedViewshed=null,e.stopPropagation())}_onCancelWhileCreating(e){const t=this.removeStaged();this._finishToolCreationIfValid(),t?(this._creationState="placing-observer",this.selectedViewshed=null,"multiple"===this._placementMode&&e.stopPropagation()):this._creationState=!1}_deleteKeyHandler(){this.creating&&(this.removeStaged(),this._creationState="placing-observer"),null!=this.selectedViewshed&&this.analysis.viewsheds.remove(this.selectedViewshed)}_finishToolCreationIfValid(){this._valid&&this.finishToolCreation()}_updateStagedViewshed(e){const t=this._stagedViewshed,i=this._stagedViewshedComputedData;if(null==t||null==i)return;const{heading:s,tilt:a,farDistance:n}=O(this.view,i,e);t.farDistance=n,t.tilt=a,t.heading=s}removeStaged(){const e=this._stagedViewshed;return null!=e&&(this._stagedViewshed=null,this.analysis.viewsheds.remove(e),!0)}_intersectScreen(e,t){const i=k(e);this.view.sceneIntersectionHelper.intersectToolIntersectorScreen(i,this._intersector);const s=this._intersector.results.min,a=t.scenePoint;if(!s.getIntersectionPoint(a))return null;const n=t.mapPoint;return n.spatialReference=this.view.spatialReference,this.view.renderCoordsHelper.fromRenderCoords(a,n),null==n?null:(t.feature=P(s,this.view),t)}_createInteractionVisuals(){this.removeHandles(x);const e=this._settings.visualElements,t=new I({view:this.view,attached:!1,style:{glowWidth:e.heightPlane.glowWidth,innerWidth:e.heightPlane.innerWidth},isDecoration:!0}),s=new H({view:this.view,extensionType:e.zVerticalLine.extensionType,attached:!1,innerWidth:1,writeDepthEnabled:!1,renderOccluded:4,isDecoration:!0});this._interactionVisualElements={laserline:t,verticalLine:s},this.addHandles([r(()=>e.zVerticalLine,e=>e.apply(s),l),r(()=>e.heightPlane,e=>e.apply(t),l),i(()=>{t.destroy(),s.destroy(),this._interactionVisualElements=null})],x)}updateInteractionVisualsVisibility(e=!1){const t=this.creating,i=this.analysisViewData.visible,s=this._selectedSubTool,a=this.selectedViewshedComputedData,n=(e,t)=>{const i=this._interactionVisualElements;null!=i&&(i.verticalLine.attached=t,i.laserline.attached=e)};if(t)return void n(i,!1);if(null==s||null==a)return void n(!1,!1);const o=s.moveInteractionState,l=e?o.grabbing:o.dragging,r=s.scaleOrientInteractionState,d=e?r.grabbing:r.dragging,c=i&&(l||d);if(n(c,l),c){const e=l?a.observerRenderSpace:a.targetRenderSpace;this._updateInteractionVisualsLocation(e,l)}}_updateInteractionVisualsLocation(e,t){const i=this._interactionVisualElements;if(null==i)return;const{laserline:s,verticalLine:a}=i;s.heightManifoldTarget=e,s.intersectsWorldUpAtLocation=t?e:null,null!=e&&a.setStartEndFromWorldDownAtLocation(e)}_findSubTool(e){if(null==e)return null;const t=e instanceof D?t=>t.subTool.hasManipulator(e):t=>t.subTool.viewshed===e;return this.subToolHandles?.find(t)?.subTool}get test(){}};function O(e,t,i){const s=t.observerRenderSpace,n=m(R,i,s),o=g(n)*t.metersPerUnit,l=e.renderCoordsHelper.basisMatrixAtPosition(s,K),r=v(U,l[8],l[9],l[10]),d=f(s,r,F),c=y(d,i,A),h=m(c,c,s),u=(g(h)<1e-4?90:a(w(n,h)))*(_(r,n)<0?-1:1)+90,p=v(z,l[4],l[5],l[6]),V=a(w(p,h)),b=v(z,l[0],l[1],l[2]);return{heading:_(h,b)<0?360-V:V,tilt:u,farDistance:o}}e([h()],W.prototype,"updating",null),e([h({constructOnly:!0})],W.prototype,"view",void 0),e([h()],W.prototype,"analysisViewData",void 0),e([h()],W.prototype,"removeIncompleteOnCancel",void 0),e([h()],W.prototype,"automaticManipulatorSelection",void 0),e([h()],W.prototype,"multiTouchEnabled",void 0),e([h({constructOnly:!0})],W.prototype,"analysis",void 0),e([h()],W.prototype,"subToolHandles",void 0),e([h()],W.prototype,"_stagedViewshed",void 0),e([h()],W.prototype,"_stagedViewshedComputedData",void 0),e([h()],W.prototype,"_placementMode",void 0),e([h()],W.prototype,"_creationState",void 0),e([h()],W.prototype,"_valid",null),e([h({readOnly:!0})],W.prototype,"cursor",null),e([h()],W.prototype,"_selectedManipulator",void 0),e([h()],W.prototype,"_selectedSubTool",null),e([h()],W.prototype,"selectedViewshed",null),e([h()],W.prototype,"selectedViewshedComputedData",null),e([h()],W.prototype,"stagedViewshed",null),e([h()],W.prototype,"grabbing",null),e([h()],W.prototype,"creating",null),e([h()],W.prototype,"isPlacingTarget",null),W=e([u("esri.views.3d.analysis.Viewshed.ViewshedTool")],W);const R=V(),U=V(),A=V(),z=V(),K=p(),F=S(),B={mapPoint:new b,scenePoint:V(),feature:null},G="multiple";export{W as default};
2
+ import{__decorate as e}from"tslib";import t from"../../../../analysis/Viewshed.js";import{makeHandle as i}from"../../../../core/handleUtils.js";import"../../../../core/has.js";import{mapCollection as s}from"../../../../core/mapCollectionUtils.js";import{rad2deg as n}from"../../../../core/mathUtils.js";import{destroyMaybe as a}from"../../../../core/maybe.js";import{when as o,syncAndInitial as l,watch as r,sync as d,initial as c}from"../../../../core/reactiveUtils.js";import{property as h,subclass as u}from"../../../../core/accessorSupport/decorators.js";import{create as p}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{sub as g,len as m,set as v,angle as w,dot as _}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as V}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import f from"../../../../geometry/Point.js";import{fromPositionAndNormal as b,projectPoint as y,create as S}from"../../../../geometry/support/plane.js";import{creationElevationInfo as T}from"./ViewshedConfiguration.js";import{ViewshedSubTool as C}from"./ViewshedSubTool.js";import{Manipulator3D as D}from"../../interactive/Manipulator3D.js";import{Settings as M}from"../../interactive/editingTools/settings.js";import{ExtendedLineVisualElement as H}from"../../interactive/visualElements/ExtendedLineVisualElement.js";import{LaserlineVisualElement as I}from"../../interactive/visualElements/LaserlineVisualElement.js";import{toGraphic as j}from"../../webgl-engine/lib/intersectorUtilsConversions.js";import{AnalysisToolBase as P}from"../../../interactive/AnalysisToolBase.js";import{sketchKeys as E}from"../../../interactive/keybindings.js";import{newToolIntersector as L}from"../../../interactive/ToolIntersector.js";import{createScreenPointArrayFromEvent as k}from"../../../support/screenUtils.js";const A=Symbol("interactionVisuals");let O=class extends P{constructor(e){super(e),this.removeIncompleteOnCancel=!1,this.automaticManipulatorSelection=!1,this.multiTouchEnabled=!1,this._stagedViewshed=null,this._stagedViewshedComputedData=null,this._placementMode=G,this._creationState=!1,this._interactionVisualElements=null,this._settings=new M({getTheme:()=>this.view.effectiveTheme}),this._selectedManipulator=null}initialize(){this._intersector=L(this.view.state.viewingMode),this._createInteractionVisuals();const e=this.analysisViewData.viewshedComputedDataHandles;this.subToolHandles=s(()=>e,({viewshedComputedData:e})=>{const t=new C({analysis:this.analysis,analysisViewData:this.analysisViewData,parentTool:this,view:this.view,viewshedComputedData:e});return{subTool:t,remove:()=>{this.selectedViewshed===e.viewshed&&(this.selectedViewshed=null),t.destroy()}}}),this.addHandles([o(()=>this._valid,()=>this.finishToolCreation(),l),r(()=>this._stagedViewshed,e=>{const t=this.analysisViewData.viewshedComputedDataHandles;this._stagedViewshedComputedData=null!=e&&null!=t?this._findSubTool(e)?.viewshedComputedData:null},l),this.analysis.viewsheds.on("after-remove",e=>{const t=this._stagedViewshed;null!=t&&e.item===t&&this.analysis.viewsheds.add(t)}),r(()=>this.firstGrabbedManipulator,e=>{if(null!=e){const t=this._findSubTool(e)?.viewshed;this.selectedViewshed=t,this._selectManipulator(e)}else this._selectedSubTool?.onManipulatorSelectionChanged()},d),r(()=>this.view.activeTool,e=>{e!==this&&null!=e&&(this.selectedViewshed=null)}),o(()=>{const e=this.selectedViewshedComputedData;return null==e?null:{subTool:this._selectedSubTool,observer:e.elevationAlignedObserverRenderSpace,target:e.elevationAlignedTargetRenderSpace}},e=>{const{subTool:t,observer:i,target:s}=e;t?.moveInteractionState.dragging?this._updateInteractionVisualsLocation(i,!0):t?.scaleOrientInteractionState.dragging&&this._updateInteractionVisualsLocation(s,!1)},c),r(()=>this.creating,()=>this.updateInteractionVisualsVisibility()),r(()=>this.selectedViewshed,e=>{const t=this._selectedManipulator,i=this._selectedSubTool;null==e?this._selectManipulator(null):null!=t&&i.hasManipulator(t)||this._selectManipulator(i.discManipulator)},c)])}destroy(){this.subToolHandles=a(this.subToolHandles),this.removeHandles(A)}onDeactivate(){this.removeStaged(),this._creationState=!1}get updating(){return this.subToolHandles.some(({subTool:e})=>e.updating)}get _valid(){return this.analysisViewData.viewshedComputedDataHandles?.some(e=>e.viewshedComputedData.valid)??!1}get cursor(){return this.creating?"crosshair":null}get _selectedSubTool(){return this._findSubTool(this.selectedViewshed)}_selectManipulator(e){const t=this._selectedManipulator;t!==e&&(this._selectedManipulator=e,null!=t&&(t.selected=!1),null!=e&&(e.selected=!0),this._findSubTool(t)?.onManipulatorSelectionChanged(),this._selectedSubTool?.onManipulatorSelectionChanged())}get selectedViewshed(){return this.analysisViewData.selectedViewshed}set selectedViewshed(e){this.analysisViewData.selectedViewshed=e}get selectedViewshedComputedData(){return this._selectedSubTool?.viewshedComputedData}get stagedViewshed(){return this._stagedViewshed}get grabbing(){return this.subToolHandles.some(({subTool:e})=>e.grabbing)}get creating(){return this._creationState&&this.active}get isPlacingTarget(){return"placing-target"===this._creationState}place(e){this.selectedViewshed=null,this._placementMode=e,this._creationState="placing-observer",this._finishToolCreationIfValid()}onManipulatorSelectionChanged(){this.subToolHandles.forEach(e=>e.subTool.onManipulatorSelectionChanged())}onInputEvent(e){switch(e.type){case"immediate-double-click":this._doubleClickHandler(e);break;case"pointer-move":this._pointerMoveHandler(e);break;case"key-down":E.cancel===e.key?this._cancelKeyHandler(e):E.delete.includes(e.key)&&this._deleteKeyHandler();break;case"hold":this.updateInteractionVisualsVisibility(!0)}}onInputEventAfter(e){if("immediate-click"===e.type)this._clickPlacementHandler(e)}onActivate(){this._placementMode=G}_clickPlacementHandler(e){if(!this.creating||this.hasFocusedManipulators)return;const i=this._intersectScreen(e,B);if(null!=i){if("placing-observer"===this._creationState){const e=new t({observer:i.mapPoint.clone(),elevationInfo:T,feature:i.feature});this.analysis.viewsheds.add(e),this._stagedViewshed=e,this._creationState="placing-target",this._updateStagedViewshed(i.scenePoint)}else if("placing-target"===this._creationState){this._updateStagedViewshed(i.scenePoint);const e=this._stagedViewshed;this._stagedViewshed=null,"multiple"===this._placementMode?this._creationState="placing-observer":(this._creationState=!1,this._stagedViewshed=null,this._finishToolCreationIfValid(),this.view.activeTool=null),this.selectedViewshed=e}e.stopPropagation()}}_doubleClickHandler(e){this.creating&&(this.removeStaged(),this._creationState=!1,this.view.activeTool=null,e.stopPropagation())}_pointerMoveHandler(e){if(!this.creating)return;const t=this._intersectScreen(e,B);null!=t&&(this._updateInteractionVisualsLocation(t.scenePoint,!1),this._updateStagedViewshed(t.scenePoint))}_cancelKeyHandler(e){this.creating?this._onCancelWhileCreating(e):this.grabbing||(this.selectedViewshed=null,e.stopPropagation())}_onCancelWhileCreating(e){const t=this.removeStaged();this._finishToolCreationIfValid(),t?(this._creationState="placing-observer",this.selectedViewshed=null,"multiple"===this._placementMode&&e.stopPropagation()):this._creationState=!1}_deleteKeyHandler(){this.creating&&(this.removeStaged(),this._creationState="placing-observer"),null!=this.selectedViewshed&&this.analysis.viewsheds.remove(this.selectedViewshed)}_finishToolCreationIfValid(){this._valid&&this.finishToolCreation()}_updateStagedViewshed(e){const t=this._stagedViewshed,i=this._stagedViewshedComputedData;if(null==t||null==i)return;const{heading:s,tilt:n,farDistance:a}=x(this.view,i,e);t.farDistance=a,t.tilt=n,t.heading=s}removeStaged(){const e=this._stagedViewshed;return null!=e&&(this._stagedViewshed=null,this.analysis.viewsheds.remove(e),!0)}_intersectScreen(e,t){const i=k(e);this.view.sceneIntersectionHelper.intersectToolIntersectorScreen(i,this._intersector);const s=this._intersector.results.min,n=t.scenePoint;if(!s.getIntersectionPoint(n))return null;const a=t.mapPoint;return a.spatialReference=this.view.spatialReference,this.view.renderCoordsHelper.fromRenderCoords(n,a),null==a?null:(t.feature=j(s,this.view),t)}_createInteractionVisuals(){this.removeHandles(A);const e=this._settings.visualElements,t=new I({view:this.view,attached:!1,style:{glowWidth:e.heightPlane.glowWidth,innerWidth:e.heightPlane.innerWidth},isDecoration:!0}),s=new H({view:this.view,extensionType:e.zVerticalLine.extensionType,attached:!1,innerWidth:1,writeDepthEnabled:!1,renderOccluded:4,isDecoration:!0});this._interactionVisualElements={laserline:t,verticalLine:s},this.addHandles([r(()=>e.zVerticalLine,e=>e.apply(s),l),r(()=>e.heightPlane,e=>e.apply(t),l),i(()=>{t.destroy(),s.destroy(),this._interactionVisualElements=null})],A)}updateInteractionVisualsVisibility(e=!1){const t=this.creating,i=this.analysisViewData.visible,s=this._selectedSubTool,n=this.selectedViewshedComputedData,a=(e,t)=>{const i=this._interactionVisualElements;null!=i&&(i.verticalLine.attached=t,i.laserline.attached=e)};if(t)return void a(i,!1);if(null==s||null==n)return void a(!1,!1);const o=s.moveInteractionState,l=e?o.grabbing:o.dragging,r=s.scaleOrientInteractionState,d=e?r.grabbing:r.dragging,c=i&&(l||d);if(a(c,l),c){const e=l?n.elevationAlignedObserverRenderSpace:n.elevationAlignedTargetRenderSpace;this._updateInteractionVisualsLocation(e,l)}}_updateInteractionVisualsLocation(e,t){const i=this._interactionVisualElements;if(null==i)return;const{laserline:s,verticalLine:n}=i;s.heightManifoldTarget=e,s.intersectsWorldUpAtLocation=t?e:null,null!=e&&n.setStartEndFromWorldDownAtLocation(e)}_findSubTool(e){if(null==e)return null;const t=e instanceof D?t=>t.subTool.hasManipulator(e):t=>t.subTool.viewshed===e;return this.subToolHandles?.find(t)?.subTool}get test(){}};function x(e,t,i){const s=t.elevationAlignedObserverRenderSpace,a=g(W,i,s),o=m(a)*t.metersPerUnit,l=e.renderCoordsHelper.basisMatrixAtPosition(s,z),r=v(R,l[8],l[9],l[10]),d=b(s,r,F),c=y(d,i,U),h=g(c,c,s),u=(m(h)<1e-4?90:n(w(a,h)))*(_(r,a)<0?-1:1)+90,p=v(K,l[4],l[5],l[6]),V=n(w(p,h)),f=v(K,l[0],l[1],l[2]);return{heading:_(h,f)<0?360-V:V,tilt:u,farDistance:o}}e([h()],O.prototype,"updating",null),e([h({constructOnly:!0})],O.prototype,"view",void 0),e([h()],O.prototype,"analysisViewData",void 0),e([h()],O.prototype,"removeIncompleteOnCancel",void 0),e([h()],O.prototype,"automaticManipulatorSelection",void 0),e([h()],O.prototype,"multiTouchEnabled",void 0),e([h({constructOnly:!0})],O.prototype,"analysis",void 0),e([h()],O.prototype,"subToolHandles",void 0),e([h()],O.prototype,"_stagedViewshed",void 0),e([h()],O.prototype,"_stagedViewshedComputedData",void 0),e([h()],O.prototype,"_placementMode",void 0),e([h()],O.prototype,"_creationState",void 0),e([h()],O.prototype,"_valid",null),e([h({readOnly:!0})],O.prototype,"cursor",null),e([h()],O.prototype,"_selectedManipulator",void 0),e([h()],O.prototype,"_selectedSubTool",null),e([h()],O.prototype,"selectedViewshed",null),e([h()],O.prototype,"selectedViewshedComputedData",null),e([h()],O.prototype,"stagedViewshed",null),e([h()],O.prototype,"grabbing",null),e([h()],O.prototype,"creating",null),e([h()],O.prototype,"isPlacingTarget",null),O=e([u("esri.views.3d.analysis.Viewshed.ViewshedTool")],O);const W=V(),R=V(),U=V(),K=V(),z=p(),F=S(),B={mapPoint:new f,scenePoint:V(),feature:null},G="multiple";export{O as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{rad2deg as r,clamp as e}from"../../../../core/mathUtils.js";import{fromRotation as t}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as o}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{transformMat4 as n,normalize as i,copy as a,angle as s,dot as c,sub as m,add as p,scale as l}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as d}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getNormal as f,fromPositionAndNormal as g,create as u}from"../../../../geometry/support/plane.js";import{viewshedToolManipulatorConfiguration as h}from"./ViewshedConfiguration.js";import{calculateTranslateRotateFromBases as j,calculateInputRotationTransform as b}from"../../interactive/manipulatorUtils.js";import{screenToRenderPlane as x}from"../../interactive/editingTools/dragEventPipeline3D.js";import{headingTiltToDirectionUp as v}from"../../support/cameraUtils.js";import{createDirectionUp as S}from"../../support/cameraUtilsInternal.js";function R({tiltedUpVector:r,rightVector:e,observerRenderSpace:t},o){const n=j(r,e,t,o);return n[12]=0,n[13]=0,n[14]=0,n}function U(t,o,n,s){const j=d(),v=f(n.plane),S=E(o,v);let R;if(Math.abs(S)>h.viewAngleThreshold)R=t.next(x(o,n.plane));else{const r=g(s.targetRenderSpace,n.basis1,u()),a=i(D,n.basis1),f=i(M,n.basis2);R=t.next(x(o,r)).next(r=>{const t=r=>{const t=c(m(V,r,n.origin),f),o=Math.acos(e(t/s.farDistanceRenderSpace,-1,1)),i=Math.sin(o)*s.farDistanceRenderSpace;return p(d(),n.origin,p(d(),l(V,a,i),l(w,f,t)))},o=t(r.renderStart),i=t(r.renderEnd);return{...r,renderStart:o,renderEnd:i}})}return R.next(e=>{"start"===e.action&&a(j,e.renderStart);const t=r(b(j,e.renderEnd,n.origin,v));return{...e,deltaAngle:t}})}function E(e,t){const o=D;e.renderCoordsHelper.toRenderCoords(e.camera.position,o);const n=v(e,o,e.camera.heading,e.camera.tilt,S()).direction;return r(s(n,t))-90}function C(r,e,o,i){return t(A,o,i),n(r,e,A)}const D=d(),M=d(),V=d(),w=d(),A=o();export{R as getViewshedRotationMatrix,C as rotateBy,U as screenToCircleAngle};
2
+ import{rad2deg as r,clamp as e}from"../../../../core/mathUtils.js";import{fromRotation as t}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{transformMat4 as o,normalize as i,copy as a,angle as s,dot as c,sub as m,add as l,scale as p}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as d}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getNormal as f,fromPositionAndNormal as g,create as u}from"../../../../geometry/support/plane.js";import{viewshedToolManipulatorConfiguration as h}from"./ViewshedConfiguration.js";import{calculateTranslateRotateFromBases as j,calculateInputRotationTransform as b}from"../../interactive/manipulatorUtils.js";import{screenToRenderPlane as v}from"../../interactive/editingTools/dragEventPipeline3D.js";import{headingTiltToDirectionUp as x}from"../../support/cameraUtils.js";import{createDirectionUp as S}from"../../support/cameraUtilsInternal.js";function R({tiltedUpVector:r,rightVector:e,elevationAlignedObserverRenderSpace:t},n){const o=j(r,e,t,n);return o[12]=0,o[13]=0,o[14]=0,o}function U(t,n,o,s){const j=d(),x=f(o.plane),S=A(n,x);let R;if(Math.abs(S)>h.viewAngleThreshold)R=t.next(v(n,o.plane));else{const r=g(s.elevationAlignedTargetRenderSpace,o.basis1,u()),a=i(C,o.basis1),f=i(D,o.basis2);R=t.next(v(n,r)).next(r=>{const t=r=>{const t=c(m(M,r,o.origin),f),n=Math.acos(e(t/s.farDistanceRenderSpace,-1,1)),i=Math.sin(n)*s.farDistanceRenderSpace;return l(d(),o.origin,l(d(),p(M,a,i),p(T,f,t)))},n=t(r.renderStart),i=t(r.renderEnd);return{...r,renderStart:n,renderEnd:i}})}return R.next(e=>{"start"===e.action&&a(j,e.renderStart);const t=r(b(j,e.renderEnd,o.origin,x));return{...e,deltaAngle:t}})}function A(e,t){const n=C;e.renderCoordsHelper.toRenderCoords(e.camera.position,n);const o=x(e,n,e.camera.heading,e.camera.tilt,S()).direction;return r(s(o,t))-90}function E(r,e,n,i){return t(V,n,i),o(r,e,V)}const C=d(),D=d(),M=d(),T=d(),V=n();export{R as getViewshedRotationMatrix,E as rotateBy,U as screenToCircleAngle};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{getFeatureId as t,updatePointsFromFeatureReference as s}from"../../../analysis/featureReferenceUtils.js";import"../../../core/has.js";import i from"../../../core/Logger.js";import{mapCollection as r}from"../../../core/mapCollectionUtils.js";import{abortMaybe as o,destroyMaybe as a}from"../../../core/maybe.js";import{watch as d,initial as n,when as l,syncAndInitial as h}from"../../../core/reactiveUtils.js";import{property as p,subclass as c}from"../../../core/accessorSupport/decorators.js";import{copy as u,exactEquals as v}from"../../../core/libs/gl-matrix-2/math/vec3.js";import{create as m}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{canProjectWithoutEngine as w,isLoaded as V}from"../../../geometry/projectionUtils.js";import f from"./AnalysisView3D.js";import{logFailedGeometryProjectionError as y}from"./support/projectionUtils.js";import{ViewshedComputedData as _}from"./Viewshed/ViewshedComputedData.js";import b from"./Viewshed/ViewshedTool.js";import{ViewshedVisualization as g}from"./Viewshed/ViewshedVisualization.js";import{createElevationUpdateHandle as j}from"../support/elevationUpdateUtils.js";import{Intersector as D}from"../webgl-engine/lib/Intersector.js";import{Viewshed as R}from"../webgl-engine/lib/Viewshed.js";import{connectAnalysisViewToTool as C,removeAnalysisViewTool as F,startPlaceOperation as O}from"../../analysis/analysisViewUtils.js";let H=class extends f{constructor(e){super(e),this.type="viewshed-view-3d",this.analysis=null,this.tool=null,this._selectedViewshed=null,this.viewshedComputedDataHandles=null,this.userOperation=null,this._viewshedRenderNode=null,this._intersector=null}get visible(){return super.visible}set visible(e){super.visible=e}get interactive(){return super.interactive}set interactive(e){super.interactive=e}get selectedViewshed(){return this._selectedViewshed}set selectedViewshed(e){this._unselectOtherViewsheds(e),this._selectedViewshed=e}get selectedViewshedComputedData(){return this.tool?.selectedViewshedComputedData}get _isDecoration(){return!this.parent}initialize(){const e=this.view;this._viewshedRenderNode=new R({view:e,selectedViewshed:()=>this.selectedViewshed??this.tool?.stagedViewshed,isDecoration:this._isDecoration}),this._intersector=new D(this.view.state.viewingMode),this._intersector.options.hud=!1,this._intersector.options.store=0,this.viewshedComputedDataHandles=r(()=>this.analysis.viewsheds,t=>{const s=new _({renderCoordsHelper:e.renderCoordsHelper,viewshed:t}),r=Symbol();return this.addHandles([d(()=>({valid:s.valid,canProject:w(s.observer?.spatialReference,this.view.spatialReference)||V()}),({valid:e,canProject:t},r)=>{this.visible&&(e&&t?this._addViewshedsToRenderer(s):r?.valid&&r?.canProject&&this._removeViewshedsFromRenderer(s),t||y(this.analysis,s.observer.spatialReference,i.getLogger(this)))},n),...this._createFeatureReferenceHandles(s)],r),{viewshedComputedData:s,remove:()=>{this.removeHandles(r),this._removeViewshedsFromRenderer(s),s.destroy()}}}),this._visualization=new g({view:e,analysisViewData:this,isDecoration:this._isDecoration}),this.addHandles([d(()=>this.visible,e=>{const t=this.viewshedComputedDataHandles;if(null==t)return;e||(this.selectedViewshed=null);const s=t.map(e=>e.viewshedComputedData).filter(e=>e.valid).toArray();e?this._addViewshedsToRenderer(s):this._removeViewshedsFromRenderer(s)}),d(()=>e.renderCoordsHelper,e=>{this.viewshedComputedDataHandles?.forEach(({viewshedComputedData:t})=>t.renderCoordsHelper=e)}),C(this,b),l(()=>this.interactive,()=>{this._unselectOtherViewsheds(this.selectedViewshed)},h)])}destroy(){this.userOperation=o(this.userOperation),F(this),this._visualization=a(this._visualization);const e=this.viewshedComputedDataHandles;null!=e&&this._removeViewshedsFromRenderer(e.map(e=>e.viewshedComputedData).toArray())}_createFeatureReferenceHandles(e){const{view:t}=this;return[d(()=>[t.state.camera,t.slice.plane,e.viewshed.observer,e.targetRenderSpace,e.verticalFieldOfView,e.horizontalFieldOfView,e.feature],()=>{this._updateObserverFromFeature(t,e)},n),l(()=>e.needUpdateByFeature,()=>{this._updateObserverFromFeature(t,e),e.needUpdateByFeature=!1}),j({view:t,geometry:e.observer,onElevationChanges:()=>e.needUpdateByFeature=!0})]}async createViewsheds(e){await O(this,{placementOptions:e,onToolActivated:e=>e.place("multiple")})}place(e){return O(this,{placementOptions:e,onToolActivated:e=>e.place("single")})}_addViewshedsToRenderer(e){this._viewshedRenderNode.updateViewsheds({adds:e})}_removeViewshedsFromRenderer(e){this._viewshedRenderNode.updateViewsheds({removes:e})}_updateObserverFromFeature(e,i){const r=i.observerRenderSpace,o=i.targetRenderSpace,a=u(m(),r),d={observer:r,observerSurfaceNormal:null,observerAdjusted:a,observerFeatureId:t(i.feature),target:o,targetSurfaceNormal:null,targetAdjusted:u(m(),o),targetFeatureId:null};s(e,this._intersector,d,e=>Math.min(e,.05*i.farDistanceRenderSpace)),i.observerRenderSpaceOverride=v(a,r)?null:a}_unselectOtherViewsheds(e){if(null!=e)for(const t of this.view.tools.items)t!==this.tool&&t instanceof b&&(t.analysisViewData.selectedViewshed=null)}get test(){}};e([p({readOnly:!0})],H.prototype,"type",void 0),e([p({constructOnly:!0,nonNullable:!0})],H.prototype,"analysis",void 0),e([p()],H.prototype,"tool",void 0),e([p()],H.prototype,"_selectedViewshed",void 0),e([p()],H.prototype,"selectedViewshed",null),e([p()],H.prototype,"selectedViewshedComputedData",null),e([p()],H.prototype,"viewshedComputedDataHandles",void 0),e([p()],H.prototype,"userOperation",void 0),e([p()],H.prototype,"_visualization",void 0),e([p()],H.prototype,"_viewshedRenderNode",void 0),H=e([c("esri.views.3d.analysis.ViewshedAnalysisView3D")],H);const U=H;export{U as default};
2
+ import{__decorate as e}from"tslib";import{getFeatureId as t,updatePointsFromFeatureReference as s}from"../../../analysis/featureReferenceUtils.js";import"../../../core/has.js";import i from"../../../core/Logger.js";import{mapCollection as r}from"../../../core/mapCollectionUtils.js";import{abortMaybe as o,destroyMaybe as a}from"../../../core/maybe.js";import{watch as d,initial as n,when as l,syncAndInitial as h}from"../../../core/reactiveUtils.js";import{property as p,subclass as c}from"../../../core/accessorSupport/decorators.js";import{copy as v,exactEquals as m}from"../../../core/libs/gl-matrix-2/math/vec3.js";import{create as u}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{canProjectWithoutEngine as w,isLoaded as V}from"../../../geometry/projectionUtils.js";import f from"./AnalysisView3D.js";import{logFailedGeometryProjectionError as y}from"./support/projectionUtils.js";import{ViewshedComputedData as g}from"./Viewshed/ViewshedComputedData.js";import _ from"./Viewshed/ViewshedTool.js";import{ViewshedVisualization as b}from"./Viewshed/ViewshedVisualization.js";import{createElevationUpdateHandle as j}from"../support/elevationUpdateUtils.js";import{Intersector as R}from"../webgl-engine/lib/Intersector.js";import{Viewshed as D}from"../webgl-engine/lib/Viewshed.js";import{connectAnalysisViewToTool as O,removeAnalysisViewTool as C,startPlaceOperation as F}from"../../analysis/analysisViewUtils.js";let A=class extends f{constructor(e){super(e),this.type="viewshed-view-3d",this.analysis=null,this.tool=null,this._selectedViewshed=null,this.viewshedComputedDataHandles=null,this.userOperation=null,this._viewshedRenderNode=null,this._intersector=null}get visible(){return super.visible}set visible(e){super.visible=e}get interactive(){return super.interactive}set interactive(e){super.interactive=e}get selectedViewshed(){return this._selectedViewshed}set selectedViewshed(e){this._unselectOtherViewsheds(e),this._selectedViewshed=e}get selectedViewshedComputedData(){return this.tool?.selectedViewshedComputedData}get _isDecoration(){return!this.parent}initialize(){const e=this.view;this._viewshedRenderNode=new D({view:e,selectedViewshed:()=>this.selectedViewshed??this.tool?.stagedViewshed,isDecoration:this._isDecoration}),this._intersector=new R(this.view.state.viewingMode),this._intersector.options.hud=!1,this._intersector.options.store=0,this.viewshedComputedDataHandles=r(()=>this.analysis.viewsheds,t=>{const s=new g({view:e,viewshed:t}),r=Symbol();return this.addHandles([d(()=>({valid:s.valid,canProject:w(s.observer?.spatialReference,this.view.spatialReference)||V()}),({valid:e,canProject:t},r)=>{this.visible&&(e&&t?this._addViewshedsToRenderer(s):r?.valid&&r?.canProject&&this._removeViewshedsFromRenderer(s),t||y(this.analysis,s.observer.spatialReference,i.getLogger(this)))},n),j({view:e,geometry:s.observer,onElevationChanges:()=>s.onElevationChange()}),d(()=>[e.state.camera,e.slice.plane,s.elevationAlignedObserverRenderSpace,s.elevationAlignedTargetRenderSpace,s.verticalFieldOfView,s.horizontalFieldOfView,s.feature],()=>{this._updateObserverFromFeature(e,s)},n)],r),{viewshedComputedData:s,remove:()=>{this.removeHandles(r),this._removeViewshedsFromRenderer(s),s.destroy()}}}),this._visualization=new b({view:e,analysisViewData:this,isDecoration:this._isDecoration}),this.addHandles([d(()=>this.visible,e=>{const t=this.viewshedComputedDataHandles;if(null==t)return;e||(this.selectedViewshed=null);const s=t.map(e=>e.viewshedComputedData).filter(e=>e.valid).toArray();e?this._addViewshedsToRenderer(s):this._removeViewshedsFromRenderer(s)}),O(this,_),l(()=>this.interactive,()=>{this._unselectOtherViewsheds(this.selectedViewshed)},h)])}destroy(){this.userOperation=o(this.userOperation),C(this),this._visualization=a(this._visualization);const e=this.viewshedComputedDataHandles;null!=e&&this._removeViewshedsFromRenderer(e.map(e=>e.viewshedComputedData).toArray())}async createViewsheds(e){await F(this,{placementOptions:e,onToolActivated:e=>e.place("multiple")})}place(e){return F(this,{placementOptions:e,onToolActivated:e=>e.place("single")})}_addViewshedsToRenderer(e){this._viewshedRenderNode.updateViewsheds({adds:e})}_removeViewshedsFromRenderer(e){this._viewshedRenderNode.updateViewsheds({removes:e})}_updateObserverFromFeature(e,i){const r=i.elevationAlignedObserverRenderSpace,o=i.elevationAlignedTargetRenderSpace,a=v(u(),r),d={observer:r,observerSurfaceNormal:null,observerAdjusted:a,observerFeatureId:t(i.feature),target:o,targetSurfaceNormal:null,targetAdjusted:v(u(),o),targetFeatureId:null};s(e,this._intersector,d,e=>Math.min(e,.05*i.farDistanceRenderSpace)),i.observerRenderSpaceOverride=m(a,r)?null:a}_unselectOtherViewsheds(e){if(null!=e)for(const t of this.view.tools.items)t!==this.tool&&t instanceof _&&(t.analysisViewData.selectedViewshed=null)}get test(){}};e([p({readOnly:!0})],A.prototype,"type",void 0),e([p({constructOnly:!0,nonNullable:!0})],A.prototype,"analysis",void 0),e([p()],A.prototype,"tool",void 0),e([p()],A.prototype,"_selectedViewshed",void 0),e([p()],A.prototype,"selectedViewshed",null),e([p()],A.prototype,"selectedViewshedComputedData",null),e([p()],A.prototype,"viewshedComputedDataHandles",void 0),e([p()],A.prototype,"userOperation",void 0),e([p()],A.prototype,"_visualization",void 0),e([p()],A.prototype,"_viewshedRenderNode",void 0),A=e([c("esri.views.3d.analysis.ViewshedAnalysisView3D")],A);const S=A;export{S as default};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import{isPromiseLike as r}from"../../core/promiseUtils.js";import{convertToSpatialReferenceUnit as e,convertFromSpatialReferenceUnit as t}from"../../core/units.js";import{create as o}from"../../core/libs/gl-matrix-2/factories/mat4f64.js";import{create as i}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as s}from"../../geometry/ellipsoidUtils.js";import{project as n}from"../../geometry/projectionUtils.js";import{execute as l}from"../../geometry/operators/gx/operatorDensify.js";import{fromPolygon as m,toPolygon as p}from"../../geometry/operators/support/apiConverter.js";import{computeTranslationToOriginAndRotation as a}from"../../geometry/projection/computeTranslationToOriginAndRotation.js";import{earth as c}from"../../geometry/support/Ellipsoid.js";import{t as u}from"../../chunks/vec3.js";import{StencilGeometry as f,StencilGeometryWithOrigin as g}from"./StencilGeometry.js";import{extrudePolygon as d}from"./layers/graphics/extrudeUtils.js";import{computeCentroid as j}from"./layers/graphics/graphicUtils.js";import{polygonToRenderInfoElevationAligned as h}from"./support/renderInfoUtils/polygon.js";const y=2e4;function x(o,i,x){const M=i.renderCoordsHelper,R=1===M.viewingMode,b=i.spatialReference,C=s(b).radius/c.radius,I=e(5e5*C,"meters",b,!0);R||M.worldUpAtPosition([0,0,0],U);const A=b.equals(o.spatialReference)?o:n(o,b),E=Math.max(A.extent.width,A.extent.height),O=t(E,b,"meters",!0),P=Math.max(5*O,y*C),S=v(A,P,R?C/10:C),T=j(S);if(null==T)return null;const k=m(S),z=l(k,I,0,0),D=p(z,b);if(null==D)return null;const G=h(D,i.elevationProvider,M,x,{outlineOutput:"tessellated-indices"});if(r(G))return G;if(null==G||0===G.polygonIndexCount)return null;a(b,[T.x,T.y,0],w,M.spatialReference),q[12]=-w[12],q[13]=-w[13],q[14]=-w[14];const H=d(G,{height:P,worldUp:U,spherical:R,requireElevation:!1,requireNormals:!1,requireSizes:!1});if(null==H)return null;u(H.vertices,H.vertices,q);const N=new f(H.vertices,H.bottomIndices,H.indices,P);return new g(N,[w[12],w[13],w[14]])}function v(r,e,t){const o=-12e5*t,i=Math.max(-e/2,o),s=r.rings.map(r=>r.map(r=>[r[0],r[1],i])),n=r.clone();return n.rings=s,n.hasZ=!0,n}const U=i(),w=o(),q=o();export{x as polygonToVolume};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import r from"../../../Graphic.js";import t from"../../../core/Error.js";import i from"../../../core/Logger.js";import{destroyMaybe as s}from"../../../core/maybe.js";import{throwIfAborted as l,throwIfAbortError as a}from"../../../core/promiseUtils.js";import{syncAndInitial as n,initial as o}from"../../../core/reactiveUtils.js";import{property as u,subclass as d}from"../../../core/accessorSupport/decorators.js";import p from"../../../core/sql/WhereClause.js";import{fallbackObjectIDAttribute as h}from"../../../layers/LayerConstants.js";import"../../../layers/buildingSublayers/BuildingComponentSublayer.js";import y from"../../../layers/support/FeatureFilter.js";import{fixFields as c,unpackFieldNames as g,populateMissingFields as f}from"../../../layers/support/fieldUtils.js";import m from"../../../rest/support/Query.js";import{isNumber as F}from"../../../support/guards.js";import{BuildingSublayerView3DMixin as b}from"./BuildingSublayerView3D.js";import{I3SMeshView3D as _}from"./I3SMeshView3D.js";import{applyFilterMode as w}from"./i3s/BuildingFilterUtil.js";import{createGetFeatureExtent as E}from"./i3s/I3SGeometryUtil.js";import{I3SMeshViewFilter as x}from"./i3s/I3SMeshViewFilter.js";import{I3SQueryEngine as S}from"./i3s/I3SQueryEngine.js";import{I3SQueryFeatureAdapter as j,I3SQueryFeature as v}from"./i3s/I3SQueryFeatureAdapter.js";import{I3SQueryFeatureStore as I}from"./i3s/I3SQueryFeatureStore.js";import{findFieldsCaseInsensitive as Q,getIndexCrs as q}from"./i3s/I3SUtil.js";import{DefinitionExpressionSceneLayerView as L}from"./support/DefinitionExpressionSceneLayerView.js";import{TemporalSceneLayerView as R}from"./support/TemporalSceneLayerView.js";import O from"../../layers/BuildingComponentSublayerView.js";import{hasPopupTemplate as V,getRequiredFields as U,getFetchPopupTemplate as C}from"../../layers/support/popupUtils.js";import{isInEffectiveScaleRange as A}from"../../support/layerViewUtils.js";import{TaskPriority as H}from"../../support/Scheduler.js";let D=class extends(R(L(_(b(O))))){constructor(e){super(e),this.type="building-component-sublayer-3d",this._elevationContext=2,this._supportsLabeling=!1,this.requiredFields=[],this.progressiveLoadFactor=1,this._queryEngine=null}get i3slayer(){return this.sublayer}get layerViewUid(){return this.layerView.uid}get layerId(){return this.sublayer.layer.id}get sublayerId(){return this.sublayer.id}get layerPopupEnabledAndHasTemplate(){return this.sublayer.popupEnabled&&V(this.sublayer,this.layerView.view.popup?.defaultPopupTemplateEnabled)}initialize(){this._updatingHandles.add(()=>this.mergedFilter,e=>{null!=e&&x.checkSupport(e)?null==this._i3sFilter?this._i3sFilter=new x({viewFilter:e,layerFieldsIndex:this.sublayer.fieldsIndex,loadAsyncModule:e=>this._loadAsyncModule(e),addSqlFilter:(e,r)=>this.addSqlFilter(e,r,this.logError),addTimeFilter:(e,r)=>this.addTimeFilter(e,r)}):this._i3sFilter.viewFilter=e:this._i3sFilter=s(this._i3sFilter)},n),this._updatingHandles.add(()=>[this.sublayer.renderer,this.definitionExpressionFields,this.filterExpressionFields],()=>this._updateRequiredFields()),this._updatingHandles.add(()=>this.sublayer.renderer,e=>this._rendererChange(e),o);const e=()=>this._filterChange();this._updatingHandles.add(()=>this.parsedDefinitionExpression,e),this._updatingHandles.add(()=>this._i3sFilter?.sortedObjectIds,e),this._updatingHandles.add(()=>this._i3sFilter?.parsedWhereClause,e),this._updatingHandles.add(()=>this.getTimeFilterDependencies(),e),this._updatingHandles.add(()=>this.mergedFilter,e),this._updatingHandles.add(()=>[this._i3sFilter?.parsedGeometry,this.filter?.spatialRelationship],()=>this._geometryFilterChange()),this._updatingHandles.add(()=>this.parsedFilterExpressions,()=>this._updateSymbologyOverride(),o),this.addResolvingPromise(this._updateRequiredFields())}get lodFactor(){return this.view.qualitySettings.sceneService.objectLoDFactor}get parsedFilterExpressions(){return"Overview"===this.sublayer.modelName?[]:this.layerView.filterExpressions.map(([e,r])=>{let t;try{t=p.create(e,{fieldsIndex:this.sublayer.fieldsIndex})}catch(a){return i.getLogger(this).error("Failed to parse filterExpression: "+a),null}if(!t.isStandardized)return i.getLogger(this).error("filterExpression is using non standard function"),null;const s=[],l=t.fieldNames;return Q(l,this.sublayer.fieldsIndex,{missingFields:s}),s.length>0?(i.getLogger(this).error(`filterExpression references unknown fields: ${s.join(", ")}`),null):[t,r]}).filter(e=>null!=e)}get filter(){return this._get("filter")}set filter(e){this._set("filter",x.checkSupport(e)?e:null)}isUpdating(){return super.isUpdating()||(this._i3sFilter?.updating??!1)}_updateSymbologyOverride(){const e=this.parsedFilterExpressions;e.length>0?this._setSymbologyOverride((r,t)=>{for(const[s,l]of e)try{if(s.testFeature(r))return w(t,l)}catch(i){this.logError(i)}return w(t,null)},this.filterExpressionFields):this._setSymbologyOverride(null,null)}get filterExpressionFields(){return c(this.sublayer.fieldsIndex,this.parsedFilterExpressions.reduce((e,[r])=>e.concat(r.fieldNames),new Array))}get availableFields(){const e=this.sublayer,r=e.fieldsIndex;let t=this.requiredFields;if(e.outFields||e.layer.outFields){const i=[...e.outFields||[],...e.layer.outFields||[]];t=[...g(r,i),...t]}return t=[...t,e.objectIdField??h],c(r,t)}get _graphicOrigin(){return this.sublayer.graphicOrigin}_createLayerGraphic(e){return new r({attributes:e,layer:this.sublayer.layer,sourceLayer:this.sublayer,origin:this._graphicOrigin})}canResume(){return super.canResume()&&A(this.i3slayer.effectiveScaleRange,this.view.scale)&&(!this._controller||this._controller.rootNodeVisible)}async fetchPopupFeaturesFromGraphics(e,r){const t=this._validateFetchPopupFeatures(r);if(t)throw t;if(0===e.length)return[];const s=[],n=[],o=null!=this.sublayer.associatedLayer?await this.sublayer.associatedLayer.load(r):this.sublayer,u=g(this.sublayer.fieldsIndex,await U(o,C(this.sublayer,r)));l(r);const d=new Set;for(const i of e)f(i,u,d)?n.push(i):s.push(i);return 0===n.length?s:(null!=this.sublayer.associatedLayer&&await this.sublayer.associatedLayer.load().catch(()=>i.getLogger(this).warn("Failed to load associated feature layer. Displaying popup attributes from cached attributes.")),this.whenGraphicAttributes(n,Array.from(d)).catch(e=>(a(e),n)).then(e=>s.concat(e)))}async _updateRequiredFields(){const e=c(this.sublayer.fieldsIndex,[...this.sublayer.renderer?await this.sublayer.renderer.getRequiredFields(this.sublayer.fieldsIndex):[],...this.definitionExpressionFields,...this.filterExpressionFields]);this._set("requiredFields",e)}_validateFetchPopupFeatures(e){const{sublayer:r}=this,{popupEnabled:i}=r;return i?C(r,e)?void 0:new t("buildingscenelayerview3d:fetchPopupFeatures","Layer does not define a popup template",{sublayer:r}):new t("buildingscenelayerview3d:fetchPopupFeatures","Popups are disabled",{sublayer:r})}getFilters(){const e=super.getFilters();return this.addSqlFilter(e,this.parsedDefinitionExpression,this.logError),this._i3sFilter?.addFilters(e,this.view,this._controller.crsIndex,this._collection),e}createQuery(){const e={outFields:["*"],returnGeometry:!1,outSpatialReference:this.view.spatialReference};return null!=this.filter?this.filter.createQuery(e):new m(e)}queryExtent(e,r){return this._ensureQueryEngine().executeQueryForExtent(this._ensureQuery(e),r?.signal)}queryFeatureCount(e,r){return this._ensureQueryEngine().executeQueryForCount(this._ensureQuery(e),r?.signal)}queryFeatures(e,r){return this._ensureQueryEngine().executeQuery(this._ensureQuery(e),r?.signal).then(e=>{if(!e?.features)return e;const r=this.sublayer,t=r.layer,i=this._graphicOrigin;for(const s of e.features)s.layer=t,s.sourceLayer=r,s.origin=i;return e})}async queryObjectIds(e,r){return(await this._ensureQueryEngine().executeQueryForIds(this._ensureQuery(e),r?.signal)).filter(F)}_ensureQueryEngine(){return this._queryEngine??=this._createQueryEngine(),this._queryEngine}_createQueryEngine(){const e=E(this.view.spatialReference,this.view.renderSpatialReference,this._collection);return new S({layerView:this,priority:H.FEATURE_QUERY_ENGINE,spatialIndex:new I({featureAdapter:new j({objectIdField:this.sublayer.objectIdField,attributeStorageInfo:this.sublayer.attributeStorageInfo,getFeatureExtent:e}),forAllFeatures:(e,r)=>this._forAllFeatures((r,t,i)=>e(new v(r,t,i)),r,2),getFeatureExtent:e,sourceSpatialReference:q(this.sublayer),viewSpatialReference:this.view.spatialReference})})}_ensureQuery(e){return this._addDefinitionExpressionToQuery(null==e?this.createQuery():m.from(e))}};e([u()],D.prototype,"i3slayer",null),e([u()],D.prototype,"layerView",void 0),e([u()],D.prototype,"lodFactor",null),e([u({readOnly:!0})],D.prototype,"parsedFilterExpressions",null),e([u({type:y})],D.prototype,"filter",null),e([u()],D.prototype,"_i3sFilter",void 0),e([u({type:[String],readOnly:!0})],D.prototype,"filterExpressionFields",null),e([u({type:[String],readOnly:!0})],D.prototype,"requiredFields",void 0),e([u({type:[String],readOnly:!0})],D.prototype,"availableFields",null),e([u()],D.prototype,"_graphicOrigin",null),D=e([d("esri.views.3d.layers.BuildingComponentSublayerView3D")],D);export{D as default};
2
+ import{__decorate as e}from"tslib";import r from"../../../Graphic.js";import t from"../../../core/Error.js";import i from"../../../core/Logger.js";import{destroyMaybe as s}from"../../../core/maybe.js";import{throwIfAborted as l,throwIfAbortError as a}from"../../../core/promiseUtils.js";import{syncAndInitial as n,initial as o}from"../../../core/reactiveUtils.js";import{property as u,subclass as d}from"../../../core/accessorSupport/decorators.js";import p from"../../../core/sql/WhereClause.js";import{fallbackObjectIDAttribute as h}from"../../../layers/LayerConstants.js";import"../../../layers/buildingSublayers/BuildingComponentSublayer.js";import y from"../../../layers/support/FeatureFilter.js";import{fixFields as c,unpackFieldNames as g,populateMissingFields as f}from"../../../layers/support/fieldUtils.js";import m from"../../../rest/support/Query.js";import{isNumber as F}from"../../../support/guards.js";import{BuildingSublayerView3DMixin as b}from"./BuildingSublayerView3D.js";import{I3SMeshView3D as _}from"./I3SMeshView3D.js";import{applyFilterMode as w}from"./i3s/BuildingFilterUtil.js";import{createGetFeatureExtent as E}from"./i3s/I3SGeometryUtil.js";import{I3SMeshViewFilter as x}from"./i3s/I3SMeshViewFilter.js";import{I3SQueryEngine as S}from"./i3s/I3SQueryEngine.js";import{I3SQueryFeatureAdapter as j,I3SQueryFeature as v}from"./i3s/I3SQueryFeatureAdapter.js";import{I3SQueryFeatureStore as I}from"./i3s/I3SQueryFeatureStore.js";import{findFieldsCaseInsensitive as Q,getIndexCrs as q}from"./i3s/I3SUtil.js";import{DefinitionExpressionSceneLayerView as L}from"./support/DefinitionExpressionSceneLayerView.js";import{TemporalSceneLayerView as R}from"./support/TemporalSceneLayerView.js";import O from"../../layers/BuildingComponentSublayerView.js";import{hasPopupTemplate as V,getRequiredFields as U,getFetchPopupTemplate as C}from"../../layers/support/popupUtils.js";import{isInEffectiveScaleRange as A}from"../../support/layerViewUtils.js";import{TaskPriority as H}from"../../support/Scheduler.js";let D=class extends(R(L(_(b(O))))){constructor(e){super(e),this.type="building-component-sublayer-3d",this._elevationContext=2,this._supportsLabeling=!1,this.requiredFields=[],this.progressiveLoadFactor=1,this._queryEngine=null,this.layer=e.sublayer}get layerViewUid(){return this.layerView.uid}get layerId(){return this.sublayer.layer.id}get sublayerId(){return this.sublayer.id}get layerPopupEnabledAndHasTemplate(){return this.sublayer.popupEnabled&&V(this.sublayer,this.layerView.view.popup?.defaultPopupTemplateEnabled)}initialize(){this._updatingHandles.add(()=>this.mergedFilter,e=>{null!=e&&x.checkSupport(e)?null==this._i3sFilter?this._i3sFilter=new x({viewFilter:e,layerFieldsIndex:this.sublayer.fieldsIndex,loadAsyncModule:e=>this._loadAsyncModule(e),addSqlFilter:(e,r)=>this.addSqlFilter(e,r,this.logError),addTimeFilter:(e,r)=>this.addTimeFilter(e,r)}):this._i3sFilter.viewFilter=e:this._i3sFilter=s(this._i3sFilter)},n),this._updatingHandles.add(()=>[this.sublayer.renderer,this.definitionExpressionFields,this.filterExpressionFields],()=>this._updateRequiredFields()),this._updatingHandles.add(()=>this.sublayer.renderer,e=>this._rendererChange(e),o);const e=()=>this._filterChange();this._updatingHandles.add(()=>this.parsedDefinitionExpression,e),this._updatingHandles.add(()=>this._i3sFilter?.sortedObjectIds,e),this._updatingHandles.add(()=>this._i3sFilter?.parsedWhereClause,e),this._updatingHandles.add(()=>this.getTimeFilterDependencies(),e),this._updatingHandles.add(()=>this.mergedFilter,e),this._updatingHandles.add(()=>[this._i3sFilter?.parsedGeometry,this.filter?.spatialRelationship],()=>this._geometryFilterChange()),this._updatingHandles.add(()=>this.parsedFilterExpressions,()=>this._updateSymbologyOverride(),o),this.addResolvingPromise(this._updateRequiredFields())}get lodFactor(){return this.view.qualitySettings.sceneService.objectLoDFactor}get parsedFilterExpressions(){return"Overview"===this.sublayer.modelName?[]:this.layerView.filterExpressions.map(([e,r])=>{let t;try{t=p.create(e,{fieldsIndex:this.sublayer.fieldsIndex})}catch(a){return i.getLogger(this).error("Failed to parse filterExpression: "+a),null}if(!t.isStandardized)return i.getLogger(this).error("filterExpression is using non standard function"),null;const s=[],l=t.fieldNames;return Q(l,this.sublayer.fieldsIndex,{missingFields:s}),s.length>0?(i.getLogger(this).error(`filterExpression references unknown fields: ${s.join(", ")}`),null):[t,r]}).filter(e=>null!=e)}get filter(){return this._get("filter")}set filter(e){this._set("filter",x.checkSupport(e)?e:null)}isUpdating(){return super.isUpdating()||(this._i3sFilter?.updating??!1)}_updateSymbologyOverride(){const e=this.parsedFilterExpressions;e.length>0?this._setSymbologyOverride((r,t)=>{for(const[s,l]of e)try{if(s.testFeature(r))return w(t,l)}catch(i){this.logError(i)}return w(t,null)},this.filterExpressionFields):this._setSymbologyOverride(null,null)}get filterExpressionFields(){return c(this.sublayer.fieldsIndex,this.parsedFilterExpressions.reduce((e,[r])=>e.concat(r.fieldNames),new Array))}get availableFields(){const e=this.sublayer,r=e.fieldsIndex;let t=this.requiredFields;if(e.outFields||e.layer.outFields){const i=[...e.outFields||[],...e.layer.outFields||[]];t=[...g(r,i),...t]}return t=[...t,e.objectIdField??h],c(r,t)}get _graphicOrigin(){return this.sublayer.graphicOrigin}_createLayerGraphic(e){return new r({attributes:e,layer:this.sublayer.layer,sourceLayer:this.sublayer,origin:this._graphicOrigin})}canResume(){return super.canResume()&&A(this.sublayer.effectiveScaleRange,this.view.scale)&&(!this._controller||this._controller.rootNodeVisible)}async fetchPopupFeaturesFromGraphics(e,r){const t=this._validateFetchPopupFeatures(r);if(t)throw t;if(0===e.length)return[];const s=[],n=[],o=null!=this.sublayer.associatedLayer?await this.sublayer.associatedLayer.load(r):this.sublayer,u=g(this.sublayer.fieldsIndex,await U(o,C(this.sublayer,r)));l(r);const d=new Set;for(const i of e)f(i,u,d)?n.push(i):s.push(i);return 0===n.length?s:(null!=this.sublayer.associatedLayer&&await this.sublayer.associatedLayer.load().catch(()=>i.getLogger(this).warn("Failed to load associated feature layer. Displaying popup attributes from cached attributes.")),this.whenGraphicAttributes(n,Array.from(d)).catch(e=>(a(e),n)).then(e=>s.concat(e)))}async _updateRequiredFields(){const e=c(this.sublayer.fieldsIndex,[...this.sublayer.renderer?await this.sublayer.renderer.getRequiredFields(this.sublayer.fieldsIndex):[],...this.definitionExpressionFields,...this.filterExpressionFields]);this._set("requiredFields",e)}_validateFetchPopupFeatures(e){const{sublayer:r}=this,{popupEnabled:i}=r;return i?C(r,e)?void 0:new t("buildingscenelayerview3d:fetchPopupFeatures","Layer does not define a popup template",{sublayer:r}):new t("buildingscenelayerview3d:fetchPopupFeatures","Popups are disabled",{sublayer:r})}getFilters(){const e=super.getFilters();return this.addSqlFilter(e,this.parsedDefinitionExpression,this.logError),this._i3sFilter?.addFilters(e,this.view,this._controller.crsIndex,this._collection),e}createQuery(){const e={outFields:["*"],returnGeometry:!1,outSpatialReference:this.view.spatialReference};return null!=this.filter?this.filter.createQuery(e):new m(e)}queryExtent(e,r){return this._ensureQueryEngine().executeQueryForExtent(this._ensureQuery(e),r?.signal)}queryFeatureCount(e,r){return this._ensureQueryEngine().executeQueryForCount(this._ensureQuery(e),r?.signal)}queryFeatures(e,r){return this._ensureQueryEngine().executeQuery(this._ensureQuery(e),r?.signal).then(e=>{if(!e?.features)return e;const r=this.sublayer,t=r.layer,i=this._graphicOrigin;for(const s of e.features)s.layer=t,s.sourceLayer=r,s.origin=i;return e})}async queryObjectIds(e,r){return(await this._ensureQueryEngine().executeQueryForIds(this._ensureQuery(e),r?.signal)).filter(F)}_ensureQueryEngine(){return this._queryEngine??=this._createQueryEngine(),this._queryEngine}_createQueryEngine(){const e=E(this.view.spatialReference,this.view.renderSpatialReference,this._collection);return new S({layerView:this,priority:H.FEATURE_QUERY_ENGINE,spatialIndex:new I({featureAdapter:new j({objectIdField:this.sublayer.objectIdField,attributeStorageInfo:this.sublayer.attributeStorageInfo,getFeatureExtent:e}),forAllFeatures:(e,r)=>this._forAllFeatures((r,t,i)=>e(new v(r,t,i)),r,2),getFeatureExtent:e,sourceSpatialReference:q(this.sublayer),viewSpatialReference:this.view.spatialReference})})}_ensureQuery(e){return this._addDefinitionExpressionToQuery(null==e?this.createQuery():m.from(e))}};e([u()],D.prototype,"layerView",void 0),e([u()],D.prototype,"lodFactor",null),e([u({readOnly:!0})],D.prototype,"parsedFilterExpressions",null),e([u({type:y})],D.prototype,"filter",null),e([u()],D.prototype,"_i3sFilter",void 0),e([u({type:[String],readOnly:!0})],D.prototype,"filterExpressionFields",null),e([u({type:[String],readOnly:!0})],D.prototype,"requiredFields",void 0),e([u({type:[String],readOnly:!0})],D.prototype,"availableFields",null),e([u()],D.prototype,"_graphicOrigin",null),D=e([d("esri.views.3d.layers.BuildingComponentSublayerView3D")],D);export{D as default};