@arcgis/core 5.1.0-next.84 → 5.1.0-next.86
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.
- package/assets/components/assets/icon/gpsReceiver16.json +1 -0
- package/assets/components/assets/icon/gpsReceiver24.json +1 -0
- package/assets/components/assets/icon/gpsReceiver32.json +1 -0
- package/assets/components/assets/icon/totalStation16.json +1 -0
- package/assets/components/assets/icon/totalStation24.json +1 -0
- package/assets/components/assets/icon/totalStation32.json +1 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{e89dc473f46a5584d2ef.js → 004af103a94d21cb4889.js} +3 -3
- package/assets/esri/core/workers/chunks/{67abbe81c16de26f61d8.js → 1bad4331a43169f3cc34.js} +1 -1
- package/assets/esri/core/workers/chunks/27f67a3828b78d4c1413.js +1 -0
- package/assets/esri/core/workers/chunks/2c916b93d8a6e6b9c0d7.js +1 -0
- package/assets/esri/core/workers/chunks/{db86a1119e4e58ecfbda.js → 2f8b173d1dac73ba0d9e.js} +1 -1
- package/assets/esri/core/workers/chunks/49e8144effc299dfcd66.js +1 -0
- package/assets/esri/core/workers/chunks/5166f204fd078dced5db.js +1 -0
- package/assets/esri/core/workers/chunks/{45c83eb7c2a06166e3b0.js → 56717ff315c6ec874142.js} +1 -1
- package/assets/esri/core/workers/chunks/577cbc131b21c351fae5.js +2 -0
- package/assets/esri/core/workers/chunks/{72691fe14024e35f85d0.js → 618106f5fbdf88ef2278.js} +1 -1
- package/assets/esri/core/workers/chunks/61fada8942b65fa0b5e1.js +1 -0
- package/assets/esri/core/workers/chunks/{05c5f68e117fc58ae801.js → 701b823763e941b71f4f.js} +1 -1
- package/assets/esri/core/workers/chunks/{1e2c0c6d724f7639d4c1.js → 713ab619060bd5087479.js} +13 -13
- package/assets/esri/core/workers/chunks/{a9b5ce00323cd5574bf7.js → 7160e3e7340beb7fdb42.js} +1 -1
- package/assets/esri/core/workers/chunks/{0219edb509e01270d42d.js → 99c6bd2125f4eb6796fe.js} +1 -1
- package/assets/esri/core/workers/chunks/{ff713926985a284f5d81.js → a844547bf33a8527ee9f.js} +2 -2
- package/assets/esri/core/workers/chunks/aa6808146c76b2d49b64.js +1 -0
- package/assets/esri/core/workers/chunks/{9cac70164d8528c283af.js → add000f51c778114c028.js} +1 -1
- package/assets/esri/core/workers/chunks/b23e677c33db6f9bac8a.js +1 -0
- package/assets/esri/core/workers/chunks/{dfe1139124fda0d6c059.js → b575292013bceef9b015.js} +1 -1
- package/assets/esri/core/workers/chunks/bae8f2a5dfe0cfbc0688.js +1 -0
- package/assets/esri/core/workers/chunks/bb5f909a2f26fc6a21b0.js +2 -0
- package/assets/esri/core/workers/chunks/{28a45bd26eb5c9b3ec7c.js → ce66c551b7083913eee5.js} +1 -1
- package/assets/esri/core/workers/chunks/{22bdea4ca52970c29504.js → d0aee7c80c5c7e23d216.js} +1 -1
- package/assets/esri/core/workers/chunks/{f4220b6eab0865318033.js → d8de7fe49dba9ed589df.js} +1 -1
- package/assets/esri/core/workers/chunks/ded2f19a1685db2137f4.js +2 -0
- package/assets/esri/core/workers/chunks/{f77d23ee60c876b01e4b.js → e9a42f0262fc44a79d4b.js} +1 -1
- package/assets/esri/core/workers/chunks/edbdee69440dbfc05644.js +1 -0
- package/assets/esri/core/workers/chunks/ee057c85cdf6beb5b012.js +2 -0
- package/assets/esri/core/workers/chunks/f9fe3c9867b0bdb2aec6.js +596 -0
- package/assets/esri/core/workers/chunks/ff57a071156d8a7e47be.js +1 -0
- package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
- package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
- package/assets/esri/themes/base/widgets/_BatchAttributeForm.scss +6 -0
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_en.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ar.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_bg.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_bs.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ca.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_cs.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_da.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_de.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_el.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_es.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_et.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_fi.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_fr.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_he.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_hr.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_hu.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_id.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_it.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ja.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ko.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_lt.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_lv.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_nl.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_no.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pl.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pt-BR.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pt-PT.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ro.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ru.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sk.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sl.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sr.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sv.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_th.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_tr.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_uk.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_vi.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-CN.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-HK.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-TW.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ar.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bg.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bs.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ca.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_cs.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_da.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_de.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_el.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_es.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_et.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fi.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fr.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_he.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hr.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hu.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_id.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_it.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ja.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ko.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lt.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lv.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_nl.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_no.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pl.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-BR.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-PT.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ro.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ru.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sk.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sl.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sr.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sv.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_th.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_tr.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_uk.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_vi.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-CN.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-HK.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-TW.json +1 -1
- package/chunks/EdgeShader.glsl.js +13 -9
- package/chunks/Fog.glsl.js +1 -1
- package/chunks/GlowBlur.glsl.js +9 -13
- package/chunks/GlowComposition.glsl.js +10 -10
- package/chunks/ShadowCastVisualize.glsl.js +10 -10
- package/config.js +1 -1
- package/core/arrayUtils.js +1 -1
- package/core/has.js +1 -1
- package/core/screenUtils.js +1 -1
- package/form/types.d.ts +1 -1
- package/geohash/GeohashCell.js +1 -1
- package/geohash/GeohashTree.js +1 -1
- package/interfaces.d.ts +14 -14
- package/kernel.js +1 -1
- package/layers/Lyr3DWasmPerSceneView.js +1 -1
- package/layers/ParquetLayer.d.ts +10 -10
- package/layers/ParquetLayer.js +1 -1
- package/layers/StreamLayer.js +1 -1
- package/layers/graphics/sources/connections/FabricKustoConnection.js +2 -0
- package/layers/graphics/sources/connections/GeoEventConnection.js +1 -1
- package/layers/graphics/sources/connections/WebSocketConnection.js +1 -1
- package/layers/graphics/sources/connections/createConnection.js +1 -1
- package/layers/graphics/sources/connections/websocketUils.js +2 -0
- package/layers/scene/ModelFileInfo.js +1 -1
- package/layers/scene/modelQuerySupport.js +1 -1
- package/layers/support/ClientSideConnection.js +1 -1
- package/layers/support/FabricKustoSource.js +2 -0
- package/layers/support/{ParquetGeometryEncodingLocation.d.ts → GeometryEncodingLocation.d.ts} +9 -9
- package/layers/support/{ParquetGeometryEncodingLocation.js → GeometryEncodingLocation.js} +1 -1
- package/layers/support/{ParquetGeometryEncodingWkb.d.ts → GeometryEncodingWkb.d.ts} +8 -9
- package/layers/support/GeometryEncodingWkb.js +2 -0
- package/layers/support/kustoUtils.js +2 -0
- package/layers/support/parquetEncodingUtils.js +1 -1
- package/layers/support/parquetUtils.js +1 -1
- package/layers/support/types.d.ts +3 -3
- package/package.json +2 -2
- package/popup/Features.d.ts +10 -0
- package/popup/Features.js +1 -1
- package/rest/knowledgeGraph/GraphQueryStreamingResult.d.ts +4 -1
- package/support/revision.js +1 -1
- package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
- package/views/2d/FrameTask.js +1 -1
- package/views/2d/LabelManager.js +1 -1
- package/views/2d/ViewState.js +1 -1
- package/views/2d/engine/DisplayObject.js +1 -1
- package/views/2d/engine/Stage.js +1 -1
- package/views/2d/engine/flow/FlowContainer.js +1 -1
- package/views/2d/engine/flow/FlowView2D.js +1 -1
- package/views/2d/engine/flow/styles/AFlowResources.js +1 -1
- package/views/2d/engine/flow/styles/Imagery.js +1 -1
- package/views/2d/engine/flow/styles/Particles.js +1 -1
- package/views/2d/engine/flow/styles/Stack.js +1 -1
- package/views/2d/engine/flow/styles/Streamlines.js +1 -1
- package/views/2d/engine/transitions/FadeTransition.js +1 -1
- package/views/2d/engine/vectorTiles/VTLPainter3D.js +1 -1
- package/views/2d/engine/vectorTiles/decluttering/SymbolDeclutterer.js +1 -1
- package/views/2d/engine/vectorTiles/decluttering/SymbolFader.js +1 -1
- package/views/2d/engine/vectorTiles/decluttering/SymbolRepository.js +1 -1
- package/views/2d/engine/webgl/AFeatureTile.js +1 -1
- package/views/2d/engine/webgl/AttributeStoreView.js +1 -1
- package/views/2d/engine/webgl/FeatureTile.js +1 -1
- package/views/2d/engine/webgl/ResizableUint32Array.js +2 -0
- package/views/2d/engine/webgl/TileCpuState.js +2 -0
- package/views/2d/engine/webgl/TileGpuState.js +2 -0
- package/views/2d/engine/webgl/cpuMapped/CpuBuffer.js +2 -0
- package/views/2d/engine/webgl/cpuMapped/CpuMeshData.js +2 -0
- package/views/2d/engine/webgl/cpuMapped/GpuMeshState.js +2 -0
- package/views/2d/engine/webgl/effects/HittestEffect.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/TechniqueDebugContainer.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/TestDisplayObject.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/tile/TileDebugInfoTechnique.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
- package/views/2d/layers/GeoRSSLayerView2D.js +1 -1
- package/views/2d/layers/GraphicsLayerView2D.js +1 -1
- package/views/2d/layers/ImageryLayerView2D.js +1 -1
- package/views/2d/layers/ImageryTileLayerView2D.js +1 -1
- package/views/2d/layers/KMLLayerView2D.js +1 -1
- package/views/2d/layers/LayerView2D.js +1 -1
- package/views/2d/layers/MapNotesLayerView2D.js +1 -1
- package/views/2d/layers/MediaLayerView2D.js +1 -1
- package/views/2d/layers/RouteLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/features/FeatureContainer.js +1 -1
- package/views/2d/layers/features/FeaturePipelineWorker.js +1 -1
- package/views/2d/layers/features/FeatureTilePresentStrategy.js +2 -0
- package/views/2d/layers/features/Processor.js +1 -1
- package/views/2d/layers/features/RenderState.js +1 -1
- package/views/2d/layers/features/aggregation/AAggregateSpatialIndex.js +1 -1
- package/views/2d/layers/features/aggregation/GeohashSpatialIndex.js +1 -1
- package/views/2d/layers/features/aggregation/GridCell.js +1 -1
- package/views/2d/layers/features/aggregation/GridIndexCell.js +2 -0
- package/views/2d/layers/features/aggregation/GridSpatialIndex.js +1 -1
- package/views/2d/layers/features/layerAdapters/CatalogFootprintLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/InMemoryLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/KnowledgeGraphSublayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/OGCFeatureLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/OrientedImageryLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/ParquetLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/StreamLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/SubtypeGroupLayerAdapter.js +1 -1
- package/views/2d/layers/features/processor/AProcessorStrategy.js +1 -1
- package/views/2d/layers/features/processor/BinningStrategy.js +1 -1
- package/views/2d/layers/features/processor/ClusterStrategy.js +1 -1
- package/views/2d/layers/features/processor/FeatureUpdateStrategy.js +1 -1
- package/views/2d/layers/features/processor/TrackStrategy.js +1 -1
- package/views/2d/layers/features/sources/FeatureSourceMessage.js +1 -1
- package/views/2d/layers/features/sources/strategies/StreamLoadStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/ASourceChunk.js +1 -1
- package/views/2d/layers/features/support/Hashed.js +2 -0
- package/views/2d/layers/graphics/AGraphicContainer.js +1 -1
- package/views/2d/layers/graphics/GraphicStore.js +1 -1
- package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
- package/views/2d/layers/imagery/ImageryView2D.js +1 -1
- package/views/2d/layers/support/vectorTileDebugUtils.js +1 -1
- package/views/2d/support/hitTestUtils.js +1 -1
- package/views/2d/tiling/FeatureTileSubscriptionManager.js +1 -1
- package/views/2d/tiling/TileCombinedCoverage.js +2 -0
- package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightTool2.js +2 -0
- package/views/3d/analysis/LineOfSightAnalysisView3D.js +1 -1
- package/views/3d/analysis/ShadowCast/ShadowCastTooltip.js +1 -1
- package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedEditTool.js +2 -0
- package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedTool2.js +2 -0
- package/views/3d/analysis/Viewshed/viewshedSubToolUtils.js +2 -0
- package/views/3d/analysis/Viewshed/viewshedToolUtils.js +1 -1
- package/views/3d/analysis/ViewshedAnalysisView3D.js +1 -1
- package/views/3d/environment/CloudyWeather.js +1 -1
- package/views/3d/environment/FoggyWeather.js +1 -1
- package/views/3d/environment/RainyWeather.js +1 -1
- package/views/3d/environment/SnowyWeather.js +1 -1
- package/views/3d/environment/SunnyWeather.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/graphics/StreamController.js +1 -1
- package/views/3d/layers/graphics/tessellationUtils.js +1 -1
- package/views/3d/layers/i3s/I3SIndex.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatTextureAtlas.js +1 -1
- package/views/3d/webgl/ManagedColorAttachment.js +1 -1
- package/views/3d/webgl/ManagedDepthAttachment.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentTechnique.js +1 -1
- package/views/3d/webgl-engine/core/FBOCache.js +1 -1
- package/views/3d/webgl-engine/core/FBOCacheFormats.js +1 -1
- package/views/3d/webgl-engine/core/FBOCacheUsage.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js +11 -11
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
- package/views/3d/webgl-engine/effects/fog/Fog.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/fog/Fog.js +1 -1
- package/views/3d/webgl-engine/effects/geometry/RenderOccludedRenderNode.js +1 -1
- package/views/3d/webgl-engine/effects/glow/Glow.js +2 -0
- package/views/3d/webgl-engine/effects/glow/GlowBlur.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/glow/GlowComposition.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/raymarching/{RayDistanceFalloff.glsl.js → DistanceFalloff.glsl.js} +2 -2
- package/views/3d/webgl-engine/lib/CutFillComputationRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/CutFillVisualizationRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/GPUPointOcclusionQuery.js +1 -1
- package/views/3d/webgl-engine/lib/MainFramebuffer.js +1 -1
- package/views/3d/webgl-engine/lib/ManagedTexture.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowCastRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
- package/views/3d/webgl-engine/lib/StencilUtils.js +1 -1
- package/views/3d/webgl-engine/lib/ViewshedShadowMap.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeShader.glsl.js +1 -1
- package/views/3d/webgl-engine/lib/verticalOffsetUtils.js +1 -1
- package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
- package/views/3d/webgl-engine/parts/RenderView.js +1 -1
- package/views/3d/webgl-engine/shaders/ColorMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ImageMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/LineMarkerTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/MeasurementArrowTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/MeasurementArrowTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/NativeLineTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/PatternTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/PointRendererTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ScreenSpacePassAtmosphere.glsl.js +1 -7
- package/views/3d/webgl-engine/shaders/ShadowCastVisualizeTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowCastVisualizeTechniqueConfiguration.js +1 -1
- package/views/VideoView.js +1 -1
- package/views/View2D.js +1 -1
- package/views/draw/support/GraphicMover.js +1 -1
- package/views/support/rasterHitTestUtils.js +1 -1
- package/views/support/waitForResources.js +1 -1
- package/views/video/VideoOperationalDataView.js +1 -1
- package/views/webgl/FramebufferObject.js +1 -1
- package/views/webgl/RenderingContext.js +1 -1
- package/views/webgl/Texture.js +1 -1
- package/views/webgl/textureUtils.js +1 -1
- package/widgets/BatchAttributeForm/css.js +1 -1
- package/widgets/BatchAttributeForm/inputs/UtilityNetworkAssociationsElementInput.d.ts +61 -0
- package/widgets/BatchAttributeForm/inputs/UtilityNetworkAssociationsElementInput.js +2 -0
- package/widgets/BatchAttributeForm/inputs/support/createBatchFormInputs.js +1 -1
- package/widgets/BatchAttributeForm/inputs/support/inputUtils.js +1 -1
- package/widgets/BatchAttributeForm/inputs/types.d.ts +9 -4
- package/widgets/BatchAttributeForm/templates/UtilityNetworkAssociationsElementTemplate.js +2 -0
- package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
- package/widgets/BatchAttributeForm/templates/support/hashElementTemplate.js +1 -1
- package/widgets/BatchAttributeForm/templates/support/templateUtils.js +1 -1
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/FeatureTable/Grid/Column.d.ts +17 -2
- package/widgets/FeatureTable/Grid/Column.js +1 -1
- package/widgets/FeatureTable/Grid/Grid.js +1 -1
- package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
- package/widgets/FeatureTable/Grid/GroupColumn.d.ts +7 -1
- package/widgets/FeatureTable/Grid/GroupColumn.js +1 -1
- package/widgets/FeatureTable/support/ColumnTemplateBase.d.ts +9 -1
- package/widgets/FeatureTable/support/ColumnTemplateBase.js +1 -1
- package/widgets/FeatureTable/support/types.d.ts +8 -0
- package/widgets/FeatureTable.js +1 -1
- package/assets/esri/core/workers/chunks/2171aaa147aa4d9fc5b5.js +0 -1
- package/assets/esri/core/workers/chunks/38f1a86b8dd9ee684ee5.js +0 -596
- package/assets/esri/core/workers/chunks/54d07eadf113f0e4e506.js +0 -1
- package/assets/esri/core/workers/chunks/5818f1f526577068d6ca.js +0 -2
- package/assets/esri/core/workers/chunks/5ec66e39e53c11e75179.js +0 -2
- package/assets/esri/core/workers/chunks/5f6fd20a7f4e80eafa25.js +0 -1
- package/assets/esri/core/workers/chunks/6d2abdb48e17b2b56599.js +0 -1
- package/assets/esri/core/workers/chunks/7cdd0492b2191df95102.js +0 -2
- package/assets/esri/core/workers/chunks/7e530e635325dba07864.js +0 -1
- package/assets/esri/core/workers/chunks/8f4cd30ce23e41c1a42c.js +0 -1
- package/assets/esri/core/workers/chunks/936f2b1332ece14d7c28.js +0 -2
- package/assets/esri/core/workers/chunks/983f6c8727fd9484718e.js +0 -1
- package/assets/esri/core/workers/chunks/bd8cb64b6e08839398f3.js +0 -1
- package/assets/esri/core/workers/chunks/cbf1a03f54bd8d2a2b47.js +0 -1
- package/layers/support/ParquetGeometryEncodingWkb.js +0 -2
- package/views/2d/engine/webgl/PooledUint32Array.js +0 -2
- package/views/2d/engine/webgl/cpuMapped/Buffer.js +0 -2
- package/views/2d/engine/webgl/cpuMapped/MappedMesh.js +0 -2
- package/views/3d/webgl-engine/effects/glow/GlowRenderNode.js +0 -2
- package/views/3d/webgl-engine/shaders/sources/edgeRenderer/DistanceFalloff.glsl.js +0 -4
- /package/assets/esri/core/workers/chunks/{5ec66e39e53c11e75179.js.LICENSE.txt → 577cbc131b21c351fae5.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{ff713926985a284f5d81.js.LICENSE.txt → a844547bf33a8527ee9f.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{5818f1f526577068d6ca.js.LICENSE.txt → bb5f909a2f26fc6a21b0.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{7cdd0492b2191df95102.js.LICENSE.txt → ded2f19a1685db2137f4.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{936f2b1332ece14d7c28.js.LICENSE.txt → ee057c85cdf6beb5b012.js.LICENSE.txt} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{create as e}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import{clone as o,fromValues as r,create as a}from"../core/libs/gl-matrix-2/factories/vec4f64.js";import{ScreenSpacePass as
|
|
2
|
+
import{create as e}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import{clone as o,fromValues as r,create as a}from"../core/libs/gl-matrix-2/factories/vec4f64.js";import{ScreenSpacePass as l}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{BlendColorsPremultiplied as t,premultiplyAlpha as s}from"../views/3d/webgl-engine/core/shaderLibrary/util/BlendColorsPremultiplied.glsl.js";import{CameraSpace as n}from"../views/3d/webgl-engine/core/shaderLibrary/util/CameraSpace.glsl.js";import{Float2PassUniform as i}from"../views/3d/webgl-engine/core/shaderModules/Float2PassUniform.js";import{Float4PassUniform as d}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{Float4sPassUniform as m}from"../views/3d/webgl-engine/core/shaderModules/Float4sPassUniform.js";import{FloatPassUniform as h}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{FloatsPassUniform as p}from"../views/3d/webgl-engine/core/shaderModules/FloatsPassUniform.js";import{glsl as c,If as u}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{IntegerPassUniform as v}from"../views/3d/webgl-engine/core/shaderModules/IntegerPassUniform.js";import{Texture2DPassUniform as g}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{maxColorRampSize as w}from"../views/3d/webgl-engine/shaders/colorRampParameters.js";import{S as C}from"./ShadowCastAccumulate.glsl.js";import{NoParameters as f}from"../views/webgl/NoParameters.js";import{ShaderBuilder as b}from"../views/webgl/ShaderBuilder.js";class S extends f{constructor(r){super(),this._data=r,this.sampleScale=e(),this.opacityFromElevation=1,this.gradientColorRamp=y,this.thresholdColor=o(M),this.bandedGradientColorRamp=P,this.bandSize=.1,this.threshold=.5}get shadowCastMap(){return this._data.shadowCastTexture}}const R=.7,j=50/255,y=[[0,r(0,0,1,0)],[1,r(0,0,1,R)]],M=r(1,0,0,R),P=[[0,r(j,j,j,0)],[1,r(j,j,j,R)]];function $(e){const o=new b,r=o.fragment;o.include(n),o.include(l);const{visualization:a}=e;r.constants.add("inverseSampleValue","float",C),r.uniforms.add(new g("shadowCastMap",e=>e.shadowCastMap),new i("sampleScale",e=>e.sampleScale),new h("opacityFromElevation",e=>e.opacityFromElevation));const f=2===a,S=3===a,R=1===a;S&&r.include(t);const j=!f;switch(j&&r.code.add(c`vec4 evaluateColorRamp(float value) {
|
|
3
3
|
if (value <= vvColorValues[0]) {
|
|
4
4
|
return vvColorColors[0];
|
|
5
5
|
}
|
|
@@ -10,31 +10,31 @@ return mix(vvColorColors[i-1], vvColorColors[i], f);
|
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
return vvColorColors[colorRampSize - 1];
|
|
13
|
-
}`),a){case 0:r.uniforms.add(new m("vvColorColors",w,e=>e.gradientColorRamp.flatMap(([e,o])=>s(
|
|
14
|
-
${
|
|
13
|
+
}`),a){case 0:r.uniforms.add(new m("vvColorColors",w,e=>e.gradientColorRamp.flatMap(([e,o])=>s(z,o))),new v("colorRampSize",e=>e.gradientColorRamp.length),new p("vvColorValues",w,e=>e.gradientColorRamp.map(([e,o])=>e)));break;case 1:r.uniforms.add(new m("vvColorColors",w,e=>e.bandedGradientColorRamp.flatMap(([e,o])=>s(z,o))),new v("colorRampSize",e=>e.bandedGradientColorRamp.length),new p("vvColorValues",w,e=>e.bandedGradientColorRamp.map(([e,o])=>e)),new h("bandSize",e=>e.bandSize));break;case 3:r.uniforms.add(new d("uColor",e=>s(z,e.thresholdColor)),new h("threshold",e=>e.threshold),new m("vvColorColors",w,e=>e.gradientColorRamp.flatMap(([e,o])=>s(z,o))),new v("colorRampSize",e=>e.gradientColorRamp.length),new p("vvColorValues",w,e=>e.gradientColorRamp.map(([e,o])=>e)));break;case 2:r.uniforms.add(new d("uColor",e=>s(z,e.thresholdColor)),new h("threshold",e=>e.threshold))}const{type:y,selector:M,thresholdStrengthSelector:P}=S?{type:"vec2",selector:"rg",thresholdStrengthSelector:"strength.x"}:{type:"float",selector:"r",thresholdStrengthSelector:"strength"};return r.main.add(c`
|
|
14
|
+
${y} numSamples = texture(shadowCastMap, uv).${M} * inverseSampleValue;
|
|
15
15
|
|
|
16
16
|
fragColor = vec4(0.0);
|
|
17
17
|
|
|
18
|
-
// early out if we do not have any samples in one or more channels
|
|
19
|
-
if (dot(numSamples, ${
|
|
18
|
+
// early out if we do not have any samples in one or more channels and 0 samples would be fully transparent
|
|
19
|
+
if (${u(j,c`vvColorColors[0].a == 0.0 && `,"")}dot(numSamples, ${y}(1)) < 1.0) {
|
|
20
20
|
return;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
// sampleScale is the number of total samples taken, so this brings strength to a 0-1 range.
|
|
24
24
|
// note that sampleScale is always a vec2 even if we have only the primary channel.
|
|
25
|
-
${
|
|
25
|
+
${y} strength = numSamples * sampleScale.${M};
|
|
26
26
|
|
|
27
27
|
// in threshold mode, step the strength to 0 if we are at or below the threshold, 1 otherwise.
|
|
28
28
|
${u(f||S,c`
|
|
29
|
-
${
|
|
29
|
+
${P} = 1.0 - step(${P}, threshold);
|
|
30
30
|
`)}
|
|
31
31
|
|
|
32
32
|
// bail out if we are below the threshold
|
|
33
|
-
${u(f,c`if (${
|
|
33
|
+
${u(f,c`if (${P} == 0.0) { return; }`)}
|
|
34
34
|
|
|
35
35
|
${u(R,c`strength = ceil(strength / bandSize) * bandSize;`)}
|
|
36
36
|
|
|
37
|
-
${
|
|
37
|
+
${y} attenuation = opacityFromElevation * strength;
|
|
38
38
|
|
|
39
39
|
${u(S,c`
|
|
40
40
|
vec4 thresholdColor = uColor * attenuation.r;
|
|
@@ -45,4 +45,4 @@ return vvColorColors[colorRampSize - 1];
|
|
|
45
45
|
`,c`
|
|
46
46
|
fragColor = evaluateColorRamp(attenuation);
|
|
47
47
|
`))}
|
|
48
|
-
`),o}const
|
|
48
|
+
`),o}const z=a(),V=Object.freeze(Object.defineProperty({__proto__:null,ShadowCastVisualizePassParameters:S,build:$},Symbol.toStringTag,{value:"Module"}));export{S,V as a,$ as b};
|
package/config.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import"./core/has.js";import{deepMerge as e}from"./core/object.js";const s={apiKey:void 0,apiKeys:{scopes:[]},applicationName:"",applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",userPrivilegesApplied:!0,portalUrl:"https://www.arcgis.com",respectPrefersReducedMotion:!0,routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&(e(s,globalThis.esriConfig,!0),delete s.has),!s.assetsPath){{const e="5.1.0-next.
|
|
2
|
+
import"./core/has.js";import{deepMerge as e}from"./core/object.js";const s={apiKey:void 0,apiKeys:{scopes:[]},applicationName:"",applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",userPrivilegesApplied:!0,portalUrl:"https://www.arcgis.com",respectPrefersReducedMotion:!0,routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&(e(s,globalThis.esriConfig,!0),delete s.has),!s.assetsPath){{const e="5.1.0-next.86";s.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@${e}/assets`}s.defaultAssetsPath=s.assetsPath}export{s as default};
|
package/core/arrayUtils.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{toConst as n}from"./compilerUtils.js";import t from"./RandomLCG.js";const e=1.5,r=1/e,o=.5;function l(n,t){if(!t)return n;for(const e of t)n.push(e);return n}function u(n){return n}function f(n,t=u){if(!n||0===n.length)return;let e=n[0],r=t(e);for(let o=1;o<n.length;++o){const l=n[o],u=Number(t(l));u>r&&(r=u,e=l)}return e}function
|
|
2
|
+
import{toConst as n}from"./compilerUtils.js";import t from"./RandomLCG.js";const e=1.5,r=1/e,o=.5;function l(n,t){if(!t)return n;for(const e of t)n.push(e);return n}function u(n){return n}function f(n,t=u){if(!n||0===n.length)return;let e=n[0],r=t(e);for(let o=1;o<n.length;++o){const l=n[o],u=Number(t(l));u>r&&(r=u,e=l)}return e}function c(n,t=u){return f(n,n=>-t(n))}function i(n,t){if(t){const e=[];for(const r of n)e.some(n=>t(n,r))||e.push(r);return e}return Array.from(new Set(n))}function s(n,t,e,r,o,l,u){if(null==n&&null==r)return!0;t=Math.max(0,t),o=Math.max(0,o),e=Math.max(0,e<0?(n?.length??0)+e:e),l=Math.max(0,l<0?(r?.length??0)+l:l);const f=e-t;if(null==n||null==r||f!==l-o)return!1;if(u){for(let c=0;c<f;c++)if(!u(n[t+c],r[o+c]))return!1}else for(let c=0;c<f;c++)if(n[t+c]!==r[o+c])return!1;return!0}function h(n,t,e){return s(n,0,n?.length??0,t,0,t?.length??0,e)}function a(){return(n,t)=>{if(null==n&&null==t)return!0;if(null==n||null==t||n.length!==t.length)return!1;for(let e=0;e<n.length;e++)if(n[e]!==t[e])return!1;return!0}}const g=a();function m(n,t){let e=n.length!==t.length;e&&(n.length=t.length);for(let r=0;r<t.length;++r)n[r]!==t[r]&&(n[r]=t[r],e=!0);return e}function d(n,t,e){let r,o;return e?(r=t.filter(t=>!n.some(n=>e(n,t))),o=n.filter(n=>!t.some(t=>e(t,n)))):(r=t.filter(t=>!n.includes(t)),o=n.filter(n=>!t.includes(n))),{added:r,removed:o}}function p(n,t,e){return n&&t?e?n.filter(n=>t.findIndex(t=>e(n,t))>-1):n.filter(n=>t.includes(n)):[]}function M(n){return n&&"number"==typeof n.length}function x(n,t){const e=n.length;if(0===e)return[];const r=[];for(let o=0;o<e;o+=t)r.push(n.slice(o,o+t));return r}function N(n,t){void 0===t&&(t=n,n=0);const e=new Array(t-n);for(let r=n;r<t;r++)e[r-n]=r;return e}function w(n,t,e){const r=n.length;let o=0,l=r-1;for(;o<l;){const e=o+Math.floor((l-o)/2);t>n[e]?o=e+1:l=e}const u=n[o];return e?t>=n[r-1]?-1:u===t?o:o-1:u===t?o:-1}function y(n,t=1){const e=t/n.reduce((n,t)=>n+t,0);for(let r=0;r<n.length;++r)n[r]*=e}function b(n,t,e,r){n.length>e&&(n.length=e);const o=n.length;let l=0,u=o;if(o===e){const e=r(n[o-1],t);if(e<=0||Number.isNaN(e))return}for(;l<u;){const e=l+u>>>1,o=r(n[e],t);o<=0||Number.isNaN(o)?l=e+1:u=e}o===e&&n.pop(),n.splice(l,0,t)}class A{constructor(){this.last=0}}const S=new A;function j(n,t,e,r){r=r||S;const o=Math.max(0,r.last-10);for(let u=o;u<e;++u)if(n[u]===t)return r.last=u,u;const l=Math.min(o,e);for(let u=0;u<l;++u)if(n[u]===t)return r.last=u,u;return-1}function v(t,e,r,o){const l=r??t.length,u=j(t,n(e),l,o);if(-1!==u)return t[u]=t[l-1],null==r&&t.pop(),e}const z=new Set;function C(n,t,e=n.length,r=t.length,o,l){if(0===r||0===e)return e;z.clear();for(let f=0;f<r;++f)z.add(t[f]);o=o||S;const u=Math.max(0,o.last-10);for(let f=u;f<e;++f)if(z.has(n[f])&&(l?.push(n[f]),z.delete(n[f]),n[f]=n[e-1],--e,--f,0===z.size||0===e))return z.clear(),e;for(let f=0;f<u;++f)if(z.has(n[f])&&(l?.push(n[f]),z.delete(n[f]),n[f]=n[e-1],--e,--f,0===z.size||0===e))return z.clear(),e;return z.clear(),e}function F(n,t){let e=0;for(let r=0;r<n.length;++r){const o=n[r];t(o,r)&&(n[e]=o,e++)}return n.length=e,n}function G(n,t,e){const r=n.length;if(t>=r)return n.slice();const o=I(e),l=new Set,u=[];for(;u.length<t;){const t=Math.floor(o()*r);l.has(t)||(l.add(t),u.push(n[t]))}return u}function I(n){return n?(L.seed=n,()=>L.getFloat()):Math.random}const L=new t;function O(n,t){if(!n)return n;const e=I(t);for(let r=n.length-1;r>0;r--){const t=Math.floor(e()*(r+1)),o=n[r];n[r]=n[t],n[t]=o}return n}function R(n,t){const e=n.indexOf(t);return-1!==e?(n.splice(e,1),t):null}function U(n,t){return null!=n}function k(n,...t){for(const e of t)null!=e&&n.push(e);return n.length}function q(n,t){return n.reduce((n,e)=>t(e)?n+1:n,0)}function B(n){return Array.isArray(n)}function D(n,t,e){for(t<n.length&&(n.length=t);n.length<t;)n.push(e())}function E(n,t){return n-t}const H=[];export{A as PositionHint,l as addMany,w as binaryIndexOf,q as countIf,d as difference,H as emptyArray,h as equals,F as filterInPlace,I as getRandomNumberGenerator,j as indexOf,b as insertSortedStableTopN,p as intersect,M as isArrayLike,B as isArrayWithReadonly,U as isSome,a as makeArrayEquals,f as max,c as min,y as normalize,g as numbersEquals,E as numericSort,G as pickRandom,k as pushIfSome,N as range,e as reallocGrowthFactor,r as reallocShrinkFactor,o as reallocShrinkThreshold,R as remove,v as removeUnordered,C as removeUnorderedMany,D as resizeFilled,O as shuffle,s as sliceEquals,x as splitIntoChunks,i as unique,m as update};
|
package/core/has.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
const e=globalThis,a={...e.esriConfig?.has};function has(d){return"function"==typeof a[d]?a[d]=a[d](e):a[d]}has.add=(e,d,r,t)=>{(t||void 0===a[e])&&(a[e]=d),r&&has(e)},has.cache=a,has.add("big-integer-warning-enabled",!0),has.add("esri-deprecation-warnings",!0),has.add("esri-tests-disable-screenshots",!1),has.add("esri-tests-use-full-window",!1),has.add("esri-tests-post-to-influx",!0),has.add("esri-cim-animations-enable-status","enabled"),has.add("esri-cim-animations-spotlight",!1),has.add("esri-cim-animations-freeze-time",!1),(()=>{has.add("host-webworker",void 0!==e.WorkerGlobalScope&&self instanceof e.WorkerGlobalScope);const a="undefined"!=typeof window&&"undefined"!=typeof location&&"undefined"!=typeof document&&window.location===location&&window.document===document;if(has.add("host-browser",a),has.add("host-node",!("object"!=typeof e.process||!e.process.versions?.node||!e.process.versions.v8)),has.add("dom",a),has("host-browser")){const e=navigator,a=e.userAgent,d=e.appVersion,r=parseFloat(d);if(has.add("wp",parseFloat(a.split("Windows Phone")[1])||void 0),has.add("msapp",parseFloat(a.split("MSAppHost/")[1])||void 0),has.add("khtml",d.includes("Konqueror")?r:void 0),has.add("edge",parseFloat(a.split("Edge/")[1])||void 0),has.add("opr",parseFloat(a.split("OPR/")[1])||void 0),has.add("webkit",!has("wp")&&!has("edge")&&parseFloat(a.split("WebKit/")[1])||void 0),has.add("chrome",!has("edge")&&!has("opr")&&parseFloat(a.split("Chrome/")[1])||void 0),has.add("android",!has("wp")&&parseFloat(a.split("Android ")[1])||void 0),has.add("safari",!d.includes("Safari")||has("wp")||has("chrome")||has("android")||has("edge")||has("opr")?void 0:parseFloat(d.split("Version/")[1])),has.add("mac",d.includes("Macintosh")),!has("wp")&&/(iPhone|iPod|iPad)/.test(a)){const e=RegExp.$1.replace(/P/,"p"),d=/OS ([\d_]+)/.test(a)?RegExp.$1:"1",r=parseFloat(d.replace(/_/,".").replaceAll("_",""));has.add(e,r),has.add("ios",r)}has("webkit")||(!a.includes("Gecko")||has("wp")||has("khtml")||has("edge")||has.add("mozilla",r),has("mozilla")&&has.add("ff",parseFloat(a.split("Firefox/")[1]||a.split("Minefield/")[1])||void 0))}})(),(()=>{if(e.navigator){const e=navigator.userAgent,a=/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini|IEMobile/i.test(e),d=/iPhone/i.test(e);a&&has.add("esri-mobile",a),d&&has.add("esri-iPhone",d),has.add("esri-geolocation",!!navigator.geolocation)}has.add("esri-wasm","WebAssembly"in e),has.add("esri-performance-mode-frames-between-render",20),has.add("esri-force-performance-mode",!1),has.add("esri-shared-array-buffer",()=>{const a="SharedArrayBuffer"in e,d=!1===e.crossOriginIsolated;return a&&!d}),has.add("wasm-simd",()=>{const e=[0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11];return WebAssembly.validate(new Uint8Array(e))}),has.add("esri-atomics","Atomics"in e),has.add("esri-workers","Worker"in e),has.add("web-feat:cache","caches"in e),has.add("esri-workers-arraybuffer-transfer",!has("safari")||Number(has("safari"))>=12),has.add("min-workers-pool-size",2),has.add("max-workers-pool-size",has("esri-mobile")?3:8),has.add("featurelayer-simplify-thresholds",[.5,.5,.5,.5]),has.add("featurelayer-simplify-payload-size-factors",[1,1,4]),has.add("featurelayer-animation-enabled",!0),has.add("featurelayer-snapshot-enabled",!0),has.add("featurelayer-snapshot-initial-tolerance",0),has.add("featurelayer-snapshot-point-min-threshold",8e4),has.add("featurelayer-snapshot-point-max-threshold",4e5),has.add("featurelayer-snapshot-multipoint-min-threshold",2e4),has.add("featurelayer-snapshot-multipoint-max-threshold",1e5),has.add("featurelayer-snapshot-polygon-min-threshold",2e3),has.add("featurelayer-snapshot-polygon-max-threshold",2e3),has.add("featurelayer-snapshot-polyline-min-threshold",2e3),has.add("featurelayer-snapshot-polyline-max-threshold",2e3),has.add("featurelayer-snapshot-max-vertex-count",25e4),has.add("featurelayer-snapshot-non-hosted-exceedslimit-enabled",!0),has.add("featurelayer-snapshot-concurrency",4),has.add("featurelayer-snapshot-allow-editable",!1),has.add("featurelayer-snapshot-coverage",.1),has.add("featurelayer-query-max-depth",4),has.add("featurelayer-query-max-page-size",8e3),has.add("featurelayer-query-pausing-enabled",!1),has.add("featurelayer-query-tile-concurrency",4),has.add("featurelayer-query-tile-max-features",6e5),has.add("featurelayer-advanced-symbols",!1),has.add("featurelayer-pbf",!0),has.add("featurelayer-pbf-statistics",!1),has.add("featurelayer-pbf-true-curves",!0),has.add("feature-layers-workers",!0),has.add("feature-polyline-generalization-factor",1),has.add("featurelayer-relative-time-queries-enabled",!0),has.add("featurelayer-relative-time-queries-bin-window-public",1),has.add("featurelayer-relative-time-queries-bin-window-private",60),has.add("parquetlayer-full-query-feature-count",2e4),has.add("parquetlayer-hittest-max-feature-count",1),has.add("parquetlayer-persistence-enabled",!1),has.add("parquetlayer-cache-enabled",!0),has.add("mapview-transitions-duration",200),has.add("mapview-essential-goto-duration",200),has.add("mapview-srswitch-adjust-rotation-scale-threshold",24e6),has.add("mapserver-pbf-version-support",10.81),has.add("mapservice-popup-identify-max-tolerance",20),has.add("request-queue-concurrency-global",50),has.add("request-queue-concurrency-hosted",16),has.add("request-queue-concurrency-non-hosted",10),has.add("curve-densification-coarse-segments",128),has.add("curve-densification-max-segments",2e3),has.add("curve-densification-min-segments",3),has.add("curve-densification-pixel-deviation",.5),has.add("view-readyState-waiting-delay",1e3),has.add("gradient-depth-bias",.01),has.add("gradient-depth-epsilon",1e-8),has.add("enable-feature:esri-compress-textures",!0),has.add("enable-feature:basemap-groundlayers",!0),has.add("enable-feature:im-shading",!0),has.add("enable-feature:im-vertex-normals",!0),!has("host-webworker")&&has("host-browser")&&(has.add("esri-csp-restrictions",()=>{try{new Function}catch{return!0}return!1}),has.add("esri-url-encodes-apostrophe",()=>{const e=window.document.createElement("a");return e.href="?'",e.href.includes("?%27")}))})();export{has as default};
|
|
2
|
+
const e=globalThis,a={...e.esriConfig?.has};function has(d){return"function"==typeof a[d]?a[d]=a[d](e):a[d]}has.add=(e,d,r,t)=>{(t||void 0===a[e])&&(a[e]=d),r&&has(e)},has.cache=a,has.add("big-integer-warning-enabled",!0),has.add("esri-deprecation-warnings",!0),has.add("esri-tests-disable-screenshots",!1),has.add("esri-tests-use-full-window",!1),has.add("esri-tests-post-to-influx",!0),has.add("esri-cim-animations-enable-status","enabled"),has.add("esri-cim-animations-spotlight",!1),has.add("esri-cim-animations-freeze-time",!1),(()=>{has.add("host-webworker",void 0!==e.WorkerGlobalScope&&self instanceof e.WorkerGlobalScope);const a="undefined"!=typeof window&&"undefined"!=typeof location&&"undefined"!=typeof document&&window.location===location&&window.document===document;if(has.add("host-browser",a),has.add("host-node",!("object"!=typeof e.process||!e.process.versions?.node||!e.process.versions.v8)),has.add("dom",a),has("host-browser")){const e=navigator,a=e.userAgent,d=e.appVersion,r=parseFloat(d);if(has.add("wp",parseFloat(a.split("Windows Phone")[1])||void 0),has.add("msapp",parseFloat(a.split("MSAppHost/")[1])||void 0),has.add("khtml",d.includes("Konqueror")?r:void 0),has.add("edge",parseFloat(a.split("Edge/")[1])||void 0),has.add("opr",parseFloat(a.split("OPR/")[1])||void 0),has.add("webkit",!has("wp")&&!has("edge")&&parseFloat(a.split("WebKit/")[1])||void 0),has.add("chrome",!has("edge")&&!has("opr")&&parseFloat(a.split("Chrome/")[1])||void 0),has.add("android",!has("wp")&&parseFloat(a.split("Android ")[1])||void 0),has.add("safari",!d.includes("Safari")||has("wp")||has("chrome")||has("android")||has("edge")||has("opr")?void 0:parseFloat(d.split("Version/")[1])),has.add("mac",d.includes("Macintosh")),!has("wp")&&/(iPhone|iPod|iPad)/.test(a)){const e=RegExp.$1.replace(/P/,"p"),d=/OS ([\d_]+)/.test(a)?RegExp.$1:"1",r=parseFloat(d.replace(/_/,".").replaceAll("_",""));has.add(e,r),has.add("ios",r)}has("webkit")||(!a.includes("Gecko")||has("wp")||has("khtml")||has("edge")||has.add("mozilla",r),has("mozilla")&&has.add("ff",parseFloat(a.split("Firefox/")[1]||a.split("Minefield/")[1])||void 0))}})(),(()=>{if(e.navigator){const e=navigator.userAgent,a=/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini|IEMobile/i.test(e),d=/iPhone/i.test(e);a&&has.add("esri-mobile",a),d&&has.add("esri-iPhone",d),has.add("esri-geolocation",!!navigator.geolocation)}has.add("esri-wasm","WebAssembly"in e),has.add("esri-performance-mode-frames-between-render",20),has.add("esri-force-performance-mode",!1),has.add("esri-shared-array-buffer",()=>{const a="SharedArrayBuffer"in e,d=!1===e.crossOriginIsolated;return a&&!d}),has.add("wasm-simd",()=>{const e=[0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11];return WebAssembly.validate(new Uint8Array(e))}),has.add("esri-atomics","Atomics"in e),has.add("esri-workers","Worker"in e),has.add("web-feat:cache","caches"in e),has.add("esri-workers-arraybuffer-transfer",!has("safari")||Number(has("safari"))>=12),has.add("min-workers-pool-size",2),has.add("max-workers-pool-size",has("esri-mobile")?3:8),has.add("featurelayer-simplify-thresholds",[.5,.5,.5,.5]),has.add("featurelayer-simplify-payload-size-factors",[1,1,4]),has.add("featurelayer-animation-enabled",!0),has.add("featurelayer-snapshot-enabled",!0),has.add("featurelayer-snapshot-initial-tolerance",0),has.add("featurelayer-snapshot-point-min-threshold",8e4),has.add("featurelayer-snapshot-point-max-threshold",4e5),has.add("featurelayer-snapshot-multipoint-min-threshold",2e4),has.add("featurelayer-snapshot-multipoint-max-threshold",1e5),has.add("featurelayer-snapshot-polygon-min-threshold",2e3),has.add("featurelayer-snapshot-polygon-max-threshold",2e3),has.add("featurelayer-snapshot-polyline-min-threshold",2e3),has.add("featurelayer-snapshot-polyline-max-threshold",2e3),has.add("featurelayer-snapshot-max-vertex-count",25e4),has.add("featurelayer-snapshot-non-hosted-exceedslimit-enabled",!0),has.add("featurelayer-snapshot-concurrency",4),has.add("featurelayer-snapshot-allow-editable",!1),has.add("featurelayer-snapshot-coverage",.1),has.add("featurelayer-query-max-depth",4),has.add("featurelayer-query-max-page-size",8e3),has.add("featurelayer-query-pausing-enabled",!1),has.add("featurelayer-query-tile-concurrency",4),has.add("featurelayer-query-tile-max-features",6e5),has.add("featurelayer-advanced-symbols",!1),has.add("featurelayer-pbf",!0),has.add("featurelayer-pbf-statistics",!1),has.add("featurelayer-pbf-true-curves",!0),has.add("feature-layers-workers",!0),has.add("feature-polyline-generalization-factor",1),has.add("featurelayer-relative-time-queries-enabled",!0),has.add("featurelayer-relative-time-queries-bin-window-public",1),has.add("featurelayer-relative-time-queries-bin-window-private",60),has.add("parquetlayer-full-query-feature-count",2e4),has.add("parquetlayer-hittest-max-feature-count",1),has.add("parquetlayer-persistence-enabled",!1),has.add("parquetlayer-cache-enabled",!0),has.add("mapview-transitions-duration",200),has.add("mapview-essential-goto-duration",200),has.add("mapview-srswitch-adjust-rotation-scale-threshold",24e6),has.add("mapserver-pbf-version-support",10.81),has.add("mapservice-popup-identify-max-tolerance",20),has.add("request-queue-concurrency-global",50),has.add("request-queue-concurrency-hosted",16),has.add("request-queue-concurrency-non-hosted",10),has.add("curve-densification-coarse-segments",128),has.add("curve-densification-max-segments",2e3),has.add("curve-densification-min-segments",3),has.add("curve-densification-pixel-deviation",.5),has.add("view-readyState-waiting-delay",1e3),has.add("gradient-depth-bias",.01),has.add("gradient-depth-epsilon",1e-8),has.add("enable-feature:analysis-drawtool-line-of-sight",!1),has.add("enable-feature:esri-compress-textures",!0),has.add("enable-feature:analysis-new-viewshed-tool",!1),has.add("enable-feature:basemap-groundlayers",!0),has.add("enable-feature:im-shading",!0),has.add("enable-feature:im-vertex-normals",!0),!has("host-webworker")&&has("host-browser")&&(has.add("esri-csp-restrictions",()=>{try{new Function}catch{return!0}return!1}),has.add("esri-url-encodes-apostrophe",()=>{const e=window.document.createElement("a");return e.href="?'",e.href.includes("?%27")}))})();export{has as default};
|
package/core/screenUtils.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
const n=/^-?(\d+(\.\d+)?)\s*((px)|(pt))?$/i,t="screenUtils.toPt: input not recognized!",r=96;function u(n){return n?n/72*r:0}function e(n){return n?72*n/r:0}function o(r){if("string"==typeof r){const u=r.match(n);if(u){const n=Number(u[1]),t=u[3]&&u[3].toLowerCase(),o=r.startsWith("-"),i="px"===t?e(n):n;return o?-i:i}return console.warn(t),null}return r}function i(n=0,t=0){return{x:n,y:t}}function c(n){return n?i(n.x,n.y):null}function
|
|
2
|
+
const n=/^-?(\d+(\.\d+)?)\s*((px)|(pt))?$/i,t="screenUtils.toPt: input not recognized!",r=96;function u(n){return n?n/72*r:0}function e(n){return n?72*n/r:0}function o(r){if("string"==typeof r){const u=r.match(n);if(u){const n=Number(u[1]),t=u[3]&&u[3].toLowerCase(),o=r.startsWith("-"),i="px"===t?e(n):n;return o?-i:i}return console.warn(t),null}return r}function i(n=0,t=0){return{x:n,y:t}}function c(n=0,t=0,r=0,u=0){return{x:n,y:t,width:r,height:u}}function f(n){return n?i(n.x,n.y):null}function x(n=0,t=0){return[n,t]}function l(n=0,t=0){return{x:n,y:t}}function s(n=0,t=0){return h([n,t])}function y(n=0,t=0,r=0){return p([n,t,r])}function h(n){return n}function p(n){return n}function a(n){return n}function d(n,t){return t?(t.x=n[0],t.y=n[1],t):{x:n[0],y:n[1]}}function g(n,t){return t?(t[0]=n.x,t[1]=n.y,t.length>2&&(t[2]=0),t):[n.x,n.y]}function w(n,t){return n===t||null==n&&null==t||n?.x===t?.x&&n?.y===t?.y}export{h as castRenderScreenPointArray,p as castRenderScreenPointArray3,a as castScreenPointArray,f as cloneScreenPoint,l as createRenderScreenPoint,s as createRenderScreenPointArray,y as createRenderScreenPointArray3,i as createScreenPoint,x as createScreenPointArray,c as createScreenRect,u as pt2px,e as px2pt,d as screenPointArrayToObject,w as screenPointEqual,g as screenPointObjectToArray,o as toPt};
|
package/form/types.d.ts
CHANGED
|
@@ -22,4 +22,4 @@ export type FormElementUnion = AttachmentElement | FieldElement | GroupElement |
|
|
|
22
22
|
*
|
|
23
23
|
* @since 5.0
|
|
24
24
|
*/
|
|
25
|
-
export type NestableFormElementUnion = Exclude<FormElementUnion, GroupElement |
|
|
25
|
+
export type NestableFormElementUnion = Exclude<FormElementUnion, GroupElement | AttachmentElement>;
|
package/geohash/GeohashCell.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{baseObjectMemory as t,estimateNumberMemory as e}from"../core/memoryEstimations.js";import{decodeGeohashXY as
|
|
2
|
+
import{baseObjectMemory as t,estimateNumberMemory as e}from"../core/memoryEstimations.js";import{getGeohash as o,decodeGeohashXY as s}from"./geohashUtils.js";import r from"../geometry/SpatialReference.js";import{convertFromPolygon as i,quantizeOptimizedGeometry as a,convertFromPoint as h}from"../layers/graphics/featureConversionUtils.js";import{project as n}from"../layers/graphics/data/projectionSupport.js";import{AAggregateCell as l}from"../views/2d/layers/features/aggregation/AAggregateCell.js";import{AccumulatedStatistics as d}from"../views/2d/layers/features/aggregation/AccumulatedStatistics.js";const c=32;class _ extends l{static create(t,e,o,s){const r=d.create(t),i=new Array(c);for(let a=0;a<i.length;a++)i[a]=null;return new _(r,e,o,s,i)}constructor(t,e,o,s,r){super(t),this.xNode=e,this.yNode=o,this.depth=s,this.children=r,this._objectIds=new Set,this._count=0,this._xWorldTotal=0,this._yWorldTotal=0,this._xGeohashTotal=0,this._yGeohashTotal=0,this.next=null}static get estimatedMemory(){let o=0;return o+=2*t,o+=e*c,o+=d.estimatedMemory,o}get id(){return`${this.xNode}.${this.yNode}`}get containedObjectIds(){return this._objectIds}get count(){return this._count}clone(){const t=new _(this._statistics.clone(),this.xNode,this.yNode,this.depth,this.children);return t._count=this._count,t._xWorldTotal=this._xWorldTotal,t._yWorldTotal=this._yWorldTotal,t._xGeohashTotal=this._xGeohashTotal,t._yGeohashTotal=this._yGeohashTotal,t.next=this.next,t._objectIds=new Set(this._objectIds),t}insert(t,e,s,r){let i=0,a=0;if("esriGeometryPoint"===t.geometryType)i=t.readXWorldSpace(),a=t.readYWorldSpace();else{const e=t.readCentroidWorldSpace();if(null==e)return;[i,a]=e.coords}const h=o(i,a,e,s);h&&(this._count+=1,this._xWorldTotal+=i,this._yWorldTotal+=a,this._xGeohashTotal+=h[0],this._yGeohashTotal+=h[1],this._statistics.insert(t,r),this._objectIds.add(t.getObjectId()))}merge(t){if(0!==t._count){this._count+=t._count,this._xWorldTotal+=t._xWorldTotal,this._yWorldTotal+=t._yWorldTotal,this._xGeohashTotal+=t._xWorldTotal,this._yGeohashTotal+=t._yWorldTotal,this._statistics.merge(t._statistics);for(const e of t._objectIds.values())this._objectIds.add(e)}}getCentroid(t){throw new Error("getCentroid not supported for GeohashNode")}getGeometry(t,e){const o=this._getLngLatBounds(),[s,h,l,d]=o,c=n({rings:[[[s,h],[s,d],[l,d],[l,h],[s,h]]]},r.WGS84,t),_=i(c);return null!=e?a(_,"esriGeometryPolygon",e,!1,!1):_}getGeometricCentroid(t,e){const o=this._getLngLatBounds(),[s,i,l,d]=o,c=n({x:(s+l)/2,y:(i+d)/2},r.WGS84,t),_=h(c);return null!=e?a(_,"esriGeometryPoint",e,!1,!1):_}getAttributes(){const t={aggregateId:this.id};for(const e of this._statistics.values())t[e.field.name]=e.value;return t.aggregateCount=this._count,t}find(t,e,o,s,r,i){if(s>=o)return this;const a=1-s%2,h=3*a+2*(1-a),n=2*a+3*(1-a),l=30-r-h,d=30-i-n,c=((t&7*a+3*(1-a)<<l)>>l)+((e&3*a+7*(1-a)<<d)>>d)*(8*a+4*(1-a)),_=this.children[c];return null==_?null:_.find(t,e,o,s+1,r+h,i+n)}_getLngLatBounds(){const t=this.depth,e=Math.ceil(t/2),o=Math.floor(t/2),r=30-(3*e+2*o),i=30-(2*e+3*o),a=this.xNode<<r,h=this.yNode<<i;return s({geohashX:a,geohashY:h},this.depth)}}export{_ as GeohashCell};
|
package/geohash/GeohashTree.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{
|
|
2
|
+
import{baseObjectMemory as t,estimateNumberMemory as e}from"../core/memoryEstimations.js";const n=32;class i{static create(t,e,s){const r=new Array(n);for(let n=0;n<r.length;n++)r[n]=null;return new i(t,e,s,r)}constructor(t,e,n,i){this.xNode=t,this.yNode=e,this.depth=n,this.children=i,this.indices=[],this.next=null}static get estimatedMemory(){let i=0;return i+=2*t,i+=e*n,i+=4*e,i}get id(){return`${this.xNode}.${this.yNode}`}get count(){return this.indices.length}insert(t){this.indices.push(t)}find(t,e,n,i,s,r){if(i>=n)return this;const h=1-i%2,o=3*h+2*(1-h),l=2*h+3*(1-h),c=30-s-o,d=30-r-l,u=((t&7*h+3*(1-h)<<c)>>c)+((e&3*h+7*(1-h)<<d)>>d)*(8*h+4*(1-h)),a=this.children[u];return null==a?null:a.find(t,e,n,i+1,s+o,r+l)}}class s{constructor(){this._size=0,this._depth=0,this._root=i.create(0,0,0)}destroy(){}get size(){return this._size}get depth(){return this._depth}get usedMemory(){return this._size*i.estimatedMemory}find(t,e,n){return this._root.find(t,e,n,0,0,0)}insert(t,e,n,s){let r=this._root,h=0,o=0,l=0;for(;null!==r;){if(r.insert(t.getIndex()),h>=s)return;const c=Math.ceil((h+1)/2),d=Math.floor((h+1)/2),u=1-h%2,a=30-(3*c+2*d),x=30-(2*c+3*d),f=(e&7*u+3*(1-u)<<a)>>a,m=(n&3*u+7*(1-u)<<x)>>x,M=f+m*(8*u+4*(1-u));o=o<<3*u+2*(1-u)|f,l=l<<2*u+3*(1-u)|m,null==r.children[M]&&(r.children[M]=i.create(o,l,h+1),this._depth=Math.max(this._depth,h+1),this._size+=1),h+=1,r=r.children[M]}}forEachInBounds(t,e){const{geohashBounds:n,level:i}=t;let s=this._root;for(;null!==s;){const t=s.depth,r=s.xNode,h=s.yNode;if(t>=i){e(s),s=s.next;continue}const o=Math.ceil((t+1)/2),l=Math.floor((t+1)/2),c=1-t%2,d=30-(3*o+2*l),u=30-(2*o+3*l),a=~((1<<d)-1),x=~((1<<u)-1),f=(n.xLL&a)>>d,m=(n.yLL&x)>>u,M=(n.xTR&a)>>d,_=(n.yTR&x)>>u,y=r<<3*c+2*(1-c),g=h<<2*c+3*(1-c),p=y+8*c+4*(1-c),N=g+4*c+8*(1-c),z=Math.max(y,f),L=Math.max(g,m),w=Math.min(p,M),B=Math.min(N,_);let E=null,I=null;for(let e=L;e<=B;e++)for(let t=z;t<=w;t++){const n=t-y+(e-g)*(8*c+4*(1-c)),i=s.children[n];i&&(E||(E=i,E.next=s.next),I&&(I.next=i),I=i,i.next=s.next)}s=E||s.next}}}export{s as GeohashTree};
|
package/interfaces.d.ts
CHANGED
|
@@ -5276,6 +5276,20 @@ declare namespace __esri {
|
|
|
5276
5276
|
export type FieldsIndex<T extends import("./layers/support/Field.js").default = import("./layers/support/Field.js").default> = import("./layers/support/FieldsIndex.js").default<T>;
|
|
5277
5277
|
export const FieldsIndex: typeof import("./layers/support/FieldsIndex.js").default;
|
|
5278
5278
|
|
|
5279
|
+
/** @deprecated since 5.0. Refactor using \@arcgis/codemod */
|
|
5280
|
+
export type GeometryEncodingLocationProperties = import("./layers/support/GeometryEncodingLocation.js").GeometryEncodingLocationProperties;
|
|
5281
|
+
|
|
5282
|
+
/** @deprecated since 5.0. Refactor using \@arcgis/codemod */
|
|
5283
|
+
export type GeometryEncodingLocation = import("./layers/support/GeometryEncodingLocation.js").default;
|
|
5284
|
+
export const GeometryEncodingLocation: typeof import("./layers/support/GeometryEncodingLocation.js").default;
|
|
5285
|
+
|
|
5286
|
+
/** @deprecated since 5.0. Refactor using \@arcgis/codemod */
|
|
5287
|
+
export type GeometryEncodingWkbProperties = import("./layers/support/GeometryEncodingWkb.js").GeometryEncodingWkbProperties;
|
|
5288
|
+
|
|
5289
|
+
/** @deprecated since 5.0. Refactor using \@arcgis/codemod */
|
|
5290
|
+
export type GeometryEncodingWkb = import("./layers/support/GeometryEncodingWkb.js").default;
|
|
5291
|
+
export const GeometryEncodingWkb: typeof import("./layers/support/GeometryEncodingWkb.js").default;
|
|
5292
|
+
|
|
5279
5293
|
/** @deprecated since 5.0. Refactor using \@arcgis/codemod */
|
|
5280
5294
|
export type GeometryFieldsInfoProperties = import("./layers/support/GeometryFieldsInfo.js").GeometryFieldsInfoProperties;
|
|
5281
5295
|
|
|
@@ -5395,20 +5409,6 @@ declare namespace __esri {
|
|
|
5395
5409
|
export type OrderByInfo = import("./layers/support/OrderByInfo.js").default;
|
|
5396
5410
|
export const OrderByInfo: typeof import("./layers/support/OrderByInfo.js").default;
|
|
5397
5411
|
|
|
5398
|
-
/** @deprecated since 5.0. Refactor using \@arcgis/codemod */
|
|
5399
|
-
export type ParquetGeometryEncodingLocationProperties = import("./layers/support/ParquetGeometryEncodingLocation.js").ParquetGeometryEncodingLocationProperties;
|
|
5400
|
-
|
|
5401
|
-
/** @deprecated since 5.0. Refactor using \@arcgis/codemod */
|
|
5402
|
-
export type ParquetGeometryEncodingLocation = import("./layers/support/ParquetGeometryEncodingLocation.js").default;
|
|
5403
|
-
export const ParquetGeometryEncodingLocation: typeof import("./layers/support/ParquetGeometryEncodingLocation.js").default;
|
|
5404
|
-
|
|
5405
|
-
/** @deprecated since 5.0. Refactor using \@arcgis/codemod */
|
|
5406
|
-
export type ParquetGeometryEncodingWkbProperties = import("./layers/support/ParquetGeometryEncodingWkb.js").ParquetGeometryEncodingWkbProperties;
|
|
5407
|
-
|
|
5408
|
-
/** @deprecated since 5.0. Refactor using \@arcgis/codemod */
|
|
5409
|
-
export type ParquetGeometryEncodingWkb = import("./layers/support/ParquetGeometryEncodingWkb.js").default;
|
|
5410
|
-
export const ParquetGeometryEncodingWkb: typeof import("./layers/support/ParquetGeometryEncodingWkb.js").default;
|
|
5411
|
-
|
|
5412
5412
|
/** @deprecated since 5.0. Refactor using \@arcgis/codemod */
|
|
5413
5413
|
export type PixelBlockProperties = import("./layers/support/PixelBlock.js").PixelBlockProperties;
|
|
5414
5414
|
|
package/kernel.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,commitHash as revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="5.1";let s,r=e;function i(o){s=o}function t(e){const r=s?.findCredential(e);return r?.token?o(e,"token",r.token):e}r="5.1.0-next.
|
|
2
|
+
import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,commitHash as revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="5.1";let s,r=e;function i(o){s=o}function t(e){const r=s?.findCredential(e);return r?.token?o(e,"token",r.token):e}r="5.1.0-next.86",has("host-webworker")||globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),has("host-webworker");export{t as addTokenParameter,r as fullVersion,s as id,i as setId,e as version};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import i from"../request.js";import{has}from"../applications/Components/baUtils.js";import t from"../core/Accessor.js";import s from"../core/Error.js";import r from"../core/Logger.js";import{someMap as a}from"../core/MapUtils.js";import{createAbortError as n,isAborted as o,isAbortError as l}from"../core/promiseUtils.js";import{watch as d}from"../core/reactiveUtils.js";import{property as h,subclass as _}from"../core/accessorSupport/decorators.js";import y from"../geometry/SpatialReference.js";import{isGeographic as u}from"../geometry/support/spatialReferenceUtils.js";import c from"../geometry/support/WKIDUnitConversion.js";import{wasmFailedToInit as g,elevQueriesFull as m,elevQueriesGenericFail as p,invalidLayerView as w}from"./ILyr3DWasmPerSceneView.js";import{Lyr3DWorkerHandle as b}from"./Lyr3DWorkerHandle.js";import{getVCSFromHeightModelInfo as f}from"./support/tiles3DUtils.js";import{loadLyr3DMainWASM as v}from"../libs/lyr3d/Lyr3DModule.js";import{getElevationOffsetInMeters as D}from"../support/elevationInfoUtils.js";import{makeScheduleFunction as M}from"../views/3d/layers/support/makeScheduleFunction.js";import{TaskPriority as L}from"../views/support/Scheduler.js";import{Yield as k}from"../views/support/Yield.js";const R=3857,C=32662,S=4326,W=5773,V=115700;let j=class extends t{constructor(e){super(e),this._lyr3DMainPromise=null,this._lyr3DMain=null,this._layers=new Map,this._viewSR=null,this._lyr3DBusyCount=0,this._lyr3DInternalMemoryBytes=0,this._isTerrainReady=!1,this._hasLayerThatReplacesTerrain=!1,this._elevationQueries=new Map,this._pendingJobCompleted=new Array,this._pendingJobFailed=new Array,this._pendingRenderableCreated=new Array,this._debugFlags=new Set,this._debugLevel=0,this._wasmNotLoaded="method requiring WASM was called when WASM isn't loaded",this._pulseTaskHandle=null,this._cameraDirty=!0,this._cameraElevationDirty=!0,this._debugFlags.add(0),this._debugFlags.add(1),this._debugFlags.add(2)}_debugLog(e,i,t,s=!0){if(this._debugFlags.has(e)&&this._debugLevel>=i){const e=s?`[js] ${t}`:`${t}`;0===i||1===i?r.getLogger(this).error(e):2===i&&r.getLogger(this).warn(e),r.getLogger(this).info(e)}}get lyr3DInternalMemoryBytes(){return this._lyr3DInternalMemoryBytes}initialize(){this._debugLevel>2&&(r.getLogger(this).level="info"),this._debugLog(0,3,"Lyr3DWasmPerSceneView.initialize()"),this.addHandles([d(()=>this.view.state?.contentCamera,()=>this._updateWasmCamera()),d(()=>this.view.state?.contentCamera.relativeElevation,()=>{this._cameraElevationDirty=!0,this._markAllLayerViewsUpdating()})]),this._pulseTaskHandle=this.view.resourceController.scheduler.registerTask(L.LYR3D,this)}destroy(){this._debugLog(0,3,"Lyr3DWasmPerSceneView.destroy()"),this._lyr3DMain&&(this._layers.forEach(e=>{e.abortController.abort()}),this._elevationQueries.forEach((e,i)=>{this._lyr3DMain.cancel_elevation_query(i),e.rejectCallback(n())}),this._elevationQueries.clear(),this._lyr3DMain.uninitialize_lyr3d_wasm(),this._lyr3DMain=null),this._pendingJobCompleted.length=0,this._pendingJobFailed.length=0,this._pendingRenderableCreated.length=0;const e=this._workerHandle;e&&e.destroyWasm().then(()=>{this._workerHandle?.destroy(),this._workerHandle=null}),this._pulseTaskHandle?.remove(),this._pulseTaskHandle=null}get readyToRun(){return this._hasPendingPulseWork()}runTask(e){return this._pulseTask(e),k}_hasPendingPulseWork(){return!!this._lyr3DMain&&(this._cameraDirty||this._cameraElevationDirty||this._pendingJobCompleted.length>0||this._pendingJobFailed.length>0||this._pendingRenderableCreated.length>0||this._elevationQueries.size>0||a(this._layers,e=>this._isUpdating(e)))}addLayerView(e){return this._lyr3DMain?this._addLayerView(e):(this._debugLog(0,1,"Lyr3DWasmPerSceneView.add3DTilesLayerView() called when WASM wasn't initialized"),{wasmLayerId:g})}removeLayerView(e){if(!this._lyr3DMain)return this._debugLog(0,1,this._wasmNotLoaded),0;this._doRemoveLayerView(e);const i=this._layers.size;return 0===i&&(this._debugLog(0,3,"Lyr3DWasmPerSceneView.remove3DTilesLayerView() no Lyr3D layers left after removing a layer, destroying"),this.destroy()),i}getValidLayerViewCount(){if(!this._lyr3DMain)return this._debugLog(0,1,this._wasmNotLoaded),0;let e=0;return this._layers.forEach(i=>{i.layerView.wasmLayerId>=0&&++e}),e}setEnabled(e,i){if(!this._lyr3DMain)return void this._debugLog(0,1,this._wasmNotLoaded);const t=this._layers.get(e.wasmLayerId);if(t){this._lyr3DMain.set_enabled(e.wasmLayerId,i),t.needMemoryUsageUpdate=!0;const s=this._isUpdating(t);t.needFrame=!0,s||t.layerView.updatingFlagChanged()}}setLayerOffset(e,i){if(!this._lyr3DMain)return void this._debugLog(0,1,this._wasmNotLoaded);const t=this._layers.get(e.wasmLayerId);t&&(this._lyr3DMain.set_carto_offset_z(e.wasmLayerId,i),t.needFrame=!0,t.layerView.updatingFlagChanged())}getAttributionText(){if(!this._lyr3DMain)return this._debugLog(0,1,this._wasmNotLoaded),[];return this._lyr3DMain.get_current_attribution_text().split("|")}onRenderableEvicted(e,i,t){if(!this._lyr3DMain)return void this._debugLog(0,1,this._wasmNotLoaded);this._layers.get(e.wasmLayerId)&&this._lyr3DMain.on_renderable_evicted(e.wasmLayerId,i,t)}setMeshModifications(e,i){if(!this._lyr3DMain)return void this._debugLog(0,1,this._wasmNotLoaded);const t=this._layers.get(e.wasmLayerId);if(t){const s=this._lyr3DMain._malloc(8*i.length),r=new Float64Array(this._lyr3DMain.HEAPF64.buffer,s,i.length);for(let e=0;e<i.length;++e)r[e]=i[e];this._lyr3DMain.set_mesh_modification_polygons(e.wasmLayerId,s,i.length),this._lyr3DMain._free(s);const a=this._isUpdating(t);t.needFrame=!0,a||t.layerView.updatingFlagChanged()}}isUpdating(e){if(!this._lyr3DMain&&this._lyr3DMainPromise)return!0;const i=this._layers.get(e);return!!i&&(i.outstandingJobCount>0||i.outstandingRenderableCount>0||i.needFrame||this._lyr3DBusyCount>0)}initializeWasm(e,i){return this._lyr3DMain?Promise.resolve():this.view.renderSpatialReference?(this._debugLog(0,3,"Lyr3DWasmPerSceneView.initializeWasm()"),this._lyr3DMainPromise||(this._lyr3DMainPromise=v().then(t=>{this._lyr3DMain=t,this._lyr3DMainPromise=null;const s=this._lyr3DMain.addFunction(this._onNewJob.bind(this),"v"),r=this._lyr3DMain.addFunction(this._onNewRenderable.bind(this),"v"),a=this._lyr3DMain.addFunction(this._freeRenderables.bind(this),"viii"),n=this._lyr3DMain.addFunction(this._setRenderableVisibility.bind(this),"viiii"),o=this._lyr3DMain.addFunction(this._onWasmError.bind(this),"viiii"),l=this._lyr3DMain.addFunction(this._onElevQueryComplete.bind(this),"vi");if(!this.view.renderSpatialReference)return void(this._lyr3DMain=null);this._viewSR=this.view.renderSpatialReference?.toJSON();const d="global"===this.view.viewingMode?5:3;if(5===d)this._viewSR.wkid=this._viewSR.latestWkid=S,this._viewSR.vcsWkid=this._viewSR.latestVcsWkid=W;else if(this.view.renderSpatialReference?.isWebMercator)this._viewSR.wkid=this._viewSR.latestWkid=R,this._viewSR.vcsWkid=this._viewSR.latestVcsWkid=W;else if(this.view.renderSpatialReference?.wkid===C)this._viewSR.wkid=this._viewSR.latestWkid=S,this._viewSR.vcsWkid=this._viewSR.latestVcsWkid=W;else if(!this._viewSR.latestVcsWkid&&!this._viewSR.vcsWkid){const e=f(this.view.heightModelInfo);if(e)this._viewSR.vcsWkid=this._viewSR.latestVcsWkid=e;else{const e=this.view.heightModelInfo?.heightModel,i=!e||"gravity-related-height"===e;this._viewSR.vcsWkid=this._viewSR.latestVcsWkid=i?W:V}}const h=has("esri-lyr3D-max-concurrent-requests")??16;return this._lyr3DMain.initialize_lyr3d_wasm(o,s,r,a,n,l,e,i,d,this._cleanUpSR(this._makeSRWasmSerializable(this._viewSR)),Math.max(this._debugLevel,0),h)?(this._workerHandle=new b(M(this.view.resourceController)),this._workerHandle.promise?this._workerHandle.promise:void 0):(this._lyr3DMain=null,void this._debugLog(0,0,"Lyr3d Main WASM failed to initialize",!1))}).catch(e=>{this._debugLog(0,0,`Lyr3d WASM failed to download error = ${e}`,!1)})),this._lyr3DMainPromise):Promise.reject()}get isTerrainReady(){return this._isTerrainReady}setLodPixelThreshold(e,i){this._lyr3DMain?.set_lod_pixel_threshold(i);const t=this._layers.get(e.wasmLayerId);t&&(t.needFrame=!0,t.layerView.updatingFlagChanged())}setMaximumGaussianSplatCount(e){this._lyr3DMain.set_maximum_splat_count(e),this._layers.forEach(e=>{"gaussian-splat-3d"===e.layerView.type&&(e.needFrame=!0,e.layerView.updatingFlagChanged())})}queryElevation(e,i,t){if(!this._lyr3DMain)return Promise.reject(this._wasmNotLoaded);if(0===i.coordinates.length)return Promise.reject("no coordinates for elevation query");const s="global"===this.view.viewingMode?y.WGS84:this._viewSR.wkid===R?y.WebMercator:y.PlateCarree,r=i.projectSync(s);r&&(i=r);const a=2*i.coordinates.length,n=this._lyr3DMain._malloc(8*a),o=new Float64Array(this._lyr3DMain.HEAPF64.buffer,n,a);for(let y=0;y<i.coordinates.length;++y){const e=i.coordinates[y];o[2*y]=e.x,o[2*y+1]=e.y}const l=t?.maxGeometricError??0,d=this._lyr3DMain.create_elevation_query(e.wasmLayerId,l,n,a);if(this._lyr3DMain._free(n),d===m)return Promise.reject("max mesh elevation query limit exceeded");if(d===p)return Promise.reject("elevation query failed");const h={descriptor:i,signal:t?.signal,resolveCallback:null,rejectCallback:null},_=new Promise((e,i)=>{h.resolveCallback=e,h.rejectCallback=i});return this._elevationQueries.set(d,h),_}_checkForAbortedElevationQueries(){const e=[];this._elevationQueries.forEach((i,t)=>{o(i.signal)&&(this._lyr3DMain.cancel_elevation_query(t),i.rejectCallback(n()),e.push(t))});for(let i=0;i<e.length;++i)this._elevationQueries.delete(e[i])}_pulseTask(e){const i=this._lyr3DMain;if(i){if(this._cameraDirty){const e=this.view.state?.contentCamera;if(e){const{eye:t,center:s,up:r,near:a,far:n,fovY:o}=e,l=[e.viewport[2],e.viewport[3]],d={eye:t,center:s,up:r,near:a,far:n,fov:o,aspectRatio:e.width/e.height,viewport:l};i.set_camera_parameters(d),this._cameraDirty=!1}}if(this._cameraElevationDirty){const e=this.view.state?.contentCamera.relativeElevation;i.set_camera_elevation(e)}this._checkForAbortedElevationQueries();let t=0,s=0;this._layers.forEach(e=>{t+=e.layerView.usedMemory,s+=e.layerView.cachedMemory}),t/=1048576,s/=1048576;const r=this.view.resourceController.memoryController,a=r.usedMemory*r.maxMemory-t-this._lyr3DInternalMemoryBytes/1048576;this._lyr3DBusyCount=this._lyr3DMain.frame_pulse(r.memoryFactor,t,s,a,r.maxMemory),this._lyr3DInternalMemoryBytes=this._lyr3DMain.get_index_memory_bytes(),this._layers.forEach(e=>{this._cameraElevationDirty||(e.needFrame=!1),e.layerView.updatingFlagChanged()}),this._hasLayerThatReplacesTerrain&&!this._isTerrainReady&&(this._isTerrainReady=this._lyr3DMain.is_terrain_ready(),this._isTerrainReady&&this.notifyChange("isTerrainReady")),this._flushPendingWasmCalls(e),this._cameraElevationDirty=!1}}_isUpdating(e){return e.outstandingJobCount>0||e.outstandingRenderableCount>0||e.needFrame||this._cameraDirty||this._lyr3DBusyCount>0}_incrementJobCount(e,i){if(i.isForElevationQuery)return;const t=this._isUpdating(e);e.outstandingJobCount+=1,t||e.layerView.updatingFlagChanged()}_decrementJobCount(e,i){if(i.isForElevationQuery)return;const t=this._isUpdating(e);e.outstandingJobCount-=1;t!==this._isUpdating(e)&&e.layerView.updatingFlagChanged()}_incrementRenderableCount(e){const i=this._isUpdating(e);e.outstandingRenderableCount+=1,i||e.layerView.updatingFlagChanged()}_decrementRenderableCount(e){const i=this._isUpdating(e);e.outstandingRenderableCount-=1;i!==this._isUpdating(e)&&e.layerView.updatingFlagChanged()}_flushPendingWasmCalls(e){this._lyr3DMain&&(this._flushPendingCalls(this._pendingJobFailed,e),this._flushPendingCalls(this._pendingJobCompleted,e),this._flushPendingCalls(this._pendingRenderableCreated,e))}_flushPendingCalls(e,i){for(;!i.done&&e.length>0;){e.shift()(this._lyr3DMain),i.madeProgress()}}_onJobFailed(e,i,t){i.error.length&&this._debugLog(1,1,i.error,!1),this._lyr3DMain&&!e.layerView.destroyed&&this._pendingJobFailed.push(e=>e.on_job_failed(t.jobId,t.desc)),this._decrementJobCount(e,t)}_onJobSucceeded(e,i,t){if(this._lyr3DMain){if(e.layerView.destroyed)return void this._pendingJobFailed.push(e=>e.on_job_failed(t.jobId,t.desc));const{data:s}=i,r=e=>{const r=s.byteLength,a=e._malloc(r);try{new Uint8Array(e.HEAPU8.buffer,a,r).set(s),e.on_job_completed(t.jobId,i.jobDescJson,a,r)}finally{e._free(a)}};this._pendingJobCompleted.push(r)}this._decrementJobCount(e,t)}_getRequestPromises(e,t,s,r){const a=[];for(const n of e){const e=new URL(n);if("integrated-mesh-3dtiles"===r.type){if(e.origin===s.origin&&e.pathname===s.pathname){if(r.rootTileset){a.push(Promise.resolve(r.rootTileset.slice()));continue}}else r.session&&e.searchParams.set("session",r.session)}a.push(i(e.toString(),t).then(e=>e.data))}return a}_getInitialPromise(e,i,t,s,r,a,n){const o=this._getRequestPromises(e.urls,i,t,s);return Promise.all(o).then(e=>(r.inputs=e,this._workerHandle.invoke(r,a))).then(e=>e).catch(i=>{let t=1;return l(i)?this._debugLog(1,2,`job ${e.jobId} was cancelled.`):n&&400===i.details?.httpStatus?(t=3,this._debugLog(1,2,"Session expired, trying to create new Session.")):this._debugLog(1,1,`job ${e.jobId} failed with error ${i}.`),{status:t,error:"",jobDescJson:"",data:new Uint8Array(0),missingInputUrls:[],inputs:[]}})}async _onNewJob(){const e=this._lyr3DMain.get_next_job(),i=this._layers.get(e.layerId);if(!i)return;this._incrementJobCount(i,e);const t=i.abortController.signal,s=i.layerView.layer,r="integrated-mesh-3dtiles"===s.type?s.key:null,a="integrated-mesh-3dtiles"===s.type?s.session:null,n={responseType:"array-buffer",signal:t,query:{...i.customParameters,token:i.apiKey,key:r}},o={id:e.jobId,inputs:[],jobDescJson:e.desc.slice(),isMissingResourceCase:!1},d=new URL(s.url),h=r=>{if(1===r.status)this._onJobFailed(i,r,e);else if(0===r.status)this._onJobSucceeded(i,r,e);else if(2===r.status){const a=this._getRequestPromises(r.missingInputUrls,n,d,s);Promise.all(a).then(e=>{o.jobDescJson=r.jobDescJson,r.originalInputs?o.inputs=r.originalInputs:o.inputs=[],o.isMissingResourceCase=!0;for(const i of e)o.inputs.push(i);return this._workerHandle.invoke(o,t)}).then(t=>{1===t.status?this._onJobFailed(i,t,e):0===t.status&&this._onJobSucceeded(i,t,e)}).catch(t=>{this._decrementJobCount(i,e),l(t)?this._debugLog(1,2,`job ${e.jobId} was cancelled.`):this._debugLog(1,1,`job ${e.jobId} failed with error ${t}.`),this._lyr3DMain&&this._pendingJobFailed.push(i=>i.on_job_failed(e.jobId,e.desc))})}};try{const i=await this._getInitialPromise(e,n,d,s,o,t,a);if(3===i.status&&"integrated-mesh-3dtiles"===s.type){a===s.session&&null!==s.session&&await s.requestRootAndSession(t);h(await this._getInitialPromise(e,n,d,s,o,t,s.session))}else h(i)}catch(_){_&&this._debugLog(1,1,_.toString(),!1),this._lyr3DMain&&this._pendingJobFailed.push(i=>i.on_job_failed(e.jobId,e.desc)),this._decrementJobCount(i,e)}}_onNewRenderable(){const e=this._lyr3DMain.get_next_renderable(),{meshData:i}=e;i.data&&i.data.byteLength>0&&(i.data=i.data.slice());const t=this._layers.get(e.layerId);t&&(this._incrementRenderableCount(t),t.layerView.createRenderable(e).then(i=>{const s=i.numGaussians??0;if(this._lyr3DMain&&!t.layerView.destroyed){const{layerId:t,handle:r}=e,{memUsageBytes:a}=i;this._pendingRenderableCreated.push(e=>e.on_renderable_created(!0,t,r,a,s))}this._decrementRenderableCount(t)}).catch(i=>{if(l(i)||this._debugLog(2,1,`createRenderable failed with error ${i}.`),this._lyr3DMain&&!t.layerView.destroyed){const{layerId:i,handle:t}=e;this._pendingRenderableCreated.push(e=>e.on_renderable_created(!1,i,t,0,0))}this._decrementRenderableCount(t)}))}_freeRenderables(e,i,t){if(t<1)return;const s=this._layers.get(e);if(!s)return;const r=s.layerView,a=[],n=new Uint32Array(this._lyr3DMain.HEAPU32.buffer,i,t);for(let o=0;o<t;++o)a.push(n[o]);for(let o=0;o<t;++o)r.freeRenderable(a[o])}_setRenderableVisibility(e,i,t,s){if(s<1)return;const r=this._layers.get(e);if(!r)return;const a=r.layerView,n=[],o=[],l=new Uint32Array(this._lyr3DMain.HEAPU32.buffer,i,s),d=new Uint8Array(this._lyr3DMain.HEAPU8.buffer,t,s);for(let h=0;h<s;++h)n.push(l[h]),o.push(!!(1&d[h]));a.setRenderableVisibility(n,o,s)}_onWasmError(e,i,t,s){this._lyr3DMain&&this._debugLog(t,s,this._lyr3DMain.UTF8ToString(e,i),!1)}_onElevQueryComplete(e){const i=this._elevationQueries.get(e),t=this._lyr3DMain.get_elevation_query_result(e);if(i)if(t.succeeded&&t.zs){const s=t.zs.slice(),r=i.descriptor.clone();for(let e=0;e<s.length;++e)r.coordinates[e].z=s[e];this._debugLog(2,3,`Success EQ ${e}, number points ${s.length}.`),i.resolveCallback(r),this._elevationQueries.delete(e)}else i.rejectCallback(new s("elevation-query:error",t?.error??"Elevation query failed")),this._elevationQueries.delete(e);else this._debugLog(2,1,`_onElevQueryComplete called for unknown queryId ${e}.`)}_doRemoveLayerView(e){const i=this._layers.get(e.wasmLayerId);return!!i&&(i.abortController.abort(),this._lyr3DMain.remove_layer(e.wasmLayerId),this._is3DTilesIMLayerView(e)&&e.layer.replacesTerrain&&(this._hasLayerThatReplacesTerrain=!1,this._isTerrainReady=!1,this.notifyChange("isTerrainReady")),this._layers.delete(e.wasmLayerId),!0)}_is3DTilesIMLayerView(e){return"integrated-mesh-3dtiles"===e.layer.type}_isGaussianSplatLayerView(e){return"gaussian-splat"===e.layer.type}_isGaussianSplatLayer(e){return"gaussian-splat"===e.type}_toWasmQuality(e){switch(e){case"low":return 1;case"medium":return 2;case"high":return 3}}_addLayerView(e){const i=e.layer;if(!i.url||!i.rootTilesetJSON)return{wasmLayerId:w};const t="integrated-mesh-3dtiles"===i.type?0:2,s=this._lyr3DMain.validate_root_tileset(JSON.stringify(i.rootTilesetJSON),t);if(0!==s.errorCode)return{wasmLayerId:w,check:s};const a=this._lyr3DMain.get_next_layer_id(),n=new AbortController;this._layers.set(a,{layerView:e,abortController:n,needMemoryUsageUpdate:!1,outstandingJobCount:0,outstandingRenderableCount:0,customParameters:i.customParameters,apiKey:i.apiKey,needFrame:!0});const o=D(i.elevationInfo),l=this._toWasmQuality(this.view?.qualityProfile),d=e=>r.getLogger(this).error("add-spatial-reference-error","Error when adding SR:",e);let h=!1;if(this._isGaussianSplatLayerView(e)&&this._isGaussianSplatLayer(i)){let t=i.spatialReference;if(e.useEsriCrs&&i.esriCrsSpatialReference){t=i.esriCrsSpatialReference;const s=u(t);let r=1,a=1;!s&&t.wkid&&-1!==t.wkid&&(r=c.values[c[t.wkid]],a=e.metersPerVCSUnit),this._workerHandle.addSpatialReferenceInfo(this._cleanUpSR(this._makeSRWasmSerializable(t)),s,r,a).catch(d),t.vcsWkid&&this._viewSR.vcsWkid&&this._viewSR.vcsWkid!==t.vcsWkid&&this._workerHandle.addSpatialReferenceInfo(this._cleanUpSR(this._makeSRWasmSerializable(this._viewSR)),!1,1,1).catch(d)}h=this._lyr3DMain.add_gaussian_splat_layer(l,i.url,a,o)}else this._is3DTilesIMLayerView(e)&&(h=this._lyr3DMain.add_3dtiles_layer(l,i.url,a,o,e.layer.replacesTerrain),h&&e.layer.replacesTerrain&&(this._hasLayerThatReplacesTerrain=!0,this._isTerrainReady=!1,this.notifyChange("isTerrainReady")));return h?(this._updateWasmCamera(),e.updatingFlagChanged(),{wasmLayerId:a}):(this._layers.delete(a),{wasmLayerId:w})}_updateWasmCamera(){const e=this.view.state?.contentCamera;e&&this._lyr3DMain&&(this._cameraDirty=!0,this._markAllLayerViewsUpdating())}_markAllLayerViewsUpdating(){this._layers.forEach(e=>{const i=this._isUpdating(e);e.needFrame=!0,i||e.layerView.updatingFlagChanged()})}_makeSRWasmSerializable(e){return{wkid:e?.wkid??-1,latestWkid:e?.latestWkid??-1,vcsWkid:e?.vcsWkid??-1,latestVcsWkid:e?.latestVcsWkid??-1,wkt:e?.wkt??""}}_cleanUpSR(e){return-1===e?.wkid&&e.latestWkid&&-1!==e.latestWkid?e.wkid=e.latestWkid:-1===e?.latestWkid&&e.wkid&&-1!==e.wkid&&(e.latestWkid=e.wkid),-1===e?.vcsWkid&&e.latestVcsWkid&&-1!==e.latestVcsWkid?e.vcsWkid=e.latestVcsWkid:-1===e?.latestVcsWkid&&e.vcsWkid&&-1!==e.vcsWkid&&(e.latestVcsWkid=e.vcsWkid),e}};e([h({constructOnly:!0})],j.prototype,"view",void 0),e([h({readOnly:!0})],j.prototype,"isTerrainReady",null),j=e([_("esri.layers.Lyr3DWasmPerSceneView")],j);const I=j;export{I as default};
|
|
2
|
+
import{__decorate as e}from"tslib";import i from"../request.js";import{has}from"../applications/Components/baUtils.js";import t from"../core/Accessor.js";import s from"../core/Error.js";import r from"../core/Logger.js";import{someMap as a}from"../core/MapUtils.js";import{createAbortError as n,isAborted as o,isAbortError as l}from"../core/promiseUtils.js";import{watch as d}from"../core/reactiveUtils.js";import{property as h,subclass as _}from"../core/accessorSupport/decorators.js";import y from"../geometry/SpatialReference.js";import{isGeographic as u}from"../geometry/support/spatialReferenceUtils.js";import c from"../geometry/support/WKIDUnitConversion.js";import{wasmFailedToInit as g,elevQueriesFull as m,elevQueriesGenericFail as p,invalidLayerView as w}from"./ILyr3DWasmPerSceneView.js";import{Lyr3DWorkerHandle as b}from"./Lyr3DWorkerHandle.js";import{getVCSFromHeightModelInfo as f}from"./support/tiles3DUtils.js";import{loadLyr3DMainWASM as v}from"../libs/lyr3d/Lyr3DModule.js";import{getElevationOffsetInMeters as D}from"../support/elevationInfoUtils.js";import{makeScheduleFunction as R}from"../views/3d/layers/support/makeScheduleFunction.js";import{TaskPriority as M}from"../views/support/Scheduler.js";import{Yield as k}from"../views/support/Yield.js";const L=3857,C=32662,S=4326,W=5773;let V=class extends t{constructor(e){super(e),this._lyr3DMainPromise=null,this._lyr3DMain=null,this._layers=new Map,this._viewSR=null,this._haveAddedViewSRForNoOpPrj=!1,this._lyr3DBusyCount=0,this._lyr3DInternalMemoryBytes=0,this._isTerrainReady=!1,this._hasLayerThatReplacesTerrain=!1,this._elevationQueries=new Map,this._pendingJobCompleted=new Array,this._pendingJobFailed=new Array,this._pendingRenderableCreated=new Array,this._debugFlags=new Set,this._debugLevel=2,this._wasmNotLoaded="method requiring WASM was called when WASM isn't loaded",this._pulseTaskHandle=null,this._cameraDirty=!0,this._cameraElevationDirty=!0,this._debugFlags.add(0),this._debugFlags.add(1),this._debugFlags.add(2)}_debugLog(e,i,t,s=!0){if(this._debugFlags.has(e)&&this._debugLevel>=i){const e=s?`[js] ${t}`:`${t}`;0===i||1===i?r.getLogger(this).error(e):2===i&&r.getLogger(this).warn(e),r.getLogger(this).info(e)}}get viewSR(){return this._viewSR}get lyr3DInternalMemoryBytes(){return this._lyr3DInternalMemoryBytes}initialize(){this._debugLevel>2&&(r.getLogger(this).level="info"),this._debugLog(0,3,"Lyr3DWasmPerSceneView.initialize()"),this.addHandles([d(()=>this.view.state?.contentCamera,()=>this._updateWasmCamera()),d(()=>this.view.state?.contentCamera.relativeElevation,()=>{this._cameraElevationDirty=!0,this._markAllLayerViewsUpdating()})]),this._pulseTaskHandle=this.view.resourceController.scheduler.registerTask(M.LYR3D,this)}destroy(){this._debugLog(0,3,"Lyr3DWasmPerSceneView.destroy()"),this._lyr3DMain&&(this._layers.forEach(e=>{e.abortController.abort()}),this._elevationQueries.forEach((e,i)=>{this._lyr3DMain.cancel_elevation_query(i),e.rejectCallback(n())}),this._elevationQueries.clear(),this._lyr3DMain.uninitialize_lyr3d_wasm(),this._lyr3DMain=null),this._pendingJobCompleted.length=0,this._pendingJobFailed.length=0,this._pendingRenderableCreated.length=0;const e=this._workerHandle;e&&e.destroyWasm().then(()=>{this._workerHandle?.destroy(),this._workerHandle=null}),this._pulseTaskHandle?.remove(),this._pulseTaskHandle=null}get readyToRun(){return this._hasPendingPulseWork()}runTask(e){return this._pulseTask(e),k}_hasPendingPulseWork(){return!!this._lyr3DMain&&(this._cameraDirty||this._cameraElevationDirty||this._pendingJobCompleted.length>0||this._pendingJobFailed.length>0||this._pendingRenderableCreated.length>0||this._elevationQueries.size>0||a(this._layers,e=>this._isUpdating(e)))}addLayerView(e){return this._lyr3DMain?this._addLayerView(e):(this._debugLog(0,1,"Lyr3DWasmPerSceneView.add3DTilesLayerView() called when WASM wasn't initialized"),{wasmLayerId:g})}removeLayerView(e){if(!this._lyr3DMain)return this._debugLog(0,1,this._wasmNotLoaded),0;this._doRemoveLayerView(e);const i=this._layers.size;return 0===i&&(this._debugLog(0,3,"Lyr3DWasmPerSceneView.remove3DTilesLayerView() no Lyr3D layers left after removing a layer, destroying"),this.destroy()),i}getValidLayerViewCount(){if(!this._lyr3DMain)return this._debugLog(0,1,this._wasmNotLoaded),0;let e=0;return this._layers.forEach(i=>{i.layerView.wasmLayerId>=0&&++e}),e}setEnabled(e,i){if(!this._lyr3DMain)return void this._debugLog(0,1,this._wasmNotLoaded);const t=this._layers.get(e.wasmLayerId);if(t){this._lyr3DMain.set_enabled(e.wasmLayerId,i),t.needMemoryUsageUpdate=!0;const s=this._isUpdating(t);t.needFrame=!0,s||t.layerView.updatingFlagChanged()}}setLayerOffset(e,i){if(!this._lyr3DMain)return void this._debugLog(0,1,this._wasmNotLoaded);const t=this._layers.get(e.wasmLayerId);t&&(this._lyr3DMain.set_carto_offset_z(e.wasmLayerId,i),t.needFrame=!0,t.layerView.updatingFlagChanged())}getAttributionText(){if(!this._lyr3DMain)return this._debugLog(0,1,this._wasmNotLoaded),[];return this._lyr3DMain.get_current_attribution_text().split("|")}onRenderableEvicted(e,i,t){if(!this._lyr3DMain)return void this._debugLog(0,1,this._wasmNotLoaded);this._layers.get(e.wasmLayerId)&&this._lyr3DMain.on_renderable_evicted(e.wasmLayerId,i,t)}setMeshModifications(e,i){if(!this._lyr3DMain)return void this._debugLog(0,1,this._wasmNotLoaded);const t=this._layers.get(e.wasmLayerId);if(t){const s=this._lyr3DMain._malloc(8*i.length),r=new Float64Array(this._lyr3DMain.HEAPF64.buffer,s,i.length);for(let e=0;e<i.length;++e)r[e]=i[e];this._lyr3DMain.set_mesh_modification_polygons(e.wasmLayerId,s,i.length),this._lyr3DMain._free(s);const a=this._isUpdating(t);t.needFrame=!0,a||t.layerView.updatingFlagChanged()}}isUpdating(e){if(!this._lyr3DMain&&this._lyr3DMainPromise)return!0;const i=this._layers.get(e);return!!i&&(i.outstandingJobCount>0||i.outstandingRenderableCount>0||i.needFrame||this._lyr3DBusyCount>0)}initializeWasm(e,i){return this._lyr3DMain?Promise.resolve():this.view.renderSpatialReference?(this._debugLog(0,3,"Lyr3DWasmPerSceneView.initializeWasm()"),this._lyr3DMainPromise||(this._lyr3DMainPromise=v().then(t=>{this._lyr3DMain=t,this._lyr3DMainPromise=null;const s=this._lyr3DMain.addFunction(this._onNewJob.bind(this),"v"),r=this._lyr3DMain.addFunction(this._onNewRenderable.bind(this),"v"),a=this._lyr3DMain.addFunction(this._freeRenderables.bind(this),"viii"),n=this._lyr3DMain.addFunction(this._setRenderableVisibility.bind(this),"viiii"),o=this._lyr3DMain.addFunction(this._onWasmError.bind(this),"viiii"),l=this._lyr3DMain.addFunction(this._onElevQueryComplete.bind(this),"vi");if(!this.view.renderSpatialReference)return void(this._lyr3DMain=null);this._viewSR=this.view.renderSpatialReference?.toJSON();let d="global"===this.view.viewingMode?6:4;6===d?(this._viewSR.wkid=this._viewSR.latestWkid=S,this._viewSR.vcsWkid=this._viewSR.latestVcsWkid=W,this._viewSR.wkt=""):(this._viewSR.vcsWkid||(this._viewSR.vcsWkid=f(this.view.heightModelInfo)),this.view.renderSpatialReference?.isWebMercator?(this._viewSR.wkid=this._viewSR.latestWkid=L,this._viewSR.vcsWkid||(this._viewSR.vcsWkid=this._viewSR.latestVcsWkid=W)):this.view.renderSpatialReference?.wkid===C?(this._viewSR.wkid=this._viewSR.latestWkid=S,d=3,this._viewSR.vcsWkid||(this._viewSR.vcsWkid=this._viewSR.latestVcsWkid=W)):this._viewSR.vcsWkid||this._viewSR.latestVcsWkid||(this._viewSR.vcsWkid=this._viewSR.latestVcsWkid=-1));const h=has("esri-lyr3D-max-concurrent-requests")??16;return this._lyr3DMain.initialize_lyr3d_wasm(o,s,r,a,n,l,e,i,d,this._cleanUpSR(this._makeSRWasmSerializable(this._viewSR)),Math.max(this._debugLevel,0),h)?(this._workerHandle=new b(R(this.view.resourceController)),this._workerHandle.promise?this._workerHandle.promise:void 0):(this._lyr3DMain=null,void this._debugLog(0,0,"Lyr3d Main WASM failed to initialize",!1))}).catch(e=>{this._debugLog(0,0,`Lyr3d WASM failed to download error = ${e}`,!1)})),this._lyr3DMainPromise):Promise.reject()}get isTerrainReady(){return this._isTerrainReady}setLodPixelThreshold(e,i){this._lyr3DMain?.set_lod_pixel_threshold(i);const t=this._layers.get(e.wasmLayerId);t&&(t.needFrame=!0,t.layerView.updatingFlagChanged())}setMaximumGaussianSplatCount(e){this._lyr3DMain.set_maximum_splat_count(e),this._layers.forEach(e=>{"gaussian-splat-3d"===e.layerView.type&&(e.needFrame=!0,e.layerView.updatingFlagChanged())})}queryElevation(e,i,t){if(!this._lyr3DMain)return Promise.reject(this._wasmNotLoaded);if(0===i.coordinates.length)return Promise.reject("no coordinates for elevation query");const s="global"===this.view.viewingMode?y.WGS84:this._viewSR.wkid===L?y.WebMercator:y.PlateCarree,r=i.projectSync(s);r&&(i=r);const a=2*i.coordinates.length,n=this._lyr3DMain._malloc(8*a),o=new Float64Array(this._lyr3DMain.HEAPF64.buffer,n,a);for(let y=0;y<i.coordinates.length;++y){const e=i.coordinates[y];o[2*y]=e.x,o[2*y+1]=e.y}const l=t?.maxGeometricError??0,d=this._lyr3DMain.create_elevation_query(e.wasmLayerId,l,n,a);if(this._lyr3DMain._free(n),d===m)return Promise.reject("max mesh elevation query limit exceeded");if(d===p)return Promise.reject("elevation query failed");const h={descriptor:i,signal:t?.signal,resolveCallback:null,rejectCallback:null},_=new Promise((e,i)=>{h.resolveCallback=e,h.rejectCallback=i});return this._elevationQueries.set(d,h),_}_checkForAbortedElevationQueries(){const e=[];this._elevationQueries.forEach((i,t)=>{o(i.signal)&&(this._lyr3DMain.cancel_elevation_query(t),i.rejectCallback(n()),e.push(t))});for(let i=0;i<e.length;++i)this._elevationQueries.delete(e[i])}_pulseTask(e){const i=this._lyr3DMain;if(i){if(this._cameraDirty){const e=this.view.state?.contentCamera;if(e){const{eye:t,center:s,up:r,near:a,far:n,fovY:o}=e,l=[e.viewport[2],e.viewport[3]],d={eye:t,center:s,up:r,near:a,far:n,fov:o,aspectRatio:e.width/e.height,viewport:l};i.set_camera_parameters(d),this._cameraDirty=!1}}if(this._cameraElevationDirty){const e=this.view.state?.contentCamera.relativeElevation;i.set_camera_elevation(e)}this._checkForAbortedElevationQueries();let t=0,s=0;this._layers.forEach(e=>{t+=e.layerView.usedMemory,s+=e.layerView.cachedMemory}),t/=1048576,s/=1048576;const r=this.view.resourceController.memoryController,a=r.usedMemory*r.maxMemory-t-this._lyr3DInternalMemoryBytes/1048576;this._lyr3DBusyCount=this._lyr3DMain.frame_pulse(r.memoryFactor,t,s,a,r.maxMemory),this._lyr3DInternalMemoryBytes=this._lyr3DMain.get_index_memory_bytes(),this._layers.forEach(e=>{this._cameraElevationDirty||(e.needFrame=!1),e.layerView.updatingFlagChanged()}),this._hasLayerThatReplacesTerrain&&!this._isTerrainReady&&(this._isTerrainReady=this._lyr3DMain.is_terrain_ready(),this._isTerrainReady&&this.notifyChange("isTerrainReady")),this._flushPendingWasmCalls(e),this._cameraElevationDirty=!1}}_isUpdating(e){return e.outstandingJobCount>0||e.outstandingRenderableCount>0||e.needFrame||this._cameraDirty||this._lyr3DBusyCount>0}_incrementJobCount(e,i){if(i.isForElevationQuery)return;const t=this._isUpdating(e);e.outstandingJobCount+=1,t||e.layerView.updatingFlagChanged()}_decrementJobCount(e,i){if(i.isForElevationQuery)return;const t=this._isUpdating(e);e.outstandingJobCount-=1;t!==this._isUpdating(e)&&e.layerView.updatingFlagChanged()}_incrementRenderableCount(e){const i=this._isUpdating(e);e.outstandingRenderableCount+=1,i||e.layerView.updatingFlagChanged()}_decrementRenderableCount(e){const i=this._isUpdating(e);e.outstandingRenderableCount-=1;i!==this._isUpdating(e)&&e.layerView.updatingFlagChanged()}_flushPendingWasmCalls(e){this._lyr3DMain&&(this._flushPendingCalls(this._pendingJobFailed,e),this._flushPendingCalls(this._pendingJobCompleted,e),this._flushPendingCalls(this._pendingRenderableCreated,e))}_flushPendingCalls(e,i){for(;!i.done&&e.length>0;){e.shift()(this._lyr3DMain),i.madeProgress()}}_onJobFailed(e,i,t){i.error.length&&this._debugLog(1,1,i.error,!1),this._lyr3DMain&&!e.layerView.destroyed&&this._pendingJobFailed.push(e=>e.on_job_failed(t.jobId,t.desc)),this._decrementJobCount(e,t)}_onJobSucceeded(e,i,t){if(this._lyr3DMain){if(e.layerView.destroyed)return void this._pendingJobFailed.push(e=>e.on_job_failed(t.jobId,t.desc));const{data:s}=i,r=e=>{const r=s.byteLength,a=e._malloc(r);try{new Uint8Array(e.HEAPU8.buffer,a,r).set(s),e.on_job_completed(t.jobId,i.jobDescJson,a,r)}finally{e._free(a)}};this._pendingJobCompleted.push(r)}this._decrementJobCount(e,t)}_getRequestPromises(e,t,s,r){const a=[];for(const n of e){const e=new URL(n);if("integrated-mesh-3dtiles"===r.type){if(e.origin===s.origin&&e.pathname===s.pathname){if(r.rootTileset){a.push(Promise.resolve(r.rootTileset.slice()));continue}}else r.session&&e.searchParams.set("session",r.session)}a.push(i(e.toString(),t).then(e=>e.data))}return a}_getInitialPromise(e,i,t,s,r,a,n){const o=this._getRequestPromises(e.urls,i,t,s);return Promise.all(o).then(e=>(r.inputs=e,this._workerHandle.invoke(r,a))).then(e=>e).catch(i=>{let t=1;return l(i)?this._debugLog(1,2,`job ${e.jobId} was cancelled.`):n&&400===i.details?.httpStatus?(t=3,this._debugLog(1,2,"Session expired, trying to create new Session.")):this._debugLog(1,1,`job ${e.jobId} failed with error ${i}.`),{status:t,error:"",jobDescJson:"",data:new Uint8Array(0),missingInputUrls:[],inputs:[]}})}async _onNewJob(){const e=this._lyr3DMain.get_next_job(),i=this._layers.get(e.layerId);if(!i)return;this._incrementJobCount(i,e);const t=i.abortController.signal,s=i.layerView.layer,r="integrated-mesh-3dtiles"===s.type?s.key:null,a="integrated-mesh-3dtiles"===s.type?s.session:null,n={responseType:"array-buffer",signal:t,query:{...i.customParameters,token:i.apiKey,key:r}},o={id:e.jobId,inputs:[],jobDescJson:e.desc.slice(),isMissingResourceCase:!1},d=new URL(s.url),h=r=>{if(1===r.status)this._onJobFailed(i,r,e);else if(0===r.status)this._onJobSucceeded(i,r,e);else if(2===r.status){const a=this._getRequestPromises(r.missingInputUrls,n,d,s);Promise.all(a).then(e=>{o.jobDescJson=r.jobDescJson,r.originalInputs?o.inputs=r.originalInputs:o.inputs=[],o.isMissingResourceCase=!0;for(const i of e)o.inputs.push(i);return this._workerHandle.invoke(o,t)}).then(t=>{1===t.status?this._onJobFailed(i,t,e):0===t.status&&this._onJobSucceeded(i,t,e)}).catch(t=>{this._decrementJobCount(i,e),l(t)?this._debugLog(1,2,`job ${e.jobId} was cancelled.`):this._debugLog(1,1,`job ${e.jobId} failed with error ${t}.`),this._lyr3DMain&&this._pendingJobFailed.push(i=>i.on_job_failed(e.jobId,e.desc))})}};try{const i=await this._getInitialPromise(e,n,d,s,o,t,a);if(3===i.status&&"integrated-mesh-3dtiles"===s.type){a===s.session&&null!==s.session&&await s.requestRootAndSession(t);h(await this._getInitialPromise(e,n,d,s,o,t,s.session))}else h(i)}catch(_){_&&this._debugLog(1,1,_.toString(),!1),this._lyr3DMain&&this._pendingJobFailed.push(i=>i.on_job_failed(e.jobId,e.desc)),this._decrementJobCount(i,e)}}_onNewRenderable(){const e=this._lyr3DMain.get_next_renderable(),{meshData:i}=e;i.data&&i.data.byteLength>0&&(i.data=i.data.slice());const t=this._layers.get(e.layerId);t&&(this._incrementRenderableCount(t),t.layerView.createRenderable(e).then(i=>{const s=i.numGaussians??0;if(this._lyr3DMain&&!t.layerView.destroyed){const{layerId:t,handle:r}=e,{memUsageBytes:a}=i;this._pendingRenderableCreated.push(e=>e.on_renderable_created(!0,t,r,a,s))}this._decrementRenderableCount(t)}).catch(i=>{if(l(i)||this._debugLog(2,1,`createRenderable failed with error ${i}.`),this._lyr3DMain&&!t.layerView.destroyed){const{layerId:i,handle:t}=e;this._pendingRenderableCreated.push(e=>e.on_renderable_created(!1,i,t,0,0))}this._decrementRenderableCount(t)}))}_freeRenderables(e,i,t){if(t<1)return;const s=this._layers.get(e);if(!s)return;const r=s.layerView,a=[],n=new Uint32Array(this._lyr3DMain.HEAPU32.buffer,i,t);for(let o=0;o<t;++o)a.push(n[o]);for(let o=0;o<t;++o)r.freeRenderable(a[o])}_setRenderableVisibility(e,i,t,s){if(s<1)return;const r=this._layers.get(e);if(!r)return;const a=r.layerView,n=[],o=[],l=new Uint32Array(this._lyr3DMain.HEAPU32.buffer,i,s),d=new Uint8Array(this._lyr3DMain.HEAPU8.buffer,t,s);for(let h=0;h<s;++h)n.push(l[h]),o.push(!!(1&d[h]));a.setRenderableVisibility(n,o,s)}_onWasmError(e,i,t,s){this._lyr3DMain&&this._debugLog(t,s,this._lyr3DMain.UTF8ToString(e,i),!1)}_onElevQueryComplete(e){const i=this._elevationQueries.get(e),t=this._lyr3DMain.get_elevation_query_result(e);if(i)if(t.succeeded&&t.zs){const s=t.zs.slice(),r=i.descriptor.clone();for(let e=0;e<s.length;++e)r.coordinates[e].z=s[e];this._debugLog(2,3,`Success EQ ${e}, number points ${s.length}.`),i.resolveCallback(r),this._elevationQueries.delete(e)}else i.rejectCallback(new s("elevation-query:error",t?.error??"Elevation query failed")),this._elevationQueries.delete(e);else this._debugLog(2,1,`_onElevQueryComplete called for unknown queryId ${e}.`)}_doRemoveLayerView(e){const i=this._layers.get(e.wasmLayerId);return!!i&&(i.abortController.abort(),this._lyr3DMain.remove_layer(e.wasmLayerId),this._is3DTilesIMLayerView(e)&&e.layer.replacesTerrain&&(this._hasLayerThatReplacesTerrain=!1,this._isTerrainReady=!1,this.notifyChange("isTerrainReady")),this._layers.delete(e.wasmLayerId),!0)}_is3DTilesIMLayerView(e){return"integrated-mesh-3dtiles"===e.layer.type}_isGaussianSplatLayerView(e){return"gaussian-splat"===e.layer.type}_isGaussianSplatLayer(e){return"gaussian-splat"===e.type}_toWasmQuality(e){switch(e){case"low":return 1;case"medium":return 2;case"high":return 3}}_addLayerView(e){const i=e.layer;if(!i.url||!i.rootTilesetJSON)return{wasmLayerId:w};const t="integrated-mesh-3dtiles"===i.type?0:2,s=this._lyr3DMain.validate_root_tileset(JSON.stringify(i.rootTilesetJSON),t);if(0!==s.errorCode)return{wasmLayerId:w,check:s};const a=this._lyr3DMain.get_next_layer_id(),n=new AbortController;this._layers.set(a,{layerView:e,abortController:n,needMemoryUsageUpdate:!1,outstandingJobCount:0,outstandingRenderableCount:0,customParameters:i.customParameters,apiKey:i.apiKey,needFrame:!0});const o=D(i.elevationInfo),l=this._toWasmQuality(this.view?.qualityProfile),d=e=>r.getLogger(this).error("add-spatial-reference-error","Error when adding SR:",e);let h=!1;if(this._isGaussianSplatLayerView(e)&&this._isGaussianSplatLayer(i)){let t=i.spatialReference;if(e.useEsriCrs&&i.esriCrsSpatialReference){t=i.esriCrsSpatialReference;const s=u(t);let r=1,a=1;!s&&t.wkid&&-1!==t.wkid&&(r=c.values[c[t.wkid]],a=e.metersPerVCSUnit),this._workerHandle.addSpatialReferenceInfo(this._cleanUpSR(this._makeSRWasmSerializable(t)),s,r,a).catch(d),!this._haveAddedViewSRForNoOpPrj&&t.vcsWkid&&this._viewSR.vcsWkid&&-1!==this._viewSR.vcsWkid&&this._viewSR.vcsWkid!==t.vcsWkid&&(this._workerHandle.addSpatialReferenceInfo(this._cleanUpSR(this._makeSRWasmSerializable(this._viewSR)),!1,1,1).catch(d),this._haveAddedViewSRForNoOpPrj=!0)}h=this._lyr3DMain.add_gaussian_splat_layer(l,i.url,a,o)}else this._is3DTilesIMLayerView(e)&&(h=this._lyr3DMain.add_3dtiles_layer(l,i.url,a,o,e.layer.replacesTerrain),h&&e.layer.replacesTerrain&&(this._hasLayerThatReplacesTerrain=!0,this._isTerrainReady=!1,this.notifyChange("isTerrainReady")));return h?(this._updateWasmCamera(),e.updatingFlagChanged(),{wasmLayerId:a}):(this._layers.delete(a),{wasmLayerId:w})}_updateWasmCamera(){const e=this.view.state?.contentCamera;e&&this._lyr3DMain&&(this._cameraDirty=!0,this._markAllLayerViewsUpdating())}_markAllLayerViewsUpdating(){this._layers.forEach(e=>{const i=this._isUpdating(e);e.needFrame=!0,i||e.layerView.updatingFlagChanged()})}_makeSRWasmSerializable(e){return{wkid:e?.wkid??-1,latestWkid:e?.latestWkid??-1,vcsWkid:e?.vcsWkid??-1,latestVcsWkid:e?.latestVcsWkid??-1,wkt:e?.wkt??""}}_cleanUpSR(e){return-1===e?.wkid&&e.latestWkid&&-1!==e.latestWkid?e.wkid=e.latestWkid:-1===e?.latestWkid&&e.wkid&&-1!==e.wkid&&(e.latestWkid=e.wkid),-1===e?.vcsWkid&&e.latestVcsWkid&&-1!==e.latestVcsWkid?e.vcsWkid=e.latestVcsWkid:-1===e?.latestVcsWkid&&e.vcsWkid&&-1!==e.vcsWkid&&(e.latestVcsWkid=e.vcsWkid),e}};e([h({constructOnly:!0})],V.prototype,"view",void 0),e([h({readOnly:!0})],V.prototype,"isTerrainReady",null),V=e([_("esri.layers.Lyr3DWasmPerSceneView")],V);const j=V;export{j as default};
|
package/layers/ParquetLayer.d.ts
CHANGED
|
@@ -26,8 +26,8 @@ import type { QueryProperties } from "../rest/support/Query.js";
|
|
|
26
26
|
import type { CreatePopupTemplateOptions } from "../support/popupUtils.js";
|
|
27
27
|
import type { ObjectId } from "../views/types.js";
|
|
28
28
|
import type { FieldProperties } from "./support/Field.js";
|
|
29
|
-
import type {
|
|
30
|
-
import type {
|
|
29
|
+
import type { GeometryEncodingLocationProperties } from "./support/GeometryEncodingLocation.js";
|
|
30
|
+
import type { GeometryEncodingWkbProperties } from "./support/GeometryEncodingWkb.js";
|
|
31
31
|
import type { ExtentProperties } from "../geometry/Extent.js";
|
|
32
32
|
import type { LabelClassProperties } from "./support/LabelClass.js";
|
|
33
33
|
import type { PopupTemplateProperties } from "../PopupTemplate.js";
|
|
@@ -88,13 +88,13 @@ export interface ParquetLayerProperties extends LayerProperties, CustomParameter
|
|
|
88
88
|
* latitude and longitude columns and display those as the geometry. Otherwise, the encoding must be specified manually.
|
|
89
89
|
*
|
|
90
90
|
* ParquetLayer supports two geometry encoding types:
|
|
91
|
-
* * [
|
|
91
|
+
* * [GeometryEncodingLocation](https://developers.arcgis.com/javascript/latest/references/core/layers/support/GeometryEncodingLocation/): Used when geometry is stored as coordinate fields.
|
|
92
92
|
* If the file contains coordinate fields named `"lng/lat"`, `"lon/lat"`, `"long/lat"`, `"longitude/latitude"`, `"x/y"`, `"xcenter/ycenter"`, `"longitude83/latitude83"`,
|
|
93
93
|
* `"longdecdeg/latdecdeg"`, `"point-x/point-y"`, these are detected automatically. The field names are case-insensitive.
|
|
94
|
-
* For other coordinate field names, set the layer’s [geometryEncoding](https://developers.arcgis.com/javascript/latest/references/core/layers/ParquetLayer/#geometryEncoding) to an instance of `
|
|
94
|
+
* For other coordinate field names, set the layer’s [geometryEncoding](https://developers.arcgis.com/javascript/latest/references/core/layers/ParquetLayer/#geometryEncoding) to an instance of `GeometryEncodingLocation`
|
|
95
95
|
* with the coordinate fields specified, and set the layer’s [spatialReference](https://developers.arcgis.com/javascript/latest/references/core/layers/ParquetLayer/#spatialReference) and [geometryType](https://developers.arcgis.com/javascript/latest/references/core/layers/ParquetLayer/#geometryType) properties accordingly.
|
|
96
96
|
*
|
|
97
|
-
* * [
|
|
97
|
+
* * [GeometryEncodingWkb](https://developers.arcgis.com/javascript/latest/references/core/layers/support/GeometryEncodingWkb/): Used when geometry is stored as a WKB-encoded column.
|
|
98
98
|
* Set the layer's [geometryEncoding](https://developers.arcgis.com/javascript/latest/references/core/layers/ParquetLayer/#geometryEncoding) to an instance of `ParquetGeometryEncodingWkb` with
|
|
99
99
|
* the geometry column name, and set the layer’s [spatialReference](https://developers.arcgis.com/javascript/latest/references/core/layers/ParquetLayer/#spatialReference) (WGS84 or WebMercator) and [geometryType](https://developers.arcgis.com/javascript/latest/references/core/layers/ParquetLayer/#geometryType) properties accordingly.
|
|
100
100
|
*
|
|
@@ -110,7 +110,7 @@ export interface ParquetLayerProperties extends LayerProperties, CustomParameter
|
|
|
110
110
|
* geometryType: "polygon"
|
|
111
111
|
* });
|
|
112
112
|
*/
|
|
113
|
-
geometryEncoding?: ((
|
|
113
|
+
geometryEncoding?: ((GeometryEncodingWkbProperties & { type: "wkb" }) | (GeometryEncodingLocationProperties & { type: "location" })) | null;
|
|
114
114
|
/**
|
|
115
115
|
* The label definition for this layer, specified as an array of [LabelClass](https://developers.arcgis.com/javascript/latest/references/core/layers/support/LabelClass/). Use this property to specify
|
|
116
116
|
* labeling properties for the layer.
|
|
@@ -371,13 +371,13 @@ export default class ParquetLayer extends ParquetLayerSuperclass {
|
|
|
371
371
|
* latitude and longitude columns and display those as the geometry. Otherwise, the encoding must be specified manually.
|
|
372
372
|
*
|
|
373
373
|
* ParquetLayer supports two geometry encoding types:
|
|
374
|
-
* * [
|
|
374
|
+
* * [GeometryEncodingLocation](https://developers.arcgis.com/javascript/latest/references/core/layers/support/GeometryEncodingLocation/): Used when geometry is stored as coordinate fields.
|
|
375
375
|
* If the file contains coordinate fields named `"lng/lat"`, `"lon/lat"`, `"long/lat"`, `"longitude/latitude"`, `"x/y"`, `"xcenter/ycenter"`, `"longitude83/latitude83"`,
|
|
376
376
|
* `"longdecdeg/latdecdeg"`, `"point-x/point-y"`, these are detected automatically. The field names are case-insensitive.
|
|
377
|
-
* For other coordinate field names, set the layer’s [geometryEncoding](https://developers.arcgis.com/javascript/latest/references/core/layers/ParquetLayer/#geometryEncoding) to an instance of `
|
|
377
|
+
* For other coordinate field names, set the layer’s [geometryEncoding](https://developers.arcgis.com/javascript/latest/references/core/layers/ParquetLayer/#geometryEncoding) to an instance of `GeometryEncodingLocation`
|
|
378
378
|
* with the coordinate fields specified, and set the layer’s [spatialReference](https://developers.arcgis.com/javascript/latest/references/core/layers/ParquetLayer/#spatialReference) and [geometryType](https://developers.arcgis.com/javascript/latest/references/core/layers/ParquetLayer/#geometryType) properties accordingly.
|
|
379
379
|
*
|
|
380
|
-
* * [
|
|
380
|
+
* * [GeometryEncodingWkb](https://developers.arcgis.com/javascript/latest/references/core/layers/support/GeometryEncodingWkb/): Used when geometry is stored as a WKB-encoded column.
|
|
381
381
|
* Set the layer's [geometryEncoding](https://developers.arcgis.com/javascript/latest/references/core/layers/ParquetLayer/#geometryEncoding) to an instance of `ParquetGeometryEncodingWkb` with
|
|
382
382
|
* the geometry column name, and set the layer’s [spatialReference](https://developers.arcgis.com/javascript/latest/references/core/layers/ParquetLayer/#spatialReference) (WGS84 or WebMercator) and [geometryType](https://developers.arcgis.com/javascript/latest/references/core/layers/ParquetLayer/#geometryType) properties accordingly.
|
|
383
383
|
*
|
|
@@ -394,7 +394,7 @@ export default class ParquetLayer extends ParquetLayerSuperclass {
|
|
|
394
394
|
* });
|
|
395
395
|
*/
|
|
396
396
|
get geometryEncoding(): ParquetGeometryEncodingUnion | null | undefined;
|
|
397
|
-
set geometryEncoding(value: ((
|
|
397
|
+
set geometryEncoding(value: ((GeometryEncodingWkbProperties & { type: "wkb" }) | (GeometryEncodingLocationProperties & { type: "location" })) | null | undefined);
|
|
398
398
|
/** The geometry type of features in the layer. All features must be of the same type. */
|
|
399
399
|
accessor geometryType: ParquetGeometryType | null | undefined;
|
|
400
400
|
/**
|
package/layers/ParquetLayer.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import r from"../PopupTemplate.js";import{ClonableMixin as t}from"../core/Clonable.js";import i from"../core/Collection.js";import o from"../core/Error.js";import has from"../core/has.js";import{MultiOriginJSONSupportMixin as s}from"../core/MultiOriginJSONSupport.js";import{setDeepValue as n}from"../core/object.js";import{watch as p}from"../core/reactiveUtils.js";import{property as a}from"../core/accessorSupport/decorators/property.js";import{reader as l}from"../core/accessorSupport/decorators/reader.js";import{subclass as u}from"../core/accessorSupport/decorators/subclass.js";import{writer as d}from"../core/accessorSupport/decorators/writer.js";import m from"../geometry/Extent.js";import y from"../geometry/SpatialReference.js";import c from"../graphic/ParquetGraphicOrigin.js";import f from"./Layer.js";import{ParquetSource as h}from"./graphics/sources/ParquetSource.js";import{BlendLayer as g}from"./mixins/BlendLayer.js";import{CustomParametersMixin as j}from"./mixins/CustomParametersMixin.js";import{FeatureEffectLayer as v}from"./mixins/FeatureEffectLayer.js";import{FeatureReductionLayer as w}from"./mixins/FeatureReductionLayer.js";import{OperationalLayer as b}from"./mixins/OperationalLayer.js";import{OrderedLayer as O}from"./mixins/OrderedLayer.js";import{ScaleRangeLayer as x}from"./mixins/ScaleRangeLayer.js";import{labelsVisible as q,legendEnabled as E,popupEnabled as F}from"./support/commonProperties.js";import I from"./support/FeatureTemplate.js";import
|
|
2
|
+
import{__decorate as e}from"tslib";import r from"../PopupTemplate.js";import{ClonableMixin as t}from"../core/Clonable.js";import i from"../core/Collection.js";import o from"../core/Error.js";import has from"../core/has.js";import{MultiOriginJSONSupportMixin as s}from"../core/MultiOriginJSONSupport.js";import{setDeepValue as n}from"../core/object.js";import{watch as p}from"../core/reactiveUtils.js";import{property as a}from"../core/accessorSupport/decorators/property.js";import{reader as l}from"../core/accessorSupport/decorators/reader.js";import{subclass as u}from"../core/accessorSupport/decorators/subclass.js";import{writer as d}from"../core/accessorSupport/decorators/writer.js";import m from"../geometry/Extent.js";import y from"../geometry/SpatialReference.js";import c from"../graphic/ParquetGraphicOrigin.js";import f from"./Layer.js";import{ParquetSource as h}from"./graphics/sources/ParquetSource.js";import{BlendLayer as g}from"./mixins/BlendLayer.js";import{CustomParametersMixin as j}from"./mixins/CustomParametersMixin.js";import{FeatureEffectLayer as v}from"./mixins/FeatureEffectLayer.js";import{FeatureReductionLayer as w}from"./mixins/FeatureReductionLayer.js";import{OperationalLayer as b}from"./mixins/OperationalLayer.js";import{OrderedLayer as O}from"./mixins/OrderedLayer.js";import{ScaleRangeLayer as x}from"./mixins/ScaleRangeLayer.js";import{labelsVisible as q,legendEnabled as E,popupEnabled as F}from"./support/commonProperties.js";import I from"./support/FeatureTemplate.js";import S from"./support/Field.js";import{defineFieldProperties as T}from"./support/fieldProperties.js";import{fixRendererFields as P}from"./support/fieldUtils.js";import R from"./support/GeometryEncodingLocation.js";import L from"./support/GeometryEncodingWkb.js";import U from"./support/LabelClass.js";import{reader as _}from"./support/labelingInfo.js";import{parquetGeometryTypeKebabDict as D}from"./support/parquetUtils.js";import{rendererTypes as z}from"../renderers/support/typeUtils.js";import C from"../rest/support/Query.js";import{t as Q}from"../chunks/persistableUrlUtils.js";import{createPopupTemplate as k}from"../support/popupUtils.js";const G=T(),J="__OBJECTID",M={types:{key:"type",base:null,typeMap:{wkb:L,location:R}},json:{name:"layerDefinition.geometryEncoding",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{read:{source:"geometryEncoding"}}}}};let N=class extends(w(v(g(O(x(b(s(j(t(f)))))))))){constructor(e){super(e),this.copyright=null,this.definitionExpression=null,this.displayOptimization=null,this.fields=null,this.fieldsIndex=null,this.geometryEncoding=null,this.fullExtent=null,this.geometryType=null,this.graphicOrigin=new c(this),this.labelsVisible=!0,this.labelingInfo=null,this.objectIdField=J,this.operationalLayerType="ParquetLayer",this.outFields=null,this.persistenceEnabled=!!has("parquetlayer-persistence-enabled"),this.popupTemplate=null,this.source=null,this.spatialReference=null,this.templates=null,this.title="Parquet",this.type="parquet",this.urls=new i}destroy(){this.source?.destroy()}async load(e){return this.addResolvingPromise(this._load(e)),this.addHandles([p(()=>this.urls,e=>this.source?.updateFiles(e.items)),p(()=>this.customParameters,e=>this.source?.setCustomParameters(e))]),this}get capabilities(){return this.source?.capabilities}get defaultPopupTemplate(){return this.createPopupTemplate()}writeFields(e,r,t,i){const o=e.filter(e=>!(e.name===J&&"oid"===e.type)).map(e=>e.toJSON(i));n(t,o,r)}get isTable(){return null==this.geometryEncoding&&null==this.displayOptimization}set renderer(e){P(e,this.fieldsIndex),this._set("renderer",e)}readUrls(e){return new i("files"===e.type?e.urls:[])}writeUrls(e,r,t,i){const s=[];if(e?.length){i={blockedRelativeUrls:i?.blockedRelativeUrls};for(let r of e)r=Q(r,i),r&&s.push(r)}s.length?r.source={type:"files",urls:s}:i.messages?.push(new o("parquet-layer:missing-urls","Missing or empty 'urls'",{layer:this}))}createPopupTemplate(e){return k(this,e)}createQuery(){const e=new C;return e.returnGeometry=!0,e.outFields=["*"],e.where=this.definitionExpression||"1=1",e}async createSource(e){const r=new h({layer:this});return await r.load(e),r}getFieldDomain(e,r){return null}getField(e){return this.fieldsIndex.get(e)}async queryFeatures(e,r){await this.load();const t=await this.source.queryFeatures(this._normalizeQuery(e),r),i=this.graphicOrigin;if(t?.features)for(const o of t.features)o.layer=o.sourceLayer=this,o.origin=i;return t}async queryObjectIds(e,r){return await this.load(),this.source.queryObjectIds(this._normalizeQuery(e),r)}async queryFeatureCount(e,r){return await this.load(),this.source.queryFeatureCount(this._normalizeQuery(e),r)}async queryExtent(e,r){return await this.load(),this.source.queryExtent(this._normalizeQuery(e),r)}_normalizeQuery(e){return C.from(e)??this.createQuery()}async _load(e){const r=await this.createSource(e);this._set("source",r),this.read(r.sourceJSON,{origin:"service"}),["fields"].forEach(e=>this.revertToOrigin(e,"service")),P(this.renderer,this.fieldsIndex),null==this.spatialReference&&(this.spatialReference=y.WGS84)}};e([a({readOnly:!0,json:{read:!1,write:!1}})],N.prototype,"capabilities",null),e([a({type:String})],N.prototype,"copyright",void 0),e([a({readOnly:!0})],N.prototype,"defaultPopupTemplate",null),e([a({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],N.prototype,"definitionExpression",void 0),e([a()],N.prototype,"displayOptimization",void 0),e([a({type:[S],json:{name:"layerDefinition.fields",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"fields"}}}})],N.prototype,"fields",void 0),e([d("fields")],N.prototype,"writeFields",null),e([a(G.fieldsIndex)],N.prototype,"fieldsIndex",void 0),e([a(M)],N.prototype,"geometryEncoding",void 0),e([a({type:m,json:{name:"extent"}})],N.prototype,"fullExtent",void 0),e([a({type:D.apiValues,json:{name:"layerDefinition.geometryType",read:{reader:D.read},write:{writer:D.write,ignoreOrigin:!0,isRequired:!0},origins:{service:{read:{source:"geometryType",reader:D.read}}}}})],N.prototype,"geometryType",void 0),e([a({readOnly:!0,clonable:!1})],N.prototype,"graphicOrigin",void 0),e([a(q)],N.prototype,"labelsVisible",void 0),e([a({type:[U],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:_},write:!0}})],N.prototype,"labelingInfo",void 0),e([a(E)],N.prototype,"legendEnabled",void 0),e([a()],N.prototype,"file",void 0),e([a({type:String,readOnly:!0})],N.prototype,"objectIdField",void 0),e([a({type:["ParquetLayer"]})],N.prototype,"operationalLayerType",void 0),e([a(G.outFields)],N.prototype,"outFields",void 0),e([a(F)],N.prototype,"popupEnabled",void 0),e([a({type:r,json:{name:"popupInfo",write:!0}})],N.prototype,"popupTemplate",void 0),e([a({types:z,json:{name:"layerDefinition.drawingInfo.renderer",write:!0,origins:{service:{read:{source:"drawingInfo.renderer"}}}}})],N.prototype,"renderer",null),e([a({type:h,readOnly:!0,cast:null,json:{read:!1}})],N.prototype,"source",void 0),e([a({type:y,json:{name:"layerDefinition.spatialReference",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{read:{source:"extent.spatialReference"}}}}})],N.prototype,"spatialReference",void 0),e([a({type:[I]})],N.prototype,"templates",void 0),e([a()],N.prototype,"title",void 0),e([a({json:{read:!1},readOnly:!0})],N.prototype,"type",void 0),e([a({type:i.ofType(String),json:{name:"source",write:{isRequired:!0,ignoreOrigin:!0}}})],N.prototype,"urls",void 0),e([l("urls")],N.prototype,"readUrls",null),e([d("urls")],N.prototype,"writeUrls",null),N=e([u("esri.layers.ParquetLayer")],N);const V=N;export{V as default};
|
package/layers/StreamLayer.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../PopupTemplate.js";import r from"../request.js";import{ClonableMixin as i}from"../core/Clonable.js";import o from"../core/Error.js";import{handlesGroup as s}from"../core/handleUtils.js";import{clone as n}from"../core/lang.js";import a from"../core/Logger.js";import{MultiOriginJSONSupportMixin as p}from"../core/MultiOriginJSONSupport.js";import{debounce as l,throwIfAbortError as m}from"../core/promiseUtils.js";import{property as d,subclass as c}from"../core/accessorSupport/decorators.js";import{Integer as u}from"../core/accessorSupport/ensureType.js";import y from"../geometry/Extent.js";import f from"../geometry/SpatialReference.js";import{featureGeometryTypeKebabDictionary as h}from"../geometry/support/typeUtils.js";import g from"../graphic/StreamGraphicOrigin.js";import j from"./Layer.js";import{ArcGISService as v}from"./mixins/ArcGISService.js";import{BlendLayer as w}from"./mixins/BlendLayer.js";import{CustomParametersMixin as b}from"./mixins/CustomParametersMixin.js";import{DisplayFilteredLayer as S}from"./mixins/DisplayFilteredLayer.js";import{FeatureEffectLayer as I}from"./mixins/FeatureEffectLayer.js";import{FeatureReductionLayer as x}from"./mixins/FeatureReductionLayer.js";import{OperationalLayer as R}from"./mixins/OperationalLayer.js";import{PortalLayer as T}from"./mixins/PortalLayer.js";import{RefreshableLayer as F}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as P}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as L}from"./mixins/TemporalLayer.js";import{TrackableLayer as U}from"./mixins/TrackableLayer.js";import{labelsVisible as O,legendEnabled as E,maxScale as k,minScale as D,popupEnabled as A,screenSizePerspectiveEnabled as C,url as N}from"./support/commonProperties.js";import{createDefaultRenderer as G}from"./support/featureLayerUtils.js";import _ from"./support/Field.js";import{defineFieldProperties as J}from"./support/fieldProperties.js";import{fixRendererFields as M,fixTimeInfoFields as V}from"./support/fieldUtils.js";import z from"./support/LabelClass.js";import{reader as q}from"./support/labelingInfo.js";import W from"./support/PurgeOptions.js";import{defaultStreamIdField as Q}from"./support/streamLayerUtils.js";import{read as B}from"../renderers/support/jsonUtils.js";import{loadStyleRenderer as H}from"../renderers/support/styleUtils.js";import{webSceneRendererTypes as K,rendererTypes as X}from"../renderers/support/typeUtils.js";import Y from"../rest/support/Query.js";import{createPopupTemplate as Z}from"../support/popupUtils.js";import $ from"../symbols/support/ElevationInfo.js";import{addLayerUnsupportedError as ee}from"../webdoc/support/unsupportedErrors.js";import{reader as te}from"../core/accessorSupport/decorators/reader.js";const re=J();let ie=class extends(S(x(I(w(L(U(P(F(v(R(T(p(b(i(j))))))))))))))){constructor(...e){super(...e),this.copyright=null,this.definitionExpression=null,this.displayField=null,this.elevationInfo=null,this.fields=null,this.fieldsIndex=null,this.geometryDefinition=null,this.geometryType=null,this.graphicOrigin=new g(this),this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.maxReconnectionAttempts=0,this.maxReconnectionInterval=20,this.maxScale=0,this.minScale=0,this.objectIdField=null,this.operationalLayerType="ArcGISStreamLayer",this.outFields=["*"],this.popupEnabled=!0,this.popupTemplate=null,this.purgeOptions=new W,this.refreshInterval=0,this.screenSizePerspectiveEnabled=!0,this.sourceJSON=null,this.spatialReference=f.WGS84,this.type="stream",this.url=null,this.updateInterval=300,this.useViewTime=!0,this.webSocketUrl=null,this._debouncedSaveOperations=l(async(e,t,r)=>{const{save:i,saveAs:o}=await import("./save/streamLayerUtils.js");switch(e){case 0:return i(this,t);case 1:return o(this,r,t)}})}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){if(!("WebSocket"in globalThis))return this.addResolvingPromise(Promise.reject(new o("stream-layer:websocket-unsupported","WebSocket is not supported in this browser. StreamLayer will not have real-time connection with the stream service."))),Promise.resolve(this);const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Stream Service","Feed"]},e).catch(m).then(()=>this._fetchService(t))),Promise.resolve(this)}get defaultPopupTemplate(){return this.createPopupTemplate()}set featureReduction(e){const t=this._normalizeFeatureReduction(e);this._set("featureReduction",t)}set renderer(e){M(e,this.fieldsIndex),this._set("renderer",e)}readRenderer(e,t,r){t=t.layerDefinition||t;const i=t.drawingInfo?.renderer;if(i){const e=B(i,t,r)||void 0;return e||a.getLogger(this).error("Failed to create renderer",{rendererDefinition:t.drawingInfo.renderer,layer:this,context:r}),e}return G(t,r)}async connect(e){const[{createConnection:t}]=await Promise.all([import("./graphics/sources/connections/createConnection.js"),this.load()]),r=this.geometryType?h.toJSON(this.geometryType):null,{customParameters:i=null,definitionExpression:o=null,geometryDefinition:n=null,maxReconnectionAttempts:a=0,maxReconnectionInterval:p=20,spatialReference:l=this.spatialReference}=e||this.createConnectionParameters(),m=t(this.parsedUrl,this.spatialReference,l,r,o,n,a,p,i??void 0),d=s([this.on("send-message-to-socket",e=>m.sendMessageToSocket(e)),this.on("send-message-to-client",e=>m.sendMessageToClient(e))]);return m.once("destroy",d.remove),m}createConnectionParameters(){return{spatialReference:this.spatialReference,customParameters:this.customParameters,definitionExpression:this.definitionExpression,geometryDefinition:this.geometryDefinition,maxReconnectionAttempts:this.maxReconnectionAttempts,maxReconnectionInterval:this.maxReconnectionInterval}}createPopupTemplate(e){return Z(this,e)}createQuery(){const e=new Y;return e.returnGeometry=!0,e.outFields=["*"],e.where=this.definitionExpression||"1=1",e}getFieldDomain(e,t){if(!this.fields)return null;let r=null;return this.fields.some(t=>(t.name===e&&(r=t.domain),!!r)),r}getField(e){return this.fieldsIndex.get(e)}serviceSupportsSpatialReference(e){return!0}sendMessageToSocket(e){this.emit("send-message-to-socket",e)}sendMessageToClient(e){this.emit("send-message-to-client",e)}async save(e){return this._debouncedSaveOperations(0,e)}async saveAs(e,t){return this._debouncedSaveOperations(1,t,e)}write(e,t){return this.webSocketUrl?(ee(t,this,"a custom websocket connection cannot be written to web scenes and web maps"),null):this.parsedUrl?super.write(e,t):(ee(t,this,"a client-side only connection without a url cannot be written to web scenes and web maps"),null)}async _fetchService(e){if(!!!this.webSocketUrl&&this.parsedUrl){if(!this.sourceJSON){const{data:t}=await r(this.parsedUrl.path,{query:{f:"json",...this.customParameters,...this.parsedUrl.query},responseType:"json",signal:e});this.sourceJSON=t}}else{if(!this.timeInfo?.trackIdField)throw new o("stream-layer:missing-metadata","The stream layer trackIdField must be specified.");if(!this.objectIdField){const e=this.fields.find(e=>"oid"===e.type)?.name;if(!e)throw new o("stream-layer:missing-metadata","The stream layer objectIdField must be specified.");this.objectIdField=e}if(!this.fields)throw new o("stream-layer:missing-metadata","The stream layer fields must be specified.");if(this.fields.some(e=>e.name===this.objectIdField)||this.fields.push(new _({name:this.objectIdField,alias:this.objectIdField,type:"oid"})),!this.geometryType)throw new o("stream-layer:missing-metadata","The stream layer geometryType must be specified.");this.webSocketUrl&&(this.url=this.webSocketUrl)}return this.read(this.sourceJSON,{origin:"service",portalItem:this.portalItem,portal:this.portalItem?.portal,url:this.parsedUrl}),M(this.renderer,this.fieldsIndex),V(this.timeInfo,this.fieldsIndex),this.objectIdField||(this.objectIdField=Q),H(this,{origin:"service"})}};e([d({type:String})],ie.prototype,"copyright",void 0),e([d({readOnly:!0})],ie.prototype,"defaultPopupTemplate",null),e([d({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],ie.prototype,"definitionExpression",void 0),e([d({type:String})],ie.prototype,"displayField",void 0),e([d({type:$})],ie.prototype,"elevationInfo",void 0),e([d({json:{origins:{"web-map":{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-scene":{read:!1,write:!1}}}})],ie.prototype,"featureReduction",null),e([d(re.fields)],ie.prototype,"fields",void 0),e([d(re.fieldsIndex)],ie.prototype,"fieldsIndex",void 0),e([d({type:y,json:{name:"layerDefinition.definitionGeometry",write:!0}})],ie.prototype,"geometryDefinition",void 0),e([d({type:h.apiValues,json:{read:{reader:h.read}}})],ie.prototype,"geometryType",void 0),e([d({readOnly:!0,clonable:!1})],ie.prototype,"graphicOrigin",void 0),e([d(O)],ie.prototype,"labelsVisible",void 0),e([d({type:[z],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:q},write:!0}})],ie.prototype,"labelingInfo",void 0),e([d(E)],ie.prototype,"legendEnabled",void 0),e([d({type:["show","hide"],json:{origins:{"portal-item":{read:!1,write:!1}}}})],ie.prototype,"listMode",void 0),e([d({type:u})],ie.prototype,"maxReconnectionAttempts",void 0),e([d({type:u})],ie.prototype,"maxReconnectionInterval",void 0),e([d(k)],ie.prototype,"maxScale",void 0),e([d(D)],ie.prototype,"minScale",void 0),e([d({type:String})],ie.prototype,"objectIdField",void 0),e([d({value:"ArcGISStreamLayer",type:["ArcGISStreamLayer"]})],ie.prototype,"operationalLayerType",void 0),e([d({readOnly:!0})],ie.prototype,"outFields",void 0),e([d(A)],ie.prototype,"popupEnabled",void 0),e([d({type:t,json:{name:"popupInfo",write:!0}})],ie.prototype,"popupTemplate",void 0),e([d({type:W})],ie.prototype,"purgeOptions",void 0),e([d({json:{read:!1,write:!1}})],ie.prototype,"refreshInterval",void 0),e([d({types:X,json:{origins:{service:{write:{target:"drawingInfo.renderer",enabled:!1}},"web-scene":{name:"layerDefinition.drawingInfo.renderer",types:K,write:!0}},write:{target:"layerDefinition.drawingInfo.renderer"}}})],ie.prototype,"renderer",null),e([te("service","renderer",["drawingInfo.renderer","defaultSymbol"]),te("renderer",["layerDefinition.drawingInfo.renderer","layerDefinition.defaultSymbol"])],ie.prototype,"readRenderer",null),e([d((()=>{const e=n(C);return e.json.origins["portal-item"]={read:!1,write:!1},e})())],ie.prototype,"screenSizePerspectiveEnabled",void 0),e([d()],ie.prototype,"sourceJSON",void 0),e([d({type:f,json:{origins:{service:{read:{source:"spatialReference"}}}}})],ie.prototype,"spatialReference",void 0),e([d({json:{read:!1}})],ie.prototype,"type",void 0),e([d(N)],ie.prototype,"url",void 0),e([d({type:Number})],ie.prototype,"updateInterval",void 0),e([d({json:{read:!1,write:!1}})],ie.prototype,"useViewTime",void 0),e([d({type:String})],ie.prototype,"webSocketUrl",void 0),ie=e([c("esri.layers.StreamLayer")],ie);const oe=ie;export{oe as default};
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../PopupTemplate.js";import r from"../request.js";import{ClonableMixin as i}from"../core/Clonable.js";import o from"../core/Error.js";import{handlesGroup as s}from"../core/handleUtils.js";import{clone as n}from"../core/lang.js";import a from"../core/Logger.js";import{MultiOriginJSONSupportMixin as p}from"../core/MultiOriginJSONSupport.js";import{debounce as l,throwIfAbortError as m}from"../core/promiseUtils.js";import{urlToObject as d}from"../core/urlUtils.js";import{property as c,subclass as u}from"../core/accessorSupport/decorators.js";import{Integer as f}from"../core/accessorSupport/ensureType.js";import y from"../geometry/Extent.js";import h from"../geometry/SpatialReference.js";import{featureGeometryTypeKebabDictionary as g}from"../geometry/support/typeUtils.js";import b from"../graphic/StreamGraphicOrigin.js";import v from"./Layer.js";import{ArcGISService as w}from"./mixins/ArcGISService.js";import{BlendLayer as j}from"./mixins/BlendLayer.js";import{CustomParametersMixin as S}from"./mixins/CustomParametersMixin.js";import{DisplayFilteredLayer as I}from"./mixins/DisplayFilteredLayer.js";import{FeatureEffectLayer as x}from"./mixins/FeatureEffectLayer.js";import{FeatureReductionLayer as R}from"./mixins/FeatureReductionLayer.js";import{OperationalLayer as T}from"./mixins/OperationalLayer.js";import{PortalLayer as F}from"./mixins/PortalLayer.js";import{RefreshableLayer as P}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as U}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as O}from"./mixins/TemporalLayer.js";import{TrackableLayer as L}from"./mixins/TrackableLayer.js";import{labelsVisible as k,legendEnabled as E,maxScale as D,minScale as A,popupEnabled as N,screenSizePerspectiveEnabled as C,url as J}from"./support/commonProperties.js";import G from"./support/FabricKustoSource.js";import{createDefaultRenderer as _}from"./support/featureLayerUtils.js";import M from"./support/Field.js";import{defineFieldProperties as V}from"./support/fieldProperties.js";import{fixRendererFields as q,fixTimeInfoFields as z}from"./support/fieldUtils.js";import{completeKustoStreamLayerInfo as K}from"./support/kustoUtils.js";import W from"./support/LabelClass.js";import{reader as Q}from"./support/labelingInfo.js";import B from"./support/PurgeOptions.js";import{defaultStreamIdField as H}from"./support/streamLayerUtils.js";import{read as X}from"../renderers/support/jsonUtils.js";import{loadStyleRenderer as Y}from"../renderers/support/styleUtils.js";import{webSceneRendererTypes as Z,rendererTypes as $}from"../renderers/support/typeUtils.js";import ee from"../rest/support/Query.js";import{createPopupTemplate as te}from"../support/popupUtils.js";import re from"../symbols/support/ElevationInfo.js";import{addLayerUnsupportedError as ie}from"../webdoc/support/unsupportedErrors.js";import{reader as oe}from"../core/accessorSupport/decorators/reader.js";const se=V();let ne=class extends(I(R(x(j(O(L(U(P(w(T(F(p(S(i(v))))))))))))))){constructor(...e){super(...e),this.copyright=null,this.definitionExpression=null,this.displayField=null,this.elevationInfo=null,this.fields=null,this.fieldsIndex=null,this.geometryDefinition=null,this.geometryType=null,this.graphicOrigin=new b(this),this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.maxReconnectionAttempts=0,this.maxReconnectionInterval=20,this.maxScale=0,this.minScale=0,this.objectIdField=null,this.operationalLayerType="ArcGISStreamLayer",this.outFields=["*"],this.popupEnabled=!0,this.popupTemplate=null,this.purgeOptions=new B,this.refreshInterval=0,this.screenSizePerspectiveEnabled=!0,this.source=null,this.sourceJSON=null,this.spatialReference=h.WGS84,this.type="stream",this.url=null,this.updateInterval=300,this.useViewTime=!0,this.webSocketUrl=null,this._debouncedSaveOperations=l(async(e,t,r)=>{const{save:i,saveAs:o}=await import("./save/streamLayerUtils.js");switch(e){case 0:return i(this,t);case 1:return o(this,r,t)}})}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){if(!("WebSocket"in globalThis))return this.addResolvingPromise(Promise.reject(new o("stream-layer:websocket-unsupported","WebSocket is not supported in this browser. StreamLayer will not have real-time connection with the stream service."))),Promise.resolve(this);const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Stream Service","Feed"]},e).catch(m).then(()=>this._fetchService(t))),Promise.resolve(this)}get defaultPopupTemplate(){return this.createPopupTemplate()}set featureReduction(e){const t=this._normalizeFeatureReduction(e);this._set("featureReduction",t)}set renderer(e){q(e,this.fieldsIndex),this._set("renderer",e)}readRenderer(e,t,r){t=t.layerDefinition||t;const i=t.drawingInfo?.renderer;if(i){const e=X(i,t,r)||void 0;return e||a.getLogger(this).error("Failed to create renderer",{rendererDefinition:t.drawingInfo.renderer,layer:this,context:r}),e}return _(t,r)}async connect(e){const[{createConnection:t}]=await Promise.all([import("./graphics/sources/connections/createConnection.js"),this.load()]),r=e?.spatialReference?.toJSON()??this.spatialReference.toJSON(),i=t(this.getStreamConnectionSource(e),r),o=s([this.on("send-message-to-socket",e=>i.sendMessageToSocket(e)),this.on("send-message-to-client",e=>i.sendMessageToClient(e))]);return i.once("destroy",o.remove),i}getStreamConnectionSource(e){const{customParameters:t=null,definitionExpression:r=null,geometryDefinition:i=null,maxReconnectionAttempts:s=0,maxReconnectionInterval:n=20}=e||this.createConnectionParameters(),a=this.geometryType?g.toJSON(this.geometryType):null,p=this.spatialReference.toJSON();if(this.source){if(!this.timeInfo?.trackIdField)throw new o("stream-layer:missing-metadata","TrackIdField required for Kusto data source.");return{type:"kusto",database:this.database,table:this.source.table,trackIdField:this.timeInfo.trackIdField,geometryEncoding:this.source.geometryEncoding.toJSON(),sourceSpatialReference:p,refreshInterval:this.source.refreshInterval}}return this.webSocketUrl?{type:"custom",url:d(this.webSocketUrl),customParameters:t,definitionExpression:r,geometryDefinition:i,geometryType:a,maxReconnectionAttempts:s,maxReconnectionInterval:n,sourceSpatialReference:p}:this.parsedUrl?{type:"geoevent",url:this.parsedUrl,customParameters:t,definitionExpression:r,geometryDefinition:i,geometryType:a,maxReconnectionAttempts:s,maxReconnectionInterval:n,sourceSpatialReference:p}:{type:"client",geometryType:a,sourceSpatialReference:this.spatialReference.toJSON()}}createConnectionParameters(){return{spatialReference:this.spatialReference,customParameters:this.customParameters,definitionExpression:this.definitionExpression,geometryDefinition:this.geometryDefinition,maxReconnectionAttempts:this.maxReconnectionAttempts,maxReconnectionInterval:this.maxReconnectionInterval}}createPopupTemplate(e){return te(this,e)}createQuery(){const e=new ee;return e.returnGeometry=!0,e.outFields=["*"],e.where=this.definitionExpression||"1=1",e}getFieldDomain(e,t){if(!this.fields)return null;let r=null;return this.fields.some(t=>(t.name===e&&(r=t.domain),!!r)),r}getField(e){return this.fieldsIndex.get(e)}serviceSupportsSpatialReference(e){return!0}sendMessageToSocket(e){this.emit("send-message-to-socket",e)}sendMessageToClient(e){this.emit("send-message-to-client",e)}async save(e){return this._debouncedSaveOperations(0,e)}async saveAs(e,t){return this._debouncedSaveOperations(1,t,e)}write(e,t){return this.webSocketUrl?(ie(t,this,"a custom websocket connection cannot be written to web scenes and web maps"),null):this.source?(ie(t,this,"a custom source cannot be written to web scenes and web maps"),null):this.parsedUrl?super.write(e,t):(ie(t,this,"a client-side only connection without a url cannot be written to web scenes and web maps"),null)}async _fetchService(e){if(this.source){const e=await K(this.source.workspace,this.source.database,this.source.table,{fields:this.fields,source:this.source,database:this.database});if(this.database=e.database,!e.fields)throw new o("stream-layer:missing-metadata","The stream layer fields must be specified.");if(this.fields=e.fields,!e.source)throw new o("stream-layer:missing-metadata","Unable to infer Kusto source.",{layerInfo:e});if(!e.source.geometryEncoding)throw new o("stream-layer:missing-metadata","Unable to infer Kusto geometry encoding.",{layerInfo:e});this.source=e.source}if(this.parsedUrl){if(!this.sourceJSON){const{data:t}=await r(this.parsedUrl.path,{query:{f:"json",...this.customParameters,...this.parsedUrl.query},responseType:"json",signal:e});this.sourceJSON=t}}else{if(!this.timeInfo?.trackIdField)throw new o("stream-layer:missing-metadata","The stream layer trackIdField must be specified.");if(!this.fields)throw new o("stream-layer:missing-metadata","The stream layer fields must be specified.");if(!this.objectIdField){const e=this.fields.find(e=>"oid"===e.type)?.name;e&&(this.objectIdField=e)}if(this.fields.some(e=>e.name===this.objectIdField)||this.fields.push(new M({name:this.objectIdField,alias:this.objectIdField,type:"oid"})),!this.geometryType)throw new o("stream-layer:missing-metadata","The stream layer geometryType must be specified.")}return this.read(this.sourceJSON,{origin:"service",portalItem:this.portalItem,portal:this.portalItem?.portal,url:this.parsedUrl}),q(this.renderer,this.fieldsIndex),z(this.timeInfo,this.fieldsIndex),this.objectIdField||(this.objectIdField=H),Y(this,{origin:"service"})}};e([c({type:String})],ne.prototype,"copyright",void 0),e([c()],ne.prototype,"database",void 0),e([c({readOnly:!0})],ne.prototype,"defaultPopupTemplate",null),e([c({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],ne.prototype,"definitionExpression",void 0),e([c({type:String})],ne.prototype,"displayField",void 0),e([c({type:re})],ne.prototype,"elevationInfo",void 0),e([c({json:{origins:{"web-map":{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-scene":{read:!1,write:!1}}}})],ne.prototype,"featureReduction",null),e([c(se.fields)],ne.prototype,"fields",void 0),e([c(se.fieldsIndex)],ne.prototype,"fieldsIndex",void 0),e([c({type:y,json:{name:"layerDefinition.definitionGeometry",write:!0}})],ne.prototype,"geometryDefinition",void 0),e([c({type:g.apiValues,json:{read:{reader:g.read}}})],ne.prototype,"geometryType",void 0),e([c({readOnly:!0,clonable:!1})],ne.prototype,"graphicOrigin",void 0),e([c(k)],ne.prototype,"labelsVisible",void 0),e([c({type:[W],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:Q},write:!0}})],ne.prototype,"labelingInfo",void 0),e([c(E)],ne.prototype,"legendEnabled",void 0),e([c({type:["show","hide"],json:{origins:{"portal-item":{read:!1,write:!1}}}})],ne.prototype,"listMode",void 0),e([c({type:f})],ne.prototype,"maxReconnectionAttempts",void 0),e([c({type:f})],ne.prototype,"maxReconnectionInterval",void 0),e([c(D)],ne.prototype,"maxScale",void 0),e([c(A)],ne.prototype,"minScale",void 0),e([c({type:String})],ne.prototype,"objectIdField",void 0),e([c({value:"ArcGISStreamLayer",type:["ArcGISStreamLayer"]})],ne.prototype,"operationalLayerType",void 0),e([c({readOnly:!0})],ne.prototype,"outFields",void 0),e([c(N)],ne.prototype,"popupEnabled",void 0),e([c({type:t,json:{name:"popupInfo",write:!0}})],ne.prototype,"popupTemplate",void 0),e([c({type:B})],ne.prototype,"purgeOptions",void 0),e([c({json:{read:!1,write:!1}})],ne.prototype,"refreshInterval",void 0),e([c({types:$,json:{origins:{service:{write:{target:"drawingInfo.renderer",enabled:!1}},"web-scene":{name:"layerDefinition.drawingInfo.renderer",types:Z,write:!0}},write:{target:"layerDefinition.drawingInfo.renderer"}}})],ne.prototype,"renderer",null),e([oe("service","renderer",["drawingInfo.renderer","defaultSymbol"]),oe("renderer",["layerDefinition.drawingInfo.renderer","layerDefinition.defaultSymbol"])],ne.prototype,"readRenderer",null),e([c((()=>{const e=n(C);return e.json.origins["portal-item"]={read:!1,write:!1},e})())],ne.prototype,"screenSizePerspectiveEnabled",void 0),e([c({type:G,json:{write:!1}})],ne.prototype,"source",void 0),e([c()],ne.prototype,"sourceJSON",void 0),e([c({type:h,json:{origins:{service:{read:{source:"spatialReference"}}}}})],ne.prototype,"spatialReference",void 0),e([c({json:{read:!1}})],ne.prototype,"type",void 0),e([c(J)],ne.prototype,"url",void 0),e([c({type:Number})],ne.prototype,"updateInterval",void 0),e([c({json:{read:!1,write:!1}})],ne.prototype,"useViewTime",void 0),e([c({type:String})],ne.prototype,"webSocketUrl",void 0),ne=e([u("esri.layers.StreamLayer")],ne);const ae=ne;export{ae as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import e from"../../../../request.js";import t from"../../../../core/Error.js";import{checkProjectionSupport as n,project as s}from"../../data/projectionSupport.js";import{escapeKustoIdentifier as o,escapeKustoStringLiteral as i}from"../../../support/kustoUtils.js";import r from"../../../support/StreamConnection.js";class a extends r{constructor(e,t){super(),this._config=e,this._outSpatialReference=t,this.connectionStatus="connected",this.errorString=null,this._isPolling=!1,this._lastIngestedAt=null,this._pollTimer=null,this._pollRecentData=async()=>{if(!this.destroyed&&!this._isPolling){this._isPolling=!0;try{const e=await this._queryChanges(this._lastIngestedAt);if(this.destroyed)return;this._handleResult(e)}catch(e){this.errorString=e instanceof Error?e.message:"Failed to fetch"}finally{this._isPolling=!1}}},this._initialize()}destroy(){super.destroy(),this._pollTimer&&(clearInterval(this._pollTimer),this._pollTimer=null)}sendMessageToSocket(e){throw new t("kusto:unsupported","sendMessageToSocket not supported for Kusto connections")}sendMessageToClient(e){throw new t("kusto:unsupported","sendMessageToClient not supported for Kusto connections")}updateCustomParameters(e){throw new t("kusto:unsupported","updateCustomParameters not supported for Kusto connections")}async _initialize(){await n(this._config.sourceSpatialReference,this._outSpatialReference);try{const e=await this._queryInitial();this._handleResult(e),this._pollTimer=setInterval(this._pollRecentData,6e4*this._config.refreshInterval)}catch{throw new t("kusto:connection","Failed to query KQL database")}}async _queryInitial(){const{trackIdField:e}=this._config,n=l(await this._executeQuery(`${o(this._config.table)} | extend IngestedAt = ingestion_time() | summarize arg_max(IngestedAt, *) by ${o(e)}`));if(!n)throw new t("kusto:connection","Unable to find primaryTable");return{ingestedAt:u(n),table:n}}async _queryChanges(e=null){const n=e??"1970-01-01T00:00:00Z",s=l(await this._executeQuery(`${o(this._config.table)} | extend IngestedAt = ingestion_time() | where IngestedAt > todatetime('${i(n)}') | order by IngestedAt asc`));if(!s)throw new t("kusto:connection","Unable to find primaryTable");return{ingestedAt:u(s),table:s}}async _executeQuery(t){const n=this._config.database,s=n.properties.queryServiceUri,{data:o}=await e(`${s}/v2/rest/query`,{responseType:"json",method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify({db:n.displayName,csl:t})});return o}_handleResult(e){this._lastIngestedAt=e.ingestedAt;const t=this._createFeatures(e.table);if(null!=t){this.onMessage(t);for(const e of t)this.onFeature(e)}}_createFeatures(e){if(null==e||0===e.Rows.length)return null;const{xField:t,yField:n}=this._config.geometryEncoding,s=e.Columns.findIndex(e=>e.ColumnName===t),o=e.Columns.findIndex(e=>e.ColumnName===n);return e.Rows.map(t=>this._createFeature(e.Columns,s,o,t))}_createFeature(e,t,n,o){const{xField:i,yField:r}=this._config.geometryEncoding,a={};for(let s=0;s<e.length;s++){const t=e[s],n=o[s]??null;t.ColumnName!==r&&t.ColumnName!==i&&(a[t.ColumnName]=n)}let l=null;const u=o[t],c=o[n];return null!=c&&null!=u&&(l=s({x:u,y:c},this._config.sourceSpatialReference,this._outSpatialReference)),{attributes:a,geometry:l}}}function l(e){return e.find(e=>"DataTable"===e.FrameType&&"PrimaryResult"===e.TableKind)??null}function u(e){const t=e.Columns.findIndex(e=>"IngestedAt"===e.ColumnName);if(t<0)return null;let n=null;for(const s of e.Rows){const e=s[t];"string"==typeof e&&(null==n||e>n)&&(n=e)}return n}export{a as FabricKustoConnection};
|