@arcgis/core 4.31.0-next.20240708 → 4.31.0-next.20240709

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 (159) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/{0975e54c50383375cc09.js → 14cf7411e8318a1bccb9.js} +1 -1
  3. package/assets/esri/core/workers/chunks/{71852b8437ec66b9ef06.js → 2123ab24163a532ebc8d.js} +1 -1
  4. package/assets/esri/core/workers/chunks/{c91b3800cf3891bf2d59.js → 252ff37bf5e12dae0b18.js} +1 -1
  5. package/assets/esri/core/workers/chunks/2799007b5f3f4a2e364c.js +51 -0
  6. package/assets/esri/core/workers/chunks/{ff5e6d823d512f87a527.js → 2dddb8a989b9c96572fe.js} +1 -1
  7. package/assets/esri/core/workers/chunks/3375de864347a847393d.js +1042 -0
  8. package/assets/esri/core/workers/chunks/543f9db420c99d429637.js +1 -0
  9. package/assets/esri/core/workers/chunks/{812e18c65aa6e398c338.js → 5b6c89dc41067d81c952.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{5089a12084a8a8fb93d8.js → 61e5179fb49866241128.js} +1 -1
  11. package/assets/esri/core/workers/chunks/632e3ba2b8a881df29a0.js +1 -0
  12. package/assets/esri/core/workers/chunks/{1cc4a89c96a36d6b3d52.js → 7767559d56d16b644655.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{43e83f4d827f59ff556a.js → 8087288f00dfdcc479b9.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{a5fbe1c95e49093e5af4.js → 8cce4b218568638e6e64.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{c7e2a97cb7bcd153bcef.js → 8e326def543268f8a08e.js} +1 -1
  16. package/assets/esri/core/workers/chunks/92cb45b18e151db007dc.js +1 -0
  17. package/assets/esri/core/workers/chunks/b2e8cc76381077b78d4c.js +1 -0
  18. package/assets/esri/core/workers/chunks/b6a8132708afcd988fa9.js +1 -0
  19. package/assets/esri/core/workers/chunks/{b4d850e82a8ae902d684.js → c44cc686774ff53c0a94.js} +1 -1
  20. package/assets/esri/core/workers/chunks/c52701477405c1fb2072.js +1 -0
  21. package/assets/esri/core/workers/chunks/{9ed11b9202013ca001ee.js → cfc2a1858a8bbb284979.js} +2 -2
  22. package/assets/esri/core/workers/chunks/{9ed11b9202013ca001ee.js.LICENSE.txt → cfc2a1858a8bbb284979.js.LICENSE.txt} +1 -1
  23. package/assets/esri/core/workers/chunks/d9863289c69d2550cd49.js +1 -0
  24. package/assets/esri/core/workers/chunks/e1f4df3a5b0b31521b3c.js +1 -0
  25. package/assets/esri/core/workers/chunks/{61505947371cebab9cbe.js → fdebfe55cd097714ec11.js} +1 -1
  26. package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +13 -18
  27. package/assets/esri/themes/dark/main.css +1 -1
  28. package/assets/esri/themes/light/main.css +1 -1
  29. package/assets/esri/themes/light/view.css +1 -1
  30. package/chunks/AtmosphereCompositing.glsl.js +6 -9
  31. package/chunks/BlendLayers.glsl.js +1 -7
  32. package/chunks/BlendWeights.glsl.js +45 -51
  33. package/chunks/Blur.glsl.js +1 -3
  34. package/chunks/ChapmanAtmosphere.glsl.js +3 -8
  35. package/chunks/CheckerBoard.glsl.js +3 -9
  36. package/chunks/Clouds.glsl.js +21 -10
  37. package/chunks/CloudsComposition.glsl.js +3 -7
  38. package/chunks/ColorMaterial.glsl.js +3 -9
  39. package/chunks/ComponentShader.glsl.js +35 -50
  40. package/chunks/Compositing.glsl.js +5 -7
  41. package/chunks/DefaultMaterial.glsl.js +68 -73
  42. package/chunks/EdgeDetect.glsl.js +5 -10
  43. package/chunks/EdgeShader.glsl.js +37 -60
  44. package/chunks/Fog.glsl.js +4 -9
  45. package/chunks/HUDCompositing.glsl.js +1 -3
  46. package/chunks/HUDMaterial.glsl.js +8 -14
  47. package/chunks/Heatmap.glsl.js +4 -7
  48. package/chunks/HeatmapDensity.glsl.js +5 -11
  49. package/chunks/HighlightApply.glsl.js +133 -152
  50. package/chunks/HighlightDownsample.glsl.js +29 -32
  51. package/chunks/ImageMaterial.glsl.js +11 -21
  52. package/chunks/LaserlinePath.glsl.js +4 -9
  53. package/chunks/LineCallout.glsl.js +91 -108
  54. package/chunks/LineMarker.glsl.js +2 -8
  55. package/chunks/Magnifier.glsl.js +4 -9
  56. package/chunks/MeasurementArrow.glsl.js +9 -15
  57. package/chunks/NativeLine.glsl.js +8 -12
  58. package/chunks/NoiseTextureAtlas.glsl.js +89 -86
  59. package/chunks/OITCompositing.glsl.js +2 -3
  60. package/chunks/OverlayCompositing.glsl.js +2 -4
  61. package/chunks/Path.glsl.js +31 -55
  62. package/chunks/Pattern.glsl.js +16 -20
  63. package/chunks/PointRenderer.glsl.js +39 -48
  64. package/chunks/Precipitation.glsl.js +15 -27
  65. package/chunks/RasterColorizer.glsl.js +25 -33
  66. package/chunks/RealisticTree.glsl.js +53 -65
  67. package/chunks/SSAO.glsl.js +7 -10
  68. package/chunks/SSAOBlur.glsl.js +10 -14
  69. package/chunks/ShadedColorMaterial.glsl.js +12 -15
  70. package/chunks/ShadowCastAccumulate.glsl.js +2 -4
  71. package/chunks/ShadowCastVisualize.glsl.js +12 -19
  72. package/chunks/ShadowHighlight.glsl.js +46 -50
  73. package/chunks/SimpleAtmosphere.glsl.js +4 -13
  74. package/chunks/SlicePlaneMaterial.glsl.js +3 -7
  75. package/chunks/Stars.glsl.js +3 -7
  76. package/chunks/Terrain.glsl.js +20 -61
  77. package/chunks/TextureOnly.glsl.js +2 -4
  78. package/chunks/Viewshed.glsl.js +20 -38
  79. package/chunks/WaterSurface.glsl.js +34 -60
  80. package/core/workers/registry.js +1 -1
  81. package/interfaces.d.ts +34 -4
  82. package/layers/WCSLayer.js +1 -1
  83. package/layers/support/SubtypeSublayer.js +1 -1
  84. package/layers/support/rasterDatasets/WCSRaster.js +1 -1
  85. package/layers/support/rasterDatasets/multidimensionalUtils.js +1 -1
  86. package/layers/support/rasterDatasets/wcsCoverageParser.js +1 -1
  87. package/package.json +3 -3
  88. package/support/revision.js +1 -1
  89. package/views/2d/engine/webgl/shaderGraph/ShaderBuilder2D.js +1 -1
  90. package/views/2d/engine/webgl/shaderGraph/techniques/FeatureInstanceStore.js +1 -1
  91. package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityTechnique.js +1 -1
  92. package/views/2d/engine/webgl/shaderGraph/techniques/heatmap/HeatmapTechnique.js +1 -1
  93. package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
  94. package/views/3d/interactive/editingTools/transform/extentTransform/extentUtils.js +1 -1
  95. package/views/3d/layers/FeatureLayerViewBase3D.js +1 -1
  96. package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
  97. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  98. package/views/3d/layers/StreamLayerView3D.js +1 -1
  99. package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
  100. package/views/3d/layers/graphics/Graphics3DGraphicsPipeline.js +1 -1
  101. package/views/3d/layers/graphics/pipeline/Feature3DPipeline.js +5 -0
  102. package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorker.js +5 -0
  103. package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorkerHandle.js +5 -0
  104. package/views/3d/layers/graphics/pipeline/PBFPointFeaturesView.js +5 -0
  105. package/views/3d/layers/graphics/pipeline/TestSymbol.js +5 -0
  106. package/views/3d/layers/graphics/pipeline/Tile.js +5 -0
  107. package/views/3d/layers/graphics/pipeline/Tile3DFetcher.js +5 -0
  108. package/views/3d/layers/graphics/pipeline/Tile3DProcessor.js +5 -0
  109. package/views/3d/layers/i3s/PointRenderer.js +1 -1
  110. package/views/3d/layers/support/HeatmapFeatureProcessor.js +1 -1
  111. package/views/3d/layers/support/projectExtentUtils.js +1 -1
  112. package/views/3d/terrain/OverlayRenderer.js +1 -1
  113. package/views/3d/terrain/TerrainRenderer.js +1 -1
  114. package/views/3d/terrain/TileCompositor.js +1 -1
  115. package/views/3d/webgl-engine/core/renderPasses/RenderPass.js +1 -1
  116. package/views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js +3 -5
  117. package/views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js +3 -3
  118. package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +29 -59
  119. package/views/3d/webgl-engine/core/shaderLibrary/hud/HUDOcclusionPass.glsl.js +6 -12
  120. package/views/3d/webgl-engine/core/shaderLibrary/shading/ScreenSpaceReflections.glsl.js +1 -1
  121. package/views/3d/webgl-engine/core/shaderLibrary/shading/TextureTransformUV.glsl.js +6 -6
  122. package/views/3d/webgl-engine/core/shaderLibrary/shading/Water.glsl.js +2 -2
  123. package/views/3d/webgl-engine/core/shaderLibrary/terrain/TileComposite.glsl.js +2 -4
  124. package/views/3d/webgl-engine/core/shaderLibrary/util/LocalFromScreenSpace.glsl.js +2 -2
  125. package/views/3d/webgl-engine/core/shaderModules/ShaderBuilder.js +1 -1
  126. package/views/3d/webgl-engine/effects/blit/Blit.js +1 -1
  127. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
  128. package/views/3d/webgl-engine/effects/laserlines/LaserLineRenderer.js +1 -1
  129. package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
  130. package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
  131. package/views/3d/webgl-engine/lib/DrapedHeatmapRenderer.js +1 -1
  132. package/views/3d/webgl-engine/lib/MainFramebuffer.js +1 -1
  133. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  134. package/views/3d/webgl-engine/lib/RenderingContext.js +1 -1
  135. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  136. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  137. package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
  138. package/views/3d/webgl-engine/lib/ViewshedShadowMap.js +1 -1
  139. package/views/3d/webgl-engine/lib/edgeRendering/EdgeRenderer.js +1 -1
  140. package/views/3d/webgl-engine/materials/DrawParameters.js +1 -1
  141. package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
  142. package/views/SceneView.js +1 -1
  143. package/views/webgl/RenderingContext.js +1 -1
  144. package/views/webgl/enums.js +1 -1
  145. package/views/webgl/heatmapTextureUtils.js +1 -1
  146. package/views/webgl/testSVGPremultipliedAlpha.js +1 -1
  147. package/widgets/ElevationProfile/ElevationProfileController.js +1 -1
  148. package/widgets/FeatureForm.js +1 -1
  149. package/widgets/OrientedImageryViewer/constants.js +1 -1
  150. package/widgets/OrientedImageryViewer.js +1 -1
  151. package/assets/esri/core/workers/chunks/0cb2eb96ffb1dbed00eb.js +0 -1
  152. package/assets/esri/core/workers/chunks/0d6ed27fc9948f4ea061.js +0 -1
  153. package/assets/esri/core/workers/chunks/225b947ba4b2fcfd5630.js +0 -1
  154. package/assets/esri/core/workers/chunks/7c7c3068da3bf7467685.js +0 -1
  155. package/assets/esri/core/workers/chunks/85e5cdd723f68dec8c25.js +0 -1
  156. package/assets/esri/core/workers/chunks/aed0db145187d9eb52f2.js +0 -51
  157. package/assets/esri/core/workers/chunks/cf9a32a03b3d3b66effb.js +0 -1
  158. package/assets/esri/core/workers/chunks/e840e54455eb500b501d.js +0 -1098
  159. package/assets/esri/core/workers/chunks/fec53ce15ae52f8cb802.js +0 -1
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../chunks/tslib.es6.js";import r from"../../../core/Error.js";import"../../../core/has.js";import{destroyMaybe as t}from"../../../core/maybe.js";import{watch as i,syncAndInitial as s}from"../../../core/reactiveUtils.js";import{property as a}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import{getObjectId as u}from"../../../layers/graphics/dehydratedFeatures.js";import{FeatureLikeLayerView3D as n}from"./FeatureLikeLayerView3D.js";import{LayerView3D as p}from"./LayerView3D.js";import{FeatureGraphics3DGraphicsPipeline as l}from"./graphics/FeatureGraphics3DGraphicsPipeline.js";import{updatingProgress as m}from"../support/updatingProperties.js";import{UpdatePolicy as c}from"../webgl-engine/lib/UpdatePolicy.js";import d from"../../layers/FeatureLayerView.js";import h from"../../layers/LayerView.js";import y from"../../layers/RefreshableLayerView.js";let f=class extends(y(n(d(p(h))))){constructor(e){super(e)}initialize(){this.addHandles(i((()=>this._updatingRequiredFieldsPromise),(e=>this._updatingHandles.addPromise(e)),s))}destroy(){this._updatingHandles.removeAll(),this._fetcherContext=t(this._fetcherContext)}get maximumNumberOfFeatures(){return this.graphicsPipeline.maximumNumberOfFeatures}set maximumNumberOfFeatures(e){this.graphicsPipeline.maximumNumberOfFeatures=e}get maximumNumberOfFeaturesExceeded(){return null!=this.graphicsPipeline&&!this.suspended&&this.graphicsPipeline.maximumNumberOfFeaturesExceeded}get updatingProgressValue(){return this.graphicsPipeline?.updatingProgressValue??0}get updatePolicy(){return this.graphicsPipeline?.updatePolicy??c.ASYNC}get hasZ(){const e=this.layer,r=e.capabilities&&e.capabilities.data;return!(!r||!r.supportsZ)&&("returnZ"in e&&null!=e.returnZ?e.returnZ:r.supportsZ)}get hasM(){const e=this.layer,r=e.capabilities&&e.capabilities.data;return!(!r||!r.supportsM)&&("returnM"in e&&null!=e.returnM&&e.returnM)}setVisibility(e,r){this.graphicsPipeline?.setVisibility(e,r)}createQuery(){return super.createQuery()}queryFeatures(e,r){const t=()=>super.queryFeatures(e,r);return"mesh"===this.layer.geometryType?this._queryFeaturesMesh(this._ensureQuery(e),t):t()}createGraphicsPipeline(){return new l({layerView:this})}async doRefresh(e){return await this.graphicsPipeline.doRefresh(e)}_popupFeatureHasRequiredFields(e,r){if(!super._popupFeatureHasRequiredFields(e,r))return!1;const t=u(e,this.layer.objectIdField);if(null==t)return!0;const i=this.graphicsPipeline.getMissingAttributesForFeature(t);if(null==i)return!0;for(const s of r)if(i.has(s))return!1;return!0}get usedMemory(){return this.graphicsPipeline?.usedMemory??0}get unloadedMemory(){return this.graphicsPipeline?.unloadedMemory??0}get ignoresMemoryFactor(){return this.graphicsPipeline?.ignoresMemoryFactor??!1}async _queryFeaturesMesh(e,r){await this._validateQueryFeaturesMesh(e);const t=await r(),i=this.graphicsPipeline;if(e?.outStatistics||null==i)return t;const s=this.layer.objectIdField,a=[];for(const o of t.features)if(o.geometry){const e=i.getHydratedGeometry(o.attributes[s]);e&&(o.geometry=e,a.push(o))}else a.push(o);return t.features=a,t}async _validateQueryFeaturesMesh(e){if(!e)return;const t=e=>{throw new r("feature-layer-view:unsupported-query",`Queries on Mesh feature collection layers do not support '${e}'`)},i=["quantizationParameters","geometryPrecision","maxAllowableOffset"];for(const r of i)null!=e[r]&&t(r);"returnM"in e&&e.returnM&&t("returnM"),"returnCentroid"in e&&e.returnCentroid&&t("returnCentroid"),null==e.outSpatialReference||e.outSpatialReference.equals(this.view.spatialReference)||t("outSpatialReference")}get test(){}};e([a()],f.prototype,"layer",void 0),e([a()],f.prototype,"graphicsPipeline",void 0),e([a()],f.prototype,"maximumNumberOfFeatures",null),e([a()],f.prototype,"maximumNumberOfFeaturesExceeded",null),e([a(m)],f.prototype,"updatingProgress",void 0),e([a({readOnly:!0})],f.prototype,"updatingProgressValue",null),e([a({readOnly:!0})],f.prototype,"updatePolicy",null),e([a({readOnly:!0})],f.prototype,"hasZ",null),e([a({readOnly:!0})],f.prototype,"hasM",null),f=e([o("esri.views.3d.layers.FeatureLayerViewBase3D")],f);const g=f;export{g as default};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import r from"../../../core/Error.js";import has from"../../../core/has.js";import{destroyMaybe as t}from"../../../core/maybe.js";import{watch as i,syncAndInitial as s}from"../../../core/reactiveUtils.js";import{property as a}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import{getObjectId as u}from"../../../layers/graphics/dehydratedFeatures.js";import{FeatureLikeLayerView3D as n}from"./FeatureLikeLayerView3D.js";import{LayerView3D as p}from"./LayerView3D.js";import{FeatureGraphics3DGraphicsPipeline as l}from"./graphics/FeatureGraphics3DGraphicsPipeline.js";import{updatingProgress as c}from"../support/updatingProperties.js";import{UpdatePolicy as m}from"../webgl-engine/lib/UpdatePolicy.js";import d from"../../layers/FeatureLayerView.js";import h from"../../layers/LayerView.js";import y from"../../layers/RefreshableLayerView.js";let f=class extends(y(n(d(p(h))))){constructor(e){super(e)}initialize(){this.addHandles(i((()=>this._updatingRequiredFieldsPromise),(e=>this._updatingHandles.addPromise(e)),s))}destroy(){this._updatingHandles.removeAll(),this._fetcherContext=t(this._fetcherContext)}get maximumNumberOfFeatures(){return this.graphicsPipeline.maximumNumberOfFeatures}set maximumNumberOfFeatures(e){this.graphicsPipeline.maximumNumberOfFeatures=e}get maximumNumberOfFeaturesExceeded(){return null!=this.graphicsPipeline&&!this.suspended&&this.graphicsPipeline.maximumNumberOfFeaturesExceeded}get updatingProgressValue(){return this.graphicsPipeline?.updatingProgressValue??0}get updatePolicy(){return this.graphicsPipeline?.updatePolicy??m.ASYNC}get hasZ(){const e=this.layer,r=e.capabilities&&e.capabilities.data;return!(!r||!r.supportsZ)&&("returnZ"in e&&null!=e.returnZ?e.returnZ:r.supportsZ)}get hasM(){const e=this.layer,r=e.capabilities&&e.capabilities.data;return!(!r||!r.supportsM)&&("returnM"in e&&null!=e.returnM&&e.returnM)}setVisibility(e,r){this.graphicsPipeline?.setVisibility(e,r)}createQuery(){return super.createQuery()}queryFeatures(e,r){const t=()=>super.queryFeatures(e,r);return"mesh"===this.layer.geometryType?this._queryFeaturesMesh(this._ensureQuery(e),t):t()}async createGraphicsPipeline(){if(has("feature-pipeline-3d-test")){const{Feature3DPipeline:e}=await import("./graphics/pipeline/Feature3DPipeline.js");return new e({layerView:this})}return new l({layerView:this})}async doRefresh(e){return await this.graphicsPipeline.doRefresh(e)}_popupFeatureHasRequiredFields(e,r){if(!super._popupFeatureHasRequiredFields(e,r))return!1;const t=u(e,this.layer.objectIdField);if(null==t)return!0;const i=this.graphicsPipeline.getMissingAttributesForFeature(t);if(null==i)return!0;for(const s of r)if(i.has(s))return!1;return!0}get usedMemory(){return this.graphicsPipeline?.usedMemory??0}get unloadedMemory(){return this.graphicsPipeline?.unloadedMemory??0}get ignoresMemoryFactor(){return this.graphicsPipeline?.ignoresMemoryFactor??!1}async _queryFeaturesMesh(e,r){await this._validateQueryFeaturesMesh(e);const t=await r(),i=this.graphicsPipeline;if(e?.outStatistics||null==i)return t;const s=this.layer.objectIdField,a=[];for(const o of t.features)if(o.geometry){const e=i.getHydratedGeometry(o.attributes[s]);e&&(o.geometry=e,a.push(o))}else a.push(o);return t.features=a,t}async _validateQueryFeaturesMesh(e){if(!e)return;const t=e=>{throw new r("feature-layer-view:unsupported-query",`Queries on Mesh feature collection layers do not support '${e}'`)},i=["quantizationParameters","geometryPrecision","maxAllowableOffset"];for(const r of i)null!=e[r]&&t(r);"returnM"in e&&e.returnM&&t("returnM"),"returnCentroid"in e&&e.returnCentroid&&t("returnCentroid"),null==e.outSpatialReference||e.outSpatialReference.equals(this.view.spatialReference)||t("outSpatialReference")}get test(){}};e([a()],f.prototype,"layer",void 0),e([a()],f.prototype,"graphicsPipeline",void 0),e([a()],f.prototype,"maximumNumberOfFeatures",null),e([a()],f.prototype,"maximumNumberOfFeaturesExceeded",null),e([a(c)],f.prototype,"updatingProgress",void 0),e([a({readOnly:!0})],f.prototype,"updatingProgressValue",null),e([a({readOnly:!0})],f.prototype,"updatePolicy",null),e([a({readOnly:!0})],f.prototype,"hasZ",null),e([a({readOnly:!0})],f.prototype,"hasM",null),f=e([o("esri.views.3d.layers.FeatureLayerViewBase3D")],f);const g=f;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.31/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Error.js";import{destroyMaybe as r}from"../../../core/maybe.js";import{property as i}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{hydrateGraphic as n}from"../../../layers/graphics/hydratedFeatures.js";import{combineTimeExtent as p}from"../../../layers/support/timeSupport.js";import a from"../../../rest/support/Query.js";import{toViewIfLocal as o}from"./support/projectExtentUtils.js";import{UpdatePolicy as l}from"../webgl-engine/lib/UpdatePolicy.js";const u=u=>{let h=class extends u{constructor(){super(...arguments),this.updatePolicy=l.SYNC,this.slicePlaneEnabled=!1,this.fullExtentInLocalViewSpatialReference=null,this.supportsHeightUnitConversion=!0}initialize(){const e=this.layer;"isTable"in e&&e.isTable?this.addResolvingPromise(Promise.reject(new t("featurelayerview:table-not-supported","table feature layer can't be displayed",{layer:e}))):(this.addResolvingPromise(this._validateGeometryType()),this.addResolvingPromise((async()=>{const e=await o(this);this.fullExtentInLocalViewSpatialReference=e;const t=this.createGraphicsPipeline();this.graphicsPipeline=t,await t.when()})()),this.notifyChange("updating"))}destroy(){this.graphicsPipeline=r(this.graphicsPipeline)}get dataUpdating(){return!!this.graphicsPipeline?.dataUpdating}get legendEnabled(){return this.canResume()&&this.graphicsPipeline?.legendEnabled}get visibleAtCurrentScale(){return!this.graphicsPipeline?.scaleVisibilitySuspended}get symbologySnappingSupported(){return this.graphicsPipeline.symbologySnappingSupported}get hasAllFeatures(){return this.graphicsPipeline.hasAllFeatures}get hasAllFeaturesInView(){return this.graphicsPipeline.hasAllFeaturesInView}get hasFullGeometries(){return this.graphicsPipeline.hasFullGeometries}get timeExtent(){return p(this.layer,this.view?.timeExtent,this._get("timeExtent"))}get queryEngine(){return this.graphicsPipeline.queryEngine}getHit(e){const t=this.graphicsPipeline.findGraphic((t=>t.uid===e));if(null==t)return null;const r=n(t,this.layer);return{type:"graphic",graphic:r,layer:r.layer}}whenGraphicBounds(e,t){return this.graphicsPipeline?.whenGraphicBounds(e,t)}computeAttachmentOrigin(e,t){return this.graphicsPipeline?.computeAttachmentOrigin(e,t)}async elevationAlignPointsInFeatures(e,t){return this.graphicsPipeline.elevationAlignPointsInFeatures(e,t)}async queryForSymbologySnapping(e,t){return this.graphicsPipeline.queryForSymbologySnapping(e,t)}queryFeatures(e,t){return this.queryEngine.executeQuery(this._ensureQuery(e),t?.signal)}queryObjectIds(e,t){return this.queryEngine.executeQueryForIds(this._ensureQuery(e),t?.signal)}queryFeatureCount(e,t){return this.queryEngine.executeQueryForCount(this._ensureQuery(e),t?.signal)}queryExtent(e,t){return this.queryEngine.executeQueryForExtent(this._ensureQuery(e),t?.signal)}_ensureQuery(e){return null==e?this.createQuery():a.from(e)}highlight(e){return this.graphicsPipeline.highlight(e)}maskOccludee(e){return this.graphicsPipeline.maskOccludee(e)}getSuspendInfo(){return{...super.getSuspendInfo(),...this.graphicsPipeline.suspendInfo}}isUpdating(){return!(!this.graphicsPipeline||this.graphicsPipeline.destroyed)&&!(!this.graphicsPipeline?.updating&&this.view?.basemapTerrain?.ready)}async _validateGeometryType(){switch(this.layer.geometryType){case"multipatch":case"multipoint":throw new t("featurelayerview3d:unsupported-geometry-type","Unsupported geometry type ${geometryType}",{geometryType:this.layer.geometryType})}}get performanceInfo(){return this.graphicsPipeline.performanceInfo}};return e([i()],h.prototype,"graphicsPipeline",void 0),e([i({readOnly:!0})],h.prototype,"dataUpdating",null),e([i()],h.prototype,"suspended",void 0),e([i({readOnly:!0})],h.prototype,"legendEnabled",null),e([i({readOnly:!0})],h.prototype,"visibleAtCurrentScale",null),e([i()],h.prototype,"updating",void 0),e([i({readOnly:!0})],h.prototype,"updatePolicy",void 0),e([i({type:Boolean})],h.prototype,"slicePlaneEnabled",void 0),e([i({readOnly:!0})],h.prototype,"suspendInfo",void 0),e([i()],h.prototype,"symbologySnappingSupported",null),e([i({readOnly:!0})],h.prototype,"hasAllFeatures",null),e([i({readOnly:!0})],h.prototype,"hasAllFeaturesInView",null),e([i({readOnly:!0})],h.prototype,"hasFullGeometries",null),e([i({readOnly:!0})],h.prototype,"timeExtent",null),h=e([s("esri.views.3d.layers.FeatureLikeLayerView3D")],h),h};export{u as FeatureLikeLayerView3D};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Error.js";import{destroyMaybe as r}from"../../../core/maybe.js";import{property as i}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{hydrateGraphic as n}from"../../../layers/graphics/hydratedFeatures.js";import{combineTimeExtent as a}from"../../../layers/support/timeSupport.js";import p from"../../../rest/support/Query.js";import{toViewIfLocal as o}from"./support/projectExtentUtils.js";import{UpdatePolicy as l}from"../webgl-engine/lib/UpdatePolicy.js";const u=u=>{let h=class extends u{constructor(){super(...arguments),this.updatePolicy=l.SYNC,this.slicePlaneEnabled=!1,this.fullExtentInLocalViewSpatialReference=null,this.supportsHeightUnitConversion=!0}initialize(){const e=this.layer;"isTable"in e&&e.isTable?this.addResolvingPromise(Promise.reject(new t("featurelayerview:table-not-supported","table feature layer can't be displayed",{layer:e}))):(this.addResolvingPromise(this._validateGeometryType()),this.addResolvingPromise((async()=>{const e=await o(this);if(this.destroyed)return;this.fullExtentInLocalViewSpatialReference=e;const t=await this.createGraphicsPipeline();this.destroyed?t.destroy():(this.graphicsPipeline=t,await t.when())})()),this.notifyChange("updating"))}destroy(){this.graphicsPipeline=r(this.graphicsPipeline)}get dataUpdating(){return!!this.graphicsPipeline?.dataUpdating}get legendEnabled(){return this.canResume()&&this.graphicsPipeline?.legendEnabled}get visibleAtCurrentScale(){return!this.graphicsPipeline?.scaleVisibilitySuspended}get symbologySnappingSupported(){return this.graphicsPipeline.symbologySnappingSupported}get hasAllFeatures(){return this.graphicsPipeline.hasAllFeatures}get hasAllFeaturesInView(){return this.graphicsPipeline.hasAllFeaturesInView}get hasFullGeometries(){return this.graphicsPipeline.hasFullGeometries}get timeExtent(){return a(this.layer,this.view?.timeExtent,this._get("timeExtent"))}get queryEngine(){return this.graphicsPipeline.queryEngine}getHit(e){const t=this.graphicsPipeline.findGraphic((t=>t.uid===e));if(null==t)return null;const r=n(t,this.layer);return{type:"graphic",graphic:r,layer:r.layer}}whenGraphicBounds(e,t){return this.graphicsPipeline?.whenGraphicBounds(e,t)}computeAttachmentOrigin(e,t){return this.graphicsPipeline?.computeAttachmentOrigin(e,t)}async elevationAlignPointsInFeatures(e,t){return this.graphicsPipeline.elevationAlignPointsInFeatures(e,t)}async queryForSymbologySnapping(e,t){return this.graphicsPipeline.queryForSymbologySnapping(e,t)}queryFeatures(e,t){return this.queryEngine.executeQuery(this._ensureQuery(e),t?.signal)}queryObjectIds(e,t){return this.queryEngine.executeQueryForIds(this._ensureQuery(e),t?.signal)}queryFeatureCount(e,t){return this.queryEngine.executeQueryForCount(this._ensureQuery(e),t?.signal)}queryExtent(e,t){return this.queryEngine.executeQueryForExtent(this._ensureQuery(e),t?.signal)}_ensureQuery(e){return null==e?this.createQuery():p.from(e)}highlight(e){return this.graphicsPipeline.highlight(e)}maskOccludee(e){return this.graphicsPipeline.maskOccludee(e)}getSuspendInfo(){return{...super.getSuspendInfo(),...this.graphicsPipeline.suspendInfo}}isUpdating(){return!(!this.graphicsPipeline||this.graphicsPipeline.destroyed)&&!(!this.graphicsPipeline?.updating&&this.view?.basemapTerrain?.ready)}async _validateGeometryType(){switch(this.layer.geometryType){case"multipatch":case"multipoint":throw new t("featurelayerview3d:unsupported-geometry-type","Unsupported geometry type ${geometryType}",{geometryType:this.layer.geometryType})}}get performanceInfo(){return this.graphicsPipeline.performanceInfo}};return e([i()],h.prototype,"graphicsPipeline",void 0),e([i({readOnly:!0})],h.prototype,"dataUpdating",null),e([i()],h.prototype,"suspended",void 0),e([i({readOnly:!0})],h.prototype,"legendEnabled",null),e([i({readOnly:!0})],h.prototype,"visibleAtCurrentScale",null),e([i()],h.prototype,"updating",void 0),e([i({readOnly:!0})],h.prototype,"updatePolicy",void 0),e([i({type:Boolean})],h.prototype,"slicePlaneEnabled",void 0),e([i({readOnly:!0})],h.prototype,"suspendInfo",void 0),e([i()],h.prototype,"symbologySnappingSupported",null),e([i({readOnly:!0})],h.prototype,"hasAllFeatures",null),e([i({readOnly:!0})],h.prototype,"hasAllFeaturesInView",null),e([i({readOnly:!0})],h.prototype,"hasFullGeometries",null),e([i({readOnly:!0})],h.prototype,"timeExtent",null),h=e([s("esri.views.3d.layers.FeatureLikeLayerView3D")],h),h};export{u as FeatureLikeLayerView3D};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../chunks/tslib.es6.js";import{binaryIndexOf as t}from"../../../core/arrayUtils.js";import"../../../core/has.js";import r from"../../../core/Logger.js";import{destroyMaybe as i}from"../../../core/maybe.js";import{initial as s,watch as o}from"../../../core/reactiveUtils.js";import{estimateSize as a}from"../../../core/typedArrayUtil.js";import{generateUID as n}from"../../../core/uid.js";import{property as l}from"../../../core/accessorSupport/decorators/property.js";import{subclass as d}from"../../../core/accessorSupport/decorators/subclass.js";import{s as u}from"../../../chunks/vec32.js";import{ZEROS as h,create as p}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{projectBuffer as c}from"../../../geometry/projection/projectBuffer.js";import{projectVectorToVector as g}from"../../../geometry/projection/projectVectorToVector.js";import{extentContainsCoords3D as m,extentContainsCoords2D as y}from"../../../geometry/support/contains.js";import{newDoubleArray as f,doubleArrayFrom as _}from"../../../geometry/support/DoubleArray.js";import{getGeometryZScaler as b}from"../../../geometry/support/zscale.js";import{fallbackObjectIDAttribute as v}from"../../../layers/LayerConstants.js";import{estimateSize as I}from"../../../layers/graphics/dehydratedFeatures.js";import{makeDehydratedPoint as x}from"../../../layers/graphics/dehydratedPoint.js";import{hydrateGraphic as E}from"../../../layers/graphics/hydratedFeatures.js";import w from"../../../layers/graphics/controllers/I3SOnDemandController.js";import N from"../../../layers/support/FeatureFilter.js";import j from"../../../rest/support/Query.js";import{isBasemapLayer as O}from"../../../support/basemapUtils.js";import{I3SPointsWorkerHandle as C}from"./I3SPointsWorkerHandle.js";import{LayerView3D as F}from"./LayerView3D.js";import{Graphics3DFeatureProcessor as S}from"./graphics/Graphics3DFeatureProcessor.js";import{QueryEngine as D}from"./graphics/QueryEngine.js";import{createInteractiveEditSession as G,normalizeEditResultsEvent as A,processAttributeEdits as P}from"./i3s/featureEditing.js";import{I3SGraphicsMap as L}from"./i3s/I3SGraphicsMap.js";import{I3SOverrides as V}from"./i3s/I3SOverrides.js";import{checkRecyclable as R,checkSpatialReferences as M,containsDraco as H,whenGraphicAttributes as Q,getCachedAttributeValue as q}from"./i3s/I3SUtil.js";import{DefinitionExpressionSceneLayerView as U}from"./support/DefinitionExpressionSceneLayerView.js";import{defineFieldProperties as T}from"./support/fieldProperties.js";import{LayerViewPerformanceInfo as B}from"./support/LayerViewPerformanceInfo.js";import{PopupSceneLayerView as k}from"./support/PopupSceneLayerView.js";import{SceneLayerViewRequiredFields as z}from"./support/SceneLayerViewRequiredFields.js";import{TemporalSceneLayerView as W}from"./support/TemporalSceneLayerView.js";import{debugFlags as Z}from"../support/debugFlags.js";import{compute as K}from"../support/orientedBoundingBox.js";import{updatingProgress as Y}from"../support/updatingProperties.js";import{Vertices as $}from"../webgl-engine/lib/Attribute.js";import{UpdatePolicy as J}from"../webgl-engine/lib/UpdatePolicy.js";import X from"../../layers/SceneLayerView.js";import{hasPopupTemplate as ee}from"../../layers/support/popupUtils.js";import{TaskPriority as te}from"../../support/Scheduler.js";const re=T();class ie{constructor(e,t,r,i){this.graphics=e,this.featureIds=t,this.attributeInfo=r,this.node=i}}let se=class extends(W(U(k(F(X))))){constructor(){super(...arguments),this.type="scene-layer-graphics-3d",this._queryEngine=null,this._memCache=null,this._interactiveEditingSessions=new Map,this._pendingEditsQueue=Promise.resolve(),this.loadedGraphics=new L(((e,t,r)=>le(e,t,r)),(e=>this.processor.graphicsCore.recreateGraphics(e))),this.holeFilling="always",this.progressiveLoadFactor=1,this.supportsHeightUnitConversion=!0,this._coordinatesOutsideExtentErrors=0,this._maxCoordinatesOutsideExtentErrors=20}tryRecycleWith(e,t){return e.url===this.layer.url&&this._i3sOverrides.isEmpty?e.load(t).then((()=>{R(this.layer,e,this._i3sOverrides),this.layer=e,this._i3sOverrides.destroy();const t=this.view.resourceController?.memoryController;this._i3sOverrides=new V({view:this.view,layer:e,memoryController:t}),i(this._queryEngine),this._setupQueryEngine(),this.processor.resetObjectStates()})):null}initialize(){this.addResolvingPromise(this.layer.indexInfo);const e=this.view.resourceController?.memoryController;this._i3sOverrides=new V({view:this.view,layer:this.layer,memoryController:e}),M(this.layer,this.view.spatialReference,this.view.viewingMode),this._fieldsHelper=new z({layerView:this}),this._updatingHandles.add((()=>this.layer.rangeInfos),(e=>this._rangeInfosChanged(e)),s),this._updatingHandles.add((()=>this.layer.renderer),((e,t)=>this._rendererChange(e,t))),this._updatingHandles.add((()=>[this.parsedDefinitionExpression,this._excludeObjectIdsSorted]),(()=>this._filterChange())),this.addHandles(o((()=>Z.I3S_TREE_SHOW_TILES),(e=>{if(e&&!this._treeDebugger){const e=this._controller.crsIndex;import("./support/I3STreeDebugger.js").then((({I3STreeDebugger:t})=>{!this._treeDebugger&&Z.I3S_TREE_SHOW_TILES&&(this._treeDebugger=new t({lv:this,view:this.view,nodeSR:e}))}))}else e||!this._treeDebugger||Z.I3S_TREE_SHOW_TILES||(this._treeDebugger.destroy(),this._treeDebugger=null)}),s)),this._set("processor",new S({owner:this,preferredUpdatePolicy:J.ASYNC,scaleVisibilityEnabled:!0,filterVisibilityEnabled:!0,timeExtentEnabled:!1,frustumVisibilityEnabled:!1,elevationAlignmentEnabled:!0,elevationFeatureExpressionEnabled:!1,setUidToIdOnAdd:!1,dataExtent:this.layer.fullExtent,updateClippingExtent:e=>this._updateClippingExtent(e)})),this.processor.elevationAlignment?.events.on("invalidate-elevation",(({extent:e,spatialReference:t})=>this._controller.updateElevationChanged(e,t))),this.supportsHeightUnitConversion&&(this._verticalScale=b("point",this.layer.spatialReference,this.view.spatialReference)),this.addResolvingPromise(this.processor.initializePromise),this._memCache=this.view.resourceController.memoryController.newCache(`psl-${this.uid}`),this._controller=new w({layerView:this}),H(this.layer.geometryDefinitions)&&(this._worker=new C((e=>this.view.resourceController.immediate.schedule(e)))),this.addHandles(this.layer.on("apply-edits",(e=>this._updatingHandles.addPromise(e.result)))),this.addHandles(this.layer.on("edits",(e=>{const t=this._pendingEditsQueue.then((()=>this._handleEdits(e))).then();this._pendingEditsQueue=t,this._updatingHandles.addPromise(t)}))),this.when((()=>{this._setupQueryEngine(),this._updatingHandles.add((()=>this.maximumNumberOfFeatures),(e=>this._controller.featureTarget=e),s),this._updatingHandles.add((()=>this.suspended),(e=>{e&&this._removeAllNodeData()}))}))}destroy(){this._treeDebugger=i(this._treeDebugger),this._i3sOverrides=i(this._i3sOverrides),this._set("processor",i(this.processor)),this._controller=i(this._controller),this._queryEngine=i(this._queryEngine),this._worker=i(this._worker),this._memCache=i(this._memCache),this.loadedGraphics.clear(),this._fieldsHelper=i(this._fieldsHelper)}get i3slayer(){return this.layer}get updatingProgressValue(){return this._controller?.updatingProgress??1}get requiredFields(){return this._fieldsHelper?.requiredFields??[]}get maximumNumberOfFeatures(){const e=this.processor?.graphicsCore?.displayFeatureLimit;return e?.maximumNumberOfFeatures??0}set maximumNumberOfFeatures(e){null!=e?(this._override("maximumNumberOfFeatures",e),this._controller.fixedFeatureTarget=!0):(this._clearOverride("maximumNumberOfFeatures"),this._controller.fixedFeatureTarget=!1)}get maximumNumberOfFeaturesExceeded(){return!this.suspended&&(!!this._controller?.useMaximumNumberOfFeatures&&!this._controller.leavesReached)}get _excludeObjectIdsSorted(){const e=this.layer.excludeObjectIds;return e.length?e.toArray().sort(((e,t)=>e-t)):null}get lodFactor(){return"Labels"===this.layer.semantic?1:this.view.qualitySettings.sceneService.point.lodFactor}get hasM(){return!1}get hasZ(){return!0}get contentVisible(){return!this.suspended&&!!this._controller?.rootNodeVisible}get legendEnabled(){return this.contentVisible&&!0===this.i3slayer?.legendEnabled}async whenGraphicAttributes(e,t){return Q(this.layer,e,this._getObjectIdField(),t,(()=>[...this.loadedGraphics.nodes()]))}getHit(e){if(!this.loadedGraphics)return null;const t=E(this.loadedGraphics.find((t=>t.uid===e)),this.layer),r=this._getObjectIdField();return t?.attributes?.[r]?(t.layer=this.layer,t.sourceLayer=this.layer,{type:"graphic",graphic:t,layer:t.layer}):null}whenGraphicBounds(e,t){return this.processor.whenGraphicBounds(e,t)}computeAttachmentOrigin(e,t){return this.processor.computeAttachmentOrigin(e,t)}isUpdating(){return!!(this._controller?.updating||this.processor?.updating||this._fieldsHelper?.updating||this.layerFilterUpdating)}highlight(e){return this.processor.highlight(e,this.layer.objectIdField)}get updatePolicy(){return this.processor.graphicsCore.effectiveUpdatePolicy}createInteractiveEditSession(e){return G(this._attributeEditingContext,e)}async _decompressBinaryPointData(e,t){const r={geometryBuffer:e.geometryBuffer};null==this._worker&&(this._worker=new C((e=>this.view.resourceController.immediate.schedule(e))));const i=await this._worker.invoke(r,t);if(null==i)throw new Error("Failed to decompress Draco point data");return{positionData:i.positions,featureIds:i.featureIds}}async addNode(e,t,i){if(!ne(t)&&!ae(t))throw new Error;if(this.loadedGraphics.hasNode(e.index))return void r.getLogger(this).error("I3S node "+e.id+" already added");const s=null!=this.layer.fullExtent?ue(this.layer.fullExtent.clone(),.5):null,{featureIds:o,pointPositions:a}=ne(t)?await this._extractBinaryPointPositions(e,t,i):this._extractLegacyPointPositions(t),n=new Array;this._validatePositions(e,o,a,s,n);const l=this._controller.crsVertex,d=this.view.spatialReference;c(a,l,0,a,d,0,o.length);const u=ne(t)?e.level:0,h=this._createGraphics(o,a,e.index,u),p=new ie(h,o,t.attributeDataInfo,e);if(await this._i3sOverrides.applyAttributeOverrides(p.featureIds,t.attributeDataInfo,i),e.numFeatures=p.graphics.length,this._updateNodeMemory(e),de(p),n.length>0&&(this._computeObb(e,n,l),this._controller.updateVisibility(e.index)),!this._controller.isGeometryVisible(e))return void this._cacheNodeData(p);if(null!=this._verticalScale)for(const r of p.graphics)this._verticalScale(r.geometry);const g=this.view._stage.renderView.objectAndLayerIdRenderHelper;if(null!=g){const e=O(this.view.map,this.layer.uid);for(let t=0;t<p.featureIds.length;t++){const r=p.featureIds[t];g.setUidToObjectAndLayerId(r,p.graphics[t].uid,this.layer.id,this.layer.uid,this.layer.popupEnabled&&!e&&ee(this.layer,this.view.popup?.defaultPopupTemplateEnabled),p.node.resources.attributes,t)}}this.loadedGraphics.addNode(e.index,p),this._controller.updateLoadStatus(e.index,!0),this._filterNode(p),this._treeDebugger&&this._treeDebugger.update()}_computeObb(e,t,r){const i=this._controller.crsIndex,s=i.isGeographic?this.view.renderSpatialReference:i;c(t,r,0,t,s,0,t.length/3),e.serviceObbInIndexSR=K(new $(t,3)),i.isGeographic&&(g(e.serviceObbInIndexSR.center,s,pe,i),e.serviceObbInIndexSR.center=pe)}isNodeLoaded(e){return this.loadedGraphics.hasNode(e)}isNodeReloading(){return!1}updateNodeState(){}async _extractBinaryPointPositions(e,t,r){const i=await this._decompressBinaryPointData(t,r),s=i.positionData,o=3,a=s.length/o,n=f(3*a),l=null!=e.serviceObbInIndexSR?e.serviceObbInIndexSR.center:h,d=Math.abs(l[2])*2**-20;for(let u=0;u<a;u++){const e=u*o;n[e]=s[e]+l[0],n[e+1]=s[e+1]+l[1],n[e+2]=s[e+2]+l[2],Math.abs(n[e+2])<d&&(n[e+2]=0)}return{featureIds:i.featureIds?_(i.featureIds):[],pointPositions:n}}_extractLegacyPointPositions(e){const t=e.pointData.length,r=f(3*t),i=new Array;for(let s=0;s<t;s++){const t=e.pointData[s],o=t.featureDataPosition,a=o.length,n=t.geometries?.[0]??he[a],l=t.featureIds[0];if("Embedded"!==n.type||"points"!==n.params.type||a<2||a>3)continue;const d=n.params.vertexAttributes?.position??[0,0,0],u=3*i.length;r[u]=o[0]+d[0],r[u+1]=o[1]+d[1],r[u+2]=3===a?o[2]+d[2]:NaN,i.push(l)}return{featureIds:i,pointPositions:r}}_validatePositions(e,t,i,s,o){if(null==s&&e.serviceObbInIndexSR)return;const a=t.length,n=3;for(let l=0;l<a;l++){const t=l*n;u(pe,i[t],i[t+1],i[t+2]);const a=!Number.isNaN(i[2]);null==s||(a?m(s,pe):y(s,pe))||(this._coordinatesOutsideExtentErrors<this._maxCoordinatesOutsideExtentErrors&&r.getLogger(this).error("Service Error: Coordinates outside of layer extent"),this._coordinatesOutsideExtentErrors+1===this._maxCoordinatesOutsideExtentErrors&&r.getLogger(this).error("Maximum number of errors reached. Further errors are ignored."),this._coordinatesOutsideExtentErrors++),e.serviceObbInIndexSR||o.push(pe[0],pe[1],pe[2])}}_createGraphics(e,t,r,i){const s=e.length,o=3,a=this._getObjectIdField(),l=this.processor.graphicsCore,d=new Array,u=this.view.spatialReference;for(let h=0;h<s;h++){const s=e[h],p={};null!=s&&(p[a]=s);const c=s??n(),g=h*o,m=isNaN(t[g+2])?void 0:t[g+2],y=x(t[g],t[g+1],m,u),f=this.loadedGraphics.get(c);if(null!=f)(null==f.level||f.level<i)&&(ce.property="geometry",ce.graphic=f,ce.oldValue=f.geometry,ce.newValue=y,f.geometry=y,f.level=i,l.graphicUpdateHandler(ce)),d.push(f);else{const e=n();d.push({objectId:c,uid:e,geometry:y,attributes:p,visible:!0,nodeIndex:r,level:i})}}return d}_updateNodeMemory(e){e.memory=4096+(null!=e.numFeatures?e.numFeatures*this.processor.graphicsCore.usedMemoryPerGraphic:0)}_cacheNodeData(e){const t=e.graphics.reduce(((e,t)=>I(t)+e),a(e.featureIds)+1024);this._memCache.put(this._getMemCacheKey(e.node),e,t)}_getMemCacheKey(e){return`${e.index}`}_removeAllNodeData(){this.loadedGraphics.forEachNode(((e,t)=>{if(e){const t=e.node;this._updateNodeMemory(t),this._cacheNodeData(e)}this._controller.updateLoadStatus(t,!1)})),this._treeDebugger&&this._treeDebugger.update(),this.loadedGraphics.clear()}removeNode(e){const t=this._removeNodeStageData(e);t&&(this._updateNodeMemory(t.node),this._cacheNodeData(t))}_removeNodeStageData(e){const t=this.loadedGraphics.getNode(e);return null==t?null:(this._controller.updateLoadStatus(e,!1),this.loadedGraphics.removeNode(e),this._treeDebugger&&this._treeDebugger.update(),t)}async loadCachedNodeData(e){return this._memCache?.pop(this._getMemCacheKey(e))}async addCachedNodeData(e,t,i,s){this.loadedGraphics.hasNode(e.index)?r.getLogger(this).error("I3S node "+e.id+" already added"):(await this._i3sOverrides.applyAttributeOverrides(t.featureIds,i,s),t.attributeInfo=i,this.loadedGraphics.addNode(e.index,t),this._controller.updateLoadStatus(e.index,!0),this._updateNodeMemory(e),de(t),this._filterNode(t),this._treeDebugger&&this._treeDebugger.update())}getLoadedNodeIds(){const e=[];return this.loadedGraphics.forEachNode((t=>e.push(t.node.id))),e.sort()}getVisibleNodes(){const e=new Array;return this.loadedGraphics.forEachNode((t=>e.push(t.node))),e}getLoadedNodeIndices(e){this.loadedGraphics.forEachNode(((t,r)=>e.push(r)))}getLoadedAttributes(e){const t=this.loadedGraphics.getNode(e);if(null!=t?.attributeInfo)return t.attributeInfo.loadedAttributes}getAttributeData(e){const t=this.loadedGraphics.getNode(e);if(null!=t?.attributeInfo)return t.attributeInfo.attributeData}_setAttributeData(e,t){const r=this.loadedGraphics.getNode(e);null!=r?.attributeInfo&&(r.attributeInfo.attributeData=t,this._attributeValuesChanged(r))}async updateAttributes(e,t,r){const i=this.loadedGraphics.getNode(e);null!=i&&(await this._i3sOverrides.applyAttributeOverrides(i.featureIds,t,r),i.attributeInfo=t,this._attributeValuesChanged(i))}_attributeValuesChanged(e){de(e),this._filterNode(e);const{processor:t}=this,{graphicsCore:r}=t;if(r.labelsEnabled){const t=e.node.index,i=new Array;e.graphics.forEach((e=>e.nodeIndex===t&&i.push(e.uid))),r.updateLabelingInfo(i)}t.refreshFilter()}_updateClippingExtent(e){return this._controller&&this._controller.updateClippingArea(e),!1}_getObjectIdField(){return this.layer.objectIdField||v}_getGlobalIdField(){return this.layer.associatedLayer?.globalIdField}async _rendererChange(e,t){const{layer:{fieldsIndex:r}}=this,i=new Set;let s,o;e?(await e.collectRequiredFields(i,r),s=Array.from(i).sort()):s=[],i.clear(),t?(await t.collectRequiredFields(i,r),o=Array.from(i).sort()):o=[],s.length===o.length&&s.every(((e,t)=>s[t]===o[t]))||this._reloadAllNodes()}_rangeInfosChanged(e){null!=e&&e.length>0&&r.getLogger(this).warn("Unsupported property: rangeInfos are currently only serialized to and from web scenes but do not affect rendering.")}_filterChange(){this.loadedGraphics.forEachNode((e=>this._filterNode(e)))}_reloadAllNodes(){this._removeAllNodeData(),this._controller&&this._controller.restartNodeLoading()}_filterNode(e){const r=this.parsedDefinitionExpression,i=this._excludeObjectIdsSorted,s=this._getObjectIdField();for(const o of e.graphics){const e=o.visible,a=!r||this._evaluateClause(r,o),n=null==i||t(i,o.attributes[s])<0;o.visible=a&&n,e!==o.visible&&(ce.graphic=o,ce.property="visible",ce.oldValue=e,ce.newValue=o.visible,this.processor.graphicsCore.graphicUpdateHandler(ce))}}createQuery(){const e={outFields:["*"],returnGeometry:!0,outSpatialReference:this.view.spatialReference};return null!=this.filter?this.filter.createQuery(e):new j(e)}queryFeatures(e,t){return this._queryEngine.executeQuery(this._ensureQuery(e),t?.signal)}queryObjectIds(e,t){return this._queryEngine.executeQueryForIds(this._ensureQuery(e),t?.signal)}queryFeatureCount(e,t){return this._queryEngine.executeQueryForCount(this._ensureQuery(e),t?.signal)}queryExtent(e,t){return this._queryEngine.executeQueryForExtent(this._ensureQuery(e),t?.signal)}_ensureQuery(e){return this._addDefinitionExpressionToQuery(null==e?this.createQuery():j.from(e))}_setupQueryEngine(){const e=()=>this.processor.featureStore;this._queryEngine=new D({context:{spatialReference:this.view.spatialReference,layer:this.layer,scheduler:this.view.resourceController.scheduler,get featureStore(){return e()},hasZ:this.hasZ,hasM:this.hasM},priority:te.FEATURE_QUERY_ENGINE})}get usedMemory(){return this.processor?.graphicsCore?.usedMemory??0}get unloadedMemory(){return.8*((this._controller?.unloadedMemoryEstimate??0)+(this.processor?.graphicsCore?.unprocessedMemoryEstimate??0))}get ignoresMemoryFactor(){return this._controller&&this._controller.fixedFeatureTarget}async _handleEdits(e){const t=this._attributeEditingContext,r=await A(t,e);P(t,r)}get _attributeEditingContext(){const e=this._getObjectIdField(),t=this._getGlobalIdField();return{sessions:this._interactiveEditingSessions,fieldsIndex:this.layer.fieldsIndex,objectIdField:e,globalIdField:t,forEachNode:e=>this.loadedGraphics.forEachNode((t=>e(t.node,t.featureIds))),attributeStorageInfo:this.i3slayer.attributeStorageInfo??[],i3sOverrides:this._i3sOverrides,getAttributeData:e=>this.getAttributeData(e),setAttributeData:(t,r,i)=>{this._setAttributeData(t,r);const s=this.loadedGraphics.getNode(t);if(null!=i){const t=this.loadedGraphics.get(i.attributes[e]);null!=t&&this.processor.graphicsCore.recreateGraphics([t])}else null!=s&&this.processor.graphicsCore.recreateGraphics(s.graphics)},clearMemCache:()=>{}}}get performanceInfo(){return new B(this.usedMemory,this.loadedGraphics.length,-1,this.maximumNumberOfFeatures,this.loadedGraphics.nodeCount,this.processor.graphicsCore.performanceInfo)}get test(){}};e([l()],se.prototype,"processor",void 0),e([l({type:N})],se.prototype,"filter",void 0),e([l()],se.prototype,"loadedGraphics",void 0),e([l()],se.prototype,"i3slayer",null),e([l()],se.prototype,"_controller",void 0),e([l()],se.prototype,"updating",void 0),e([l()],se.prototype,"suspended",void 0),e([l()],se.prototype,"holeFilling",void 0),e([l(Y)],se.prototype,"updatingProgress",void 0),e([l()],se.prototype,"updatingProgressValue",null),e([l(re.requiredFields)],se.prototype,"requiredFields",null),e([l(re.availableFields)],se.prototype,"availableFields",void 0),e([l()],se.prototype,"_fieldsHelper",void 0),e([l({type:Number})],se.prototype,"maximumNumberOfFeatures",null),e([l({readOnly:!0})],se.prototype,"maximumNumberOfFeaturesExceeded",null),e([l()],se.prototype,"_excludeObjectIdsSorted",null),e([l({readOnly:!0})],se.prototype,"lodFactor",null),e([l({readOnly:!0})],se.prototype,"hasM",null),e([l({readOnly:!0})],se.prototype,"hasZ",null),e([l()],se.prototype,"contentVisible",null),e([l({readOnly:!0})],se.prototype,"legendEnabled",null),se=e([d("esri.views.3d.layers.SceneLayerGraphicsView3D")],se);const oe=se;function ae(e){return"pointData"in e}function ne(e){return"geometryBuffer"in e&&null!==e.geometryBuffer}function le(e,t,r){const i=t.attributeInfo;if(null==i?.loadedAttributes||null==i.attributeData)return!1;let s=!1;for(const{name:o}of i.loadedAttributes)if(i.attributeData[o]){const t=q(i.attributeData[o],r);t!==e.attributes[o]&&(e.attributes[o]=t,s=!0)}return s}function de(e){const t=e.attributeInfo,r=e.node.index;if(null!=t?.loadedAttributes&&null!=t.attributeData)for(let i=0;i<e.graphics.length;i++){const s=e.graphics[i];if(s.nodeIndex===r){s.attributes||(s.attributes={});for(const{name:e}of t.loadedAttributes)t.attributeData[e]&&(s.attributes[e]=q(t.attributeData[e],i))}}}function ue(e,t){return e.xmin-=t,e.ymin-=t,e.xmax+=t,e.ymax+=t,null!=e.zmin&&null!=e.zmax&&(e.zmin-=t,e.zmax+=t),null!=e.mmin&&null!=e.mmax&&(e.mmin-=t,e.mmax+=t),e}const he={2:{type:"Embedded",params:{type:"points",vertexAttributes:{position:[0,0]}}},3:{type:"Embedded",params:{type:"points",vertexAttributes:{position:[0,0,0]}}}},pe=p(),ce={graphic:null,property:null,oldValue:null,newValue:null};export{oe as default};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import{binaryIndexOf as t}from"../../../core/arrayUtils.js";import"../../../core/has.js";import r from"../../../core/Logger.js";import{destroyMaybe as i}from"../../../core/maybe.js";import{initial as s,watch as o}from"../../../core/reactiveUtils.js";import{estimateSize as a}from"../../../core/typedArrayUtil.js";import{generateUID as n}from"../../../core/uid.js";import{property as l}from"../../../core/accessorSupport/decorators/property.js";import{subclass as d}from"../../../core/accessorSupport/decorators/subclass.js";import{s as u}from"../../../chunks/vec32.js";import{ZEROS as h,create as p}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{projectBuffer as c}from"../../../geometry/projection/projectBuffer.js";import{projectVectorToVector as g}from"../../../geometry/projection/projectVectorToVector.js";import{extentContainsCoords3D as m,extentContainsCoords2D as y}from"../../../geometry/support/contains.js";import{newDoubleArray as f,doubleArrayFrom as _}from"../../../geometry/support/DoubleArray.js";import{getGeometryZScaler as b}from"../../../geometry/support/zscale.js";import{fallbackObjectIDAttribute as v}from"../../../layers/LayerConstants.js";import{estimateSize as I}from"../../../layers/graphics/dehydratedFeatures.js";import{makeDehydratedPoint as x}from"../../../layers/graphics/dehydratedPoint.js";import{hydrateGraphic as E}from"../../../layers/graphics/hydratedFeatures.js";import w from"../../../layers/graphics/controllers/I3SOnDemandController.js";import N from"../../../layers/support/FeatureFilter.js";import j from"../../../rest/support/Query.js";import{isBasemapLayer as O}from"../../../support/basemapUtils.js";import{I3SPointsWorkerHandle as C}from"./I3SPointsWorkerHandle.js";import{LayerView3D as F}from"./LayerView3D.js";import{Graphics3DFeatureProcessor as S}from"./graphics/Graphics3DFeatureProcessor.js";import{QueryEngine as D}from"./graphics/QueryEngine.js";import{createInteractiveEditSession as G,normalizeEditResultsEvent as A,processAttributeEdits as P}from"./i3s/featureEditing.js";import{I3SGraphicsMap as L}from"./i3s/I3SGraphicsMap.js";import{I3SOverrides as V}from"./i3s/I3SOverrides.js";import{checkRecyclable as R,checkSpatialReferences as M,containsDraco as H,whenGraphicAttributes as Q,getCachedAttributeValue as q}from"./i3s/I3SUtil.js";import{DefinitionExpressionSceneLayerView as U}from"./support/DefinitionExpressionSceneLayerView.js";import{defineFieldProperties as T}from"./support/fieldProperties.js";import{LayerViewPerformanceInfo as B}from"./support/LayerViewPerformanceInfo.js";import{PopupSceneLayerView as k}from"./support/PopupSceneLayerView.js";import{SceneLayerViewRequiredFields as z}from"./support/SceneLayerViewRequiredFields.js";import{TemporalSceneLayerView as W}from"./support/TemporalSceneLayerView.js";import{debugFlags as Z}from"../support/debugFlags.js";import{compute as K}from"../support/orientedBoundingBox.js";import{updatingProgress as Y}from"../support/updatingProperties.js";import{Vertices as $}from"../webgl-engine/lib/Attribute.js";import{UpdatePolicy as J}from"../webgl-engine/lib/UpdatePolicy.js";import X from"../../layers/SceneLayerView.js";import{hasPopupTemplate as ee}from"../../layers/support/popupUtils.js";import{TaskPriority as te}from"../../support/Scheduler.js";const re=T();class ie{constructor(e,t,r,i){this.graphics=e,this.featureIds=t,this.attributeInfo=r,this.node=i}}let se=class extends(W(U(k(F(X))))){constructor(){super(...arguments),this.type="scene-layer-graphics-3d",this._queryEngine=null,this._memCache=null,this._interactiveEditingSessions=new Map,this._pendingEditsQueue=Promise.resolve(),this.loadedGraphics=new L(((e,t,r)=>le(e,t,r)),(e=>this.processor.graphicsCore.recreateGraphics(e))),this.holeFilling="always",this.progressiveLoadFactor=1,this.supportsHeightUnitConversion=!0,this._coordinatesOutsideExtentErrors=0,this._maxCoordinatesOutsideExtentErrors=20}tryRecycleWith(e,t){return e.url===this.layer.url&&this._i3sOverrides.isEmpty?e.load(t).then((()=>{R(this.layer,e,this._i3sOverrides),this.layer=e,this._i3sOverrides.destroy();const t=this.view.resourceController?.memoryController;this._i3sOverrides=new V({view:this.view,layer:e,memoryController:t}),i(this._queryEngine),this._setupQueryEngine(),this.processor.resetObjectStates()})):null}initialize(){this.addResolvingPromise(this.layer.indexInfo);const e=this.view.resourceController?.memoryController;this._i3sOverrides=new V({view:this.view,layer:this.layer,memoryController:e}),M(this.layer,this.view.spatialReference,this.view.viewingMode),this._fieldsHelper=new z({layerView:this}),this._updatingHandles.add((()=>this.layer.rangeInfos),(e=>this._rangeInfosChanged(e)),s),this._updatingHandles.add((()=>this.layer.renderer),((e,t)=>this._rendererChange(e,t))),this._updatingHandles.add((()=>[this.parsedDefinitionExpression,this._excludeObjectIdsSorted]),(()=>this._filterChange())),this.addHandles(o((()=>Z.I3S_TREE_SHOW_TILES),(e=>{if(e&&!this._treeDebugger){const e=this._controller.crsIndex;import("./support/I3STreeDebugger.js").then((({I3STreeDebugger:t})=>{!this._treeDebugger&&Z.I3S_TREE_SHOW_TILES&&(this._treeDebugger=new t({lv:this,view:this.view,nodeSR:e}))}))}else e||!this._treeDebugger||Z.I3S_TREE_SHOW_TILES||(this._treeDebugger.destroy(),this._treeDebugger=null)}),s)),this._set("processor",new S({owner:this,preferredUpdatePolicy:J.ASYNC,scaleVisibilityEnabled:!0,filterVisibilityEnabled:!0,timeExtentEnabled:!1,frustumVisibilityEnabled:!1,elevationAlignmentEnabled:!0,elevationFeatureExpressionEnabled:!1,setUidToIdOnAdd:!1,dataExtent:this.layer.fullExtent,updateClippingExtent:e=>this._updateClippingExtent(e)})),this.processor.elevationAlignment?.events.on("invalidate-elevation",(({extent:e,spatialReference:t})=>this._controller.updateElevationChanged(e,t))),this.supportsHeightUnitConversion&&(this._verticalScale=b("point",this.layer.spatialReference,this.view.spatialReference)),this.addResolvingPromise(this.processor.when()),this._memCache=this.view.resourceController.memoryController.newCache(`psl-${this.uid}`),this._controller=new w({layerView:this}),H(this.layer.geometryDefinitions)&&(this._worker=new C((e=>this.view.resourceController.immediate.schedule(e)))),this.addHandles(this.layer.on("apply-edits",(e=>this._updatingHandles.addPromise(e.result)))),this.addHandles(this.layer.on("edits",(e=>{const t=this._pendingEditsQueue.then((()=>this._handleEdits(e))).then();this._pendingEditsQueue=t,this._updatingHandles.addPromise(t)}))),this.when((()=>{this._setupQueryEngine(),this._updatingHandles.add((()=>this.maximumNumberOfFeatures),(e=>this._controller.featureTarget=e),s),this._updatingHandles.add((()=>this.suspended),(e=>{e&&this._removeAllNodeData()}))}))}destroy(){this._treeDebugger=i(this._treeDebugger),this._i3sOverrides=i(this._i3sOverrides),this._set("processor",i(this.processor)),this._controller=i(this._controller),this._queryEngine=i(this._queryEngine),this._worker=i(this._worker),this._memCache=i(this._memCache),this.loadedGraphics.clear(),this._fieldsHelper=i(this._fieldsHelper)}get i3slayer(){return this.layer}get updatingProgressValue(){return this._controller?.updatingProgress??1}get requiredFields(){return this._fieldsHelper?.requiredFields??[]}get maximumNumberOfFeatures(){const e=this.processor?.graphicsCore?.displayFeatureLimit;return e?.maximumNumberOfFeatures??0}set maximumNumberOfFeatures(e){null!=e?(this._override("maximumNumberOfFeatures",e),this._controller.fixedFeatureTarget=!0):(this._clearOverride("maximumNumberOfFeatures"),this._controller.fixedFeatureTarget=!1)}get maximumNumberOfFeaturesExceeded(){return!this.suspended&&(!!this._controller?.useMaximumNumberOfFeatures&&!this._controller.leavesReached)}get _excludeObjectIdsSorted(){const e=this.layer.excludeObjectIds;return e.length?e.toArray().sort(((e,t)=>e-t)):null}get lodFactor(){return"Labels"===this.layer.semantic?1:this.view.qualitySettings.sceneService.point.lodFactor}get hasM(){return!1}get hasZ(){return!0}get contentVisible(){return!this.suspended&&!!this._controller?.rootNodeVisible}get legendEnabled(){return this.contentVisible&&!0===this.i3slayer?.legendEnabled}async whenGraphicAttributes(e,t){return Q(this.layer,e,this._getObjectIdField(),t,(()=>[...this.loadedGraphics.nodes()]))}getHit(e){if(!this.loadedGraphics)return null;const t=E(this.loadedGraphics.find((t=>t.uid===e)),this.layer),r=this._getObjectIdField();return t?.attributes?.[r]?(t.layer=this.layer,t.sourceLayer=this.layer,{type:"graphic",graphic:t,layer:t.layer}):null}whenGraphicBounds(e,t){return this.processor.whenGraphicBounds(e,t)}computeAttachmentOrigin(e,t){return this.processor.computeAttachmentOrigin(e,t)}isUpdating(){return!!(this._controller?.updating||this.processor?.updating||this._fieldsHelper?.updating||this.layerFilterUpdating)}highlight(e){return this.processor.highlight(e,this.layer.objectIdField)}get updatePolicy(){return this.processor.graphicsCore.effectiveUpdatePolicy}createInteractiveEditSession(e){return G(this._attributeEditingContext,e)}async _decompressBinaryPointData(e,t){const r={geometryBuffer:e.geometryBuffer};null==this._worker&&(this._worker=new C((e=>this.view.resourceController.immediate.schedule(e))));const i=await this._worker.invoke(r,t);if(null==i)throw new Error("Failed to decompress Draco point data");return{positionData:i.positions,featureIds:i.featureIds}}async addNode(e,t,i){if(!ne(t)&&!ae(t))throw new Error;if(this.loadedGraphics.hasNode(e.index))return void r.getLogger(this).error("I3S node "+e.id+" already added");const s=null!=this.layer.fullExtent?ue(this.layer.fullExtent.clone(),.5):null,{featureIds:o,pointPositions:a}=ne(t)?await this._extractBinaryPointPositions(e,t,i):this._extractLegacyPointPositions(t),n=new Array;this._validatePositions(e,o,a,s,n);const l=this._controller.crsVertex,d=this.view.spatialReference;c(a,l,0,a,d,0,o.length);const u=ne(t)?e.level:0,h=this._createGraphics(o,a,e.index,u),p=new ie(h,o,t.attributeDataInfo,e);if(await this._i3sOverrides.applyAttributeOverrides(p.featureIds,t.attributeDataInfo,i),e.numFeatures=p.graphics.length,this._updateNodeMemory(e),de(p),n.length>0&&(this._computeObb(e,n,l),this._controller.updateVisibility(e.index)),!this._controller.isGeometryVisible(e))return void this._cacheNodeData(p);if(null!=this._verticalScale)for(const r of p.graphics)this._verticalScale(r.geometry);const g=this.view._stage.renderView.objectAndLayerIdRenderHelper;if(null!=g){const e=O(this.view.map,this.layer.uid);for(let t=0;t<p.featureIds.length;t++){const r=p.featureIds[t];g.setUidToObjectAndLayerId(r,p.graphics[t].uid,this.layer.id,this.layer.uid,this.layer.popupEnabled&&!e&&ee(this.layer,this.view.popup?.defaultPopupTemplateEnabled),p.node.resources.attributes,t)}}this.loadedGraphics.addNode(e.index,p),this._controller.updateLoadStatus(e.index,!0),this._filterNode(p),this._treeDebugger&&this._treeDebugger.update()}_computeObb(e,t,r){const i=this._controller.crsIndex,s=i.isGeographic?this.view.renderSpatialReference:i;c(t,r,0,t,s,0,t.length/3),e.serviceObbInIndexSR=K(new $(t,3)),i.isGeographic&&(g(e.serviceObbInIndexSR.center,s,pe,i),e.serviceObbInIndexSR.center=pe)}isNodeLoaded(e){return this.loadedGraphics.hasNode(e)}isNodeReloading(){return!1}updateNodeState(){}async _extractBinaryPointPositions(e,t,r){const i=await this._decompressBinaryPointData(t,r),s=i.positionData,o=3,a=s.length/o,n=f(3*a),l=null!=e.serviceObbInIndexSR?e.serviceObbInIndexSR.center:h,d=Math.abs(l[2])*2**-20;for(let u=0;u<a;u++){const e=u*o;n[e]=s[e]+l[0],n[e+1]=s[e+1]+l[1],n[e+2]=s[e+2]+l[2],Math.abs(n[e+2])<d&&(n[e+2]=0)}return{featureIds:i.featureIds?_(i.featureIds):[],pointPositions:n}}_extractLegacyPointPositions(e){const t=e.pointData.length,r=f(3*t),i=new Array;for(let s=0;s<t;s++){const t=e.pointData[s],o=t.featureDataPosition,a=o.length,n=t.geometries?.[0]??he[a],l=t.featureIds[0];if("Embedded"!==n.type||"points"!==n.params.type||a<2||a>3)continue;const d=n.params.vertexAttributes?.position??[0,0,0],u=3*i.length;r[u]=o[0]+d[0],r[u+1]=o[1]+d[1],r[u+2]=3===a?o[2]+d[2]:NaN,i.push(l)}return{featureIds:i,pointPositions:r}}_validatePositions(e,t,i,s,o){if(null==s&&e.serviceObbInIndexSR)return;const a=t.length,n=3;for(let l=0;l<a;l++){const t=l*n;u(pe,i[t],i[t+1],i[t+2]);const a=!Number.isNaN(i[2]);null==s||(a?m(s,pe):y(s,pe))||(this._coordinatesOutsideExtentErrors<this._maxCoordinatesOutsideExtentErrors&&r.getLogger(this).error("Service Error: Coordinates outside of layer extent"),this._coordinatesOutsideExtentErrors+1===this._maxCoordinatesOutsideExtentErrors&&r.getLogger(this).error("Maximum number of errors reached. Further errors are ignored."),this._coordinatesOutsideExtentErrors++),e.serviceObbInIndexSR||o.push(pe[0],pe[1],pe[2])}}_createGraphics(e,t,r,i){const s=e.length,o=3,a=this._getObjectIdField(),l=this.processor.graphicsCore,d=new Array,u=this.view.spatialReference;for(let h=0;h<s;h++){const s=e[h],p={};null!=s&&(p[a]=s);const c=s??n(),g=h*o,m=isNaN(t[g+2])?void 0:t[g+2],y=x(t[g],t[g+1],m,u),f=this.loadedGraphics.get(c);if(null!=f)(null==f.level||f.level<i)&&(ce.property="geometry",ce.graphic=f,ce.oldValue=f.geometry,ce.newValue=y,f.geometry=y,f.level=i,l.graphicUpdateHandler(ce)),d.push(f);else{const e=n();d.push({objectId:c,uid:e,geometry:y,attributes:p,visible:!0,nodeIndex:r,level:i})}}return d}_updateNodeMemory(e){e.memory=4096+(null!=e.numFeatures?e.numFeatures*this.processor.graphicsCore.usedMemoryPerGraphic:0)}_cacheNodeData(e){const t=e.graphics.reduce(((e,t)=>I(t)+e),a(e.featureIds)+1024);this._memCache.put(this._getMemCacheKey(e.node),e,t)}_getMemCacheKey(e){return`${e.index}`}_removeAllNodeData(){this.loadedGraphics.forEachNode(((e,t)=>{if(e){const t=e.node;this._updateNodeMemory(t),this._cacheNodeData(e)}this._controller.updateLoadStatus(t,!1)})),this._treeDebugger&&this._treeDebugger.update(),this.loadedGraphics.clear()}removeNode(e){const t=this._removeNodeStageData(e);t&&(this._updateNodeMemory(t.node),this._cacheNodeData(t))}_removeNodeStageData(e){const t=this.loadedGraphics.getNode(e);return null==t?null:(this._controller.updateLoadStatus(e,!1),this.loadedGraphics.removeNode(e),this._treeDebugger&&this._treeDebugger.update(),t)}async loadCachedNodeData(e){return this._memCache?.pop(this._getMemCacheKey(e))}async addCachedNodeData(e,t,i,s){this.loadedGraphics.hasNode(e.index)?r.getLogger(this).error("I3S node "+e.id+" already added"):(await this._i3sOverrides.applyAttributeOverrides(t.featureIds,i,s),t.attributeInfo=i,this.loadedGraphics.addNode(e.index,t),this._controller.updateLoadStatus(e.index,!0),this._updateNodeMemory(e),de(t),this._filterNode(t),this._treeDebugger&&this._treeDebugger.update())}getLoadedNodeIds(){const e=[];return this.loadedGraphics.forEachNode((t=>e.push(t.node.id))),e.sort()}getVisibleNodes(){const e=new Array;return this.loadedGraphics.forEachNode((t=>e.push(t.node))),e}getLoadedNodeIndices(e){this.loadedGraphics.forEachNode(((t,r)=>e.push(r)))}getLoadedAttributes(e){const t=this.loadedGraphics.getNode(e);if(null!=t?.attributeInfo)return t.attributeInfo.loadedAttributes}getAttributeData(e){const t=this.loadedGraphics.getNode(e);if(null!=t?.attributeInfo)return t.attributeInfo.attributeData}_setAttributeData(e,t){const r=this.loadedGraphics.getNode(e);null!=r?.attributeInfo&&(r.attributeInfo.attributeData=t,this._attributeValuesChanged(r))}async updateAttributes(e,t,r){const i=this.loadedGraphics.getNode(e);null!=i&&(await this._i3sOverrides.applyAttributeOverrides(i.featureIds,t,r),i.attributeInfo=t,this._attributeValuesChanged(i))}_attributeValuesChanged(e){de(e),this._filterNode(e);const{processor:t}=this,{graphicsCore:r}=t;if(r.labelsEnabled){const t=e.node.index,i=new Array;e.graphics.forEach((e=>e.nodeIndex===t&&i.push(e.uid))),r.updateLabelingInfo(i)}t.refreshFilter()}_updateClippingExtent(e){return this._controller&&this._controller.updateClippingArea(e),!1}_getObjectIdField(){return this.layer.objectIdField||v}_getGlobalIdField(){return this.layer.associatedLayer?.globalIdField}async _rendererChange(e,t){const{layer:{fieldsIndex:r}}=this,i=new Set;let s,o;e?(await e.collectRequiredFields(i,r),s=Array.from(i).sort()):s=[],i.clear(),t?(await t.collectRequiredFields(i,r),o=Array.from(i).sort()):o=[],s.length===o.length&&s.every(((e,t)=>s[t]===o[t]))||this._reloadAllNodes()}_rangeInfosChanged(e){null!=e&&e.length>0&&r.getLogger(this).warn("Unsupported property: rangeInfos are currently only serialized to and from web scenes but do not affect rendering.")}_filterChange(){this.loadedGraphics.forEachNode((e=>this._filterNode(e)))}_reloadAllNodes(){this._removeAllNodeData(),this._controller&&this._controller.restartNodeLoading()}_filterNode(e){const r=this.parsedDefinitionExpression,i=this._excludeObjectIdsSorted,s=this._getObjectIdField();for(const o of e.graphics){const e=o.visible,a=!r||this._evaluateClause(r,o),n=null==i||t(i,o.attributes[s])<0;o.visible=a&&n,e!==o.visible&&(ce.graphic=o,ce.property="visible",ce.oldValue=e,ce.newValue=o.visible,this.processor.graphicsCore.graphicUpdateHandler(ce))}}createQuery(){const e={outFields:["*"],returnGeometry:!0,outSpatialReference:this.view.spatialReference};return null!=this.filter?this.filter.createQuery(e):new j(e)}queryFeatures(e,t){return this._queryEngine.executeQuery(this._ensureQuery(e),t?.signal)}queryObjectIds(e,t){return this._queryEngine.executeQueryForIds(this._ensureQuery(e),t?.signal)}queryFeatureCount(e,t){return this._queryEngine.executeQueryForCount(this._ensureQuery(e),t?.signal)}queryExtent(e,t){return this._queryEngine.executeQueryForExtent(this._ensureQuery(e),t?.signal)}_ensureQuery(e){return this._addDefinitionExpressionToQuery(null==e?this.createQuery():j.from(e))}_setupQueryEngine(){const e=()=>this.processor.featureStore;this._queryEngine=new D({context:{spatialReference:this.view.spatialReference,layer:this.layer,scheduler:this.view.resourceController.scheduler,get featureStore(){return e()},hasZ:this.hasZ,hasM:this.hasM},priority:te.FEATURE_QUERY_ENGINE})}get usedMemory(){return this.processor?.graphicsCore?.usedMemory??0}get unloadedMemory(){return.8*((this._controller?.unloadedMemoryEstimate??0)+(this.processor?.graphicsCore?.unprocessedMemoryEstimate??0))}get ignoresMemoryFactor(){return this._controller&&this._controller.fixedFeatureTarget}async _handleEdits(e){const t=this._attributeEditingContext,r=await A(t,e);P(t,r)}get _attributeEditingContext(){const e=this._getObjectIdField(),t=this._getGlobalIdField();return{sessions:this._interactiveEditingSessions,fieldsIndex:this.layer.fieldsIndex,objectIdField:e,globalIdField:t,forEachNode:e=>this.loadedGraphics.forEachNode((t=>e(t.node,t.featureIds))),attributeStorageInfo:this.i3slayer.attributeStorageInfo??[],i3sOverrides:this._i3sOverrides,getAttributeData:e=>this.getAttributeData(e),setAttributeData:(t,r,i)=>{this._setAttributeData(t,r);const s=this.loadedGraphics.getNode(t);if(null!=i){const t=this.loadedGraphics.get(i.attributes[e]);null!=t&&this.processor.graphicsCore.recreateGraphics([t])}else null!=s&&this.processor.graphicsCore.recreateGraphics(s.graphics)},clearMemCache:()=>{}}}get performanceInfo(){return new B(this.usedMemory,this.loadedGraphics.length,-1,this.maximumNumberOfFeatures,this.loadedGraphics.nodeCount,this.processor.graphicsCore.performanceInfo)}get test(){}};e([l()],se.prototype,"processor",void 0),e([l({type:N})],se.prototype,"filter",void 0),e([l()],se.prototype,"loadedGraphics",void 0),e([l()],se.prototype,"i3slayer",null),e([l()],se.prototype,"_controller",void 0),e([l()],se.prototype,"updating",void 0),e([l()],se.prototype,"suspended",void 0),e([l()],se.prototype,"holeFilling",void 0),e([l(Y)],se.prototype,"updatingProgress",void 0),e([l()],se.prototype,"updatingProgressValue",null),e([l(re.requiredFields)],se.prototype,"requiredFields",null),e([l(re.availableFields)],se.prototype,"availableFields",void 0),e([l()],se.prototype,"_fieldsHelper",void 0),e([l({type:Number})],se.prototype,"maximumNumberOfFeatures",null),e([l({readOnly:!0})],se.prototype,"maximumNumberOfFeaturesExceeded",null),e([l()],se.prototype,"_excludeObjectIdsSorted",null),e([l({readOnly:!0})],se.prototype,"lodFactor",null),e([l({readOnly:!0})],se.prototype,"hasM",null),e([l({readOnly:!0})],se.prototype,"hasZ",null),e([l()],se.prototype,"contentVisible",null),e([l({readOnly:!0})],se.prototype,"legendEnabled",null),se=e([d("esri.views.3d.layers.SceneLayerGraphicsView3D")],se);const oe=se;function ae(e){return"pointData"in e}function ne(e){return"geometryBuffer"in e&&null!==e.geometryBuffer}function le(e,t,r){const i=t.attributeInfo;if(null==i?.loadedAttributes||null==i.attributeData)return!1;let s=!1;for(const{name:o}of i.loadedAttributes)if(i.attributeData[o]){const t=q(i.attributeData[o],r);t!==e.attributes[o]&&(e.attributes[o]=t,s=!0)}return s}function de(e){const t=e.attributeInfo,r=e.node.index;if(null!=t?.loadedAttributes&&null!=t.attributeData)for(let i=0;i<e.graphics.length;i++){const s=e.graphics[i];if(s.nodeIndex===r){s.attributes||(s.attributes={});for(const{name:e}of t.loadedAttributes)t.attributeData[e]&&(s.attributes[e]=q(t.attributeData[e],i))}}}function ue(e,t){return e.xmin-=t,e.ymin-=t,e.xmax+=t,e.ymax+=t,null!=e.zmin&&null!=e.zmax&&(e.zmin-=t,e.zmax+=t),null!=e.mmin&&null!=e.mmax&&(e.mmin-=t,e.mmax+=t),e}const he={2:{type:"Embedded",params:{type:"points",vertexAttributes:{position:[0,0]}}},3:{type:"Embedded",params:{type:"points",vertexAttributes:{position:[0,0,0]}}}},pe=p(),ce={graphic:null,property:null,oldValue:null,newValue:null};export{oe 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.31/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../chunks/tslib.es6.js";import r from"../../../core/Error.js";import{watch as t}from"../../../core/reactiveUtils.js";import{property as i}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{StreamController as s}from"../../../layers/graphics/controllers/StreamController.js";import n from"../../../rest/support/Query.js";import{FeatureLikeLayerView3D as a}from"./FeatureLikeLayerView3D.js";import{LayerView3D as p}from"./LayerView3D.js";import{StreamGraphics3DGraphicsPipeline as c}from"./graphics/StreamGraphics3DGraphicsPipeline.js";import{UpdatePolicy as l}from"../webgl-engine/lib/UpdatePolicy.js";import h from"../../layers/LayerView.js";import m from"../../layers/StreamLayerView.js";let u=class extends(m(a(p(h)))){constructor(){super(...arguments),this.type="stream-3d",this.updatePolicy=l.ASYNC,this.hasZ=!0,this.hasM=!1}initialize(){this.addHandles(t((()=>this.suspended),(e=>{this.graphicsPipeline&&this._onSuspendedChange(e)})))}get connectionError(){const e=this.graphicsPipeline?.connection?.errorString;return e?new r("stream-controller",e):null}createQuery(){return new n({outFields:["*"],returnGeometry:!0,outSpatialReference:this.view.spatialReference})}queryLatestObservations(e,r){return this.queryEngine.executeQueryForLatestObservations(this._ensureQuery(e),r?.signal)}get _streamConnectionStatus(){return this.graphicsPipeline?.connection?.connectionStatus??"disconnected"}createGraphicsPipeline(){return new c({layerView:this})}createController(){return new s({layer:this.layer,layerView:this})}beforeSetController(){}_doPause(){this.graphicsPipeline?.pause()}_doResume(){this.graphicsPipeline?.resume()}_doDisconnect(){this.graphicsPipeline?.disconnect(),this._doPause()}_doConnect(){this.graphicsPipeline?.connect(),this.resume()}_doClear(){this.graphicsPipeline?.clear()}};e([i({readOnly:!0})],u.prototype,"updatePolicy",void 0),e([i({readOnly:!0})],u.prototype,"connectionError",null),e([i()],u.prototype,"graphicsPipeline",void 0),e([i({readOnly:!0})],u.prototype,"hasZ",void 0),e([i({readOnly:!0})],u.prototype,"hasM",void 0),e([i({readOnly:!0})],u.prototype,"_streamConnectionStatus",null),u=e([o("esri.views.3d.layers.StreamLayerView3D")],u);const d=u;export{d as default};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import r from"../../../core/Error.js";import{watch as t}from"../../../core/reactiveUtils.js";import{property as i}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{StreamController as o}from"../../../layers/graphics/controllers/StreamController.js";import n from"../../../rest/support/Query.js";import{FeatureLikeLayerView3D as a}from"./FeatureLikeLayerView3D.js";import{LayerView3D as p}from"./LayerView3D.js";import{StreamGraphics3DGraphicsPipeline as c}from"./graphics/StreamGraphics3DGraphicsPipeline.js";import{UpdatePolicy as l}from"../webgl-engine/lib/UpdatePolicy.js";import h from"../../layers/LayerView.js";import m from"../../layers/StreamLayerView.js";let u=class extends(m(a(p(h)))){constructor(){super(...arguments),this.type="stream-3d",this.updatePolicy=l.ASYNC,this.hasZ=!0,this.hasM=!1}initialize(){this.addHandles(t((()=>this.suspended),(e=>{this.graphicsPipeline&&this._onSuspendedChange(e)})))}get connectionError(){const e=this.graphicsPipeline?.connection?.errorString;return e?new r("stream-controller",e):null}createQuery(){return new n({outFields:["*"],returnGeometry:!0,outSpatialReference:this.view.spatialReference})}queryLatestObservations(e,r){return this.queryEngine.executeQueryForLatestObservations(this._ensureQuery(e),r?.signal)}get _streamConnectionStatus(){return this.graphicsPipeline?.connection?.connectionStatus??"disconnected"}async createGraphicsPipeline(){return new c({layerView:this})}createController(){return new o({layer:this.layer,layerView:this})}beforeSetController(){}_doPause(){this.graphicsPipeline?.pause()}_doResume(){this.graphicsPipeline?.resume()}_doDisconnect(){this.graphicsPipeline?.disconnect(),this._doPause()}_doConnect(){this.graphicsPipeline?.connect(),this.resume()}_doClear(){this.graphicsPipeline?.clear()}};e([i({readOnly:!0})],u.prototype,"updatePolicy",void 0),e([i({readOnly:!0})],u.prototype,"connectionError",null),e([i()],u.prototype,"graphicsPipeline",void 0),e([i({readOnly:!0})],u.prototype,"hasZ",void 0),e([i({readOnly:!0})],u.prototype,"hasM",void 0),e([i({readOnly:!0})],u.prototype,"_streamConnectionStatus",null),u=e([s("esri.views.3d.layers.StreamLayerView3D")],u);const y=u;export{y 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.31/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../chunks/tslib.es6.js";import t from"../../../../Graphic.js";import{XXH as i}from"../../../../arcade/functions/hash.js";import r from"../../../../core/Accessor.js";import{neverReached as s}from"../../../../core/compilerUtils.js";import{makeHandle as n}from"../../../../core/handleUtils.js";import{destroyMaybe as a}from"../../../../core/maybe.js";import{logOnError as o}from"../../../../core/promiseUtils.js";import{watch as l,initial as p,when as d}from"../../../../core/reactiveUtils.js";import{property as u}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as h}from"../../../../core/accessorSupport/decorators/subclass.js";import{diff as c}from"../../../../core/accessorSupport/diffUtils.js";import{UpdatingHandles as g}from"../../../../core/support/UpdatingHandles.js";import{canProject as y,project as m}from"../../../../geometry/support/webMercatorUtils.js";import{matchRandomRotationExpression as f}from"../../../../renderers/support/randomRotationExpression.js";import{getRenderingInfo as b,getRenderingInfoAsync as C}from"../../../../renderers/support/renderingInfoUtils.js";import E from"../../../../rest/support/Query.js";import{DrapeSourceType as x}from"../interfaces.js";import{suspendResumeExtentOptimism as w}from"./constants.js";import{DisplayFeatureLimit as v}from"./DisplayFeatureLimit.js";import{Graphics3DCore as V}from"./Graphics3DCore.js";import{Graphics3DElevationAlignment as R}from"./Graphics3DElevationAlignment.js";import{Graphics3DFrustumVisibility as j}from"./Graphics3DFrustumVisibility.js";import{Graphics3DObjectStates as O}from"./Graphics3DObjectStates.js";import{Graphics3DScaleVisibility as _}from"./Graphics3DScaleVisibility.js";import{enlargeExtent as S}from"./graphicUtils.js";import{attributeLookup as G}from"../support/attributeUtils.js";import{FeatureVisibilityFilter as I}from"../support/FeatureVisibilityFilter.js";import{Object3DState as A}from"../../webgl-engine/lib/basicInterfaces.js";import{UpdatePolicy as U}from"../../webgl-engine/lib/UpdatePolicy.js";let P=class extends r{constructor(e){super(e),this.type="graphics-3d",this._randomRotationRenderers=null,this._updatingHandles=new g,this.elevationFeatureExpressionEnabled=!1,this.scaleVisibilityEnabled=!1,this.filterVisibilityEnabled=!1,this.frustumVisibilityEnabled=!1,this.elevationAlignmentEnabled=!1,this.timeExtentEnabled=!1,this.setUidToIdOnAdd=!0,this.dataExtent=null,this.drapeSourceType=x.Features,this.preferredUpdatePolicy=U.ASYNC,this._suspendResumeExtent=null}initialize(){const e=this.owner,t=(this.filterVisibilityEnabled||this.timeExtentEnabled)&&"multipatch"!==e.layer.geometryType,i=new V({owner:this,layer:this.layer,preferredUpdatePolicy:this.preferredUpdatePolicy,elevationFeatureExpressionEnabled:this.elevationFeatureExpressionEnabled,graphicSymbolSupported:!1,hasZ:e.hasZ,hasM:e.hasM,setUidToIdOnAdd:this.setUidToIdOnAdd,componentFactories:{deconflictor:t=>e.view.deconflictor.addGraphicsOwner(t),labeler:(t,i)=>e.view.labeler.addGraphicsOwner(t,i),elevationAlignment:this.elevationAlignmentEnabled?(t,i)=>new R({graphicsCoreOwner:this,graphicsCore:t,queryGraphicUIDsInExtent:i,elevationProvider:e.view.elevationProvider}):null,scaleVisibility:this.scaleVisibilityEnabled?(t,i)=>new _({graphicsCoreOwner:this,layer:this.layer,queryGraphicUIDsInExtent:i,graphicsCore:t,basemapTerrain:e.view.basemapTerrain}):null,filterVisibility:t?t=>new I({context:{...t,configuration:e}}):null,objectStates:e=>new O(e)}});this._set("graphicsCore",i),this.frustumVisibilityEnabled&&this._set("frustumVisibility",new j({graphicsCoreOwner:this})),this.elevationAlignment&&this._updatingHandles.add((()=>this.layer.elevationInfo),((e,t)=>{c(e,t)&&this._updatingHandles.addPromise(this.graphicsCore.elevationInfoChange())})),this._updatingHandles.add((()=>this.layer.labelsVisible),(()=>this.graphicsCore.updateVisibilityInfo())),this._updatingHandles.add((()=>this.layer.labelingInfo),((e,t)=>{c(e,t)&&this.graphicsCore.updateLabelingInfo()})),this._updatingHandles.add((()=>this.preferredUpdatePolicy),(e=>this.graphicsCore.preferredUpdatePolicy=e)),this._set("initializePromise",this._initializeAsync()),this._updatingHandles.addPromise(this.initializePromise)}async _initializeAsync(){await o(this.graphicsCore.initializePromise);const e=this.owner;this._updatingHandles.add((()=>this.renderer),(e=>this._updatingHandles.addPromise(this.graphicsCore.rendererChange(e)))),this._updatingHandles.add((()=>e.fullOpacity),(()=>this.graphicsCore.opacityChange())),this._setupSuspendResumeExtent(),this.updateClippingExtent&&(this._updatingHandles.add((()=>e.view.clippingArea),(()=>this._updateClippingExtent())),this._updateClippingExtent()),this.graphicsCore.startCreateGraphics(),this.graphicsCore.labelsEnabled&&await o(this.graphicsCore.updateLabelingInfo())}destroy(){this._updatingHandles.destroy(),this._set("frustumVisibility",a(this.frustumVisibility)),this._set("graphicsCore",a(this.graphicsCore)),this._set("owner",null)}get layer(){return this.owner.layer}get dataUpdating(){return this.graphicsCore?.dataUpdating??!1}get renderer(){const{renderer:e,objectIdField:t}=this.layer;if(!e||!t||"heatmap"===e.type||!e.visualVariables)return e;const i=e.visualVariables.findIndex((e=>"rotation"===e.type&&null!=e.valueExpression&&f(e.valueExpression)===t&&(null==e.axis||"heading"===e.axis)&&"geographic"===e.rotationType));if(i<0)return e;const r=e.clone();return r.visualVariables?(r.visualVariables.splice(i,1),this._randomRotationRenderers||(this._randomRotationRenderers=new WeakMap),this._randomRotationRenderers.set(r,t),r):e}get scaleVisibility(){return this.graphicsCore?.scaleVisibility}get filterVisibility(){return this.graphicsCore?.filterVisibility}get elevationAlignment(){return this.graphicsCore?.elevationAlignment}get suspendResumeExtentMode(){return this.owner.suspendResumeExtentMode??"computed"}get scaleVisibilitySuspended(){return null!=this.scaleVisibility&&this.scaleVisibility.suspended}get suspended(){return this.owner.suspended}get legendEnabled(){return null==this.frustumVisibility||!this.frustumVisibility.suspended}get suspendInfo(){const e={};return this.scaleVisibilitySuspended&&(e.outsideScaleRange=!0),null!=this.frustumVisibility&&this.frustumVisibility.suspended&&(e.outsideOfView=!0),e}get updating(){return!!(this.graphicsCore?.updating||this.frustumVisibility?.updating||this._updatingHandles.updating)}get updatingRemaining(){return this.graphicsCore?.updatingRemaining??0}get featureStore(){return this.graphicsCore?.featureStore}get view(){return this.owner.view}get loadedGraphics(){return this.owner.loadedGraphics}get fullOpacity(){return this.owner?.fullOpacity}get filter(){return"filter"in this.owner?this.owner.filter:null}get slicePlaneEnabled(){return this.owner.slicePlaneEnabled}get updatePolicy(){return this.owner.updatePolicy}get featureSpatialReference(){return"featureSpatialReference"in this.owner?this.owner.featureSpatialReference:this.owner.view.spatialReference}get graphics3DGraphics(){return this.graphicsCore?.graphics3DGraphics}get graphics3DGraphicsByObjectID(){return this.graphicsCore?.graphics3DGraphicsByObjectID}get symbolUpdateType(){return this.graphicsCore?.symbolUpdateType}get displayFeatureLimit(){const e=this.view.quality,t=this.graphicsCore?.displayFeatureLimit;if(1===e)return t;const i=Math.ceil(t.maximumNumberOfFeatures*e);return new v(t.maximumTotalNumberOfVertices,i,t.averageSymbolComplexity)}get usedMemory(){return this.graphicsCore?.usedMemory??0}get loadedFeatures(){return this.graphicsCore?.numberOfGraphics??0}get usedMemoryPerFeature(){return this.graphicsCore?.usedMemoryPerGraphic??0}get unprocessedMemoryEstimate(){return this.graphicsCore?.unprocessedMemoryEstimate??0}get performanceInfo(){return this.graphicsCore.performanceInfo}maskOccludee(e){const t=this.graphicsCore?.objectStates;if(!t)return n();const{set:i,handle:r}=t.acquireSet(A.MaskOccludee,null);return t.setUid(i,e.uid),r}highlight(e,i){const r=this.graphicsCore?.objectStates;if(!r)return n();if(e instanceof E){const{set:t,handle:s}=r.acquireSet(A.Highlight,i);return this.owner.queryObjectIds(e).then((e=>r.setObjectIds(t,e))),s}if("number"==typeof e||"string"==typeof e)return this.highlight([e],i);if(e instanceof t)return this.highlight([e],i);if("toArray"in e&&(e=e.toArray()),Array.isArray(e)&&e.length>0){if(e[0]instanceof t){const t=e;if(null==G(this.layer.fieldsIndex,t[0].attributes,i)){const e=t.map((e=>e.uid)),{set:i,handle:s}=r.acquireSet(A.Highlight,null);return r.setUids(i,e),s}e=t.map((e=>G(this.layer.fieldsIndex,e.attributes,i)))}if(Array.isArray(e)&&("number"==typeof e[0]||"string"==typeof e[0])){const t=e,{set:s,handle:n}=r.acquireSet(A.Highlight,i);return r.setObjectIds(s,t),n}}return n()}resetObjectStates(){this.graphicsCore?.objectStates?.reset()}whenGraphicBounds(e,t){return this.graphicsCore?.whenGraphicBounds(e,t)}computeAttachmentOrigin(e,t){return this.graphicsCore?.computeAttachmentOrigin(e,t)}notifyGraphicGeometryChanged(e){this.graphicsCore.notifyGraphicGeometryChanged(e)}notifyGraphicVisibilityChanged(e){this.graphicsCore.notifyGraphicVisibilityChanged(e)}getRenderingInfo(e,t,r){const s=b(e,{renderer:t,arcade:r});if(s?.color){const e=s.color;e[0]=e[0]/255,e[1]=e[1]/255,e[2]=e[2]/255}if(null!=s&&null!=t&&this._randomRotationRenderers?.has(t)){const r=this._randomRotationRenderers.get(t),n=e.attributes[r],a=new i(0);a.updateFloatArray([n]),a.updateUint8Array([173]),s.heading=8.381e-8*a.digest()}return s}getRenderingInfoAsync(e,t,i,r){return C(e,{renderer:t,arcade:i,...r})}getSymbolLayerSize(e,t){return this.graphicsCore?.getSymbolLayerSize(e,t)}setObjectIdVisibility(e,t){this.graphicsCore?.setObjectIdVisibility(e,t)}refreshFilter(){null!=this.filterVisibility&&this.filterVisibility.reapply()}getGraphics3DGraphicByObjectId(e){return this.graphicsCore?.getGraphics3DGraphicByObjectId(e)}_updateClippingExtent(){const e=this.owner.view.clippingArea;this.graphicsCore.setClippingExtent(e,this.owner.view.spatialReference)&&(this.updateClippingExtent(e)||this.graphicsCore.recreateAllGraphics())}_setupSuspendResumeExtent(){(this.frustumVisibility||this.scaleVisibility)&&this.addHandles(l((()=>this.suspendResumeExtentMode),(()=>{switch(this.removeHandles(H),this.suspendResumeExtentMode){case"computed":this.addHandles([l((()=>this.graphicsCore.computedExtent),(e=>this._updateSuspendResumeExtent(e)),p),l((()=>this.graphicsCore.extentPadding),(()=>this._updateSuspendResumeExtent(this.graphicsCore.computedExtent)))],H);break;case"data":this.addHandles([d((()=>this.dataExtent),(e=>this._updateSuspendResumeExtent(e)),p),l((()=>this.graphicsCore.extentPadding),(()=>this._updateSuspendResumeExtent(this.dataExtent)))],H);break;default:s(this.suspendResumeExtentMode)}}),p))}_updateSuspendResumeExtent(e){e?this._suspendResumeExtentChanged(this._extentToSuspendResumeRect(e,this._suspendResumeExtent)):this._suspendResumeExtentChanged(null)}_extentToSuspendResumeRect(e,t){const i=this.owner.view.spatialReference;if(!e.spatialReference.equals(i)){if(!y(e,i))return;e=m(e,i)}return S(e,t,w,this.graphicsCore.extentPadding)}_suspendResumeExtentChanged(e){null!=this.frustumVisibility&&this.frustumVisibility.setExtent(e),null!=this.scaleVisibility&&this.scaleVisibility.setExtent(e)}};e([u()],P.prototype,"type",void 0),e([u({constructOnly:!0})],P.prototype,"owner",void 0),e([u()],P.prototype,"layer",null),e([u({readOnly:!0})],P.prototype,"dataUpdating",null),e([u()],P.prototype,"renderer",null),e([u({constructOnly:!0})],P.prototype,"updateClippingExtent",void 0),e([u({constructOnly:!0})],P.prototype,"elevationFeatureExpressionEnabled",void 0),e([u({constructOnly:!0})],P.prototype,"graphicsCore",void 0),e([u({constructOnly:!0})],P.prototype,"scaleVisibilityEnabled",void 0),e([u({constructOnly:!0})],P.prototype,"filterVisibilityEnabled",void 0),e([u({constructOnly:!0})],P.prototype,"frustumVisibilityEnabled",void 0),e([u({constructOnly:!0})],P.prototype,"elevationAlignmentEnabled",void 0),e([u({constructOnly:!0})],P.prototype,"timeExtentEnabled",void 0),e([u({constructOnly:!0})],P.prototype,"setUidToIdOnAdd",void 0),e([u()],P.prototype,"scaleVisibility",null),e([u()],P.prototype,"filterVisibility",null),e([u()],P.prototype,"elevationAlignment",null),e([u({constructOnly:!0})],P.prototype,"frustumVisibility",void 0),e([u()],P.prototype,"initializePromise",void 0),e([u()],P.prototype,"suspendResumeExtentMode",null),e([u()],P.prototype,"dataExtent",void 0),e([u()],P.prototype,"scaleVisibilitySuspended",null),e([u()],P.prototype,"suspended",null),e([u()],P.prototype,"legendEnabled",null),e([u()],P.prototype,"suspendInfo",null),e([u()],P.prototype,"updating",null),e([u()],P.prototype,"updatingRemaining",null),e([u()],P.prototype,"featureStore",null),e([u()],P.prototype,"view",null),e([u()],P.prototype,"loadedGraphics",null),e([u()],P.prototype,"fullOpacity",null),e([u()],P.prototype,"filter",null),e([u()],P.prototype,"slicePlaneEnabled",null),e([u()],P.prototype,"drapeSourceType",void 0),e([u()],P.prototype,"updatePolicy",null),e([u()],P.prototype,"preferredUpdatePolicy",void 0),e([u({readOnly:!0})],P.prototype,"displayFeatureLimit",null),P=e([h("esri.views.3d.layers.graphics.Graphics3DFeatureProcessor")],P);const H="suspendResumeExtentMode";export{P as Graphics3DFeatureProcessor};
5
+ import{_ as e}from"../../../../chunks/tslib.es6.js";import t from"../../../../Graphic.js";import{XXH as i}from"../../../../arcade/functions/hash.js";import{neverReached as r}from"../../../../core/compilerUtils.js";import{makeHandle as s}from"../../../../core/handleUtils.js";import{destroyMaybe as n}from"../../../../core/maybe.js";import{EsriPromise as a}from"../../../../core/Promise.js";import{logOnError as o}from"../../../../core/promiseUtils.js";import{watch as l,initial as p,when as d}from"../../../../core/reactiveUtils.js";import{property as u}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as h}from"../../../../core/accessorSupport/decorators/subclass.js";import{diff as c}from"../../../../core/accessorSupport/diffUtils.js";import{UpdatingHandles as g}from"../../../../core/support/UpdatingHandles.js";import{canProject as y,project as m}from"../../../../geometry/support/webMercatorUtils.js";import{matchRandomRotationExpression as f}from"../../../../renderers/support/randomRotationExpression.js";import{getRenderingInfo as b,getRenderingInfoAsync as C}from"../../../../renderers/support/renderingInfoUtils.js";import E from"../../../../rest/support/Query.js";import{DrapeSourceType as x}from"../interfaces.js";import{suspendResumeExtentOptimism as w}from"./constants.js";import{DisplayFeatureLimit as v}from"./DisplayFeatureLimit.js";import{Graphics3DCore as V}from"./Graphics3DCore.js";import{Graphics3DElevationAlignment as R}from"./Graphics3DElevationAlignment.js";import{Graphics3DFrustumVisibility as j}from"./Graphics3DFrustumVisibility.js";import{Graphics3DObjectStates as O}from"./Graphics3DObjectStates.js";import{Graphics3DScaleVisibility as S}from"./Graphics3DScaleVisibility.js";import{enlargeExtent as _}from"./graphicUtils.js";import{attributeLookup as G}from"../support/attributeUtils.js";import{FeatureVisibilityFilter as I}from"../support/FeatureVisibilityFilter.js";import{Object3DState as U}from"../../webgl-engine/lib/basicInterfaces.js";import{UpdatePolicy as A}from"../../webgl-engine/lib/UpdatePolicy.js";let P=class extends a{constructor(e){super(e),this.type="graphics-3d",this._randomRotationRenderers=null,this._updatingHandles=new g,this.elevationFeatureExpressionEnabled=!1,this.scaleVisibilityEnabled=!1,this.filterVisibilityEnabled=!1,this.frustumVisibilityEnabled=!1,this.elevationAlignmentEnabled=!1,this.timeExtentEnabled=!1,this.setUidToIdOnAdd=!0,this.dataExtent=null,this.drapeSourceType=x.Features,this.preferredUpdatePolicy=A.ASYNC,this._suspendResumeExtent=null}initialize(){const e=this.owner,t=(this.filterVisibilityEnabled||this.timeExtentEnabled)&&"multipatch"!==e.layer.geometryType,i=new V({owner:this,layer:this.layer,preferredUpdatePolicy:this.preferredUpdatePolicy,elevationFeatureExpressionEnabled:this.elevationFeatureExpressionEnabled,graphicSymbolSupported:!1,hasZ:e.hasZ,hasM:e.hasM,setUidToIdOnAdd:this.setUidToIdOnAdd,componentFactories:{deconflictor:t=>e.view.deconflictor.addGraphicsOwner(t),labeler:(t,i)=>e.view.labeler.addGraphicsOwner(t,i),elevationAlignment:this.elevationAlignmentEnabled?(t,i)=>new R({graphicsCoreOwner:this,graphicsCore:t,queryGraphicUIDsInExtent:i,elevationProvider:e.view.elevationProvider}):null,scaleVisibility:this.scaleVisibilityEnabled?(t,i)=>new S({graphicsCoreOwner:this,layer:this.layer,queryGraphicUIDsInExtent:i,graphicsCore:t,basemapTerrain:e.view.basemapTerrain}):null,filterVisibility:t?t=>new I({context:{...t,configuration:e}}):null,objectStates:e=>new O(e)}});this._set("graphicsCore",i),this.frustumVisibilityEnabled&&this._set("frustumVisibility",new j({graphicsCoreOwner:this})),this.elevationAlignment&&this._updatingHandles.add((()=>this.layer.elevationInfo),((e,t)=>{c(e,t)&&this._updatingHandles.addPromise(this.graphicsCore.elevationInfoChange())})),this._updatingHandles.add((()=>this.layer.labelsVisible),(()=>this.graphicsCore.updateVisibilityInfo())),this._updatingHandles.add((()=>this.layer.labelingInfo),((e,t)=>{c(e,t)&&this.graphicsCore.updateLabelingInfo()})),this._updatingHandles.add((()=>this.preferredUpdatePolicy),(e=>this.graphicsCore.preferredUpdatePolicy=e)),this.addResolvingPromise(this._initializeAsync())}async _initializeAsync(){await o(this.graphicsCore.initializePromise);const e=this.owner;this._updatingHandles.add((()=>this.renderer),(e=>this._updatingHandles.addPromise(this.graphicsCore.rendererChange(e)))),this._updatingHandles.add((()=>e.fullOpacity),(()=>this.graphicsCore.opacityChange())),this._setupSuspendResumeExtent(),this.updateClippingExtent&&(this._updatingHandles.add((()=>e.view.clippingArea),(()=>this._updateClippingExtent())),this._updateClippingExtent()),this.graphicsCore.startCreateGraphics(),this.graphicsCore.labelsEnabled&&await o(this.graphicsCore.updateLabelingInfo())}destroy(){this._updatingHandles.destroy(),this._set("frustumVisibility",n(this.frustumVisibility)),this._set("graphicsCore",n(this.graphicsCore)),this._set("owner",null)}get layer(){return this.owner.layer}get dataUpdating(){return this.graphicsCore?.dataUpdating??!1}get renderer(){const{renderer:e,objectIdField:t}=this.layer;if(!e||!t||"heatmap"===e.type||!e.visualVariables)return e;const i=e.visualVariables.findIndex((e=>"rotation"===e.type&&null!=e.valueExpression&&f(e.valueExpression)===t&&(null==e.axis||"heading"===e.axis)&&"geographic"===e.rotationType));if(i<0)return e;const r=e.clone();return r.visualVariables?(r.visualVariables.splice(i,1),this._randomRotationRenderers||(this._randomRotationRenderers=new WeakMap),this._randomRotationRenderers.set(r,t),r):e}get scaleVisibility(){return this.graphicsCore?.scaleVisibility}get filterVisibility(){return this.graphicsCore?.filterVisibility}get elevationAlignment(){return this.graphicsCore?.elevationAlignment}get suspendResumeExtentMode(){return this.owner.suspendResumeExtentMode??"computed"}get scaleVisibilitySuspended(){return null!=this.scaleVisibility&&this.scaleVisibility.suspended}get suspended(){return this.owner.suspended}get legendEnabled(){return null==this.frustumVisibility||!this.frustumVisibility.suspended}get suspendInfo(){const e={};return this.scaleVisibilitySuspended&&(e.outsideScaleRange=!0),null!=this.frustumVisibility&&this.frustumVisibility.suspended&&(e.outsideOfView=!0),e}get updating(){return!!(this.graphicsCore?.updating||this.frustumVisibility?.updating||this._updatingHandles.updating)}get updatingRemaining(){return this.graphicsCore?.updatingRemaining??0}get featureStore(){return this.graphicsCore?.featureStore}get view(){return this.owner.view}get loadedGraphics(){return this.owner.loadedGraphics}get fullOpacity(){return this.owner?.fullOpacity}get filter(){return"filter"in this.owner?this.owner.filter:null}get slicePlaneEnabled(){return this.owner.slicePlaneEnabled}get updatePolicy(){return this.owner.updatePolicy}get featureSpatialReference(){return"featureSpatialReference"in this.owner?this.owner.featureSpatialReference:this.owner.view.spatialReference}get graphics3DGraphics(){return this.graphicsCore?.graphics3DGraphics}get graphics3DGraphicsByObjectID(){return this.graphicsCore?.graphics3DGraphicsByObjectID}get symbolUpdateType(){return this.graphicsCore?.symbolUpdateType}get displayFeatureLimit(){const e=this.view.quality,t=this.graphicsCore?.displayFeatureLimit;if(1===e)return t;const i=Math.ceil(t.maximumNumberOfFeatures*e);return new v(t.maximumTotalNumberOfVertices,i,t.averageSymbolComplexity)}get usedMemory(){return this.graphicsCore?.usedMemory??0}get loadedFeatures(){return this.graphicsCore?.numberOfGraphics??0}get usedMemoryPerFeature(){return this.graphicsCore?.usedMemoryPerGraphic??0}get unprocessedMemoryEstimate(){return this.graphicsCore?.unprocessedMemoryEstimate??0}get performanceInfo(){return this.graphicsCore.performanceInfo}maskOccludee(e){const t=this.graphicsCore?.objectStates;if(!t)return s();const{set:i,handle:r}=t.acquireSet(U.MaskOccludee,null);return t.setUid(i,e.uid),r}highlight(e,i){const r=this.graphicsCore?.objectStates;if(!r)return s();if(e instanceof E){const{set:t,handle:s}=r.acquireSet(U.Highlight,i);return this.owner.queryObjectIds(e).then((e=>r.setObjectIds(t,e))),s}if("number"==typeof e||"string"==typeof e)return this.highlight([e],i);if(e instanceof t)return this.highlight([e],i);if("toArray"in e&&(e=e.toArray()),Array.isArray(e)&&e.length>0){if(e[0]instanceof t){const t=e;if(null==G(this.layer.fieldsIndex,t[0].attributes,i)){const e=t.map((e=>e.uid)),{set:i,handle:s}=r.acquireSet(U.Highlight,null);return r.setUids(i,e),s}e=t.map((e=>G(this.layer.fieldsIndex,e.attributes,i)))}if(Array.isArray(e)&&("number"==typeof e[0]||"string"==typeof e[0])){const t=e,{set:s,handle:n}=r.acquireSet(U.Highlight,i);return r.setObjectIds(s,t),n}}return s()}resetObjectStates(){this.graphicsCore?.objectStates?.reset()}whenGraphicBounds(e,t){return this.graphicsCore?.whenGraphicBounds(e,t)}computeAttachmentOrigin(e,t){return this.graphicsCore?.computeAttachmentOrigin(e,t)}notifyGraphicGeometryChanged(e){this.graphicsCore.notifyGraphicGeometryChanged(e)}notifyGraphicVisibilityChanged(e){this.graphicsCore.notifyGraphicVisibilityChanged(e)}getRenderingInfo(e,t,r){const s=b(e,{renderer:t,arcade:r});if(s?.color){const e=s.color;e[0]=e[0]/255,e[1]=e[1]/255,e[2]=e[2]/255}if(null!=s&&null!=t&&this._randomRotationRenderers?.has(t)){const r=this._randomRotationRenderers.get(t),n=e.attributes[r],a=new i(0);a.updateFloatArray([n]),a.updateUint8Array([173]),s.heading=8.381e-8*a.digest()}return s}getRenderingInfoAsync(e,t,i,r){return C(e,{renderer:t,arcade:i,...r})}getSymbolLayerSize(e,t){return this.graphicsCore?.getSymbolLayerSize(e,t)}setObjectIdVisibility(e,t){this.graphicsCore?.setObjectIdVisibility(e,t)}refreshFilter(){null!=this.filterVisibility&&this.filterVisibility.reapply()}getGraphics3DGraphicByObjectId(e){return this.graphicsCore?.getGraphics3DGraphicByObjectId(e)}_updateClippingExtent(){const e=this.owner.view.clippingArea;this.graphicsCore.setClippingExtent(e,this.owner.view.spatialReference)&&(this.updateClippingExtent(e)||this.graphicsCore.recreateAllGraphics())}_setupSuspendResumeExtent(){(this.frustumVisibility||this.scaleVisibility)&&this.addHandles(l((()=>this.suspendResumeExtentMode),(()=>{switch(this.removeHandles(F),this.suspendResumeExtentMode){case"computed":this.addHandles([l((()=>this.graphicsCore.computedExtent),(e=>this._updateSuspendResumeExtent(e)),p),l((()=>this.graphicsCore.extentPadding),(()=>this._updateSuspendResumeExtent(this.graphicsCore.computedExtent)))],F);break;case"data":this.addHandles([d((()=>this.dataExtent),(e=>this._updateSuspendResumeExtent(e)),p),l((()=>this.graphicsCore.extentPadding),(()=>this._updateSuspendResumeExtent(this.dataExtent)))],F);break;default:r(this.suspendResumeExtentMode)}}),p))}_updateSuspendResumeExtent(e){e?this._suspendResumeExtentChanged(this._extentToSuspendResumeRect(e,this._suspendResumeExtent)):this._suspendResumeExtentChanged(null)}_extentToSuspendResumeRect(e,t){const i=this.owner.view.spatialReference;if(!e.spatialReference.equals(i)){if(!y(e,i))return;e=m(e,i)}return _(e,t,w,this.graphicsCore.extentPadding)}_suspendResumeExtentChanged(e){null!=this.frustumVisibility&&this.frustumVisibility.setExtent(e),null!=this.scaleVisibility&&this.scaleVisibility.setExtent(e)}};e([u()],P.prototype,"type",void 0),e([u({constructOnly:!0})],P.prototype,"owner",void 0),e([u()],P.prototype,"layer",null),e([u({readOnly:!0})],P.prototype,"dataUpdating",null),e([u()],P.prototype,"renderer",null),e([u({constructOnly:!0})],P.prototype,"updateClippingExtent",void 0),e([u({constructOnly:!0})],P.prototype,"elevationFeatureExpressionEnabled",void 0),e([u({constructOnly:!0})],P.prototype,"graphicsCore",void 0),e([u({constructOnly:!0})],P.prototype,"scaleVisibilityEnabled",void 0),e([u({constructOnly:!0})],P.prototype,"filterVisibilityEnabled",void 0),e([u({constructOnly:!0})],P.prototype,"frustumVisibilityEnabled",void 0),e([u({constructOnly:!0})],P.prototype,"elevationAlignmentEnabled",void 0),e([u({constructOnly:!0})],P.prototype,"timeExtentEnabled",void 0),e([u({constructOnly:!0})],P.prototype,"setUidToIdOnAdd",void 0),e([u()],P.prototype,"scaleVisibility",null),e([u()],P.prototype,"filterVisibility",null),e([u()],P.prototype,"elevationAlignment",null),e([u({constructOnly:!0})],P.prototype,"frustumVisibility",void 0),e([u()],P.prototype,"suspendResumeExtentMode",null),e([u()],P.prototype,"dataExtent",void 0),e([u()],P.prototype,"scaleVisibilitySuspended",null),e([u()],P.prototype,"suspended",null),e([u()],P.prototype,"legendEnabled",null),e([u()],P.prototype,"suspendInfo",null),e([u()],P.prototype,"updating",null),e([u()],P.prototype,"updatingRemaining",null),e([u()],P.prototype,"featureStore",null),e([u()],P.prototype,"view",null),e([u()],P.prototype,"loadedGraphics",null),e([u()],P.prototype,"fullOpacity",null),e([u()],P.prototype,"filter",null),e([u()],P.prototype,"slicePlaneEnabled",null),e([u()],P.prototype,"drapeSourceType",void 0),e([u()],P.prototype,"updatePolicy",null),e([u()],P.prototype,"preferredUpdatePolicy",void 0),e([u({readOnly:!0})],P.prototype,"displayFeatureLimit",null),P=e([h("esri.views.3d.layers.graphics.Graphics3DFeatureProcessor")],P);const F="suspendResumeExtentMode";export{P as Graphics3DFeatureProcessor};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../chunks/tslib.es6.js";import t from"../../../../core/Error.js";import{destroyMaybe as r}from"../../../../core/maybe.js";import{EsriPromise as i}from"../../../../core/Promise.js";import{initial as s,watch as o,sync as n,whenOnce as a}from"../../../../core/reactiveUtils.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 p}from"../../../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as h}from"../../../../core/support/UpdatingHandles.js";import{FeatureTileController3D as d}from"../../../../layers/graphics/controllers/FeatureTileController3D.js";import{symbolHasExtrudeSymbolLayer as c}from"../../../../symbols/support/utils.js";import{elevationAlignPointsInFeatures as u}from"./elevationAlignPointsInFeatures.js";import{Graphics3DFeatureProcessor as y}from"./Graphics3DFeatureProcessor.js";import{QueryEngine as g}from"./QueryEngine.js";import{queryForSymbologySnapping as m}from"./queryForSymbologySnapping.js";import{HeatmapFeatureProcessor as f}from"../support/HeatmapFeatureProcessor.js";import{LayerViewPerformanceInfo as E}from"../support/LayerViewPerformanceInfo.js";import{UpdatePolicy as w}from"../../webgl-engine/lib/UpdatePolicy.js";import{TaskPriority as b}from"../../../support/Scheduler.js";let C=class extends i{constructor(e){super(e),this._dataUpdatingState=S.NONE,this.controller=null,this.updatingHandles=new h,this._controllerCreated=!1,this._pendingController=null}initialize(){this.addResolvingPromise(this._initializeController()),this.updatingHandles.add((()=>this.layer.renderer),(e=>this._recreateProcessor(e)),s),this.updatingHandles.add((()=>this.updatePolicy),(e=>this.processor.preferredUpdatePolicy=e));const e=()=>this.processor.featureStore;this.queryEngine=new g({context:{spatialReference:this.view.spatialReference,layer:this.layer,scheduler:this.view.resourceController.scheduler,get featureStore(){return e()},hasZ:this.hasZ,hasM:this.hasM},priority:b.FEATURE_QUERY_ENGINE})}destroy(){this.removeAllHandles(),this.updatingHandles.destroy(),this._destroyPendingController(),this.controller=r(this.controller),this.processor=r(this.processor),this.queryEngine=r(this.queryEngine),this.loadedGraphics=null}_destroyPendingController(){this._pendingController=r(this._pendingController)}get updating(){return this.updatingHandles.updating||!this._controllerCreated||this.controller?.updating||this.processor?.updating}get legendEnabled(){return this.processor.legendEnabled}get layer(){return this.layerView.layer}get view(){return this.layerView.view}get hasZ(){return this.layerView.hasZ}get hasM(){return this.layerView.hasM}get fullOpacity(){return this.layerView.fullOpacity}get suspended(){return this.layerView.suspended}get filter(){return"filter"in this.layerView?this.layerView.filter:null}get slicePlaneEnabled(){return this.layerView.slicePlaneEnabled}get featureSpatialReference(){return"featureSpatialReference"in this.layerView?this.layerView.featureSpatialReference:null}get graphics3DProcessor(){return"graphics-3d"===this.processor?.type?this.processor:null}get heatmapProcessor(){return"heatmap"===this.processor?.type?this.processor:null}get hasAllFeatures(){return!(!this.controller||!("hasAllFeatures"in this.controller))&&this.controller.hasAllFeatures}get hasAllFeaturesInView(){return!(!this.controller||!("hasAllFeaturesInView"in this.controller))&&this.controller.hasAllFeaturesInView}get hasFullGeometries(){return!(!this.controller||!("hasFullGeometries"in this.controller))&&this.controller.hasFullGeometries}get symbologySnappingSupported(){const e=this.layer?.renderer?.getSymbols();return e?.some(c)??!1}get updatePolicy(){return w.SYNC}get scaleVisibilitySuspended(){return this.processor?.scaleVisibilitySuspended}get timeExtent(){return"timeExtent"in this.layerView?this.layerView.timeExtent:null}get dataUpdating(){return this._dataUpdatingState!==S.NONE}get suspendInfo(){return this.processor?.suspendInfo??{}}forEachGraphic(e){this.loadedGraphics.forEach(e)}findGraphic(e){return this.loadedGraphics.find(e)}queryObjectIds(e,t){return this.layerView.queryObjectIds(e,t)}whenGraphicBounds(e,t){return this.processor?.whenGraphicBounds(e,t)}computeAttachmentOrigin(e,t){return this.processor?.computeAttachmentOrigin(e,t)}async elevationAlignPointsInFeatures(e,r){const i=this.graphics3DProcessor;if(null==i)throw new t("featurelayerview3d:missing-processor","A Graphics3D processor is needed to resolve graphics elevation.");return u(this.view,this.layer,(e=>i.getGraphics3DGraphicByObjectId(e)),e,r)}async queryForSymbologySnapping(e,t){return this.symbologySnappingSupported?m(this.graphics3DProcessor,e,t):{candidates:[],sourceCandidateIndices:[]}}highlight(e){return this.processor.highlight(e,this.layer.objectIdField)}maskOccludee(e){return this.processor.maskOccludee(e)}async _initializeController(){const e=this.createController();this._pendingController=e,this._setupDataUpdating(e),await e.when(),this._setControllerWhenInitialized(e)}_setupDataUpdating(e){"dataUpdating"in e&&this.addHandles([o((()=>e.dataUpdating),(e=>{e&&this._dataUpdatingState===S.NONE?this._dataUpdatingState=S.CONTROLLER:e||this._dataUpdatingState!==S.CONTROLLER||(this._dataUpdatingState=S.NONE)}),n),o((()=>!!this.graphics3DProcessor?.dataUpdating),(t=>{t&&this._dataUpdatingState===S.CONTROLLER?this._dataUpdatingState=S.CORE:t||this._dataUpdatingState!==S.CORE||(this._dataUpdatingState=e.dataUpdating?S.CONTROLLER:S.NONE)}),n)])}async _setControllerWhenInitialized(e){try{await this.when()}catch(t){}this._controllerCreated=!0,this.isResolved()&&!this.destroyed?(await a((()=>this.view?.basemapTerrain?.ready)),this.beforeSetController(e),this._pendingController=null,this.controller=e,this.loadedGraphics=e.graphics):this._destroyPendingController()}_recreateProcessor(e){const t="heatmap"===e?.type,r="heatmap"===this.processor?.type,i=this.processor;if(i&&t===r)return;const s=t?new f({owner:this}):new y({owner:this,frustumVisibilityEnabled:!0,scaleVisibilityEnabled:!0,filterVisibilityEnabled:!0,timeExtentEnabled:!0,elevationAlignmentEnabled:!0,elevationFeatureExpressionEnabled:!0,preferredUpdatePolicy:this.updatePolicy,updateClippingExtent:e=>this._updateClippingExtent(e)});this.processor=s,i?.destroy(),this.queryEngine?.clear(),this.addResolvingPromise(s.initializePromise)}_updateClippingExtent(e){if(this.clippingExtent=e,!this.controller)return!1;switch(this.controller.type){case"stream":return!1;case"feature-tile-3d":return this.controller.extent=e,!0}}get performanceInfo(){const e=this.controller instanceof d?this.controller:null;return new E(this.processor.usedMemory,this.loadedGraphics?.length,e?.serviceDataCount??-1,e?.maximumNumberOfFeatures??-1,0,this.processor.performanceInfo)}};var S;e([l()],C.prototype,"updating",null),e([l()],C.prototype,"legendEnabled",null),e([l()],C.prototype,"layerView",void 0),e([l()],C.prototype,"layer",null),e([l()],C.prototype,"view",null),e([l()],C.prototype,"hasZ",null),e([l()],C.prototype,"hasM",null),e([l()],C.prototype,"fullOpacity",null),e([l()],C.prototype,"suspended",null),e([l()],C.prototype,"filter",null),e([l()],C.prototype,"slicePlaneEnabled",null),e([l()],C.prototype,"featureSpatialReference",null),e([l()],C.prototype,"loadedGraphics",void 0),e([l()],C.prototype,"graphics3DProcessor",null),e([l()],C.prototype,"heatmapProcessor",null),e([l()],C.prototype,"hasAllFeatures",null),e([l()],C.prototype,"hasAllFeaturesInView",null),e([l()],C.prototype,"hasFullGeometries",null),e([l()],C.prototype,"symbologySnappingSupported",null),e([l()],C.prototype,"updatePolicy",null),e([l()],C.prototype,"queryEngine",void 0),e([l()],C.prototype,"scaleVisibilitySuspended",null),e([l()],C.prototype,"timeExtent",null),e([l()],C.prototype,"_dataUpdatingState",void 0),e([l({readOnly:!0})],C.prototype,"dataUpdating",null),e([l()],C.prototype,"controller",void 0),e([l()],C.prototype,"processor",void 0),e([l()],C.prototype,"updatingHandles",void 0),e([l()],C.prototype,"_controllerCreated",void 0),C=e([p("esri.views.3d.layers.graphics.Graphics3DGraphicsPipeline")],C),function(e){e[e.NONE=0]="NONE",e[e.CONTROLLER=1]="CONTROLLER",e[e.CORE=2]="CORE"}(S||(S={}));export{C as Graphics3DGraphicsPipeline};
5
+ import{_ as e}from"../../../../chunks/tslib.es6.js";import t from"../../../../core/Error.js";import{destroyMaybe as r}from"../../../../core/maybe.js";import{EsriPromise as i}from"../../../../core/Promise.js";import{initial as s,watch as o,sync as n,whenOnce as a}from"../../../../core/reactiveUtils.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 p}from"../../../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as h}from"../../../../core/support/UpdatingHandles.js";import{FeatureTileController3D as d}from"../../../../layers/graphics/controllers/FeatureTileController3D.js";import{symbolHasExtrudeSymbolLayer as c}from"../../../../symbols/support/utils.js";import{elevationAlignPointsInFeatures as u}from"./elevationAlignPointsInFeatures.js";import{Graphics3DFeatureProcessor as y}from"./Graphics3DFeatureProcessor.js";import{QueryEngine as g}from"./QueryEngine.js";import{queryForSymbologySnapping as m}from"./queryForSymbologySnapping.js";import{HeatmapFeatureProcessor as f}from"../support/HeatmapFeatureProcessor.js";import{LayerViewPerformanceInfo as E}from"../support/LayerViewPerformanceInfo.js";import{UpdatePolicy as w}from"../../webgl-engine/lib/UpdatePolicy.js";import{TaskPriority as b}from"../../../support/Scheduler.js";let C=class extends i{constructor(e){super(e),this._dataUpdatingState=S.NONE,this.controller=null,this.updatingHandles=new h,this._controllerCreated=!1,this._pendingController=null}initialize(){this.addResolvingPromise(this._initializeController()),this.updatingHandles.add((()=>this.layer.renderer),(e=>this._recreateProcessor(e)),s),this.updatingHandles.add((()=>this.updatePolicy),(e=>this.processor.preferredUpdatePolicy=e));const e=()=>this.processor.featureStore;this.queryEngine=new g({context:{spatialReference:this.view.spatialReference,layer:this.layer,scheduler:this.view.resourceController.scheduler,get featureStore(){return e()},hasZ:this.hasZ,hasM:this.hasM},priority:b.FEATURE_QUERY_ENGINE})}destroy(){this.removeAllHandles(),this.updatingHandles.destroy(),this._destroyPendingController(),this.controller=r(this.controller),this.processor=r(this.processor),this.queryEngine=r(this.queryEngine),this.loadedGraphics=null}_destroyPendingController(){this._pendingController=r(this._pendingController)}get updating(){return this.updatingHandles.updating||!this._controllerCreated||this.controller?.updating||this.processor?.updating}get legendEnabled(){return this.processor.legendEnabled}get layer(){return this.layerView.layer}get view(){return this.layerView.view}get hasZ(){return this.layerView.hasZ}get hasM(){return this.layerView.hasM}get fullOpacity(){return this.layerView.fullOpacity}get suspended(){return this.layerView.suspended}get filter(){return"filter"in this.layerView?this.layerView.filter:null}get slicePlaneEnabled(){return this.layerView.slicePlaneEnabled}get featureSpatialReference(){return"featureSpatialReference"in this.layerView?this.layerView.featureSpatialReference:null}get graphics3DProcessor(){return"graphics-3d"===this.processor?.type?this.processor:null}get heatmapProcessor(){return"heatmap"===this.processor?.type?this.processor:null}get hasAllFeatures(){return!(!this.controller||!("hasAllFeatures"in this.controller))&&this.controller.hasAllFeatures}get hasAllFeaturesInView(){return!(!this.controller||!("hasAllFeaturesInView"in this.controller))&&this.controller.hasAllFeaturesInView}get hasFullGeometries(){return!(!this.controller||!("hasFullGeometries"in this.controller))&&this.controller.hasFullGeometries}get symbologySnappingSupported(){const e=this.layer?.renderer?.getSymbols();return e?.some(c)??!1}get updatePolicy(){return w.SYNC}get scaleVisibilitySuspended(){return this.processor?.scaleVisibilitySuspended}get timeExtent(){return"timeExtent"in this.layerView?this.layerView.timeExtent:null}get dataUpdating(){return this._dataUpdatingState!==S.NONE}get suspendInfo(){return this.processor?.suspendInfo??{}}forEachGraphic(e){this.loadedGraphics.forEach(e)}findGraphic(e){return this.loadedGraphics.find(e)}queryObjectIds(e,t){return this.layerView.queryObjectIds(e,t)}whenGraphicBounds(e,t){return this.processor?.whenGraphicBounds(e,t)}computeAttachmentOrigin(e,t){return this.processor?.computeAttachmentOrigin(e,t)}async elevationAlignPointsInFeatures(e,r){const i=this.graphics3DProcessor;if(null==i)throw new t("featurelayerview3d:missing-processor","A Graphics3D processor is needed to resolve graphics elevation.");return u(this.view,this.layer,(e=>i.getGraphics3DGraphicByObjectId(e)),e,r)}async queryForSymbologySnapping(e,t){return this.symbologySnappingSupported?m(this.graphics3DProcessor,e,t):{candidates:[],sourceCandidateIndices:[]}}highlight(e){return this.processor.highlight(e,this.layer.objectIdField)}maskOccludee(e){return this.processor.maskOccludee(e)}async _initializeController(){const e=this.createController();this._pendingController=e,this._setupDataUpdating(e),await e.when(),this._setControllerWhenInitialized(e)}_setupDataUpdating(e){"dataUpdating"in e&&this.addHandles([o((()=>e.dataUpdating),(e=>{e&&this._dataUpdatingState===S.NONE?this._dataUpdatingState=S.CONTROLLER:e||this._dataUpdatingState!==S.CONTROLLER||(this._dataUpdatingState=S.NONE)}),n),o((()=>!!this.graphics3DProcessor?.dataUpdating),(t=>{t&&this._dataUpdatingState===S.CONTROLLER?this._dataUpdatingState=S.CORE:t||this._dataUpdatingState!==S.CORE||(this._dataUpdatingState=e.dataUpdating?S.CONTROLLER:S.NONE)}),n)])}async _setControllerWhenInitialized(e){try{await this.when()}catch(t){}this._controllerCreated=!0,this.isResolved()&&!this.destroyed?(await a((()=>this.view?.basemapTerrain?.ready)),this.beforeSetController(e),this._pendingController=null,this.controller=e,this.loadedGraphics=e.graphics):this._destroyPendingController()}_recreateProcessor(e){const t="heatmap"===e?.type,r="heatmap"===this.processor?.type,i=this.processor;if(i&&t===r)return;const s=t?new f({owner:this}):new y({owner:this,frustumVisibilityEnabled:!0,scaleVisibilityEnabled:!0,filterVisibilityEnabled:!0,timeExtentEnabled:!0,elevationAlignmentEnabled:!0,elevationFeatureExpressionEnabled:!0,preferredUpdatePolicy:this.updatePolicy,updateClippingExtent:e=>this._updateClippingExtent(e)});this.processor=s,i?.destroy(),this.queryEngine?.clear(),this.addResolvingPromise(s.when())}_updateClippingExtent(e){if(this.clippingExtent=e,!this.controller)return!1;switch(this.controller.type){case"stream":return!1;case"feature-tile-3d":return this.controller.extent=e,!0}}get performanceInfo(){const e=this.controller instanceof d?this.controller:null;return new E(this.processor.usedMemory,this.loadedGraphics?.length,e?.serviceDataCount??-1,e?.maximumNumberOfFeatures??-1,0,this.processor.performanceInfo)}};var S;e([l()],C.prototype,"updating",null),e([l()],C.prototype,"legendEnabled",null),e([l()],C.prototype,"layerView",void 0),e([l()],C.prototype,"layer",null),e([l()],C.prototype,"view",null),e([l()],C.prototype,"hasZ",null),e([l()],C.prototype,"hasM",null),e([l()],C.prototype,"fullOpacity",null),e([l()],C.prototype,"suspended",null),e([l()],C.prototype,"filter",null),e([l()],C.prototype,"slicePlaneEnabled",null),e([l()],C.prototype,"featureSpatialReference",null),e([l()],C.prototype,"loadedGraphics",void 0),e([l()],C.prototype,"graphics3DProcessor",null),e([l()],C.prototype,"heatmapProcessor",null),e([l()],C.prototype,"hasAllFeatures",null),e([l()],C.prototype,"hasAllFeaturesInView",null),e([l()],C.prototype,"hasFullGeometries",null),e([l()],C.prototype,"symbologySnappingSupported",null),e([l()],C.prototype,"updatePolicy",null),e([l()],C.prototype,"queryEngine",void 0),e([l()],C.prototype,"scaleVisibilitySuspended",null),e([l()],C.prototype,"timeExtent",null),e([l()],C.prototype,"_dataUpdatingState",void 0),e([l({readOnly:!0})],C.prototype,"dataUpdating",null),e([l()],C.prototype,"controller",void 0),e([l()],C.prototype,"processor",void 0),e([l()],C.prototype,"updatingHandles",void 0),e([l()],C.prototype,"_controllerCreated",void 0),C=e([p("esri.views.3d.layers.graphics.Graphics3DGraphicsPipeline")],C),function(e){e[e.NONE=0]="NONE",e[e.CONTROLLER=1]="CONTROLLER",e[e.CORE=2]="CORE"}(S||(S={}));export{C as Graphics3DGraphicsPipeline};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
+ */
5
+ import{_ as e}from"../../../../../chunks/tslib.es6.js";import r from"../../../../../core/Error.js";import{destroyHandle as t,makeHandle as i}from"../../../../../core/handleUtils.js";import{EsriPromise as o}from"../../../../../core/Promise.js";import{on as s}from"../../../../../core/reactiveUtils.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 n}from"../../../../../core/accessorSupport/decorators/subclass.js";import l from"../../../../../layers/graphics/data/FeatureStore.js";import{toJSONGeometryType as u}from"../../../../2d/layers/support/util.js";import{FeatureLayerViewPerformanceInfo as p}from"../../FeatureLayerViewPerformanceInfo.js";import{QueryEngine as m}from"../QueryEngine.js";import{Feature3DPipelineWorkerHandle as d}from"./Feature3DPipelineWorkerHandle.js";import{TestSymbol as y}from"./TestSymbol.js";import{LayerViewPerformanceInfo as c}from"../../support/LayerViewPerformanceInfo.js";import{UpdatePolicy as h}from"../../../webgl-engine/lib/UpdatePolicy.js";import{TaskPriority as g}from"../../../../support/Scheduler.js";let w=class extends o{constructor(e){super(e),this.maximumNumberOfFeatures=1e3}initialize(){const e=u(this.layerView.layer.geometryType);if("esriGeometryPoint"!==e)throw new r("unsupported-geometry-type",`${this.layerView.layer.geometryType} is not supported`);const i="hasZ"in this.layerView.layer&&this.layerView.layer.hasZ,o="hasM"in this.layerView.layer&&this.layerView.layer.hasM,a=new l({geometryType:e,hasZ:i,hasM:o});this.queryEngine=new m({context:{spatialReference:this.layerView.view.spatialReference,layer:this.layerView.layer,scheduler:this.layerView.view.resourceController.scheduler,featureStore:a,hasZ:i,hasM:o},priority:g.FEATURE_QUERY_ENGINE}),this.addResolvingPromise((async()=>{const{layer:e,view:r}=this.layerView,{spatialReference:i,renderSpatialReference:o,resourceController:a}=r,n=new y({view:r}),l=new d({schedule:e=>a.immediate.schedule(e),config:{url:this.layerView.layer.parsedUrl?.path??"",baseQuery:e.createQuery().toJSON(),spatialReference:i.toJSON(),renderSpatialReference:o.toJSON(),objectIdField:e.objectIdField,capabilities:e.capabilities},onAddTile:e=>n.addTile(e),onRemoveTiles:e=>n.removeTiles(e.tileIds)});this._workerHandle=await l.when(),this.addHandles([this.layerView.view.featureTiles.addClient(),s((()=>this.layerView.view.featureTiles.tiles),"change",(e=>{this._workerHandle.onTileTreeChange(e)}),{onListenerAdd:e=>this._workerHandle.onTileTreeChange({added:e.toArray(),removed:[]}),onListenerRemove:e=>this._workerHandle.onTileTreeChange({added:[],removed:e.toArray()})}),t(n)])})())}get legendEnabled(){return!1}get hasAllFeatures(){return!1}get hasAllFeaturesInView(){return!1}get hasFullGeometries(){return!1}get symbologySnappingSupported(){return!1}get scaleVisibilitySuspended(){return!1}get suspendInfo(){return{}}get updating(){return!1}get dataUpdating(){return!1}get updatePolicy(){return h.ASYNC}get maximumNumberOfFeaturesExceeded(){return!1}get updatingProgressValue(){return 1}get usedMemory(){return 100}get unloadedMemory(){return 0}get ignoresMemoryFactor(){return!0}get performanceInfo(){return new p(new c(this.usedMemory,0,0,this.maximumNumberOfFeatures,0,null),0,0,!0,"tiles","n/a")}get suspendResumeExtentMode(){return"computed"}forEachGraphic(e){}findGraphic(e){return null}highlight(e){return i()}maskOccludee(e){return i()}async whenGraphicBounds(e,r){return null}computeAttachmentOrigin(e,r){return null}elevationAlignPointsInFeatures(e,t){throw new r("unsupported-elevation-alignment")}queryForSymbologySnapping(e,t){throw new r("unsupported-symbology-snapping")}async doRefresh(e){}setVisibility(e,r){}getMissingAttributesForFeature(e){return null}getHydratedGeometry(e){return null}};e([a()],w.prototype,"layerView",void 0),w=e([n("esri.views.3d.layers.graphics.pipeline.Feature3DPipeline")],w);export{w as Feature3DPipeline};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
+ */
5
+ import{_ as e}from"../../../../../chunks/tslib.es6.js";import"../../../../../geometry.js";import s from"../../../../../core/Accessor.js";import{createTask as i}from"../../../../../core/asyncUtils.js";import{throwIfAborted as t}from"../../../../../core/promiseUtils.js";import"../../../../../core/Logger.js";import"../../../../../core/has.js";import"../../../../../core/RandomLCG.js";import"../../../../../core/Error.js";import{subclass as r}from"../../../../../core/accessorSupport/decorators/subclass.js";import o from"../../../../../rest/support/Query.js";import{Tile3DFetcher as n}from"./Tile3DFetcher.js";import{Tile3DProcessor as l}from"./Tile3DProcessor.js";import c from"../../../../../geometry/SpatialReference.js";let d=class extends s{constructor(){super(...arguments),this.remoteClient=null,this._pendingTiles=new Map,this._loadedTiles=new Map,this._processor=null,this._fetcher=null}destroy(){for(const e of this._pendingTiles.values())e.abort();this._pendingTiles.clear(),this._loadedTiles.clear()}setup({spatialReference:e,renderSpatialReference:s,baseQuery:i,url:t,objectIdField:r,capabilities:d}){const a=c.fromJSON(e);this._fetcher=new n(a,o.fromJSON(i),t,r,d),this._processor=new l(r,a,c.fromJSON(s))}async onTileTreeChange(e){const{added:s,removed:t}=e;for(const i of t){this._loadedTiles.delete(i);const e=this._pendingTiles.get(i);e?.abort(),this._pendingTiles.delete(i)}for(const r of s){const e=this._pendingTiles.get(r.id);e?.abort(),this._pendingTiles.set(r.id,i((e=>this._addTile(r,e))))}if(t.length>0){const e={tileIds:t};await this.remoteClient.invoke("onRemoveTiles",e)}}async _addTile(e,s){const i=await this._fetcher.fetch(e,s);t(s);const r=this._processor.process(i);if(null==r)return void this._pendingTiles.delete(e.id);const{coordinates:o,objectIds:n,indicesCoordinates:l,indicesShared:c}=r;await this.remoteClient.invoke("onAddTile",r,{signal:s,transferList:[o.buffer,n.buffer,l.buffer,c.buffer]}),this._pendingTiles.delete(e.id),this._loadedTiles.set(e.id,i)}};d=e([r("esri.views.3d.layers.graphics.pipeline.Feature3DPipelineWorker")],d);const a=d;export{a as default};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
+ */
5
+ import{_ as e}from"../../../../../chunks/tslib.es6.js";import{EsriPromise as r}from"../../../../../core/Promise.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 t}from"../../../../../core/accessorSupport/decorators/subclass.js";import{WorkerHandle as s}from"../../../../../core/workers/WorkerHandle.js";let i=class extends r{constructor(e){super(e),this.schedule=null}initialize(){this._workerHandle=new n(this.schedule,this),this.addResolvingPromise((async()=>await this._workerHandle.invokeMethod("setup",this.config))())}async onTileTreeChange({added:e,removed:r}){if(0===e.length&&0===r.length)return;const o=e.map(c),t=r.map(d);return await this._workerHandle.invokeMethod("onTileTreeChange",{added:o,removed:t})}};e([o({constructOnly:!0})],i.prototype,"schedule",void 0),e([o({constructOnly:!0})],i.prototype,"config",void 0),e([o({constructOnly:!0})],i.prototype,"onAddTile",void 0),e([o({constructOnly:!0})],i.prototype,"onRemoveTiles",void 0),i=e([t("esri.views.3d.layers.graphics.pipeline.Feature3DPipelineWorkerHandle")],i);class n extends s{constructor(e,r){super("Feature3DPipelineWorker","setup",{},e,{strategy:"dedicated",client:r})}}function c({id:e,lij:r,extent:o}){return{id:e,lij:r,extent:o}}function d({id:e}){return e}export{i as Feature3DPipelineWorkerHandle};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
+ */
5
+ import e from"../../../../../core/Error.js";import t from"../../../../../core/pbf.js";import{normalizeTransform as r}from"../../../../../geometry/support/quantizationUtils.js";import{parseField as n,parseTransform as s}from"../../../../../rest/query/operations/pbfFeatureServiceParser.js";class o{constructor(e){const r=new t(new Uint8Array(e),new DataView(e));this._index=i(r),this._reader=r}get featureCount(){return this._index.featureIndices.length}get exceededTransferLimit(){return this._index.exceededTransferLimit}fieldIndex(e){return this._index.fields.find((t=>t.name===e))?.index??-1}readAttribute(e,t){const{featureCount:r,_index:n}=this;if(e<0||e>=r)return;const s=n.fields.length;if(e<0||t>=s)return;const o=n.attributeIndices[e*s+t],i=this._reader;return i.move(o),f(i)}readAllCoordinates(e,t=0){const r=2,n=3,s=this._reader,{transform:o}=this._index,{scale:i,translate:a}=o,[c,u,f]=i,[g,d,p]=a;for(const l of this._index.featureIndices){s.move(l);const o=s.getLength(),i=s.pos()+o;for(;s.pos()<i&&s.next();)switch(s.tag()){case r:{const r=s.getLength(),o=s.pos()+r;for(;s.pos()<o&&s.next();)if(s.tag()===n)s.getUInt32(),e[t++]=g+c*s.getSInt64(),e[t++]=d+u*s.getSInt64(),e[t++]=p+f*s.getSInt64();else s.skip();break}default:s.skip()}}return t}}function i(e){const t=2;for(;e.next();){if(e.tag()===t)return a(e.getMessage());e.skip()}u()}function a(e){const t=1;for(;e.next();){if(e.tag()===t)return c(e.getMessage());e.skip()}u()}function c(e){const t=9,o=12,i=13,a=15,c=7,f=0,g=10,d=1;let p,l=!1,h=!1,x=0;const m=new Array,I=new Array,k=new Array;for(;e.next();)switch(e.tag()){case c:e.getEnum()!==f&&u();break;case t:l=e.getBool()??!1;break;case o:p=r(e.processMessage(s));break;case i:{const t=e.processMessage(n);t.index=x++,m.push(t);break}case a:{I.push(e.pos());const t=e.getUInt32(),r=e.pos()+t;for(;e.pos()<r&&e.next();)if(e.tag()===d)k.push(e.pos()),e.skip();else e.skip();break}case g:h=e.getBool()??!1;break;default:e.skip()}return null!=p&&h||u(),{transform:p,exceededTransferLimit:l,fields:m,featureIndices:I,attributeIndices:k}}function u(){const t=new e("pbf-parsing-failed","Error while parsing PBF",new Error);throw console.error(t),t}function f(e){const t=1,r=2,n=3,s=4,o=5,i=6,a=7,c=8,u=9,f=e.getLength(),g=e.pos()+f;for(;e.pos()<g&&e.next();)switch(e.tag()){case t:return e.getString();case r:return e.getFloat();case n:return e.getDouble();case s:return e.getSInt32();case o:return e.getUInt32();case i:return e.getInt64();case a:return e.getUInt64();case c:return e.getSInt64();case u:return e.getBool();default:return e.skip(),null}return null}export{o as PBFPointFeaturesView};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
+ */
5
+ import{_ as e}from"../../../../../chunks/tslib.es6.js";import r from"../../../../../core/Accessor.js";import{makeHandle as s}from"../../../../../core/handleUtils.js";import{throwIfNotAbortError as t}from"../../../../../core/promiseUtils.js";import{property as i}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{PromiseQueue as n}from"../../../../../layers/support/PromiseQueue.js";import{namedAnchorToHUDMaterialAnchorPos as l}from"../placementUtils.js";import{createTexture as a,requiresHalfTexelOffset as c,defaultSymbolSizeRatio as d}from"../../../support/engineContent/sdfPrimitives.js";import{Attribute as m}from"../../../webgl-engine/lib/Attribute.js";import{MaterialChangeSet as p}from"../../../webgl-engine/lib/ChangeSet.js";import{ContentObjectType as h}from"../../../webgl-engine/lib/ContentObjectType.js";import{Geometry as u}from"../../../webgl-engine/lib/Geometry.js";import{createPointGeometry as g}from"../../../webgl-engine/lib/GeometryUtil.js";import{LocalOrigin as w}from"../../../webgl-engine/lib/LocalOriginFactory.js";import{RenderGeometry as f}from"../../../webgl-engine/lib/RenderGeometry.js";import{VertexAttribute as _}from"../../../webgl-engine/lib/VertexAttribute.js";import{HUDMaterial as b}from"../../../webgl-engine/materials/HUDMaterial.js";import{MergedRenderer as y}from"../../../webgl-engine/materials/renderers/MergedRenderer.js";import{TaskPriority as j}from"../../../../support/Scheduler.js";const T=[d/2,d/2,1-d/2,1-d/2];let S=class extends r{constructor(e){super(e),this._tiles=new Map,this._pendingTiles=new Map,this._promiseQueue=new n,this._normal=new Float64Array([0,0,1]),this._color=new Float64Array([255,255,255,255]),this._size=new Float64Array([24,24]),this._centerOffsetAndDistance=new Float64Array([0,0,0,1]),this._uvs=new Float64Array([0,0])}initialize(){const{view:e}=this,{sharedSymbolResources:r}=e;if(null==r)throw new Error("No shared symbol resources found!");const{textures:t}=r,[i,o]=A(t);this._material=i;const n=new y({material:i});this._renderer=n;const l=new f(g(i,null,[0,0,0]));l.localOrigin=new w([0,0,0],"keep-alive");const a=new p;a.adds.push(l),e._stage.addRenderPlugin(n),n.modify(a),e._stage.renderView.renderer.updateHasFlags(),this.addHandles([e.resourceController.scheduler.registerTask(j.GRAPHICS_CORE,this._promiseQueue),s((()=>o.release()))])}destroy(){this._renderer.destroy(),this._tiles.clear();for(const e of this._pendingTiles.values())e.abort();this._pendingTiles.clear(),this._promiseQueue.destroy()}async removeTiles(e){const r=new p,{removes:s}=r;for(const t of e){const e=this._pendingTiles.get(t);null!=e&&(e.abort(),this._pendingTiles.delete(t));const r=this._tiles.get(t);if(null!=r){for(const e of r.renderGeometries)s.push(e);this._tiles.delete(t)}}await this._promiseQueue.push((()=>{this._renderer.modify(r),this.view._stage.renderView.requestRender()}),null)}async addTile({tileId:e,coordinates:r,indicesCoordinates:s,indicesShared:i,localOrigin:o}){this._pendingTiles.get(e)?.abort();const n=new p,{adds:l,removes:a}=n,c=this._tiles.get(e);if(null!=c){for(const e of c.renderGeometries)a.push(e);this._tiles.delete(e)}const d=this._material,g=[[_.POSITION,new m(r,s,3,!0)],[_.NORMAL,new m(this._normal,i,3,!0)],[_.UV0,new m(this._uvs,i,2,!0)],[_.COLOR,new m(this._color,i,4,!0)],[_.SIZE,new m(this._size,i,2,!0)],[_.CENTEROFFSETANDDISTANCE,new m(this._centerOffsetAndDistance,i,4,!0)]],b=new u(d,g,null,h.Point),y=new f(b);y.localOrigin=new w(o,e),l.push(y);const j=new AbortController;this._pendingTiles.set(e,j);try{await this._promiseQueue.push((()=>{this._renderer.modify(n),this._pendingTiles.delete(e),this._tiles.set(e,{renderGeometries:l}),this.view._stage.renderView.requestRender()}),j.signal)}catch(T){t(T)}}};function A(e){const r={anchorPosition:l.center,occlusionTest:!0,hasSlicePlane:!1},s=r,t=1;s.color=[1,0,0,1],s.outlineColor=[0,0,0,1],s.outlineSize=t;const i=e.fromData("circle-icon",(()=>a("circle")));return s.textureId=i.texture.id,s.textureIsSignedDistanceField=!0,s.sampleSignedDistanceFieldTexelCenter=c("circle"),s.distanceFieldBoundingBox=T,[new b(r),i]}e([i({constructOnly:!0})],S.prototype,"view",void 0),S=e([o("esri.views.3d.layers.graphics.pipeline.TestSymbol")],S);export{S as TestSymbol};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
+ */
5
+ class s{constructor(s,t){this.descriptor=s,this.pages=t}}export{s as Tile};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
+ */
5
+ import{throwIfAborted as e}from"../../../../../core/promiseUtils.js";import{toExtent as t}from"../../../../../geometry/support/aaBoundingRect.js";import{executeQueryPBFBuffer as r}from"../../../../../rest/query/operations/query.js";import{PBFPointFeaturesView as o}from"./PBFPointFeaturesView.js";import{Tile as s}from"./Tile.js";const i=8e3,a=4,n=4;class c{constructor(e,t,r,o,s){this.spatialReference=e,this.url=r,this.objectIdField=o,this.capabilities=s;const{supportsMaxRecordCountFactor:n,maxRecordCount:c}=this.capabilities.query,u=c??8e3,l=(n?a:null)??1,p=u*l;this._pageSize=Math.min(i,p);const m=t.clone();m.cacheHint=!0,m.resultType="tile",m.outSpatialReference=e,m.returnGeometry=!0,m.returnZ=!0,m.maxRecordCountFactor=l,m.num=u,m.outFields=[o],this._baseQuery=m}async fetch(r,o){const{spatialReference:i}=this,a=t(r.extent,i),c=this._baseQuery.clone();c.geometry=a;const u=new Array;let l=0,p=!1,m=1;for(;!p;){const t=[];for(let e=0;e<m;++e)t.push(this._fetchPage(c,l++,o));const r=await Promise.all(t);e(o);for(const e of r){const t=0!==e.featureCount;p||=!e.exceededTransferLimit||!t,t&&u.push(e)}m=Math.min(m+1,n)}return new s(r,u)}async _fetchPage(t,s,i){const a=t.clone();a.start=s*this._pageSize;const n=(await r(this.url,a,{signal:i})).data;return e(i),new o(n)}}export{c as Tile3DFetcher};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
+ */
5
+ import{create as e}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{projectBuffer as r}from"../../../../../geometry/projection/projectBuffer.js";import{projectVectorToVector as t}from"../../../../../geometry/projection/projectVectorToVector.js";import{center as o}from"../../../../../geometry/support/aaBoundingRect.js";class i{constructor(e,r,t){this.objectIdField=e,this.spatialReference=r,this.renderSpatialReference=t}process(i){const{pages:n}=i;if(0===n.length)return null;const c=n.reduce(((e,{featureCount:r})=>e+r),0);if(0===c)return null;const s=this.objectIdField,a=this.spatialReference,l=this.renderSpatialReference,d=new Float64Array(3*c),f=new Uint32Array(c);let p=0;for(const e of n){p=e.readAllCoordinates(d,p);const r=e.fieldIndex(s);if(r<0)throw new Error("Failed to find object id field");for(let t=0;t<c;++t)f[t]=e.readAttribute(t,r)}const j=new Float64Array(d.length);if(!r(d,a,0,j,l,0,c))throw new Error("Failed to project coordinates");const u=i.descriptor.extent,m=o(u),h=e();t([m[0],m[1],0],a,h,l);const g=new Uint32Array(c);for(let e=0;e<c;++e)g[e]=e;const w=new Uint32Array(c);for(let e=0;e<c;++e)w[e]=0;return{coordinates:j,indicesCoordinates:g,indicesShared:w,objectIds:f,tileId:i.descriptor.id,localOrigin:h}}}export{i as Tile3DProcessor};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../chunks/tslib.es6.js";import{disposeMaybe as s}from"../../../../core/maybe.js";import t from"../../../../core/PooledArray.js";import{property as i}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as r}from"../../../../core/accessorSupport/decorators/subclass.js";import{f as n,l as o,j as a,k as l,m as h,q as c}from"../../../../chunks/vec32.js";import{create as d}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{s as u}from"../../../../chunks/vec42.js";import{create as m,offset as p,contains as g,containsPoint as _,set as f,positiveInfinity as P,equals as b}from"../../../../geometry/support/aaBoundingBox.js";import{create as S}from"../../../../geometry/support/plane.js";import{fromPoints as x}from"../../../../geometry/support/ray.js";import{PclTarget as z}from"./Intersector.js";import{PointHighlights as w}from"./PointHighlights.js";import{isDepth as R,ShaderOutput as A}from"../../webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SyncPrepareRenderPlugin as j}from"../../webgl-engine/effects/RenderPlugin.js";import{Default3D as q}from"../../webgl-engine/lib/DefaultVertexAttributeLocations.js";import{newIntersectorResult as y}from"../../webgl-engine/lib/Intersector.js";import{IntersectorType as O,StoreResults as E}from"../../webgl-engine/lib/IntersectorInterfaces.js";import{RenderSlot as I}from"../../webgl-engine/lib/RenderSlot.js";import{VertexArrayObject as v}from"../../webgl-engine/lib/VertexArrayObject.js";import{VertexAttribute as F}from"../../webgl-engine/lib/VertexAttribute.js";import{P as L,a as N,g as C}from"../../../../chunks/PointRenderer.glsl.js";import{PointRendererTechnique as T}from"../../webgl-engine/shaders/PointRendererTechnique.js";import{PointRendererTechniqueConfiguration as H}from"../../webgl-engine/shaders/PointRendererTechniqueConfiguration.js";import{BufferObject as M}from"../../../webgl/BufferObject.js";import{DataType as B,PrimitiveType as D,Usage as U}from"../../../webgl/enums.js";import{VertexElementDescriptor as V}from"../../../webgl/VertexElementDescriptor.js";const W={positions:[new V(F.POSITION,3,B.FLOAT,0,12)],colors:[new V(F.COLOR,3,B.UNSIGNED_BYTE,0,3,!0)]};let k=class extends j{constructor(e){super(e),this.type=O.PCL,this.isGround=!1,this._passParameters=new L,this._highlights=new w({forEachNode:e=>this.forEachNode(e),addHighlight:(e,s,t)=>this._addHighlight(e,s,t),removeHighlight:(e,s)=>this._removeHighlight(e,s)}),this.produces=new Map([[I.OPAQUE_MATERIAL,e=>!(R(e)||e===A.Highlight&&this._highlights.empty)],[I.OPAQUE_NO_SSAO_DEPTH,e=>R(e)]]),this.layerUid="",this._slicePlaneEnabled=!1,this._techniqueConfig=new H,this._nodes=new t}initializeRenderContext(e){this._context=e,e.requestRender()}uninitializeRenderContext(){}intersect(e,s,t,i){const r=d(),f=d(),P=d(),b=d(),w=S(),R=e.camera.perScreenPixelRatio/2,A=e.camera.near;n(f,i,t);const j=1/o(f);a(f,f,j),l(P,f),u(w,f[0],f[1],f[2],-h(f,t));const q=new ee,O=new ee,I=new Array,v=m(),F=m(this._passParameters.clipBox);p(F,-t[0],-t[1],-t[2],F),this._nodes.forAll((o=>{const a=o.splatSize*this._passParameters.scaleFactor;let l=o.obb.minimumDistancePlane(w),d=o.obb.maximumDistancePlane(w);l-=J(a,l+A,this._passParameters,R,o.isLeaf),d-=J(a,d+A,this._passParameters,R,o.isLeaf);const u=d<0,m=null!=q.dist&&null!=O.dist&&q.dist<l*j&&O.dist>d*j;if(u||m)return;const S=Y(a,d+A,this._passParameters,R,o.isLeaf);if(!o.obb.intersectRay(t,f,S))return;const x=S*S;o.obb.toAaBoundingBox(v),p(v,-t[0],-t[1],-t[2],v);const z=!g(F,v);n(b,o.origin,t);const y=o.coordinates.length/3;for(let n=0;n<y;n++){if(r[0]=b[0]+o.coordinates[3*n],r[1]=b[1]+o.coordinates[3*n+1],r[2]=b[2]+o.coordinates[3*n+2],z&&!_(F,r))continue;const l=h(r,f),d=c(r)-l*l;if(d>x)continue;let u=l+A;const m=J(a,u,this._passParameters,R,o.isLeaf);if(l-m<0)continue;u-=m;const p=Y(a,u,this._passParameters,R,o.isLeaf);if(d>p*p)continue;const g=(l-m)*j,S=e=>(e.point=K(o,n,e.point),e.dist=g,e.normal=P,e.node=o,e.pointId=n,e.layerUid=this.layerUid,e);if((null==q.dist||g<q.dist)&&(null==s||s(t,i,g))&&S(q),e.options.store!==E.MIN&&(null==O.dist||g>O.dist)&&(null==s||s(t,i,g))&&S(O),e.options.store===E.ALL&&(null==s||s(t,i,g))){const e=new ee;I.push(S(e))}}}));const L=e=>{const{layerUid:s,node:t,pointId:i}=e;return new z(e.point,s,i,(()=>this.createGraphic(t,i,e.point)))},N=(e,s)=>{const t=L(s);e.set(this.type,t,s.dist,s.normal)};if(se(q)){const s=e.results.min;(null==s.dist||q.dist<s.dist)&&N(s,q)}if(se(O)&&e.options.store!==E.MIN){const s=e.results.max;(null==s.dist||O.dist>s.dist)&&N(s,O)}if(e.options.store===E.ALL){const s=x(t,i);for(const t of I){const i=y(s);N(i,t),e.results.all.push(i)}}}prepareTechnique(e){return 0!==this._nodes.length&&(e.output===A.Color||R(e.output)&&e.bindParameters.slot===I.OPAQUE_NO_SSAO_DEPTH||e.output===A.Highlight)?(this._nodes.forAll((s=>{null==s.vao&&this._initNode(e,s)})),this._techniqueConfig.drawScreenSize=this._passParameters.drawScreenSpace,this._techniqueConfig.useFixedSizes=this._passParameters.useFixedSizes,this._techniqueConfig.hasSlicePlane=this._slicePlaneEnabled,this._techniqueConfig.hasOccludees=e.bindParameters.hasOccludees,this._techniqueConfig.clippingEnabled=this._clippingEnabled,this._techniqueConfig.output=e.output,this._context.techniques.releaseAndAcquire(T,this._techniqueConfig,this._technique)):null}renderNode(e,s){const t=e.rctx,i=t.bindTechnique(s,e.bindParameters,this._passParameters),r=e.output===A.Highlight;this._nodes.forAll((s=>{0!==s.coordinates.length&&(!r||s.highlights&&0===e.bindParameters.highlightLevel)&&(i.bindDraw(s,e.bindParameters,this._passParameters),t.bindVAO(s.vao),r?this._renderHighlightFragments(t,s):t.drawArrays(D.POINTS,0,s.coordinates.length/3))}))}_renderHighlightFragments(e,s){const t=s.highlights;if(null==t)return;let i=t[0].component,r=i+1;for(let o=1;o<t.length;o++){const s=t[o].component;if(s!==r){const t=r-i;t>0&&e.drawArrays(D.POINTS,i,t),i=s}r=s+1}const n=r-i;n>0&&e.drawArrays(D.POINTS,i,n)}set useFixedSizes(e){this._passParameters.useFixedSizes!==e&&(this._passParameters.useFixedSizes=e,this._requestRender())}get useFixedSizes(){return this._passParameters.useFixedSizes}set scaleFactor(e){this._passParameters.scaleFactor!==e&&(this._passParameters.scaleFactor=e,this._requestRender())}get scaleFactor(){return this._passParameters.scaleFactor}set minSizePx(e){this._passParameters.minSizePx!==e&&(this._passParameters.minSizePx=e,this._requestRender())}get minSizePx(){return this._passParameters.minSizePx}set useRealWorldSymbolSizes(e){this._passParameters.useRealWorldSymbolSizes!==e&&(this._passParameters.useRealWorldSymbolSizes=e,this._requestRender())}get useRealWorldSymbolSizes(){return this._passParameters.useRealWorldSymbolSizes}set size(e){this._passParameters.size!==e&&(this._passParameters.size=e,this._requestRender())}get size(){return this._passParameters.size}set sizePx(e){this._passParameters.sizePx!==e&&(this._passParameters.sizePx=e,this._requestRender())}get sizePx(){return this._passParameters.sizePx}set clippingBox(e){f(this._passParameters.clipBox,e||P)}get _clippingEnabled(){return!b(this._passParameters.clipBox,P,((e,s)=>e===s))}get slicePlaneEnabled(){return this._slicePlaneEnabled}set slicePlaneEnabled(e){this._slicePlaneEnabled!==e&&(this._slicePlaneEnabled=e,this._requestRender())}addNode(e){this._nodes.push(e),this._highlights.nodeAdded(e),this._requestRender()}removeNode(e){let t=null;return this._nodes.filterInPlace((i=>i.id!==e||(t=i,i.vao=s(i.vao),this._highlights.nodeRemoved(i),!1))),this._requestRender(),t}forEachNode(e){this._nodes.forAll(e)}removeAll(){this._nodes.forAll((e=>e.vao=s(e.vao))),this._highlights.removeAll(),this._nodes.clear(),this._requestRender()}highlight(e){return this._highlights.add(e)}_addHighlight(e,s,t){e.highlights=Z(e.highlights,s,t),this._requestRender()}_removeHighlight(e,s){e.highlights=$(e.highlights,s),this._requestRender()}_initNode(e,s){const t=e.rctx;s.vao=new v(t,q,W,{positions:M.createVertex(t,U.STATIC_DRAW,s.coordinates),colors:M.createVertex(t,U.STATIC_DRAW,s.rgb)})}_requestRender(){this._context&&this._context.requestRender()}};e([i({constructOnly:!0})],k.prototype,"createGraphic",void 0),k=e([r("esri.views.3d.layers.i3s.PointRenderer")],k);class G extends N{constructor(e,s,t,i,r,n,o,a,l=null,h=null){super(t,r,s),this.id=e,this.obb=i,this.coordinates=n,this.rgb=o,this.attributes=a,this.pointIdFilterMap=l,this.highlights=h}}function Q(e){return e.hasOwnProperty("splatSize")}function Y(e,s,t,i,r){if(t.drawScreenSpace)return t.fixedSize*s*i;const n=C(r)*s*i;return t.useFixedSizes?Math.min(t.fixedSize/2,n):t.screenMinSize>0?Math.min(Math.max(t.screenMinSize*s*i,e/2),n):Math.min(e/2,n)}function J(e,s,t,i,r){return t.drawScreenSpace?0:Y(e,s,t,i,r)}function K(e,s,t){return null==t&&(t=d()),t[0]=e.origin[0]+e.coordinates[3*s],t[1]=e.origin[1]+e.coordinates[3*s+1],t[2]=e.origin[2]+e.coordinates[3*s+2],t}function X(e){return null!=e.component?e.component:-1}function Z(e,s,t){null==e&&(e=[]);const i={component:s,id:t};e.push(i);const r=X(i);let n=e.length-1;for(;n>0&&r<X(e[n-1]);)[e[n-1],e[n]]=[e[n],e[n-1]],--n;return e}function $(e,s){if(null==e)return e;const t=e.filter((e=>e.id!==s));return 0===t.length?null:t}class ee{constructor(){this.node=null,this.pointId=null,this.point=null,this.dist=null,this.normal=null,this.layerUid=""}}function se(e){return null!=e.dist&&null!=e.point&&null!=e.pointId&&null!=e.node}export{k as PointRenderer,G as PointRendererNode,Q as isPointRendererNode};
5
+ import{_ as e}from"../../../../chunks/tslib.es6.js";import{disposeMaybe as s}from"../../../../core/maybe.js";import t from"../../../../core/PooledArray.js";import{property as i}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as r}from"../../../../core/accessorSupport/decorators/subclass.js";import{f as n,l as o,j as a,k as l,m as h,q as c}from"../../../../chunks/vec32.js";import{create as d}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{s as u}from"../../../../chunks/vec42.js";import{create as m,offset as p,contains as g,containsPoint as _,set as f,positiveInfinity as P,equals as b}from"../../../../geometry/support/aaBoundingBox.js";import{create as S}from"../../../../geometry/support/plane.js";import{fromPoints as x}from"../../../../geometry/support/ray.js";import{PclTarget as z}from"./Intersector.js";import{PointHighlights as w}from"./PointHighlights.js";import{isDepth as R,ShaderOutput as A}from"../../webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SyncPrepareRenderPlugin as j}from"../../webgl-engine/effects/RenderPlugin.js";import{Default3D as q}from"../../webgl-engine/lib/DefaultVertexAttributeLocations.js";import{newIntersectorResult as y}from"../../webgl-engine/lib/Intersector.js";import{IntersectorType as O,StoreResults as E}from"../../webgl-engine/lib/IntersectorInterfaces.js";import{RenderSlot as I}from"../../webgl-engine/lib/RenderSlot.js";import{VertexArrayObject as v}from"../../webgl-engine/lib/VertexArrayObject.js";import{VertexAttribute as F}from"../../webgl-engine/lib/VertexAttribute.js";import{P as L,a as N,g as C}from"../../../../chunks/PointRenderer.glsl.js";import{PointRendererTechnique as T}from"../../webgl-engine/shaders/PointRendererTechnique.js";import{PointRendererTechniqueConfiguration as H}from"../../webgl-engine/shaders/PointRendererTechniqueConfiguration.js";import{BufferObject as M}from"../../../webgl/BufferObject.js";import{DataType as B,PrimitiveType as D,Usage as U}from"../../../webgl/enums.js";import{VertexElementDescriptor as V}from"../../../webgl/VertexElementDescriptor.js";const W={positions:[new V(F.POSITION,3,B.FLOAT,0,12)],colors:[new V(F.COLOR,3,B.UNSIGNED_BYTE,0,3,!0)]};let k=class extends j{constructor(e){super(e),this.type=O.PCL,this.isGround=!1,this._passParameters=new L,this._highlights=new w({forEachNode:e=>this.forEachNode(e),addHighlight:(e,s,t)=>this._addHighlight(e,s,t),removeHighlight:(e,s)=>this._removeHighlight(e,s)}),this.produces=new Map([[I.OPAQUE_MATERIAL,e=>!(R(e)||e===A.Highlight&&this._highlights.empty)],[I.OPAQUE_NO_SSAO_DEPTH,e=>R(e)]]),this.layerUid="",this._slicePlaneEnabled=!1,this._techniqueConfig=new H,this._nodes=new t}initializeRenderContext(e){this._context=e,e.requestRender()}uninitializeRenderContext(){}intersect(e,s,t,i){const r=d(),f=d(),P=d(),b=d(),w=S(),R=e.camera.perScreenPixelRatio/2,A=e.camera.near;n(f,i,t);const j=1/o(f);a(f,f,j),l(P,f),u(w,f[0],f[1],f[2],-h(f,t));const q=new ee,O=new ee,I=new Array,v=m(),F=m(this._passParameters.clipBox);p(F,-t[0],-t[1],-t[2],F),this._nodes.forAll((o=>{const a=o.splatSize*this._passParameters.scaleFactor;let l=o.obb.minimumDistancePlane(w),d=o.obb.maximumDistancePlane(w);l-=J(a,l+A,this._passParameters,R,o.isLeaf),d-=J(a,d+A,this._passParameters,R,o.isLeaf);const u=d<0,m=null!=q.dist&&null!=O.dist&&q.dist<l*j&&O.dist>d*j;if(u||m)return;const S=Y(a,d+A,this._passParameters,R,o.isLeaf);if(!o.obb.intersectRay(t,f,S))return;const x=S*S;o.obb.toAaBoundingBox(v),p(v,-t[0],-t[1],-t[2],v);const z=!g(F,v);n(b,o.origin,t);const y=o.coordinates.length/3;for(let n=0;n<y;n++){if(r[0]=b[0]+o.coordinates[3*n],r[1]=b[1]+o.coordinates[3*n+1],r[2]=b[2]+o.coordinates[3*n+2],z&&!_(F,r))continue;const l=h(r,f),d=c(r)-l*l;if(d>x)continue;let u=l+A;const m=J(a,u,this._passParameters,R,o.isLeaf);if(l-m<0)continue;u-=m;const p=Y(a,u,this._passParameters,R,o.isLeaf);if(d>p*p)continue;const g=(l-m)*j,S=e=>(e.point=K(o,n,e.point),e.dist=g,e.normal=P,e.node=o,e.pointId=n,e.layerUid=this.layerUid,e);if((null==q.dist||g<q.dist)&&(null==s||s(t,i,g))&&S(q),e.options.store!==E.MIN&&(null==O.dist||g>O.dist)&&(null==s||s(t,i,g))&&S(O),e.options.store===E.ALL&&(null==s||s(t,i,g))){const e=new ee;I.push(S(e))}}}));const L=e=>{const{layerUid:s,node:t,pointId:i}=e;return new z(e.point,s,i,(()=>this.createGraphic(t,i,e.point)))},N=(e,s)=>{const t=L(s);e.set(this.type,t,s.dist,s.normal)};if(se(q)){const s=e.results.min;(null==s.dist||q.dist<s.dist)&&N(s,q)}if(se(O)&&e.options.store!==E.MIN){const s=e.results.max;(null==s.dist||O.dist>s.dist)&&N(s,O)}if(e.options.store===E.ALL){const s=x(t,i);for(const t of I){const i=y(s);N(i,t),e.results.all.push(i)}}}prepareTechnique(e){return 0!==this._nodes.length&&(e.output===A.Color||R(e.output)&&e.bindParameters.slot===I.OPAQUE_NO_SSAO_DEPTH||e.output===A.Highlight)?(this._nodes.forAll((s=>{null==s.vao&&this._initNode(e,s)})),this._techniqueConfig.drawScreenSize=this._passParameters.drawScreenSpace,this._techniqueConfig.useFixedSizes=this._passParameters.useFixedSizes,this._techniqueConfig.hasSlicePlane=this._slicePlaneEnabled,this._techniqueConfig.hasOccludees=e.bindParameters.hasOccludees,this._techniqueConfig.clippingEnabled=this._clippingEnabled,this._techniqueConfig.output=e.output,this._context.techniques.releaseAndAcquire(T,this._techniqueConfig,this._technique)):null}renderNode(e,s){const t=e.rctx,i=t.bindTechnique(s,e.bindParameters,this._passParameters),r=e.output===A.Highlight;this._nodes.forAll((s=>{0!==s.coordinates.length&&(!r||s.highlights&&0===e.bindParameters.highlightLevel)&&(i.bindDraw(e.bindParameters,this._passParameters,s),t.bindVAO(s.vao),r?this._renderHighlightFragments(t,s):t.drawArrays(D.POINTS,0,s.coordinates.length/3))}))}_renderHighlightFragments(e,s){const t=s.highlights;if(null==t)return;let i=t[0].component,r=i+1;for(let o=1;o<t.length;o++){const s=t[o].component;if(s!==r){const t=r-i;t>0&&e.drawArrays(D.POINTS,i,t),i=s}r=s+1}const n=r-i;n>0&&e.drawArrays(D.POINTS,i,n)}set useFixedSizes(e){this._passParameters.useFixedSizes!==e&&(this._passParameters.useFixedSizes=e,this._requestRender())}get useFixedSizes(){return this._passParameters.useFixedSizes}set scaleFactor(e){this._passParameters.scaleFactor!==e&&(this._passParameters.scaleFactor=e,this._requestRender())}get scaleFactor(){return this._passParameters.scaleFactor}set minSizePx(e){this._passParameters.minSizePx!==e&&(this._passParameters.minSizePx=e,this._requestRender())}get minSizePx(){return this._passParameters.minSizePx}set useRealWorldSymbolSizes(e){this._passParameters.useRealWorldSymbolSizes!==e&&(this._passParameters.useRealWorldSymbolSizes=e,this._requestRender())}get useRealWorldSymbolSizes(){return this._passParameters.useRealWorldSymbolSizes}set size(e){this._passParameters.size!==e&&(this._passParameters.size=e,this._requestRender())}get size(){return this._passParameters.size}set sizePx(e){this._passParameters.sizePx!==e&&(this._passParameters.sizePx=e,this._requestRender())}get sizePx(){return this._passParameters.sizePx}set clippingBox(e){f(this._passParameters.clipBox,e||P)}get _clippingEnabled(){return!b(this._passParameters.clipBox,P,((e,s)=>e===s))}get slicePlaneEnabled(){return this._slicePlaneEnabled}set slicePlaneEnabled(e){this._slicePlaneEnabled!==e&&(this._slicePlaneEnabled=e,this._requestRender())}addNode(e){this._nodes.push(e),this._highlights.nodeAdded(e),this._requestRender()}removeNode(e){let t=null;return this._nodes.filterInPlace((i=>i.id!==e||(t=i,i.vao=s(i.vao),this._highlights.nodeRemoved(i),!1))),this._requestRender(),t}forEachNode(e){this._nodes.forAll(e)}removeAll(){this._nodes.forAll((e=>e.vao=s(e.vao))),this._highlights.removeAll(),this._nodes.clear(),this._requestRender()}highlight(e){return this._highlights.add(e)}_addHighlight(e,s,t){e.highlights=Z(e.highlights,s,t),this._requestRender()}_removeHighlight(e,s){e.highlights=$(e.highlights,s),this._requestRender()}_initNode(e,s){const t=e.rctx;s.vao=new v(t,q,W,{positions:M.createVertex(t,U.STATIC_DRAW,s.coordinates),colors:M.createVertex(t,U.STATIC_DRAW,s.rgb)})}_requestRender(){this._context&&this._context.requestRender()}};e([i({constructOnly:!0})],k.prototype,"createGraphic",void 0),k=e([r("esri.views.3d.layers.i3s.PointRenderer")],k);class G extends N{constructor(e,s,t,i,r,n,o,a,l=null,h=null){super(t,r,s),this.id=e,this.obb=i,this.coordinates=n,this.rgb=o,this.attributes=a,this.pointIdFilterMap=l,this.highlights=h}}function Q(e){return e.hasOwnProperty("splatSize")}function Y(e,s,t,i,r){if(t.drawScreenSpace)return t.fixedSize*s*i;const n=C(r)*s*i;return t.useFixedSizes?Math.min(t.fixedSize/2,n):t.screenMinSize>0?Math.min(Math.max(t.screenMinSize*s*i,e/2),n):Math.min(e/2,n)}function J(e,s,t,i,r){return t.drawScreenSpace?0:Y(e,s,t,i,r)}function K(e,s,t){return null==t&&(t=d()),t[0]=e.origin[0]+e.coordinates[3*s],t[1]=e.origin[1]+e.coordinates[3*s+1],t[2]=e.origin[2]+e.coordinates[3*s+2],t}function X(e){return null!=e.component?e.component:-1}function Z(e,s,t){null==e&&(e=[]);const i={component:s,id:t};e.push(i);const r=X(i);let n=e.length-1;for(;n>0&&r<X(e[n-1]);)[e[n-1],e[n]]=[e[n],e[n-1]],--n;return e}function $(e,s){if(null==e)return e;const t=e.filter((e=>e.id!==s));return 0===t.length?null:t}class ee{constructor(){this.node=null,this.pointId=null,this.point=null,this.dist=null,this.normal=null,this.layerUid=""}}function se(e){return null!=e.dist&&null!=e.point&&null!=e.pointId&&null!=e.node}export{k as PointRenderer,G as PointRendererNode,Q as isPointRendererNode};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../chunks/tslib.es6.js";import t from"../../../../core/Accessor.js";import{isSome as r}from"../../../../core/arrayUtils.js";import{estimateAttributesObjectSize as i,estimateFixedArraySize as a,estimateNumberByteSize as s}from"../../../../core/byteSizeEstimations.js";import{makeHandle as o}from"../../../../core/handleUtils.js";import"../../../../core/has.js";import n from"../../../../core/Logger.js";import{initial as l,sync as p,watch as d}from"../../../../core/reactiveUtils.js";import{pt2px as u}from"../../../../core/screenUtils.js";import{property as m}from"../../../../core/accessorSupport/decorators/property.js";import{subclass as h}from"../../../../core/accessorSupport/decorators/subclass.js";import{create as c}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{UpdatingHandles as y}from"../../../../core/support/UpdatingHandles.js";import{projectPointToVector as _}from"../../../../geometry/projection/projectPointToVector.js";import{getContinuousIndexArray as g}from"../../../../geometry/support/Indices.js";import{getResolutionForScale as f}from"../../../../geometry/support/scaleUtils.js";import{getObjectId as R}from"../../../../layers/graphics/dehydratedFeatures.js";import{convertFromPoint as F}from"../../../../layers/graphics/featureConversionUtils.js";import{OptimizedFeature as b}from"../../../../layers/graphics/OptimizedFeature.js";import v from"../../../../layers/graphics/OptimizedGeometry.js";import S from"../../../../layers/graphics/data/FeatureStore.js";import{isNumericField as w}from"../../../../layers/support/fieldUtils.js";import{generateGradient as P}from"../../../../renderers/support/heatmapUtils.js";import{DrapeSourceType as j}from"../interfaces.js";import{DisplayFeatureLimit as T}from"../graphics/DisplayFeatureLimit.js";import{GraphicsCorePerformanceInfo as V}from"../graphics/GraphicsCorePerformanceInfo.js";import{FeatureVisibilityFilter as G}from"./FeatureVisibilityFilter.js";import{drapedZ as x}from"../../terrain/OverlayRenderer.js";import{Attribute as I}from"../../webgl-engine/lib/Attribute.js";import{ContentObjectType as M}from"../../webgl-engine/lib/ContentObjectType.js";import{DrapedHeatmapRenderer as A}from"../../webgl-engine/lib/DrapedHeatmapRenderer.js";import{Geometry as N}from"../../webgl-engine/lib/Geometry.js";import{DirtyOperation as O,DirtyState as H}from"../../webgl-engine/lib/ModelDirtyTypes.js";import{RenderGeometry as U}from"../../webgl-engine/lib/RenderGeometry.js";import{UpdatePolicy as E}from"../../webgl-engine/lib/UpdatePolicy.js";import{VertexAttribute as L}from"../../webgl-engine/lib/VertexAttribute.js";import{HeatmapDensityMaterial as D}from"../../webgl-engine/materials/HeatmapDensityMaterial.js";import{scaleBoundsPredicate as C,isScaleRangeActive as B}from"../../../support/layerViewUtils.js";import{PixelType as W,PixelFormat as Z}from"../../../webgl/enums.js";import{loadHeatmapTextureConfiguration as z}from"../../../webgl/heatmapTextureUtils.js";const $=112;let q=class extends t{constructor(e){super(e),this.type="heatmap",this.preferredUpdatePolicy=E.ASYNC,this.dataExtent=null,this.drapeSourceType=j.Features,this._renderGeometries=new Map,this._fieldTotal=0,this._drapeSourceRenderer=null,this._dataType=W.HALF_FLOAT,this._pixelFormat=Z.RGBA,this._updatingHandles=new y,this.initializePromise=Promise.resolve()}initialize(){this._featureStore=new S({geometryType:"esriGeometryPoint",hasZ:this.hasZ,hasM:this.hasM});const{dataType:e,samplingMode:t,pixelFormat:r,internalFormat:i}=z(this._renderView.renderingContext,n.getLogger(this));this._dataType=e,this._pixelFormat=r;const a=e!==W.FLOAT;this._drapeSourceRenderer=this.view.basemapTerrain.overlayManager.registerDrapeSource(this,A,{...this._rendererParameters,dataType:e,samplingMode:t,pixelFormat:r,internalFormat:i}),this._material=new D({usesHalfFloats:a}),this._materialWithField=new D({usesHalfFloats:a,isAttributeDriven:!0}),this._filterVisibility=new G({context:{configuration:this.owner,featureStore:this.featureStore,getFeatureCount:()=>this._loadedPointGraphics.length,setAllFeaturesVisibility:e=>this._setAllFeaturesVisibility(e),clearFeaturesVisibility:()=>this._setAllFeaturesVisibility(!0),updateFeatureVisibilities:e=>this._updateFeatureVisibilities(e)}}),this._updatingHandles.addOnCollectionChange((()=>this._loadedPointGraphics),(e=>this._onLoadedFeaturesChange(e)),l),this._updatingHandles.addWhen((()=>this._materialParameters),(e=>this._forEachMaterial((t=>t.setParameters(e)))),l),this._updatingHandles.add((()=>this._rendererParameters),(e=>this._drapeSourceRenderer.set(e))),this._updatingHandles.add((()=>this._heatmapRendererField),(()=>{this._recreate()}),p),this._updatingHandles.add((()=>({fieldName:this._heatmapRendererFieldName,numeric:this._heatmapRendererFieldIsNumeric})),(({fieldName:e,numeric:t})=>{if(null!=e&&t){let t=0;this._featureStore.forEach((r=>t+=r.attributes[e]??0)),this._fieldTotal=t}else this._fieldTotal=this._featureStore.numFeatures}),l),this.addHandles([d((()=>({fieldName:this._heatmapRendererFieldName,field:this._heatmapRendererField})),(({fieldName:e,field:t})=>{e&&!t&&n.getLogger(this).warn(`Heatmap renderer field '${e}' for layer '${this.layer.title??this.layer.id}' not found`)})),d((()=>({field:this._heatmapRendererField,numeric:this._heatmapRendererFieldIsNumeric})),(({field:e,numeric:t})=>{null==e||t||n.getLogger(this).warn(`Heatmap renderer field '${e.name}' for layer '${this.layer.title??this.layer.id}' does not contain numeric values and cannot be used to drive the heatmap density`)})),o((()=>this.view.basemapTerrain.overlayManager.unregisterDrapeSource(this)))])}destroy(){this._renderGeometries.clear(),this._material=null,this._materialWithField=null,this._featureStore.clear(),this._featureStore=null,this._updatingHandles.destroy()}get layer(){return this.owner.layer}get featureStore(){return this._featureStore}get updating(){return this._updatingHandles.updating||this.filterVisibility.updating}get updatingRemaining(){return 0}get suspendInfo(){return{}}get legendEnabled(){return!0}get filterVisibility(){return this._filterVisibility}get displayFeatureLimit(){const e=this.owner?.view?.quality??1,t=this.owner?.view?.qualitySettings,r=t?Math.ceil(t.heatmap.maxTotalNumberOfFeatures*e):0;return new T(r*6,r)}get hasZ(){return"hasZ"in this.layer&&this.layer.hasZ}get hasM(){return"hasM"in this.layer&&this.layer.hasM}get view(){return this.owner.view}get fullOpacity(){return this.owner.fullOpacity}get updatePolicy(){return this.owner.updatePolicy}get scaleVisibilitySuspended(){if(!this._isScaleRangeActive)return!1;const{minScale:e,maxScale:t}=this.layer.effectiveScaleRange,{scale:r}=this.view;return!C(r,e??0,t??0)}get usedMemory(){const e=this.usedMemoryPerFeature*this._featureStore.numFeatures,t=this._pixelFormat===Z.RED?1:4,r=this._dataType===W.FLOAT?4:2,i=Math.ceil((this._overlayRenderer?.overlays[0]?.resolution??0)*this._densityMapPixelRatio)??0;return i*i*t*r+e}get usedMemoryPerFeature(){const e=this._loadedPointGraphics.find((()=>!0));if(null==e)return 0;const t=i(e),r=s(),o=6;return o*a([0,0,0],r)+o*a([0,0],r)+(this._heatmapRendererFieldIsNumeric?o*r:0)+t}get loadedFeatures(){return this._featureStore.numFeatures}get unprocessedMemoryEstimate(){return 0}get performanceInfo(){return new V(this._visibleFeatures,0,0)}get renderer(){return this._heatmapRenderer}get _overlayRenderer(){return this.view.basemapTerrain.overlayManager.renderer}get _overlaySpatialReference(){return this._overlayRenderer.spatialReference}get _rendererParameters(){return{...this._radiusParameter,...this._densityParameters,...this._colorRampParameter,...this._pixelRatioParameter}}get _materialParameters(){return{...this._radiusParameter,...this._resolutionForScaleParameter}}get _densityParameters(){const e=this._heatmapRenderer;if(null==e)return null;const{minDensity:t,maxDensity:r}=e;return{minDensity:t,maxDensity:r,fieldTotal:this._fieldTotal}}get _radiusParameter(){const e=this._heatmapRenderer;return e?{searchRadius:u(this._clampSearchRadius(e.radius))}:null}get _resolutionForScaleParameter(){const e=this._heatmapRenderer;if(!e)return null;const{referenceScale:t}=e;return{resolutionForScale:0===t?0:f(t,this.view.spatialReference)}}get _colorRampParameter(){const e=this._heatmapRenderer;return e?{colorRampData:P(e.colorStops)}:null}get _pixelRatioParameter(){return{pixelRatio:this._densityMapPixelRatio}}get _densityMapPixelRatio(){return this.owner?.view?.qualitySettings.heatmap.pixelRatio??1}get _renderView(){return this.view._stage.renderView}get _featuresArePoints(){return"point"===this.layer.geometryType}get _loadedPointGraphics(){return this.owner.loadedGraphics}get _heatmapRenderer(){const e=this.layer.renderer;return"heatmap"===e?.type?e:null}get _heatmapRendererFieldName(){return this._heatmapRenderer?.field}get _heatmapRendererField(){const e=this._heatmapRendererFieldName;return null!=e?this.layer.fieldsIndex.get(e):null}get _heatmapRendererFieldIsNumeric(){const e=this._heatmapRendererField;return null!=e&&w(e)}get _isScaleRangeActive(){const{layer:e}=this;if(!("effectiveScaleRange"in e))return!1;const{minScale:t,maxScale:r}=e.effectiveScaleRange;return B(t,r)}get _visibleFeatures(){let e=0;return this._renderGeometries.forEach((t=>{t.visible&&++e})),e}async whenGraphicBounds(){return null}computeAttachmentOrigin(){return null}highlight(){return o()}maskOccludee(){return o()}setObjectIdVisibility(){}refreshFilter(){this.filterVisibility.reapply()}_onLoadedFeaturesChange(e){if(!this._featuresArePoints)return;const{objectIdField:t}=this.layer;this._featureStore.removeManyById(e.removed.map((e=>R(e,t)))),this._featureStore.addMany(e.added.map((e=>{const{attributes:r,centroid:i,geometry:a}=e,s=new b(F(new v,a),r,i?F(new v,i):null,R(e,t));return s.displayId=e.uid,s})));const i=e.added,a=e.removed;this._fieldTotal+=this._computeFieldTotalChange(i,a);const s=a.map((({uid:e})=>{const t=this._renderGeometries.get(e);return this._renderGeometries.delete(e),t})).filter(r),o=i.map((e=>{const t=this._pointGraphicToRenderGeometry(e);return this._renderGeometries.set(e.uid,t),t}));s.length>0&&this._drapeSourceRenderer.removeGeometries(s,O.REMOVE),o.length>0&&this._drapeSourceRenderer.addGeometries(o,O.ADD),(o.length>0||s.length>0)&&(this.filterVisibility.reapply(),this._renderView.requestRender())}_recreate(){if(!this._loadedPointGraphics)return;const e=this._loadedPointGraphics.toArray();this._onLoadedFeaturesChange({added:e,removed:e})}_pointGraphicToRenderGeometry(e){const t=this._heatmapRendererFieldName,r=null!=t?this._materialWithField:this._material,i=c();_(e.geometry,i,this._overlaySpatialReference),i[2]=x;const a=g(1),s=[[L.POSITION,new I(i,a,i.length)]],o=this._heatmapRendererFieldIsNumeric;null!=t&&s.push([L.FEATUREATTRIBUTE,new I([o?e.attributes[t]??0:0],a,1)]);const n=new U(new N(r,s,null,M.Point),{layerUid:this.layer.uid,graphicUid:e.uid});return n.visible=this.filterVisibility.defaultVisibility,n}_forEachMaterial(e){e(this._material),e(this._materialWithField)}_computeFieldTotalChange(e,t){if(null==this._heatmapRendererFieldName||!this._heatmapRendererFieldIsNumeric)return e.length-t.length;const r=this._heatmapRendererFieldName,i=(e,t)=>e+(t.attributes[r]??0);return e.reduce(i,0)-t.reduce(i,0)}_clampSearchRadius(e){return e>$&&n.getLogger(this).warnOnce(`SceneView supports a maximum radius of ${$} pt for HeatmapRenderer.`),Math.min(e,$)}_updateFeatureVisibilities(e){const t=[];this._featureStore.forEach((({objectId:r,displayId:i})=>{const a=e(r),s=this._renderGeometries.get(i);s&&s.visible!==a&&(t.push(s),s.visible=a)})),this._drapeSourceRenderer.modifyGeometries(t,H.VISIBILITY)}_setAllFeaturesVisibility(e){const t=[];for(const r of this._renderGeometries.values())r.visible!==e&&(t.push(r),r.visible=e);this._drapeSourceRenderer.modifyGeometries(t,H.VISIBILITY)}get test(){}};e([m()],q.prototype,"type",void 0),e([m({constructOnly:!0})],q.prototype,"owner",void 0),e([m()],q.prototype,"layer",null),e([m()],q.prototype,"featureStore",null),e([m()],q.prototype,"updating",null),e([m()],q.prototype,"updatingRemaining",null),e([m()],q.prototype,"suspendInfo",null),e([m()],q.prototype,"legendEnabled",null),e([m()],q.prototype,"filterVisibility",null),e([m()],q.prototype,"displayFeatureLimit",null),e([m()],q.prototype,"preferredUpdatePolicy",void 0),e([m()],q.prototype,"hasZ",null),e([m()],q.prototype,"hasM",null),e([m()],q.prototype,"dataExtent",void 0),e([m()],q.prototype,"view",null),e([m()],q.prototype,"fullOpacity",null),e([m()],q.prototype,"updatePolicy",null),e([m()],q.prototype,"drapeSourceType",void 0),e([m()],q.prototype,"scaleVisibilitySuspended",null),e([m()],q.prototype,"renderer",null),e([m()],q.prototype,"_featureStore",void 0),e([m()],q.prototype,"_filterVisibility",void 0),e([m()],q.prototype,"_overlayRenderer",null),e([m()],q.prototype,"_overlaySpatialReference",null),e([m()],q.prototype,"_rendererParameters",null),e([m()],q.prototype,"_materialParameters",null),e([m()],q.prototype,"_densityParameters",null),e([m()],q.prototype,"_radiusParameter",null),e([m()],q.prototype,"_resolutionForScaleParameter",null),e([m()],q.prototype,"_colorRampParameter",null),e([m()],q.prototype,"_pixelRatioParameter",null),e([m()],q.prototype,"_densityMapPixelRatio",null),e([m()],q.prototype,"_renderGeometries",void 0),e([m()],q.prototype,"_material",void 0),e([m()],q.prototype,"_materialWithField",void 0),e([m()],q.prototype,"_renderView",null),e([m()],q.prototype,"_featuresArePoints",null),e([m()],q.prototype,"_loadedPointGraphics",null),e([m()],q.prototype,"_heatmapRenderer",null),e([m()],q.prototype,"_heatmapRendererFieldName",null),e([m()],q.prototype,"_heatmapRendererField",null),e([m()],q.prototype,"_heatmapRendererFieldIsNumeric",null),e([m()],q.prototype,"_fieldTotal",void 0),e([m()],q.prototype,"_drapeSourceRenderer",void 0),e([m()],q.prototype,"_isScaleRangeActive",null),q=e([h("esri.views.3d.layers.support.HeatmapFeatureProcessor")],q);export{q as HeatmapFeatureProcessor,$ as maxRadiusPt};
5
+ import{_ as e}from"../../../../chunks/tslib.es6.js";import{isSome as t}from"../../../../core/arrayUtils.js";import{estimateAttributesObjectSize as r,estimateFixedArraySize as i,estimateNumberByteSize as a}from"../../../../core/byteSizeEstimations.js";import{makeHandle as s}from"../../../../core/handleUtils.js";import"../../../../core/has.js";import o from"../../../../core/Logger.js";import{EsriPromise as n}from"../../../../core/Promise.js";import{initial as l,sync as p,watch as d}from"../../../../core/reactiveUtils.js";import{pt2px as u}from"../../../../core/screenUtils.js";import{property as m}from"../../../../core/accessorSupport/decorators/property.js";import{subclass as h}from"../../../../core/accessorSupport/decorators/subclass.js";import{create as c}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{UpdatingHandles as y}from"../../../../core/support/UpdatingHandles.js";import{projectPointToVector as _}from"../../../../geometry/projection/projectPointToVector.js";import{getContinuousIndexArray as g}from"../../../../geometry/support/Indices.js";import{getResolutionForScale as f}from"../../../../geometry/support/scaleUtils.js";import{getObjectId as R}from"../../../../layers/graphics/dehydratedFeatures.js";import{convertFromPoint as F}from"../../../../layers/graphics/featureConversionUtils.js";import{OptimizedFeature as b}from"../../../../layers/graphics/OptimizedFeature.js";import v from"../../../../layers/graphics/OptimizedGeometry.js";import S from"../../../../layers/graphics/data/FeatureStore.js";import{isNumericField as w}from"../../../../layers/support/fieldUtils.js";import{generateGradient as P}from"../../../../renderers/support/heatmapUtils.js";import{DrapeSourceType as j}from"../interfaces.js";import{DisplayFeatureLimit as T}from"../graphics/DisplayFeatureLimit.js";import{GraphicsCorePerformanceInfo as V}from"../graphics/GraphicsCorePerformanceInfo.js";import{FeatureVisibilityFilter as G}from"./FeatureVisibilityFilter.js";import{drapedZ as x}from"../../terrain/OverlayRenderer.js";import{Attribute as I}from"../../webgl-engine/lib/Attribute.js";import{ContentObjectType as M}from"../../webgl-engine/lib/ContentObjectType.js";import{DrapedHeatmapRenderer as A}from"../../webgl-engine/lib/DrapedHeatmapRenderer.js";import{Geometry as N}from"../../webgl-engine/lib/Geometry.js";import{DirtyOperation as O,DirtyState as H}from"../../webgl-engine/lib/ModelDirtyTypes.js";import{RenderGeometry as U}from"../../webgl-engine/lib/RenderGeometry.js";import{UpdatePolicy as E}from"../../webgl-engine/lib/UpdatePolicy.js";import{VertexAttribute as L}from"../../webgl-engine/lib/VertexAttribute.js";import{HeatmapDensityMaterial as D}from"../../webgl-engine/materials/HeatmapDensityMaterial.js";import{scaleBoundsPredicate as C,isScaleRangeActive as B}from"../../../support/layerViewUtils.js";import{PixelType as W,PixelFormat as Z}from"../../../webgl/enums.js";import{loadHeatmapTextureConfiguration as $,fallBackHeatmapConfiguration as q}from"../../../webgl/heatmapTextureUtils.js";const z=112;let Y=class extends n{constructor(e){super(e),this.type="heatmap",this.preferredUpdatePolicy=E.ASYNC,this.dataExtent=null,this.drapeSourceType=j.Features,this._renderGeometries=new Map,this._fieldTotal=0,this._drapeSourceRenderer=null,this._dataType=W.HALF_FLOAT,this._pixelFormat=Z.RGBA,this._updatingHandles=new y}initialize(){let e;try{e=$(this._renderView.renderingContext,o.getLogger(this))}catch(u){this.addResolvingPromise(Promise.reject(u)),e=q}const{dataType:t,samplingMode:r,pixelFormat:i,internalFormat:a}=e;this._featureStore=new S({geometryType:"esriGeometryPoint",hasZ:this.hasZ,hasM:this.hasM}),this._dataType=t,this._pixelFormat=i;const n=t!==W.FLOAT;this._drapeSourceRenderer=this.view.basemapTerrain.overlayManager.registerDrapeSource(this,A,{...this._rendererParameters,dataType:t,samplingMode:r,pixelFormat:i,internalFormat:a}),this._material=new D({usesHalfFloats:n}),this._materialWithField=new D({usesHalfFloats:n,isAttributeDriven:!0}),this._filterVisibility=new G({context:{configuration:this.owner,featureStore:this.featureStore,getFeatureCount:()=>this._loadedPointGraphics.length,setAllFeaturesVisibility:e=>this._setAllFeaturesVisibility(e),clearFeaturesVisibility:()=>this._setAllFeaturesVisibility(!0),updateFeatureVisibilities:e=>this._updateFeatureVisibilities(e)}}),this._updatingHandles.addOnCollectionChange((()=>this._loadedPointGraphics),(e=>this._onLoadedFeaturesChange(e)),l),this._updatingHandles.addWhen((()=>this._materialParameters),(e=>this._forEachMaterial((t=>t.setParameters(e)))),l),this._updatingHandles.add((()=>this._rendererParameters),(e=>this._drapeSourceRenderer.set(e))),this._updatingHandles.add((()=>this._heatmapRendererField),(()=>{this._recreate()}),p),this._updatingHandles.add((()=>({fieldName:this._heatmapRendererFieldName,numeric:this._heatmapRendererFieldIsNumeric})),(({fieldName:e,numeric:t})=>{if(null!=e&&t){let t=0;this._featureStore.forEach((r=>t+=r.attributes[e]??0)),this._fieldTotal=t}else this._fieldTotal=this._featureStore.numFeatures}),l),this.addHandles([d((()=>({fieldName:this._heatmapRendererFieldName,field:this._heatmapRendererField})),(({fieldName:e,field:t})=>{e&&!t&&o.getLogger(this).warn(`Heatmap renderer field '${e}' for layer '${this.layer.title??this.layer.id}' not found`)})),d((()=>({field:this._heatmapRendererField,numeric:this._heatmapRendererFieldIsNumeric})),(({field:e,numeric:t})=>{null==e||t||o.getLogger(this).warn(`Heatmap renderer field '${e.name}' for layer '${this.layer.title??this.layer.id}' does not contain numeric values and cannot be used to drive the heatmap density`)})),s((()=>this.view.basemapTerrain.overlayManager.unregisterDrapeSource(this)))])}destroy(){this._renderGeometries.clear(),this._material=null,this._materialWithField=null,this._featureStore.clear(),this._featureStore=null,this._updatingHandles.destroy()}get layer(){return this.owner.layer}get featureStore(){return this._featureStore}get updating(){return this._updatingHandles.updating||this.filterVisibility.updating}get updatingRemaining(){return 0}get suspendInfo(){return{}}get legendEnabled(){return!0}get filterVisibility(){return this._filterVisibility}get displayFeatureLimit(){const e=this.owner?.view?.quality??1,t=this.owner?.view?.qualitySettings,r=t?Math.ceil(t.heatmap.maxTotalNumberOfFeatures*e):0;return new T(r*6,r)}get hasZ(){return"hasZ"in this.layer&&this.layer.hasZ}get hasM(){return"hasM"in this.layer&&this.layer.hasM}get view(){return this.owner.view}get fullOpacity(){return this.owner.fullOpacity}get updatePolicy(){return this.owner.updatePolicy}get scaleVisibilitySuspended(){if(!this._isScaleRangeActive)return!1;const{minScale:e,maxScale:t}=this.layer.effectiveScaleRange,{scale:r}=this.view;return!C(r,e??0,t??0)}get usedMemory(){const e=this.usedMemoryPerFeature*this._featureStore.numFeatures,t=this._pixelFormat===Z.RED?1:4,r=this._dataType===W.FLOAT?4:2,i=Math.ceil((this._overlayRenderer?.overlays[0]?.resolution??0)*this._densityMapPixelRatio)??0;return i*i*t*r+e}get usedMemoryPerFeature(){const e=this._loadedPointGraphics.find((()=>!0));if(null==e)return 0;const t=r(e),s=a(),o=6;return o*i([0,0,0],s)+o*i([0,0],s)+(this._heatmapRendererFieldIsNumeric?o*s:0)+t}get loadedFeatures(){return this._featureStore.numFeatures}get unprocessedMemoryEstimate(){return 0}get performanceInfo(){return new V(this._visibleFeatures,0,0)}get renderer(){return this._heatmapRenderer}get _overlayRenderer(){return this.view.basemapTerrain.overlayManager.renderer}get _overlaySpatialReference(){return this._overlayRenderer.spatialReference}get _rendererParameters(){return{...this._radiusParameter,...this._densityParameters,...this._colorRampParameter,...this._pixelRatioParameter}}get _materialParameters(){return{...this._radiusParameter,...this._resolutionForScaleParameter}}get _densityParameters(){const e=this._heatmapRenderer;if(null==e)return null;const{minDensity:t,maxDensity:r}=e;return{minDensity:t,maxDensity:r,fieldTotal:this._fieldTotal}}get _radiusParameter(){const e=this._heatmapRenderer;return e?{searchRadius:u(this._clampSearchRadius(e.radius))}:null}get _resolutionForScaleParameter(){const e=this._heatmapRenderer;if(!e)return null;const{referenceScale:t}=e;return{resolutionForScale:0===t?0:f(t,this.view.spatialReference)}}get _colorRampParameter(){const e=this._heatmapRenderer;return e?{colorRampData:P(e.colorStops)}:null}get _pixelRatioParameter(){return{pixelRatio:this._densityMapPixelRatio}}get _densityMapPixelRatio(){return this.owner?.view?.qualitySettings.heatmap.pixelRatio??1}get _renderView(){return this.view._stage.renderView}get _featuresArePoints(){return"point"===this.layer.geometryType}get _loadedPointGraphics(){return this.owner.loadedGraphics}get _heatmapRenderer(){const e=this.layer.renderer;return"heatmap"===e?.type?e:null}get _heatmapRendererFieldName(){return this._heatmapRenderer?.field}get _heatmapRendererField(){const e=this._heatmapRendererFieldName;return null!=e?this.layer.fieldsIndex.get(e):null}get _heatmapRendererFieldIsNumeric(){const e=this._heatmapRendererField;return null!=e&&w(e)}get _isScaleRangeActive(){const{layer:e}=this;if(!("effectiveScaleRange"in e))return!1;const{minScale:t,maxScale:r}=e.effectiveScaleRange;return B(t,r)}get _visibleFeatures(){let e=0;return this._renderGeometries.forEach((t=>{t.visible&&++e})),e}async whenGraphicBounds(){return null}computeAttachmentOrigin(){return null}highlight(){return s()}maskOccludee(){return s()}setObjectIdVisibility(){}refreshFilter(){this.filterVisibility.reapply()}_onLoadedFeaturesChange(e){if(!this._featuresArePoints)return;const{objectIdField:r}=this.layer;this._featureStore.removeManyById(e.removed.map((e=>R(e,r)))),this._featureStore.addMany(e.added.map((e=>{const{attributes:t,centroid:i,geometry:a}=e,s=new b(F(new v,a),t,i?F(new v,i):null,R(e,r));return s.displayId=e.uid,s})));const i=e.added,a=e.removed;this._fieldTotal+=this._computeFieldTotalChange(i,a);const s=a.map((({uid:e})=>{const t=this._renderGeometries.get(e);return this._renderGeometries.delete(e),t})).filter(t),o=i.map((e=>{const t=this._pointGraphicToRenderGeometry(e);return this._renderGeometries.set(e.uid,t),t}));s.length>0&&this._drapeSourceRenderer.removeGeometries(s,O.REMOVE),o.length>0&&this._drapeSourceRenderer.addGeometries(o,O.ADD),(o.length>0||s.length>0)&&(this.filterVisibility.reapply(),this._renderView.requestRender())}_recreate(){if(!this._loadedPointGraphics)return;const e=this._loadedPointGraphics.toArray();this._onLoadedFeaturesChange({added:e,removed:e})}_pointGraphicToRenderGeometry(e){const t=this._heatmapRendererFieldName,r=null!=t?this._materialWithField:this._material,i=c();_(e.geometry,i,this._overlaySpatialReference),i[2]=x;const a=g(1),s=[[L.POSITION,new I(i,a,i.length)]],o=this._heatmapRendererFieldIsNumeric;null!=t&&s.push([L.FEATUREATTRIBUTE,new I([o?e.attributes[t]??0:0],a,1)]);const n=new U(new N(r,s,null,M.Point),{layerUid:this.layer.uid,graphicUid:e.uid});return n.visible=this.filterVisibility.defaultVisibility,n}_forEachMaterial(e){e(this._material),e(this._materialWithField)}_computeFieldTotalChange(e,t){if(null==this._heatmapRendererFieldName||!this._heatmapRendererFieldIsNumeric)return e.length-t.length;const r=this._heatmapRendererFieldName,i=(e,t)=>e+(t.attributes[r]??0);return e.reduce(i,0)-t.reduce(i,0)}_clampSearchRadius(e){return e>z&&o.getLogger(this).warnOnce(`SceneView supports a maximum radius of ${z} pt for HeatmapRenderer.`),Math.min(e,z)}_updateFeatureVisibilities(e){const t=[];this._featureStore.forEach((({objectId:r,displayId:i})=>{const a=e(r),s=this._renderGeometries.get(i);s&&s.visible!==a&&(t.push(s),s.visible=a)})),this._drapeSourceRenderer.modifyGeometries(t,H.VISIBILITY)}_setAllFeaturesVisibility(e){const t=[];for(const r of this._renderGeometries.values())r.visible!==e&&(t.push(r),r.visible=e);this._drapeSourceRenderer.modifyGeometries(t,H.VISIBILITY)}get test(){}};e([m()],Y.prototype,"type",void 0),e([m({constructOnly:!0})],Y.prototype,"owner",void 0),e([m()],Y.prototype,"layer",null),e([m()],Y.prototype,"featureStore",null),e([m()],Y.prototype,"updating",null),e([m()],Y.prototype,"updatingRemaining",null),e([m()],Y.prototype,"suspendInfo",null),e([m()],Y.prototype,"legendEnabled",null),e([m()],Y.prototype,"filterVisibility",null),e([m()],Y.prototype,"displayFeatureLimit",null),e([m()],Y.prototype,"preferredUpdatePolicy",void 0),e([m()],Y.prototype,"hasZ",null),e([m()],Y.prototype,"hasM",null),e([m()],Y.prototype,"dataExtent",void 0),e([m()],Y.prototype,"view",null),e([m()],Y.prototype,"fullOpacity",null),e([m()],Y.prototype,"updatePolicy",null),e([m()],Y.prototype,"drapeSourceType",void 0),e([m()],Y.prototype,"scaleVisibilitySuspended",null),e([m()],Y.prototype,"renderer",null),e([m()],Y.prototype,"_featureStore",void 0),e([m()],Y.prototype,"_filterVisibility",void 0),e([m()],Y.prototype,"_overlayRenderer",null),e([m()],Y.prototype,"_overlaySpatialReference",null),e([m()],Y.prototype,"_rendererParameters",null),e([m()],Y.prototype,"_materialParameters",null),e([m()],Y.prototype,"_densityParameters",null),e([m()],Y.prototype,"_radiusParameter",null),e([m()],Y.prototype,"_resolutionForScaleParameter",null),e([m()],Y.prototype,"_colorRampParameter",null),e([m()],Y.prototype,"_pixelRatioParameter",null),e([m()],Y.prototype,"_densityMapPixelRatio",null),e([m()],Y.prototype,"_renderGeometries",void 0),e([m()],Y.prototype,"_material",void 0),e([m()],Y.prototype,"_materialWithField",void 0),e([m()],Y.prototype,"_renderView",null),e([m()],Y.prototype,"_featuresArePoints",null),e([m()],Y.prototype,"_loadedPointGraphics",null),e([m()],Y.prototype,"_heatmapRenderer",null),e([m()],Y.prototype,"_heatmapRendererFieldName",null),e([m()],Y.prototype,"_heatmapRendererField",null),e([m()],Y.prototype,"_heatmapRendererFieldIsNumeric",null),e([m()],Y.prototype,"_fieldTotal",void 0),e([m()],Y.prototype,"_drapeSourceRenderer",void 0),e([m()],Y.prototype,"_isScaleRangeActive",null),Y=e([h("esri.views.3d.layers.support.HeatmapFeatureProcessor")],Y);export{Y as HeatmapFeatureProcessor,z as maxRadiusPt};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
4
  */
5
- import{project as e}from"../../../../geometry/support/webMercatorUtils.js";import{projectGeometry as r}from"../../../../portal/support/geometryServiceUtils.js";function l(l){const t=l.view.spatialReference,o=l.layer.fullExtent,s=null!=o&&o.spatialReference;if(null==o||!s)return Promise.resolve(null);if(s.equals(t))return Promise.resolve(o.clone());const n=e(o,t);return null!=n?Promise.resolve(n):l.view.state.isLocal?r(o,t,l.layer.portalItem).then((e=>!l.destroyed&&e?e:null)).catch((()=>null)):Promise.resolve(null)}export{l as toViewIfLocal};
5
+ import{project as e}from"../../../../geometry/support/webMercatorUtils.js";import{projectGeometry as t}from"../../../../portal/support/geometryServiceUtils.js";async function r(r){const l=r.view.spatialReference,n=r.layer.fullExtent,o=null!=n&&n.spatialReference;if(null==n||!o)return null;if(o.equals(l))return n.clone();const u=e(n,l);if(null!=u)return u;if(r.view.state.isLocal)try{const e=await t(n,l,r.layer.portalItem);return r.destroyed||null==e?null:e}catch{return null}return null}export{r as toViewIfLocal};