@arcgis/core 4.34.0-next.92 → 4.34.0-next.93

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 (210) hide show
  1. package/Color.js +1 -1
  2. package/Ground.js +1 -1
  3. package/WebScene.js +1 -1
  4. package/assets/esri/core/workers/RemoteClient.js +1 -1
  5. package/assets/esri/core/workers/chunks/004b13c1db79c9e668b1.js +1 -0
  6. package/assets/esri/core/workers/chunks/{700b5a536f97233bc4af.js → 03b455e9405a8b6fec68.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{a244afea77127e54dd3a.js → 08b0fc6bfe9640ee2525.js} +1 -1
  8. package/assets/esri/core/workers/chunks/0a981061df08da19372c.js +1 -0
  9. package/assets/esri/core/workers/chunks/20003728a679479b14dc.js +1 -0
  10. package/assets/esri/core/workers/chunks/352511dbc67166face40.js +1 -0
  11. package/assets/esri/core/workers/chunks/3acd79a6a0572926a799.js +1 -0
  12. package/assets/esri/core/workers/chunks/3d7923d25734d03a4d27.js +1 -0
  13. package/assets/esri/core/workers/chunks/48133effac2eacc2196e.js +1 -0
  14. package/assets/esri/core/workers/chunks/4dfcd03082be83600f3a.js +1 -0
  15. package/assets/esri/core/workers/chunks/503c81dda242e6077317.js +1 -0
  16. package/assets/esri/core/workers/chunks/{06aed0a5464965be8d52.js → 56b3bb68b61b77138186.js} +1 -1
  17. package/assets/esri/core/workers/chunks/5746c4861af83c1d57a8.js +1 -0
  18. package/assets/esri/core/workers/chunks/5aacd1c6b171c99b41f5.js +1 -0
  19. package/assets/esri/core/workers/chunks/5eb7f6f5121c8830c561.js +1 -0
  20. package/assets/esri/core/workers/chunks/6810ecdeccf4b7eae5e2.js +1 -0
  21. package/assets/esri/core/workers/chunks/6b208f5d423da64c8559.js +1 -0
  22. package/assets/esri/core/workers/chunks/{8bdbd94a59269e216fba.js → 6c3b585b9cb6bb640fb0.js} +1 -1
  23. package/assets/esri/core/workers/chunks/{7a240ab31d9ff2d2c5af.js → 73db6c070b049fe05147.js} +1 -1
  24. package/assets/esri/core/workers/chunks/801451fb572bc5f1f270.js +1 -0
  25. package/assets/esri/core/workers/chunks/82e0d22619dc26920ca9.js +1 -0
  26. package/assets/esri/core/workers/chunks/{6aa349e1adf844df4b5b.js → 8b9a50cfaa5a7df02dad.js} +1 -1
  27. package/assets/esri/core/workers/chunks/8de9e50de0ac66ae1573.js +1 -0
  28. package/assets/esri/core/workers/chunks/8f426cb210a4250517d5.js +1 -0
  29. package/assets/esri/core/workers/chunks/94ddf029698991d853b9.js +1 -0
  30. package/assets/esri/core/workers/chunks/97eb2cfc1f036feea9a9.js +1 -0
  31. package/assets/esri/core/workers/chunks/{a85acb948cc7d22be592.js → 992b1389710d716d3450.js} +1 -1
  32. package/assets/esri/core/workers/chunks/9adecee0ed2f1df3b0d2.js +1 -0
  33. package/assets/esri/core/workers/chunks/a0fab8cd791c33d3895d.js +1 -0
  34. package/assets/esri/core/workers/chunks/{e99fc64b67bb0c71dc34.js → ad67e5eb4b8c0c14cea6.js} +1 -1
  35. package/assets/esri/core/workers/chunks/b5c829e904bc9cb5347d.js +1 -0
  36. package/assets/esri/core/workers/chunks/bec9ddd38c9ab9f2561b.js +1 -0
  37. package/assets/esri/core/workers/chunks/bf9031749d10e7d457b6.js +1 -0
  38. package/assets/esri/core/workers/chunks/bf9d09493fd849ea69fd.js +1 -0
  39. package/assets/esri/core/workers/chunks/{58e2652810143f509fe1.js → c473b15d4d52f0a63d20.js} +1 -1
  40. package/assets/esri/core/workers/chunks/c8e4fe0e3b109eb80e8e.js +1 -0
  41. package/assets/esri/core/workers/chunks/cd0c222a36caa7f80860.js +1 -0
  42. package/assets/esri/core/workers/chunks/ce175801937e80e3c487.js +1 -0
  43. package/assets/esri/core/workers/chunks/{100a0041ee42b0b2fa32.js → e5d974593043d5e2b502.js} +1 -1
  44. package/assets/esri/core/workers/chunks/{1194c2432c31def87db1.js → f71b76c9506178124fa3.js} +1 -1
  45. package/assets/esri/themes/base/_core.scss +0 -2
  46. package/assets/esri/themes/base/widgets/_OrientedImageryViewerNavigationUI.scss +10 -7
  47. package/assets/esri/themes/dark/main.css +1 -1
  48. package/assets/esri/themes/light/main.css +1 -1
  49. package/assets/esri/themes/light/view.css +1 -1
  50. package/chunks/CutFillComposition.glsl.js +15 -3
  51. package/chunks/CutFillMask.glsl.js +1 -1
  52. package/chunks/languageUtils.js +1 -1
  53. package/config.js +1 -1
  54. package/core/CollectionFlattener.js +1 -1
  55. package/editing/sharedTemplates/executor/support/createPresetServiceEdit.js +1 -1
  56. package/geometry/operators/json/graphicBufferOperator.js +1 -1
  57. package/geometry/support/aaBoundingRect.js +1 -1
  58. package/geometry/support/geometryUtils.js +1 -1
  59. package/geometry/support/meshUtils/elevationSampler.js +1 -1
  60. package/geometry/support/meshUtils.js +1 -1
  61. package/geometry/support/triangle.js +1 -1
  62. package/interfaces.d.ts +33 -242
  63. package/kernel.js +1 -1
  64. package/layers/BaseElevationLayer.js +1 -1
  65. package/layers/BaseTileLayer.js +1 -1
  66. package/layers/ElevationLayer.js +1 -1
  67. package/layers/FeatureLayer.js +1 -1
  68. package/layers/GaussianSplatLayer.js +1 -1
  69. package/layers/ImageryTileLayer.js +1 -1
  70. package/layers/ParquetLayer.js +1 -1
  71. package/layers/graphics/sources/ParquetSource.js +1 -1
  72. package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
  73. package/layers/orientedImagery/transformations/updateElevationUtils.js +1 -1
  74. package/layers/support/ElevationQuery.js +1 -1
  75. package/layers/support/ElevationQueryContext.js +5 -0
  76. package/layers/support/ElevationSampler.js +1 -1
  77. package/layers/support/ElevationTile.js +1 -1
  78. package/layers/support/GeometryDescriptor.js +1 -1
  79. package/layers/support/ParquetEncodingLocation.js +1 -1
  80. package/layers/support/ParquetEncodingWkb.js +1 -1
  81. package/layers/support/RasterBandInfo.js +1 -1
  82. package/layers/support/TileElevationSampler.js +5 -0
  83. package/layers/support/TileInfo.js +1 -1
  84. package/layers/support/TileKey.js +1 -1
  85. package/layers/support/TilemapCache.js +1 -1
  86. package/layers/support/layerUtils.js +1 -1
  87. package/layers/support/parquetEncodingUtils.js +5 -0
  88. package/layers/support/parquetUtils.js +1 -1
  89. package/networks/UtilityNetwork.js +1 -1
  90. package/networks/support/typeUtils.js +1 -1
  91. package/package.json +2 -2
  92. package/popup/FieldInfo.js +1 -1
  93. package/rest/networks/support/Association.js +1 -1
  94. package/rest/print.js +1 -1
  95. package/support/revision.js +1 -1
  96. package/symbols/cim/CIMSymbolHelper.js +1 -1
  97. package/symbols/cim/cimAnalyzer.js +1 -1
  98. package/symbols/cim/effects/EffectOffset.js +1 -1
  99. package/views/2d/analysis/ElevationProfile/ElevationProfileLineVisualization2D.js +1 -1
  100. package/views/2d/analysis/ElevationProfileAnalysisView2D.js +1 -1
  101. package/views/2d/engine/Stage.js +1 -1
  102. package/views/2d/engine/flow/BrushFlow.js +1 -1
  103. package/views/2d/engine/vectorTiles/VectorTileRendererHelper3D.js +1 -1
  104. package/views/2d/engine/webgl/Overlay.js +1 -1
  105. package/views/2d/engine/webgl/OverlayMultipoint.js +1 -1
  106. package/views/2d/engine/webgl/SpriteMosaic.js +1 -1
  107. package/views/2d/engine/webgl/TextureManager.js +1 -1
  108. package/views/2d/engine/webgl/animatedFormats/AnimatableTextureResource.js +1 -1
  109. package/views/2d/engine/webgl/animatedFormats/utils.js +1 -1
  110. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerMeshWriter.js +1 -1
  111. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedTechnique.js +1 -1
  112. package/views/2d/engine/webgl/shaderGraph/techniques/fill/ComplexFillTechnique.js +1 -1
  113. package/views/2d/engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillTechnique.js +1 -1
  114. package/views/2d/engine/webgl/shaderGraph/techniques/fill/GradientFillTechnique.js +1 -1
  115. package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternFillTechnique.js +1 -1
  116. package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillTechnique.js +1 -1
  117. package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelTechnique.js +1 -1
  118. package/views/2d/engine/webgl/shaderGraph/techniques/line/GradientStrokeTechnique.js +1 -1
  119. package/views/2d/engine/webgl/shaderGraph/techniques/line/TexturedLineTechnique.js +1 -1
  120. package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerTechnique.js +1 -1
  121. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextTechnique.js +1 -1
  122. package/views/2d/engine/webgl/shaderGraph/utils.js +1 -1
  123. package/views/2d/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiles2D.js +1 -1
  124. package/views/2d/layers/VideoLayerView2D.js +1 -1
  125. package/views/2d/navigation/actions/Pan.js +1 -1
  126. package/views/3d/analysis/ElevationProfile/ElevationProfileLineSceneComputation.js +1 -1
  127. package/views/3d/analysis/ElevationProfile/ElevationProfileLineVisualization3D.js +1 -1
  128. package/views/3d/analysis/ElevationProfile/ElevationProfileVisualization3D.js +1 -1
  129. package/views/3d/analysis/ElevationProfileAnalysisView3D.js +1 -1
  130. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +1 -1
  131. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementTool.js +1 -1
  132. package/views/3d/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiles3D.js +1 -1
  133. package/views/3d/support/hitTest.js +1 -1
  134. package/views/3d/support/pointsOfInterest/StableSurfaceCenter.js +1 -1
  135. package/views/3d/support/popupHitTest.js +1 -1
  136. package/views/3d/terrain/ExtentHelper.js +1 -1
  137. package/views/3d/webgl-engine/lib/CutFillColor.js +1 -1
  138. package/views/3d/webgl-engine/shaders/CutFillComposition.glsl.js +1 -1
  139. package/views/SceneView.js +1 -1
  140. package/views/View2D.js +1 -1
  141. package/views/Viewport2DMixin.js +1 -1
  142. package/views/analysis/ElevationProfile/ElevationProfileController.js +1 -1
  143. package/views/analysis/ElevationProfile/ElevationProfileLineComputation.js +1 -1
  144. package/views/analysis/ElevationProfile/ElevationProfileLineQueryComputation.js +1 -1
  145. package/views/analysis/ElevationProfile/ElevationProfileResult.js +1 -1
  146. package/views/analysis/ExclusiveOperationManager.js +5 -0
  147. package/views/interactive/snapping/featureSources/FeatureServiceSnappingSource.js +1 -1
  148. package/views/interactive/snapping/featureSources/WorkerTileTreeDebugger.js +1 -1
  149. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorker.js +1 -1
  150. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorkerHandle.js +1 -1
  151. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTileStore.js +1 -1
  152. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiledFetcher.js +1 -1
  153. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTilesSimple.js +1 -1
  154. package/views/interactive/snapping/featureSources/featureServiceSource/PendingFeatureTile.js +1 -1
  155. package/views/interactive/snapping/featureSources/queryEngineUtils.js +1 -1
  156. package/views/navigation/Navigation.js +1 -1
  157. package/views/support/GroundViewElevationSampler.js +1 -1
  158. package/views/video/VideoOperationalDataView.js +1 -1
  159. package/widgets/BasemapGallery/support/basemapCompatibilityUtils.js +1 -1
  160. package/widgets/Feature/FeatureExpression.js +1 -1
  161. package/widgets/Feature/FeatureMedia.js +1 -1
  162. package/widgets/Feature/FeatureViewModel.js +1 -1
  163. package/widgets/Feature.js +1 -1
  164. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  165. package/widgets/FeatureTable.js +1 -1
  166. package/widgets/Legend/LegendViewModel.js +1 -1
  167. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  168. package/widgets/OrientedImageryViewer/components/ImageViewer.js +1 -1
  169. package/widgets/OrientedImageryViewer/components/NavigationUI360.js +1 -1
  170. package/widgets/OrientedImageryViewer/components/NavigationUIPanoramicViewModel.js +1 -1
  171. package/widgets/OrientedImageryViewer/services/DepthImageService.js +5 -0
  172. package/widgets/PanoramicViewer.js +1 -1
  173. package/widgets/Sketch/SketchViewModel.js +1 -1
  174. package/assets/esri/core/workers/chunks/08374e5805fcedc1cb57.js +0 -1
  175. package/assets/esri/core/workers/chunks/14114be3afd6d292f89c.js +0 -1
  176. package/assets/esri/core/workers/chunks/2605062e44f2d4e73f14.js +0 -1
  177. package/assets/esri/core/workers/chunks/282c4f3484c605ce7d5e.js +0 -1
  178. package/assets/esri/core/workers/chunks/2e1cc11462846febb3b2.js +0 -1
  179. package/assets/esri/core/workers/chunks/37b5007660535f1c91c6.js +0 -1
  180. package/assets/esri/core/workers/chunks/393274af1804e5b6046a.js +0 -1
  181. package/assets/esri/core/workers/chunks/3ff3e1507220d3869c76.js +0 -1
  182. package/assets/esri/core/workers/chunks/4133ab8720e7e4afa9a6.js +0 -1
  183. package/assets/esri/core/workers/chunks/4d807bfe75108438db83.js +0 -1
  184. package/assets/esri/core/workers/chunks/5ad1985a9e66fb2232ae.js +0 -1
  185. package/assets/esri/core/workers/chunks/5b7a2ee44883b1fb2a5f.js +0 -1
  186. package/assets/esri/core/workers/chunks/614a00a3179f8fe23f45.js +0 -1
  187. package/assets/esri/core/workers/chunks/83065bef261314f9b2c5.js +0 -1
  188. package/assets/esri/core/workers/chunks/8cae725e631d922853c8.js +0 -1
  189. package/assets/esri/core/workers/chunks/8f4cfef97716c3502b0f.js +0 -1
  190. package/assets/esri/core/workers/chunks/9bb6984f24cd5461a754.js +0 -1
  191. package/assets/esri/core/workers/chunks/9f2a3f37fe9b19ef1209.js +0 -1
  192. package/assets/esri/core/workers/chunks/a1196637268b89281780.js +0 -1
  193. package/assets/esri/core/workers/chunks/b240298b8b643a323d34.js +0 -1
  194. package/assets/esri/core/workers/chunks/b47f26d6aa9a2848a677.js +0 -1
  195. package/assets/esri/core/workers/chunks/b661ea374fe38c8e29ca.js +0 -1
  196. package/assets/esri/core/workers/chunks/b8997ae5893afa0298d1.js +0 -1
  197. package/assets/esri/core/workers/chunks/baa48614d9567d5f240d.js +0 -1
  198. package/assets/esri/core/workers/chunks/c20862fe15295a294bbd.js +0 -1
  199. package/assets/esri/core/workers/chunks/c3020747f9001ca6a6e7.js +0 -1
  200. package/assets/esri/core/workers/chunks/c7c76a8a1c47eb62bef1.js +0 -1
  201. package/assets/esri/core/workers/chunks/eea9d49d55c2d1355497.js +0 -1
  202. package/assets/esri/core/workers/chunks/fb6ebb780bb59e252887.js +0 -1
  203. package/assets/esri/core/workers/chunks/ff6d189ba78980d40bb5.js +0 -1
  204. package/assets/esri/themes/base/widgets/_ButtonMenu.scss +0 -87
  205. package/widgets/FeatureTable/Grid/support/ButtonMenu.d.ts +0 -4
  206. package/widgets/FeatureTable/Grid/support/ButtonMenu.js +0 -5
  207. package/widgets/FeatureTable/Grid/support/ButtonMenuItem.d.ts +0 -4
  208. package/widgets/FeatureTable/Grid/support/ButtonMenuItem.js +0 -5
  209. package/widgets/FeatureTable/Grid/support/ButtonMenuViewModel.d.ts +0 -4
  210. package/widgets/FeatureTable/Grid/support/ButtonMenuViewModel.js +0 -5
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../../../Color.js";import i from"../../../Graphic.js";import{destroyMaybe as s}from"../../../core/maybe.js";import{watch as r,initial as l}from"../../../core/reactiveUtils.js";import{property as o}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as a}from"../../../core/accessorSupport/decorators/subclass.js";import n from"../../../layers/GraphicsLayer.js";import m from"../../../layers/support/TelemetryDisplay.js";import{getSymbolDisplayAngle as y}from"../../../layers/video/videoUtils.js";import h from"../../../symbols/SimpleFillSymbol.js";import p from"../../../symbols/SimpleLineSymbol.js";import c from"../../../symbols/SimpleMarkerSymbol.js";import{applyCIMSymbolRotation as b}from"../../../symbols/support/cimSymbolUtils.js";import{symbolTypes as f}from"../../../symbols/support/typeUtils.js";import S from"../engine/webgl/OverlayContainer.js";import u from"../engine/webgl/OverlayMultipoint.js";import{LayerView2DMixin as d}from"./LayerView2D.js";import g from"./graphics/GraphicContainer.js";import _ from"./graphics/GraphicsView2D.js";import L from"../../layers/LayerView.js";const v=new t([255,127,0]),T=10005,w=10018;let O=class extends(d(L)){constructor(){super(...arguments),this._graphicsLayer=new n,this._frameOutlineGraphic=new i({symbol:new h({outline:{type:"simple-line",color:v}})}),this._frameCenterGraphic=new i({symbol:new c({color:v,style:"cross"})}),this._sensorTrailGraphic=new i({symbol:new p({color:v})}),this._sensorSightlineGraphic=new i({symbol:new p({color:v})}),this._sensorLocationGraphic=new i({symbol:new c({color:v})}),this._overlayContainer=null,this._sensorLocationSymbolType=null,this.layer=null,this.sensorLocationSymbol=null,this.symbolAngle=0,this.visibleTelemetryElements=null}destroy(){this._graphicsLayer=s(this._graphicsLayer)}initialize(){this._sensorLocationSymbolType=this.layer?.sensorSymbol.type,this._graphicsLayer.graphics.addMany([this._frameCenterGraphic,this._frameOutlineGraphic,this._sensorLocationGraphic,this._sensorSightlineGraphic,this._sensorTrailGraphic]),this.visibleTelemetryElements=new m({frame:this.layer.telemetryDisplay?.frame??!1,frameCenter:this.layer.telemetryDisplay?.frameCenter??!0,frameOutline:this.layer.telemetryDisplay?.frameOutline??!0,lineOfSight:this.layer.telemetryDisplay?.lineOfSight??!0,sensorLocation:this.layer.telemetryDisplay?.sensorLocation??!0,sensorTrail:this.layer.telemetryDisplay?.sensorTrail??!0})}attach(){this._overlayContainer=new S,this.container.addChild(this._overlayContainer),this._addOverlayMultipoint(),this.graphicsView=new _({requestUpdateCallback:()=>this.requestUpdate(),view:this.view,graphics:this._graphicsLayer.graphics,container:new g(this.view.featuresTilingScheme)}),this.container.addChild(this.graphicsView.container),this.addAttachHandles(this._graphicsLayer.on("graphic-update",this.graphicsView.graphicUpdateHandler)),this.addAttachHandles([r(()=>[this.layer.telemetryDisplay?.frame,this.layer.telemetryDisplay?.frameCenter,this.layer.telemetryDisplay?.frameOutline,this.layer.telemetryDisplay?.sensorLocation,this.layer.telemetryDisplay?.sensorTrail,this.layer.telemetryDisplay?.lineOfSight],()=>this._updateVisibleTelemetryElements(),l),r(()=>[this.layer.telemetry,this.visibleTelemetryElements?.frameCenter,this.visibleTelemetryElements?.frameOutline,this.visibleTelemetryElements?.sensorLocation,this.visibleTelemetryElements?.sensorTrail,this.visibleTelemetryElements?.lineOfSight],()=>this._updateGraphicGeometries(),l),r(()=>this.layer.metadata,()=>this._updateSensorLocationSymbolAngle(),l),r(()=>this.layer?.frameCenterSymbol,()=>this._updateFrameCenterSymbol(),l),r(()=>this.layer?.frameOutlineSymbol,()=>this._updateFrameOutlineSymbol(),l),r(()=>this.layer?.sensorSightLineSymbol,()=>this._updateSensorSightlineSymbol(),l),r(()=>this.layer?.sensorSymbol,()=>this._updateSensorLocationSymbol(),l),r(()=>this.layer?.sensorTrailSymbol,()=>this._updateSensorTrailSymbol(),l),r(()=>this.symbolAngle,()=>this._updateSensorLocationSymbol(),l)])}detach(){this._overlayContainer.removeAllChildren(),this.container.removeAllChildren(),this.graphicsView=s(this.graphicsView)}supportsSpatialReference(e){return!0}moveEnd(){}viewChange(){this.graphicsView.viewChange()}update(e){this.graphicsView.processUpdate(e)}isUpdating(){return!this.graphicsView||this.graphicsView.updating}_updateVisibleTelemetryElements(){this.visibleTelemetryElements&&this.layer.telemetryDisplay&&(this.visibleTelemetryElements.frame=this.layer.telemetryDisplay.frame,this.visibleTelemetryElements.frameCenter=this.layer.telemetryDisplay.frameCenter,this.visibleTelemetryElements.frameOutline=this.layer.telemetryDisplay.frameOutline,this.visibleTelemetryElements.lineOfSight=this.layer.telemetryDisplay.lineOfSight,this.visibleTelemetryElements.sensorLocation=this.layer.telemetryDisplay.sensorLocation,this.visibleTelemetryElements.sensorTrail=this.layer.telemetryDisplay.sensorTrail)}_updateGraphicGeometries(){const{telemetry:e}=this.layer,{visibleTelemetryElements:t}=this;e&&t&&(t.frameOutline&&e.frameOutline?this._frameOutlineGraphic.geometry=this.layer.telemetry.frameOutline:this._frameOutlineGraphic.geometry=null,t.sensorTrail&&e.sensorTrail?this._sensorTrailGraphic.geometry=this.layer.telemetry.sensorTrail:this._sensorTrailGraphic.geometry=null,t.lineOfSight&&e.lineOfSight?this._sensorSightlineGraphic.geometry=this.layer.telemetry.lineOfSight:this._sensorSightlineGraphic.geometry=null,t.sensorLocation&&e.sensorLocation?this._sensorLocationGraphic.geometry=this.layer.telemetry.sensorLocation:this._sensorLocationGraphic.geometry=null,t.frameCenter&&e.frameCenter?this._frameCenterGraphic.geometry=this.layer.telemetry.frameCenter:this._frameCenterGraphic.geometry=null)}_updateSensorLocationSymbolAngle(){if(!this.layer?.metadata?.size)return;const{source:e,symbolOffset:t=0}=this.layer.sensorSymbolOrientation||{};if(!e&&!t)return;const i=this.layer?.metadata?.get(T)?.value??0,s=this.layer?.metadata?.get(w)?.value??0,r=y({cameraAzimuth:s,platformHeading:i,source:this.layer.sensorSymbolOrientation?.source,symbolOffset:this.layer.sensorSymbolOrientation?.symbolOffset??0});this.symbolAngle=Math.round(Math.abs(r))}_updateSensorLocationSymbol(){switch(this._sensorLocationSymbolType){case"simple-marker":this.sensorLocationSymbol=this.layer.sensorSymbol.clone(),this.sensorLocationSymbol.angle=this.symbolAngle,this._sensorLocationGraphic.symbol=this.sensorLocationSymbol.clone();break;case"picture-marker":this.sensorLocationSymbol=this.layer.sensorSymbol,this.sensorLocationSymbol.angle=this.symbolAngle,this._sensorLocationGraphic.symbol=this.sensorLocationSymbol;break;case"cim":this.sensorLocationSymbol=this.layer.sensorSymbol,b(this.sensorLocationSymbol,this.symbolAngle,!0),this._sensorLocationGraphic.symbol=this.sensorLocationSymbol}}_updateFrameCenterSymbol(){this.layer?.frameCenterSymbol&&(this._frameCenterGraphic.symbol=this.layer.frameCenterSymbol.clone())}_updateFrameOutlineSymbol(){this.layer?.frameOutlineSymbol&&(this._frameOutlineGraphic.symbol=this.layer.frameOutlineSymbol.clone())}_updateSensorSightlineSymbol(){this.layer?.sensorSightLineSymbol&&(this._sensorSightlineGraphic.symbol=this.layer.sensorSightLineSymbol.clone())}_updateSensorTrailSymbol(){this.layer?.sensorTrailSymbol&&(this._sensorTrailGraphic.symbol=this.layer.sensorTrailSymbol.clone())}async _addOverlayMultipoint(){if(!this.layer.videoElement)return;const e=new u(this.layer.videoElement);this.addAttachHandles([r(()=>[this.layer.frameHorizonPoints,this.layer.groundControlPoints,this.layer.frameOpacity,this.layer.telemetryDisplay?.frame],()=>{const{visibleTelemetryElements:t}=this;e.frameHorizonPoints=this.layer.frameHorizonPoints,e.groundControlPoints=this.layer.groundControlPoints,e.opacity=this.layer.frameOpacity,e.visible=t?.frame??!1},l)]),this._overlayContainer.addChild(e),this.view.stage.requestRender()}};e([o()],O.prototype,"graphicsView",void 0),e([o()],O.prototype,"layer",void 0),e([o({types:f})],O.prototype,"sensorLocationSymbol",void 0),e([o()],O.prototype,"symbolAngle",void 0),e([o({type:m})],O.prototype,"visibleTelemetryElements",void 0),O=e([a("esri.views.2d.layers.VideoLayerView2D")],O);const C=O;export{C as default};
5
+ import{__decorate as e}from"tslib";import i from"../../../Color.js";import t from"../../../Graphic.js";import{destroyMaybe as s}from"../../../core/maybe.js";import{watch as r,initial as l}from"../../../core/reactiveUtils.js";import{property as o}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as a}from"../../../core/accessorSupport/decorators/subclass.js";import n from"../../../layers/GraphicsLayer.js";import m from"../../../layers/support/TelemetryDisplay.js";import{getSymbolDisplayAngle as y}from"../../../layers/video/videoUtils.js";import h from"../../../symbols/SimpleFillSymbol.js";import p from"../../../symbols/SimpleLineSymbol.js";import c from"../../../symbols/SimpleMarkerSymbol.js";import{applyCIMSymbolRotation as b}from"../../../symbols/support/cimSymbolUtils.js";import{symbolTypes as f}from"../../../symbols/support/typeUtils.js";import u from"../engine/webgl/OverlayContainer.js";import S from"../engine/webgl/OverlayMultipoint.js";import{LayerView2DMixin as d}from"./LayerView2D.js";import g from"./graphics/GraphicContainer.js";import _ from"./graphics/GraphicsView2D.js";import v from"../../layers/LayerView.js";const L=new i([255,127,0]),w=10005,T=10018;let O=class extends(d(v)){constructor(){super(...arguments),this._graphicsLayer=new n,this._frameOutlineGraphic=new t({symbol:new h({outline:{type:"simple-line",color:L}})}),this._frameCenterGraphic=new t({symbol:new c({color:L,style:"cross"})}),this._sensorTrailGraphic=new t({symbol:new p({color:L})}),this._sensorSightlineGraphic=new t({symbol:new p({color:L})}),this._sensorLocationGraphic=new t({symbol:new c({color:L})}),this._overlayContainer=null,this._sensorLocationSymbolType=null,this.layer=null,this.sensorLocationSymbol=null,this.symbolAngle=0,this.visibleTelemetryElements=null}destroy(){this._graphicsLayer=s(this._graphicsLayer)}initialize(){this._sensorLocationSymbolType=this.layer?.sensorSymbol.type,this._graphicsLayer.graphics.addMany([this._frameCenterGraphic,this._frameOutlineGraphic,this._sensorLocationGraphic,this._sensorSightlineGraphic,this._sensorTrailGraphic]),this.visibleTelemetryElements=new m({frame:this.layer.telemetryDisplay?.frame??!1,frameCenter:this.layer.telemetryDisplay?.frameCenter??!0,frameOutline:this.layer.telemetryDisplay?.frameOutline??!0,lineOfSight:this.layer.telemetryDisplay?.lineOfSight??!0,sensorLocation:this.layer.telemetryDisplay?.sensorLocation??!0,sensorTrail:this.layer.telemetryDisplay?.sensorTrail??!0})}attach(){this._overlayContainer=new u,this.container.addChild(this._overlayContainer),this._addOverlayMultipoint(),this.graphicsView=new _({requestUpdateCallback:()=>this.requestUpdate(),view:this.view,graphics:this._graphicsLayer.graphics,container:new g(this.view.featuresTilingScheme)}),this.container.addChild(this.graphicsView.container),this.addAttachHandles(this._graphicsLayer.on("graphic-update",this.graphicsView.graphicUpdateHandler)),this.addAttachHandles([r(()=>[this.layer.telemetryDisplay?.frame,this.layer.telemetryDisplay?.frameCenter,this.layer.telemetryDisplay?.frameOutline,this.layer.telemetryDisplay?.sensorLocation,this.layer.telemetryDisplay?.sensorTrail,this.layer.telemetryDisplay?.lineOfSight],()=>this._updateVisibleTelemetryElements(),l),r(()=>[this.layer.telemetry,this.visibleTelemetryElements?.frameCenter,this.visibleTelemetryElements?.frameOutline,this.visibleTelemetryElements?.sensorLocation,this.visibleTelemetryElements?.sensorTrail,this.visibleTelemetryElements?.lineOfSight],()=>this._updateGraphicGeometries(),l),r(()=>this.layer.metadata,()=>this._updateSensorLocationSymbolAngle(),l),r(()=>this.layer?.frameCenterSymbol,()=>this._updateFrameCenterSymbol(),l),r(()=>this.layer?.frameOutlineSymbol,()=>this._updateFrameOutlineSymbol(),l),r(()=>this.layer?.sensorSightLineSymbol,()=>this._updateSensorSightlineSymbol(),l),r(()=>this.layer?.sensorSymbol,()=>this._updateSensorLocationSymbol(),l),r(()=>this.layer?.sensorTrailSymbol,()=>this._updateSensorTrailSymbol(),l),r(()=>this.symbolAngle,()=>this._updateSensorLocationSymbol(),l)])}detach(){this._overlayContainer.removeAllChildren(),this.container.removeAllChildren(),this.graphicsView=s(this.graphicsView)}supportsSpatialReference(e){return!0}moveEnd(){}viewChange(){this.graphicsView.viewChange()}update(e){this.graphicsView.processUpdate(e)}isUpdating(){return!this.graphicsView||this.graphicsView.updating}_updateVisibleTelemetryElements(){this.view.animationsEnabled&&this.visibleTelemetryElements&&this.layer.telemetryDisplay&&(this.visibleTelemetryElements.frame=this.layer.telemetryDisplay.frame,this.visibleTelemetryElements.frameCenter=this.layer.telemetryDisplay.frameCenter,this.visibleTelemetryElements.frameOutline=this.layer.telemetryDisplay.frameOutline,this.visibleTelemetryElements.lineOfSight=this.layer.telemetryDisplay.lineOfSight,this.visibleTelemetryElements.sensorLocation=this.layer.telemetryDisplay.sensorLocation,this.visibleTelemetryElements.sensorTrail=this.layer.telemetryDisplay.sensorTrail)}_updateGraphicGeometries(){if(!this.view.animationsEnabled)return;const{telemetry:e}=this.layer,{visibleTelemetryElements:i}=this;e&&i&&(i.frameOutline&&e.frameOutline?this._frameOutlineGraphic.geometry=this.layer.telemetry.frameOutline:this._frameOutlineGraphic.geometry=null,i.sensorTrail&&e.sensorTrail?this._sensorTrailGraphic.geometry=this.layer.telemetry.sensorTrail:this._sensorTrailGraphic.geometry=null,i.lineOfSight&&e.lineOfSight?this._sensorSightlineGraphic.geometry=this.layer.telemetry.lineOfSight:this._sensorSightlineGraphic.geometry=null,i.sensorLocation&&e.sensorLocation?this._sensorLocationGraphic.geometry=this.layer.telemetry.sensorLocation:this._sensorLocationGraphic.geometry=null,i.frameCenter&&e.frameCenter?this._frameCenterGraphic.geometry=this.layer.telemetry.frameCenter:this._frameCenterGraphic.geometry=null)}_updateSensorLocationSymbolAngle(){if(!this.view.animationsEnabled)return;if(!this.layer?.metadata?.size)return;const{source:e,symbolOffset:i=0}=this.layer.sensorSymbolOrientation||{};if(!e&&!i)return;const t=this.layer?.metadata?.get(w)?.value??0,s=this.layer?.metadata?.get(T)?.value??0,r=y({cameraAzimuth:s,platformHeading:t,source:this.layer.sensorSymbolOrientation?.source,symbolOffset:this.layer.sensorSymbolOrientation?.symbolOffset??0});this.symbolAngle=Math.round(Math.abs(r))}_updateSensorLocationSymbol(){switch(this._sensorLocationSymbolType){case"simple-marker":this.sensorLocationSymbol=this.layer.sensorSymbol.clone(),this.sensorLocationSymbol.angle=this.symbolAngle,this._sensorLocationGraphic.symbol=this.sensorLocationSymbol.clone();break;case"picture-marker":this.sensorLocationSymbol=this.layer.sensorSymbol,this.sensorLocationSymbol.angle=this.symbolAngle,this._sensorLocationGraphic.symbol=this.sensorLocationSymbol;break;case"cim":this.sensorLocationSymbol=this.layer.sensorSymbol,b(this.sensorLocationSymbol,this.symbolAngle,!0),this._sensorLocationGraphic.symbol=this.sensorLocationSymbol}}_updateFrameCenterSymbol(){this.layer?.frameCenterSymbol&&(this._frameCenterGraphic.symbol=this.layer.frameCenterSymbol.clone())}_updateFrameOutlineSymbol(){this.layer?.frameOutlineSymbol&&(this._frameOutlineGraphic.symbol=this.layer.frameOutlineSymbol.clone())}_updateSensorSightlineSymbol(){this.layer?.sensorSightLineSymbol&&(this._sensorSightlineGraphic.symbol=this.layer.sensorSightLineSymbol.clone())}_updateSensorTrailSymbol(){this.layer?.sensorTrailSymbol&&(this._sensorTrailGraphic.symbol=this.layer.sensorTrailSymbol.clone())}async _addOverlayMultipoint(){if(!this.layer.videoElement)return;const e=new S(this.layer.videoElement);this.addAttachHandles([r(()=>[this.layer.frameHorizonPoints,this.layer.groundControlPoints,this.layer.frameOpacity,this.layer.telemetryDisplay?.frame],()=>{if(!this.view.animationsEnabled)return;const{visibleTelemetryElements:i}=this;e.frameHorizonPoints=this.layer.frameHorizonPoints,e.groundControlPoints=this.layer.groundControlPoints,e.opacity=this.layer.frameOpacity,e.visible=i?.frame??!1},l)]),this._overlayContainer.addChild(e),this.view.stage.requestRender()}};e([o()],O.prototype,"graphicsView",void 0),e([o()],O.prototype,"layer",void 0),e([o({types:f})],O.prototype,"sensorLocationSymbol",void 0),e([o()],O.prototype,"symbolAngle",void 0),e([o({type:m})],O.prototype,"visibleTelemetryElements",void 0),O=e([a("esri.views.2d.layers.VideoLayerView2D")],O);const C=O;export{C as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as t}from"tslib";import i from"../../../../Viewpoint.js";import o from"../../../../core/Accessor.js";import{when as e}from"../../../../core/reactiveUtils.js";import{createScreenPointArray as m}from"../../../../core/screenUtils.js";import{Seconds as s,secondsFromMilliseconds as n}from"../../../../core/time.js";import{property as r}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as a}from"../../../../core/accessorSupport/decorators/subclass.js";import{g as p}from"../../../../chunks/vec32.js";import{create as c,fromValues as h}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import u from"../../../../geometry/Point.js";import{translateBy as d}from"../../viewpointUtils.js";import{PanPlanarMomentumEstimator as v}from"../../../navigation/PanPlanarMomentumEstimator.js";let l=class extends o{constructor(t){super(t),this.animationTime=s(0),this.momentumEstimator=new v(500,6,.92),this.momentum=null,this.tmpMomentum=c(),this.momentumFinished=!1,this.viewpoint=new i({targetGeometry:new u,scale:0,rotation:0}),this._previousDrag=null,this.addHandles(e(()=>this.momentumFinished,()=>this.navigation.stop()))}begin(t,i){this.navigation.begin(),this.momentumEstimator.reset(),this.addToEstimator(i),this._previousDrag=i}update(t,i){this.addToEstimator(i);let o=i.center.x,e=i.center.y;const m=this._previousDrag;o=m?m.center.x-o:-o,e=m?e-m.center.y:e,t.viewpoint=d(this.viewpoint,t.viewpoint,[o||0,e||0]),this._previousDrag=i}end(t,i){this.addToEstimator(i);const o=t.navigation.effectiveMomentumEnabled;this.momentum=o?this.momentumEstimator.evaluateMomentum():null,this.animationTime=s(0),this.momentum&&this.onAnimationUpdate(t),this._previousDrag=null,this.navigation.end()}addToEstimator(t){const i=t.center.x,o=t.center.y,e=m(-i,o),s=h(-i,o,0);this.momentumEstimator.add(e,s,.001*t.timestamp)}onAnimationUpdate(t){this.navigation.animationManager?.animateContinuous(t.viewpoint,(i,o)=>{const{momentum:e,animationTime:m,tmpMomentum:r}=this,a=this.momentumFinished=!e||e.isFinished(m),c=n(o);if(!a){const o=e.valueDelta(m,c);p(r,e.direction,o),d(i,i,r),t.constraints.constrainByGeometry(i)}this.animationTime=s(this.animationTime+c)})}stopMomentumNavigation(){this.momentum&&(this.momentumEstimator.reset(),this.momentum=null,this.navigation.stop())}};t([r()],l.prototype,"momentumFinished",void 0),t([r()],l.prototype,"viewpoint",void 0),t([r()],l.prototype,"navigation",void 0),l=t([a("esri.views.2d.navigation.actions.Pan")],l);export{l as default};
5
+ import{__decorate as t}from"tslib";import i from"../../../../Viewpoint.js";import{prefersReducedMotion as o}from"../../../../core/a11yUtils.js";import e from"../../../../core/Accessor.js";import{when as m}from"../../../../core/reactiveUtils.js";import{createScreenPointArray as s}from"../../../../core/screenUtils.js";import{Seconds as n,secondsFromMilliseconds as r}from"../../../../core/time.js";import{property as a}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as p}from"../../../../core/accessorSupport/decorators/subclass.js";import{g as c}from"../../../../chunks/vec32.js";import{create as h,fromValues as u}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import d from"../../../../geometry/Point.js";import{translateBy as v}from"../../viewpointUtils.js";import{PanPlanarMomentumEstimator as l}from"../../../navigation/PanPlanarMomentumEstimator.js";let g=class extends e{constructor(t){super(t),this.animationTime=n(0),this.momentumEstimator=new l(500,6,.92),this.momentum=null,this.tmpMomentum=h(),this.momentumFinished=!1,this.viewpoint=new i({targetGeometry:new d,scale:0,rotation:0}),this._previousDrag=null,this.addHandles(m(()=>this.momentumFinished,()=>this.navigation.stop()))}begin(t,i){this.navigation.begin(),this.momentumEstimator.reset(),this.addToEstimator(i),this._previousDrag=i}update(t,i){this.addToEstimator(i);let o=i.center.x,e=i.center.y;const m=this._previousDrag;o=m?m.center.x-o:-o,e=m?e-m.center.y:e,t.viewpoint=v(this.viewpoint,t.viewpoint,[o||0,e||0]),this._previousDrag=i}end(t,i){this.addToEstimator(i);const e=t.navigation.momentumEnabled&&!o();this.momentum=e?this.momentumEstimator.evaluateMomentum():null,this.animationTime=n(0),this.momentum&&this.onAnimationUpdate(t),this._previousDrag=null,this.navigation.end()}addToEstimator(t){const i=t.center.x,o=t.center.y,e=s(-i,o),m=u(-i,o,0);this.momentumEstimator.add(e,m,.001*t.timestamp)}onAnimationUpdate(t){this.navigation.animationManager?.animateContinuous(t.viewpoint,(i,o)=>{const{momentum:e,animationTime:m,tmpMomentum:s}=this,a=this.momentumFinished=!e||e.isFinished(m),p=r(o);if(!a){const o=e.valueDelta(m,p);c(s,e.direction,o),v(i,i,s),t.constraints.constrainByGeometry(i)}this.animationTime=n(this.animationTime+p)})}stopMomentumNavigation(){this.momentum&&(this.momentumEstimator.reset(),this.momentum=null,this.navigation.stop())}};t([a()],g.prototype,"momentumFinished",void 0),t([a()],g.prototype,"viewpoint",void 0),t([a()],g.prototype,"navigation",void 0),g=t([p("esri.views.2d.navigation.actions.Pan")],g);export{g as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import{isIterable as t}from"../../../../core/iteratorUtils.js";import{memoize as r}from"../../../../core/memoize.js";import{watch as i}from"../../../../core/reactiveUtils.js";import{getMetersPerVerticalUnitForSR as o}from"../../../../core/unitUtils.js";import{property as n}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as s}from"../../../../core/accessorSupport/decorators/subclass.js";import{i as l}from"../../../../chunks/vec32.js";import{create as a}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as c}from"../../../../geometry/ellipsoidUtils.js";import{create as p,fromPoints as u}from"../../../../geometry/support/ray.js";import{GeometryDescriptor as m}from"../../../../layers/support/GeometryDescriptor.js";import{externalToInternalIntersectOptions as d}from"../../support/hitTest.js";import{Intersector as y}from"../../webgl-engine/lib/Intersector.js";import{toGraphic as f}from"../../webgl-engine/lib/intersectorUtilsConversions.js";import{getInputGraphic as h}from"../../../analysis/ElevationProfile/elevationProfileGeometryUtils.js";import{ElevationProfileLineComputation as v}from"../../../analysis/ElevationProfile/ElevationProfileLineComputation.js";const _=2e5;let w=class extends v{constructor(){super(...arguments),this.type="scene",this.numSamplesForPreview=50,this.numSamplesPerChunk=25,this._getQueryElevationDependenciesMemoized=r((e,t,r,i,o,n,s)=>({inputGraphicUid:j(e),visibleLayers:t,maxIntersectionDistance:r,intersectOptions:i,view:o,stationary:n,spatialReference:s})),this._vecA=a(),this._vecB=a(),this._ray=p()}get minDemResolution(){const e=this._view;if(!e)return null;const t=e.pointsOfInterest?.focus?.worldUnitsPerContentPixel;return null==t?null:t*o(e.spatialReference)}initialize(){const e=()=>this.onInvalidate(this);return this.addHandles([i(()=>this._queryElevationDependencies,e),this.controller.onElevationChange(e)])}async queryElevation(e,{noDataValue:t,signal:r}){const i=this._queryElevationDependencies;if(null==i)throw new Error(`${this.declaredClass}: no dependencies`);const o=this._intersector;if(null==o)throw new Error(`${this.declaredClass}: no view`);const{intersectOptions:n,view:s,spatialReference:a}=i,c=s.renderCoordsHelper,p=s.sceneIntersectionHelper,d=this._vecA,y=this._vecA,f=this._vecB,h=this._ray;if(!a)return{geometry:e,noDataValue:t};const v=await m.fromGeometry(e).project(a,r);if(!v)return{geometry:e,noDataValue:t};const w=v.coordinates,j=w.length;for(let m=0;m<j;++m){const e=w[m];l(f,e.x,e.y,e.z??0),c.toRenderCoords(f,a,f),c.setAltitude(d,_,f);const r=u(d,f,h);p.computeIntersection(r,o,!0,n);const s=g(i,o.results.all);s?(s.getIntersectionPoint(y),c.fromRenderCoords(y,y,a),e.z=y[2]):e.z=t}return{geometry:v.export(),noDataValue:t}}get _queryElevationDependencies(){const e=this._view;return e?this._getQueryElevationDependenciesMemoized(this.controller?.analysis.input,this._visibleLayers,this._maxIntersectionDistance,this._intersectOptions,e,e.stationary,e.spatialReference):null}get _visibleLayers(){return this._view?.map?.allLayers?.filter(e=>e.visible).toArray()??[]}get _intersectOptions(){const e=this._view;if(!e||e.destroyed)return{};const{include:r,exclude:i}=this.profileLine;return d(e,{include:r,exclude:[...this._pointCloudLayers,...t(i)?i:i?[i]:[]]})}get _pointCloudLayers(){const e=this._view;return e?e.allLayerViews.toArray().filter(e=>"point-cloud"===e.layer?.type).map(e=>e.layer):[]}get _view(){const e=this.controller.view;return"3d"===e.type?e:null}get _maxIntersectionDistance(){const e=this._view;return e?.renderCoordsHelper?c(e.spatialReference).radius/e.renderCoordsHelper.unitInMeters:Number.POSITIVE_INFINITY}get _intersector(){const e=this._view;if(!e)return null;const t=new y(e.state.viewingMode),r=t.options;return r.hud=!1,r.invisibleTerrain=!1,r.backfacesTerrain=!1,r.selectionMode=!1,r.store=2,t}};function g({view:e,inputGraphicUid:t,maxIntersectionDistance:r},i){for(const o of i){if(!o.withinDistance(r))continue;const i=f(o,e);if(null==i||j(i)!==t)return o}return null}function j(e){const t=h(e);if(!t)return null;if(t.layer&&"objectIdField"in t.layer){const e=t.attributes[t.layer.objectIdField];if(e)return`o-${t.layer.id}-${e}`}return`u-${t.uid}`}e([n({readOnly:!0})],w.prototype,"minDemResolution",null),e([n()],w.prototype,"_queryElevationDependencies",null),e([n()],w.prototype,"_visibleLayers",null),e([n()],w.prototype,"_intersectOptions",null),e([n()],w.prototype,"_pointCloudLayers",null),e([n()],w.prototype,"_view",null),e([n()],w.prototype,"_maxIntersectionDistance",null),e([n()],w.prototype,"_intersector",null),w=e([s("esri.views.3d.analysis.ElevationProfile.ElevationProfileLineSceneComputation")],w);export{w as ElevationProfileLineSceneComputation};
5
+ import{__decorate as e}from"tslib";import{isIterable as t}from"../../../../core/iteratorUtils.js";import{memoize as r}from"../../../../core/memoize.js";import{watch as i}from"../../../../core/reactiveUtils.js";import{getMetersPerVerticalUnitForSR as o}from"../../../../core/unitUtils.js";import{property as n}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as s}from"../../../../core/accessorSupport/decorators/subclass.js";import{i as l}from"../../../../chunks/vec32.js";import{create as a}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as c}from"../../../../geometry/ellipsoidUtils.js";import{create as p,fromPoints as u}from"../../../../geometry/support/ray.js";import{GeometryDescriptor as m}from"../../../../layers/support/GeometryDescriptor.js";import{externalToInternalIntersectOptions as d}from"../../support/hitTest.js";import{Intersector as y}from"../../webgl-engine/lib/Intersector.js";import{toGraphic as f}from"../../webgl-engine/lib/intersectorUtilsConversions.js";import{getInputGraphic as h}from"../../../analysis/ElevationProfile/elevationProfileGeometryUtils.js";import{ElevationProfileLineComputation as v}from"../../../analysis/ElevationProfile/ElevationProfileLineComputation.js";const _=2e5;let w=class extends v{constructor(){super(...arguments),this.type="scene",this.numSamplesForPreview=50,this.numSamplesPerChunk=25,this._getQueryElevationDependenciesMemoized=r((e,t,r,i,o,n,s)=>({inputGraphicUid:j(e),visibleLayers:t,maxIntersectionDistance:r,intersectOptions:i,view:o,stationary:n,spatialReference:s})),this._vecA=a(),this._vecB=a(),this._ray=p()}get minDemResolution(){const e=this._view;if(!e)return null;const t=e.pointsOfInterest?.focus?.worldUnitsPerContentPixel;return null==t?null:t*o(e.spatialReference)}initialize(){const e=()=>this.onInvalidate(this);return this.addHandles([i(()=>this._queryElevationDependencies,e),this.controller.onElevationChange(e)])}async queryElevation(e,{noDataValue:t,signal:r}){const i=this._queryElevationDependencies;if(null==i)throw new Error(`${this.declaredClass}: no dependencies`);const o=this._intersector;if(null==o)throw new Error(`${this.declaredClass}: no view`);const{intersectOptions:n,view:s,spatialReference:a}=i,c=s.renderCoordsHelper,p=s.sceneIntersectionHelper,d=this._vecA,y=this._vecA,f=this._vecB,h=this._ray;if(!a)return{geometry:e,noDataValue:t};const v=await m.fromGeometry(e).project(a,r);if(!v)return{geometry:e,noDataValue:t};const w=v.coordinates,j=w.length;for(let m=0;m<j;++m){const e=w[m];l(f,e.x,e.y,e.z??0),c.toRenderCoords(f,a,f),c.setAltitude(d,_,f);const r=u(d,f,h);p.computeIntersection(r,o,!0,n);const s=g(i,o.results.all);s?(s.getIntersectionPoint(y),c.fromRenderCoords(y,y,a),e.z=y[2]):e.z=t}return{geometry:v.export(),noDataValue:t}}get _queryElevationDependencies(){const e=this._view;return e?this._getQueryElevationDependenciesMemoized(this.controller?.analysis.input,this._visibleLayers,this._maxIntersectionDistance,this._intersectOptions,e,e.stationary,e.spatialReference):null}get _visibleLayers(){return this._view?.map?.allLayers?.filter(e=>e.visible).toArray()??[]}get _intersectOptions(){const e=this._view;if(!e||e.destroyed)return{};const{include:r,exclude:i}=this.profile;return d(e,{include:r,exclude:[...this._pointCloudLayers,...t(i)?i:i?[i]:[]]})}get _pointCloudLayers(){const e=this._view;return e?e.allLayerViews.toArray().filter(e=>"point-cloud"===e.layer?.type).map(e=>e.layer):[]}get _view(){const e=this.controller.view;return"3d"===e.type?e:null}get _maxIntersectionDistance(){const e=this._view;return e?.renderCoordsHelper?c(e.spatialReference).radius/e.renderCoordsHelper.unitInMeters:Number.POSITIVE_INFINITY}get _intersector(){const e=this._view;if(!e)return null;const t=new y(e.state.viewingMode),r=t.options;return r.hud=!1,r.invisibleTerrain=!1,r.backfacesTerrain=!1,r.selectionMode=!1,r.store=2,t}};function g({view:e,inputGraphicUid:t,maxIntersectionDistance:r},i){for(const o of i){if(!o.withinDistance(r))continue;const i=f(o,e);if(null==i||j(i)!==t)return o}return null}function j(e){const t=h(e);if(!t)return null;if(t.layer&&"objectIdField"in t.layer){const e=t.attributes[t.layer.objectIdField];if(e)return`o-${t.layer.id}-${e}`}return`u-${t.uid}`}e([n({readOnly:!0})],w.prototype,"minDemResolution",null),e([n()],w.prototype,"_queryElevationDependencies",null),e([n()],w.prototype,"_visibleLayers",null),e([n()],w.prototype,"_intersectOptions",null),e([n()],w.prototype,"_pointCloudLayers",null),e([n()],w.prototype,"_view",null),e([n()],w.prototype,"_maxIntersectionDistance",null),e([n()],w.prototype,"_intersector",null),w=e([s("esri.views.3d.analysis.ElevationProfile.ElevationProfileLineSceneComputation")],w);export{w as ElevationProfileLineSceneComputation};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../../../../Color.js";import i from"../../../../core/Accessor.js";import{watch as s,syncAndInitial as o}from"../../../../core/reactiveUtils.js";import{throttle as r}from"../../../../core/throttle.js";import{property as l}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as a}from"../../../../core/accessorSupport/decorators/subclass.js";import{fromValues as n,fromArray as p}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{OutlineVisualElement as m}from"../../interactive/visualElements/OutlineVisualElement.js";import{getConfig as u}from"../../../analysis/ElevationProfile/constants.js";import{getInputGeometry as c}from"../../../analysis/ElevationProfile/elevationProfileGeometryUtils.js";import{createLineGeometry as f}from"../../../analysis/ElevationProfile/elevationProfileVisualizationUtils.js";let v=class extends i{constructor(e){super(e),this._updateGeometryThrottled=r(e=>{e&&(this._visualElement.visible=!0,this._visualElement.geometry=f(e.samples,e.spatialReference))},u().profileLinesUpdateThrottleMillis)}initialize(){this._visualElement=new m({view:this.view,elevationInfo:{mode:"absolute-height",offset:0},innerWidth:0,innerColor:n(0,0,0,0),width:3,falloff:0,renderOccluded:16,isDecoration:!0}),this.addHandles([s(()=>({color:this.getResult()?.computation.profileLine.color,visible:this._effectiveVisible}),({color:e,visible:i})=>{e&&(this._visualElement.color=p(t.toUnitRGBA(e))),this._visualElement.visible=i,i||(this._visualElement.geometry=null)},o),s(()=>c(this.analysisViewData.analysis.input),()=>{this._visualElement.visible=!1,this._visualElement.geometry=null},o),s(()=>this._geometryUpdateParameters,e=>this._updateGeometryThrottled(e),o),this._updateGeometryThrottled])}destroy(){this._visualElement.destroy()}get updating(){return this._updateGeometryThrottled.hasPendingUpdates()}get _result(){return this.getResult()}get _effectiveVisible(){const{analysisViewData:e,_result:t}=this;return e.visible&&null!=t&&t.available&&t.computation.profileLine.viewOptions.lineVisible}get _geometryUpdateParameters(){if(!this._effectiveVisible)return null;const e=this._result;return 1!==e?.progress?null:{samples:e.samples,spatialReference:this.view.spatialReference}}};e([l()],v.prototype,"view",void 0),e([l()],v.prototype,"analysisViewData",void 0),e([l()],v.prototype,"getResult",void 0),e([l()],v.prototype,"updating",null),e([l()],v.prototype,"_result",null),e([l()],v.prototype,"_effectiveVisible",null),e([l()],v.prototype,"_geometryUpdateParameters",null),v=e([a("esri.views.3d.analysis.ElevationProfile.ElevationProfileLineVisualization3D")],v);export{v as ElevationProfileLineVisualization3D};
5
+ import{__decorate as e}from"tslib";import t from"../../../../Color.js";import i from"../../../../core/Accessor.js";import{watch as s,syncAndInitial as o}from"../../../../core/reactiveUtils.js";import{throttle as r}from"../../../../core/throttle.js";import{property as l}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as a}from"../../../../core/accessorSupport/decorators/subclass.js";import{fromValues as n,fromArray as p}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{OutlineVisualElement as m}from"../../interactive/visualElements/OutlineVisualElement.js";import{getConfig as u}from"../../../analysis/ElevationProfile/constants.js";import{getInputGeometry as c}from"../../../analysis/ElevationProfile/elevationProfileGeometryUtils.js";import{createLineGeometry as f}from"../../../analysis/ElevationProfile/elevationProfileVisualizationUtils.js";let v=class extends i{constructor(e){super(e),this._updateGeometryThrottled=r(e=>{e&&(this._visualElement.visible=!0,this._visualElement.geometry=f(e.samples,e.spatialReference))},u().profileLinesUpdateThrottleMillis)}initialize(){this._visualElement=new m({view:this.view,elevationInfo:{mode:"absolute-height",offset:0},innerWidth:0,innerColor:n(0,0,0,0),width:3,falloff:0,renderOccluded:16,isDecoration:!0}),this.addHandles([s(()=>({color:this.getResult()?.computation.profile.color,visible:this._effectiveVisible}),({color:e,visible:i})=>{e&&(this._visualElement.color=p(t.toUnitRGBA(e))),this._visualElement.visible=i,i||(this._visualElement.geometry=null)},o),s(()=>c(this.analysisViewData.analysis.input),()=>{this._visualElement.visible=!1,this._visualElement.geometry=null},o),s(()=>this._geometryUpdateParameters,e=>this._updateGeometryThrottled(e),o),this._updateGeometryThrottled])}destroy(){this._visualElement.destroy()}get updating(){return this._updateGeometryThrottled.hasPendingUpdates()}get _result(){return this.getResult()}get _effectiveVisible(){const{analysisViewData:e,_result:t}=this;return e.visible&&null!=t&&t.available&&t.computation.profile.viewOptions.lineVisible}get _geometryUpdateParameters(){if(!this._effectiveVisible)return null;const e=this._result;return 1!==e?.progress?null:{samples:e.samples,spatialReference:this.view.spatialReference}}};e([l()],v.prototype,"view",void 0),e([l()],v.prototype,"analysisViewData",void 0),e([l()],v.prototype,"getResult",void 0),e([l()],v.prototype,"updating",null),e([l()],v.prototype,"_result",null),e([l()],v.prototype,"_effectiveVisible",null),e([l()],v.prototype,"_geometryUpdateParameters",null),v=e([a("esri.views.3d.analysis.ElevationProfile.ElevationProfileLineVisualization3D")],v);export{v as ElevationProfileLineVisualization3D};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as i}from"tslib";import o from"../../../../core/Accessor.js";import{mapCollection as t}from"../../../../core/mapCollectionUtils.js";import{property as s}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as a}from"../../../../core/accessorSupport/decorators/subclass.js";import{ElevationProfileInputVisualization3D as e}from"./ElevationProfileInputVisualization3D.js";import{ElevationProfileLineVisualization3D as r}from"./ElevationProfileLineVisualization3D.js";import{ElevationProfileHoveredPointsVisualization as n}from"../../../analysis/ElevationProfile/ElevationProfileHoveredPointsVisualization.js";let l=class extends o{constructor(i){super(i)}initialize(){const{view:i,analysisViewData:o}=this;this._hoveredPointsVisualization=new n({view:i,analysisViewData:o}),this._inputVisualization=new e({view:i,analysisViewData:o}),this._lineVisualizations=t(()=>this.analysisViewData.analysis.profiles,t=>new r({view:i,analysisViewData:o,getResult:()=>o.results.find(i=>i.computation.profileLine===t)}))}destroy(){this._inputVisualization.destroy(),this._hoveredPointsVisualization.destroy(),this._lineVisualizations.destroy()}get updating(){return this._inputVisualization.updating||this._lineVisualizations.some(i=>i.updating)}};i([s()],l.prototype,"view",void 0),i([s()],l.prototype,"analysisViewData",void 0),i([s()],l.prototype,"updating",null),l=i([a("esri.views.3d.analysis.ElevationProfile.ElevationProfileVisualization3D")],l);export{l as ElevationProfileVisualization3D};
5
+ import{__decorate as i}from"tslib";import o from"../../../../core/Accessor.js";import{mapCollection as t}from"../../../../core/mapCollectionUtils.js";import{property as s}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as a}from"../../../../core/accessorSupport/decorators/subclass.js";import{ElevationProfileInputVisualization3D as e}from"./ElevationProfileInputVisualization3D.js";import{ElevationProfileLineVisualization3D as r}from"./ElevationProfileLineVisualization3D.js";import{ElevationProfileHoveredPointsVisualization as n}from"../../../analysis/ElevationProfile/ElevationProfileHoveredPointsVisualization.js";let l=class extends o{constructor(i){super(i)}initialize(){const{view:i,analysisViewData:o}=this;this._hoveredPointsVisualization=new n({view:i,analysisViewData:o}),this._inputVisualization=new e({view:i,analysisViewData:o}),this._lineVisualizations=t(()=>this.analysisViewData.analysis.profiles,t=>new r({view:i,analysisViewData:o,getResult:()=>o.results.find(i=>i.computation.profile===t)}))}destroy(){this._inputVisualization.destroy(),this._hoveredPointsVisualization.destroy(),this._lineVisualizations.destroy()}get updating(){return this._inputVisualization.updating||this._lineVisualizations.some(i=>i.updating)}};i([s()],l.prototype,"view",void 0),i([s()],l.prototype,"analysisViewData",void 0),i([s()],l.prototype,"updating",null),l=i([a("esri.views.3d.analysis.ElevationProfile.ElevationProfileVisualization3D")],l);export{l as ElevationProfileVisualization3D};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as t}from"tslib";import{property as e}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import{AnalysisView3D as r}from"./AnalysisView3D.js";import{ElevationProfileLineSceneComputation as i}from"./ElevationProfile/ElevationProfileLineSceneComputation.js";import{ElevationProfileVisualization3D as s}from"./ElevationProfile/ElevationProfileVisualization3D.js";import{ElevationProfileController as l}from"../../analysis/ElevationProfile/ElevationProfileController.js";import{ElevationProfileLineGroundComputation as n}from"../../analysis/ElevationProfile/ElevationProfileLineGroundComputation.js";import{ElevationProfileLineInputComputation as a}from"../../analysis/ElevationProfile/ElevationProfileLineInputComputation.js";import{ElevationProfileLineQueryComputation as p}from"../../analysis/ElevationProfile/ElevationProfileLineQueryComputation.js";import{ElevationProfileTool as c}from"../../analysis/ElevationProfile/ElevationProfileTool.js";let u=class extends r{constructor(t){super(t),this.type="elevation-profile-view-3d",this.analysis=null,this.hoveredPosition=null}initialize(){const{analysis:t,view:e}=this;this._controller=new l({analysis:t,analysisViewData:this,view:e,computationFactory:{create:t=>{switch(t.profileLine.type){case"ground":return new n(t);case"input":return new a(t);case"query":return new p(t);case"scene":return new i(t)}}}}),this._visualization=new s({view:e,analysisViewData:this}),this._sketchTool=new c({view:e,analysisViewData:this})}destroy(){this._controller?.destroy(),this._visualization?.destroy(),this._sketchTool?.destroy()}get effectiveUnits(){return this._controller?.effectiveUnits??{distance:"meters",elevation:"meters"}}get error(){return this._controller?.error}get hoveredPoints(){return this._controller?.hoveredPoints??[]}get interactive(){return super.interactive}set interactive(t){super.interactive=t}get progress(){return this._controller?.progress??0}get results(){return this._controller?.results??[]}get statistics(){return this._controller?.statistics}get updating(){return!0===this._controller?.updating||!0===this._visualization?.updating||!0===this._sketchTool?.updating}get visible(){return super.visible}set visible(t){super.visible=t}get sketchGraphic(){return this._sketchTool?.sketchGraphic}get toolState(){return this._sketchTool?.state??"idle"}place(t){return this._sketchTool.place(t)}pickGraphic(t){return this._sketchTool.pickGraphic(t)}};t([e({readOnly:!0})],u.prototype,"type",void 0),t([e({constructOnly:!0,nonNullable:!0})],u.prototype,"analysis",void 0),t([e({readOnly:!0})],u.prototype,"effectiveUnits",null),t([e({readOnly:!0})],u.prototype,"error",null),t([e()],u.prototype,"hoveredPosition",void 0),t([e()],u.prototype,"hoveredPoints",null),t([e({readOnly:!0})],u.prototype,"progress",null),t([e({readOnly:!0})],u.prototype,"results",null),t([e({readOnly:!0})],u.prototype,"statistics",null),t([e({readOnly:!0})],u.prototype,"updating",null),t([e()],u.prototype,"sketchGraphic",null),t([e()],u.prototype,"toolState",null),t([e()],u.prototype,"_controller",void 0),t([e()],u.prototype,"_visualization",void 0),t([e()],u.prototype,"_sketchTool",void 0),u=t([o("esri.views.3d.analysis.ElevationProfileAnalysisView3D")],u);const h=u;export{h as default};
5
+ import{__decorate as t}from"tslib";import{property as e}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import{AnalysisView3D as r}from"./AnalysisView3D.js";import{ElevationProfileLineSceneComputation as i}from"./ElevationProfile/ElevationProfileLineSceneComputation.js";import{ElevationProfileVisualization3D as s}from"./ElevationProfile/ElevationProfileVisualization3D.js";import{ElevationProfileController as l}from"../../analysis/ElevationProfile/ElevationProfileController.js";import{ElevationProfileLineGroundComputation as n}from"../../analysis/ElevationProfile/ElevationProfileLineGroundComputation.js";import{ElevationProfileLineInputComputation as a}from"../../analysis/ElevationProfile/ElevationProfileLineInputComputation.js";import{ElevationProfileLineQueryComputation as p}from"../../analysis/ElevationProfile/ElevationProfileLineQueryComputation.js";import{ElevationProfileTool as c}from"../../analysis/ElevationProfile/ElevationProfileTool.js";let u=class extends r{constructor(t){super(t),this.type="elevation-profile-view-3d",this.analysis=null,this.hoveredPosition=null}initialize(){const{analysis:t,view:e}=this;this._controller=new l({analysis:t,analysisViewData:this,view:e,computationFactory:{create:t=>{switch(t.profile.type){case"ground":return new n(t);case"input":return new a(t);case"query":return new p(t);case"scene":return new i(t)}}}}),this._visualization=new s({view:e,analysisViewData:this}),this._sketchTool=new c({view:e,analysisViewData:this})}destroy(){this._controller?.destroy(),this._visualization?.destroy(),this._sketchTool?.destroy()}get effectiveUnits(){return this._controller?.effectiveUnits??{distance:"meters",elevation:"meters"}}get error(){return this._controller?.error}get hoveredPoints(){return this._controller?.hoveredPoints??[]}get interactive(){return super.interactive}set interactive(t){super.interactive=t}get progress(){return this._controller?.progress??0}get results(){return this._controller?.results??[]}get statistics(){return this._controller?.statistics}get updating(){return!0===this._controller?.updating||!0===this._visualization?.updating||!0===this._sketchTool?.updating}get visible(){return super.visible}set visible(t){super.visible=t}get sketchGraphic(){return this._sketchTool?.sketchGraphic}get toolState(){return this._sketchTool?.state??"idle"}place(t){return this._sketchTool.place(t)}pickGraphic(t){return this._sketchTool.pickGraphic(t)}};t([e({readOnly:!0})],u.prototype,"type",void 0),t([e({constructOnly:!0,nonNullable:!0})],u.prototype,"analysis",void 0),t([e({readOnly:!0})],u.prototype,"effectiveUnits",null),t([e({readOnly:!0})],u.prototype,"error",null),t([e()],u.prototype,"hoveredPosition",void 0),t([e()],u.prototype,"hoveredPoints",null),t([e({readOnly:!0})],u.prototype,"progress",null),t([e({readOnly:!0})],u.prototype,"results",null),t([e({readOnly:!0})],u.prototype,"statistics",null),t([e({readOnly:!0})],u.prototype,"updating",null),t([e()],u.prototype,"sketchGraphic",null),t([e()],u.prototype,"toolState",null),t([e()],u.prototype,"_controller",void 0),t([e()],u.prototype,"_visualization",void 0),t([e()],u.prototype,"_sketchTool",void 0),u=t([o("esri.views.3d.analysis.ElevationProfileAnalysisView3D")],u);const h=u;export{h as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../../../../Color.js";import"../../../../intl.js";import i from"../../../../core/Accessor.js";import{equals as s}from"../../../../core/arrayUtils.js";import{cyclicalPI as o}from"../../../../core/Cyclical.js";import{destroyMaybe as r}from"../../../../core/maybe.js";import{formatDecimal as l}from"../../../../core/quantityFormatUtils.js";import{watch as n,initial as a}from"../../../../core/reactiveUtils.js";import{adaptiveVolumeUnit as c}from"../../../../core/unitUtils.js";import{property as u}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import{subclass as m}from"../../../../core/accessorSupport/decorators/subclass.js";import{e as h}from"../../../../chunks/earcut.js";import{create as d}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{i as p,n as g,d as y,h as _,e as f}from"../../../../chunks/vec32.js";import{create as v,fromValues as j}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{computeTranslationToOriginAndRotation as L}from"../../../../geometry/projection/computeTranslationToOriginAndRotation.js";import{newDoubleArray as b}from"../../../../geometry/support/DoubleArray.js";import{newIndexArray as C}from"../../../../geometry/support/Indices.js";import{angleAroundAxis as w}from"../../../../geometry/support/vector.js";import{t as G}from"../../../../chunks/vec3.js";import P from"../../../../symbols/support/ElevationInfo.js";import{cutFillConfiguration as V}from"./VolumeMeasurementConfiguration.js";import{LabelVisualElement as F}from"../../interactive/visualElements/LabelVisualElement.js";import{LineVisualElement as A}from"../../interactive/visualElements/LineVisualElement.js";import{OutlineVisualElement as R}from"../../interactive/visualElements/OutlineVisualElement.js";import{EuclideanSegment as x}from"../../interactive/visualElements/support/Segment.js";import{ElevationContext as O}from"../../layers/graphics/ElevationContext.js";import{extrudePolygon as S}from"../../layers/graphics/Graphics3DExtrudeSymbolLayer.js";import{geometryToRenderInfo as D}from"../../support/renderInfoUtils/polygon.js";import{CutFillColor as M,VolumeGeometry as U}from"../../webgl-engine/lib/CutFillColor.js";import{createStipplePatternSimple as E}from"../../webgl-engine/materials/lineStippleUtils.js";import{onLocaleChange as B}from"../../../../intl/locale.js";import{fetchMessageBundle as H}from"../../../../intl/messages.js";import{substitute as T}from"../../../../intl/substitute.js";let I=class extends i{get visible(){return this.analysisViewData.visible&&null!=this.analysisViewData.elevationAlignedGeometry&&null!=this.analysisViewData.targetGeometry}get updating(){return this.loadingMessages}constructor(e){super(e),this.unitsMessages=null,this.messages=null,this.loadingMessages=!0,this._elevationContext=O.fromElevationInfo(new P({mode:"absolute-height"})),this._extrusionHeight=1e4,this._projectionLines=[]}initialize(){const{view:e}=this,i={view:e,isDecoration:!0},s=V,o={...i,width:s.geometryOutlineWidth};this._elevationAlignedGeometry=new R({...o,isDraped:!0,color:t.toUnitRGBA(s.geometryOutlineColor)}),this._targetGeometry=new R(o);const r={...i,attached:!0,width:s.projectionLineWidth,renderOccluded:4,polygonOffset:!0},l={...r,stipplePattern:E(s.projectionLineStippleSize)},c=t.toUnitRGBA(s.cutProjectionLineColor),u=t.toUnitRGBA(s.fillProjectionLineColor);this._cutProjectionLines=new A({...r,color:c}),this._occludedCutProjectionLines=new A({...l,color:c}),this._fillProjectionLines=new A({...r,color:u}),this._occludedFillProjectionLines=new A({...l,color:u});const m={...i,attached:!0};this._cutVolumeLabel=new F(m),this._fillVolumeLabel=new F(m),this._cutFillRenderNode=new M({view:e,cutColor:s.cutColor,fillColor:s.fillColor}),this.addHandles([n(()=>({elevationAlignedGeometry:this.analysisViewData.elevationAlignedGeometry,targetGeometry:this.analysisViewData.targetGeometry}),({elevationAlignedGeometry:e,targetGeometry:t})=>{this._elevationAlignedGeometry.geometry=e,this._targetGeometry.geometry=t},a),n(()=>({interactive:this.analysisViewData.interactive,measureType:this.analysis.measureType,visible:this.visible}),({visible:e,interactive:t,measureType:i})=>{this._elevationAlignedGeometry.visible=e&&!t,this._targetGeometry.visible=e&&"cut-fill"===i},a),n(()=>({elevationAlignedGeometry:this.analysisViewData.elevationAlignedGeometry,targetGeometry:this.analysisViewData.targetGeometry,visible:this.visible}),({elevationAlignedGeometry:e,targetGeometry:t,visible:i})=>this._updateProjectionLines(e,t,i)),n(()=>({interactive:this.analysisViewData.interactive,accentColor:this.view.effectiveTheme.accentColor}),({interactive:e,accentColor:t})=>{this._updateColors(e,t)},a),n(()=>this.analysisViewData.targetGeometry,()=>this._updateCutFillGeometry(),a),n(()=>this.visible,()=>this._updateCutFillVisibility()),n(()=>{const{messages:e,unitsMessages:t,visible:i,analysisViewData:s}=this;return{labelAnchors:s.labelAnchors,effectiveDisplayUnits:s.effectiveDisplayUnits,messages:e,unitsMessages:t,result:s.result,visible:i}},e=>this._updateLabels(e)),n(()=>this.view.state.camera,e=>this._updateProjectionLineOcclusion(e)),B(()=>this._updateMessageBundle())]),this._updateMessageBundle()}destroy(){this._elevationAlignedGeometry=r(this._elevationAlignedGeometry),this._targetGeometry=r(this._targetGeometry),this._cutProjectionLines=r(this._cutProjectionLines),this._occludedCutProjectionLines=r(this._occludedCutProjectionLines),this._fillProjectionLines=r(this._fillProjectionLines),this._occludedFillProjectionLines=r(this._occludedFillProjectionLines),this._cutVolumeLabel=r(this._cutVolumeLabel),this._fillVolumeLabel=r(this._fillVolumeLabel),this._cutFillRenderNode.destroy()}get _config(){return V}_updateProjectionLines(e,t,i){if(this._cutProjectionLines.visible=i,this._occludedCutProjectionLines.visible=i,this._fillProjectionLines.visible=i,this._occludedFillProjectionLines.visible=i,!e||!t)return;const{renderCoordsHelper:o}=this.view,r=[],l=e.spatialReference,n=e.rings[0],a=n.length>1&&s(n[0],n[n.length-1]),c=n.length-(a?1:0);for(let s=0;s<c;++s){const e=n[s],i=p(v(),e[0],e[1],e[2]);o.toRenderCoords(i,l,i);const a=t.rings[0][s],c=p(v(),a[0],a[1],a[2]);o.toRenderCoords(c,l,c);const u=new x(i,c);r.push(u)}e.isClockwise(n)||r.reverse();const u=[],m=[],h=[],d=[],g=[],y=this.view.state.camera;for(let s=0;s<r.length;++s){const i=r[s],o=r[0===s?r.length-1:s-1],l=r[s===r.length-1?0:s+1],n=e.rings[0][s],a=t.rings[0][s],c=n[2]>a[2],p=new k(i,o,l,c);u.push(p),p.updateOccluded(y);const _=p.isOccluded;c?(_?h:m).push(i):(_?g:d).push(i)}this._projectionLines=u,this._cutProjectionLines.setGeometryFromSegments(m),this._occludedCutProjectionLines.setGeometryFromSegments(h),this._fillProjectionLines.setGeometryFromSegments(d),this._occludedFillProjectionLines.setGeometryFromSegments(g)}_updateProjectionLineOcclusion(e){const t=[],i=[],s=[],o=[];let r=!1,l=!1;for(const n of this._projectionLines){n.updateOccluded(e)&&(r||=n.isCut,l||=!n.isCut);const a=n.isOccluded;(n.isCut?a?i:t:a?o:s).push(n.segment)}l&&(this._fillProjectionLines.setGeometryFromSegments(s),this._occludedFillProjectionLines.setGeometryFromSegments(o)),r&&(this._cutProjectionLines.setGeometryFromSegments(t),this._occludedCutProjectionLines.setGeometryFromSegments(i))}_updateColors(e,i){const{geometryOutlineColor:s,cutProjectionLineColor:o,fillProjectionLineColor:r}=this._config;if(e){const e=t.toUnitRGBA(i);this._targetGeometry.color=e,this._cutProjectionLines.color=e,this._occludedCutProjectionLines.color=e,this._fillProjectionLines.color=e,this._occludedFillProjectionLines.color=e}else{this._targetGeometry.color=t.toUnitRGBA(s);const e=t.toUnitRGBA(o);this._cutProjectionLines.color=e,this._occludedCutProjectionLines.color=e;const i=t.toUnitRGBA(r);this._fillProjectionLines.color=i,this._occludedFillProjectionLines.color=i}}_updateLabels(e){const{labelDistance:t}=this._config,{effectiveDisplayUnits:i,labelAnchors:s,messages:o,unitsMessages:r,result:l,visible:n}=e;if(this._cutVolumeLabel.visible=n,this._fillVolumeLabel.visible=n,this._cutVolumeLabel.geometry=s.cut?{type:"point",point:s.cut,callout:{distance:t,offset:0}}:null,this._fillVolumeLabel.geometry=s.fill?{type:"point",point:s.fill,callout:{distance:-t,offset:0}}:null,null==l||null==o||null==r)return this._cutVolumeLabel.text="-",void(this._fillVolumeLabel.text="-");const a=i.volume,c=T(o.labels.cut,{volume:N(r,l.cutVolume,a)}),u=T(o.labels.fill,{volume:N(r,l.fillVolume,a)});this._cutVolumeLabel.text=c,this._fillVolumeLabel.text=u}_updateCutFillVisibility(){this.visible?this._cutFillRenderNode.enable():this._cutFillRenderNode.disable()}_updateCutFillGeometry(){const{renderCoordsHelper:e}=this.view,{targetGeometry:t}=this.analysisViewData;if(!t?.extent)return;const{center:i}=t.extent,s=j(i.x,i.y,0),o=v();e.toRenderCoords(s,t.spatialReference,o);const r=this._getExtrudedVolumes(t,this._extrusionHeight,s),l=this._getExtrudedVolumes(t,-this._extrusionHeight,s);this._cutFillRenderNode.updateGeometries(r,l,o)}_getExtrudedVolumes(e,t,i){const{renderCoordsHelper:s,spatialReference:o,elevationProvider:r}=this.view,l=v(),n=1===s.viewingMode;n||s.worldUpAtPosition([0,0,0],l);const a=D(e,r,s,this._elevationContext),{polygons:c,mapPositions:u,position:m}=a,p=c[0],g=p.count,y=h(p.mapPositions,p.holeIndices,3),_=y.length,f=6*g,j=C(f+_),w=C(_),P=b(3*f),V=b(3*f);S(m,u,y,p,P,null,V,null,j,w,t,l,n);const F=d(),A=d();return L(o,i,F,s.spatialReference),A[12]=-F[12],A[13]=-F[13],A[14]=-F[14],G(P,P,A),new U(P,w,j,V)}async _updateMessageBundle(){this.loadingMessages=!0;try{this.unitsMessages=await H("esri/core/t9n/Units"),this.messages=await H("esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis")}finally{this.loadingMessages=!1}}};function N(e,t,i){return e&&t&&l(e,t,c(t.value,t.unit,i))}e([u({constructOnly:!0})],I.prototype,"view",void 0),e([u({constructOnly:!0})],I.prototype,"analysis",void 0),e([u({constructOnly:!0})],I.prototype,"analysisViewData",void 0),e([u()],I.prototype,"unitsMessages",void 0),e([u()],I.prototype,"messages",void 0),e([u()],I.prototype,"loadingMessages",void 0),e([u({readOnly:!0})],I.prototype,"visible",null),e([u()],I.prototype,"updating",null),I=e([m("esri.views.3d.analysis.VolumeMeasurement.VolumeMeasurementCutFillVisualization")],I);class k{constructor(e,t,i,s){this.segment=e,this.previous=t,this.next=i,this.isCut=s,this._isOccluded=!1,this._n1=v(),this._n2=v();const r=g(z,y(z,e.endRenderSpace,e.startRenderSpace));g(this._n1,_(this._n1,r,g(W,y(W,t.startRenderSpace,e.startRenderSpace)))),g(this._n2,_(this._n2,r,g(W,y(W,e.startRenderSpace,i.startRenderSpace)))),this._isConvex=o.normalize(w(this._n1,this._n2,r))<0}get isOccluded(){return this._isOccluded}updateOccluded(e){y(z,this.segment.startRenderSpace,e.eye);const t=f(this._n1,z)<0,i=f(this._n2,z)<0,s=this._isOccluded;return this._isOccluded=this._isConvex?t&&i:t||i,this._isOccluded!==s}}const z=v(),W=v();export{I as VolumeMeasurementCutFillVisualization};
5
+ import{__decorate as e}from"tslib";import t from"../../../../Color.js";import"../../../../intl.js";import i from"../../../../core/Accessor.js";import{equals as s}from"../../../../core/arrayUtils.js";import{cyclicalPI as o}from"../../../../core/Cyclical.js";import{destroyMaybe as r}from"../../../../core/maybe.js";import{formatDecimal as l}from"../../../../core/quantityFormatUtils.js";import{watch as n,initial as a}from"../../../../core/reactiveUtils.js";import{adaptiveVolumeUnit as c}from"../../../../core/unitUtils.js";import{property as u}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import{subclass as m}from"../../../../core/accessorSupport/decorators/subclass.js";import{e as d}from"../../../../chunks/earcut.js";import{create as h}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{i as p,n as g,d as y,h as _,e as f}from"../../../../chunks/vec32.js";import{create as v,fromValues as j}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{computeTranslationToOriginAndRotation as b}from"../../../../geometry/projection/computeTranslationToOriginAndRotation.js";import{newDoubleArray as L}from"../../../../geometry/support/DoubleArray.js";import{newIndexArray as C}from"../../../../geometry/support/Indices.js";import{angleAroundAxis as w}from"../../../../geometry/support/vector.js";import{t as G}from"../../../../chunks/vec3.js";import P from"../../../../symbols/support/ElevationInfo.js";import{cutFillConfiguration as V}from"./VolumeMeasurementConfiguration.js";import{LabelVisualElement as F}from"../../interactive/visualElements/LabelVisualElement.js";import{LineVisualElement as R}from"../../interactive/visualElements/LineVisualElement.js";import{OutlineVisualElement as A}from"../../interactive/visualElements/OutlineVisualElement.js";import{EuclideanSegment as O}from"../../interactive/visualElements/support/Segment.js";import{ElevationContext as x}from"../../layers/graphics/ElevationContext.js";import{extrudePolygon as S}from"../../layers/graphics/Graphics3DExtrudeSymbolLayer.js";import{geometryToRenderInfo as D}from"../../support/renderInfoUtils/polygon.js";import{CutFillColor as M,VolumeGeometry as U}from"../../webgl-engine/lib/CutFillColor.js";import{createStipplePatternSimple as E}from"../../webgl-engine/materials/lineStippleUtils.js";import{onLocaleChange as B}from"../../../../intl/locale.js";import{fetchMessageBundle as H}from"../../../../intl/messages.js";import{substitute as N}from"../../../../intl/substitute.js";let T=class extends i{get visible(){return this.analysisViewData.visible&&null!=this.analysisViewData.elevationAlignedGeometry&&null!=this.analysisViewData.targetGeometry}get updating(){return this.loadingMessages}constructor(e){super(e),this.unitsMessages=null,this.messages=null,this.loadingMessages=!0,this._elevationContext=x.fromElevationInfo(new P({mode:"absolute-height"})),this._extrusionHeight=1e4,this._projectionLines=[]}initialize(){const{view:e}=this,i={view:e,isDecoration:!0},s=V,o={...i,width:s.geometryOutlineWidth};this._elevationAlignedGeometry=new A({...o,isDraped:!0,color:t.toUnitRGBA(s.geometryOutlineColor)}),this._targetGeometry=new A(o);const r={...i,attached:!0,width:s.projectionLineWidth,renderOccluded:4,polygonOffset:!0},l={...r,stipplePattern:E(s.projectionLineStippleSize)},c=t.toUnitRGBA(s.cutProjectionLineColor),u=t.toUnitRGBA(s.fillProjectionLineColor);this._cutProjectionLines=new R({...r,color:c}),this._occludedCutProjectionLines=new R({...l,color:c}),this._fillProjectionLines=new R({...r,color:u}),this._occludedFillProjectionLines=new R({...l,color:u});const m={...i,attached:!0};this._cutVolumeLabel=new F(m),this._fillVolumeLabel=new F(m),this._cutFillRenderNode=new M({view:e,cutColor:s.cutColor,fillColor:s.fillColor,borderColor:s.geometryOutlineColor}),this.addHandles([n(()=>({elevationAlignedGeometry:this.analysisViewData.elevationAlignedGeometry,targetGeometry:this.analysisViewData.targetGeometry}),({elevationAlignedGeometry:e,targetGeometry:t})=>{this._elevationAlignedGeometry.geometry=e,this._targetGeometry.geometry=t},a),n(()=>({interactive:this.analysisViewData.interactive,measureType:this.analysis.measureType,visible:this.visible}),({visible:e,interactive:t,measureType:i})=>{this._elevationAlignedGeometry.visible=e&&!t,this._targetGeometry.visible=e&&"cut-fill"===i},a),n(()=>({elevationAlignedGeometry:this.analysisViewData.elevationAlignedGeometry,targetGeometry:this.analysisViewData.targetGeometry,visible:this.visible}),({elevationAlignedGeometry:e,targetGeometry:t,visible:i})=>this._updateProjectionLines(e,t,i)),n(()=>({interactive:this.analysisViewData.interactive,accentColor:this.view.effectiveTheme.accentColor}),({interactive:e,accentColor:t})=>{this._updateColors(e,t)},a),n(()=>this.analysisViewData.targetGeometry,()=>this._updateCutFillGeometry(),a),n(()=>this.visible,()=>this._updateCutFillVisibility()),n(()=>{const{messages:e,unitsMessages:t,visible:i,analysisViewData:s}=this;return{labelAnchors:s.labelAnchors,effectiveDisplayUnits:s.effectiveDisplayUnits,messages:e,unitsMessages:t,result:s.result,visible:i}},e=>this._updateLabels(e)),n(()=>this.view.state.camera,e=>this._updateProjectionLineOcclusion(e)),B(()=>this._updateMessageBundle())]),this._updateMessageBundle()}destroy(){this._elevationAlignedGeometry=r(this._elevationAlignedGeometry),this._targetGeometry=r(this._targetGeometry),this._cutProjectionLines=r(this._cutProjectionLines),this._occludedCutProjectionLines=r(this._occludedCutProjectionLines),this._fillProjectionLines=r(this._fillProjectionLines),this._occludedFillProjectionLines=r(this._occludedFillProjectionLines),this._cutVolumeLabel=r(this._cutVolumeLabel),this._fillVolumeLabel=r(this._fillVolumeLabel),this._cutFillRenderNode.destroy()}get _config(){return V}_updateProjectionLines(e,t,i){if(this._cutProjectionLines.visible=i,this._occludedCutProjectionLines.visible=i,this._fillProjectionLines.visible=i,this._occludedFillProjectionLines.visible=i,!e||!t)return;const{renderCoordsHelper:o}=this.view,r=[],l=e.spatialReference,n=e.rings[0],a=n.length>1&&s(n[0],n[n.length-1]),c=n.length-(a?1:0);for(let s=0;s<c;++s){const e=n[s],i=p(v(),e[0],e[1],e[2]);o.toRenderCoords(i,l,i);const a=t.rings[0][s],c=p(v(),a[0],a[1],a[2]);o.toRenderCoords(c,l,c);const u=new O(i,c);r.push(u)}e.isClockwise(n)||r.reverse();const u=[],m=[],d=[],h=[],g=[],y=this.view.state.camera;for(let s=0;s<r.length;++s){const i=r[s],o=r[0===s?r.length-1:s-1],l=r[s===r.length-1?0:s+1],n=e.rings[0][s],a=t.rings[0][s],c=n[2]>a[2],p=new k(i,o,l,c);u.push(p),p.updateOccluded(y);const _=p.isOccluded;c?(_?d:m).push(i):(_?g:h).push(i)}this._projectionLines=u,this._cutProjectionLines.setGeometryFromSegments(m),this._occludedCutProjectionLines.setGeometryFromSegments(d),this._fillProjectionLines.setGeometryFromSegments(h),this._occludedFillProjectionLines.setGeometryFromSegments(g)}_updateProjectionLineOcclusion(e){const t=[],i=[],s=[],o=[];let r=!1,l=!1;for(const n of this._projectionLines){n.updateOccluded(e)&&(r||=n.isCut,l||=!n.isCut);const a=n.isOccluded;(n.isCut?a?i:t:a?o:s).push(n.segment)}l&&(this._fillProjectionLines.setGeometryFromSegments(s),this._occludedFillProjectionLines.setGeometryFromSegments(o)),r&&(this._cutProjectionLines.setGeometryFromSegments(t),this._occludedCutProjectionLines.setGeometryFromSegments(i))}_updateColors(e,i){const{geometryOutlineColor:s,cutProjectionLineColor:o,fillProjectionLineColor:r}=this._config;if(e){const e=t.toUnitRGBA(i);this._targetGeometry.color=e,this._cutProjectionLines.color=e,this._occludedCutProjectionLines.color=e,this._fillProjectionLines.color=e,this._occludedFillProjectionLines.color=e,this._cutFillRenderNode.borderColor=i}else{this._targetGeometry.color=t.toUnitRGBA(s);const e=t.toUnitRGBA(o);this._cutProjectionLines.color=e,this._occludedCutProjectionLines.color=e;const i=t.toUnitRGBA(r);this._fillProjectionLines.color=i,this._occludedFillProjectionLines.color=i,this._cutFillRenderNode.borderColor=s}}_updateLabels(e){const{labelDistance:t}=this._config,{effectiveDisplayUnits:i,labelAnchors:s,messages:o,unitsMessages:r,result:l,visible:n}=e;if(this._cutVolumeLabel.visible=n,this._fillVolumeLabel.visible=n,this._cutVolumeLabel.geometry=s.cut?{type:"point",point:s.cut,callout:{distance:t,offset:0}}:null,this._fillVolumeLabel.geometry=s.fill?{type:"point",point:s.fill,callout:{distance:-t,offset:0}}:null,null==l||null==o||null==r)return this._cutVolumeLabel.text="-",void(this._fillVolumeLabel.text="-");const a=i.volume,c=N(o.labels.cut,{volume:I(r,l.cutVolume,a)}),u=N(o.labels.fill,{volume:I(r,l.fillVolume,a)});this._cutVolumeLabel.text=c,this._fillVolumeLabel.text=u}_updateCutFillVisibility(){this.visible?this._cutFillRenderNode.enable():this._cutFillRenderNode.disable()}_updateCutFillGeometry(){const{renderCoordsHelper:e}=this.view,{targetGeometry:t}=this.analysisViewData;if(!t?.extent)return;const{center:i}=t.extent,s=j(i.x,i.y,0),o=v();e.toRenderCoords(s,t.spatialReference,o);const r=this._getExtrudedVolumes(t,this._extrusionHeight,s),l=this._getExtrudedVolumes(t,-this._extrusionHeight,s);this._cutFillRenderNode.updateGeometries(r,l,o)}_getExtrudedVolumes(e,t,i){const{renderCoordsHelper:s,spatialReference:o,elevationProvider:r}=this.view,l=v(),n=1===s.viewingMode;n||s.worldUpAtPosition([0,0,0],l);const a=D(e,r,s,this._elevationContext),{polygons:c,mapPositions:u,position:m}=a,p=c[0],g=p.count,y=d(p.mapPositions,p.holeIndices,3),_=y.length,f=6*g,j=C(f+_),w=C(_),P=L(3*f),V=L(3*f);S(m,u,y,p,P,null,V,null,j,w,t,l,n);const F=h(),R=h();return b(o,i,F,s.spatialReference),R[12]=-F[12],R[13]=-F[13],R[14]=-F[14],G(P,P,R),new U(P,w,j,V)}async _updateMessageBundle(){this.loadingMessages=!0;try{this.unitsMessages=await H("esri/core/t9n/Units"),this.messages=await H("esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis")}finally{this.loadingMessages=!1}}};function I(e,t,i){return e&&t&&l(e,t,c(t.value,t.unit,i))}e([u({constructOnly:!0})],T.prototype,"view",void 0),e([u({constructOnly:!0})],T.prototype,"analysis",void 0),e([u({constructOnly:!0})],T.prototype,"analysisViewData",void 0),e([u()],T.prototype,"unitsMessages",void 0),e([u()],T.prototype,"messages",void 0),e([u()],T.prototype,"loadingMessages",void 0),e([u({readOnly:!0})],T.prototype,"visible",null),e([u()],T.prototype,"updating",null),T=e([m("esri.views.3d.analysis.VolumeMeasurement.VolumeMeasurementCutFillVisualization")],T);class k{constructor(e,t,i,s){this.segment=e,this.previous=t,this.next=i,this.isCut=s,this._isOccluded=!1,this._n1=v(),this._n2=v();const r=g(z,y(z,e.endRenderSpace,e.startRenderSpace));g(this._n1,_(this._n1,r,g(W,y(W,t.startRenderSpace,e.startRenderSpace)))),g(this._n2,_(this._n2,r,g(W,y(W,e.startRenderSpace,i.startRenderSpace)))),this._isConvex=o.normalize(w(this._n1,this._n2,r))<0}get isOccluded(){return this._isOccluded}updateOccluded(e){y(z,this.segment.startRenderSpace,e.eye);const t=f(this._n1,z)<0,i=f(this._n2,z)<0,s=this._isOccluded;return this._isOccluded=this._isConvex?t&&i:t||i,this._isOccluded!==s}}const z=v(),W=v();export{T as VolumeMeasurementCutFillVisualization};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../../../../Graphic.js";import s from"../../../../core/Accessor.js";import{isSome as i}from"../../../../core/arrayUtils.js";import"../../../../core/has.js";import{makeHandle as a}from"../../../../core/handleUtils.js";import{ignoreAbortErrors as o,isAborted as r,createResolver as h,createAbortError as n,onAbort as c}from"../../../../core/promiseUtils.js";import{watch as p,syncAndInitial as l}from"../../../../core/reactiveUtils.js";import{property as d}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/Logger.js";import{subclass as m}from"../../../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as y}from"../../../../core/support/UpdatingHandles.js";import u from"../../../../layers/GraphicsLayer.js";import _ from"../../../../symbols/SimpleFillSymbol.js";import{isPolygon as g,isPolygonGraphic as k}from"./volumeMeasurementGeometryUtils.js";import{VolumeMeasurementShiftTool as G}from"./VolumeMeasurementShiftTool.js";import{makeAllLayerSnappingOptions as w}from"../../../interactive/snapping/allLayerSnapping.js";import v from"../../../../widgets/Sketch/SketchViewModel.js";const b=Symbol("interactive-operation");let f=class extends s{constructor(e){super(e),this._updatingHandles=new y,this._onUndoRedo=()=>{this._updateGeometryFromSketchGraphic()}}initialize(){const{analysis:e,analysisViewData:t,view:s}=this;this._graphicsLayer=new u({listMode:"hide",internal:!0,elevationInfo:{mode:"on-the-ground"}});const i=w(s,{selfEnabled:!0,excludeInternal:!0});this._sketchViewModel=new v({layer:this._graphicsLayer,view:s,updateOnGraphicClick:!1,defaultUpdateOptions:{reshapeOptions:{shapeOperation:"none"},enableRotation:!1,enableScaling:!1,enableMoveAllGraphics:!1,enableZ:!1,multipleSelectionEnabled:!1,toggleToolOnClick:!1,tool:"reshape"},polygonSymbol:this._polygonSymbol,snappingOptions:i.options}),this.addHandles([this._sketchViewModel.on(["undo","redo"],this._onUndoRedo),p(()=>({map:s.map,internalGraphicsLayer:this._graphicsLayer,state:this.state}),({map:e,internalGraphicsLayer:t,state:s})=>{switch(S(e,t),s){case"idle":case"sketching":break;case"awaiting-sketch":this.analysisViewData.interactive=!0;break;case"reshaping":this._startReshape();break;case"reshaping-disabled":this._stopOperation(),this._ensureUpdatedSketchGraphic()}},l),i]),this._shiftTool=new G({analysis:e,view:s,analysisViewData:t}),this.addHandles(this._shiftTool.on("record-undo",e=>{const t=this._sketchViewModel.activeComponent;"reshape-3d"===t?.type&&t.recordUndo(e.apply,e.undo)})),s.tools.add(this._shiftTool),this.addHandles({remove:()=>s.tools.remove(this._shiftTool)})}destroy(){this._sketchViewModel.destroy();const e=this._graphicsLayer;this.view.map.remove(e),e.destroy()}get sketchGraphic(){return this._get("sketchGraphic")}set sketchGraphic(e){e!==this._get("sketchGraphic")&&(this._set("sketchGraphic",e),this._updateGeometryFromSketchGraphic())}get state(){const{geometry:e}=this.analysis,{interactive:t,visible:s}=this.analysisViewData;return s?this._sketchViewModel.createGraphic?this._sketchViewModel.createGraphic===this.sketchGraphic?"sketching":"awaiting-sketch":e?t?"reshaping":"reshaping-disabled":"idle":"idle"}get updating(){return this._sketchViewModel.updating||this._updatingHandles.updating}get _polygonSymbol(){return new _({color:[0,0,0,0],outline:{color:[0,0,0,0]}})}place(e){return this._startPlaceOperation(e,(t,s)=>{const i=this.analysis.clone(),h=this._sketchViewModel.on("create",e=>{switch(e.state){case"complete":this._updateGeometryFromSketchGraphic(),this._stopOperation();break;case"cancel":this._stopOperation();break;case"active":this._updateGeometryFromSketchGraphic();break;case"start":this.sketchGraphic=e.graphic}});return this._ensureUpdatedSketchGraphic(),this._updatingHandles.addPromise(o(this._sketchViewModel.create("polygon"))),a(()=>(h.remove(),this._sketchViewModel.cancel(),this._updateGeometryFromSketchGraphic(),this.analysis.valid?r(e)||i.equals(this.analysis)?s():void t():(this._clearGeometry(),s())))})}async _startPlaceOperation(e,t){const s=h(),i=t(()=>s.resolve({}),()=>s.reject(n()));return c(e,()=>this._stopOperation()),this._replaceHandles([i,c(e,()=>this._stopOperation())],b),await s.promise}_startReshape(){this._stopOperation();const e=this._sketchViewModel.on("update",e=>{this._updateGeometryFromSketchGraphic(),"complete"===e.state&&("reshaping"===this.state?this._startReshape():this._stopOperation())});this._replaceHandles(a(()=>{e.remove(),this._sketchViewModel.cancel()}),b);const t=this._ensureUpdatedSketchGraphic();t&&this._updatingHandles.addPromise(o(this._sketchViewModel.update(t,{tool:"reshape"})))}_stopOperation(){this.removeHandles(b)}_ensureUpdatedSketchGraphic(){const{geometry:e}=this.analysis;return g(e)?(this.sketchGraphic??=new t({geometry:e,symbol:this._polygonSymbol}),this.sketchGraphic.geometry=e,this._graphicsLayer.add(this.sketchGraphic),this.sketchGraphic):(this.sketchGraphic=null,null)}_clearGeometry(){this.sketchGraphic=null,this.analysis.geometry=null}_updateGeometryFromSketchGraphic(){const e=this.sketchGraphic;this.analysis.geometry=k(e)?e.geometry:null}_replaceHandles(e,t){this.removeHandles(t),this.addHandles((Array.isArray(e)?e:[e]).filter(i),t)}get test(){}};function S(e,t){t&&(t.removeFromParent(),e?.add(t))}e([d({constructOnly:!0})],f.prototype,"analysisViewData",void 0),e([d({constructOnly:!0})],f.prototype,"view",void 0),e([d({constructOnly:!0})],f.prototype,"analysis",void 0),e([d()],f.prototype,"sketchGraphic",null),e([d({nonNullable:!0})],f.prototype,"state",null),e([d()],f.prototype,"updating",null),e([d()],f.prototype,"_polygonSymbol",null),f=e([m("esri.views.3d.analysis.VolumeMeasurement.VolumeMeasurementTool")],f);export{f as default};
5
+ import{__decorate as e}from"tslib";import t from"../../../../Graphic.js";import s from"../../../../core/Accessor.js";import"../../../../core/has.js";import{makeHandle as i}from"../../../../core/handleUtils.js";import{ignoreAbortErrors as a,isAborted as o}from"../../../../core/promiseUtils.js";import{watch as r,syncAndInitial as h}from"../../../../core/reactiveUtils.js";import{property as n}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as c}from"../../../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as l}from"../../../../core/support/UpdatingHandles.js";import p from"../../../../layers/GraphicsLayer.js";import d from"../../../../symbols/SimpleFillSymbol.js";import{isPolygon as m,isPolygonGraphic as y}from"./volumeMeasurementGeometryUtils.js";import{VolumeMeasurementShiftTool as u}from"./VolumeMeasurementShiftTool.js";import{ExclusiveOperationManager as g}from"../../../analysis/ExclusiveOperationManager.js";import{makeAllLayerSnappingOptions as _}from"../../../interactive/snapping/allLayerSnapping.js";import k from"../../../../widgets/Sketch/SketchViewModel.js";let G=class extends s{constructor(e){super(e),this._updatingHandles=new l,this._operationManager=new g,this._onUndoRedo=()=>{this._updateGeometryFromSketchGraphic()}}initialize(){const{analysis:e,analysisViewData:t,view:s}=this;this._graphicsLayer=new p({listMode:"hide",internal:!0,elevationInfo:{mode:"on-the-ground"}});const i=_(s,{selfEnabled:!0,excludeInternal:!0});this._sketchViewModel=new k({layer:this._graphicsLayer,view:s,updateOnGraphicClick:!1,defaultUpdateOptions:{reshapeOptions:{shapeOperation:"none"},enableRotation:!1,enableScaling:!1,enableMoveAllGraphics:!1,enableZ:!1,multipleSelectionEnabled:!1,toggleToolOnClick:!1,tool:"reshape"},polygonSymbol:this._polygonSymbol,snappingOptions:i.options}),this.addHandles([this._sketchViewModel.on(["undo","redo"],this._onUndoRedo),r(()=>({map:s.map,internalGraphicsLayer:this._graphicsLayer,state:this.state}),({map:e,internalGraphicsLayer:t,state:s})=>{switch(w(e,t),s){case"idle":case"reshaping-disabled":this._operationManager.stop(),this._ensureUpdatedSketchGraphic();break;case"reshaping":a(this._startReshape());break;case"awaiting-sketch":this.analysisViewData.interactive=!0}},h),i]),this._shiftTool=new u({analysis:e,view:s,analysisViewData:t}),this.addHandles(this._shiftTool.on("record-undo",e=>{const t=this._sketchViewModel.activeComponent;"reshape-3d"===t?.type&&t.recordUndo(e.apply,e.undo)})),s.tools.add(this._shiftTool),this.addHandles({remove:()=>s.tools.remove(this._shiftTool)})}destroy(){this._operationManager.destroy(),this._sketchViewModel.destroy();const e=this._graphicsLayer;this.view.map.remove(e),e.destroy()}get sketchGraphic(){return this._get("sketchGraphic")}set sketchGraphic(e){e!==this._get("sketchGraphic")&&(this._set("sketchGraphic",e),this._updateGeometryFromSketchGraphic())}get state(){const{geometry:e}=this.analysis,{interactive:t,visible:s}=this.analysisViewData;return s?this._sketchViewModel.createGraphic?this._sketchViewModel.createGraphic===this.sketchGraphic?"sketching":"awaiting-sketch":e?t?"reshaping":"reshaping-disabled":"idle":"idle"}get updating(){return this._sketchViewModel.updating||this._updatingHandles.updating}get _polygonSymbol(){return new d({color:[0,0,0,0],outline:{color:[0,0,0,0]}})}place(e){return this._operationManager.start(async t=>{const s=this.analysis.clone();this._ensureUpdatedSketchGraphic();const a=this._sketchViewModel.on("create",e=>{switch(e.state){case"start":this.sketchGraphic=e.graphic;break;case"active":this._updateGeometryFromSketchGraphic();break;case"complete":this._updateGeometryFromSketchGraphic(),t.stop();break;case"cancel":t.stop()}});t.handles.push(a,i(()=>(a.remove(),this._sketchViewModel.cancel(),this._updateGeometryFromSketchGraphic(),this.analysis.valid?o(e)||s.equals(this.analysis)?t.reject():void t.resolve():(this._clearGeometry(),t.reject())))),await this._updatingHandles.addPromise(this._sketchViewModel.create("polygon"))},e)}_startReshape(){return this._operationManager.start(async e=>{const t=()=>{const e=this._ensureUpdatedSketchGraphic();return e?(this._graphicsLayer.add(e),this._updatingHandles.addPromise(this._sketchViewModel.update(e,{tool:"reshape"}))):Promise.resolve()};if(!this._ensureUpdatedSketchGraphic())return;const s=this._sketchViewModel.on("update",s=>{this._updateGeometryFromSketchGraphic(),"complete"===s.state&&("reshaping"===this.state?a(t()):e.resolve())});e.handles.push(s,i(()=>{s.remove(),this._sketchViewModel.cancel(),e.resolve()})),await t()})}_ensureUpdatedSketchGraphic(){const{geometry:e}=this.analysis;return m(e)?(this.sketchGraphic??=new t({geometry:e,symbol:this._polygonSymbol}),this.sketchGraphic.geometry=e,this.sketchGraphic):(this.sketchGraphic=null,null)}_clearGeometry(){this.sketchGraphic=null,this.analysis.geometry=null}_updateGeometryFromSketchGraphic(){const e=this.sketchGraphic;this.analysis.geometry=y(e)?e.geometry:null}get test(){}};function w(e,t){t&&(t.removeFromParent(),e?.add(t))}e([n({constructOnly:!0})],G.prototype,"analysisViewData",void 0),e([n({constructOnly:!0})],G.prototype,"view",void 0),e([n({constructOnly:!0})],G.prototype,"analysis",void 0),e([n()],G.prototype,"sketchGraphic",null),e([n({nonNullable:!0})],G.prototype,"state",null),e([n()],G.prototype,"updating",null),e([n()],G.prototype,"_polygonSymbol",null),G=e([c("esri.views.3d.analysis.VolumeMeasurement.VolumeMeasurementTool")],G);export{G as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../../../../../../core/Accessor.js";import{equals as r}from"../../../../../../core/arrayUtils.js";import{watch as i}from"../../../../../../core/reactiveUtils.js";import{property as o}from"../../../../../../core/accessorSupport/decorators/property.js";import"../../../../../../core/has.js";import"../../../../../../core/Logger.js";import{subclass as s}from"../../../../../../core/accessorSupport/decorators/subclass.js";import{TileKey as n}from"../../../../../../layers/support/TileKey.js";import{distanceToTile as l}from"../../../../../interactive/snapping/featureSources/featureServiceSource/tileUtils.js";let p=class extends t{get _sortedTilesCoveringView(){const e=(this.view.featureTiles?.tiles?.toArray()??[]).map(c),t=this._effectivePointOfInterest;return null!=t&&e.sort((e,r)=>l(t,e)-l(t,r)),e}get tileInfo(){return this.view.featureTiles?.tilingScheme?.toTileInfo()??null}get tileSize(){return this.view.featureTiles?.tileSize??256}get _effectivePointOfInterest(){const e=this.pointOfInterest;return null!=e?e:this.view.pointsOfInterest?.focus.location}constructor(e){super(e),this.tiles=[],this.pointOfInterest=null}initialize(){this.addHandles([this.view.enableFeatureTiles(),i(()=>this._sortedTilesCoveringView,e=>this._set("tiles",e),{initial:!0,equals:(e,t)=>r(e,t,(e,t)=>e.id===t.id)})])}};function c({lij:[e,t,r],extent:i}){return new n(`${e}/${t}/${r}`,e,t,r,i)}e([o({readOnly:!0})],p.prototype,"tiles",void 0),e([o({readOnly:!0})],p.prototype,"_sortedTilesCoveringView",null),e([o({readOnly:!0})],p.prototype,"tileInfo",null),e([o({readOnly:!0})],p.prototype,"tileSize",null),e([o({constructOnly:!0})],p.prototype,"view",void 0),e([o()],p.prototype,"pointOfInterest",void 0),e([o()],p.prototype,"_effectivePointOfInterest",null),p=e([s("esri.views.3d.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTiles3D")],p);export{p as FeatureServiceTiles3D};
5
+ import{__decorate as e}from"tslib";import t from"../../../../../../core/Accessor.js";import{equals as r}from"../../../../../../core/arrayUtils.js";import{watch as i}from"../../../../../../core/reactiveUtils.js";import{property as o}from"../../../../../../core/accessorSupport/decorators/property.js";import"../../../../../../core/has.js";import"../../../../../../core/Logger.js";import{subclass as s}from"../../../../../../core/accessorSupport/decorators/subclass.js";import{create as n}from"../../../../../../geometry/support/aaBoundingRect.js";import{TileKey as l}from"../../../../../../layers/support/TileKey.js";import{distanceToTile as p}from"../../../../../interactive/snapping/featureSources/featureServiceSource/tileUtils.js";let c=class extends t{get _sortedTilesCoveringView(){const e=(this.view.featureTiles?.tiles?.toArray()??[]).map(a),t=this._effectivePointOfInterest;return null!=t&&e.sort((e,r)=>p(t,e)-p(t,r)),e}get tileInfo(){return this.view.featureTiles?.tilingScheme?.toTileInfo()??null}get tileSize(){return this.view.featureTiles?.tileSize??256}get _effectivePointOfInterest(){const e=this.pointOfInterest;return null!=e?e:this.view.pointsOfInterest?.focus.location}constructor(e){super(e),this.tiles=[],this.pointOfInterest=null}initialize(){this.addHandles([this.view.enableFeatureTiles(),i(()=>this._sortedTilesCoveringView,e=>this._set("tiles",e),{initial:!0,equals:(e,t)=>r(e,t,(e,t)=>e.id===t.id)})])}};function a({lij:[e,t,r],extent:i}){return new l(e,t,r,i??n())}e([o({readOnly:!0})],c.prototype,"tiles",void 0),e([o({readOnly:!0})],c.prototype,"_sortedTilesCoveringView",null),e([o({readOnly:!0})],c.prototype,"tileInfo",null),e([o({readOnly:!0})],c.prototype,"tileSize",null),e([o({constructOnly:!0})],c.prototype,"view",void 0),e([o()],c.prototype,"pointOfInterest",void 0),e([o()],c.prototype,"_effectivePointOfInterest",null),c=e([s("esri.views.3d.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTiles3D")],c);export{c as FeatureServiceTiles3D};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../Graphic.js";import{isIterable as n}from"../../../core/iteratorUtils.js";import{screenPointObjectToArray as i,createScreenPointArray as t}from"../../../core/screenUtils.js";import{create as r}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import s from"../../../geometry/Point.js";import l from"../../../geometry/SpatialReference.js";import{projectVectorToVector as o}from"../../../geometry/projection/projectVectorToVector.js";import{fallbackObjectIDAttribute as c}from"../../../layers/LayerConstants.js";import{isIntegratedMeshLayer as a}from"../../../layers/support/layerUtils.js";import{debugFlags as u}from"./debugFlags.js";import{getElevationAtPoint as d}from"./ElevationProvider.js";import{Intersector as p}from"../webgl-engine/lib/Intersector.js";import{isValidIntersectorResult as m}from"../webgl-engine/lib/IntersectorResult.js";import{toHit as f,toOwner as g}from"../webgl-engine/lib/intersectorUtilsConversions.js";import{terrainId as y}from"../webgl-engine/lib/verticalOffsetUtils.js";async function h(e,n,i,r){const s=i?x(e,i):r,l=t(n.x,n.y);s.requiresGroundFeedback=!0,s.enableDraped=!0;const o=new p(e.state.viewingMode);o.options.selectionMode=!0,o.options.store=2,e.sceneIntersectionHelper.intersectIntersectorScreen(l,o,s);const c=await b(e,o.results.all,s.graphics),d=o.results.ground,f=g(d,e),y=null!=f&&"type"in f&&a(f.type)?f:null,h={screenPoint:n,results:c,ground:{mapPoint:U(e,d),distance:m(d)?d.distanceInRenderSpace:0,layer:y}};return u.SCENEVIEW_HITTEST_RETURN_INTERSECTOR&&(h.intersector=o),h}function w(e,n,t,r){const s=t?x(e,t):r,l=!(!s.graphics?.include&&!s.graphics?.exclude),o=!(!s.mediaElements?.include&&!s.mediaElements?.exclude),c=i(n);s.enableDraped=s.include&&!s.include.has(y)||s.exclude?.has(y);const a=e.sceneIntersectionHelper,u=new p(e.state.viewingMode);if(u.options.selectionMode=!0,u.options.store=l||o?2:0,u.options.excludeLabels=t?.excludeLabels??!1,a.intersectIntersectorScreen(c,u,s),l||o){for(const n of u.results.all){const i=f(n,e);if(null==i)return U(e,n);if(l&&("graphic"!==i.type||E(s.graphics,i.graphic)))return U(e,n);if(o&&("media"!==i.type||S(s.mediaElements,i.element)))return U(e,n)}return null}return U(e,u.results.min)}async function b(e,n,i){const t=new Array;let r,s=null;const l={defer(e){r=e()}};for(let o=0;o<n.length;o++){const c=n[o],u=g(c,e);if(null!=u&&(u===e.map.ground||"type"in u&&a(u.type)))break;const d=f(c,e,l)??await r;if(r=null,null==d)continue;if("graphic"===d.type){if(null==s&&o!==n.length-1&&(s=new Set),null!=s){const e=j(d.graphic);if(s.has(e))continue;s.add(e)}if(!E(i,d.graphic))continue}const p=U(e,c),m=c.distanceInRenderSpace;if("media"===d.type){const e=d.element.toSource(p);t.push({...d,mapPoint:p,distance:m,sourcePoint:e})}else t.push({...d,mapPoint:p,distance:m})}return t}function U(e,n,i){return n.getIntersectionPoint(C)?(i=V(e,C,i),7===n.intersector&&e.basemapTerrain&&(i.z=d(e.basemapTerrain,i)??0),i):null}function j(e){const n=e.getObjectId()??e.attributes?.[c];return e.origin&&null!=n?`o-${e.origin.id}-${n}`:`u-${e.uid}`}function E(e,n){return S(e,j(n))}function S(e,n){return null==e||(null==e.include||e.include.has(n))&&(null==e.exclude||!e.exclude.has(n))}function V(e,n,i){let t=e.spatialReference||l.WGS84;return o(n,e.renderSpatialReference,C,t)?n=C:(t=l.WGS84,o(n,e.renderSpatialReference,C,t)&&(n=C)),i?(i.x=n[0],i.y=n[1],i.z=n[2],i.spatialReference=t):i=new s(n,t),i}function x(e,n){const i=I(e,n.include,0),t=I(e,n.exclude,1);return{include:i.layerViewUids,exclude:t.layerViewUids,graphics:{include:i.graphicUids,exclude:t.graphicUids},mediaElements:{include:i.mediaElements,exclude:t.mediaElements}}}function I(i,t,r,s=new R){if(!t)return s;if(t instanceof e)M(s,j(t)),0===r&&(null!=i.graphicsView&&t.layer===i?P(s,i.graphicsView.uid):t.layer&&T(s,i,t.layer.uid));else if("layer"in t&&"element"in t)L(s,t.element),0===r&&T(s,i,t.layer.uid);else if(n(t))for(const e of t)e===i.graphics&&null!=i.graphicsView?P(s,i.graphicsView.uid):e===i.map.ground?P(s,y):I(i,e,r,s);else"layer"in t&&v(s,i,t),"uid"in t&&T(s,i,t.uid);return s}class R{constructor(){this.layerViewUids=null,this.graphicUids=null,this.mediaElements=null}}function T(e,n,i){const t=n.allLayerViews.find(e=>e.layer.uid===i);t&&P(e,t.uid)}function P(e,n){e.layerViewUids??=new Map,e.layerViewUids.set(n,!0)}function v(e,n,i){const t=n.allLayerViews.find(e=>e.layer.uid===i.layer.uid);if(!t)return;e.layerViewUids??=new Map;const r=e.layerViewUids.get(t.uid);!0!==r&&(r?r.add(i.id):e.layerViewUids.set(t.uid,new Set([i.id])))}function M(e,n){e.graphicUids??=new Set,e.graphicUids.add(n)}function L(e,n){e.mediaElements??=new Set,e.mediaElements.add(n)}const C=r();export{V as computeMapPointFromVec3d,x as externalToInternalIntersectOptions,h as hitTest,U as intersectResultToMapPoint,w as toMap};
5
+ import e from"../../../Graphic.js";import{isIterable as n}from"../../../core/iteratorUtils.js";import{screenPointObjectToArray as i,createScreenPointArray as t}from"../../../core/screenUtils.js";import{create as r}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import s from"../../../geometry/Point.js";import l from"../../../geometry/SpatialReference.js";import{projectVectorToVector as o}from"../../../geometry/projection/projectVectorToVector.js";import{fallbackObjectIDAttribute as c}from"../../../layers/LayerConstants.js";import{isIntegratedMeshLayer as a}from"../../../layers/support/layerUtils.js";import{debugFlags as u}from"./debugFlags.js";import{getElevationAtPoint as d}from"./ElevationProvider.js";import{Intersector as p}from"../webgl-engine/lib/Intersector.js";import{isValidIntersectorResult as m}from"../webgl-engine/lib/IntersectorResult.js";import{toHit as f,toOwner as g}from"../webgl-engine/lib/intersectorUtilsConversions.js";import{terrainId as y}from"../webgl-engine/lib/verticalOffsetUtils.js";async function h(e,n,i,r){const s=i?x(e,i):r,l=t(n.x,n.y);s.requiresGroundFeedback=!0,s.enableDraped=!0;const o=new p(e.state.viewingMode);o.options.selectionMode=!0,o.options.store=2,e.sceneIntersectionHelper.intersectIntersectorScreen(l,o,s);const c=await b(e,o.results.all,s.graphics),d=o.results.ground,f=g(d,e),y=null!=f&&"type"in f&&a(f)?f:null,h={screenPoint:n,results:c,ground:{mapPoint:U(e,d),distance:m(d)?d.distanceInRenderSpace:0,layer:y}};return u.SCENEVIEW_HITTEST_RETURN_INTERSECTOR&&(h.intersector=o),h}function w(e,n,t,r){const s=t?x(e,t):r,l=!(!s.graphics?.include&&!s.graphics?.exclude),o=!(!s.mediaElements?.include&&!s.mediaElements?.exclude),c=i(n);s.enableDraped=s.include&&!s.include.has(y)||s.exclude?.has(y);const a=e.sceneIntersectionHelper,u=new p(e.state.viewingMode);if(u.options.selectionMode=!0,u.options.store=l||o?2:0,u.options.excludeLabels=t?.excludeLabels??!1,a.intersectIntersectorScreen(c,u,s),l||o){for(const n of u.results.all){const i=f(n,e);if(null==i)return U(e,n);if(l&&("graphic"!==i.type||E(s.graphics,i.graphic)))return U(e,n);if(o&&("media"!==i.type||S(s.mediaElements,i.element)))return U(e,n)}return null}return U(e,u.results.min)}async function b(e,n,i){const t=new Array;let r,s=null;const l={defer(e){r=e()}};for(let o=0;o<n.length;o++){const c=n[o],u=g(c,e);if(null!=u&&(u===e.map.ground||"type"in u&&a(u)))break;const d=f(c,e,l)??await r;if(r=null,null==d)continue;if("graphic"===d.type){if(null==s&&o!==n.length-1&&(s=new Set),null!=s){const e=j(d.graphic);if(s.has(e))continue;s.add(e)}if(!E(i,d.graphic))continue}const p=U(e,c),m=c.distanceInRenderSpace;if("media"===d.type){const e=d.element.toSource(p);t.push({...d,mapPoint:p,distance:m,sourcePoint:e})}else t.push({...d,mapPoint:p,distance:m})}return t}function U(e,n,i){return n.getIntersectionPoint(C)?(i=V(e,C,i),7===n.intersector&&e.basemapTerrain&&(i.z=d(e.basemapTerrain,i)??0),i):null}function j(e){const n=e.getObjectId()??e.attributes?.[c];return e.origin&&null!=n?`o-${e.origin.id}-${n}`:`u-${e.uid}`}function E(e,n){return S(e,j(n))}function S(e,n){return null==e||(null==e.include||e.include.has(n))&&(null==e.exclude||!e.exclude.has(n))}function V(e,n,i){let t=e.spatialReference||l.WGS84;return o(n,e.renderSpatialReference,C,t)?n=C:(t=l.WGS84,o(n,e.renderSpatialReference,C,t)&&(n=C)),i?(i.x=n[0],i.y=n[1],i.z=n[2],i.spatialReference=t):i=new s(n,t),i}function x(e,n){const i=I(e,n.include,0),t=I(e,n.exclude,1);return{include:i.layerViewUids,exclude:t.layerViewUids,graphics:{include:i.graphicUids,exclude:t.graphicUids},mediaElements:{include:i.mediaElements,exclude:t.mediaElements}}}function I(i,t,r,s=new R){if(!t)return s;if(t instanceof e)M(s,j(t)),0===r&&(null!=i.graphicsView&&t.layer===i?P(s,i.graphicsView.uid):t.layer&&T(s,i,t.layer.uid));else if("layer"in t&&"element"in t)L(s,t.element),0===r&&T(s,i,t.layer.uid);else if(n(t))for(const e of t)e===i.graphics&&null!=i.graphicsView?P(s,i.graphicsView.uid):e===i.map.ground?P(s,y):I(i,e,r,s);else"layer"in t&&v(s,i,t),"uid"in t&&T(s,i,t.uid);return s}class R{constructor(){this.layerViewUids=null,this.graphicUids=null,this.mediaElements=null}}function T(e,n,i){const t=n.allLayerViews.find(e=>e.layer.uid===i);t&&P(e,t.uid)}function P(e,n){e.layerViewUids??=new Map,e.layerViewUids.set(n,!0)}function v(e,n,i){const t=n.allLayerViews.find(e=>e.layer.uid===i.layer.uid);if(!t)return;e.layerViewUids??=new Map;const r=e.layerViewUids.get(t.uid);!0!==r&&(r?r.add(i.id):e.layerViewUids.set(t.uid,new Set([i.id])))}function M(e,n){e.graphicUids??=new Set,e.graphicUids.add(n)}function L(e,n){e.mediaElements??=new Set,e.mediaElements.add(n)}const C=r();export{V as computeMapPointFromVec3d,x as externalToInternalIntersectOptions,h as hitTest,U as intersectResultToMapPoint,w as toMap};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import"../../../../core/has.js";import"../../../../core/Error.js";import"../../../../core/Logger.js";import{watch as r,on as o}from"../../../../core/reactiveUtils.js";import{property as s}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/RandomLCG.js";import{subclass as i}from"../../../../core/accessorSupport/decorators/subclass.js";import{create as a}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import l from"../../../../geometry/Point.js";import{center as n}from"../../../../geometry/support/aaBoundingRect.js";import"../../../../core/asyncUtils.js";import"../../../../core/unitUtils.js";import"../../../../geometry/ellipsoidUtils.js";import"../../../../geometry/Extent.js";import"../../../../geometry/Geometry.js";import"../../../../geometry/Multipoint.js";import"../../../../geometry/Polygon.js";import"../../../../geometry/Polyline.js";import"../../../../geometry/SpatialReference.js";import"../../../../geometry/operators/support/GeographicTransformation.js";import"../../../../geometry/projection/projectors.js";import"../../../../geometry/support/spatialReferenceUtils.js";import"../../../../layers/support/ElevationSampler.js";let p=class extends t{get surface(){return this.view.map?.ground}get surfaceView(){return this.view.basemapTerrain}get renderLocation(){if(!this.location)return null;const e=a();return this.view.renderCoordsHelper.toRenderCoords(this.location,e),e}constructor(e){super(e),this.location=null,this._updateController=null}initialize(){this.view.state.isLocal&&(this.addHandles([r(()=>[this.surfaceView?.spatialReference,this.surfaceView?.extent],()=>this._update()),o(()=>this.surface?.layers,"change",()=>this._update())]),this._update())}_update(){if(this._updateController&&(this._updateController.abort(),this._updateController=null),null==this.surfaceView?.extent||null==this.surfaceView.spatialReference)return void this._set("location",null);const e=n(this.surfaceView.extent),t=new l({x:e[0],y:e[1],z:0,spatialReference:this.surfaceView.spatialReference});this.surface&&this.surface.layers.length>0?(this._set("location",null),this._updateController=new AbortController,this.surface.queryElevation(t,{noDataValue:0,signal:this._updateController.signal,cache:this.cache}).then(e=>{this._updateController=null,this._set("location",e.geometry)}).catch(e=>{})):this._set("location",t)}};e([s({constructOnly:!0})],p.prototype,"view",void 0),e([s({constructOnly:!0})],p.prototype,"cache",void 0),e([s()],p.prototype,"surface",null),e([s()],p.prototype,"surfaceView",null),e([s({readOnly:!0})],p.prototype,"location",void 0),e([s({readOnly:!0})],p.prototype,"renderLocation",null),p=e([i("esri.views.3d.support.pointsOfInterest.StableSurfaceCenter")],p);export{p as StableSurfaceCenter};
5
+ import{__decorate as t}from"tslib";import e from"../../../../core/Accessor.js";import"../../../../core/has.js";import{abortMaybe as r}from"../../../../core/maybe.js";import"../../../../core/Error.js";import"../../../../core/Logger.js";import{watch as o,on as i}from"../../../../core/reactiveUtils.js";import{property as s}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/RandomLCG.js";import{subclass as n}from"../../../../core/accessorSupport/decorators/subclass.js";import{create as l}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import a from"../../../../geometry/Point.js";import{center as p}from"../../../../geometry/support/aaBoundingRect.js";import"../../../../core/asyncUtils.js";import"../../../../core/unitUtils.js";import"../../../../geometry/ellipsoidUtils.js";import"../../../../geometry/Extent.js";import"../../../../geometry/Geometry.js";import"../../../../geometry/Multipoint.js";import"../../../../geometry/Polygon.js";import"../../../../geometry/Polyline.js";import"../../../../geometry/SpatialReference.js";import"../../../../geometry/operators/support/GeographicTransformation.js";import"../../../../geometry/projection/projectors.js";import"../../../../geometry/support/spatialReferenceUtils.js";import"../../../../layers/support/TileElevationSampler.js";let c=class extends e{constructor(t){super(t),this.location=null,this._updateController=null}initialize(){this.view.state.isLocal&&(this.addHandles([o(()=>[this._terrain?.spatialReference,this._terrain?.extent],()=>this._update()),i(()=>this._ground?.layers,"change",()=>this._update())]),this._update())}destroy(){this._updateController=r(this._updateController)}get renderLocation(){if(!this.location)return null;const t=l();return this.view.renderCoordsHelper.toRenderCoords(this.location,t),t}get _ground(){return this.view.map?.ground}get _terrain(){return this.view.basemapTerrain}_update(){if(this._updateController=r(this._updateController),null==this._terrain?.extent||null==this._terrain?.spatialReference)return void this._set("location",null);const t=p(this._terrain.extent),e=new a({x:t[0],y:t[1],z:0,spatialReference:this._terrain.spatialReference});this._ground&&this._ground.layers.length>0?(this._set("location",null),this._updateController=new AbortController,this._ground.queryElevation(e,{noDataValue:0,signal:this._updateController.signal,cache:this.cache}).then(t=>{this._updateController=null,this._set("location",t.geometry)}).catch(t=>{})):this._set("location",e)}};t([s({constructOnly:!0})],c.prototype,"view",void 0),t([s({constructOnly:!0})],c.prototype,"cache",void 0),t([s({readOnly:!0})],c.prototype,"location",void 0),t([s({readOnly:!0})],c.prototype,"renderLocation",null),t([s()],c.prototype,"_ground",null),t([s()],c.prototype,"_terrain",null),c=t([n("esri.views.3d.support.pointsOfInterest.StableSurfaceCenter")],c);export{c as StableSurfaceCenter};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{isIntegratedMeshLayer as e}from"../../../layers/support/layerUtils.js";import{hitTestSelectSimilarDistance as a}from"../../support/hitTestSelectUtils.js";async function t(t,i){const{results:o,ground:l}=await a(t,i),y=(!l.layer||!e(l.layer.type))&&l.mapPoint,c=[],p=s(t),d=y?r(t,p):n;let u=0,f=0;const m=()=>{const e=d.layerViews[f];y&&e&&"fetchPopupFeaturesAtLocation"in e&&c.push({mapPoint:l.mapPoint,layerView:e}),++f};let w=null;for(;u<o.length||f<d.layerViews.length;){const e=o[u];if(e&&"graphic"!==e.type)++u;else if("scene"!==e?.layer?.type||e?.layer?.parent!==t?.map?.basemap)if(e){const a=e.layer?.uid,t=d.layerUids.has(a)&&e.distance===l.distance,r=p.get(e.layer?.uid);if(w??=e.mapPoint,f<d.layerViews.length&&(t||(e.distance??0)>l.distance)&&d.layerViews[f]!==r){m();continue}c.push({graphic:e.graphic,layerView:r}),++u}else m();else++u}return w??=l.mapPoint,{hits:c,location:w}}function r(e,a){const t=new Set,r=new Set;for(let s=e.basemapTerrain.numLayers(1)-1;s>=0;s--){const a=e.basemapTerrain.layerViewByIndex(s,1);t.add(a.layer.uid),r.add(a)}const n=e.overlayManager.renderer.layers;for(const{uid:s}of n){const e=a.get(s);e&&(t.add(s),r.add(e))}return{layerUids:t,layerViews:Array.from(r).reverse()}}const n={layerUids:new Set,layerViews:[]};function s(e){const a=new Map;for(const t of e.allLayerViews){const e=t.layer.uid;a.set(e,t)}return a}export{t as popupHitTest};
5
+ import{isIntegratedMeshLayer as e}from"../../../layers/support/layerUtils.js";import{hitTestSelectSimilarDistance as a}from"../../support/hitTestSelectUtils.js";async function r(r,i){const{results:o,ground:l}=await a(r,i),c=(!l.layer||!e(l.layer))&&l.mapPoint,y=[],p=s(r),d=c?t(r,p):n;let u=0,f=0;const m=()=>{const e=d.layerViews[f];c&&e&&"fetchPopupFeaturesAtLocation"in e&&y.push({mapPoint:l.mapPoint,layerView:e}),++f};let w=null;for(;u<o.length||f<d.layerViews.length;){const e=o[u];if(e&&"graphic"!==e.type)++u;else if("scene"!==e?.layer?.type||e?.layer?.parent!==r?.map?.basemap)if(e){const a=e.layer?.uid,r=d.layerUids.has(a)&&e.distance===l.distance,t=p.get(e.layer?.uid);if(w??=e.mapPoint,f<d.layerViews.length&&(r||(e.distance??0)>l.distance)&&d.layerViews[f]!==t){m();continue}y.push({graphic:e.graphic,layerView:t}),++u}else m();else++u}return w??=l.mapPoint,{hits:y,location:w}}function t(e,a){const r=new Set,t=new Set;for(let s=e.basemapTerrain.numLayers(1)-1;s>=0;s--){const a=e.basemapTerrain.layerViewByIndex(s,1);r.add(a.layer.uid),t.add(a)}const n=e.overlayManager.renderer.layers;for(const{uid:s}of n){const e=a.get(s);e&&(r.add(s),t.add(e))}return{layerUids:r,layerViews:Array.from(t).reverse()}}const n={layerUids:new Set,layerViews:[]};function s(e){const a=new Map;for(const r of e.allLayerViews){const e=r.layer.uid;a.set(e,r)}return a}export{r as popupHitTest};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../../../core/Accessor.js";import{property as r}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as n}from"../../../core/accessorSupport/decorators/subclass.js";import{projectWithoutEngine as i}from"../../../geometry/projectionUtils.js";import{fromExtent as l,empty as s,expand as o,allFinite as a,equals as c}from"../../../geometry/support/aaBoundingRect.js";import{isIntegratedMeshOperationalLayer as p,isTiledLayer as u}from"../../../layers/support/layerUtils.js";import{webMercatorWorldExtent as y,geographicWorldExtent as f}from"./TerrainConst.js";import{getTiledLayerInfo as d,isProjectableRasterLayer as E}from"./terrainUtils.js";let m=class extends t{constructor(e){super(e)}initialize(){this.addHandles([this.layerViews.on("change",()=>this.notifyChange("stencilEnabledExtents"))])}destroy(){}get layerViewsExtent(){return this._computeLayerViewsExtent()}get tiledLayersExtent(){return this._computeTiledLayersExtent()}get stencilEnabledExtents(){return this._computeStencilEnabledExtents()}_computeStencilEnabledExtents(){const e=[];return this.layerViews.forEach(t=>{const r=t.layer;if("operationalLayerType"in r&&p(r.operationalLayerType)&&null!=this.viewSpatialReference){const t=g(r.fullExtent,this.viewSpatialReference);null!=t&&e.push(l(t))}}),e}};function x(e,t){return 1===e?new h(t):new w(t)}e([r({readOnly:!0})],m.prototype,"layerViewsExtent",null),e([r({readOnly:!0})],m.prototype,"tiledLayersExtent",null),e([r({readOnly:!0})],m.prototype,"stencilEnabledExtents",null),e([r()],m.prototype,"viewSpatialReference",void 0),e([r()],m.prototype,"tilingScheme",void 0),e([r()],m.prototype,"defaultTiledLayersExtent",void 0),e([r({constructOnly:!0})],m.prototype,"layers",void 0),e([r({constructOnly:!0})],m.prototype,"layerViews",void 0),m=e([n("esri.views.3d.terrain.ExtentHelper")],m);let h=class extends m{_computeLayerViewsExtent(){return this._globalExtent}_computeTiledLayersExtent(){return this._globalExtent}get _globalExtent(){return this.viewSpatialReference.isWebMercator?y:f}};h=e([n("esri.views.3d.terrain.ExtentHelper.ExtentHelperGlobal")],h);let w=class extends m{_computeLayerViewsExtent(){const e=s(),t=this.viewSpatialReference;this.layerViews.forEach(r=>{const n=r.layer;if(r.isResolved()&&("graphics"!==n.type||!n.internal)){const n=g("fullExtentInLocalViewSpatialReference"in r&&r.fullExtentInLocalViewSpatialReference||r.layer.fullExtent,t);o(e,n,e)}});const r=a(e)?e:null,n=this._get("layerViewsExtent");return c(r,n)?n:r}_computeTiledLayersExtent(){const e=this.tilingScheme;if(!e)return null;const t=this.viewSpatialReference,r=s();this.layers.forEach(n=>{if(n.loaded&&u(n)){const i=d(n,t,2);if(null==i)return;const{tileInfo:l,fullExtent:s}=i,a="tilemapCache"in n?n.tilemapCache?.effectiveMaxLOD:void 0;null!=l&&null!=s&&(E(n)||e.compatibleWith(l,a)&&s.spatialReference.equals(e.spatialReference))&&o(r,s,r)}}),o(r,this.defaultTiledLayersExtent,r);const n=a(r)?r:null,i=this._get("tiledLayersExtent");return c(n,i)?i:n}};function g(e,t){return null==e||e.spatialReference.equals(t)?e:i(e,e.spatialReference,t)}w=e([n("esri.views.3d.terrain.ExtentHelper.ExtentHelperLocal")],w);export{m as ExtentHelper,x as create};
5
+ import{__decorate as e}from"tslib";import t from"../../../core/Accessor.js";import{property as r}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as n}from"../../../core/accessorSupport/decorators/subclass.js";import{projectWithoutEngine as i}from"../../../geometry/projectionUtils.js";import{fromExtent as l,empty as s,expand as o,allFinite as a,equals as c}from"../../../geometry/support/aaBoundingRect.js";import{isIntegratedMeshLayer as p,isTiledLayer as u}from"../../../layers/support/layerUtils.js";import{webMercatorWorldExtent as y,geographicWorldExtent as f}from"./TerrainConst.js";import{getTiledLayerInfo as d,isProjectableRasterLayer as E}from"./terrainUtils.js";let m=class extends t{constructor(e){super(e)}initialize(){this.addHandles([this.layerViews.on("change",()=>this.notifyChange("stencilEnabledExtents"))])}destroy(){}get layerViewsExtent(){return this._computeLayerViewsExtent()}get tiledLayersExtent(){return this._computeTiledLayersExtent()}get stencilEnabledExtents(){return this._computeStencilEnabledExtents()}_computeStencilEnabledExtents(){const e=[];return this.layerViews.forEach(t=>{const r=t.layer;if(p(r)&&null!=this.viewSpatialReference){const t=g(r.fullExtent,this.viewSpatialReference);null!=t&&e.push(l(t))}}),e}};function x(e,t){return 1===e?new h(t):new w(t)}e([r({readOnly:!0})],m.prototype,"layerViewsExtent",null),e([r({readOnly:!0})],m.prototype,"tiledLayersExtent",null),e([r({readOnly:!0})],m.prototype,"stencilEnabledExtents",null),e([r()],m.prototype,"viewSpatialReference",void 0),e([r()],m.prototype,"tilingScheme",void 0),e([r()],m.prototype,"defaultTiledLayersExtent",void 0),e([r({constructOnly:!0})],m.prototype,"layers",void 0),e([r({constructOnly:!0})],m.prototype,"layerViews",void 0),m=e([n("esri.views.3d.terrain.ExtentHelper")],m);let h=class extends m{_computeLayerViewsExtent(){return this._globalExtent}_computeTiledLayersExtent(){return this._globalExtent}get _globalExtent(){return this.viewSpatialReference.isWebMercator?y:f}};h=e([n("esri.views.3d.terrain.ExtentHelper.ExtentHelperGlobal")],h);let w=class extends m{_computeLayerViewsExtent(){const e=s(),t=this.viewSpatialReference;this.layerViews.forEach(r=>{const n=r.layer;if(r.isResolved()&&("graphics"!==n.type||!n.internal)){const n=g("fullExtentInLocalViewSpatialReference"in r&&r.fullExtentInLocalViewSpatialReference||r.layer.fullExtent,t);o(e,n,e)}});const r=a(e)?e:null,n=this._get("layerViewsExtent");return c(r,n)?n:r}_computeTiledLayersExtent(){const e=this.tilingScheme;if(!e)return null;const t=this.viewSpatialReference,r=s();this.layers.forEach(n=>{if(n.loaded&&u(n)){const i=d(n,t,2);if(null==i)return;const{tileInfo:l,fullExtent:s}=i,a="tilemapCache"in n?n.tilemapCache?.effectiveMaxLOD:void 0;null!=l&&null!=s&&(E(n)||e.compatibleWith(l,a)&&s.spatialReference.equals(e.spatialReference))&&o(r,s,r)}}),o(r,this.defaultTiledLayersExtent,r);const n=a(r)?r:null,i=this._get("tiledLayersExtent");return c(n,i)?i:n}};function g(e,t){return null==e||e.spatialReference.equals(t)?e:i(e,e.spatialReference,t)}w=e([n("esri.views.3d.terrain.ExtentHelper.ExtentHelperLocal")],w);export{m as ExtentHelper,x as create};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../../../../Color.js";import{disposeMaybe as i}from"../../../../core/maybe.js";import{watch as s,syncAndInitial as o}from"../../../../core/reactiveUtils.js";import{property as r}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as l}from"../../../../core/accessorSupport/decorators/subclass.js";import{RenderCategory as a,InternalRenderCategory as n}from"../../webgl.js";import{glLayout as u}from"../../support/buffer/glUtil.js";import{newLayout as c}from"../../support/buffer/InterleavedLayout.js";import h from"../../webgl/RenderNode.js";import{VertexArrayObject as m}from"./VertexArrayObject.js";import{C as d}from"../../../../chunks/CutFillComposition.glsl.js";import{CutFillCompositionTechnique as f}from"../shaders/CutFillCompositionTechnique.js";import{C as p}from"../../../../chunks/CutFillMask.glsl.js";import{CutFillMaskTechnique as C}from"../shaders/CutFillMaskTechnique.js";import{DefaultMaterialPassParameters as _,DefaultMaterialTechnique as g}from"../shaders/DefaultMaterialTechnique.js";import{DefaultMaterialTechniqueConfiguration as b}from"../shaders/DefaultMaterialTechniqueConfiguration.js";import{DepthStencilAttachment as q,PrimitiveType as T}from"../../../webgl/enums.js";import{noParameters as F}from"../../../webgl/NoParameters.js";import{VertexBuffer as v}from"../../../webgl/VertexBuffer.js";let V=class extends h{constructor(e){super(e),this.consumes={required:[a.OPAQUE]},this.produces=n.CUTFILL_COLOR,this._vaoCut=null,this._vaoFill=null,this._countCut=0,this._countFill=0,this._maskParameters=new p,this._cutVolumeParameters=new _,this._fillVolumeParameters=new _,this._compositeParameters=new d;const t=1===e.view.state.viewingMode;this._cutVolumeTechniqueConfiguration=new b(t),this._cutVolumeTechniqueConfiguration.customDepthTest=2,this._cutVolumeTechniqueConfiguration.writeDepth=!1,this._cutVolumeTechniqueConfiguration.cullFace=1,this._cutVolumeTechniqueConfiguration.doubleSidedMode=1,this._fillVolumeTechniqueConfiguration=new b(t),this._fillVolumeTechniqueConfiguration.cullFace=2}initialize(){this.addHandles([s(()=>[this.cutColor,this.fillColor],()=>this._updateColors(),o)])}destroy(){this._vaoCut=i(this._vaoCut),this._vaoFill=i(this._vaoFill)}precompile(){this.techniques.precompile(g,this._cutVolumeTechniqueConfiguration),this.techniques.precompile(g,this._fillVolumeTechniqueConfiguration),this.techniques.precompile(C),this.techniques.precompile(f)}render(e){const t=this.techniques.get(g,this._cutVolumeTechniqueConfiguration),i=this.techniques.get(g,this._fillVolumeTechniqueConfiguration),s=this.techniques.get(C),o=this.techniques.get(f),r=e.find(({name:e})=>e===this.produces);if(!this._vaoCut||!this._vaoFill)return r;if(!(t&&i&&s.compiled&&o.compiled))return this.requestRender(1),r;const l=this.bindParameters,a=l.camera,n=a.fullViewport[2],u=a.fullViewport[3],c=this.renderingContext,h=this.fboCache,m=h.acquire(n,u,"cutfill color mask",2);m.attachDepth(r.getAttachment(q)),c.bindFramebuffer(m.fbo),c.setClearColor(0,0,0,1),c.clear(17408),c.setViewport(0,0,n,u);c.bindTechnique(s,l).bindDraw(l,F,this._maskParameters),c.setFaceCullingEnabled(!1),c.setStencilTestEnabled(!0),c.setStencilOpSeparate(1028,7680,34055,7680),c.setStencilOpSeparate(1029,7680,34056,7680),c.setDepthWriteEnabled(!1),c.bindVAO(this._vaoCut),c.setDepthTestEnabled(!0),c.setStencilWriteMask(255),c.setStencilFunction(519,0,255),c.setColorMask(!1,!1,!1,!1),c.drawArrays(T.TRIANGLES,0,this._countCut),c.setDepthTestEnabled(!1),c.setStencilWriteMask(0),c.setStencilFunction(517,0,255),c.setColorMask(!0,!0,!0,!0),c.drawArrays(T.TRIANGLES,0,this._countCut),c.bindVAO(this._vaoFill),c.setDepthTestEnabled(!0),c.setStencilWriteMask(255),c.setStencilFunction(519,0,255),c.setColorMask(!0,!0,!0,!0),c.drawArrays(T.TRIANGLES,0,this._countFill);const d=h.acquire(n,u,"cutfill color volumes",5);d.attachDepth(r.getAttachment(q)),c.bindFramebuffer(d.fbo),c.setClearColor(0,0,0,0),c.clear(16384),c.bindTechnique(t,this.bindParameters,this._cutVolumeParameters,this._maskParameters),c.setPolygonOffset(1,1),c.setPolygonOffsetFillEnabled(!0),c.bindVAO(this._vaoCut),c.drawArrays(T.TRIANGLES,0,this._countCut),c.bindTechnique(i,this.bindParameters,this._fillVolumeParameters,this._maskParameters),c.setPolygonOffset(0,0),c.setPolygonOffsetFillEnabled(!1),c.bindVAO(this._vaoFill),c.drawArrays(T.TRIANGLES,0,this._countFill);const p=this.fboCache.acquire(n,u,this.produces);return c.bindFramebuffer(p.fbo),this._compositeParameters.color=r.getTexture(),this._compositeParameters.cutFillVolumes=d.getTexture(),this._compositeParameters.cutFillMask=m.getTexture(),c.bindTechnique(o,l,this._compositeParameters),c.screen.draw(),m.release(),d.release(),p.attachDepth(r.getAttachment(q)),p}enable(){this.produces=n.CUTFILL_COLOR,this.requestRender(1)}disable(){this.produces="disabled",this.requestRender(1)}updateGeometries(e,t,s){this._vaoCut=i(this._vaoCut),this._vaoCut=this._createVao(e),this._countCut=e.indicesBottom.length+e.indicesExtruded.length,this._vaoFill=i(this._vaoFill),this._vaoFill=this._createVao(t),this._countFill=t.indicesBottom.length+t.indicesExtruded.length,this._maskParameters.origin=s,this.requestRender(1)}_updateColors(){this._cutVolumeParameters.diffuse=t.toUnitRGB(this.cutColor),this._cutVolumeParameters.opacity=this.cutColor.a,this._fillVolumeParameters.diffuse=t.toUnitRGB(this.fillColor),this._fillVolumeParameters.opacity=this.fillColor.a,this.requestRender(1)}_createVao(e){const t=this.renderingContext,{vertices:i,normals:s,indicesBottom:o,indicesExtruded:r}=e,l=w.createBuffer(o.length+r.length),{position:a,normal:n}=l;for(let u=0;u<o.length;u++){const e=3*o[u];a.set(u,0,i[e]),a.set(u,1,i[e+1]),a.set(u,2,i[e+2]),n.set(u,0,s[e]),n.set(u,1,s[e+1]),n.set(u,2,s[e+2])}for(let u=0;u<r.length;u++){const e=u+o.length,t=3*r[u];a.set(e,0,i[t]),a.set(e,1,i[t+1]),a.set(e,2,i[t+2]),n.set(e,0,s[t]),n.set(e,1,s[t+1]),n.set(e,2,s[t+2])}const c=new v(t,u(w),l.buffer);return new m(t,c)}};e([r()],V.prototype,"consumes",void 0),e([r()],V.prototype,"produces",void 0),e([r()],V.prototype,"cutColor",void 0),e([r()],V.prototype,"fillColor",void 0),V=e([l("esri.views.3d.webgl-engine.lib.CutFillColor")],V);const w=c().vec3f("position").vec3f("normal").freeze();class P{constructor(e,t,i,s){this.vertices=e,this.indicesBottom=t,this.indicesExtruded=i,this.normals=s}}export{V as CutFillColor,P as VolumeGeometry};
5
+ import{__decorate as e}from"tslib";import t from"../../../../Color.js";import{disposeMaybe as i}from"../../../../core/maybe.js";import{watch as s,syncAndInitial as o}from"../../../../core/reactiveUtils.js";import{property as r}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as l}from"../../../../core/accessorSupport/decorators/subclass.js";import{c as a}from"../../../../chunks/vec32.js";import{RenderCategory as n,InternalRenderCategory as u}from"../../webgl.js";import{glLayout as c}from"../../support/buffer/glUtil.js";import{newLayout as h}from"../../support/buffer/InterleavedLayout.js";import m from"../../webgl/RenderNode.js";import{VertexArrayObject as d}from"./VertexArrayObject.js";import{C as p}from"../../../../chunks/CutFillComposition.glsl.js";import{CutFillCompositionTechnique as f}from"../shaders/CutFillCompositionTechnique.js";import{C}from"../../../../chunks/CutFillMask.glsl.js";import{CutFillMaskTechnique as _}from"../shaders/CutFillMaskTechnique.js";import{DefaultMaterialPassParameters as g,DefaultMaterialDrawParameters as b,DefaultMaterialTechnique as q}from"../shaders/DefaultMaterialTechnique.js";import{DefaultMaterialTechniqueConfiguration as v}from"../shaders/DefaultMaterialTechniqueConfiguration.js";import{DepthStencilAttachment as T,PrimitiveType as F}from"../../../webgl/enums.js";import{noParameters as w}from"../../../webgl/NoParameters.js";import{VertexBuffer as V}from"../../../webgl/VertexBuffer.js";let P=class extends m{constructor(e){super(e),this.consumes={required:[n.OPAQUE]},this.produces=u.CUTFILL_COLOR,this._vaoCut=null,this._vaoFill=null,this._countCut=0,this._countFill=0,this._maskParameters=new C,this._cutVolumeParameters=new g,this._fillVolumeParameters=new g,this._compositeParameters=new p,this._drawParameters=new b;const t=1===e.view.state.viewingMode;this._cutVolumeTechniqueConfiguration=new v(t),this._cutVolumeTechniqueConfiguration.customDepthTest=2,this._cutVolumeTechniqueConfiguration.writeDepth=!1,this._cutVolumeTechniqueConfiguration.cullFace=1,this._cutVolumeTechniqueConfiguration.doubleSidedMode=1,this._fillVolumeTechniqueConfiguration=new v(t),this._fillVolumeTechniqueConfiguration.cullFace=2}initialize(){this.addHandles([s(()=>[this.cutColor,this.fillColor],()=>this._updateColors(),o)])}destroy(){this._vaoCut=i(this._vaoCut),this._vaoFill=i(this._vaoFill)}precompile(){this.techniques.precompile(q,this._cutVolumeTechniqueConfiguration),this.techniques.precompile(q,this._fillVolumeTechniqueConfiguration),this.techniques.precompile(_),this.techniques.precompile(f)}render(e){const i=this.techniques.get(q,this._cutVolumeTechniqueConfiguration),s=this.techniques.get(q,this._fillVolumeTechniqueConfiguration),o=this.techniques.get(_),r=this.techniques.get(f),l=e.find(({name:e})=>e===this.produces);if(!this._vaoCut||!this._vaoFill)return l;if(!(i&&s&&o.compiled&&r.compiled))return this.requestRender(1),l;const a=this.bindParameters,n=a.camera,u=n.fullViewport[2],c=n.fullViewport[3],h=this.renderingContext,m=this.fboCache,d=m.acquire(u,c,"cutfill color mask",2);d.attachDepth(l.getAttachment(T)),h.bindFramebuffer(d.fbo),h.setClearColor(0,0,0,1),h.clear(17408),h.setViewport(0,0,u,c),h.bindTechnique(o,a,w,this._maskParameters),h.setFaceCullingEnabled(!1),h.setStencilTestEnabled(!0),h.setStencilOpSeparate(1028,7680,34055,7680),h.setStencilOpSeparate(1029,7680,34056,7680),h.setDepthWriteEnabled(!1),h.bindVAO(this._vaoCut),h.setDepthTestEnabled(!0),h.setStencilWriteMask(255),h.setStencilFunction(519,0,255),h.setColorMask(!1,!1,!1,!1),h.drawArrays(F.TRIANGLES,0,this._countCut),h.setDepthTestEnabled(!1),h.setStencilWriteMask(0),h.setStencilFunction(517,0,255),h.setColorMask(!0,!1,!1,!1),h.drawArrays(F.TRIANGLES,0,this._countCut),h.bindVAO(this._vaoFill),h.setDepthTestEnabled(!0),h.setStencilWriteMask(255),h.setStencilFunction(519,0,255),h.setColorMask(!1,!0,!1,!1),h.drawArrays(F.TRIANGLES,0,this._countFill);const p=m.acquire(u,c,"cutfill color volumes",5);p.attachDepth(l.getAttachment(T)),h.bindFramebuffer(p.fbo),h.setClearColor(0,0,0,0),h.clear(16384),h.setColorMask(!0,!0,!0,!0),h.bindTechnique(i,this.bindParameters,this._cutVolumeParameters,this._drawParameters),h.setPolygonOffset(1,1),h.setPolygonOffsetFillEnabled(!0),h.bindVAO(this._vaoCut),h.drawArrays(F.TRIANGLES,0,this._countCut),h.bindTechnique(s,this.bindParameters,this._fillVolumeParameters,this._drawParameters),h.setPolygonOffset(0,0),h.setPolygonOffsetFillEnabled(!1),h.bindVAO(this._vaoFill),h.drawArrays(F.TRIANGLES,0,this._countFill);const C=this.fboCache.acquire(u,c,this.produces);return h.bindFramebuffer(C.fbo),this._compositeParameters.color=l.getTexture(),this._compositeParameters.cutFillVolumes=p.getTexture(),this._compositeParameters.cutFillMask=d.getTexture(),t.toUnitRGBA(this.borderColor,this._compositeParameters.borderColor),h.bindTechnique(r,a,this._compositeParameters),h.screen.draw(),d.release(),p.release(),C.attachDepth(l.getAttachment(T)),C}enable(){this.produces=u.CUTFILL_COLOR,this.requestRender(1)}disable(){this.produces="disabled",this.requestRender(1)}updateGeometries(e,t,s){this._vaoCut=i(this._vaoCut),this._vaoCut=this._createVao(e),this._countCut=e.indicesBottom.length+e.indicesExtruded.length,this._vaoFill=i(this._vaoFill),this._vaoFill=this._createVao(t),this._countFill=t.indicesBottom.length+t.indicesExtruded.length,this._maskParameters.origin=s,a(this._drawParameters.origin,s),this.requestRender(1)}_updateColors(){this._cutVolumeParameters.diffuse=t.toUnitRGB(this.cutColor),this._cutVolumeParameters.opacity=this.cutColor.a,this._fillVolumeParameters.diffuse=t.toUnitRGB(this.fillColor),this._fillVolumeParameters.opacity=this.fillColor.a,this.requestRender(1)}_createVao(e){const t=this.renderingContext,{vertices:i,normals:s,indicesBottom:o,indicesExtruded:r}=e,l=j.createBuffer(o.length+r.length),{position:a,normal:n}=l;for(let c=0;c<o.length;c++){const e=3*o[c];a.set(c,0,i[e]),a.set(c,1,i[e+1]),a.set(c,2,i[e+2]),n.set(c,0,s[e]),n.set(c,1,s[e+1]),n.set(c,2,s[e+2])}for(let c=0;c<r.length;c++){const e=c+o.length,t=3*r[c];a.set(e,0,i[t]),a.set(e,1,i[t+1]),a.set(e,2,i[t+2]),n.set(e,0,s[t]),n.set(e,1,s[t+1]),n.set(e,2,s[t+2])}const u=new V(t,c(j),l.buffer);return new d(t,u)}};e([r()],P.prototype,"consumes",void 0),e([r()],P.prototype,"produces",void 0),e([r()],P.prototype,"cutColor",void 0),e([r()],P.prototype,"fillColor",void 0),e([r()],P.prototype,"borderColor",void 0),P=e([l("esri.views.3d.webgl-engine.lib.CutFillColor")],P);const j=h().vec3f("position").vec3f("normal").freeze();class y{constructor(e,t,i,s){this.vertices=e,this.indicesBottom=t,this.indicesExtruded=i,this.normals=s}}export{P as CutFillColor,y as VolumeGeometry};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import"../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../core/shaderModules/glsl.js";import"../core/shaderModules/Texture2DPassUniform.js";import"../../../webgl/NoParameters.js";import"../../../webgl/ShaderBuilder.js";export{C as CutFillCompositionPassParameters,b as build}from"../../../../chunks/CutFillComposition.glsl.js";
5
+ import"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import"../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../core/shaderModules/Float4PassUniform.js";import"../core/shaderModules/FloatPassUniform.js";import"../core/shaderModules/glsl.js";import"../core/shaderModules/Texture2DPassUniform.js";import"../../../webgl/NoParameters.js";import"../../../webgl/ShaderBuilder.js";export{C as CutFillCompositionPassParameters,b as build}from"../../../../chunks/CutFillComposition.glsl.js";