@arcgis/core 4.33.0-next.20250202 → 4.33.0-next.20250204
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/WebScene.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{d3a8aabdbfb59dd433e3.js → 01c3507d78398baaf61b.js} +1 -1
- package/assets/esri/core/workers/chunks/{c74441fbe0f63633796f.js → 04306c2760c1f5b19966.js} +1 -1
- package/assets/esri/core/workers/chunks/1a2e1a414e651e988435.js +2 -0
- package/assets/esri/core/workers/chunks/{bf9bc52a3c559108c19a.js.LICENSE.txt → 1a2e1a414e651e988435.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/308ec51ff4a66f7fcb0d.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/354531dc2f0dea2ad96f.js +2 -0
- package/assets/esri/core/workers/chunks/{6e8905f20101c1f4509d.js.LICENSE.txt → 354531dc2f0dea2ad96f.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/{448ee44c7f594e5b2551.js → 3ce826ebf0692363309d.js} +1 -1
- package/assets/esri/core/workers/chunks/44abd2cd17aae3299ede.js +1 -0
- package/assets/esri/core/workers/chunks/{e9f0402fa3ac5a249807.js → 5196c43dbce48d1b81ae.js} +1 -1
- package/assets/esri/core/workers/chunks/568bcf809fcfd4d9c713.js +1 -0
- package/assets/esri/core/workers/chunks/{3ec51b75d1a86dad6cb1.js → 60cd8f4bba3e682ba57e.js} +1 -1
- package/assets/esri/core/workers/chunks/61243217aed5de012e93.js +1 -0
- package/assets/esri/core/workers/chunks/69d307758262e5d7a32e.js +1 -0
- package/assets/esri/core/workers/chunks/{e444ec05a8a1dfbd21a8.js → 6dee40b94f94ee7bc4e4.js} +1 -1
- package/assets/esri/core/workers/chunks/72cf9192292e5c85c6df.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/77764ca90bdd13ee2167.js +2 -0
- package/assets/esri/core/workers/chunks/{25c8cc30faade043c8dc.js.LICENSE.txt → 77764ca90bdd13ee2167.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/{f8367c21fa91435c7c53.js → 7a3e4cb5f64dac2cfe0e.js} +1 -1
- package/assets/esri/core/workers/chunks/7b11bf5799ecb3640b48.js +314 -0
- package/assets/esri/core/workers/chunks/{ba3c18d1efde46461231.js → 8438fba57e82e4cc7c11.js} +1 -1
- package/assets/esri/core/workers/chunks/{0ef5b0f8aa8a09acd6e0.js → 8e90c5fee4ad7c7275dc.js} +1 -1
- package/assets/esri/core/workers/chunks/{f2fae056a81f12b56b04.js → 8edae4ca2b18a219a43e.js} +1 -1
- package/assets/esri/core/workers/chunks/918bdba41fa470cf77fd.js +1 -0
- package/assets/esri/core/workers/chunks/a2409d4921c02614169a.js +1 -0
- package/assets/esri/core/workers/chunks/{7810579a5a780933cdc9.js → ad3e692681b50bd1acc2.js} +1 -1
- package/assets/esri/core/workers/chunks/{adfa126cea32298c28e9.js → b1269b51cef3e11c85e3.js} +1 -1
- package/assets/esri/core/workers/chunks/{692b3d03346f030aa649.js → b1f5344e57ee679a7e81.js} +44 -44
- package/assets/esri/core/workers/chunks/b21b152fa15896577242.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/b8a519d5d24b2e728ff8.js +2 -0
- package/assets/esri/core/workers/chunks/{7d3a441d2eb18d709ef9.js.LICENSE.txt → b8a519d5d24b2e728ff8.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/b9ce0049e27a3e1ed9f9.js +1 -0
- package/assets/esri/core/workers/chunks/{79afe4674a0557eb26e4.js → bf26f58210755875748c.js} +1 -1
- package/assets/esri/core/workers/chunks/c032bcd25e2e7a57ad43.js +1 -0
- package/assets/esri/core/workers/chunks/{6e25742ceedea7fb1b97.js → c3f03ccabca691186aad.js} +1 -1
- package/assets/esri/core/workers/chunks/{5adeb979f178944b9ce5.js → c4c2b94e5cee7b824093.js} +1 -1
- package/assets/esri/core/workers/chunks/{3e872e5e528dca7bee0c.js → cc75bbfd779f409943a3.js} +1 -1
- package/assets/esri/core/workers/chunks/{4c5279fedf982a174706.js → d175953337fa655dc6b0.js} +1 -1
- package/assets/esri/core/workers/chunks/d35efcbe439500bf18bc.js +1 -0
- package/assets/esri/core/workers/chunks/{bc50585615f07d5ec1a9.js → e4f82b5b50996b1ae48e.js} +1 -1
- package/assets/esri/core/workers/chunks/{2345344be4b0e487d3a6.js → f198f4ba7d3d52882d98.js} +1 -1
- package/assets/esri/core/workers/chunks/{881ddbdeb40336208e90.js → f29715459ecd46180829.js} +1 -1
- package/assets/esri/core/workers/chunks/{d1678945cf6a58f76863.js → f48ef415b90edc7ccadd.js} +1 -1
- package/assets/esri/themes/base/_core.scss +0 -2
- package/assets/esri/themes/base/widgets/_Directions.scss +129 -425
- package/assets/esri/themes/base/widgets/_Editor.scss +31 -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/widgets/Directions/t9n/Directions_ar.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_bg.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_bs.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_ca.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_cs.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_da.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_de.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_el.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_es.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_et.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_fi.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_fr.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_he.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_hr.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_hu.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_id.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_it.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_ja.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_ko.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_lt.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_lv.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_nl.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_no.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_pl.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_pt-BR.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_pt-PT.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_ro.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_ru.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_sk.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_sl.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_sr.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_sv.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_th.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_tr.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_uk.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_vi.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_zh-CN.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_zh-HK.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_zh-TW.json +1 -1
- package/chunks/ComponentShader.glsl.js +30 -30
- package/chunks/DefaultMaterial.glsl.js +19 -19
- package/chunks/HUDMaterial.glsl.js +34 -34
- package/chunks/MeasurementArrow.glsl.js +6 -6
- package/chunks/NativeLine.glsl.js +4 -4
- package/chunks/QuadraticBezier.js +1 -1
- package/chunks/RealisticTree.glsl.js +14 -14
- package/chunks/RibbonLine.glsl.js +32 -32
- package/chunks/Terrain.glsl.js +31 -31
- package/chunks/WaterSurface.glsl.js +15 -15
- package/copyright.txt +0 -29
- package/core/Collection.js +1 -1
- package/core/has.js +1 -1
- package/geometry/support/centroid.js +1 -1
- package/interfaces.d.ts +139 -13
- package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
- package/layers/mixins/ArcGISImageService.js +1 -1
- package/layers/mixins/ImageryTileMixin.js +1 -1
- package/layers/support/labelUtils.js +1 -1
- package/layers/support/rasterDatasets/WCSRaster.js +1 -1
- package/layers/support/rasterDatasets/multidimensionalUtils.js +1 -1
- package/package.json +4 -5
- package/popup/content/AttachmentsContent.js +1 -1
- package/popup/support/AttachmentsOrderByInfo.d.ts +4 -0
- package/popup/support/AttachmentsOrderByInfo.js +5 -0
- package/portal/schemas/definitions.js +1 -1
- package/rest/imageService/fetchRasterInfo.js +1 -1
- package/support/revision.js +1 -1
- package/support/timeUtils.d.ts +0 -1
- package/support/timeUtils.js +1 -1
- package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
- package/symbols/cim/animationUtils.js +1 -1
- package/symbols/cim/defaultCIMValues.js +1 -1
- package/views/2d/engine/webgl/animations/utils.js +1 -1
- package/views/2d/engine/webgl/mesh/factories/FeatureMeshFactory.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/line/GradientStrokeTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/line/gradientStrokeConstants.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/GradientStrokeShader.js +1 -1
- package/views/2d/engine/webgl/util/LabelMatcher.js +1 -1
- package/views/2d/engine/webgl/util/createMatcher.js +1 -1
- package/views/2d/layers/features/layerAdapters/SubtypeGroupLayerAdapter.js +1 -1
- package/views/3d/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiles3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DGraphicsPipeline.js +1 -1
- package/views/3d/layers/i3s/I3SClientMaterialUtil.js +1 -1
- package/views/3d/layers/i3s/I3SMaterialUtil.js +1 -1
- package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
- package/views/3d/layers/support/FeatureTileFetcher3DContext.js +1 -1
- package/views/3d/layers/support/FeatureTileTree3D.js +1 -1
- package/views/3d/layers/support/FeatureVisibilityFilter.js +1 -1
- package/views/3d/terrain/PatchRenderData.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentShader.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/util/DiscardOrAdjustAlpha.glsl.js +3 -3
- package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
- package/views/3d/webgl-engine/materials/CheckerBoardMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/HUDMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/MeasurementArrow.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/NativeLine.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/OutputColorHighlightOID.glsl.js +8 -8
- package/views/3d/webgl-engine/shaders/RealisticTree.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/Terrain.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/WaterSurface.glsl.js +1 -1
- package/views/layers/FeatureLayerView.js +1 -1
- package/views/layers/ImageryTileLayerView.d.ts +4 -0
- package/views/layers/ImageryTileLayerView.js +1 -1
- package/webscene/spec-certification/index.js +1 -1
- package/widgets/BasemapLayerList.js +1 -1
- package/widgets/Directions/DirectionsSearchTool.js +5 -0
- package/widgets/Directions/DirectionsViewModel.js +1 -1
- package/widgets/Directions/DirectionsVisibleElements.js +5 -0
- package/widgets/Directions.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflowData.js +1 -1
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor/Edits.js +1 -1
- package/widgets/Editor/UpdateWorkflow.js +1 -1
- package/widgets/Editor/VisibleElements.js +1 -1
- package/widgets/Editor/components/CreateFeaturesPanelContent.js +1 -1
- package/widgets/Editor/components/PanelToolbar.js +1 -1
- package/widgets/Editor/components/PendingFeatureList.js +5 -0
- package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
- package/widgets/Editor/css.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
- package/widgets/FeatureForm/FieldInput.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/LayerList.js +1 -1
- package/widgets/Legend/LegendViewModel.js +1 -1
- package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
- package/widgets/Legend.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/Search.js +1 -1
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/widgets/Sketch/VisibleElements.js +1 -1
- package/widgets/Sketch.js +1 -1
- package/widgets/support/ItemList.js +1 -1
- package/assets/esri/core/workers/chunks/06d72622590dbd38c5de.js +0 -1
- package/assets/esri/core/workers/chunks/0a19e1aec6a5502e391a.js +0 -1
- package/assets/esri/core/workers/chunks/12964a4b16113cdc9c93.js +0 -1
- package/assets/esri/core/workers/chunks/25c8cc30faade043c8dc.js +0 -2
- package/assets/esri/core/workers/chunks/326a3f50e585e492b673.js +0 -1
- package/assets/esri/core/workers/chunks/34d464dacee52739c98c.js +0 -1
- package/assets/esri/core/workers/chunks/4cab082b8432ddc05345.js +0 -1
- package/assets/esri/core/workers/chunks/6e8905f20101c1f4509d.js +0 -2
- package/assets/esri/core/workers/chunks/6f796f2836f949ab7359.js +0 -1
- package/assets/esri/core/workers/chunks/7d3a441d2eb18d709ef9.js +0 -2
- package/assets/esri/core/workers/chunks/bf9bc52a3c559108c19a.js +0 -2
- package/assets/esri/core/workers/chunks/dd46ec81cebe1a0a7b9c.js +0 -1
- package/assets/esri/core/workers/chunks/fb1a89f753057f889971.js +0 -314
- package/assets/esri/core/workers/chunks/ffa2b9d70830aed03a8f.js +0 -1
- package/assets/esri/themes/base/widgets/_SaveLayer.scss +0 -40
- package/assets/esri/widgets/support/t9n/SaveLayer.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_ar.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_bg.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_bs.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_ca.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_cs.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_da.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_de.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_el.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_en.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_es.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_et.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_fi.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_fr.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_he.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_hr.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_hu.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_id.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_it.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_ja.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_ko.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_lt.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_lv.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_nl.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_no.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_pl.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_pt-BR.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_pt-PT.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_ro.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_ru.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_sk.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_sl.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_sr.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_sv.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_th.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_tr.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_uk.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_vi.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_zh-CN.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_zh-HK.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_zh-TW.json +0 -1
- package/widgets/Directions/components/SaveLayer.js +0 -5
- package/widgets/Directions/css.js +0 -5
- /package/{views/3d/webgl-engine/core/shaderLibrary/util → webscene/support}/AlphaCutoff.js +0 -0
package/core/Collection.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../chunks/tslib.es6.js";import t from"./ArrayPool.js";import s from"./Evented.js";import{makeHandle as i}from"./handleUtils.js";import{clone as r}from"./lang.js";import n from"./ObjectPool.js";import{ObservableChangesType as h}from"./ObservableChangesType.js";import{schedule as o}from"./scheduling.js";import{ensureType as l,ensureOneOfType as a}from"./accessorSupport/ensureType.js";import{trackAccess as c}from"./accessorSupport/tracking.js";import{property as f}from"./accessorSupport/decorators/property.js";import{shared as _}from"./accessorSupport/decorators/shared.js";import{subclass as m}from"./accessorSupport/decorators/subclass.js";import{SimpleObservable as u}from"./accessorSupport/tracking/SimpleObservable.js";var g;class d{constructor(){this.target=null,this.cancellable=!1,this.defaultPrevented=!1,this.item=void 0,this.type=void 0}preventDefault(){this.cancellable&&(this.defaultPrevented=!0)}reset(e){this.defaultPrevented=!1,this.item=e}}class p{constructor(e,t,s,i,r){this.target=e,this.added=t,this.removed=s,this.start=i,this.deleteCount=r}}const b=new n(d,void 0,(e=>{e.item=null,e.target=null,e.defaultPrevented=!1,e.cancellable=!1}));function v(e){e&&"object"==typeof e&&"destroy"in e&&"function"==typeof e.destroy&&e.destroy()}function y(e){return e?e instanceof R?e.toArray():e.length?Array.prototype.slice.apply(e):[]:[]}function E(e){if(e?.length)return e[0]}function A(e,t,s,i){const r=Math.min(e.length-s,t.length-i);let n=0;for(;n<r&&e[s+n]===t[i+n];)n++;return n}function C(e,t,s,i){t&&t.forEach(((t,r,n)=>{e.push(t),C(e,s.call(i,t,r,n),s,i)}))}const O=new Set,M=new Set,D=new Set,x=new Map;let j=0,R=g=class extends s.EventedAccessor{static isCollection(e){return null!=e&&e instanceof g}constructor(e){super(e),this._chgListeners=[],this._notifications=null,this._updating=!1,this._timer=null,this._observable=new u,this.length=0,this._items=[],Object.defineProperty(this,"uid",{value:j++})}normalizeCtorArgs(e){return e?Array.isArray(e)||e instanceof g?{items:e}:e:{}}destroy(){this._removeAllRaw(),this._timer&&this._timer.remove(),this._emitter.destroy(),this._notifications=null}*[Symbol.iterator](){yield*this.items}get items(){return c(this._observable),this._items}set items(e){this._emitBeforeChanges(h.ADD)||(this._splice(0,this.length,y(e)),this._emitAfterChanges(h.ADD))}hasEventListener(e){return!this.destroyed&&("change"===e?this._chgListeners.length>0:this._emitter.hasEventListener(e))}on(e,t){if(this.destroyed)return i();if("change"===e){const e=this._chgListeners,s={removed:!1,callback:t};return e.push(s),this._notifications&&this._notifications.push({listeners:e.slice(),items:this._items.slice(),changes:[]}),i((()=>{s.removed=!0,e.splice(e.indexOf(s),1)}))}return this._emitter.on(e,t)}once(e,t){const s="deref"in t?()=>t.deref():()=>t,i=this.on(e,(e=>{s()?.call(null,e),i.remove()}));return i}add(e,t){if(c(this._observable),this._emitBeforeChanges(h.ADD))return this;const s=this.getNextIndex(t??null);return this._splice(s,0,[e]),this._emitAfterChanges(h.ADD),this}addMany(e,t=this._items.length){if(c(this._observable),!e?.length)return this;if(this._emitBeforeChanges(h.ADD))return this;const s=this.getNextIndex(t);return this._splice(s,0,y(e)),this._emitAfterChanges(h.ADD),this}at(e){if(c(this._observable),(e=Math.trunc(e)||0)<0&&(e+=this.length),!(e<0||e>=this.length))return this._items[e]}removeAll(){if(c(this._observable),!this.length||this._emitBeforeChanges(h.REMOVE))return[];const e=this._removeAllRaw();return this._emitAfterChanges(h.REMOVE),e}_removeAllRaw(){return 0===this.length?[]:this._splice(0,this.length)||[]}clone(){return c(this._observable),this._createNewInstance({items:this._items.map(r)})}concat(...e){c(this._observable);const t=e.map(y);return this._createNewInstance({items:this._items.concat(...t)})}drain(e,t){if(c(this._observable),!this.length||this._emitBeforeChanges(h.REMOVE))return;const s=this._splice(0,this.length),i=s.length;for(let r=0;r<i;r++)e.call(t,s[r],r,s);this._emitAfterChanges(h.REMOVE)}destroyAll(){this.drain(v)}destroyMany(e){const t=this.removeMany(e);return t.forEach(v),t}every(e,t){return c(this._observable),this._items.every(e,t)}filter(e,t){c(this._observable);const s=2===arguments.length?this._items.filter(e,t):this._items.filter(e);return this._createNewInstance({items:s})}find(e,t){return c(this._observable),this._items.find(e,t)}findIndex(e,t){return c(this._observable),this._items.findIndex(e,t)}flatten(e,t){c(this._observable);const s=[];return C(s,this,e,t),new g(s)}forEach(e,t){return c(this._observable),this._items.forEach(e,t)}getItemAt(e){return c(this._observable),this._items[e]}getNextIndex(e){c(this._observable);const t=this.length;return(e=e??t)<0?e=0:e>t&&(e=t),e}includes(e,t=0){return c(this._observable),this._items.includes(e,t)}indexOf(e,t=0){return c(this._observable),this._items.indexOf(e,t)}join(e=","){return c(this._observable),this._items.join(e)}lastIndexOf(e,t=this.length-1){return c(this._observable),this._items.lastIndexOf(e,t)}map(e,t){c(this._observable);const s=this._items.map(e,t);return new g({items:s})}reorder(e,t=this.length-1){c(this._observable);const s=this.indexOf(e);if(-1!==s){if(t<0?t=0:t>=this.length&&(t=this.length-1),s!==t){if(this._emitBeforeChanges(h.MOVE))return e;this._splice(s,1),this._splice(t,0,[e]),this._emitAfterChanges(h.MOVE)}return e}}pop(){if(c(this._observable),!this.length||this._emitBeforeChanges(h.REMOVE))return;const e=E(this._splice(this.length-1,1));return this._emitAfterChanges(h.REMOVE),e}push(...e){return c(this._observable),this._emitBeforeChanges(h.ADD)||(this._splice(this.length,0,e),this._emitAfterChanges(h.ADD)),this.length}reduce(e,t){c(this._observable);const s=this._items;return 2===arguments.length?s.reduce(e,t):s.reduce(e)}reduceRight(e,t){c(this._observable);const s=this._items;return 2===arguments.length?s.reduceRight(e,t):s.reduceRight(e)}remove(e){return c(this._observable),this.removeAt(this.indexOf(e))}removeAt(e){if(c(this._observable),e<0||e>=this.length||this._emitBeforeChanges(h.REMOVE))return;const t=E(this._splice(e,1));return this._emitAfterChanges(h.REMOVE),t}removeMany(e){if(c(this._observable),!e?.length||this._emitBeforeChanges(h.REMOVE))return[];const t=e instanceof g?e.toArray():e,s=this._items,i=[],r=t.length;for(let n=0;n<r;n++){const e=t[n],r=s.indexOf(e);if(r>-1){const e=1+A(t,s,n+1,r+1),h=this._splice(r,e);h&&h.length>0&&i.push.apply(i,h),n+=e-1}}return this._emitAfterChanges(h.REMOVE),i}reverse(){if(c(this._observable),this._emitBeforeChanges(h.MOVE))return this;const e=this._splice(0,this.length);return e&&(e.reverse(),this._splice(0,0,e)),this._emitAfterChanges(h.MOVE),this}shift(){if(c(this._observable),!this.length||this._emitBeforeChanges(h.REMOVE))return;const e=E(this._splice(0,1));return this._emitAfterChanges(h.REMOVE),e}slice(e=0,t=this.length){return c(this._observable),this._createNewInstance({items:this._items.slice(e,t)})}some(e,t){return c(this._observable),this._items.some(e,t)}sort(e){if(c(this._observable),!this.length||this._emitBeforeChanges(h.MOVE))return this;const t=this._splice(0,this.length);return arguments.length?t.sort(e):t.sort(),this._splice(0,0,t),this._emitAfterChanges(h.MOVE),this}splice(e,t,...s){c(this._observable);const i=(t?h.REMOVE:0)|(s.length?h.ADD:0);if(this._emitBeforeChanges(i))return[];const r=this._splice(e,t,s)||[];return this._emitAfterChanges(i),r}toArray(){return c(this._observable),this._items.slice()}toJSON(){return c(this._observable),this.toArray()}toLocaleString(){return c(this._observable),this._items.toLocaleString()}toString(){return c(this._observable),this._items.toString()}unshift(...e){return c(this._observable),!e.length||this._emitBeforeChanges(h.ADD)||(this._splice(0,0,e),this._emitAfterChanges(h.ADD)),this.length}_createNewInstance(e){return new this.constructor(e)}_splice(e,t,s){const i=this._items,r=this.itemType;let n,h;if(!this._notifications&&this.hasEventListener("change")&&(this._notifications=[{listeners:this._chgListeners.slice(),items:this._items.slice(),changes:[]}],this._timer&&this._timer.remove(),this._updating=!0,this._timer=o((()=>this._dispatchChange()))),e<0&&(e+=this.length),t){if(h=i.splice(e,t),this.hasEventListener("before-remove")){const t=b.acquire();t.target=this,t.cancellable=!0;for(let s=0,r=h.length;s<r;s++)n=h[s],t.reset(n),this.emit("before-remove",t),t.defaultPrevented&&(h.splice(s,1),i.splice(e,0,n),e+=1,s-=1,r-=1);b.release(t)}if(this.length=this._items.length,this.hasEventListener("after-remove")){const e=b.acquire();e.target=this,e.cancellable=!1;const t=h.length;for(let s=0;s<t;s++)e.reset(h[s]),this.emit("after-remove",e);b.release(e)}}if(s?.length){if(r){const e=[];for(const t of s){const s=r.ensureType(t);null==s&&null!=t||e.push(s)}s=e}const t=this.hasEventListener("before-add"),n=this.hasEventListener("after-add"),h=e===this.length;if(t||n){const r=b.acquire();r.target=this,r.cancellable=!0;const o=b.acquire();o.target=this,o.cancellable=!1;for(const l of s)t?(r.reset(l),this.emit("before-add",r),r.defaultPrevented||(h?i.push(l):i.splice(e++,0,l),this._set("length",i.length),n&&(o.reset(l),this.emit("after-add",o)))):(h?i.push(l):i.splice(e++,0,l),this._set("length",i.length),o.reset(l),this.emit("after-add",o));b.release(o),b.release(r)}else{if(h)for(const e of s)i.push(e);else i.splice(e,0,...s);this._set("length",i.length)}}if((s?.length||h?.length)&&this._notifyChangeEvent(s,h),this.hasEventListener("after-splice")){const i=new p(this,s,h,e,t);this.emit("after-splice",i)}return h}_emitBeforeChanges(e){let t=!1;if(this.hasEventListener("before-changes")){const s=b.acquire();s.target=this,s.cancellable=!0,s.type=e,this.emit("before-changes",s),t=s.defaultPrevented,b.release(s)}return t}_emitAfterChanges(e){if(this.hasEventListener("after-changes")){const t=b.acquire();t.target=this,t.cancellable=!1,t.type=e,this.emit("after-changes",t),b.release(t)}this._observable.notify()}_notifyChangeEvent(e,t){this.hasEventListener("change")&&this._notifications&&this._notifications[this._notifications.length-1].changes.push({added:e,removed:t})}get updating(){return this._updating}_dispatchChange(){if(this._timer&&(this._timer.remove(),this._timer=null),this._updating=!1,!this._notifications)return;const e=this._notifications;this._notifications=null;for(const s of e){const e=s.changes;O.clear(),M.clear(),D.clear();for(const{added:t,removed:s}of e){if(t)if(0===D.size&&0===M.size)for(const e of t)O.add(e);else for(const e of t)M.has(e)?(D.add(e),M.delete(e)):D.has(e)||O.add(e);if(s)if(0===D.size&&0===O.size)for(const e of s)M.add(e);else for(const e of s)O.has(e)?O.delete(e):(D.delete(e),M.add(e))}const i=t.acquire();O.forEach((e=>{i.push(e)}));const r=t.acquire();M.forEach((e=>{r.push(e)}));const n=this._items,h=s.items,o=t.acquire();if(D.forEach((e=>{h.indexOf(e)!==n.indexOf(e)&&o.push(e)})),s.listeners&&(i.length||r.length||o.length)){const e={target:this,added:i,removed:r,moved:o},t=s.listeners.length;for(let i=0;i<t;i++){const t=s.listeners[i];t.removed||t.callback.call(this,e)}}t.release(i),t.release(r),t.release(o)}O.clear(),M.clear(),D.clear()}};R.ofType=t=>{if(!t)return g;if(x.has(t))return x.get(t);let s=null;if("function"==typeof t)s=t.prototype.declaredClass;else if(t.base)s=t.base.prototype.declaredClass;else for(const e in t.typeMap){const i=t.typeMap[e].prototype.declaredClass;s?s+=` | ${i}`:s=i}let i=class extends g{};return e([_({Type:t,ensureType:"function"==typeof t?l(t):a(t)})],i.prototype,"itemType",void 0),i=e([m(`esri.core.Collection<${s}>`)],i),x.set(t,i),i},e([f()],R.prototype,"_updating",void 0),e([f()],R.prototype,"length",void 0),e([f()],R.prototype,"items",null),e([f({readOnly:!0})],R.prototype,"updating",null),R=g=e([m("esri.core.Collection")],R);const V=R;export{V as default};
|
|
5
|
+
import{_ as e}from"../chunks/tslib.es6.js";import t from"./ArrayPool.js";import s from"./Evented.js";import{makeHandle as i}from"./handleUtils.js";import{clone as r}from"./lang.js";import n from"./ObjectPool.js";import{ObservableChangesType as h}from"./ObservableChangesType.js";import{schedule as o}from"./scheduling.js";import{ensureType as l,ensureOneOfType as a}from"./accessorSupport/ensureType.js";import{trackAccess as c}from"./accessorSupport/tracking.js";import{property as f}from"./accessorSupport/decorators/property.js";import{shared as _}from"./accessorSupport/decorators/shared.js";import{subclass as u}from"./accessorSupport/decorators/subclass.js";import{SimpleObservable as m}from"./accessorSupport/tracking/SimpleObservable.js";var g;class d{constructor(){this.target=null,this.cancellable=!1,this.defaultPrevented=!1,this.item=void 0,this.type=void 0}preventDefault(){this.cancellable&&(this.defaultPrevented=!0)}reset(e){this.defaultPrevented=!1,this.item=e}}class p{constructor(e,t,s,i,r){this.target=e,this.added=t,this.removed=s,this.start=i,this.deleteCount=r}}const b=new n(d,void 0,(e=>{e.item=null,e.target=null,e.defaultPrevented=!1,e.cancellable=!1}));function v(e){e&&"object"==typeof e&&"destroy"in e&&"function"==typeof e.destroy&&e.destroy()}function y(e){return e?e instanceof R?e.toArray():e.length?Array.prototype.slice.apply(e):[]:[]}function E(e){if(e?.length)return e[0]}function A(e,t,s,i){const r=Math.min(e.length-s,t.length-i);let n=0;for(;n<r&&e[s+n]===t[i+n];)n++;return n}function C(e,t,s,i){t&&t.forEach(((t,r,n)=>{e.push(t),C(e,s.call(i,t,r,n),s,i)}))}const O=new Set,M=new Set,D=new Set,x=new Map;let j=0,R=g=class extends s.EventedAccessor{static isCollection(e){return null!=e&&e instanceof g}constructor(e){super(e),this._chgListeners=[],this._notifications=null,this._updating=!1,this._timer=null,this._observable=new m,this.length=0,this._items=[],Object.defineProperty(this,"uid",{value:j++})}normalizeCtorArgs(e){return e?Array.isArray(e)||e instanceof g?{items:e}:e:{}}destroy(){this._removeAllRaw(),this._timer&&this._timer.remove(),this._emitter.destroy(),this._notifications=null}*[Symbol.iterator](){yield*this.items}get items(){return c(this._observable),this._items}set items(e){this._emitBeforeChanges(h.ADD)||(this._splice(0,this.length,y(e)),this._emitAfterChanges(h.ADD))}hasEventListener(e){return!this.destroyed&&("change"===e?this._chgListeners.length>0:this._emitter.hasEventListener(e))}on(e,t){if(this.destroyed)return i();if("change"===e){const e=this._chgListeners,s={removed:!1,callback:t};return e.push(s),this._notifications&&this._notifications.push({listeners:e.slice(),items:this._items.slice(),changes:[]}),i((()=>{s.removed=!0,e.splice(e.indexOf(s),1)}))}return this._emitter.on(e,t)}once(e,t){const s="deref"in t?()=>t.deref():()=>t,i=this.on(e,(e=>{s()?.call(null,e),i.remove()}));return i}add(e,t){if(c(this._observable),this._emitBeforeChanges(h.ADD))return this;const s=this.getNextIndex(t??null);return this._splice(s,0,[e]),this._emitAfterChanges(h.ADD),this}addMany(e,t=this._items.length){if(c(this._observable),!e?.length)return this;if(this._emitBeforeChanges(h.ADD))return this;const s=this.getNextIndex(t);return this._splice(s,0,y(e)),this._emitAfterChanges(h.ADD),this}at(e){if(c(this._observable),(e=Math.trunc(e)||0)<0&&(e+=this.length),!(e<0||e>=this.length))return this._items[e]}removeAll(){if(c(this._observable),!this.length||this._emitBeforeChanges(h.REMOVE))return[];const e=this._removeAllRaw();return this._emitAfterChanges(h.REMOVE),e}_removeAllRaw(){return 0===this.length?[]:this._splice(0,this.length)||[]}clone(){return c(this._observable),this._createNewInstance({items:this._items.map(r)})}concat(...e){c(this._observable);const t=e.map(y);return this._createNewInstance({items:this._items.concat(...t)})}drain(e,t){if(c(this._observable),!this.length||this._emitBeforeChanges(h.REMOVE))return;const s=this._splice(0,this.length),i=s.length;for(let r=0;r<i;r++)e.call(t,s[r],r,s);this._emitAfterChanges(h.REMOVE)}destroyAll(){this.drain(v)}destroyMany(e){const t=this.removeMany(e);return t.forEach(v),t}every(e,t){return c(this._observable),this._items.every(e,t)}filter(e,t){c(this._observable);const s=2===arguments.length?this._items.filter(e,t):this._items.filter(e);return this._createNewInstance({items:s})}find(e,t){return c(this._observable),this._items.find(e,t)}findIndex(e,t){return c(this._observable),this._items.findIndex(e,t)}flatten(e,t){c(this._observable);const s=[];return C(s,this,e,t),new g(s)}forEach(e,t){return c(this._observable),this._items.forEach(e,t)}getItemAt(e){return c(this._observable),this._items[e]}getNextIndex(e){c(this._observable);const t=this.length;return(e=e??t)<0?e=0:e>t&&(e=t),e}includes(e,t=0){return c(this._observable),this._items.includes(e,t)}indexOf(e,t=0){return c(this._observable),this._items.indexOf(e,t)}join(e=","){return c(this._observable),this._items.join(e)}lastIndexOf(e,t=this.length-1){return c(this._observable),this._items.lastIndexOf(e,t)}map(e,t){c(this._observable);const s=this._items.map(e,t);return new g({items:s})}reorder(e,t=this.length-1){c(this._observable);const s=this.indexOf(e);if(-1!==s){if(t<0?t=0:t>=this.length&&(t=this.length-1),s!==t){if(this._emitBeforeChanges(h.MOVE))return e;this._splice(s,1),this._splice(t,0,[e]),this._emitAfterChanges(h.MOVE)}return e}}pop(){if(c(this._observable),!this.length||this._emitBeforeChanges(h.REMOVE))return;const e=E(this._splice(this.length-1,1));return this._emitAfterChanges(h.REMOVE),e}push(...e){return c(this._observable),this._emitBeforeChanges(h.ADD)||(this._splice(this.length,0,e),this._emitAfterChanges(h.ADD)),this.length}reduce(e,t){c(this._observable);const s=this._items;return 2===arguments.length?s.reduce(e,t):s.reduce(e)}reduceRight(e,t){c(this._observable);const s=this._items;return 2===arguments.length?s.reduceRight(e,t):s.reduceRight(e)}remove(e){return c(this._observable),this.removeAt(this.indexOf(e))}removeAt(e){if(c(this._observable),e<0||e>=this.length||this._emitBeforeChanges(h.REMOVE))return;const t=E(this._splice(e,1));return this._emitAfterChanges(h.REMOVE),t}removeMany(e){if(c(this._observable),!e?.length||this._emitBeforeChanges(h.REMOVE))return[];const t=e instanceof g?e.toArray():e,s=this._items,i=[],r=t.length;for(let n=0;n<r;n++){const e=t[n],r=s.indexOf(e);if(r>-1){const e=1+A(t,s,n+1,r+1),h=this._splice(r,e);h&&h.length>0&&i.push.apply(i,h),n+=e-1}}return this._emitAfterChanges(h.REMOVE),i}reverse(){if(c(this._observable),this._emitBeforeChanges(h.MOVE))return this;const e=this._splice(0,this.length);return e&&(e.reverse(),this._splice(0,0,e)),this._emitAfterChanges(h.MOVE),this}shift(){if(c(this._observable),!this.length||this._emitBeforeChanges(h.REMOVE))return;const e=E(this._splice(0,1));return this._emitAfterChanges(h.REMOVE),e}slice(e=0,t=this.length){return c(this._observable),this._createNewInstance({items:this._items.slice(e,t)})}some(e,t){return c(this._observable),this._items.some(e,t)}sort(e){if(c(this._observable),!this.length||this._emitBeforeChanges(h.MOVE)||!this._requiresSort(e))return this;const t=this._splice(0,this.length);return arguments.length?t.sort(e):t.sort(),this._splice(0,0,t),this._emitAfterChanges(h.MOVE),this}_requiresSort(e=(e,t)=>e===t?0:e<t?-1:1){const t=this.length-1;for(let s=0;s<t;s++){if(e(this.items[s],this.items[s+1])>0)return!0}return!1}splice(e,t,...s){c(this._observable);const i=(t?h.REMOVE:0)|(s.length?h.ADD:0);if(this._emitBeforeChanges(i))return[];const r=this._splice(e,t,s)||[];return this._emitAfterChanges(i),r}toArray(){return c(this._observable),this._items.slice()}toJSON(){return c(this._observable),this.toArray()}toLocaleString(){return c(this._observable),this._items.toLocaleString()}toString(){return c(this._observable),this._items.toString()}unshift(...e){return c(this._observable),!e.length||this._emitBeforeChanges(h.ADD)||(this._splice(0,0,e),this._emitAfterChanges(h.ADD)),this.length}_createNewInstance(e){return new this.constructor(e)}_splice(e,t,s){const i=this._items,r=this.itemType;let n,h;if(!this._notifications&&this.hasEventListener("change")&&(this._notifications=[{listeners:this._chgListeners.slice(),items:this._items.slice(),changes:[]}],this._timer&&this._timer.remove(),this._updating=!0,this._timer=o((()=>this._dispatchChange()))),e<0&&(e+=this.length),t){if(h=i.splice(e,t),this.hasEventListener("before-remove")){const t=b.acquire();t.target=this,t.cancellable=!0;for(let s=0,r=h.length;s<r;s++)n=h[s],t.reset(n),this.emit("before-remove",t),t.defaultPrevented&&(h.splice(s,1),i.splice(e,0,n),e+=1,s-=1,r-=1);b.release(t)}if(this.length=this._items.length,this.hasEventListener("after-remove")){const e=b.acquire();e.target=this,e.cancellable=!1;const t=h.length;for(let s=0;s<t;s++)e.reset(h[s]),this.emit("after-remove",e);b.release(e)}}if(s?.length){if(r){const e=[];for(const t of s){const s=r.ensureType(t);null==s&&null!=t||e.push(s)}s=e}const t=this.hasEventListener("before-add"),n=this.hasEventListener("after-add"),h=e===this.length;if(t||n){const r=b.acquire();r.target=this,r.cancellable=!0;const o=b.acquire();o.target=this,o.cancellable=!1;for(const l of s)t?(r.reset(l),this.emit("before-add",r),r.defaultPrevented||(h?i.push(l):i.splice(e++,0,l),this._set("length",i.length),n&&(o.reset(l),this.emit("after-add",o)))):(h?i.push(l):i.splice(e++,0,l),this._set("length",i.length),o.reset(l),this.emit("after-add",o));b.release(o),b.release(r)}else{if(h)for(const e of s)i.push(e);else i.splice(e,0,...s);this._set("length",i.length)}}if((s?.length||h?.length)&&this._notifyChangeEvent(s,h),this.hasEventListener("after-splice")){const i=new p(this,s,h,e,t);this.emit("after-splice",i)}return h}_emitBeforeChanges(e){let t=!1;if(this.hasEventListener("before-changes")){const s=b.acquire();s.target=this,s.cancellable=!0,s.type=e,this.emit("before-changes",s),t=s.defaultPrevented,b.release(s)}return t}_emitAfterChanges(e){if(this.hasEventListener("after-changes")){const t=b.acquire();t.target=this,t.cancellable=!1,t.type=e,this.emit("after-changes",t),b.release(t)}this._observable.notify()}_notifyChangeEvent(e,t){this.hasEventListener("change")&&this._notifications&&this._notifications[this._notifications.length-1].changes.push({added:e,removed:t})}get updating(){return this._updating}_dispatchChange(){if(this._timer&&(this._timer.remove(),this._timer=null),this._updating=!1,!this._notifications)return;const e=this._notifications;this._notifications=null;for(const s of e){const e=s.changes;O.clear(),M.clear(),D.clear();for(const{added:t,removed:s}of e){if(t)if(0===D.size&&0===M.size)for(const e of t)O.add(e);else for(const e of t)M.has(e)?(D.add(e),M.delete(e)):D.has(e)||O.add(e);if(s)if(0===D.size&&0===O.size)for(const e of s)M.add(e);else for(const e of s)O.has(e)?O.delete(e):(D.delete(e),M.add(e))}const i=t.acquire();O.forEach((e=>{i.push(e)}));const r=t.acquire();M.forEach((e=>{r.push(e)}));const n=this._items,h=s.items,o=t.acquire();if(D.forEach((e=>{h.indexOf(e)!==n.indexOf(e)&&o.push(e)})),s.listeners&&(i.length||r.length||o.length)){const e={target:this,added:i,removed:r,moved:o},t=s.listeners.length;for(let i=0;i<t;i++){const t=s.listeners[i];t.removed||t.callback.call(this,e)}}t.release(i),t.release(r),t.release(o)}O.clear(),M.clear(),D.clear()}};R.ofType=t=>{if(!t)return g;if(x.has(t))return x.get(t);let s=null;if("function"==typeof t)s=t.prototype.declaredClass;else if(t.base)s=t.base.prototype.declaredClass;else for(const e in t.typeMap){const i=t.typeMap[e].prototype.declaredClass;s?s+=` | ${i}`:s=i}let i=class extends g{};return e([_({Type:t,ensureType:"function"==typeof t?l(t):a(t)})],i.prototype,"itemType",void 0),i=e([u(`esri.core.Collection<${s}>`)],i),x.set(t,i),i},e([f()],R.prototype,"_updating",void 0),e([f()],R.prototype,"length",void 0),e([f()],R.prototype,"items",null),e([f({readOnly:!0})],R.prototype,"updating",null),R=g=e([u("esri.core.Collection")],R);const V=R;export{V as default};
|
package/core/has.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
let e;function has(a){return"function"==typeof e[a]?e[a]=e[a](globalThis):e[a]}e=globalThis.dojoConfig?.has||globalThis.esriConfig?.has?{...globalThis.dojoConfig?.has,...globalThis.esriConfig?.has}:{},has.add=(a,d,i,
|
|
5
|
+
let e;function has(a){return"function"==typeof e[a]?e[a]=e[a](globalThis):e[a]}e=globalThis.dojoConfig?.has||globalThis.esriConfig?.has?{...globalThis.dojoConfig?.has,...globalThis.esriConfig?.has}:{},has.add=(a,d,i,s)=>{(s||void 0===e[a])&&(e[a]=d),i&&has(a)},has.cache=e,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("enable-feature:multiple-highlights",!0),(()=>{has.add("host-webworker",void 0!==globalThis.WorkerGlobalScope&&self instanceof globalThis.WorkerGlobalScope);const e="undefined"!=typeof window&&"undefined"!=typeof location&&"undefined"!=typeof document&&window.location===location&&window.document===document;if(has.add("host-browser",e),has.add("host-node","object"==typeof globalThis.process&&globalThis.process.versions?.node&&globalThis.process.versions.v8),has.add("dom",e),has("host-browser")){const e=navigator,a=e.userAgent,d=e.appVersion,i=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")?i: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",i=parseFloat(d.replace(/_/,".").replaceAll("_",""));has.add(e,i),has.add("ios",i)}has("webkit")||(!a.includes("Gecko")||has("wp")||has("khtml")||has("edge")||has.add("mozilla",i),has("mozilla")&&has.add("ff",parseFloat(a.split("Firefox/")[1]||a.split("Minefield/")[1])||void 0))}})(),(()=>{if(globalThis.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 globalThis),has.add("esri-performance-mode-frames-between-render",20),has.add("esri-force-performance-mode",!1),has.add("esri-shared-array-buffer",(()=>{const e="SharedArrayBuffer"in globalThis,a=!1===globalThis.crossOriginIsolated;return e&&!a})),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 globalThis),has.add("esri-workers","Worker"in globalThis),has.add("web-feat:cache","caches"in globalThis),has.add("esri-workers-arraybuffer-transfer",!has("safari")||Number(has("safari"))>=12),has.add("workers-pool-size",8),has.add("featurelayer-simplify-thresholds",[.5,.5,.5,.5]),has.add("featurelayer-simplify-payload-size-factors",[1,1,4]),has.add("featurelayer-fast-triangulation-enabled",!0),has.add("featurelayer-animation-enabled",!0),has.add("featurelayer-snapshot-enabled",!0),has.add("featurelayer-snapshot-point-min-threshold",8e4),has.add("featurelayer-snapshot-point-max-threshold",4e5),has.add("featurelayer-snapshot-point-coverage",.1),has.add("featurelayer-query-max-depth",4),has.add("featurelayer-query-pausing-enabled",!1),has.add("featurelayer-advanced-symbols",!1),has.add("featurelayer-pbf",!0),has.add("featurelayer-pbf-statistics",!1),has.add("feature-layers-workers",!0),has.add("feature-polyline-generalization-factor",1),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-hosted",16),has.add("request-queue-concurrency-non-hosted",4),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-pixels-per-segment",16),has.add("view-readyState-waiting-delay",1e3),has.add("gradient-depth-bias",.01),has.add("gradient-depth-epsilon",1e-8),has("host-webworker")||has("host-browser")&&(has.add("esri-csp-restrictions",(()=>{try{new Function}catch{return!0}return!1})),has.add("esri-image-decode",(()=>{if("decode"in new Image){const e=new Image;return e.src='data:image/svg+xml;charset=UTF-8,<svg version="1.1" xmlns="http://www.w3.org/2000/svg"></svg>',void e.decode().then((()=>{has.add("esri-image-decode",!0,!0,!0)})).catch((()=>{has.add("esri-image-decode",!1,!0,!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,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{collectPath as t}from"../geometryCursorCollectUtils.js";import{getLength as n,getMidpoint as e}from"./coordsUtils.js";function r(t){return t?t.hasZ?[t.xmax-t.xmin/2,t.ymax-t.ymin/2,t.zmax-t.zmin/2]:[t.xmax-t.xmin/2,t.ymax-t.ymin/2]:null}function l(t){return t?o(t.rings,t.hasZ??!1):null}function o(t,n){if(!t?.length)return null;const e=[],r=[],l=n?[1/0,-1/0,1/0,-1/0,1/0,-1/0]:[1/0,-1/0,1/0,-1/0];for(let o=0,i=t.length;o<i;o++){const e=u(t[o],n,l);e&&r.push(e)}if(r.sort(((t,e)=>{let r=t[2]-e[2];return 0===r&&n&&(r=t[4]-e[4]),r})),r.length&&(e[0]=r[0][0],e[1]=r[0][1],n&&(e[2]=r[0][3]),(e[0]<l[0]||e[0]>l[1]||e[1]<l[2]||e[1]>l[3]||n&&(e[2]<l[4]||e[2]>l[5]))&&(e.length=0)),!e.length){const r=t[0]&&t[0].length?s(t[0],n):null;if(!r)return null;e[0]=r[0],e[1]=r[1],n&&r.length>2&&(e[2]=r[2])}return e}function u(t,n,e){let r=0,l=0,o=0,u=0,i=0;const s=t.length?t[0][0]:0,I=t.length?t[0][1]:0,h=t.length&&n?t[0][2]:0;for(let f=0;f<t.length;f++){const c=t[f],N=t[(f+1)%t.length],[x,g,a]=c,m=x-s,P=g-I,[T,y,E]=N,S=T-s,p=y-I,z=m*p-S*P;if(u+=z,r+=(m+S)*z,l+=(P+p)*z,n&&c.length>2&&N.length>2){const t=a-h,n=E-h,e=m*n-S*t;o+=(t+n)*e,i+=e}x<e[0]&&(e[0]=x),x>e[1]&&(e[1]=x),g<e[2]&&(e[2]=g),g>e[3]&&(e[3]=g),n&&(a<e[4]&&(e[4]=a),a>e[5]&&(e[5]=a))}if(u>0&&(u*=-1),i>0&&(i*=-1),!u)return null;u*=.5,i*=.5;const c=[r/(6*u)+s,l/(6*u)+I,u];return n&&(e[4]===e[5]||0===i?(c[3]=(e[4]+e[5])/2,c[4]=0):(c[3]=o/(6*i)+h,c[4]=i)),c}function i(t,n){let e=0,r=0,l=0;t.nextPoint();const o=t.pathSize?t.x:0,u=t.pathSize?t.y:0;for(let i=0;i<t.pathSize;i++){t.seekInPath(i);const s=[t.x,t.y];t.seekInPath((i+1)%t.pathSize);const I=[t.x,t.y],[h,c]=s,f=h-o,N=c-u,[x,g]=I,a=x-o,m=g-u,P=f*m-a*N;l+=P,e+=(f+a)*P,r+=(N+m)*P,h<n[0]&&(n[0]=h),h>n[1]&&(n[1]=h),c<n[2]&&(n[2]=c),c>n[3]&&(n[3]=c)}if(l>0&&(l*=-1),!l)return null;l*=.5;return[e/(6*l)+o,r/(6*l)+u,l]}function s(t,r){const l=r?[0,0,0]:[0,0],o=r?[0,0,0]:[0,0];let u=0,i=0,s=0,I=0;for(let h=0,c=t.length;h<c-1;h++){const c=t[h],f=t[h+1];if(c&&f){l[0]=c[0],l[1]=c[1],o[0]=f[0],o[1]=f[1],r&&c.length>2&&f.length>2&&(l[2]=c[2],o[2]=f[2]);const t=n(l,o);if(t){u+=t;const n=e(c,f);i+=t*n[0],s+=t*n[1],r&&n.length>2&&(I+=t*n[2])}}}return u>0?r?[i/u,s/u,I/u]:[i/u,s/u]:t.length?t[0]:null}function I(n){const{hasZ:e,totalSize:r}=n;if(0===r)return null;const l=[],o=[],i=e?[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY]:[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY];for(n.reset();n.nextPath();){const e=u(t(n),n.hasZ,i);e&&o.push(e)}if(o.sort(((t,n)=>{let r=t[2]-n[2];return 0===r&&e&&(r=t[4]-n[4]),r})),o.length&&(l[0]=o[0][0],l[1]=o[0][1],e&&(l[2]=o[0][3]),(l[0]<i[0]||l[0]>i[1]||l[1]<i[2]||l[1]>i[3]||e&&(l[2]<i[4]||l[2]>i[5]))&&(l.length=0)),!l.length){n.reset(),n.nextPath();const t=n.pathSize?h(n):null;if(!t)return null;l[0]=t[0],l[1]=t[1],e&&t.length>2&&(l[2]=t[2])}return l}function h(t){const{hasZ:r}=t,l=r?[0,0,0]:[0,0],o=r?[0,0,0]:[0,0];let u=0,i=0,s=0,I=0;if(t.nextPoint()){let h=t.x,c=t.y,f=t.z;for(;t.nextPoint();){const N=t.x,x=t.y,g=t.z;l[0]=h,l[1]=c,o[0]=N,o[1]=x,r&&(l[2]=f,o[2]=g);const a=n(l,o);if(a){u+=a;const t=e(l,o);i+=a*t[0],s+=a*t[1],r&&t.length>2&&(I+=a*t[2])}h=N,c=x,f=g}}return u>0?r?[i/u,s/u,I/u]:[i/u,s/u]:t.pathSize?(t.seekPathStart(),t.nextPoint(),[t.x,t.y]):null}const c=1e-6;function f(t){let n=0;for(t.reset();t.nextPath();)n+=t.getCurrentRingArea();if(n<c){const n=I(t);return n?[n[0],n[1]]:null}const e=[0,0];if(t.reset(),!t.nextPath()||!t.nextPoint())return null;const r=[t.x,t.y];for(t.reset();t.nextPath();)x(e,r,t);return e[0]*=1/n,e[1]*=1/n,e[0]+=r[0],e[1]+=r[1],e}const N=1/3;function x(t,n,e){if(!
|
|
5
|
+
import{collectPath as t}from"../geometryCursorCollectUtils.js";import{getLength as n,getMidpoint as e}from"./coordsUtils.js";function r(t){return t?t.hasZ?[t.xmax-t.xmin/2,t.ymax-t.ymin/2,t.zmax-t.zmin/2]:[t.xmax-t.xmin/2,t.ymax-t.ymin/2]:null}function l(t){return t?o(t.rings,t.hasZ??!1):null}function o(t,n){if(!t?.length)return null;const e=[],r=[],l=n?[1/0,-1/0,1/0,-1/0,1/0,-1/0]:[1/0,-1/0,1/0,-1/0];for(let o=0,i=t.length;o<i;o++){const e=u(t[o],n,l);e&&r.push(e)}if(r.sort(((t,e)=>{let r=t[2]-e[2];return 0===r&&n&&(r=t[4]-e[4]),r})),r.length&&(e[0]=r[0][0],e[1]=r[0][1],n&&(e[2]=r[0][3]),(e[0]<l[0]||e[0]>l[1]||e[1]<l[2]||e[1]>l[3]||n&&(e[2]<l[4]||e[2]>l[5]))&&(e.length=0)),!e.length){const r=t[0]&&t[0].length?s(t[0],n):null;if(!r)return null;e[0]=r[0],e[1]=r[1],n&&r.length>2&&(e[2]=r[2])}return e}function u(t,n,e){let r=0,l=0,o=0,u=0,i=0;const s=t.length?t[0][0]:0,I=t.length?t[0][1]:0,h=t.length&&n?t[0][2]:0;for(let f=0;f<t.length;f++){const c=t[f],N=t[(f+1)%t.length],[x,g,a]=c,m=x-s,P=g-I,[T,y,E]=N,S=T-s,p=y-I,z=m*p-S*P;if(u+=z,r+=(m+S)*z,l+=(P+p)*z,n&&c.length>2&&N.length>2){const t=a-h,n=E-h,e=m*n-S*t;o+=(t+n)*e,i+=e}x<e[0]&&(e[0]=x),x>e[1]&&(e[1]=x),g<e[2]&&(e[2]=g),g>e[3]&&(e[3]=g),n&&(a<e[4]&&(e[4]=a),a>e[5]&&(e[5]=a))}if(u>0&&(u*=-1),i>0&&(i*=-1),!u)return null;u*=.5,i*=.5;const c=[r/(6*u)+s,l/(6*u)+I,u];return n&&(e[4]===e[5]||0===i?(c[3]=(e[4]+e[5])/2,c[4]=0):(c[3]=o/(6*i)+h,c[4]=i)),c}function i(t,n){let e=0,r=0,l=0;t.nextPoint();const o=t.pathSize?t.x:0,u=t.pathSize?t.y:0;for(let i=0;i<t.pathSize;i++){t.seekInPath(i);const s=[t.x,t.y];t.seekInPath((i+1)%t.pathSize);const I=[t.x,t.y],[h,c]=s,f=h-o,N=c-u,[x,g]=I,a=x-o,m=g-u,P=f*m-a*N;l+=P,e+=(f+a)*P,r+=(N+m)*P,h<n[0]&&(n[0]=h),h>n[1]&&(n[1]=h),c<n[2]&&(n[2]=c),c>n[3]&&(n[3]=c)}if(l>0&&(l*=-1),!l)return null;l*=.5;return[e/(6*l)+o,r/(6*l)+u,l]}function s(t,r){const l=r?[0,0,0]:[0,0],o=r?[0,0,0]:[0,0];let u=0,i=0,s=0,I=0;for(let h=0,c=t.length;h<c-1;h++){const c=t[h],f=t[h+1];if(c&&f){l[0]=c[0],l[1]=c[1],o[0]=f[0],o[1]=f[1],r&&c.length>2&&f.length>2&&(l[2]=c[2],o[2]=f[2]);const t=n(l,o);if(t){u+=t;const n=e(c,f);i+=t*n[0],s+=t*n[1],r&&n.length>2&&(I+=t*n[2])}}}return u>0?r?[i/u,s/u,I/u]:[i/u,s/u]:t.length?t[0]:null}function I(n){const{hasZ:e,totalSize:r}=n;if(0===r)return null;const l=[],o=[],i=e?[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY]:[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY];for(n.reset();n.nextPath();){const e=u(t(n),n.hasZ,i);e&&o.push(e)}if(o.sort(((t,n)=>{let r=t[2]-n[2];return 0===r&&e&&(r=t[4]-n[4]),r})),o.length&&(l[0]=o[0][0],l[1]=o[0][1],e&&(l[2]=o[0][3]),(l[0]<i[0]||l[0]>i[1]||l[1]<i[2]||l[1]>i[3]||e&&(l[2]<i[4]||l[2]>i[5]))&&(l.length=0)),!l.length){n.reset(),n.nextPath();const t=n.pathSize?h(n):null;if(!t)return null;l[0]=t[0],l[1]=t[1],e&&t.length>2&&(l[2]=t[2])}return l}function h(t){const{hasZ:r}=t,l=r?[0,0,0]:[0,0],o=r?[0,0,0]:[0,0];let u=0,i=0,s=0,I=0;if(t.nextPoint()){let h=t.x,c=t.y,f=t.z;for(;t.nextPoint();){const N=t.x,x=t.y,g=t.z;l[0]=h,l[1]=c,o[0]=N,o[1]=x,r&&(l[2]=f,o[2]=g);const a=n(l,o);if(a){u+=a;const t=e(l,o);i+=a*t[0],s+=a*t[1],r&&t.length>2&&(I+=a*t[2])}h=N,c=x,f=g}}return u>0?r?[i/u,s/u,I/u]:[i/u,s/u]:t.pathSize?(t.seekPathStart(),t.nextPoint(),[t.x,t.y]):null}const c=1e-6;function f(t){let n=0;for(t.reset();t.nextPath();)n+=t.getCurrentRingArea();if(n<c){const n=I(t);return n?[n[0],n[1]]:null}const e=[0,0];if(t.reset(),!t.nextPath()||!t.nextPoint())return null;const r=[t.x,t.y];for(t.reset();t.nextPath();)x(e,r,t);return e[0]*=1/n,e[1]*=1/n,e[0]+=r[0],e[1]+=r[1],e}const N=1/3;function x(t,n,e){if(!e||e.pathSize<3)return null;e.nextPoint();const r=e.x,l=e.y;e.nextPoint();let o,u=e.x-r,i=e.y-l,s=0,I=0;for(;e.nextPoint();)s=e.x-r,I=e.y-l,o=.5*N*(s*i-I*u),t[0]+=o*(u+s),t[1]+=o*(i+I),u=s,i=I;const h=e.getCurrentRingArea(),c=[r,l];return c[0]-=n[0],c[1]-=n[1],c[0]*=h,c[1]*=h,t[0]+=c[0],t[1]+=c[1],t}export{r as extentCentroid,s as lineCentroid,h as lineCentroidCursor,l as polygonCentroid,u as ringCentroid,i as ringCentroidCursorXY,o as ringsCentroid,I as ringsCentroidCursor,f as weightedAreaCentroid};
|
package/interfaces.d.ts
CHANGED
|
@@ -48783,7 +48783,7 @@ declare namespace __esri {
|
|
|
48783
48783
|
export const UtilityNetworkAssociationsContent: typeof __esri.UtilityNetworkAssociationsContent;
|
|
48784
48784
|
}
|
|
48785
48785
|
|
|
48786
|
-
export interface AttachmentsContent extends Content, JSONSupport {
|
|
48786
|
+
export interface AttachmentsContent extends Content, JSONSupport, Clonable {
|
|
48787
48787
|
}
|
|
48788
48788
|
|
|
48789
48789
|
export class AttachmentsContent {
|
|
@@ -48822,6 +48822,19 @@ declare namespace __esri {
|
|
|
48822
48822
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-AttachmentsContent.html Read more...}
|
|
48823
48823
|
*/
|
|
48824
48824
|
constructor(properties?: AttachmentsContentProperties);
|
|
48825
|
+
/**
|
|
48826
|
+
* An array of {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-support-AttachmentsOrderByInfo.html AttachmentsOrderByInfo} indicating the display order for the attachments, and whether they should be sorted in ascending `asc` or descending `desc` order.
|
|
48827
|
+
*
|
|
48828
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-AttachmentsContent.html#orderByFields Read more...}
|
|
48829
|
+
*/
|
|
48830
|
+
get orderByFields(): AttachmentsOrderByInfo[] | nullish;
|
|
48831
|
+
set orderByFields(value: AttachmentsOrderByInfoProperties[] | nullish);
|
|
48832
|
+
/**
|
|
48833
|
+
* Creates a deep clone of this object.
|
|
48834
|
+
*
|
|
48835
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-AttachmentsContent.html#clone Read more...}
|
|
48836
|
+
*/
|
|
48837
|
+
clone(): this;
|
|
48825
48838
|
/**
|
|
48826
48839
|
* Converts an instance of this class to its [ArcGIS portal JSON](https://developers.arcgis.com/documentation/common-data-types/geometry-objects.htm) representation.
|
|
48827
48840
|
*
|
|
@@ -48853,6 +48866,12 @@ declare namespace __esri {
|
|
|
48853
48866
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-AttachmentsContent.html#displayType Read more...}
|
|
48854
48867
|
*/
|
|
48855
48868
|
displayType?: "auto" | "preview" | "list";
|
|
48869
|
+
/**
|
|
48870
|
+
* An array of {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-support-AttachmentsOrderByInfo.html AttachmentsOrderByInfo} indicating the display order for the attachments, and whether they should be sorted in ascending `asc` or descending `desc` order.
|
|
48871
|
+
*
|
|
48872
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-AttachmentsContent.html#orderByFields Read more...}
|
|
48873
|
+
*/
|
|
48874
|
+
orderByFields?: AttachmentsOrderByInfoProperties[] | nullish;
|
|
48856
48875
|
/**
|
|
48857
48876
|
* A heading indicating what the attachment's content represents.
|
|
48858
48877
|
*
|
|
@@ -50746,6 +50765,71 @@ declare namespace __esri {
|
|
|
50746
50765
|
showRelatedRecords?: boolean | nullish;
|
|
50747
50766
|
}
|
|
50748
50767
|
|
|
50768
|
+
export interface AttachmentsOrderByInfo extends Accessor, Clonable, JSONSupport {
|
|
50769
|
+
}
|
|
50770
|
+
|
|
50771
|
+
export class AttachmentsOrderByInfo {
|
|
50772
|
+
/**
|
|
50773
|
+
* The attribute value of the field selected that will drive
|
|
50774
|
+
* the sorting of attachments.
|
|
50775
|
+
*
|
|
50776
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-support-AttachmentsOrderByInfo.html#field Read more...}
|
|
50777
|
+
*/
|
|
50778
|
+
field: string | nullish;
|
|
50779
|
+
/**
|
|
50780
|
+
* Set the ascending or descending sort order of the attachments.
|
|
50781
|
+
*
|
|
50782
|
+
* @default "ascending"
|
|
50783
|
+
*
|
|
50784
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-support-AttachmentsOrderByInfo.html#order Read more...}
|
|
50785
|
+
*/
|
|
50786
|
+
order: "ascending" | "descending";
|
|
50787
|
+
/**
|
|
50788
|
+
* The `AttachmentsOrderByInfo` class indicates the field display order for the attachments.
|
|
50789
|
+
*
|
|
50790
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-support-AttachmentsOrderByInfo.html Read more...}
|
|
50791
|
+
*/
|
|
50792
|
+
constructor(properties?: AttachmentsOrderByInfoProperties);
|
|
50793
|
+
/**
|
|
50794
|
+
* Creates a deep clone of this object.
|
|
50795
|
+
*
|
|
50796
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-support-AttachmentsOrderByInfo.html#clone Read more...}
|
|
50797
|
+
*/
|
|
50798
|
+
clone(): this;
|
|
50799
|
+
/**
|
|
50800
|
+
* Converts an instance of this class to its [ArcGIS portal JSON](https://developers.arcgis.com/documentation/common-data-types/geometry-objects.htm) representation.
|
|
50801
|
+
*
|
|
50802
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-support-AttachmentsOrderByInfo.html#toJSON Read more...}
|
|
50803
|
+
*/
|
|
50804
|
+
toJSON(): any;
|
|
50805
|
+
/**
|
|
50806
|
+
* Creates a new instance of this class and initializes it with values from a JSON object
|
|
50807
|
+
* generated from an ArcGIS product.
|
|
50808
|
+
*
|
|
50809
|
+
* @param json A JSON representation of the instance in the ArcGIS format. See the [ArcGIS REST API documentation](https://developers.arcgis.com/documentation/common-data-types/overview-of-common-data-types.htm) for examples of the structure of various input JSON objects.
|
|
50810
|
+
*
|
|
50811
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-support-AttachmentsOrderByInfo.html#fromJSON Read more...}
|
|
50812
|
+
*/
|
|
50813
|
+
static fromJSON(json: any): any | nullish;
|
|
50814
|
+
static fromJSON(json: any): AttachmentsOrderByInfo;
|
|
50815
|
+
}
|
|
50816
|
+
|
|
50817
|
+
interface AttachmentsOrderByInfoProperties {
|
|
50818
|
+
/**
|
|
50819
|
+
* The attribute value of the field selected that will drive
|
|
50820
|
+
* the sorting of attachments.
|
|
50821
|
+
*
|
|
50822
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-support-AttachmentsOrderByInfo.html#field Read more...}
|
|
50823
|
+
*/
|
|
50824
|
+
field?: string | nullish;
|
|
50825
|
+
/**
|
|
50826
|
+
* Set the ascending or descending sort order of the attachments.
|
|
50827
|
+
*
|
|
50828
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-support-AttachmentsOrderByInfo.html#order Read more...}
|
|
50829
|
+
*/
|
|
50830
|
+
order?: "ascending" | "descending";
|
|
50831
|
+
}
|
|
50832
|
+
|
|
50749
50833
|
export interface FieldInfoFormat extends Accessor, JSONSupport, Clonable {
|
|
50750
50834
|
}
|
|
50751
50835
|
|
|
@@ -71835,7 +71919,7 @@ declare namespace __esri {
|
|
|
71835
71919
|
*/
|
|
71836
71920
|
constructor(properties?: ImageVolumeParametersProperties);
|
|
71837
71921
|
/**
|
|
71838
|
-
* An array of geometries
|
|
71922
|
+
* An array of geometries containing {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html extents} or {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html polygons}.
|
|
71839
71923
|
*
|
|
71840
71924
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-ImageVolumeParameters.html#geometries Read more...}
|
|
71841
71925
|
*/
|
|
@@ -71901,7 +71985,7 @@ declare namespace __esri {
|
|
|
71901
71985
|
*/
|
|
71902
71986
|
constantZ?: number | nullish;
|
|
71903
71987
|
/**
|
|
71904
|
-
* An array of geometries
|
|
71988
|
+
* An array of geometries containing {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html extents} or {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html polygons}.
|
|
71905
71989
|
*
|
|
71906
71990
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-ImageVolumeParameters.html#geometries Read more...}
|
|
71907
71991
|
*/
|
|
@@ -84297,16 +84381,6 @@ declare namespace __esri {
|
|
|
84297
84381
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-support-timeUtils.html#getTimeSliderSettingsFromWebDocument Read more...}
|
|
84298
84382
|
*/
|
|
84299
84383
|
getTimeSliderSettingsFromWebDocument(document: WebMap | WebScene, signal?: AbortSignal | nullish): Promise<any>;
|
|
84300
|
-
/**
|
|
84301
|
-
* Extracts time slider settings from a {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-WebMap.html WebMap} if the webmap contains a time slider widget definition.
|
|
84302
|
-
*
|
|
84303
|
-
* @param webMap An instance of a webmap to extract time slider settings from.
|
|
84304
|
-
* @param signal Signal object that can be used to abort the asynchronous task.
|
|
84305
|
-
* @deprecated since version 4.30. Use {@link module:esri/support/timeUtils#getTimeSliderSettingsFromWebDocument getTimeSliderSettingsFromWebDocument} instead.
|
|
84306
|
-
*
|
|
84307
|
-
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-support-timeUtils.html#getTimeSliderSettingsFromWebMap Read more...}
|
|
84308
|
-
*/
|
|
84309
|
-
getTimeSliderSettingsFromWebMap(webMap: WebMap | nullish, signal?: AbortSignal | nullish): Promise<any>;
|
|
84310
84384
|
}
|
|
84311
84385
|
|
|
84312
84386
|
export const timeUtils: timeUtils;
|
|
@@ -95072,6 +95146,26 @@ declare namespace __esri {
|
|
|
95072
95146
|
pixelData?: PixelData | nullish;
|
|
95073
95147
|
}
|
|
95074
95148
|
|
|
95149
|
+
export class ImageryTileLayerView extends LayerView {
|
|
95150
|
+
/**
|
|
95151
|
+
* Represents the {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html LayerView} of an {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryTileLayer.html ImageryTileLayer}
|
|
95152
|
+
* after it has been added to a {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html Map} in either a {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html MapView} or
|
|
95153
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html SceneView}.
|
|
95154
|
+
*
|
|
95155
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-ImageryTileLayerView.html Read more...}
|
|
95156
|
+
*/
|
|
95157
|
+
constructor(properties?: ImageryTileLayerViewProperties);
|
|
95158
|
+
/**
|
|
95159
|
+
* Returns the map scale that corresponds to the source level of raster data.
|
|
95160
|
+
*
|
|
95161
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-ImageryTileLayerView.html#getSourceScale Read more...}
|
|
95162
|
+
*/
|
|
95163
|
+
getSourceScale(): Promise<number>;
|
|
95164
|
+
}
|
|
95165
|
+
|
|
95166
|
+
interface ImageryTileLayerViewProperties extends LayerViewProperties {
|
|
95167
|
+
}
|
|
95168
|
+
|
|
95075
95169
|
export class KMLLayerView extends LayerView {
|
|
95076
95170
|
/**
|
|
95077
95171
|
* A collection of all the {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-KMLLayerView.html#MapImage MapImages} from visible sublayers.
|
|
@@ -107501,6 +107595,14 @@ declare namespace __esri {
|
|
|
107501
107595
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Directions-DirectionsViewModel.html#apiKey Read more...}
|
|
107502
107596
|
*/
|
|
107503
107597
|
apiKey: string | nullish;
|
|
107598
|
+
/**
|
|
107599
|
+
* When `true`, the assigned route layer will automatically solve whenever a change is made to the stops or barriers.
|
|
107600
|
+
*
|
|
107601
|
+
* @default true
|
|
107602
|
+
*
|
|
107603
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Directions-DirectionsViewModel.html#autoSolve Read more...}
|
|
107604
|
+
*/
|
|
107605
|
+
autoSolve: boolean;
|
|
107504
107606
|
/**
|
|
107505
107607
|
* This function provides the ability to override either the
|
|
107506
107608
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#goTo MapView goTo()} or
|
|
@@ -107686,6 +107788,12 @@ declare namespace __esri {
|
|
|
107686
107788
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Directions-DirectionsViewModel.html#apiKey Read more...}
|
|
107687
107789
|
*/
|
|
107688
107790
|
apiKey?: string | nullish;
|
|
107791
|
+
/**
|
|
107792
|
+
* When `true`, the assigned route layer will automatically solve whenever a change is made to the stops or barriers.
|
|
107793
|
+
*
|
|
107794
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Directions-DirectionsViewModel.html#autoSolve Read more...}
|
|
107795
|
+
*/
|
|
107796
|
+
autoSolve?: boolean;
|
|
107689
107797
|
/**
|
|
107690
107798
|
* This function provides the ability to override either the
|
|
107691
107799
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#goTo MapView goTo()} or
|
|
@@ -109270,6 +109378,8 @@ declare namespace __esri {
|
|
|
109270
109378
|
tooltipsToggle?: boolean;
|
|
109271
109379
|
settingsMenu?: boolean;
|
|
109272
109380
|
flow?: boolean;
|
|
109381
|
+
sketch?: boolean;
|
|
109382
|
+
undoRedoButtons?: boolean;
|
|
109273
109383
|
snappingControls?: boolean;
|
|
109274
109384
|
snappingControlsElements?: VisibleElementsSnappingControlsElementsProperties;
|
|
109275
109385
|
}
|
|
@@ -109288,6 +109398,8 @@ declare namespace __esri {
|
|
|
109288
109398
|
tooltipsToggle: boolean;
|
|
109289
109399
|
settingsMenu: boolean;
|
|
109290
109400
|
flow: boolean;
|
|
109401
|
+
sketch: boolean;
|
|
109402
|
+
undoRedoButtons: boolean;
|
|
109291
109403
|
snappingControls: boolean;
|
|
109292
109404
|
}
|
|
109293
109405
|
|
|
@@ -121537,6 +121649,14 @@ declare namespace __esri {
|
|
|
121537
121649
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print.html#includeDefaultTemplates Read more...}
|
|
121538
121650
|
*/
|
|
121539
121651
|
includeDefaultTemplates: boolean;
|
|
121652
|
+
/**
|
|
121653
|
+
* Indicates whether or not to include templates from an organization's portal.
|
|
121654
|
+
*
|
|
121655
|
+
* @default true
|
|
121656
|
+
*
|
|
121657
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print.html#includeOrganizationTemplates Read more...}
|
|
121658
|
+
*/
|
|
121659
|
+
includeOrganizationTemplates: boolean;
|
|
121540
121660
|
/**
|
|
121541
121661
|
* The widget's default label.
|
|
121542
121662
|
*
|
|
@@ -121652,6 +121772,12 @@ declare namespace __esri {
|
|
|
121652
121772
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print.html#includeDefaultTemplates Read more...}
|
|
121653
121773
|
*/
|
|
121654
121774
|
includeDefaultTemplates?: boolean;
|
|
121775
|
+
/**
|
|
121776
|
+
* Indicates whether or not to include templates from an organization's portal.
|
|
121777
|
+
*
|
|
121778
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print.html#includeOrganizationTemplates Read more...}
|
|
121779
|
+
*/
|
|
121780
|
+
includeOrganizationTemplates?: boolean;
|
|
121655
121781
|
/**
|
|
121656
121782
|
* The widget's default label.
|
|
121657
121783
|
*
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Accessor.js";import{result as i}from"../../../core/asyncUtils.js";import r from"../../../core/Collection.js";import has from"../../../core/has.js";import s from"../../../core/Error.js";import{clone as a}from"../../../core/lang.js";import o from"../../../core/Logger.js";import{destroyMaybe as l,removeMaybe as n,abortMaybe as u}from"../../../core/maybe.js";import h from"../../../core/Promise.js";import{createAbortError as c,isAbortError as d}from"../../../core/promiseUtils.js";import{initial as p,whenOnce as m,watch as f,syncAndInitial as y,sync as _}from"../../../core/reactiveUtils.js";import{property as g}from"../../../core/accessorSupport/decorators/property.js";import{subclass as F}from"../../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as x}from"../../../core/support/UpdatingHandles.js";import{isHostedAgolService as v}from"../../support/arcgisLayerUrl.js";import{checkServiceCurrentUserSupport as D}from"../../support/featureLayerUtils.js";import{getEffectiveLayerCapabilities as w}from"../../support/layerUtils.js";import{projectGeometry as b}from"../../../portal/support/geometryServiceUtils.js";import C from"../../../rest/support/StatisticDefinition.js";import{FeatureTileDescriptor as S}from"../../../views/3d/layers/support/FeatureTileDescriptor.js";import{FeatureTileFetcher3D as E}from"../../../views/3d/layers/support/FeatureTileFetcher3D.js";import{FeatureTileFetcher3DDebugger as T}from"../../../views/3d/layers/support/FeatureTileFetcher3DDebugger.js";import{debugFlags as V}from"../../../views/3d/support/debugFlags.js";let L=class extends(h.EsriPromiseMixin(t)){get dataUpdating(){return this._tileFetcher?.dataUpdating??!1}set extent(e){if(null!=e&&!e.spatialReference.equals(this.layerView.view.spatialReference))return void o.getLogger(this).error("#extent=","extent needs to be in the same spatial reference as the view");const t=this._get("extent");if(t===e)return;if(null!=t&&e&&t.equals(e))return;const i=null!=e?e.clone():null;this._set("extent",i)}get updating(){return!!(this._tileFetcher?.updating||null!=this._fetchDataInfoPromise||"tiles"===this.mode&&this.layerView.view.featureTiles?.updating||this._updatingHandles?.updating)}get updatingTotal(){return this.updating&&null!=this._tileFetcher?this._tileFetcher.updatingTotal:0}get updatingRemaining(){return this.updating&&null!=this._tileFetcher?this._tileFetcher.updatingRemaining:0}get expectedFeatureDiff(){return this.updating&&null!=this._tileFetcher?this._tileFetcher.expectedFeatureDiff:0}get memoryForUnusedFeatures(){return null!=this._tileFetcher?this._tileFetcher.memoryForUnusedFeatures:0}get maximumNumberOfFeaturesExceeded(){return!(null==this._tileFetcher||!this._tileFetcher.maximumNumberOfFeaturesExceeded)}get maximumNumberOfFeatures(){return this.displayFeatureLimit?.maximumNumberOfFeatures??0}set maximumNumberOfFeatures(e){e!==this.maximumNumberOfFeatures&&this._overrideIfSome("maximumNumberOfFeatures",e)}get hasMaximumNumberOfFeaturesOverride(){return this._isOverridden("maximumNumberOfFeatures")}get hasAllFeatures(){return this.serviceDataCount===P.noServiceDataCount&&"snapshot"===this.mode&&this.hasAllFeaturesInView||this.serviceDataCount===this.graphics.length}get hasAllFeaturesInView(){return this._tileFetcher?.hasAllFeatures??!1}get hasFullGeometries(){return this._tileFetcher?.hasFullGeometries??!1}get mode(){const e=this.layerView.layer;if("feature"===e.type&&null!=e.infoFor3D)return"snapshot";if("catalog-footprint"===e.type)return"tiles";if(this._forceTilesMode)return"tiles";const t=this.layerView.view;if(!1===t.qualitySettings?.graphics3D?.snapshotAvailable||this.serviceDataCount===P.noServiceDataCount||this._snapshotLimitExceeded||this.maximumNumberOfFeaturesExceeded||t.quality<1)return"tiles";const i=t&&t.featureTiles,r=i&&i.tilingScheme;if(e&&e.minScale&&this.serviceDataExtent&&r){const t=this._approximateExtentSizeAtScale(e.minScale,r);if((this.serviceDataExtent.width/t+this.serviceDataExtent.height/t)/2>P.maxSnapshotMinScaleFactor)return"tiles"}return!this.maximumNumberOfFeatures||this.serviceDataCount<=this.maximumNumberOfFeatures?"snapshot":"tiles"}get maxTotalSnapshotVertices(){const e=this._get("maxTotalSnapshotVertices")||0,t="snapshot"===this.mode&&this._tileFetcher?.totalVertices||0;return Math.max(e,t)}_approximateExtentSizeAtScale(e,t){const i=this.layerView.view,r=Math.ceil((i.width/t.pixelSize+i.height/t.pixelSize)/2),s=t.levels[0];return r*((s.tileSize[0]/(s.scale/e)+s.tileSize[1]/(s.scale/e))/2)}get tileDescriptors(){if("snapshot"===this.mode){const e=new S(0,0,0,this.layerView.view.featureTiles.tilingScheme,"dummy-tile-full-extent");return new r([e])}const e=this.layerView.view.featureTiles;return e?e.tiles:new r}get test(){}constructor(e){super(e),this.type="feature-tile-3d",this._updatingHandles=new x,this.serviceDataExtent=null,this.serviceDataCount=P.noServiceDataCount,this._snapshotLimitExceeded=!1,this.displayFeatureLimit=null,this._forceTilesMode=!1,this._suspended=!1,this._tileFetcher=null,this._fetchDataInfoPromise=null,this._fetchDataInfoAbortController=null,this._lifeCycleAbortController=new AbortController}initialize(){this._updatingHandles.add((()=>this.displayFeatureLimit),(e=>this._updatingHandles.addPromise(this._updateSnapshotLimit(e,null,this._lifeCycleAbortController.signal)))),this._updatingHandles.add((()=>this.mode),(()=>this._modeChanged()),p),this._updatingHandles.add((()=>this.mode),((e,t)=>{"tiles"===e&&"snapshot"===t&&(this._forceTilesMode=!0)}),p),this.addResolvingPromise(Promise.resolve().then((()=>this._verifyCapabilities())).then((()=>this._updatingHandles.addPromise(this._fetchServiceDataInfo()))).then((()=>this._initializeTileFetcher())))}_verifyCapabilities(){const e=this.layerView.layer;if("ogc-feature"!==e.type&&!w(e)?.operations.supportsQuery)throw new s("graphicscontroller:query-capability-required","Service requires query capabilities to be used as a feature layer",{layer:e})}destroy(){this._cancelFetchServiceDataInfo(),this._tileFetcher=l(this._tileFetcher),this._tilesHandle=n(this._tilesHandle),this._lifeCycleAbortController=u(this._lifeCycleAbortController),this._updatingHandles.destroy(),this._set("_updatingHandles",null)}suspend(){this._suspended||(this._suspended=!0,null!=this._tileFetcher&&this._tileFetcher.suspend())}resume(){this._suspended&&(this._suspended=!1,null!=this._tileFetcher&&this._tileFetcher.resume())}restart(){const e=()=>{null!=this._tileFetcher&&this._tileFetcher.restart()};this._updatingHandles.addPromise(this._fetchServiceDataInfo().then(e,e))}refetch(){this._refetch({resetForceTilesMode:!1})}getMissingAttributesForFeature(e){return this._tileFetcher?.getMissingAttributesForFeature(e)}_refetch(e){const t=()=>{null!=this._tileFetcher&&(e.resetForceTilesMode&&(this._forceTilesMode=!1),this._tileFetcher.refetch())};this._updatingHandles.addPromise(this._fetchServiceDataInfo().then(t,t))}_initializeTileFetcher(){const e=this.layerView.view;if(!e)return;const t=m((()=>e.featureTiles?.tilingScheme),this._lifeCycleAbortController.signal);this._updatingHandles.addPromise(t),t.then((()=>{const{layerView:e,tileDescriptors:t}=this,i=e.layer,r=new E({context:this.context,filterExtent:this.extent,tileDescriptors:t,features:this.graphics});this._tileFetcher=r,this._suspended?r.suspend():r.resume();const s=this.layerView.view;s&&this.addHandles(f((()=>s.quality),(e=>r.memoryFactor=e),y));const a="polygon"===this.context.geometryType?"polygonLodFactor":"polyline"===this.context.geometryType?"polylineLodFactor":null;a&&this.addHandles(f((()=>this.layerView.view?.qualitySettings?.graphics3D?.[a]),(e=>r.lodFactor=e||1),p));const o=e=>{r.maximumNumberOfFeatures=e,r.useTileCount=this.serviceDataCount>e},l=e=>{r.useTileCount=e>this.maximumNumberOfFeatures};"ogc-feature"!==i.type&&this._updatingHandles.add((()=>i.createQueryVersion),(()=>this._dataFilterChanged())),this._updatingHandles.add((()=>e.availableFields),((e,t)=>this._availableFieldsChanged(t,e))),this._updatingHandles.add((()=>e.requiredFields),((e,t)=>this._requiredFieldsChanged(t,e))),"customParameters"in i&&this._updatingHandles.add((()=>i.customParameters),(()=>this.restart())),this.addHandles([i.on("apply-edits",(e=>this._applyEdits(e))),f((()=>this.extent),(e=>r.filterExtent=e),_),f((()=>this.tileDescriptors),(e=>r.tileDescriptors=e),_),f((()=>this.maximumNumberOfFeatures),o,y),f((()=>this.serviceDataCount),l,y),f((()=>V.FEATURE_TILE_FETCH_SHOW_TILES),(e=>{e&&r&&!r.debugger?(r.debugger=new T(r,s.featureTiles.tilingScheme.toTileInfo(),s),r.debugger.update()):!e&&this._tileFetcher&&r.debugger&&(r.debugger.destroy(),r.debugger=null)}),y)]),this._supportsExceedsLimitQuery||this._updatingHandles.add((()=>this.maxTotalSnapshotVertices),(()=>this._updatingHandles.addPromise(this._updateSnapshotLimit(this.displayFeatureLimit,null,this._lifeCycleAbortController.signal))))})).catch((()=>{}))}_modeChanged(){switch(this.mode){case"tiles":this._tilesHandle||(this._tilesHandle=this.layerView.view.featureTiles.addClient());break;default:o.getLogger(this).warn("Unhandled feature layer mode "+this.mode);case"snapshot":null!=this._tilesHandle&&(this._tilesHandle.remove(),this._tilesHandle=null)}}_dataFilterChanged(){this._set("maxTotalSnapshotVertices",0),this.notifyChange("maxTotalSnapshotVertices"),this._refetch({resetForceTilesMode:!0})}_applyEdits(e){const t=this.layerView.layer;null!=this._tileFetcher&&this._tileFetcher.applyEdits(e).then((e=>{if(e){if(!this._lifeCycleAbortController)throw c();e.exceededTransferLimit&&"refresh"in t?t.refresh():(e.deletedFeatures.length||e.updatedFeatures.length||e.addedFeatures.length)&&this._updatingHandles.addPromise(this._updateServiceDataExtent(this._lifeCycleAbortController.signal))}})).catch((e=>{if(!d(e))throw e}))}_availableFieldsChanged(e,t){null!=this._tileFetcher&&j(this._tileFetcher.availableFields,t)&&this._refetch({resetForceTilesMode:!1})}_requiredFieldsChanged(e,t){null!=this._tileFetcher&&j(this._tileFetcher.availableFields,t)&&this.restart()}_createVertexLimitExceededQuery(e){const t=this.layerView.layer,i=t.createQuery();return i.returnGeometry=!1,i.outStatistics=[new C({statisticType:"exceedslimit",maxVertexCount:e,outStatisticFieldName:"exceedslimit",maxPointCount:1e8,maxRecordCount:1e8})],t.capabilities?.query.supportsCacheHint&&(i.cacheHint=!0),i}_createDataInfoQuery(){const e=this.layerView.layer,t=e.createQuery();return t.returnGeometry=!1,t.outSpatialReference=this.layerView.view.spatialReference,e.capabilities?.query.supportsCacheHint&&(t.cacheHint=!0),t}_fullExtentIsAccurate(){const e=this.layerView.layer;if("definitionExpression"in e&&e.definitionExpression)return!1;switch(e.type){case"feature":case"catalog-footprint":case"oriented-imagery":return v(e.url);case"csv":case"geojson":case"ogc-feature":case"wfs":return!0;default:return}}async _updateServiceDataExtent(e){try{await this._tryUpdateServiceDataExtent(e)}catch(t){d(t)||this._set("serviceDataExtent",a(this.layerView.fullExtentInLocalViewSpatialReference))}}async _tryUpdateServiceDataExtent(e){const t=this.layerView,i=t.layer,r=i.capabilities?.query.supportsExtent??!1,s=a(t.fullExtentInLocalViewSpatialReference),o=i.fullExtent,l=this._fullExtentIsAccurate(),n=this.serviceDataCount;if(r&&n<=P.maxFeatureCountForExtent&&(!s||!l)&&"queryExtent"in i){const t=this._createDataInfoQuery(),r=await i.queryExtent(t,{timeout:P.queryExtentTimeout,signal:e});this._set("serviceDataExtent",r.extent)}else if(s)this._set("serviceDataExtent",s);else if(null!=o){const r="portalItem"in i?i.portalItem:null,s=await b(o,t.view.spatialReference,r,e);this._set("serviceDataExtent",s)}else this._set("serviceDataExtent",null)}async _updateServiceDataCount(e){const t=this.layerView.layer;if(!("queryFeatureCount"in t)||!has("featurelayer-snapshot-enabled"))return void this._set("serviceDataCount",P.noServiceDataCount);const r=await i(t.queryFeatureCount(this._createDataInfoQuery(),{timeout:P.queryStatisticsTimeout,signal:e}));if(!0===r.ok)this._set("serviceDataCount",r.value);else{if(d(r.error))throw r.error;this._set("serviceDataCount",P.noServiceDataCount)}}get _supportsExceedsLimitQuery(){const e=this.layerView.layer;return null!=e.capabilities&&e.capabilities.operations&&e.capabilities.operations.supportsExceedsLimitStatistics}get _minimumNumberOfVerticesForGeometry(){switch(this.layerView.layer.geometryType){case"point":case"multipoint":return 1;case"polygon":return 4;case"polyline":return 2;case"multipatch":case"mesh":return 3;default:return 0}}async _updateSnapshotLimit(e,t,r){if(null==e?.averageSymbolComplexity)return void(this._snapshotLimitExceeded=!1);const{maximumTotalNumberOfVertices:s,averageSymbolComplexity:a}=e,{verticesPerFeature:o,verticesPerCoordinate:l}=a,n=o<=0,u=this._minimumNumberOfVerticesForGeometry>1;if(!n&&!u)return void(this._snapshotLimitExceeded=!1);0!==o&&null!=t&&await t;const h=Math.min(s,H),c=this.serviceDataCount,p=c!==P.noServiceDataCount;let m=p?Math.ceil((h-c*o)/(l||1)):Math.ceil(h/(l||1));if(u&&(m=Math.min(m,q)),p&&this._minimumNumberOfVerticesForGeometry*c>m)return void(this._snapshotLimitExceeded=!0);if(!this._supportsExceedsLimitQuery||!has("featurelayer-snapshot-enabled"))return void(this._snapshotLimitExceeded=this.maxTotalSnapshotVertices>m);const f=await i(this.layerView.layer.queryFeatures(this._createVertexLimitExceededQuery(m),{timeout:P.queryStatisticsTimeout,signal:r}));if(!1===f.ok){if(d(f.error))throw f.error;return void(this._snapshotLimitExceeded=!1)}const y=f.value.features[0];this._snapshotLimitExceeded=!!y?.attributes&&!!y.attributes.exceedslimit}async _fetchServiceDataInfo(){this._cancelFetchServiceDataInfo(),await D(this.layerView.layer);let e=new AbortController;const t=e.signal,i=this._updateServiceDataCount(t),r=Promise.allSettled([i,this._updateSnapshotLimit(this.displayFeatureLimit,i,t)]),s=r.then((()=>this._updateServiceDataExtent(t))).catch((e=>{d(e)||o.getLogger(this).error("#fetchServiceDataInfo()",e)})).then((()=>{s===this._fetchDataInfoPromise&&(this._fetchDataInfoPromise=null,this._fetchDataInfoAbortController=null),e=null}));return e&&(this._fetchDataInfoPromise=s),this._fetchDataInfoAbortController=e,r.then((()=>{}),(()=>{}))}_cancelFetchServiceDataInfo(){const e=this._fetchDataInfoAbortController;e&&(this._fetchDataInfoAbortController=null,this._fetchDataInfoPromise=null,e.abort())}get performanceInfo(){return{storedFeatures:this._tileFetcher?.storedFeatures??0,totalFeatures:this._tileFetcher?.totalFeatures??0,totalVertices:this._tileFetcher?.totalVertices??0,missingTiles:this._tileFetcher?.missingTiles??0}}};e([g({readOnly:!0})],L.prototype,"type",void 0),e([g({constructOnly:!0})],L.prototype,"graphics",void 0),e([g({constructOnly:!0})],L.prototype,"layerView",void 0),e([g({constructOnly:!0})],L.prototype,"context",void 0),e([g({readOnly:!0})],L.prototype,"dataUpdating",null),e([g()],L.prototype,"extent",null),e([g()],L.prototype,"updating",null),e([g({readOnly:!0})],L.prototype,"_updatingHandles",void 0),e([g()],L.prototype,"updatingTotal",null),e([g()],L.prototype,"updatingRemaining",null),e([g()],L.prototype,"expectedFeatureDiff",null),e([g()],L.prototype,"memoryForUnusedFeatures",null),e([g()],L.prototype,"maximumNumberOfFeaturesExceeded",null),e([g({readOnly:!0})],L.prototype,"serviceDataExtent",void 0),e([g({readOnly:!0})],L.prototype,"serviceDataCount",void 0),e([g()],L.prototype,"_snapshotLimitExceeded",void 0),e([g()],L.prototype,"displayFeatureLimit",void 0),e([g({type:Number})],L.prototype,"maximumNumberOfFeatures",null),e([g({readOnly:!0})],L.prototype,"hasAllFeatures",null),e([g({readOnly:!0})],L.prototype,"hasAllFeaturesInView",null),e([g({readOnly:!0})],L.prototype,"hasFullGeometries",null),e([g()],L.prototype,"_forceTilesMode",void 0),e([g({readOnly:!0})],L.prototype,"mode",null),e([g({readOnly:!0})],L.prototype,"maxTotalSnapshotVertices",null),e([g({readOnly:!0})],L.prototype,"tileDescriptors",null),e([g()],L.prototype,"_tileFetcher",void 0),e([g()],L.prototype,"_fetchDataInfoPromise",void 0),L=e([F("esri.layers.graphics.controllers.FeatureTileController3D")],L);const O=1e4,H=1e6,I=12e3,A=1e4,q=5e6;function j(e,t){if(!t)return!1;for(const i of t)if(!e.has(i))return!0;return!1}var P;!function(e){function t(){e.maxFeatureCountForExtent=O,e.queryStatisticsTimeout=I,e.queryExtentTimeout=A}e.noServiceDataCount=1/0,e.maxSnapshotMinScaleFactor=5,e.reset=t}(P||(P={})),P.reset();export{L as FeatureTileController3D,P as FeatureTileController3DConstants};
|
|
5
|
+
import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Accessor.js";import{result as i}from"../../../core/asyncUtils.js";import r from"../../../core/Collection.js";import has from"../../../core/has.js";import s from"../../../core/Error.js";import{clone as a}from"../../../core/lang.js";import o from"../../../core/Logger.js";import{destroyMaybe as l,removeMaybe as n,abortMaybe as u}from"../../../core/maybe.js";import h from"../../../core/Promise.js";import{createAbortError as c,isAbortError as d}from"../../../core/promiseUtils.js";import{initial as p,whenOnce as m,watch as f,syncAndInitial as y,sync as _}from"../../../core/reactiveUtils.js";import{sqlAnd as g}from"../../../core/sql.js";import{property as F}from"../../../core/accessorSupport/decorators/property.js";import{subclass as x}from"../../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as v}from"../../../core/support/UpdatingHandles.js";import{isHostedAgolService as D}from"../../support/arcgisLayerUrl.js";import{checkServiceCurrentUserSupport as w}from"../../support/featureLayerUtils.js";import{getEffectiveLayerCapabilities as b}from"../../support/layerUtils.js";import{projectGeometry as C}from"../../../portal/support/geometryServiceUtils.js";import S from"../../../rest/support/StatisticDefinition.js";import{FeatureTileDescriptor as E}from"../../../views/3d/layers/support/FeatureTileDescriptor.js";import{FeatureTileFetcher3D as T}from"../../../views/3d/layers/support/FeatureTileFetcher3D.js";import{FeatureTileFetcher3DDebugger as V}from"../../../views/3d/layers/support/FeatureTileFetcher3DDebugger.js";import{debugFlags as H}from"../../../views/3d/support/debugFlags.js";let L=class extends(h.EsriPromiseMixin(t)){get dataUpdating(){return this._tileFetcher?.dataUpdating??!1}set extent(e){if(null!=e&&!e.spatialReference.equals(this.layerView.view.spatialReference))return void o.getLogger(this).error("#extent=","extent needs to be in the same spatial reference as the view");const t=this._get("extent");if(t===e)return;if(null!=t&&e&&t.equals(e))return;const i=null!=e?e.clone():null;this._set("extent",i)}get updating(){return!!(this._tileFetcher?.updating||null!=this._fetchDataInfoPromise||"tiles"===this.mode&&this.layerView.view.featureTiles?.updating||this._updatingHandles?.updating)}get updatingTotal(){return this.updating&&null!=this._tileFetcher?this._tileFetcher.updatingTotal:0}get updatingRemaining(){return this.updating&&null!=this._tileFetcher?this._tileFetcher.updatingRemaining:0}get expectedFeatureDiff(){return this.updating&&null!=this._tileFetcher?this._tileFetcher.expectedFeatureDiff:0}get memoryForUnusedFeatures(){return null!=this._tileFetcher?this._tileFetcher.memoryForUnusedFeatures:0}get maximumNumberOfFeaturesExceeded(){return!(null==this._tileFetcher||!this._tileFetcher.maximumNumberOfFeaturesExceeded)}get maximumNumberOfFeatures(){return this.displayFeatureLimit?.maximumNumberOfFeatures??0}set maximumNumberOfFeatures(e){e!==this.maximumNumberOfFeatures&&this._overrideIfSome("maximumNumberOfFeatures",e)}get hasMaximumNumberOfFeaturesOverride(){return this._isOverridden("maximumNumberOfFeatures")}get hasAllFeatures(){return this.serviceDataCount===N.noServiceDataCount&&"snapshot"===this.mode&&this.hasAllFeaturesInView||this.serviceDataCount===this.graphics.length}get hasAllFeaturesInView(){const e=this.context.effectiveDisplayFilter?.where||null,t=null!=e&&"1=1"!==e;return("tiles"!==this.mode||!t)&&(this._tileFetcher?.hasAllFeatures??!1)}get hasFullGeometries(){return this._tileFetcher?.hasFullGeometries??!1}get mode(){const e=this.layerView.layer;if("feature"===e.type&&null!=e.infoFor3D)return"snapshot";if("catalog-footprint"===e.type)return"tiles";if(this._forceTilesMode)return"tiles";const t=this.layerView.view;if(!1===t.qualitySettings?.graphics3D?.snapshotAvailable||this.serviceDataCount===N.noServiceDataCount||this._snapshotLimitExceeded||this.maximumNumberOfFeaturesExceeded||t.quality<1)return"tiles";const i=t&&t.featureTiles,r=i&&i.tilingScheme;if(e&&e.minScale&&this.serviceDataExtent&&r){const t=this._approximateExtentSizeAtScale(e.minScale,r);if((this.serviceDataExtent.width/t+this.serviceDataExtent.height/t)/2>N.maxSnapshotMinScaleFactor)return"tiles"}return!this.maximumNumberOfFeatures||this.serviceDataCount<=this.maximumNumberOfFeatures?"snapshot":"tiles"}get maxTotalSnapshotVertices(){const e=this._get("maxTotalSnapshotVertices")||0,t="snapshot"===this.mode&&this._tileFetcher?.totalVertices||0;return Math.max(e,t)}_approximateExtentSizeAtScale(e,t){const i=this.layerView.view,r=Math.ceil((i.width/t.pixelSize+i.height/t.pixelSize)/2),s=t.levels[0];return r*((s.tileSize[0]/(s.scale/e)+s.tileSize[1]/(s.scale/e))/2)}get tileDescriptors(){if("snapshot"===this.mode){const e=new E(0,0,0,this.layerView.view.featureTiles.tilingScheme,"dummy-tile-full-extent");return new r([e])}const e=this.layerView.view.featureTiles;return e?e.tiles:new r}get test(){}constructor(e){super(e),this.type="feature-tile-3d",this._updatingHandles=new v,this.serviceDataExtent=null,this.serviceDataCount=N.noServiceDataCount,this._snapshotLimitExceeded=!1,this.displayFeatureLimit=null,this._forceTilesMode=!1,this._suspended=!1,this._tileFetcher=null,this._fetchDataInfoPromise=null,this._fetchDataInfoAbortController=null,this._lifeCycleAbortController=new AbortController}initialize(){this._updatingHandles.add((()=>this.displayFeatureLimit),(e=>this._updatingHandles.addPromise(this._updateSnapshotLimit(e,null,this._lifeCycleAbortController.signal)))),this._updatingHandles.add((()=>this.mode),(()=>this._modeChanged()),p),this._updatingHandles.add((()=>this.mode),((e,t)=>{"tiles"===e&&"snapshot"===t&&(this._forceTilesMode=!0)}),p),this.addResolvingPromise(Promise.resolve().then((()=>this._verifyCapabilities())).then((()=>this._updatingHandles.addPromise(this._fetchServiceDataInfo()))).then((()=>this._initializeTileFetcher())))}_verifyCapabilities(){const e=this.layerView.layer;if("ogc-feature"!==e.type&&!b(e)?.operations.supportsQuery)throw new s("graphicscontroller:query-capability-required","Service requires query capabilities to be used as a feature layer",{layer:e})}destroy(){this._cancelFetchServiceDataInfo(),this._tileFetcher=l(this._tileFetcher),this._tilesHandle=n(this._tilesHandle),this._lifeCycleAbortController=u(this._lifeCycleAbortController),this._updatingHandles.destroy(),this._set("_updatingHandles",null)}suspend(){this._suspended||(this._suspended=!0,null!=this._tileFetcher&&this._tileFetcher.suspend())}resume(){this._suspended&&(this._suspended=!1,null!=this._tileFetcher&&this._tileFetcher.resume())}restart(){const e=()=>{null!=this._tileFetcher&&this._tileFetcher.restart()};this._updatingHandles.addPromise(this._fetchServiceDataInfo().then(e,e))}refetch(){this._refetch({resetForceTilesMode:!1})}getMissingAttributesForFeature(e){return this._tileFetcher?.getMissingAttributesForFeature(e)}_refetch(e){const t=()=>{null!=this._tileFetcher&&(e.resetForceTilesMode&&(this._forceTilesMode=!1),this._tileFetcher.refetch())};this._updatingHandles.addPromise(this._fetchServiceDataInfo().then(t,t))}_initializeTileFetcher(){const e=this.layerView.view;if(!e)return;const t=m((()=>e.featureTiles?.tilingScheme),this._lifeCycleAbortController.signal);this._updatingHandles.addPromise(t),t.then((()=>{const{layerView:e,tileDescriptors:t}=this,i=e.layer,r=new T({context:this.context,filterExtent:this.extent,tileDescriptors:t,features:this.graphics});this._tileFetcher=r,this._suspended?r.suspend():r.resume();const s=this.layerView.view;s&&this.addHandles(f((()=>s.quality),(e=>r.memoryFactor=e),y));const a="polygon"===this.context.geometryType?"polygonLodFactor":"polyline"===this.context.geometryType?"polylineLodFactor":null;a&&this.addHandles(f((()=>this.layerView.view?.qualitySettings?.graphics3D?.[a]),(e=>r.lodFactor=e||1),p));const o=e=>{r.maximumNumberOfFeatures=e,r.useTileCount=this.serviceDataCount>e},l=e=>{r.useTileCount=e>this.maximumNumberOfFeatures};"ogc-feature"!==i.type&&this._updatingHandles.add((()=>i.createQueryVersion),(()=>this._dataFilterChanged())),this._updatingHandles.add((()=>this.context.effectiveDisplayFilter),(()=>this._effectiveDisplayFilterChanged())),this._updatingHandles.add((()=>e.availableFields),((e,t)=>this._availableFieldsChanged(t,e))),this._updatingHandles.add((()=>e.requiredFields),((e,t)=>this._requiredFieldsChanged(t,e))),"customParameters"in i&&this._updatingHandles.add((()=>i.customParameters),(()=>this.restart())),this.addHandles([i.on("apply-edits",(e=>this._applyEdits(e))),f((()=>this.extent),(e=>r.filterExtent=e),_),f((()=>this.tileDescriptors),(e=>r.tileDescriptors=e),_),f((()=>this.maximumNumberOfFeatures),o,y),f((()=>this.serviceDataCount),l,y),f((()=>H.FEATURE_TILE_FETCH_SHOW_TILES),(e=>{e&&r&&!r.debugger?(r.debugger=new V(r,s.featureTiles.tilingScheme.toTileInfo(),s),r.debugger.update()):!e&&this._tileFetcher&&r.debugger&&(r.debugger.destroy(),r.debugger=null)}),y)]),this._supportsExceedsLimitQuery||this._updatingHandles.add((()=>this.maxTotalSnapshotVertices),(()=>this._updatingHandles.addPromise(this._updateSnapshotLimit(this.displayFeatureLimit,null,this._lifeCycleAbortController.signal))))})).catch((()=>{}))}_modeChanged(){switch(this.mode){case"tiles":this._tilesHandle||(this._tilesHandle=this.layerView.view.featureTiles.addClient());break;default:o.getLogger(this).warn("Unhandled feature layer mode "+this.mode);case"snapshot":null!=this._tilesHandle&&(this._tilesHandle.remove(),this._tilesHandle=null)}}_dataFilterChanged(){this._set("maxTotalSnapshotVertices",0),this.notifyChange("maxTotalSnapshotVertices"),this._refetch({resetForceTilesMode:!0})}_effectiveDisplayFilterChanged(){"snapshot"!==this.mode&&this._refetch({resetForceTilesMode:!1})}_applyEdits(e){const t=this.layerView.layer;null!=this._tileFetcher&&this._tileFetcher.applyEdits(e).then((e=>{if(e){if(!this._lifeCycleAbortController)throw c();e.exceededTransferLimit&&"refresh"in t?t.refresh():(e.deletedFeatures.length||e.updatedFeatures.length||e.addedFeatures.length)&&this._updatingHandles.addPromise(this._updateServiceDataExtent(this._lifeCycleAbortController.signal))}})).catch((e=>{if(!d(e))throw e}))}_availableFieldsChanged(e,t){null!=this._tileFetcher&&P(this._tileFetcher.availableFields,t)&&this._refetch({resetForceTilesMode:!1})}_requiredFieldsChanged(e,t){null!=this._tileFetcher&&P(this._tileFetcher.availableFields,t)&&this.restart()}_createVertexLimitExceededQuery(e){const t=this.layerView.layer,i=t.createQuery();return i.returnGeometry=!1,i.outStatistics=[new S({statisticType:"exceedslimit",maxVertexCount:e,outStatisticFieldName:"exceedslimit",maxPointCount:1e8,maxRecordCount:1e8})],t.capabilities?.query.supportsCacheHint&&(i.cacheHint=!0),i}_createDataInfoQuery(){const e=this.layerView.layer,t=this.layerView,i=e.createQuery();return i.returnGeometry=!1,i.outSpatialReference=this.layerView.view.spatialReference,e.capabilities?.query.supportsCacheHint&&(i.cacheHint=!0),t.effectiveDisplayFilter&&(i.where=g(i.where,t.effectiveDisplayFilter.where)),i}_fullExtentIsAccurate(){const e=this.layerView.layer;if("definitionExpression"in e&&e.definitionExpression)return!1;switch(e.type){case"feature":case"catalog-footprint":case"oriented-imagery":return D(e.url);case"csv":case"geojson":case"ogc-feature":case"wfs":return!0;default:return}}async _updateServiceDataExtent(e){try{await this._tryUpdateServiceDataExtent(e)}catch(t){d(t)||this._set("serviceDataExtent",a(this.layerView.fullExtentInLocalViewSpatialReference))}}async _tryUpdateServiceDataExtent(e){const t=this.layerView,i=t.layer,r=i.capabilities?.query.supportsExtent??!1,s=a(t.fullExtentInLocalViewSpatialReference),o=i.fullExtent,l=this._fullExtentIsAccurate(),n=this.serviceDataCount;if(r&&n<=N.maxFeatureCountForExtent&&(!s||!l)&&"queryExtent"in i){const t=this._createDataInfoQuery(),r=await i.queryExtent(t,{timeout:N.queryExtentTimeout,signal:e});this._set("serviceDataExtent",r.extent)}else if(s)this._set("serviceDataExtent",s);else if(null!=o){const r="portalItem"in i?i.portalItem:null,s=await C(o,t.view.spatialReference,r,e);this._set("serviceDataExtent",s)}else this._set("serviceDataExtent",null)}async _updateServiceDataCount(e){const t=this.layerView.layer;if(!("queryFeatureCount"in t)||!has("featurelayer-snapshot-enabled"))return void this._set("serviceDataCount",N.noServiceDataCount);const r=await i(t.queryFeatureCount(this._createDataInfoQuery(),{timeout:N.queryStatisticsTimeout,signal:e}));if(!0===r.ok)this._set("serviceDataCount",r.value);else{if(d(r.error))throw r.error;this._set("serviceDataCount",N.noServiceDataCount)}}get _supportsExceedsLimitQuery(){const e=this.layerView.layer;return null!=e.capabilities&&e.capabilities.operations&&e.capabilities.operations.supportsExceedsLimitStatistics}get _minimumNumberOfVerticesForGeometry(){switch(this.layerView.layer.geometryType){case"point":case"multipoint":return 1;case"polygon":return 4;case"polyline":return 2;case"multipatch":case"mesh":return 3;default:return 0}}async _updateSnapshotLimit(e,t,r){if(null==e?.averageSymbolComplexity)return void(this._snapshotLimitExceeded=!1);const{maximumTotalNumberOfVertices:s,averageSymbolComplexity:a}=e,{verticesPerFeature:o,verticesPerCoordinate:l}=a,n=o<=0,u=this._minimumNumberOfVerticesForGeometry>1;if(!n&&!u)return void(this._snapshotLimitExceeded=!1);0!==o&&null!=t&&await t;const h=Math.min(s,I),c=this.serviceDataCount,p=c!==N.noServiceDataCount;let m=p?Math.ceil((h-c*o)/(l||1)):Math.ceil(h/(l||1));if(u&&(m=Math.min(m,j)),p&&this._minimumNumberOfVerticesForGeometry*c>m)return void(this._snapshotLimitExceeded=!0);if(!this._supportsExceedsLimitQuery||!has("featurelayer-snapshot-enabled"))return void(this._snapshotLimitExceeded=this.maxTotalSnapshotVertices>m);const f=await i(this.layerView.layer.queryFeatures(this._createVertexLimitExceededQuery(m),{timeout:N.queryStatisticsTimeout,signal:r}));if(!1===f.ok){if(d(f.error))throw f.error;return void(this._snapshotLimitExceeded=!1)}const y=f.value.features[0];this._snapshotLimitExceeded=!!y?.attributes&&!!y.attributes.exceedslimit}async _fetchServiceDataInfo(){this._cancelFetchServiceDataInfo(),await w(this.layerView.layer);let e=new AbortController;const t=e.signal,i=this._updateServiceDataCount(t),r=Promise.allSettled([i,this._updateSnapshotLimit(this.displayFeatureLimit,i,t)]),s=r.then((()=>this._updateServiceDataExtent(t))).catch((e=>{d(e)||o.getLogger(this).error("#fetchServiceDataInfo()",e)})).then((()=>{s===this._fetchDataInfoPromise&&(this._fetchDataInfoPromise=null,this._fetchDataInfoAbortController=null),e=null}));return e&&(this._fetchDataInfoPromise=s),this._fetchDataInfoAbortController=e,r.then((()=>{}),(()=>{}))}_cancelFetchServiceDataInfo(){const e=this._fetchDataInfoAbortController;e&&(this._fetchDataInfoAbortController=null,this._fetchDataInfoPromise=null,e.abort())}get performanceInfo(){return{storedFeatures:this._tileFetcher?.storedFeatures??0,totalFeatures:this._tileFetcher?.totalFeatures??0,totalVertices:this._tileFetcher?.totalVertices??0,missingTiles:this._tileFetcher?.missingTiles??0}}};e([F({readOnly:!0})],L.prototype,"type",void 0),e([F({constructOnly:!0})],L.prototype,"graphics",void 0),e([F({constructOnly:!0})],L.prototype,"layerView",void 0),e([F({constructOnly:!0})],L.prototype,"context",void 0),e([F({readOnly:!0})],L.prototype,"dataUpdating",null),e([F()],L.prototype,"extent",null),e([F()],L.prototype,"updating",null),e([F({readOnly:!0})],L.prototype,"_updatingHandles",void 0),e([F()],L.prototype,"updatingTotal",null),e([F()],L.prototype,"updatingRemaining",null),e([F()],L.prototype,"expectedFeatureDiff",null),e([F()],L.prototype,"memoryForUnusedFeatures",null),e([F()],L.prototype,"maximumNumberOfFeaturesExceeded",null),e([F({readOnly:!0})],L.prototype,"serviceDataExtent",void 0),e([F({readOnly:!0})],L.prototype,"serviceDataCount",void 0),e([F()],L.prototype,"_snapshotLimitExceeded",void 0),e([F()],L.prototype,"displayFeatureLimit",void 0),e([F({type:Number})],L.prototype,"maximumNumberOfFeatures",null),e([F({readOnly:!0})],L.prototype,"hasAllFeatures",null),e([F({readOnly:!0})],L.prototype,"hasAllFeaturesInView",null),e([F({readOnly:!0})],L.prototype,"hasFullGeometries",null),e([F()],L.prototype,"_forceTilesMode",void 0),e([F({readOnly:!0})],L.prototype,"mode",null),e([F({readOnly:!0})],L.prototype,"maxTotalSnapshotVertices",null),e([F({readOnly:!0})],L.prototype,"tileDescriptors",null),e([F()],L.prototype,"_tileFetcher",void 0),e([F()],L.prototype,"_fetchDataInfoPromise",void 0),L=e([x("esri.layers.graphics.controllers.FeatureTileController3D")],L);const O=1e4,I=1e6,A=12e3,q=1e4,j=5e6;function P(e,t){if(!t)return!1;for(const i of t)if(!e.has(i))return!0;return!1}var N;!function(e){function t(){e.maxFeatureCountForExtent=O,e.queryStatisticsTimeout=A,e.queryExtentTimeout=q}e.noServiceDataCount=1/0,e.maxSnapshotMinScaleFactor=5,e.reset=t}(N||(N={})),N.reset();export{L as FeatureTileController3D,N as FeatureTileController3DConstants};
|