@arcgis/core 5.2.0-next.26 → 5.2.0-next.28
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/WebLinkChart.js +1 -1
- package/arcade/Dictionary.js +1 -1
- package/arcade/Feature.js +1 -1
- package/arcade/Pixel.js +1 -1
- package/arcade/deepClone.js +1 -1
- package/arcade/featureset/support/FeatureSet.js +1 -1
- package/arcade/functions/geometry.js +1 -1
- package/arcade/languageUtils.js +1 -1
- package/assets/esri/core/libs/libtess/libtess-f32.wasm +0 -0
- package/assets/esri/core/libs/libtess/libtess-f64.wasm +0 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/0d3c9112ae07fa4a97d6.js +1 -0
- package/assets/esri/core/workers/chunks/{75df436e6e9773bdcfc2.js → 11f47a012dd8881e3d55.js} +18 -18
- package/assets/esri/core/workers/chunks/{5ee887fc6e1e0e70e02f.js → 1664434dc7a67c8ce453.js} +1 -1
- package/assets/esri/core/workers/chunks/1837f97f720d255a1694.js +1 -0
- package/assets/esri/core/workers/chunks/1849f72f23b434e6c78d.js +1 -0
- package/assets/esri/core/workers/chunks/1893a4b344aa9b57aa8d.js +1 -0
- package/assets/esri/core/workers/chunks/209460f8aae3f9f8c9b8.js +1 -0
- package/assets/esri/core/workers/chunks/{316a3d5c7842b445e29e.js → 24704e70d1ce01ca4081.js} +1 -1
- package/assets/esri/core/workers/chunks/{8ba3e0462a9bdaae5f40.js → 25fd4d5d3af887536b3b.js} +1 -1
- package/assets/esri/core/workers/chunks/{bf9eca7dd107bdb06614.js → 2665337e1b665e7e2b70.js} +1 -1
- package/assets/esri/core/workers/chunks/29a7321fd069253c2521.js +1 -0
- package/assets/esri/core/workers/chunks/{31c4128b23968575feca.js → 31d92ba9089617aa59ab.js} +1 -1
- package/assets/esri/core/workers/chunks/390f2beee8e3f2a302e4.js +1 -0
- package/assets/esri/core/workers/chunks/3eee32db0e9a5086b9a8.js +1 -0
- package/assets/esri/core/workers/chunks/{511b9c12a7479d39dac0.js → 409bc7d69b95f7a1634c.js} +1 -1
- package/assets/esri/core/workers/chunks/47d88e1b003c4519b7b6.js +1 -0
- package/assets/esri/core/workers/chunks/4ba4fd8fa31169760fee.js +261 -0
- package/assets/esri/core/workers/chunks/{268ee59800e64baa9682.js → 4be0c64bbf2449d57ea5.js} +1 -1
- package/assets/esri/core/workers/chunks/4fc32e60e63a9c8429b9.js +1 -0
- package/assets/esri/core/workers/chunks/{e8e7cd26c43f231cdea2.js → 5189413a83faf3480e29.js} +1 -1
- package/assets/esri/core/workers/chunks/5260f623438bd84f2caa.js +1 -0
- package/assets/esri/core/workers/chunks/5363c622a0571134cadd.js +1 -0
- package/assets/esri/core/workers/chunks/{88b08b386926ec889573.js → 548842f8ba9224b15ee4.js} +1 -1
- package/assets/esri/core/workers/chunks/{30298f84bd414f9dea64.js → 5728d8440aca205e4f53.js} +1 -1
- package/assets/esri/core/workers/chunks/5c63b38160c7d063b8af.js +1 -0
- package/assets/esri/core/workers/chunks/6183a26837dc087663ad.js +1 -0
- package/assets/esri/core/workers/chunks/654a6dc13ff5be88c8b9.js +1 -0
- package/assets/esri/core/workers/chunks/{1f03e34520746e432719.js → 67f44cab103d4411dcc5.js} +1 -1
- package/assets/esri/core/workers/chunks/697e0ce10d77b90d4fee.js +1 -0
- package/assets/esri/core/workers/chunks/{8f93e6fc11a158d4f1ee.js → 7335a762412bc8c15a2f.js} +1 -1
- package/assets/esri/core/workers/chunks/{b2b342b06d502fc61ea5.js → 76789f46b2c65d219cf9.js} +1 -1
- package/assets/esri/core/workers/chunks/{fae147d03ed723ab234d.js → 78f68f7534716956f5bc.js} +1 -1
- package/assets/esri/core/workers/chunks/7b290ac2e8a567ecae4a.js +1 -0
- package/assets/esri/core/workers/chunks/7c344c339743295d11d7.js +1 -0
- package/assets/esri/core/workers/chunks/7f1babbb7ead78201ab3.js +1 -0
- package/assets/esri/core/workers/chunks/{dadf85890961bcc205eb.js → 7fcf4f3b9131c7516524.js} +1 -1
- package/assets/esri/core/workers/chunks/{292498a9c7d462d215c6.js → 86e61841df12dbe20a19.js} +1 -1
- package/assets/esri/core/workers/chunks/8980767c5b626e4dc3b9.js +1 -0
- package/assets/esri/core/workers/chunks/8aba35305368234c94f8.js +1 -0
- package/assets/esri/core/workers/chunks/{d670e134348954ce465d.js → 8b452383ba972b638a0c.js} +1 -1
- package/assets/esri/core/workers/chunks/{a3ecde3794a7db3cf283.js → 8d90bef1091204fba0f1.js} +1 -1
- package/assets/esri/core/workers/chunks/{a18cb809dd56c5537b3b.js → 8dbf9b1d8bb6817b19c1.js} +1 -1
- package/assets/esri/core/workers/chunks/8f16a358ed83d2264415.js +1 -0
- package/assets/esri/core/workers/chunks/{a454df829a72ab02c860.js → 8fd63cb38036f331a803.js} +1 -1
- package/assets/esri/core/workers/chunks/{bbcad2fde838819ffc7b.js → 906f4c0fa8135e6c2f03.js} +1 -1
- package/assets/esri/core/workers/chunks/{502464c4eab7667f6566.js → 937e347d130d469518ce.js} +1 -1
- package/assets/esri/core/workers/chunks/9508fa53da5f92a0ab70.js +30 -0
- package/assets/esri/core/workers/chunks/989937c120bdd676ec1e.js +1 -0
- package/assets/esri/core/workers/chunks/9ba705a6ddabca0f77b1.js +1 -0
- package/assets/esri/core/workers/chunks/9dcb2cbf89dcb7558432.js +1 -0
- package/assets/esri/core/workers/chunks/a2357aae79bfbb91f125.js +1 -0
- package/assets/esri/core/workers/chunks/a3ca0649edb646da0918.js +1 -0
- package/assets/esri/core/workers/chunks/a9db775210ebeee41738.js +1 -0
- package/assets/esri/core/workers/chunks/acbc14395c31f6da509e.js +1 -0
- package/assets/esri/core/workers/chunks/{8bd4c43c34aacf3b07da.js → b10f36658aa77bc3a6cf.js} +1 -1
- package/assets/esri/core/workers/chunks/b18b6bb85e52b03b85e3.js +680 -0
- package/assets/esri/core/workers/chunks/b7458bd3a2f590f32111.js +1 -0
- package/assets/esri/core/workers/chunks/b87aca8ad281870ae970.js +1 -0
- package/assets/esri/core/workers/chunks/{790462ab5f21491a4f75.js → c193b4a175a544c4fcd6.js} +1 -1
- package/assets/esri/core/workers/chunks/{d374cb2d17a2d11c500f.js → c46500cc95a84e2a5f7a.js} +1 -1
- package/assets/esri/core/workers/chunks/c8b7ffc5cb3f1493129e.js +1 -0
- package/assets/esri/core/workers/chunks/cc46261e01a985df5aab.js +1 -0
- package/assets/esri/core/workers/chunks/{d41eed41916ed0422059.js → d07261f3fb67b9a99369.js} +1 -1
- package/assets/esri/core/workers/chunks/{2d6d01913096f7cb5ff8.js → d25c37f169577a33db46.js} +1 -1
- package/assets/esri/core/workers/chunks/{04070767356c12026369.js → d61294dcc3ba41060d44.js} +1 -1
- package/assets/esri/core/workers/chunks/{f3d331da3c61af5c5a2f.js → d8ae5b61b5ae71f4796c.js} +1 -1
- package/assets/esri/core/workers/chunks/{7dec8c453fdee1968d12.js → db279d5d9c7deec554bb.js} +1 -1
- package/assets/esri/core/workers/chunks/e181d0f5562878b3dc01.js +1 -0
- package/assets/esri/core/workers/chunks/{7dbaa089c7472825b80c.js → e38d1ba15babc238b151.js} +1 -1
- package/assets/esri/core/workers/chunks/{d07068c44d560e4ce02e.js → e5d2fab228d54b18a8a8.js} +1 -1
- package/assets/esri/core/workers/chunks/{a533d066cac26124c5ce.js → e84c13ac59e5381b77e2.js} +1 -1
- package/assets/esri/core/workers/chunks/ef5d11581a98fb333ad2.js +1 -0
- package/assets/esri/core/workers/chunks/f1d211904d5a1de93cb3.js +1 -0
- package/assets/esri/core/workers/chunks/{353c67da4b25c29360db.js → f5125925f83c979edde7.js} +2 -2
- package/assets/esri/core/workers/chunks/{928b18e13e015330d44b.js → f68b84df093f2894210b.js} +1 -1
- package/assets/esri/core/workers/chunks/{3a35779cae6a11cde51b.js → f74b6952c888d92e479e.js} +1 -1
- package/assets/esri/core/workers/chunks/f847a4846c427f671455.js +1 -0
- package/assets/esri/core/workers/chunks/{66392ff750c28064040a.js → fe20683f442294eb111b.js} +1 -1
- package/assets/esri/images/portal/gaussiansplatlayer16.png +0 -0
- package/assets/esri/images/portal/knowledgegraphlayer16.png +0 -0
- package/assets/esri/images/portal/propresentation16.png +0 -0
- package/assets/esri/images/portal/urbanproject16.png +0 -0
- package/assets/esri/images/support/loading-throb.gif +0 -0
- package/assets/esri/layers/raster/formats/lerc-wasm.wasm +0 -0
- package/assets/esri/libs/basisu/basis_encoder.wasm +0 -0
- package/assets/esri/libs/dxtEncoder/dxt_encoder.wasm +0 -0
- package/assets/esri/themes/base/colors/scss/variables.scss +131 -131
- package/assets/esri/themes/base/colors/scss/variables_dark.scss +131 -133
- package/assets/esri/themes/base/icons/style.scss +4 -5
- package/assets/esri/themes/base/icons/variables.scss +0 -0
- package/assets/esri/themes/base/images/files/archive-32.svg +0 -0
- package/assets/esri/themes/base/images/files/cad-32.svg +0 -0
- package/assets/esri/themes/base/images/files/code-32.svg +0 -0
- package/assets/esri/themes/base/images/files/csv-32.svg +0 -0
- package/assets/esri/themes/base/images/files/excel-32.svg +0 -0
- package/assets/esri/themes/base/images/files/generic-32.svg +0 -0
- package/assets/esri/themes/base/images/files/gpx-32.svg +0 -0
- package/assets/esri/themes/base/images/files/image-32.svg +0 -0
- package/assets/esri/themes/base/images/files/pdf-32.svg +0 -0
- package/assets/esri/themes/base/images/files/report-32.svg +0 -0
- package/assets/esri/themes/base/images/files/sound-32.svg +0 -0
- package/assets/esri/themes/base/images/files/text-32.svg +0 -0
- package/assets/esri/themes/base/images/files/video-32.svg +0 -0
- package/assets/esri/themes/base/images/files/word-32.svg +0 -0
- package/assets/esri/themes/base/images/files/zip-32.svg +0 -0
- package/assets/esri/themes/base/images/loading-throb.gif +0 -0
- package/assets/esri/themes/base/widgets/_BatchAttributeForm.scss +24 -0
- package/assets/esri/themes/base/widgets/_Bookmarks.scss +0 -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/chunks/OITBlend.glsl.js +1 -1
- package/chunks/languageUtils.js +1 -1
- package/config.js +1 -1
- package/core/Loadable.js +1 -1
- package/core/colorUtils.js +1 -1
- package/core/has.js +1 -1
- package/core/workers/WorkerHandle.js +1 -1
- package/editing/sharedTemplates/SharedTemplateProvider.js +1 -1
- package/geometry/Mesh.js +1 -1
- package/geometry/support/meshUtils/loadExternal.js +1 -1
- package/identity/OAuthCredential.js +1 -1
- package/kernel.js +1 -1
- package/layers/AnnotationFeatureLayer.d.ts +2 -2
- package/layers/AnnotationFeatureLayer.js +1 -1
- package/layers/LinkChartLayer.js +1 -1
- package/layers/Lyr3DWasmPerSceneView.js +1 -1
- package/layers/ParquetLayer.js +1 -1
- package/layers/PointCloudLayer.js +1 -1
- package/layers/SceneLayer.js +1 -1
- package/layers/VoxelWasmPerSceneView.js +1 -1
- package/layers/buildingSublayers/BuildingComponentSublayer.js +1 -1
- package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
- package/layers/graphics/editingSupport.js +1 -1
- package/layers/graphics/sources/MemorySource.js +1 -1
- package/layers/graphics/sources/ParquetSource.js +1 -1
- package/layers/mixins/EditBusLayer.js +1 -1
- package/layers/mixins/SceneService.js +1 -1
- package/layers/support/KMLSublayer.js +1 -1
- package/layers/support/ParquetFilesData.js +1 -1
- package/layers/support/TitleCreator.js +1 -1
- package/layers/video/VideoController.js +1 -1
- package/package.json +4 -4
- package/rest/knowledgeGraph/ReplicaDefinition.d.ts +62 -6
- package/smartMapping/support/adapters/FeatureLayerBinningAdapter.js +1 -1
- package/support/ArcadeExpression.js +1 -1
- package/support/basemapUtils.js +1 -1
- package/support/revision.js +1 -1
- package/versionManagement/VersionManagementService.js +1 -1
- package/versionManagement/VersionManager.js +1 -1
- package/views/2d/analysis/AreaMeasurement/AreaMeasurementTool.js +1 -1
- package/views/2d/analysis/DistanceMeasurement/DistanceMeasurementTool.js +1 -1
- package/views/2d/engine/ParentChildStage.js +1 -1
- package/views/2d/engine/Stage.js +1 -1
- package/views/2d/engine/ThrottledCanvas.js +2 -0
- package/views/2d/engine/webgl/Profiler.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
- package/views/2d/layers/ImageryLayerView2D.js +1 -1
- package/views/2d/layers/LayerView2D.js +1 -1
- package/views/2d/layers/MediaLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/features/layerAdapters/AnnotationLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/DimensionLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/featureLayerAdapterUtils.js +2 -0
- package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
- package/views/3d/camera/constraintUtils/surfaceCollision.js +1 -1
- package/views/3d/camera/constraintUtils.js +1 -1
- package/views/3d/glTF/internal/Resource.js +1 -1
- package/views/3d/glTF/loader.js +1 -1
- package/views/3d/layers/BuildingSceneLayerView3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/PointCloudLayerView3D.js +1 -1
- package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
- package/views/3d/layers/graphics/DrivenProperties.js +2 -0
- package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/tessellationUtils.js +1 -1
- package/views/3d/layers/i3s/I3SIntersectionHandler.js +1 -1
- package/views/3d/layers/i3s/LayerElevationProvider.js +1 -1
- package/views/3d/layers/i3s/PointCloudRenderer.js +1 -1
- package/views/3d/layers/support/Tiles3DMeshIntersectionHandler.js +1 -1
- package/views/3d/state/GoToOperation.js +1 -1
- package/views/3d/state/SurfaceCollisionConstraint.js +1 -1
- package/views/3d/state/ViewState.js +1 -1
- package/views/3d/state/ViewStateManager.js +1 -1
- package/views/3d/state/controllers/PointToPointAnimationController.js +1 -1
- package/views/3d/state/controllers/ZoomControllerGlobal.js +1 -1
- package/views/3d/state/controllers/ZoomStepControllerGlobal.js +1 -1
- package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatIntersectionHandler.js +1 -1
- package/views/3d/support/renderInfoUtils/polygon.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/webgl/ManagedFBO.js +1 -1
- package/views/3d/webgl/RenderCamera.js +1 -1
- package/views/3d/webgl/RenderNode.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
- package/views/3d/webgl-engine/effects/RenderNodes.js +1 -1
- package/views/3d/webgl-engine/effects/atmosphere/ChapmanAtmosphere.js +1 -1
- package/views/3d/webgl-engine/effects/clouds/CloudsComposition.js +1 -1
- package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorNode.js +1 -1
- package/views/3d/webgl-engine/effects/fog/Fog.js +1 -1
- package/views/3d/webgl-engine/effects/geometry/RenderOccludedRenderNode.js +1 -1
- package/views/3d/webgl-engine/effects/glow/Glow.js +1 -1
- package/views/3d/webgl-engine/effects/haze/Haze.js +1 -1
- package/views/3d/webgl-engine/effects/laserlines/LaserLineRenderer.js +1 -1
- package/views/3d/webgl-engine/effects/magnifier/Magnifier.js +1 -1
- package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
- package/views/3d/webgl-engine/effects/transparency/OITBlend.js +1 -1
- package/views/3d/webgl-engine/effects/transparency/OITBlendTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/lib/CutFillComputationRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/CutFillVisualizationRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/GPUPointOcclusionQuery.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/Intersector.js +1 -1
- package/views/3d/webgl-engine/lib/IntersectorInterfaces.js +1 -1
- package/views/3d/webgl-engine/lib/IntersectorResult.js +1 -1
- package/views/3d/webgl-engine/lib/OrderIndependentTransparency.js +1 -1
- package/views/3d/webgl-engine/lib/PolygonIntersectionResults.js +2 -0
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/LodResources.js +1 -1
- package/views/3d/webgl-engine/lib/screenPolygonIntersectionUtils.js +2 -0
- 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/HeatmapDensityMaterial.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/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/TriangleMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/IndexLayout.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/MergedBuffer.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/VaoWriter.js +1 -1
- package/views/3d/webgl.js +1 -1
- package/views/VideoView.js +1 -1
- package/views/View2D.js +1 -1
- package/views/Viewport2DBaseMixin.js +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileLineGroundComputation.js +1 -1
- package/views/draw/support/editingSessionUtils.js +1 -1
- package/views/popupAdapter.js +1 -1
- package/views/support/Scheduler.js +1 -1
- package/views/webgl/BufferObject.js +1 -1
- package/widgets/BasemapGallery/support/PortalBasemapsSource.js +1 -1
- package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
- package/widgets/BatchAttributeForm/batchAttributeFormUtils.js +1 -1
- package/widgets/BatchAttributeForm/css.js +1 -1
- package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.js +1 -1
- package/widgets/BatchAttributeForm/interfaceUtils.js +1 -1
- package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/Directions/DirectionsViewModel.js +1 -1
- package/widgets/Directions.js +1 -1
- package/widgets/Editor/EditorViewModel.d.ts +1 -1
- package/widgets/Editor.d.ts +11 -1
- package/widgets/Editor.js +1 -1
- package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/FeatureTable/support/FeatureStore.js +1 -1
- package/widgets/FeatureTable.js +1 -1
- package/widgets/Features/FeaturesViewModel.js +1 -1
- package/widgets/LinkChartLayoutSwitcher/LinkChartLayoutSwitcherViewModel.js +1 -1
- package/widgets/Locate/LocateViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/sketch/DataCaptureAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/sketch/MeasurementAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/view/MapViewAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/services/SuperimposeService.js +1 -1
- package/widgets/OrientedImageryViewer/support/MediaPrefetcher.js +1 -1
- package/widgets/PanoramicViewer/PanoramicViewerViewModel.js +1 -1
- package/widgets/Print/PrintViewModel.js +1 -1
- package/widgets/Print.js +1 -1
- package/widgets/TableList/ListItem.js +1 -1
- package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
- package/widgets/VersionManagement/VersionManagementViewModel.js +1 -1
- package/widgets/Widget.js +1 -1
- package/widgets/support/geolocationUtils.js +1 -1
- package/widgets/support/tests.js +1 -1
- package/assets/esri/core/workers/chunks/073ee52705ea326fecfb.js +0 -1
- package/assets/esri/core/workers/chunks/0e81b6aa64d5491870b2.js +0 -1
- package/assets/esri/core/workers/chunks/10112bf4b385f1955a3d.js +0 -1
- package/assets/esri/core/workers/chunks/126a8c26618425790804.js +0 -1
- package/assets/esri/core/workers/chunks/15fd30908d5db7f7136e.js +0 -261
- package/assets/esri/core/workers/chunks/1b5001bdfeecf78c33ce.js +0 -1
- package/assets/esri/core/workers/chunks/1cb1f125dccbf8c8cac9.js +0 -1
- package/assets/esri/core/workers/chunks/1d2609ce6220b5af5526.js +0 -1
- package/assets/esri/core/workers/chunks/2e7b83c8ba78cb06d611.js +0 -1
- package/assets/esri/core/workers/chunks/2ed81f1e490cb7e73405.js +0 -1
- package/assets/esri/core/workers/chunks/32f26757e36704923286.js +0 -1
- package/assets/esri/core/workers/chunks/33e86dd1a54e447fa0e3.js +0 -1
- package/assets/esri/core/workers/chunks/3529afab0c2444275d91.js +0 -1
- package/assets/esri/core/workers/chunks/36b904912cea1744d1c6.js +0 -1
- package/assets/esri/core/workers/chunks/3b4fc67f6cb7393fbd97.js +0 -1
- package/assets/esri/core/workers/chunks/3df5394b17e9659ecb8f.js +0 -1
- package/assets/esri/core/workers/chunks/4adfe7f8a8efe2cd8e80.js +0 -1
- package/assets/esri/core/workers/chunks/5b654e0dc901a7f06a9f.js +0 -1
- package/assets/esri/core/workers/chunks/6849282c4a5cd733779d.js +0 -1
- package/assets/esri/core/workers/chunks/6adc17e6e287a365ad8d.js +0 -1
- package/assets/esri/core/workers/chunks/7e23de8d9b2d938808f6.js +0 -1
- package/assets/esri/core/workers/chunks/831455798b177678720c.js +0 -1
- package/assets/esri/core/workers/chunks/856cf872d29eeaf11a71.js +0 -1
- package/assets/esri/core/workers/chunks/8ca88cfc0b9f84dc5832.js +0 -1
- package/assets/esri/core/workers/chunks/8f25d91ea7b99597124e.js +0 -1
- package/assets/esri/core/workers/chunks/93b40245378ced43ca08.js +0 -1
- package/assets/esri/core/workers/chunks/9434c76ad39c936dba90.js +0 -1
- package/assets/esri/core/workers/chunks/98dfe31e8ed9b522eaff.js +0 -1
- package/assets/esri/core/workers/chunks/a40ede4d3375184f21fe.js +0 -1
- package/assets/esri/core/workers/chunks/a8310f55de4749f973d0.js +0 -1
- package/assets/esri/core/workers/chunks/af96cbc4fb7bef726635.js +0 -1
- package/assets/esri/core/workers/chunks/affc972757798b6db002.js +0 -1
- package/assets/esri/core/workers/chunks/b419fd36337e76e2d4a3.js +0 -680
- package/assets/esri/core/workers/chunks/b91a15522692781560b4.js +0 -30
- package/assets/esri/core/workers/chunks/c9ce408675dae6a0edd1.js +0 -1
- package/assets/esri/core/workers/chunks/e73bb7c8de7412d9975c.js +0 -1
- package/assets/esri/core/workers/chunks/f23351a04643c464be84.js +0 -1
- package/assets/esri/core/workers/chunks/f2a268c69f2a5566381b.js +0 -1
- package/assets/esri/core/workers/chunks/f93facf47aba9b128fcc.js +0 -1
- package/views/2d/engine/ManagedCanvas.js +0 -2
- package/views/3d/state/controllers/SurfaceCollisionCorrectionController.js +0 -2
- /package/assets/esri/core/workers/chunks/{353c67da4b25c29360db.js.LICENSE.txt → f5125925f83c979edde7.js.LICENSE.txt} +0 -0
package/WebLinkChart.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as t}from"tslib";import e from"./Basemap.js";import i from"./WebDocument2D.js";import{deprecated as a}from"./core/deprecate.js";import r from"./core/Error.js";import n from"./core/Logger.js";import o from"./core/Version.js";import{property as s,subclass as h}from"./core/accessorSupport/decorators.js";import l from"./layers/LinkChartLayer.js";import{getInclusionDefinitionFromCypherResults as y,getInclusionDefinitionFromIdTypePairs as c}from"./layers/knowledgeGraph/layerUtils.js";import{getDefaultChronologicalOverlayLayerId as p,getChronologicalOverlay as L}from"./layers/knowledgeGraph/supportUtils.js";import k from"./linkChart/LayoutSettings.js";import d from"./linkChart/LinkChartProperties.js";import u from"./linkChart/NonspatialDataDisplay.js";import C from"./linkChart/RootedLayoutSettings.js";import g from"./webmap/InitialViewProperties.js";import{currentVersion as m}from"./webmap/utils.js";var f;const w={currentVersion:m,createInitialViewProperties:()=>new g,parseVersion:o.parse,itemType:"Web Link Chart",name:"linkchart",origin:"link-chart"};let b=f=class extends i{constructor(t){super(t),this.mapType="webLinkChart",this.linkChartProperties=new d}get activeLinkChartLayer(){return this.layers.find(({type:t})=>"link-chart"===t)}get context(){return w}async applyLayout(t="organic-standard",i){if(await this.load(),!this.activeLinkChartLayer)throw new r("WebLinkChart:no-link-chart-layer","No link chart layer found");"geographic-organic-standard"!==t||this.basemap?.baseLayers?.length||(this.basemap=e.fromId("topo-vector"),await(this.basemap?.load())),this.linkChartProperties.layoutType=t;const o=i?.layoutSettings??this.linkChartProperties.layoutSettings??new k,s=o.rootedLayoutSettings?.rootEntities;s&&(o.rootedLayoutSettings||(o.rootedLayoutSettings=new C),o.rootedLayoutSettings.rootEntities=this._getRootEntitiesInInclusionDefinition(s)),this.linkChartProperties.layoutSettings=o;let{lockedNodeLocations:h,lockedEntityLocations:l,...y}=i??{};!l&&h?(a(n.getLogger(this),"WebLinkChart:applyLayout - WebLinkChartApplyLayoutOptions.lockedNodeLocations is deprecated.",{replacement:"Use WebLinkChartApplyLayoutOptions.lockedEntityLocations instead.",version:"5.0"}),l=h):l&&h&&a(n.getLogger(this),"WebLinkChart:applyLayout - both lockedNodeLocations (deprecated in 5.0) and lockedEntityLocations are defined. Use WebLinkChartApplyLayoutOptions.lockedEntityLocations only instead.",{replacement:"Use WebLinkChartApplyLayoutOptions.lockedEntityLocations instead.",version:"5.0"});const{rootEntityIds:c,...p}=y,L=this.linkChartProperties.layoutSettings?.rootedLayoutSettings?.rootEntities;!L&&c?a(n.getLogger(this),"WebLinkChart:applyLayout - WebLinkChartApplyLayoutOptions.rootEntityIds is deprecated.",{replacement:"Use WebLinkChartApplyLayoutOptions.layoutSettings.rootedLayoutSettings.rootEntities instead.",version:"5.1"}):L&&c&&a(n.getLogger(this),"WebLinkChart:applyLayout - both rootEntityIds (deprecated in 5.1) and layoutSettings.rootedLayoutSettings.rootEntities are defined. Use WebLinkChartApplyLayoutOptions.layoutSettings.rootedLayoutSettings.rootEntities only instead.",{replacement:"Use WebLinkChartApplyLayoutOptions.layoutSettings.rootedLayoutSettings.rootEntities instead.",version:"5.1"});const d={...p,...c?{rootEntityIds:c}:{},...l?{lockedEntityLocations:l}:{},layoutSettings:o};return this.activeLinkChartLayer.applyNewLinkChartLayout(t,d)}_getRootEntitiesInInclusionDefinition(t){const e=this.activeLinkChartLayer?.dataManager?.inclusionModeDefinition;return e?t.filter(({id:t,typeName:i})=>{const a=e.namedTypeDefinitions.get(i);return a&&(a.useAllData||a.members?.has(t))||!1}):t}changeNonspatialDataDisplay(t){if(!this.activeLinkChartLayer)throw new r("WebLinkChart:no-link-chart-layer","No link chart layer found");this.linkChartProperties.nonspatialDataDisplay||(this.linkChartProperties.nonspatialDataDisplay=new u),this.linkChartProperties.nonspatialDataDisplay.mode=t}async addRecords(t,e){if(await this.load(),!this.activeLinkChartLayer)throw new r("WebLinkChart:no-link-chart-layer","No link chart layer found");return this.activeLinkChartLayer.addRecords(t,e)}async createSublayerForNamedType(t){if(await this.load(),!this.activeLinkChartLayer)throw new r("WebLinkChart:no-link-chart-layer","No link chart layer found");return this.activeLinkChartLayer.createSublayerForNamedType(t)}async removeRecords(t){if(await this.load(),!this.activeLinkChartLayer)throw new r("WebLinkChart:no-link-chart-layer","No link chart layer found");return this.activeLinkChartLayer.removeRecords(t)}async expand(t,e){if(await this.load(),!this.activeLinkChartLayer)throw new r("WebLinkChart:no-link-chart-layer","No link chart layer found");const i=await this.activeLinkChartLayer.expand(t,e);return i?.records??[]}async refreshLinkChartData(t){if(await this.load(),!this.activeLinkChartLayer)throw new r("WebLinkChart:no-link-chart-layer","No link chart layer found");return this.activeLinkChartLayer.refreshLinkChartCache(t)}async connectBetweenEntities(t,e){if(await this.load(),!this.activeLinkChartLayer)throw new r("WebLinkChart:no-link-chart-layer","No link chart layer found");const i=await this.activeLinkChartLayer.connectBetweenEntities(t,e);return i?.records??[]}async connectFromEntities(t,e){if(await this.load(),!this.activeLinkChartLayer)throw new r("WebLinkChart:no-link-chart-layer","No link chart layer found");const i=await this.activeLinkChartLayer.connectFromEntities(t,e);return i?.records??[]}getMemberIdsByType(t){if(!this.activeLinkChartLayer)throw new r("WebLinkChart:no-link-chart-layer","No link chart layer found");return Array.from(this.activeLinkChartLayer?.dataManager.sublayerCaches.get(t)?.keys()??[])}get diagramNodesExtent(){if(!this.activeLinkChartLayer)throw new r("WebLinkChart:no-link-chart-layer","No link chart layer found");return this.activeLinkChartLayer.linkChartExtent}get entityCount(){if(!this.activeLinkChartLayer)throw new r("WebLinkChart:no-link-chart-layer","No link chart layer found");return this.activeLinkChartLayer.entityLinkChartDiagramLookup.size}get relationshipCount(){if(!this.activeLinkChartLayer)throw new r("WebLinkChart:no-link-chart-layer","No link chart layer found");return this.activeLinkChartLayer.relationshipLinkChartDiagramLookup.size}get knowledgeGraph(){if(!this.activeLinkChartLayer)throw new r("WebLinkChart:no-link-chart-layer","No link chart layer found");return this.activeLinkChartLayer?.knowledgeGraph}add(t,e){if(this.activeLinkChartLayer&&"type"in t&&"link-chart"===t.type)throw new r("linkchart:one-link-chart-layer","Web Link Charts can only have one Link Chart Layer, another cannot be added");if(super.add(t,e),"type"in t&&"link-chart"===t.type){const e=t.initializationLinkChartConfig?.layoutMode;e&&(this.linkChartProperties.layoutType=e);const i=t.initializationLinkChartConfig?.layoutSettings;i&&(this.linkChartProperties.layoutSettings=i)}}static fromJSON(t){if(t)return new f({resourceInfo:t});throw new r("linkchart:empty-resource","Expected a JSON resource but got nothing")}handleChronologicalOverlay(){if(!this.activeLinkChartLayer)return;const t=this.activeLinkChartLayer,e=this.findLayerById(p());if(e&&this.remove(e),"chronological-mono-timeline"===this.linkChartProperties.layoutType||"chronological-multi-timeline"===this.linkChartProperties.layoutType){const e=L(t);this.add(e,0)}}static async fromCypherQuery(t,e,i,a){const r=await y(t,e,a),n=new f,o=new l({url:t.url,initializationInclusionModeDefinition:r,initializationLinkChartConfig:i});return o.load({signal:a?.signal}),n.add(o),n}static fromIdTypePairs(t,e,i,a){const r=c(t,e),n=new f,o=new l({url:t.url,initializationInclusionModeDefinition:r,initializationLinkChartConfig:i});return o.load({signal:a?.signal}),n.add(o),n}};t([s({readOnly:!0})],b.prototype,"activeLinkChartLayer",null),t([s({json:{write:{ignoreOrigin:!0}}})],b.prototype,"mapType",void 0),t([s({type:d,nonNullable:!0,json:{write:{ignoreOrigin:!0}}})],b.prototype,"linkChartProperties",void 0),t([s({readOnly:!0})],b.prototype,"diagramNodesExtent",null),t([s({readOnly:!0})],b.prototype,"entityCount",null),t([s({readOnly:!0})],b.prototype,"relationshipCount",null),t([s({readOnly:!0})],b.prototype,"knowledgeGraph",null),b=f=t([h("esri.WebLinkChart")],b);const v=b;export{v as default};
|
|
2
|
+
import{__decorate as t}from"tslib";import e from"./Basemap.js";import i from"./WebDocument2D.js";import{deprecated as a}from"./core/deprecate.js";import r from"./core/Error.js";import n from"./core/Logger.js";import o from"./core/Version.js";import{property as s,subclass as h}from"./core/accessorSupport/decorators.js";import l from"./layers/LinkChartLayer.js";import{getInclusionDefinitionFromCypherResults as y,getInclusionDefinitionFromIdTypePairs as c}from"./layers/knowledgeGraph/layerUtils.js";import{getDefaultChronologicalOverlayLayerId as p,getChronologicalOverlay as L}from"./layers/knowledgeGraph/supportUtils.js";import k from"./linkChart/LayoutSettings.js";import d from"./linkChart/LinkChartProperties.js";import u from"./linkChart/NonspatialDataDisplay.js";import C from"./linkChart/RootedLayoutSettings.js";import g from"./webmap/InitialViewProperties.js";import{currentVersion as m}from"./webmap/utils.js";var f;const w={currentVersion:m,createInitialViewProperties:()=>new g,parseVersion:o.parse,itemType:"Web Link Chart",name:"linkchart",origin:"link-chart"};let b=f=class extends i{constructor(t){super(t),this.mapType="webLinkChart",this.linkChartProperties=new d}get activeLinkChartLayer(){return this.layers.find(({type:t})=>"link-chart"===t)}get context(){return w}async applyLayout(t="organic-standard",i){if(await this.load(),!this.activeLinkChartLayer)throw new r("WebLinkChart:no-link-chart-layer","No link chart layer found");"geographic-organic-standard"!==t||this.basemap?.baseLayers?.length||(this.basemap=e.fromId("topo-vector"),await(this.basemap?.load())),this.linkChartProperties.layoutType=t;const o=i?.layoutSettings??this.linkChartProperties.layoutSettings??new k,s=o.rootedLayoutSettings?.rootEntities;s&&(o.rootedLayoutSettings||(o.rootedLayoutSettings=new C),o.rootedLayoutSettings.rootEntities=this._getRootEntitiesInInclusionDefinition(s)),this.linkChartProperties.layoutSettings=o;let{lockedNodeLocations:h,lockedEntityLocations:l,...y}=i??{};!l&&h?(a(n.getLogger(this),"WebLinkChart:applyLayout - WebLinkChartApplyLayoutOptions.lockedNodeLocations is deprecated.",{replacement:"Use WebLinkChartApplyLayoutOptions.lockedEntityLocations instead.",version:"5.0"}),l=h):l&&h&&a(n.getLogger(this),"WebLinkChart:applyLayout - both lockedNodeLocations (deprecated in 5.0) and lockedEntityLocations are defined. Use WebLinkChartApplyLayoutOptions.lockedEntityLocations only instead.",{replacement:"Use WebLinkChartApplyLayoutOptions.lockedEntityLocations instead.",version:"5.0"});const{rootEntityIds:c,...p}=y,L=this.linkChartProperties.layoutSettings?.rootedLayoutSettings?.rootEntities;!L&&c?a(n.getLogger(this),"WebLinkChart:applyLayout - WebLinkChartApplyLayoutOptions.rootEntityIds is deprecated.",{replacement:"Use WebLinkChartApplyLayoutOptions.layoutSettings.rootedLayoutSettings.rootEntities instead.",version:"5.1"}):L&&c&&a(n.getLogger(this),"WebLinkChart:applyLayout - both rootEntityIds (deprecated in 5.1) and layoutSettings.rootedLayoutSettings.rootEntities are defined. Use WebLinkChartApplyLayoutOptions.layoutSettings.rootedLayoutSettings.rootEntities only instead.",{replacement:"Use WebLinkChartApplyLayoutOptions.layoutSettings.rootedLayoutSettings.rootEntities instead.",version:"5.1"});const d={...p,...c?{rootEntityIds:c}:{},...l?{lockedEntityLocations:l}:{},layoutSettings:o};return this.activeLinkChartLayer.applyNewLinkChartLayout(t,d)}_getRootEntitiesInInclusionDefinition(t){const e=this.activeLinkChartLayer?.dataManager?.inclusionModeDefinition;return e?t.filter(({id:t,typeName:i})=>{const a=e.namedTypeDefinitions.get(i);return a&&(a.useAllData||a.members?.has(t))||!1}):t}changeNonspatialDataDisplay(t){if(!this.activeLinkChartLayer)throw new r("WebLinkChart:no-link-chart-layer","No link chart layer found");this.linkChartProperties.nonspatialDataDisplay||(this.linkChartProperties.nonspatialDataDisplay=new u),this.linkChartProperties.nonspatialDataDisplay.mode=t}async addRecords(t,e){if(await this.load(),!this.activeLinkChartLayer)throw new r("WebLinkChart:no-link-chart-layer","No link chart layer found");return this.activeLinkChartLayer.addRecords(t,e)}async createSublayerForNamedType(t){if(await this.load(),!this.activeLinkChartLayer)throw new r("WebLinkChart:no-link-chart-layer","No link chart layer found");return this.activeLinkChartLayer.createSublayerForNamedType(t)}async removeRecords(t){if(await this.load(),!this.activeLinkChartLayer)throw new r("WebLinkChart:no-link-chart-layer","No link chart layer found");return this.activeLinkChartLayer.removeRecords(t)}async expand(t,e){if(await this.load(),!this.activeLinkChartLayer)throw new r("WebLinkChart:no-link-chart-layer","No link chart layer found");const i=await this.activeLinkChartLayer.expand(t,e);return i?.records??[]}async refreshLinkChartData(t){if(await this.load(),!this.activeLinkChartLayer)throw new r("WebLinkChart:no-link-chart-layer","No link chart layer found");return this.activeLinkChartLayer.refreshLinkChartCache(t)}async connectBetweenEntities(t,e){if(await this.load(),!this.activeLinkChartLayer)throw new r("WebLinkChart:no-link-chart-layer","No link chart layer found");const i=await this.activeLinkChartLayer.connectBetweenEntities(t,e);return i?.records??[]}async connectFromEntities(t,e){if(await this.load(),!this.activeLinkChartLayer)throw new r("WebLinkChart:no-link-chart-layer","No link chart layer found");const i=await this.activeLinkChartLayer.connectFromEntities(t,e);return i?.records??[]}getMemberIdsByType(t){if(!this.activeLinkChartLayer)throw new r("WebLinkChart:no-link-chart-layer","No link chart layer found");return Array.from(this.activeLinkChartLayer?.dataManager.sublayerCaches.get(t)?.keys()??[])}get diagramNodesExtent(){if(!this.activeLinkChartLayer)throw new r("WebLinkChart:no-link-chart-layer","No link chart layer found");return this.activeLinkChartLayer.linkChartExtent}get entityCount(){if(!this.activeLinkChartLayer)throw new r("WebLinkChart:no-link-chart-layer","No link chart layer found");return this.activeLinkChartLayer.entityLinkChartDiagramLookup.size}get relationshipCount(){if(!this.activeLinkChartLayer)throw new r("WebLinkChart:no-link-chart-layer","No link chart layer found");return this.activeLinkChartLayer.relationshipLinkChartDiagramLookup.size}get knowledgeGraph(){if(!this.activeLinkChartLayer)throw new r("WebLinkChart:no-link-chart-layer","No link chart layer found");return this.activeLinkChartLayer?.knowledgeGraph}add(t,e){if(this.activeLinkChartLayer&&"type"in t&&"link-chart"===t.type)throw new r("linkchart:one-link-chart-layer","Web Link Charts can only have one Link Chart Layer, another cannot be added");if(super.add(t,e),"type"in t&&"link-chart"===t.type){const e=t.initializationLinkChartConfig?.layoutMode;e&&(this.linkChartProperties.layoutType=e);const i=t.initializationLinkChartConfig?.layoutSettings;i&&(this.linkChartProperties.layoutSettings=i)}}static fromJSON(t){if(t)return new f({resourceInfo:t});throw new r("linkchart:empty-resource","Expected a JSON resource but got nothing")}handleChronologicalOverlay(){if(!this.activeLinkChartLayer)return;const t=this.activeLinkChartLayer,e=this.findLayerById(p());if(e&&this.remove(e),"chronological-mono-timeline"===this.linkChartProperties.layoutType||"chronological-multi-timeline"===this.linkChartProperties.layoutType){const e=L(t);this.add(e,0)}}static async fromCypherQuery(t,e,i,a){const r=await y(t,e,a),n=new f,o=new l({url:t.url,initializationInclusionModeDefinition:r,initializationLinkChartConfig:i});return o.load({signal:a?.signal}).catch(()=>{}),n.add(o),n}static fromIdTypePairs(t,e,i,a){const r=c(t,e),n=new f,o=new l({url:t.url,initializationInclusionModeDefinition:r,initializationLinkChartConfig:i});return o.load({signal:a?.signal}).catch(()=>{}),n.add(o),n}};t([s({readOnly:!0})],b.prototype,"activeLinkChartLayer",null),t([s({json:{write:{ignoreOrigin:!0}}})],b.prototype,"mapType",void 0),t([s({type:d,nonNullable:!0,json:{write:{ignoreOrigin:!0}}})],b.prototype,"linkChartProperties",void 0),t([s({readOnly:!0})],b.prototype,"diagramNodesExtent",null),t([s({readOnly:!0})],b.prototype,"entityCount",null),t([s({readOnly:!0})],b.prototype,"relationshipCount",null),t([s({readOnly:!0})],b.prototype,"knowledgeGraph",null),b=f=t([h("esri.WebLinkChart")],b);const v=b;export{v as default};
|
package/arcade/Dictionary.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{ArcadeDate as t}from"./ArcadeDate.js";import{deepClone as e}from"./deepClone.js";import{ArcadeExecutionError as s}from"./executionError.js";import{i as r,c as i,a as
|
|
2
|
+
import{ArcadeDate as t}from"./ArcadeDate.js";import{deepClone as e}from"./deepClone.js";import{ArcadeExecutionError as s}from"./executionError.js";import{i as r,c as i,a as o,b as n,d as a,e as u,f as l,g as c,h as b}from"../chunks/languageUtils.js";import h from"../geometry/Geometry.js";import{isNumber as f,isBoolean as m,isString as d,isArray as w}from"../support/guards.js";function p(t,e,s=!1,r=!1){if(null==t)return null;if(f(t)||m(t)||d(t)||u(t)||l(t)||c(t))return t;if(w(t)){const i=[];for(const o of t)i.push(p(o,e,s,r));return i}if(r&&b(t))return t;const i=new y;i.immutable=!1;for(const[o,n]of Object.entries(t))void 0!==n&&i.setField(o,p(n,e,s,r));return i.immutable=s,i}class y{constructor(t){this.declaredClass="esri.arcade.Dictionary",this.plain=!1,this.immutable=!0,t instanceof y?this.attributes=t.attributes:null==t?this.attributes=Object.create(null):null!=Object.getPrototypeOf(t)?this.attributes={__proto__:null,...t}:this.attributes=t}static containerEntry(t,e){return new y({__proto__:null,key:t,value:e})}static textFormatting(){const t=new y({__proto__:null,newline:"\n",tab:"\t",singlequote:"'",doublequote:'"',forwardslash:"/",backwardslash:"\\"});return t.immutable=!1,t}field(t){const e=t.toLowerCase(),r=this.attributes[t];if(void 0!==r)return r;for(const s in this.attributes)if(s.toLowerCase()===e)return this.attributes[s];throw new s("FieldNotFound",null,{key:t})}setField(e,i){if(this.immutable)throw new s("Immutable",null);if(r(i))throw new s("NoFunctionInDictionary",null);const o=e.toLowerCase();i instanceof Date&&(i=t.dateJSToArcadeDate(i));if(void 0===this.attributes[e]){for(const t in this.attributes)if(t.toLowerCase()===o)return void(this.attributes[t]=i);this.attributes[e]=i}else this.attributes[e]=i}eraseField(t){if(this.immutable)throw new s("Immutable",null);if(t in this.attributes)return void delete this.attributes[t];const e=t.toLowerCase();for(const s in this.attributes)if(s.toLowerCase()===e)return void delete this.attributes[s]}hasField(t){const e=t.toLowerCase();if(void 0!==this.attributes[t])return!0;for(const s in this.attributes)if(s.toLowerCase()===e)return!0;return!1}keys(){const t=[];for(const e in this.attributes)t.push(e);return t.sort((t,e)=>t.toLowerCase()<e.toLowerCase()?-1:1)}values(){return this.keys().map(t=>this.attributes[t])}entryCount(){return Object.keys(this.attributes).length}isEmpty(){return this.entryCount()<=0}castToText(t=!1){return i(this.attributes,{useNumbersForDates:t})}static convertObjectToArcadeDictionary(t,e,s=!0,r=!1){const i=new y;i.immutable=!1;for(const o in t){const n=t[o];void 0!==n&&i.setField(o.toString(),p(n,e,s,r))}return i.immutable=s,i}static convertJsonToArcade(t,e,s=!1,r=!1){return p(t,e,s,r)}castAsJson(){const t=Object.create(null);for(const e in this.attributes){const s=this.attributes[e];void 0!==s&&(t[e]=o(s))}return t}async castAsJsonAsync(e=null){const s=Object.create(null),r=[];for(const i in this.attributes){const u=this.attributes[i];void 0!==u&&(n(u)||u instanceof h||u instanceof t?s[i]=o(u):r.push(a(u,e).then(t=>{s[i]=t})))}return r.length>0&&await Promise.all(r),s}deepClone(){const t=new y;t.immutable=!1;for(const s of this.keys())t.setField(s,e(this.field(s)));return t}}export{y as default};
|
package/arcade/Feature.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{ArcadeDate as e}from"./ArcadeDate.js";import{configureDeepClone as t}from"./deepClone.js";import i from"./Dictionary.js";import{ArcadeExecutionError as s}from"./executionError.js";import{m as r,c as n,t as a,
|
|
2
|
+
import{ArcadeDate as e}from"./ArcadeDate.js";import{configureDeepClone as t}from"./deepClone.js";import i from"./Dictionary.js";import{ArcadeExecutionError as s}from"./executionError.js";import{m as r,c as n,t as a,b as o,e as l,g as d,f as u,a as m}from"../chunks/languageUtils.js";import{constructGeometryFromDictionary as y}from"./geometry/constructors.js";import{DateOnly as c}from"../core/sql/DateOnly.js";import{TimeOnly as f}from"../core/sql/TimeOnly.js";import h from"../geometry/Geometry.js";import{fromJSON as p}from"../geometry/support/jsonUtils.js";import{convertToGeometry as _}from"../layers/graphics/featureConversionUtils.js";import T from"../layers/support/FieldsIndex.js";import{isString as g,isNumber as F,isBoolean as b,isDate as x}from"../support/guards.js";function D(e){switch(e.type){case"small-integer":case"esriFieldTypeSmallInteger":case"integer":case"esriFieldTypeInteger":case"single":case"esriFieldTypeSingle":case"double":case"esriFieldTypeDouble":case"big-integer":case"esriFieldTypeBigInteger":case"long":case"esriFieldTypeLong":case"oid":case"esriFieldTypeOID":return{name:e.name,type:"number"};case"global-id":case"esriFieldTypeGlobalID":case"guid":case"esriFieldTypeGUID":case"string":case"esriFieldTypeString":return{name:e.name,type:"text"};case"date":case"esriFieldTypeDate":case"timestamp-offset":case"esriFieldTypeTimestampOffset":return{name:e.name,type:"date"};case"date-only":case"esriFieldTypeDateOnly":return{name:e.name,type:"dateOnly"};case"time-only":case"esriFieldTypeTimeOnly":return{name:e.name,type:"time"};default:return null}}function w(t,i,s){if(null==t)return null;switch(i){case"time-only":return d(t)?t:f.fromReader(t.toString());case"date-only":return u(t)?t:c.fromReader(t.toString());case"timestamp-offset":return l(t)?t:e.fromReaderAsTimeStampOffset(t.toString());case"date":return l(t)?t:x(t)?e.dateJSAndZoneToArcadeDate(t,s):e.epochToArcadeDate(t,s);case"geometry":return null;default:return t}}class I{constructor(){this.arcadeDeclaredClass="esri.arcade.Feature",this._optimizedGeomDefinition=null,this._geometry=null,this.attributes=null,this._layer=null,this._fieldTypesFixed=!0,this.fieldsIndex=null,this.contextTimeZone=null,this.immutable=!0,this._fieldsToFixDataTypes=null,this.immutable=!0}static createFromGraphic(e,t){const i=new I;return i.contextTimeZone=t??null,i._geometry=null!=e.geometry?e.geometry:null,void 0===e.attributes||null===e.attributes?i.attributes={}:i.attributes=e.attributes,e._sourceLayer?(i._layer=e._sourceLayer,i._fieldTypesFixed=!1):e._layer?(i._layer=e._layer,i._fieldTypesFixed=!1):e.layer&&"fields"in e.layer?(i._layer=e.layer,i._fieldTypesFixed=!1):e.sourceLayer&&"fields"in e.sourceLayer&&(i._layer=e.sourceLayer,i._fieldTypesFixed=!1),i._layer&&!i._fieldTypesFixed&&(i.fieldsIndex=this.hydrateFieldsIndex(i._layer)),i}static createFromArcadeFeature(e){if(e instanceof I){const t=new I;return t._fieldTypesFixed=e._fieldTypesFixed,t.attributes=e.attributes,t._geometry=e._geometry,t._optimizedGeomDefinition=e._optimizedGeomDefinition,e._layer&&(t._layer=e._layer),t.fieldsIndex=e.fieldsIndex,t.contextTimeZone=e.contextTimeZone,t}const t={};for(const i of e.keys())t[i]=e.field(i);return I.createFromGraphicLikeObject(e.geometry(),t,e.fullSchema(),e.contextTimeZone)}static createFromOptimisedFeature(e,t,i){const s=new I;return s._geometry=e.geometry?{geometry:e.geometry}:null,s._optimizedGeomDefinition=i,s.attributes=e.attributes||{},s._layer=t,s._fieldTypesFixed=!1,s}static createFromArcadeDictionary(e,t){const s=new I;return s.attributes=e.field("attributes"),null!==s.attributes&&s.attributes instanceof i?(s.attributes=s.attributes.attributes,null===s.attributes&&(s.attributes={})):s.attributes={},s._geometry=e.field("geometry"),null!==s._geometry&&(s._geometry instanceof i?s._geometry=y(s._geometry,t):s._geometry instanceof h||(s._geometry=null)),s}static createFromGraphicLikeObject(e,t,i=null,s){const r=new I;return r.contextTimeZone=s??null,null===t&&(t={}),r.attributes=t,r._geometry=null!=e?e:null,r._layer=i,r._layer&&(r._fieldTypesFixed=!1,r.fieldsIndex=this.hydrateFieldsIndex(r._layer)),r}static hydrateFieldsIndex(e){return null===e?null:r(e)?e.getFieldsIndex():e.fieldsIndex?e.fieldsIndex:T.fromLayerJSON({datesInUnknownTimezone:e.datesInUnknownTimezone,fields:e.fields,timeInfo:e.timeInfo,editFieldsInfo:e.editFieldsInfo,dateFieldsTimeReference:e.dateFieldsTimeReference??{timeZone:"UTC",respectsDaylightSaving:!1}})}repurposeFromGraphicLikeObject(e,t,i=null){null===t&&(t={}),this.attributes=t,this._geometry=e??null,this._layer=i,this._layer?this._fieldTypesFixed=!1:this._fieldTypesFixed=!0}castToText(e=!1){!1===this._fieldTypesFixed&&this._fixFieldTypes();const t=n(this.attributes,{useNumbersForDates:e});return'{"geometry":'+(null===this.geometry()?"null":a(this.geometry()))+',"attributes":'+t+"}"}_fixFieldTypes(){if(this._fieldsToFixDataTypes&&this._fieldsToFixDataTypes?.length>0)return this._fixAllFields(this._fieldsToFixDataTypes),void(this._fieldTypesFixed=!0);const e=[],t=this._layer.fields;for(let i=0;i<(t?.length??0);i++){const s=t[i],{name:r,type:n}=s;switch(n){case"date":case"esriFieldTypeDate":e.push({field:r,dataType:"date"});break;case"date-only":case"esriFieldTypeDateOnly":e.push({field:r,dataType:"date-only"});break;case"time-only":case"esriFieldTypeTimeOnly":e.push({field:r,dataType:"time-only"});break;case"timestamp-offset":case"esriFieldTypeTimestampOffset":e.push({field:r,dataType:"timestamp-offset"});break;case"geometry":case"esriFieldTypeGeometry":e.push({field:r,dataType:"geometry"})}}this._fieldsToFixDataTypes=e,e.length>0&&this._fixAllFields(e),this._fieldTypesFixed=!0}isUnknownDateTimeField(e){return"unknown"===this.fieldsIndex?.getTimeZone(e)}_fixAllFields(e){this.attributes={...this.attributes};const t=this.contextTimeZone??"system";for(let i=0;i<e.length;i++){const s=e[i].field,r=e[i].dataType;let n=this.attributes[s];if(void 0===n){for(const e in this.attributes)if(e.toLowerCase()===s.toLowerCase()){n=this.attributes[e],this.attributes[e]=w(n,r,this.isUnknownDateTimeField(e)?"unknown":t);break}}else null!==n&&(this.attributes[s]=w(n,r,this.isUnknownDateTimeField(s)?"unknown":t))}}geometry(){return null===this._geometry||this._geometry instanceof h||(this._optimizedGeomDefinition?(this._geometry=p(_(this._geometry,this._optimizedGeomDefinition.geometryType,this._optimizedGeomDefinition.hasZ,this._optimizedGeomDefinition.hasM)),this._geometry.spatialReference=this._optimizedGeomDefinition.spatialReference):this._geometry=p(this._geometry)),this._geometry}field(e){this._fieldTypesFixed||this._fixFieldTypes();const t=this.attributes[e];if(void 0!==t)return t;const i=e.toLowerCase();for(const s in this.attributes)if(s.toLowerCase()===i)return this.attributes[s];if(this._hasFieldDefinition(i))return null;throw new s("FieldNotFound",null,{key:e})}_hasFieldDefinition(e){if(null===this._layer)return!1;for(let t=0;t<this._layer.fields.length;t++){if(this._layer.fields[t].name.toLowerCase()===e)return!0}return!1}setField(t,i){if(this.immutable)throw new s("Immutable",null);if(i instanceof Date&&(i=this.isUnknownDateTimeField(t)?e.unknownDateJSToArcadeDate(i):e.dateJSToArcadeDate(i)),!1===o(i))throw new s("TypeNotAllowedInFeature",null);const r=t.toLowerCase();if(void 0===this.attributes[t]){for(const e in this.attributes)if(e.toLowerCase()===r)return void(this.attributes[e]=i);this.attributes[t]=i}else this.attributes[t]=i}hasField(e){const t=e.toLowerCase();if(void 0!==this.attributes[e])return!0;for(const i in this.attributes)if(i.toLowerCase()===t)return!0;return!!this._hasFieldDefinition(t)}keys(){const e=[],t=new Set;for(const i in this.attributes)e.push(i),t.add(i.toLowerCase());if(null!==this._layer)for(let i=0;i<this._layer.fields.length;i++){const s=this._layer.fields[i];t.has(s.name.toLowerCase())||e.push(s.name)}return e.sort((e,t)=>e.toLowerCase()<t.toLowerCase()?-1:1)}isEmpty(){for(const e in this.attributes)return!1;return!(null!=this._layer&&this._layer.fields.length>0)&&null==this.geometry()}static parseAttributesFromDictionary(e){const t={};for(const i in e.attributes){const r=e.attributes[i];if(!o(r))throw new s("InvalidParameter",null);t[i]=r}return t}static fromJson(e,t){let i=null;null!==e.geometry&&void 0!==e.geometry&&(i=p(e.geometry));const r={};if(null!==e.attributes&&void 0!==e.attributes)for(const n in e.attributes){const t=e.attributes[n];if(null===t)r[n]=t;else{if(!(g(t)||F(t)||b(t)||l(t)||d(t)||u(t)))throw new s("InvalidParameter",null);r[n]=t}}return I.createFromGraphicLikeObject(i,r,null,t??null)}fullSchema(){return this._layer}gdbVersion(){if(null===this._layer)return"";const e=this._layer.gdbVersion;return void 0===e?"":""===e&&this._layer.capabilities?.isVersioned?"SDE.DEFAULT":e}castAsJson(){const e={attributes:{},geometry:this.geometry()?.toJSON()??null};for(const t in this.attributes){const i=this.attributes[t];void 0!==i&&(e.attributes[t]=m(i))}return e}async castAsJsonAsync(){return this.castAsJson()}}t(I);export{I as Feature,w as convertAttributeToArcadeValue,D as getArcadeVariableForField};
|
package/arcade/Pixel.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{toSymbolId as r}from"./arcadeEnvironment.js";import{ArcadeExecutionError as e}from"./executionError.js";import{getArcadeVariableForField as t,convertAttributeToArcadeValue as s}from"./Feature.js";import i from"./ImmutableArray.js";import{
|
|
2
|
+
import{toSymbolId as r}from"./arcadeEnvironment.js";import{ArcadeExecutionError as e}from"./executionError.js";import{getArcadeVariableForField as t,convertAttributeToArcadeValue as s}from"./Feature.js";import i from"./ImmutableArray.js";import{b as a,c as n}from"../chunks/languageUtils.js";import o from"../core/Logger.js";import{getOrCreateMapValue as m}from"../core/MapUtils.js";import{isImageryGraphicOrigin as l}from"../graphic/isImageryGraphicOrigin.js";import{isImageryTileGraphicOrigin as p}from"../graphic/isImageryTileGraphicOrigin.js";import{isRasterPixelValueField as u}from"../layers/support/fieldUtils.js";import{rasterFieldPrefix as f}from"../layers/support/rasterFieldUtils.js";import{isDate as c}from"../support/guards.js";const g=()=>o.getLogger("esri.arcade.Pixel");function h(r){return r.rasterFields.filter(r=>r.name.startsWith(f))}class d{constructor(e,t,s){this._graphic=t,this._timeZone=s,this.arcadeDeclaredClass="esri.arcade.Pixel",this._values=new Map,this._fields=new Map(e.map(e=>[r(e.name),e]).sort((r,e)=>r[0]<e[0]?-1:1))}static fromImageryGraphic(r,t){if(!l(r.origin)&&!p(r.origin))throw new e("InvalidParameter",null);return new d(h(r.origin.layer),r,t)}static getDeclaredMembers(r){return h(r).map(r=>u(r.name)&&"string"===r.type?{name:r.name,type:"array",elementType:{type:"text"}}:t(r)).filter(r=>null!=r)}keys(){return Array.from(this._fields.values()).map(r=>r.name)}hasField(e){return this._fields.has(r(e))}field(t){const n=this._fields.get(r(t));if(null==n)throw new e("FieldNotFound",null,{key:t});return m(this._values,n.name,()=>{const r=this._graphic.getAttribute(n.name);return null==r?null:u(n.name)&&"string"==typeof r?new i(r.split(/,\s*|\s+/)):c(r)||a(r)?s(r,n.type,this._timeZone??"system"):(g().warn(`Unsupported type for attribute: ${n.name}. Ignoring value.`),null)})}isEmpty(){return this._fields.size<=0}castToText(r=!1){const e={};for(const t of this._fields.values())e[t.name]=this.field(t.name);return n(e,{useNumbersForDates:r})}}export{d as Pixel};
|
package/arcade/deepClone.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{ArcadeModule as a}from"./ArcadeModule.js";import{e,
|
|
2
|
+
import{ArcadeModule as a}from"./ArcadeModule.js";import{e,b as r,h as s,j as o,k as t,l,m as n,n as c,o as d,i as m}from"../chunks/languageUtils.js";import{isArray as u}from"../support/guards.js";function i(a){p=a}let p;function f(i){return null===i?null:e(i)?i.clone():r(i)?i:s(i)?i.clone():o(i)?i.toArray().map(a=>f(a)):u(i)?i.map(a=>f(a)):t(i)?p.createFromArcadeFeature(i):l(i)||n(i)?i:c(i)||"esri.arcade.Attachment"===i?.declaredClass?i.deepClone():("esri.arcade.Portal"===i?.declaredClass||d(i)||i instanceof a||m(i),i)}export{i as configureDeepClone,f as deepClone};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import e from"../../../Graphic.js";import{neverAbortedSignal as t}from"../../arcadeEnvironment.js";import a from"./cache.js";import{throwIfCancelled as s,FeatureSetError as r}from"./errorsupport.js";import{QueryIterator as i}from"./FeatureSetIterator.js";import{layerGeometryEsriConstants as n,esriFieldToJson as l,layerGeometryEsriRestConstants as o}from"./shared.js";import{max as u,min as h,sum as p,variance as c,stdev as d,mean as m,distinct as y}from"./stats.js";import{invokeRemoteGeometryOp as f}from"../../geometry/operatorsWorkerConnection.js";import{cacheAsync as _}from"../../../core/iteratorUtils.js";import g from"../../../core/sql/WhereClause.js";import b from"../../../geometry/SpatialReference.js";import{fromJSON as T}from"../../../geometry/support/jsonUtils.js";import F from"../../../layers/support/FieldsIndex.js";function I(e){switch(e){case"esriSpatialRelIntersects":return{spatialRelationship:"intersects",relationParameter:null};case"esriSpatialRelContains":return{spatialRelationship:"contains",relationParameter:null};case"esriSpatialRelOverlaps":return{spatialRelationship:"overlaps",relationParameter:null};case"esriSpatialRelWithin":return{spatialRelationship:"within",relationParameter:null};case"esriSpatialRelTouches":return{spatialRelationship:"touches",relationParameter:null};case"esriSpatialRelCrosses":return{spatialRelationship:"crosses",relationParameter:null};case"esriSpatialRelEnvelopeIntersects":return{spatialRelationship:"envelope-intersects",relationParameter:null};default:if(e.includes("esriSpatialRelRelation"))return{spatialRelationship:"relation",relationParameter:e.split(":")[1]};throw new r("NeverReach")}}function w(e,t){for(const a of e)null!=a.geometry&&(a.geometry.spatialReference??=t)}const S=Object.freeze({ordered:!0,filterApplied:!0,spatialFilterApplied:!0,features:Object.freeze({next:()=>Promise.resolve({done:!0,value:void 0}),[Symbol.asyncIterator](){return this}})});class R{constructor(){this.declaredRootClass="esri.arcade.featureset.support.FeatureSet",this._parent=null,this._maxProcessing=200,this._maxQuery=500,this._totalCount=-1,this._databaseType=7,this._databaseTypeProbed=null,this._loadPromise=null,this._allFeatures=null,this._fieldsIndex=null,this.typeIdField=null,this.types=null,this.subtypeField=null,this.subtypes=null,this.fields=null,this.geometryType="",this.objectIdField="",this.globalIdField="",this.spatialReference=null,this.hasM=!1,this.hasZ=!1}_ensureLoaded(){return this.load()}load(){return null===this._loadPromise&&(this._loadPromise=this.loadImpl()),this._loadPromise}async loadImpl(){return await(this._parent?.load()),this._initialiseFeatureSet(),this}_initialiseFeatureSet(){null!==this._parent?(this.fields=this._parent.fields.slice(),this.geometryType=this._parent.geometryType,this.objectIdField=this._parent.objectIdField,this.globalIdField=this._parent.globalIdField,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField=this._parent.typeIdField,this.types=this._parent.types,this.subtypeField=this._parent.subtypeField,this.subtypes=this._parent.subtypes):(this.fields=[],this.typeIdField="",this.subtypeField="",this.objectIdField="",this.globalIdField="",this.spatialReference=new b({wkid:4326}),this.geometryType=n.point)}getField(e,t){return e=e.toLowerCase(),(t||this.fields).find(t=>t.name.toLowerCase()===e)}getFieldsIndex(){return null===this._fieldsIndex&&(this._fieldsIndex=F.fromLayer({timeInfo:this.timeInfo,editFieldsInfo:this.editFieldsInfo,dateFieldsTimeZone:this.dateFieldsTimeZone,datesInUnknownTimezone:this.datesInUnknownTimezone,fields:this.fields})),this._fieldsIndex}_maxProcessingRate(){return null!==this._parent?Math.min(this._maxProcessing,this._parent._maxProcessingRate()):Math.min(this._maxProcessing,this._maxQueryRate())}_maxQueryRate(){return null!==this._parent?Math.max(this._maxQuery,this._parent._maxQueryRate()):this._maxQuery}nativeCapabilities(){return this._parent.nativeCapabilities()}get _hasCachedFeatures(){return null!=this._allFeatures}async queryAll(e){null==this._allFeatures&&(this._allFeatures=this._queryAll().then(e=>_(e)));const a=(await this._allFeatures)();return null==e||e===t?a:async function*(){for await(const t of a)s(e),yield t}()}async databaseType(){if(7===this._databaseType){if(null!==a.applicationCache){const e=a.applicationCache.getDatabaseType(this._cacheableFeatureSetSourceKey());if(null!==e)return e}if(null!==this._databaseTypeProbed)return this._databaseTypeProbed;try{this._databaseTypeProbed=this._getDatabaseTypeImpl(),null!==a.applicationCache&&a.applicationCache.setDatabaseType(this._cacheableFeatureSetSourceKey(),this._databaseTypeProbed)}catch(e){throw null!==a.applicationCache&&a.applicationCache.clearDatabaseType(this._cacheableFeatureSetSourceKey()),e}return this._databaseTypeProbed}return this._databaseType}async _getDatabaseTypeImpl(){const e=[{dbType:2,probeSql:"(CAST( '2015-01-01' as DATETIME) = CAST( '2015-01-01' as DATETIME)) AND OBJECTID<0"},{dbType:3,probeSql:"(TO_DATE('2003-11-18','YYYY-MM-DD') = TO_DATE('2003-11-18','YYYY-MM-DD')) AND OBJECTID<0"},{dbType:1,probeSql:"(date '2015-01-01 10:10:10' = date '2015-01-01 10:10:10') AND OBJECTID<0"}];for(const t of e){if(!0===await this._runDatabaseProbe(t.probeSql))return t.dbType}return 1}_cacheableFeatureSetSourceKey(){return"MUSTBESET"}async _runDatabaseProbe(e){if(null!==this._parent)return this._parent._runDatabaseProbe(e);throw new r("NotImplemented")}isTable(){return this._parent?.isTable()??!1}async first(t){if(this._hasCachedFeatures)return this.iterator(t).next();const a=await this.query({limit:1,abortSignal:t});for await(const s of a.features)if(s.length>0)return e.fromJSON(s[0]);return null}async isEmpty(e){return this._totalCount>=0?0===this._totalCount:null==await this.first(e)}async calculateStatistic(e,t,a,s){await this._ensureLoaded();let r=await this.queryStat({stat:e,field:t,limit:a,abortSignal:s});return!1===r.calculated&&(r=await this._manualStat(e,t,a,s)),r.result}async _manualStat(e,t,a,s){let r=null;switch(e.toLowerCase()){case"count":{if(this._totalCount>=0)return{calculated:!0,result:this._totalCount};const e=await this.queryAll(s);let t=0;for await(const a of e)t+=a.length;return this._totalCount=t,{calculated:!0,result:t}}case"distinct":return r=await y(this,t,a,s),{calculated:!0,result:r};case"avg":case"mean":return r=await m(this,t,s),{calculated:!0,result:r};case"stdev":return r=await d(this,t,s),{calculated:!0,result:r};case"variance":return r=await c(this,t,s),{calculated:!0,result:r};case"sum":return r=await p(this,t,s),{calculated:!0,result:r};case"min":return r=await h(this,t,s),{calculated:!0,result:r};case"max":return r=await u(this,t,s),{calculated:!0,result:r};default:return{calculated:!0,result:0}}}iterator(e){return new i(this,e)}async sumArea(e,t,a){let s=0;for await(const r of await this.queryAll(a))for(const a of r)null!=a.geometry&&(s+=null!=t?await f("geodeticArea",[a.geometry,e,t]):await f("area",[a.geometry,e]));return s}async sumLength(e,t,a){let s=0;for await(const r of await this.queryAll(a))for(const a of r)null!=a.geometry&&(s+=null!=t?await f("geodeticLength",[a.geometry,e,t]):await f("length",[a.geometry,e]));return s}async count(e){return await this.load(),this.calculateStatistic("count",g.create("1",{fieldsIndex:this.getFieldsIndex(),timeZone:this.dateFieldsTimeZoneDefaultUTC}),-1,e??t)}castToText(e=!1){return"object, FeatureSet"}queryAttachments(e,t,a,s,r){return this._parent.queryAttachments(e,t,a,s,r)}serviceUrl(){return this._parent.serviceUrl()}subtypeMetadata(){return this.subtypeField&&this.subtypes?{subtypeField:this.subtypeField,subtypes:this.subtypes?this.subtypes.map(e=>({name:e.name,code:e.code})):[]}:this.typeIdField?{subtypeField:this.typeIdField,subtypes:this.types?this.types.map(e=>({name:e.name,code:e.id})):[]}:null}relationshipMetadata(){return this._parent.relationshipMetadata()}get gdbVersion(){return this._parent?this._parent.gdbVersion:""}schema(){const e=[];for(const t of this.fields)e.push(l(t));return{objectIdField:this.objectIdField,globalIdField:this.globalIdField,geometryType:void 0===o[this.geometryType]?"esriGeometryNull":o[this.geometryType],fields:e}}async convertToText(e,t){if("schema"===e)return await this._ensureLoaded(),JSON.stringify(this.schema());if("featureset"===e){await this._ensureLoaded();const e=[];for await(const a of await this.queryAll(t))for(const t of a){const a={geometry:t.geometry??null,attributes:t.attributes};if(null!==a.geometry&&a.geometry.spatialReference){const{spatialReference:e,...t}=a.geometry;a.geometry=t}e.push(a)}return JSON.stringify({...this.schema(),features:e,spatialReference:this.spatialReference.toJSON()})}return this.castToText()}getFeatureByObjectId(e,t){return this._parent.getFeatureByObjectId(e,t)}getOwningSystemUrl(){return this._parent.getOwningSystemUrl()}getIdentityUser(){return this._parent.getIdentityUser()}getRootFeatureSet(){return this._parent.getRootFeatureSet()}getDataSourceFeatureSet(){return null!==this._parent?this._parent.getDataSourceFeatureSet():this}castAsJson(e=null){return"keeptype"===e?.featureset?this:"none"===e?.featureset?null:{type:"FeatureSet"}}async castAsJsonAsync(e=null,t=null){if("keeptype"===t?.featureset)return this;if("schema"===t?.featureset)return await this._ensureLoaded(),JSON.parse(JSON.stringify(this.schema()));if("none"===t?.featureset)return null;await this._ensureLoaded();const a=[];for await(const s of await this.queryAll(e))for(const e of s){const s={geometry:e.geometry?!0===t?.keepGeometryType?T(e.geometry):e.geometry:null,attributes:e.attributes};if(null!==s.geometry&&s.geometry.spatialReference&&!0!==t?.keepGeometryType){delete s.geometry.spatialReference;const{spatialReference:e,...t}=s.geometry;s.geometry=t}a.push(s)}return{...this.schema(),features:a,spatialReference:!0===t?.keepGeometryType?this.spatialReference:this.spatialReference?.toJSON()}}fieldTimeZone(e){return this.getFieldsIndex().getTimeZone(e)}get preferredTimeZone(){return this._parent?.preferredTimeZone??null}get dateFieldsTimeZone(){return this._parent?.dateFieldsTimeZone??null}get dateFieldsTimeZoneDefaultUTC(){return this.datesInUnknownTimezone?"unknown":this.dateFieldsTimeZone||"UTC"}get datesInUnknownTimezone(){return this._parent.datesInUnknownTimezone}get editFieldsInfo(){return this._parent?.editFieldsInfo??null}get timeInfo(){return this._parent?.timeInfo??null}getFeatureSetInfo(){return this._parent?this._parent.getFeatureSetInfo():Promise.resolve(null)}}class C extends R{constructor(){super(...arguments),this._parent=null}getRootFeatureSet(){return this}}export{R as FeatureSet,C as RootFeatureSet,w as assignSpatialReferenceOnFeatures,S as emptyFeaturesResult,I as getSpatialFilterRelationRestQueryParams};
|
|
2
|
+
import e from"../../../Graphic.js";import{neverAbortedSignal as t}from"../../arcadeEnvironment.js";import a from"./cache.js";import{throwIfCancelled as s,FeatureSetError as i}from"./errorsupport.js";import{QueryIterator as r}from"./FeatureSetIterator.js";import{layerGeometryEsriConstants as n,esriFieldToJson as l,layerGeometryEsriRestConstants as o}from"./shared.js";import{max as u,min as h,sum as c,variance as p,stdev as d,mean as m,distinct as y}from"./stats.js";import{invokeRemoteGeometryOp as f}from"../../geometry/operatorsWorkerConnection.js";import{cacheAsync as _}from"../../../core/iteratorUtils.js";import b from"../../../core/sql/WhereClause.js";import g from"../../../geometry/SpatialReference.js";import F from"../../../layers/support/FieldsIndex.js";function T(e){switch(e){case"esriSpatialRelIntersects":return{spatialRelationship:"intersects",relationParameter:null};case"esriSpatialRelContains":return{spatialRelationship:"contains",relationParameter:null};case"esriSpatialRelOverlaps":return{spatialRelationship:"overlaps",relationParameter:null};case"esriSpatialRelWithin":return{spatialRelationship:"within",relationParameter:null};case"esriSpatialRelTouches":return{spatialRelationship:"touches",relationParameter:null};case"esriSpatialRelCrosses":return{spatialRelationship:"crosses",relationParameter:null};case"esriSpatialRelEnvelopeIntersects":return{spatialRelationship:"envelope-intersects",relationParameter:null};default:if(e.includes("esriSpatialRelRelation"))return{spatialRelationship:"relation",relationParameter:e.split(":")[1]};throw new i("NeverReach")}}function I(e,t){for(const a of e)null!=a.geometry&&(a.geometry.spatialReference??=t)}const w=Object.freeze({ordered:!0,filterApplied:!0,spatialFilterApplied:!0,features:Object.freeze({next:()=>Promise.resolve({done:!0,value:void 0}),[Symbol.asyncIterator](){return this}})});class S{constructor(){this.declaredRootClass="esri.arcade.featureset.support.FeatureSet",this._parent=null,this._maxProcessing=200,this._maxQuery=500,this._totalCount=-1,this._databaseType=7,this._databaseTypeProbed=null,this._loadPromise=null,this._allFeatures=null,this._fieldsIndex=null,this.typeIdField=null,this.types=null,this.subtypeField=null,this.subtypes=null,this.fields=null,this.geometryType="",this.objectIdField="",this.globalIdField="",this.spatialReference=null,this.hasM=!1,this.hasZ=!1}_ensureLoaded(){return this.load()}load(){return null===this._loadPromise&&(this._loadPromise=this.loadImpl()),this._loadPromise}async loadImpl(){return await(this._parent?.load()),this._initialiseFeatureSet(),this}_initialiseFeatureSet(){null!==this._parent?(this.fields=this._parent.fields.slice(),this.geometryType=this._parent.geometryType,this.objectIdField=this._parent.objectIdField,this.globalIdField=this._parent.globalIdField,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField=this._parent.typeIdField,this.types=this._parent.types,this.subtypeField=this._parent.subtypeField,this.subtypes=this._parent.subtypes):(this.fields=[],this.typeIdField="",this.subtypeField="",this.objectIdField="",this.globalIdField="",this.spatialReference=new g({wkid:4326}),this.geometryType=n.point)}getField(e,t){return e=e.toLowerCase(),(t||this.fields).find(t=>t.name.toLowerCase()===e)}getFieldsIndex(){return null===this._fieldsIndex&&(this._fieldsIndex=F.fromLayer({timeInfo:this.timeInfo,editFieldsInfo:this.editFieldsInfo,dateFieldsTimeZone:this.dateFieldsTimeZone,datesInUnknownTimezone:this.datesInUnknownTimezone,fields:this.fields})),this._fieldsIndex}_maxProcessingRate(){return null!==this._parent?Math.min(this._maxProcessing,this._parent._maxProcessingRate()):Math.min(this._maxProcessing,this._maxQueryRate())}_maxQueryRate(){return null!==this._parent?Math.max(this._maxQuery,this._parent._maxQueryRate()):this._maxQuery}nativeCapabilities(){return this._parent.nativeCapabilities()}get _hasCachedFeatures(){return null!=this._allFeatures}async queryAll(e){null==this._allFeatures&&(this._allFeatures=this._queryAll().then(e=>_(e)));const a=(await this._allFeatures)();return null==e||e===t?a:async function*(){for await(const t of a)s(e),yield t}()}async databaseType(){if(7===this._databaseType){if(null!==a.applicationCache){const e=a.applicationCache.getDatabaseType(this._cacheableFeatureSetSourceKey());if(null!==e)return e}if(null!==this._databaseTypeProbed)return this._databaseTypeProbed;try{this._databaseTypeProbed=this._getDatabaseTypeImpl(),null!==a.applicationCache&&a.applicationCache.setDatabaseType(this._cacheableFeatureSetSourceKey(),this._databaseTypeProbed)}catch(e){throw null!==a.applicationCache&&a.applicationCache.clearDatabaseType(this._cacheableFeatureSetSourceKey()),e}return this._databaseTypeProbed}return this._databaseType}async _getDatabaseTypeImpl(){const e=[{dbType:2,probeSql:"(CAST( '2015-01-01' as DATETIME) = CAST( '2015-01-01' as DATETIME)) AND OBJECTID<0"},{dbType:3,probeSql:"(TO_DATE('2003-11-18','YYYY-MM-DD') = TO_DATE('2003-11-18','YYYY-MM-DD')) AND OBJECTID<0"},{dbType:1,probeSql:"(date '2015-01-01 10:10:10' = date '2015-01-01 10:10:10') AND OBJECTID<0"}];for(const t of e){if(!0===await this._runDatabaseProbe(t.probeSql))return t.dbType}return 1}_cacheableFeatureSetSourceKey(){return"MUSTBESET"}async _runDatabaseProbe(e){if(null!==this._parent)return this._parent._runDatabaseProbe(e);throw new i("NotImplemented")}isTable(){return this._parent?.isTable()??!1}async first(t){if(this._hasCachedFeatures)return this.iterator(t).next();const a=await this.query({limit:1,abortSignal:t});for await(const s of a.features)if(s.length>0)return e.fromJSON(s[0]);return null}async isEmpty(e){return this._totalCount>=0?0===this._totalCount:null==await this.first(e)}async calculateStatistic(e,t,a,s){await this._ensureLoaded();let i=await this.queryStat({stat:e,field:t,limit:a,abortSignal:s});return!1===i.calculated&&(i=await this._manualStat(e,t,a,s)),i.result}async _manualStat(e,t,a,s){let i=null;switch(e.toLowerCase()){case"count":{if(this._totalCount>=0)return{calculated:!0,result:this._totalCount};const e=await this.queryAll(s);let t=0;for await(const a of e)t+=a.length;return this._totalCount=t,{calculated:!0,result:t}}case"distinct":return i=await y(this,t,a,s),{calculated:!0,result:i};case"avg":case"mean":return i=await m(this,t,s),{calculated:!0,result:i};case"stdev":return i=await d(this,t,s),{calculated:!0,result:i};case"variance":return i=await p(this,t,s),{calculated:!0,result:i};case"sum":return i=await c(this,t,s),{calculated:!0,result:i};case"min":return i=await h(this,t,s),{calculated:!0,result:i};case"max":return i=await u(this,t,s),{calculated:!0,result:i};default:return{calculated:!0,result:0}}}iterator(e){return new r(this,e)}async sumArea(e,t,a){let s=0;for await(const i of await this.queryAll(a))for(const a of i)null!=a.geometry&&(s+=null!=t?await f("geodeticArea",[a.geometry,e,t]):await f("area",[a.geometry,e]));return s}async sumLength(e,t,a){let s=0;for await(const i of await this.queryAll(a))for(const a of i)null!=a.geometry&&(s+=null!=t?await f("geodeticLength",[a.geometry,e,t]):await f("length",[a.geometry,e]));return s}async count(e){return await this.load(),this.calculateStatistic("count",b.create("1",{fieldsIndex:this.getFieldsIndex(),timeZone:this.dateFieldsTimeZoneDefaultUTC}),-1,e??t)}castToText(e=!1){return"object, FeatureSet"}queryAttachments(e,t,a,s,i){return this._parent.queryAttachments(e,t,a,s,i)}serviceUrl(){return this._parent.serviceUrl()}subtypeMetadata(){return this.subtypeField&&this.subtypes?{subtypeField:this.subtypeField,subtypes:this.subtypes?this.subtypes.map(e=>({name:e.name,code:e.code})):[]}:this.typeIdField?{subtypeField:this.typeIdField,subtypes:this.types?this.types.map(e=>({name:e.name,code:e.id})):[]}:null}relationshipMetadata(){return this._parent.relationshipMetadata()}get gdbVersion(){return this._parent?this._parent.gdbVersion:""}schema(){const e=[];for(const t of this.fields)e.push(l(t));return{objectIdField:this.objectIdField,globalIdField:this.globalIdField,geometryType:void 0===o[this.geometryType]?"esriGeometryNull":o[this.geometryType],fields:e}}async convertToText(e,t){return"schema"===e?(await this._ensureLoaded(),JSON.stringify(this.schema())):"featureset"===e?JSON.stringify(await this.castAsJsonAsync(t)):this.castToText()}getFeatureByObjectId(e,t){return this._parent.getFeatureByObjectId(e,t)}getOwningSystemUrl(){return this._parent.getOwningSystemUrl()}getIdentityUser(){return this._parent.getIdentityUser()}getRootFeatureSet(){return this._parent.getRootFeatureSet()}getDataSourceFeatureSet(){return null!==this._parent?this._parent.getDataSourceFeatureSet():this}castAsJson(){return{type:"FeatureSet"}}async castAsJsonAsync(e=null){await this._ensureLoaded();const t=[];for await(const a of await this.queryAll(e))for(const e of a){const a=e.attributes;let s=null;if(null!=e.geometry)if(e.geometry.spatialReference){const{spatialReference:t,...a}=e.geometry;s=a}else s=e.geometry;t.push({geometry:s,attributes:a})}return{...this.schema(),features:t,spatialReference:this.spatialReference?.toJSON()??null}}fieldTimeZone(e){return this.getFieldsIndex().getTimeZone(e)}get preferredTimeZone(){return this._parent?.preferredTimeZone??null}get dateFieldsTimeZone(){return this._parent?.dateFieldsTimeZone??null}get dateFieldsTimeZoneDefaultUTC(){return this.datesInUnknownTimezone?"unknown":this.dateFieldsTimeZone||"UTC"}get datesInUnknownTimezone(){return this._parent.datesInUnknownTimezone}get editFieldsInfo(){return this._parent?.editFieldsInfo??null}get timeInfo(){return this._parent?.timeInfo??null}getFeatureSetInfo(){return this._parent?this._parent.getFeatureSetInfo():Promise.resolve(null)}}class R extends S{constructor(){super(...arguments),this._parent=null}getRootFeatureSet(){return this}}export{S as FeatureSet,R as RootFeatureSet,I as assignSpatialReferenceOnFeatures,w as emptyFeaturesResult,T as getSpatialFilterRelationRestQueryParams};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{getGeometryKeys as e,getNestedOptionalValue as t}from"../containerUtils.js";import n from"../Dictionary.js";import{ArcadeExecutionError as r}from"../executionError.js";import{Feature as a}from"../Feature.js";import i from"../ImmutablePointArray.js";import{B as l,j as o,J as s,a0 as f,H as c,k as u,v as m,n as p,h as w,s as h,e as R,g,f as y,i as d,
|
|
2
|
+
import{getGeometryKeys as e,getNestedOptionalValue as t}from"../containerUtils.js";import n from"../Dictionary.js";import{ArcadeExecutionError as r}from"../executionError.js";import{Feature as a}from"../Feature.js";import i from"../ImmutablePointArray.js";import{B as l,j as o,J as s,a0 as f,H as c,k as u,v as m,n as p,h as w,s as h,e as R,g,f as y,i as d,b as P,P as v,F as I,E as b,y as O,w as j}from"../../chunks/languageUtils.js";import{angle2D as N,angleBetween2D as S,bearing2D as x,bearingBetween2D as J}from"./centroid.js";import{constructGeometryFromDictionary as F}from"../geometry/constructors.js";import k from"../../geometry/Extent.js";import Z from"../../geometry/Geometry.js";import z from"../../geometry/Multipoint.js";import W from"../../geometry/Point.js";import A from"../../geometry/Polygon.js";import q from"../../geometry/Polyline.js";import{isClockwise as L}from"../../geometry/support/coordsUtils.js";import{fromJSON as M}from"../../geometry/support/jsonUtils.js";import{isArray as D,isString as G,isNumber as U,isBoolean as C}from"../../support/guards.js";function E(E,_){E.ringisclockwise=function(e,t){return _(e,t,(e,n,a)=>{l(a,1,1,t);let s=[];if(null===a[0])return!1;if(D(a[0]))for(const i of a[0]){if(!(i instanceof W))throw new r("InvalidParameter",t);s.push(i.hasZ?i.hasM?[i.x,i.y,i.z,i.m]:[i.x,i.y,i.z]:[i.x,i.y])}else if(a[0]instanceof i)s=a[0]._elements;else{if(!o(a[0]))throw new r("InvalidParameter",t);for(const e of a[0].toArray()){if(!(e instanceof W))throw new r("InvalidParameter",t);s.push(e.hasZ?e.hasM?[e.x,e.y,e.z,e.m]:[e.x,e.y,e.z]:[e.x,e.y])}}return!(s.length<3)&&L(s)})},E.polygon=function(e,t){return _(e,t,(a,i,o)=>{let c;if(l(o,1,1,t),o[0]instanceof n){const t=s(F(o[0],e.spatialReference,"polygon"),e.spatialReference);if(null==t)return null;c=t}else if(o[0]instanceof A)c=M(o[0].toJSON());else{const t=JSON.parse(o[0]);t&&!t.spatialReference&&(t.spatialReference=e.spatialReference),c=s(new A(t),e.spatialReference)}if(null!==c&&!1===c.spatialReference.equals(e.spatialReference))throw new r("WrongSpatialReference",t);return f(c)})},E.polyline=function(e,t){return _(e,t,(a,i,o)=>{let c;if(l(o,1,1,t),o[0]instanceof n){const t=s(F(o[0],e.spatialReference,"polyline"),e.spatialReference);if(null==t)return null;c=t}else if(o[0]instanceof q)c=M(o[0].toJSON());else{const t=JSON.parse(o[0]);t&&!t.spatialReference&&(t.spatialReference=e.spatialReference),c=s(new q(t),e.spatialReference)}if(null!==c&&!1===c.spatialReference.equals(e.spatialReference))throw new r("WrongSpatialReference",t);return f(c)})},E.point=function(e,t){return _(e,t,(a,i,o)=>{let c;if(l(o,1,1,t),o[0]instanceof n){const t=s(F(o[0],e.spatialReference,"point"),e.spatialReference);if(null==t)return null;c=t}else if(o[0]instanceof W)c=M(o[0].toJSON());else{const t=JSON.parse(o[0]);t&&!t.spatialReference&&(t.spatialReference=e.spatialReference),c=s(new W(t),e.spatialReference)}if(null!==c&&!1===c.spatialReference.equals(e.spatialReference))throw new r("WrongSpatialReference",t);return f(c)})},E.multipoint=function(e,t){return _(e,t,(a,i,o)=>{let c;if(l(o,1,1,t),o[0]instanceof n){const t=s(F(o[0],e.spatialReference,"multipoint"),e.spatialReference);if(null==t)return null;c=t}else if(o[0]instanceof z)c=M(o[0].toJSON());else{const t=JSON.parse(o[0]);t&&!t.spatialReference&&(t.spatialReference=e.spatialReference),c=s(new z(t),e.spatialReference)}if(null!==c&&!1===c.spatialReference.equals(e.spatialReference))throw new r("WrongSpatialReference",t);return f(c)})},E.extent=function(e,t){return _(e,t,(a,i,o)=>{o=c(o),l(o,1,1,t);let u=null;if(o[0]instanceof n)u=s(F(o[0],e.spatialReference),e.spatialReference);else if(o[0]instanceof W){const e={xmin:o[0].x,ymin:o[0].y,xmax:o[0].x,ymax:o[0].y,spatialReference:o[0].spatialReference.toJSON()},t=o[0];t.hasZ&&(e.zmin=t.z,e.zmax=t.z),t.hasM&&(e.mmin=t.m,e.mmax=t.m),u=M(e)}else if(o[0]instanceof A)u=M(o[0].extent?.toJSON());else if(o[0]instanceof q)u=M(o[0].extent?.toJSON());else if(o[0]instanceof z)u=M(o[0].extent?.toJSON());else if(o[0]instanceof k)u=M(o[0].toJSON());else{const t=JSON.parse(o[0]);t&&!t.spatialReference&&(t.spatialReference=e.spatialReference),u=s(new k(t),e.spatialReference)}if(null!==u&&!1===u.spatialReference.equals(e.spatialReference))throw new r("WrongSpatialReference",t);return f(u)})},E.geometry=function(e,t){return _(e,t,(a,i,o)=>{l(o,1,1,t);let c=null;if(null===o[0])return null;if(u(o[0]))c=s(o[0].geometry(),e.spatialReference);else if(o[0]instanceof n)c=s(F(o[0],e.spatialReference),e.spatialReference);else{const t=JSON.parse(o[0]);t&&!t.spatialReference&&(t.spatialReference=e.spatialReference),c=s(M(t),e.spatialReference)}if(null!==c&&!1===c.spatialReference.equals(e.spatialReference))throw new r("WrongSpatialReference",t);return f(c)})},E.setgeometry=function(e,t){return _(e,t,(e,n,a)=>{if(l(a,2,2,t),!u(a[0]))throw new r("InvalidParameter",t);if(!0===a[0].immutable)throw new r("Immutable",t);if(!(a[1]instanceof Z||null===a[1]))throw new r("InvalidParameter",t);return a[0]._geometry=a[1],m})},E.feature=function(e,t){return _(e,t,(i,l,o)=>{if(0===o.length)throw new r("WrongNumberOfParameters",t);let f;if(1===o.length)if(G(o[0]))f=a.fromJson(JSON.parse(o[0]),e.timeZone);else if(u(o[0]))f=a.createFromArcadeFeature(o[0]);else if(o[0]instanceof Z)f=a.createFromGraphicLikeObject(o[0],null,null,e.timeZone);else{if(!(o[0]instanceof n))throw new r("InvalidParameter",t);{const n=o[0].hasField("geometry")?o[0].field("geometry"):null,i=o[0].hasField("attributes")?o[0].field("attributes"):null;let l,s;if(p(n))l=F(n,e.spatialReference);else{if(null!=n&&!w(n))throw new r("InvalidParameter",t);l=n}if(p(i))s=a.parseAttributesFromDictionary(i);else{if(null!=i)throw new r("InvalidParameter",t);s=null}f=a.createFromGraphicLikeObject(l,s,null,e.timeZone)}}else if(2===o.length){let i=null,l=null;if(null!==o[0])if(o[0]instanceof Z)i=o[0];else{if(!(o[0]instanceof n))throw new r("InvalidParameter",t);i=F(o[0],e.spatialReference)}if(null!==o[1]){if(!(o[1]instanceof n))throw new r("InvalidParameter",t);l=a.parseAttributesFromDictionary(o[1])}f=a.createFromGraphicLikeObject(i,l,null,e.timeZone)}else{let i=null;const l={};if(null!==o[0])if(o[0]instanceof Z)i=o[0];else{if(!(o[0]instanceof n))throw new r("InvalidParameter",t);i=F(o[0],e.spatialReference)}for(let e=1;e<o.length;e+=2){const n=h(o[e]),a=o[e+1];if(!(null==a||G(a)||isNaN(a)||R(a)||U(a)||g(a)||y(a)||C(a)))throw new r("InvalidParameter",t);if(d(a)||!1===P(a))throw new r("InvalidParameter",t);l[n]=a===m?null:a}f=a.createFromGraphicLikeObject(i,l,null,e.timeZone)}return f._geometry=s(f.geometry(),e.spatialReference),f.immutable=!1,f})},E.dictionary=function(e,t){return _(e,t,(a,i,l)=>{if(0===l.length||1===l.length&&null===l[0]){const e=new n;return e.immutable=!1,e}if(1===l.length&&G(l[0]))try{const t=JSON.parse(l[0]),r=n.convertObjectToArcadeDictionary(t,v(e),!1);return r.immutable=!1,r}catch(c){throw new r("InvalidParameter",t)}if(1===l.length&&l[0]instanceof Z)try{const t=l[0].toJSON();t.hasZ=!0===l[0].hasZ,t.hasM=!0===l[0].hasM;const r=n.convertObjectToArcadeDictionary(t,v(e),!1);return r.immutable=!1,r}catch(c){throw new r("InvalidParameter",t)}if(1===l.length&&u(l[0]))try{const e=new n;e.immutable=!1,e.setField("geometry",l[0].geometry());const t=new n;t.immutable=!1,e.setField("attributes",t);for(const n of l[0].keys())t.setField(n,l[0].field(n));return e}catch(c){throw new r("InvalidParameter",t)}if(1===l.length&&(p(l[0])||I(l[0])||b(l[0])))try{const e=new n;e.immutable=!1;for(const t of l[0].keys())e.setField(t,l[0].field(t));return e}catch(c){throw new r("InvalidParameter",t)}if(2===l.length&&l[0]instanceof n&&C(l[1]))try{if(!(!0===l[1])){const e=new n;e.immutable=!1;for(const t of l[0].keys())e.setField(t,l[0].field(t));return e}return l[0].deepClone()}catch(c){throw new r("InvalidParameter",t)}if(l.length%2!=0)throw new r("WrongNumberOfParameters",t);const s=Object.create(null);for(let e=0;e<l.length;e+=2){const n=h(l[e]),a=l[e+1];if(!(null==a||G(a)||isNaN(a)||R(a)||U(a)||C(a)||y(a)||g(a)||D(a)||o(a)))throw new r("InvalidParameter",t);if(d(a))throw new r("InvalidParameter",t);s[n]=a===m?null:a}const f=new n(s);return f.immutable=!1,f})},E.haskey=function(t,a){return _(t,a,(t,i,o)=>{l(o,2,2,a);const s=h(o[1]);if(O(o[0])||o[0]instanceof n)return o[0].hasField(s);if(o[0]instanceof Z){const t=s.toLowerCase();for(const n of e(o[0]))if(n.toLowerCase()===t)return!0;return!1}throw new r("InvalidParameter",a)})},E.hasvalue=function(e,n){return _(e,n,(e,r,a)=>(l(a,2,2,n),null!=t(a[0],a[1])))},E.indexof=function(e,t){return _(e,t,(e,n,a)=>{l(a,2,2,t);const i=a[1];if(D(a[0])){for(let e=0;e<a[0].length;e++)if(j(i,a[0][e]))return e;return-1}if(o(a[0])){const e=a[0].length();for(let t=0;t<e;t++)if(j(i,a[0].get(t)))return t;return-1}throw new r("InvalidParameter",t)})},E.angle=function(e,t){return _(e,t,(e,n,a)=>{if(a=c(a),l(a,2,3,t),!(a[0]instanceof W))throw new r("InvalidParameter",t);if(!(a[1]instanceof W))throw new r("InvalidParameter",t);if(a.length>2&&!(a[2]instanceof W))throw new r("InvalidParameter",t);return 2===a.length?N(a[0],a[1]):S(a[0],a[1],a[2])})},E.bearing=function(e,t){return _(e,t,(e,n,a)=>{if(a=c(a),l(a,2,3,t),!(a[0]instanceof W))throw new r("InvalidParameter",t);if(!(a[1]instanceof W))throw new r("InvalidParameter",t);if(a.length>2&&!(a[2]instanceof W))throw new r("InvalidParameter",t);return 2===a.length?x(a[0],a[1]):J(a[0],a[1],a[2])})}}export{E as registerFunctions};
|
package/arcade/languageUtils.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import"./ArcadeDate.js";import"./ArcadeModule.js";import"./executionError.js";import"./FunctionWrapper.js";import"./ImmutableArray.js";import"./ImmutablePathArray.js";import"./ImmutablePointArray.js";import"./featureset/support/shared.js";import"../core/number.js";import"../core/sql/DateOnly.js";import"../core/sql/TimeOnly.js";import"../geometry/Extent.js";import"../geometry/Geometry.js";import"../geometry/Multipoint.js";import"../geometry/Point.js";import"../geometry/Polygon.js";import"../geometry/Polyline.js";import"../geometry/support/coordsUtils.js";import"../geometry/support/jsonUtils.js";import"../intl/locale.js";export{isArray,isBoolean,isInteger,isDate as isJsDate,isNumber,isString}from"../support/guards.js";import"luxon";export{isGraphic}from"../support/graphicInstanceUtils.js";export{I as ImplicitResult,R as ReturnResult,W as absRound,a2 as arcadeVersion,M as autoCastArrayOfPointsToMultiPoint,K as autoCastArrayOfPointsToPolygon,L as autoCastArrayOfPointsToPolyline,H as autoCastFeatureToGeometry,x as binaryOperator,z as breakResult,a as castAsJson,
|
|
2
|
+
import"./ArcadeDate.js";import"./ArcadeModule.js";import"./executionError.js";import"./FunctionWrapper.js";import"./ImmutableArray.js";import"./ImmutablePathArray.js";import"./ImmutablePointArray.js";import"./featureset/support/shared.js";import"../core/number.js";import"../core/sql/DateOnly.js";import"../core/sql/TimeOnly.js";import"../geometry/Extent.js";import"../geometry/Geometry.js";import"../geometry/Multipoint.js";import"../geometry/Point.js";import"../geometry/Polygon.js";import"../geometry/Polyline.js";import"../geometry/support/coordsUtils.js";import"../geometry/support/jsonUtils.js";import"../intl/locale.js";export{isArray,isBoolean,isInteger,isDate as isJsDate,isNumber,isString}from"../support/guards.js";import"luxon";export{isGraphic}from"../support/graphicInstanceUtils.js";export{I as ImplicitResult,R as ReturnResult,W as absRound,a2 as arcadeVersion,M as autoCastArrayOfPointsToMultiPoint,K as autoCastArrayOfPointsToPolygon,L as autoCastArrayOfPointsToPolyline,H as autoCastFeatureToGeometry,x as binaryOperator,z as breakResult,a as castAsJson,d as castAsJsonAsync,c as castRecordToText,A as continueResult,P as defaultTimeZone,O as defaultUndefined,w as equalityTest,Y as featureDomainCodeLookup,Z as featureDomainValueLookup,X as featureFullDomain,_ as featureSchema,$ as featureSubtypes,a0 as fixNullGeometry,J as fixSpatialReference,a9 as formatDate,aa as formatNumber,a6 as getDomain,a8 as getDomainCode,a7 as getDomainValue,T as getType,u as greaterThanLessThan,D as isAttachment,e as isDate,f as isDateOnly,n as isDictionary,y as isDictionaryLike,Q as isEmpty,k as isFeature,m as isFeatureSet,l as isFeatureSetCollection,i as isFunctionParameter,h as isGeometry,j as isImmutableArray,o as isKnowledgeGraph,G as isModule,ab as isObject,E as isPixel,C as isPortal,b as isSimpleType,ac as isSubtypeGrouplayer,a4 as isSubtypeSublayer,g as isTime,q as isVoid,F as isVoxel,a1 as multiReplace,ad as parseGeometryFromJson,B as pcCheck,ae as stableStringify,V as standardiseDateFormat,a5 as tick,N as toBoolean,U as toDate,r as toNumber,a3 as toNumberArray,s as toString,S as toStringArray,t as toStringExplicit,v as voidOperation}from"../chunks/languageUtils.js";
|
|
File without changes
|
|
File without changes
|