@arcgis/core 4.23.0-next.20220123 → 4.23.0-next.20220128
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/Graphic.js +1 -1
- package/arcade/featureset/sources/FeatureLayerDynamic.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/02fbc76dfdc20e628c61.js +1 -0
- package/assets/esri/core/workers/chunks/0453fad5cb819797b4f6.js +1 -0
- package/assets/esri/core/workers/chunks/0463ba46df855a92b9c0.js +1 -0
- package/assets/esri/core/workers/chunks/0cd0a6eef51fc5b9ea61.js +1 -0
- package/assets/esri/core/workers/chunks/{d1454155ee1b8a421cbb.js → 0d02c6ad1f4688bfa374.js} +1 -1
- package/assets/esri/core/workers/chunks/0d684f16f37d5dc385dd.js +1 -0
- package/assets/esri/core/workers/chunks/0e17691520d890d34efb.js +1 -0
- package/assets/esri/core/workers/chunks/16b6d0f8378582c051c3.js +1 -0
- package/assets/esri/core/workers/chunks/{0ce1dc14280d6f188468.js → 17de7a324dfa7f57ad5d.js} +1 -1
- package/assets/esri/core/workers/chunks/{b313ab14a643273e7d09.js → 1877ab1b6a115dbba1c5.js} +1 -1
- package/assets/esri/core/workers/chunks/{c36f84daa7736878418d.js → 197ec52641aed20029c6.js} +1 -1
- package/assets/esri/core/workers/chunks/1b2a961f776a0b57e57a.js +1 -0
- package/assets/esri/core/workers/chunks/1b3fd66577b19aa5f2b6.js +1 -0
- package/assets/esri/core/workers/chunks/1c733b7db092a2a88ef3.js +1 -0
- package/assets/esri/core/workers/chunks/1f8c6a179e39fd4c5e6f.js +1 -0
- package/assets/esri/core/workers/chunks/2076fcbae63f1bfb7143.js +1 -0
- package/assets/esri/core/workers/chunks/{9387db408f496e7dd003.js → 214910032945dd2d86b0.js} +1 -1
- package/assets/esri/core/workers/chunks/{b2ae5fc4f787ea568b88.js → 2460f3b6ada6ae900dec.js} +1 -1
- package/assets/esri/core/workers/chunks/27474b007988855bea9d.js +1 -0
- package/assets/esri/core/workers/chunks/281b89dbf5574fc642ae.js +1 -0
- package/assets/esri/core/workers/chunks/{4d539878bfbd7c549e60.js → 2c8fe9bc988c3c5760a5.js} +1 -1
- package/assets/esri/core/workers/chunks/2e899ef5881b4ec6fa55.js +1 -0
- package/assets/esri/core/workers/chunks/34b59d7099904dcb28b5.js +1 -0
- package/assets/esri/core/workers/chunks/357033117dfe61eb81ea.js +1 -0
- package/assets/esri/core/workers/chunks/37c03cfc19086ce631c6.js +1 -0
- package/assets/esri/core/workers/chunks/391e96192d1ec4e55ce2.js +1 -0
- package/assets/esri/core/workers/chunks/3c673495e5f507c4a9e5.js +1 -0
- package/assets/esri/core/workers/chunks/422537fc3df707bb62c9.js +1 -0
- package/assets/esri/core/workers/chunks/44f0c3663b293afbd172.js +1 -0
- package/assets/esri/core/workers/chunks/483d5d8593d96d0f0b15.js +1 -0
- package/assets/esri/core/workers/chunks/{c959e0d1cf7dce0421b9.js → 48fa8aed6c24877b44c4.js} +1 -1
- package/assets/esri/core/workers/chunks/{44b01d42d4ec72913229.js → 4954fd86b48cc68b737c.js} +1 -1
- package/assets/esri/core/workers/chunks/49a1a633bb0d93764aae.js +1 -0
- package/assets/esri/core/workers/chunks/4ba6de8aa7e2960bad49.js +1 -0
- package/assets/esri/core/workers/chunks/4be35af7d6babbfe9d84.js +1 -0
- package/assets/esri/core/workers/chunks/5457962a70bd3c557a75.js +1 -0
- package/assets/esri/core/workers/chunks/57856b4a9b8784a69844.js +1 -0
- package/assets/esri/core/workers/chunks/{b9c177524b3e7de1ffd1.js → 5790d171072b3c7d108f.js} +1 -1
- package/assets/esri/core/workers/chunks/57b349d1dbc0bed75b79.js +1 -0
- package/assets/esri/core/workers/chunks/5bcb3240b3c005e5fe72.js +1 -0
- package/assets/esri/core/workers/chunks/5d11b97b667921d67ae7.js +1 -0
- package/assets/esri/core/workers/chunks/5dbe555a5a662ff3d9ce.js +1 -0
- package/assets/esri/core/workers/chunks/5ec98f4ddac707d0fbd1.js +1 -0
- package/assets/esri/core/workers/chunks/64b7e8d812ea8fcf269e.js +1 -0
- package/assets/esri/core/workers/chunks/{4c9084a04948b6924749.js → 655b55ac0cd533d7e9d7.js} +1 -1
- package/assets/esri/core/workers/chunks/{b0b036ad3ad3cd956747.js → 69fd99b7c76e9992ccf3.js} +1 -1
- package/assets/esri/core/workers/chunks/{9cdaba126ac7fa5f33f0.js → 6cd5e4380d29b9a3c344.js} +1 -1
- package/assets/esri/core/workers/chunks/75d812955a473d0e8960.js +1 -0
- package/assets/esri/core/workers/chunks/7903a3e2e0faff0f86c0.js +1 -0
- package/assets/esri/core/workers/chunks/{cc146c57bbdac8029fd8.js → 7a5f5acfbd4ca1a5c1f3.js} +1 -1
- package/assets/esri/core/workers/chunks/{64276aacaafa4c8a15bd.js → 7dcf52d3db3903c8eb9f.js} +1 -1
- package/assets/esri/core/workers/chunks/83d00afae4406ec78bc9.js +1 -0
- package/assets/esri/core/workers/chunks/{625d2663daa8e0cf64b0.js → 85b1f36790df95b17659.js} +1 -1
- package/assets/esri/core/workers/chunks/89820b200ee44e678af5.js +1 -0
- package/assets/esri/core/workers/chunks/918bb7a7d901544a7367.js +1 -0
- package/assets/esri/core/workers/chunks/{94b8dbf859df71858d1c.js → 929c9b7cdab7c4ca3d87.js} +1 -1
- package/assets/esri/core/workers/chunks/94515fb3ef38067eeadd.js +1 -0
- package/assets/esri/core/workers/chunks/949b2269457302ffc64b.js +1 -0
- package/assets/esri/core/workers/chunks/952980635afc7ec81804.js +1 -0
- package/assets/esri/core/workers/chunks/9876a1bae350795fab36.js +1 -0
- package/assets/esri/core/workers/chunks/99619fcb772807c74f3b.js +1 -0
- package/assets/esri/core/workers/chunks/{010a71c2aa1b7681e191.js → 9d11f84e6c893b9d0019.js} +1 -1
- package/assets/esri/core/workers/chunks/a1930e4f035bc9aa1ae5.js +1 -0
- package/assets/esri/core/workers/chunks/a8692bffb76444c34760.js +1 -0
- package/assets/esri/core/workers/chunks/aa04b90b82bf70caaae4.js +1 -0
- package/assets/esri/core/workers/chunks/aeaa1667c2d9f1b3366b.js +1 -0
- package/assets/esri/core/workers/chunks/b2d2de935487257c568b.js +1 -0
- package/assets/esri/core/workers/chunks/b3f5e91116112b0b612a.js +1 -0
- package/assets/esri/core/workers/chunks/b97953694f42bfec1b3c.js +1 -0
- package/assets/esri/core/workers/chunks/b9e9cb354822c6d995a4.js +1 -0
- package/assets/esri/core/workers/chunks/ba762bcfd74af0bb8218.js +1 -0
- package/assets/esri/core/workers/chunks/bac9fc90e6756e211160.js +1 -0
- package/assets/esri/core/workers/chunks/be588873c16770ceb9ef.js +1 -0
- package/assets/esri/core/workers/chunks/bf97a933ea3b220115e1.js +1 -0
- package/assets/esri/core/workers/chunks/bfedd6ebff817c9b31c0.js +1 -0
- package/assets/esri/core/workers/chunks/c093dff4592832ac0973.js +1 -0
- package/assets/esri/core/workers/chunks/c1135cb02ec46c491459.js +1 -0
- package/assets/esri/core/workers/chunks/c2253a9f29c1aabb2b75.js +1 -0
- package/assets/esri/core/workers/chunks/{d39b7983b68d6e5b404d.js → cdbc005eebec1503b99d.js} +1 -1
- package/assets/esri/core/workers/chunks/d04fca5d46cca02500b7.js +1 -0
- package/assets/esri/core/workers/chunks/d08efbc349dd9f999497.js +1 -0
- package/assets/esri/core/workers/chunks/d1fe53b597351dc58305.js +1 -0
- package/assets/esri/core/workers/chunks/{a8b13fb804bb775e4967.js → db3c729ce0c0b2690dc9.js} +1 -1
- package/assets/esri/core/workers/chunks/dd13772a5e2eccc6a2bc.js +1 -0
- package/assets/esri/core/workers/chunks/dedc333a61081772ca7b.js +1 -0
- package/assets/esri/core/workers/chunks/{a7b1b75643ed31489495.js → e0c8d61c7a85ce15499a.js} +1 -1
- package/assets/esri/core/workers/chunks/{199670a3a564ebe3bd79.js → e218bde41ffbcc5194f5.js} +1 -1
- package/assets/esri/core/workers/chunks/e21b211913aefde47e30.js +1 -0
- package/assets/esri/core/workers/chunks/e287f49184d076af17e2.js +1 -0
- package/assets/esri/core/workers/chunks/{bde1d5b0a7717350986e.js → e4019b63a1fe74e2c842.js} +1 -1
- package/assets/esri/core/workers/chunks/e8e775758b79c5a084c8.js +1 -0
- package/assets/esri/core/workers/chunks/e93dfdede0532a89ffa5.js +1 -0
- package/assets/esri/core/workers/chunks/e9e5196b44b6923be1a3.js +1 -0
- package/assets/esri/core/workers/chunks/ea595b0df5050eda2a13.js +1 -0
- package/assets/esri/core/workers/chunks/eb82ff10cef2bde6e57f.js +1 -0
- package/assets/esri/core/workers/chunks/ebc6f4764b82d4104c65.js +1 -0
- package/assets/esri/core/workers/chunks/{1305ef8717da6e902a55.js → ec10151a2a95e95a0bb5.js} +1 -1
- package/assets/esri/core/workers/chunks/eccba071ced2d922bb85.js +1 -0
- package/assets/esri/core/workers/chunks/ee6e0db58dc64410e687.js +1 -0
- package/assets/esri/core/workers/chunks/f0a9f161805fc7a30fc5.js +1 -0
- package/assets/esri/core/workers/chunks/f2124f4d0f2b8a91f0ea.js +1 -0
- package/assets/esri/core/workers/chunks/ff6abdc72076f3994659.js +981 -0
- package/assets/esri/libs/vxl/vxlLayer.wasm +0 -0
- package/assets/esri/themes/base/_mixins.scss +4 -1
- package/assets/esri/themes/base/icons/style.scss +11 -2
- package/assets/esri/themes/base/widgets/_BasemapLayerList.scss +13 -10
- package/assets/esri/themes/base/widgets/_CoordinateConversion.scss +4 -2
- package/assets/esri/themes/base/widgets/_Directions.scss +5 -3
- package/assets/esri/themes/base/widgets/_Editor.scss +5 -2
- package/assets/esri/themes/base/widgets/_ElevationProfile.scss +6 -4
- package/assets/esri/themes/base/widgets/_FeatureTable.scss +6 -0
- package/assets/esri/themes/base/widgets/_ItemList.scss +1 -1
- package/assets/esri/themes/base/widgets/_LayerList.scss +13 -9
- package/assets/esri/themes/base/widgets/_Popup.scss +4 -2
- package/assets/esri/themes/base/widgets/_Print.scss +24 -11
- package/assets/esri/themes/base/widgets/_Search.scss +4 -2
- package/assets/esri/themes/base/widgets/_TableList.scss +9 -7
- package/assets/esri/themes/base/widgets/_Weather.scss +12 -0
- package/assets/esri/themes/base/widgets/_Widget.scss +18 -9
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/dark-blue/main.css +1 -1
- package/assets/esri/themes/dark-green/main.css +1 -1
- package/assets/esri/themes/dark-purple/main.css +1 -1
- package/assets/esri/themes/dark-red/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/themes/light-blue/main.css +1 -1
- package/assets/esri/themes/light-green/main.css +1 -1
- package/assets/esri/themes/light-purple/main.css +1 -1
- package/assets/esri/themes/light-red/main.css +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_ar.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_bg.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_bs.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_ca.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_cs.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_da.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_de.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_el.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_en.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_es.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_et.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_fi.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_fr.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_he.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_hr.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_hu.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_id.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_it.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_ja.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_ko.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_lt.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_lv.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_nb.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_nl.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_pl.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_pt-BR.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_pt-PT.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_ro.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_ru.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_sk.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_sl.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_sr.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_sv.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_th.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_tr.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_uk.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_vi.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_zh-CN.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_zh-HK.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_zh-TW.json +1 -1
- package/chunks/BlendLayers.glsl.js +2 -2
- package/chunks/ChapmanAtmosphere.glsl.js +17 -17
- package/chunks/CheckerBoard.glsl.js +3 -3
- package/chunks/Clouds.glsl.js +2 -2
- package/chunks/CloudsComposition.glsl.js +1 -1
- package/chunks/ColorMaterial.glsl.js +12 -12
- package/chunks/ComponentShader.glsl.js +21 -21
- package/chunks/Compositing.glsl.js +1 -1
- package/chunks/DefaultMaterial.glsl.js +33 -33
- package/chunks/EdgeShaderProgram.glsl.js +7 -7
- package/chunks/Fog.glsl.js +10 -12
- package/chunks/HUDMaterial.glsl.js +2 -2
- package/chunks/HighlightComposition.glsl.js +5 -5
- package/chunks/ImageMaterial.glsl.js +6 -6
- package/chunks/LaserlinePath.glsl.js +8 -8
- package/chunks/LineCallout.glsl.js +6 -6
- package/chunks/MeasurementArrow.glsl.js +1 -1
- package/chunks/NativeLine.glsl.js +1 -1
- package/chunks/Path.glsl.js +5 -5
- package/chunks/Pattern.glsl.js +9 -9
- package/chunks/PointRenderer.glsl.js +14 -14
- package/chunks/Precipitation.glsl.js +91 -0
- package/chunks/RealisticTree.glsl.js +21 -21
- package/chunks/RibbonLine.glsl.js +11 -11
- package/chunks/SMAA.glsl.js +40 -40
- package/chunks/ShadedColorMaterial.glsl.js +12 -12
- package/chunks/ShadowCast.glsl.js +6 -6
- package/chunks/ShadowHighlight.glsl.js +4 -4
- package/chunks/SimpleAtmosphere.glsl.js +3 -3
- package/chunks/SlicePlaneMaterial.glsl.js +3 -3
- package/chunks/Stars.glsl.js +3 -3
- package/chunks/Terrain.glsl.js +3 -3
- package/chunks/TextureOnly.glsl.js +2 -2
- package/chunks/WaterSurface.glsl.js +22 -22
- package/chunks/boundedPlane.js +1 -1
- package/chunks/pe.js +1 -1
- package/chunks/vec3.js +1 -1
- package/chunks/vxlLayer.js +1 -1
- package/core/accessorSupport/ensureType.js +1 -1
- package/core/accessorSupport/get.js +1 -1
- package/core/accessorSupport/read.js +1 -1
- package/core/accessorSupport/set.js +1 -1
- package/core/accessorSupport/watch.js +1 -1
- package/core/accessorSupport/write.js +1 -1
- package/core/clock.js +1 -1
- package/core/jsonMap.js +1 -1
- package/core/libs/gl-matrix-2/math/vec3.js +1 -1
- package/core/loadAll.js +1 -1
- package/core/promiseUtils.js +1 -1
- package/core/reactiveUtils.js +1 -1
- package/form/ExpressionInfo.js +1 -1
- package/geometry/pe.js +1 -1
- package/geometry/support/axisAngleDegrees.js +1 -1
- package/geometry/support/frustum.js +1 -1
- package/geometry/support/plane.js +1 -1
- package/interfaces.d.ts +263 -35
- package/layers/VectorTileLayer.js +1 -1
- package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
- package/layers/graphics/featureConversionUtils.js +1 -1
- package/layers/support/LayerContingentValuesCache.js +1 -1
- package/layers/support/TileInfo.js +1 -1
- package/layers/support/rasterDatasets/BaseRaster.js +1 -1
- package/layers/support/rasterFunctions/rasterProjectionHelper.js +1 -1
- package/package.json +2 -2
- package/popup/content/AttachmentsContent.js +1 -1
- package/popup/content/support/mediaInfoTypes.js +1 -1
- package/rest/print.js +1 -1
- package/smartMapping/statistics/support/predominanceUtils.d.ts +4 -0
- package/support/arcadeOnDemand.js +1 -1
- package/support/featureFlags.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/FillSymbol3DLayer.js +1 -1
- package/symbols/IconSymbol3DLayer.js +1 -1
- package/symbols/LabelSymbol3D.js +1 -1
- package/symbols/ObjectSymbol3DLayer.js +1 -1
- package/symbols/PointSymbol3D.js +1 -1
- package/symbols/Symbol3D.js +1 -1
- package/symbols/WebStyleSymbol.js +1 -1
- package/symbols/cim/CIMSymbolHelper.js +1 -1
- package/symbols/cim/CIMSymbolRasterizer.js +1 -1
- package/symbols/cim/cimAnalyzer.js +1 -1
- package/symbols/support/IconSymbol3DLayerResource.js +1 -1
- package/symbols/support/ObjectSymbol3DLayerResource.js +1 -1
- package/symbols/support/Symbol3DAnchorPosition2D.js +1 -1
- package/symbols/support/Symbol3DAnchorPosition3D.js +1 -1
- package/symbols/support/Symbol3DFillMaterial.js +1 -1
- package/symbols/support/Symbol3DIconOutline.js +1 -1
- package/symbols/support/Symbol3DOutline.js +1 -1
- package/symbols/support/Symbol3DVerticalOffset.js +1 -1
- package/symbols/support/Thumbnail.js +1 -1
- package/symbols/support/previewCIMSymbol.js +1 -1
- package/symbols/support/previewSymbol2D.js +1 -1
- package/symbols/support/previewSymbol3D.js +1 -1
- package/symbols/support/previewWebStyleSymbol.js +1 -1
- package/symbols/support/svgUtils.js +1 -1
- package/symbols/support/webStyleSymbolUtils.js +1 -1
- package/symbols.js +1 -1
- package/views/2d/MapViewConstraints.js +1 -1
- package/views/2d/engine/vectorTiles/SchemaHelper.js +1 -1
- package/views/2d/engine/webgl/brushes/raster/BrushRasterBitmap.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/WGLFillTemplate.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
- package/views/2d/viewpointUtils.js +1 -1
- package/views/3d/environment/ChapmanAtmosphere.glsl.js +1 -1
- package/views/3d/environment/ChapmanAtmosphere.js +1 -1
- package/views/3d/environment/CloudsComposition.glsl.js +1 -1
- package/views/3d/environment/CloudsComposition.js +1 -1
- package/views/3d/environment/CloudsGenerator.js +1 -1
- package/views/3d/environment/CloudsPresets.js +1 -1
- package/views/3d/environment/EnvironmentRenderer.js +1 -1
- package/views/3d/environment/Fog.glsl.js +1 -1
- package/views/3d/environment/Fog.js +1 -1
- package/views/3d/environment/PanoramicAtmosphere.js +1 -1
- package/views/3d/environment/Precipitation.glsl.js +5 -0
- package/views/3d/environment/Precipitation.js +5 -0
- package/views/3d/environment/PrecipitationTechnique.js +5 -0
- package/views/3d/environment/RainyWeather.js +1 -1
- package/views/3d/environment/SceneViewEnvironmentManager.js +1 -1
- package/views/3d/environment/SimpleAtmosphere.glsl.js +1 -1
- package/views/3d/environment/SimpleAtmosphere.js +1 -1
- package/views/3d/environment/SnowyWeather.js +5 -0
- package/views/3d/environment/Stars.glsl.js +1 -1
- package/views/3d/environment/Stars.js +1 -1
- package/views/3d/environment/weather.js +1 -1
- package/views/3d/interactive/analysisTools/slice/SliceTool.js +1 -1
- package/views/3d/interactive/analysisTools/slice/sliceToolUtils.js +1 -1
- package/views/3d/interactive/editingTools/transformGraphic/ScaleRotateMeshAdapter.js +1 -1
- package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/MeasurementAreaVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/OutlineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/ParallelLineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/PointVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
- package/views/3d/layers/FeatureLayerViewBase3D.js +1 -1
- package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
- package/views/3d/layers/GraphicsLayerView3D.js +1 -1
- package/views/3d/layers/GraphicsView3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
- package/views/3d/layers/VectorTileLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Deconflictor.js +1 -1
- package/views/3d/layers/graphics/ElevationAligners.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
- package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DLineCalloutSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.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/Graphics3DWaterSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/GraphicsProcessor.js +1 -1
- package/views/3d/layers/graphics/graphicUtils.js +1 -1
- package/views/3d/layers/graphics/lineUtils.js +1 -1
- package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
- package/views/3d/layers/graphics/polygonUtils.js +1 -1
- package/views/3d/layers/graphics/symbolComplexity.js +1 -1
- package/views/3d/layers/i3s/I3SBinaryReader.js +1 -1
- package/views/3d/layers/i3s/PointRenderer.js +1 -1
- package/views/3d/layers/support/HeatmapFeatureProcessor.js +5 -0
- package/views/3d/layers/support/overlayImageUtils.js +1 -1
- package/views/3d/layers/support/patternUtils.js +1 -1
- package/views/3d/state/controllers/local/PinchAndPanController.js +1 -1
- package/views/3d/support/FrustumExtentIntersection.js +1 -1
- package/views/3d/support/LaserLineRenderer.js +1 -1
- package/views/3d/support/LaserlinePathData.js +1 -1
- package/views/3d/support/pointsOfInterest/Focus.js +1 -1
- package/views/3d/support/sunUtils.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/terrain/PatchGeometryFactory.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/terrain/Tile.js +1 -1
- package/views/3d/terrain/terrainUtils.js +1 -1
- package/views/3d/terrain/tileUtils.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentTechnique.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentData.glsl.js +10 -10
- package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentShader.glsl.js +1 -1
- package/views/3d/webgl-engine/collections/Component/SourceGeometry.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/AllRenderPasses.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepth.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/ScreenSizeScaling.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/NormalAttribute.glsl.js +4 -4
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexPosition.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/PositionAttribute.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/RibbonVertexPosition.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/SymbolColor.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js +3 -3
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexColor.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexNormal.glsl.js +6 -6
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js +12 -12
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexTextureCoordinates.glsl.js +4 -4
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/VerticalOffset.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +16 -16
- package/views/3d/webgl-engine/core/shaderLibrary/default/RealisticTree.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/hud/HUD.glsl.js +5 -5
- package/views/3d/webgl-engine/core/shaderLibrary/hud/HUDOcclusionPass.glsl.js +3 -3
- package/views/3d/webgl-engine/core/shaderLibrary/raster/BasicGrid.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ComputeMaterialColor.glsl.js +6 -6
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ComputeNormalTexture.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ComputeShadingNormal.glsl.js +10 -11
- package/views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/shading/MultipassGeometryTest.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/shading/MultipassTerrainTest.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/shading/Normals.glsl.js +6 -6
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadBaseColorTexture.glsl.js +4 -4
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js +6 -6
- package/views/3d/webgl-engine/core/shaderLibrary/shading/Reprojection.glsl.js +4 -4
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ScreenSpaceReflections.glsl.js +5 -5
- package/views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/Water.glsl.js +22 -14
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/Terrain.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/util/BlendLayers.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js +4 -4
- package/views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js +1 -1
- package/views/3d/webgl-engine/lib/Camera.js +1 -1
- package/views/3d/webgl-engine/lib/DefaultVertexAttributeLocations.js +1 -1
- package/views/3d/webgl-engine/lib/DefaultVertexBufferLayouts.js +1 -1
- package/views/3d/webgl-engine/lib/Geometry.js +1 -1
- package/views/3d/webgl-engine/lib/GeometryUtil.js +1 -1
- package/views/3d/webgl-engine/lib/GridLocalOriginFactory.js +1 -1
- package/views/3d/webgl-engine/lib/MagnifierHelper.js +1 -1
- package/views/3d/webgl-engine/lib/Material.js +1 -1
- package/views/3d/webgl-engine/lib/RenderGeometry.js +1 -1
- package/views/3d/webgl-engine/lib/RenderPluginManager.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/SSAOHelper.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
- package/views/3d/webgl-engine/lib/SmaaRenderPass.js +1 -1
- package/views/3d/webgl-engine/lib/TextRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/TextTextureAtlas.js +1 -1
- package/views/3d/webgl-engine/lib/Texture.js +1 -1
- package/views/3d/{layers/graphics/IGraphics3DFeatureProcessor.js → webgl-engine/lib/TextureUniformName.js} +0 -0
- package/views/3d/webgl-engine/lib/UniformName.js +4 -0
- package/views/3d/webgl-engine/lib/VertexAttribute.js +5 -0
- package/views/3d/webgl-engine/lib/basicInterfaces.js +1 -1
- package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeShaderTechnique.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/bufferLayouts.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/InstanceData.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/RenderInstanceData.js +1 -1
- package/views/3d/webgl-engine/lib/pathGeometryUtils.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/ImageMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineCalloutMaterial.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/PathTechnique.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/materials/SlicePlaneMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/VisualVariableMaterialParameters.js +1 -1
- package/views/3d/webgl-engine/materials/WaterTechnique.js +1 -1
- package/views/3d/webgl-engine/materials/internal/DefaultBufferWriter.js +1 -1
- package/views/3d/webgl-engine/materials/internal/MaterialUtil.js +1 -1
- package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
- package/views/3d/webgl-engine/materials/internal/waterMaterialUtils.js +1 -1
- package/views/3d/webgl-engine/parts/Model.js +1 -1
- package/views/3d/webgl-engine/shaders/CheckerBoard.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/CheckerBoardTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ColorMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ColorMaterialTechnique.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/HUDMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/HighlightComposition.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/HighlightTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ImageMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ImageMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/LaserlinePath.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/LaserlinePathTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/LineCallout.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/LineCalloutTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/Magnifier.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/Pattern.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/PatternTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/PointRenderer.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/RealisticTreeTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/SMAA.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadedColorMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadedColorMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowCastTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowHighlightTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/SlicePlaneMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/WaterSurface.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/sources/edgeRenderer/AdjustProjectedPosition.glsl.js +10 -10
- package/views/3d/webgl-engine/shaders/sources/edgeRenderer/DiscardShortEdges.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/sources/edgeRenderer/EdgeShaderProgram.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/sources/edgeRenderer/EdgeUtil.glsl.js +21 -21
- package/views/3d/webgl-engine/shaders/sources/edgeRenderer/LineAmplitude.glsl.js +6 -6
- package/views/3d/webgl-engine/shaders/sources/edgeRenderer/LineOffset.glsl.js +13 -13
- package/views/3d/webgl-engine/shaders/sources/edgeRenderer/UnpackAttributes.glsl.js +6 -6
- package/views/MapView.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/View.js +1 -1
- package/views/input/recognizers/DoubleTapDrag.js +1 -1
- package/views/input/recognizers/ImmediateDoubleClick.js +1 -1
- package/views/input/recognizers/PointerClickHoldAndDrag.js +1 -1
- package/views/input/recognizers/SingleAndDoubleClick.js +1 -1
- package/views/interactive/dragEventPipeline.js +1 -1
- package/views/interactive/editGeometry/operations/OffsetEdgeVertex.js +1 -1
- package/views/support/DefaultsFromMap.js +1 -1
- package/views/support/WatchUpdatingTracking.js +1 -1
- package/views/support/projectionUtils.js +5 -0
- package/views/webgl/BufferObject.js +1 -1
- package/views/webgl/InstanceCounter.js +1 -1
- package/views/webgl/Program.js +1 -1
- package/views/webgl/rasterUtils.js +1 -1
- package/widgets/AreaMeasurement3D/AreaMeasurement3DViewModel.js +1 -1
- package/widgets/Attachments.js +1 -1
- package/widgets/BasemapGallery/BasemapGalleryViewModel.js +1 -1
- package/widgets/BasemapGallery/support/BasemapGalleryItem.js +1 -1
- package/widgets/BasemapGallery/support/basemapCompatibilityUtils.js +1 -1
- package/widgets/BasemapGallery.js +1 -1
- package/widgets/DirectLineMeasurement3D/DirectLineMeasurement3DViewModel.js +1 -1
- package/widgets/FeatureForm/InputField.js +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/FeatureTable/Grid/Grid.js +1 -1
- package/widgets/FeatureTable.js +1 -1
- package/widgets/FeatureTemplates/FeatureTemplatesViewModel.js +1 -1
- package/widgets/LineOfSight/LineOfSightViewModel.js +1 -1
- package/widgets/Popup/PopupViewModel.js +1 -1
- package/widgets/Popup/actionUtils.js +1 -1
- package/widgets/Search/support/locatorUtils.js +1 -1
- package/widgets/Search.js +1 -1
- package/widgets/Slice/SliceViewModel.js +1 -1
- package/widgets/Slider/SliderViewModel.js +1 -1
- package/widgets/Slider.js +1 -1
- package/widgets/Weather/WeatherViewModel.js +1 -1
- package/widgets/Weather/css.js +1 -1
- package/widgets/Weather/enums.js +5 -0
- package/widgets/Weather.js +1 -1
- package/widgets/support/InteractiveAnalysisViewModel.js +1 -1
- package/widgets/support/InteractiveToolViewModel.js +1 -1
- package/assets/components/assets/calcite-icon/checkSquareF16.json +0 -1
- package/assets/components/assets/calcite-icon/checkSquareF24.json +0 -1
- package/assets/components/assets/calcite-icon/checkSquareF32.json +0 -1
- package/assets/components/assets/calcite-icon/lineSolid4.json +0 -1
- package/assets/components/assets/calcite-icon/squareF16.json +0 -1
- package/assets/components/assets/calcite-icon/squareF24.json +0 -1
- package/assets/components/assets/calcite-icon/squareF32.json +0 -1
- package/assets/components/assets/calcite-icon/xHexagon16.json +0 -1
- package/assets/components/assets/calcite-icon/xHexagon24.json +0 -1
- package/assets/components/assets/calcite-icon/xHexagon32.json +0 -1
- package/assets/components/assets/calcite-icon/xHexagonF16.json +0 -1
- package/assets/components/assets/calcite-icon/xHexagonF24.json +0 -1
- package/assets/components/assets/calcite-icon/xHexagonF32.json +0 -1
- package/assets/components/assets/calcite-icon/xOctagonF16.json +0 -1
- package/assets/components/assets/calcite-icon/xOctagonF24.json +0 -1
- package/assets/components/assets/calcite-icon/xOctagonF32.json +0 -1
- package/assets/esri/core/workers/chunks/09da224052976e290828.js +0 -1
- package/assets/esri/core/workers/chunks/0bf079e752ab79468478.js +0 -1
- package/assets/esri/core/workers/chunks/0c3e3a5baf54bd5e210c.js +0 -1
- package/assets/esri/core/workers/chunks/14bef72154b3a19561a7.js +0 -1
- package/assets/esri/core/workers/chunks/18668dc45eb9e35530df.js +0 -1
- package/assets/esri/core/workers/chunks/1e4d37c2b9dc83d20a11.js +0 -1
- package/assets/esri/core/workers/chunks/20411bb8e04703962ce6.js +0 -1
- package/assets/esri/core/workers/chunks/208a7e24e19fc5633dd7.js +0 -1
- package/assets/esri/core/workers/chunks/22b09e276c9b9f22f0f8.js +0 -1
- package/assets/esri/core/workers/chunks/23745a5ab47c840dc452.js +0 -1
- package/assets/esri/core/workers/chunks/2416f8bf8bbd2ec786ab.js +0 -1
- package/assets/esri/core/workers/chunks/25a3e9bc0b4c7e0d3165.js +0 -1
- package/assets/esri/core/workers/chunks/2e445a8735ea2adb641a.js +0 -1
- package/assets/esri/core/workers/chunks/32f8c4af7e70ebdcb19e.js +0 -1
- package/assets/esri/core/workers/chunks/36a3f6fb4d1d18fcb642.js +0 -1
- package/assets/esri/core/workers/chunks/390d9021169e65c10eb8.js +0 -1
- package/assets/esri/core/workers/chunks/3a9740dccda6a733313c.js +0 -1
- package/assets/esri/core/workers/chunks/3aa4194dc5497c57647f.js +0 -1
- package/assets/esri/core/workers/chunks/40a1e713f63ec77110c0.js +0 -1
- package/assets/esri/core/workers/chunks/43cdff2418325e163420.js +0 -1
- package/assets/esri/core/workers/chunks/4bfbf5a34c9207fdcf44.js +0 -1
- package/assets/esri/core/workers/chunks/5383a8f3e4ec1a8a4fcd.js +0 -1
- package/assets/esri/core/workers/chunks/5538639a49c7cc2eca63.js +0 -1
- package/assets/esri/core/workers/chunks/5a4a5585ec8027079f32.js +0 -1
- package/assets/esri/core/workers/chunks/5d4863a92b03bebc1b54.js +0 -1
- package/assets/esri/core/workers/chunks/60371c0f750cde87656d.js +0 -1
- package/assets/esri/core/workers/chunks/634b5ccd7a3ac67f855d.js +0 -1
- package/assets/esri/core/workers/chunks/662d13f68cf3ec92439b.js +0 -1
- package/assets/esri/core/workers/chunks/663ad15b86936eb06b69.js +0 -1
- package/assets/esri/core/workers/chunks/67162b3e2cc1b5dc6818.js +0 -1
- package/assets/esri/core/workers/chunks/739e579150bf466d43ae.js +0 -1
- package/assets/esri/core/workers/chunks/74df1f3e1e2e524a89d2.js +0 -1
- package/assets/esri/core/workers/chunks/76eef4799f6c5fff7e2d.js +0 -1
- package/assets/esri/core/workers/chunks/7baf6b1f3f050aa67ae4.js +0 -1
- package/assets/esri/core/workers/chunks/7bc5cc5dbf1b7b70ddac.js +0 -1
- package/assets/esri/core/workers/chunks/85e27fd949475f9a6bbc.js +0 -1
- package/assets/esri/core/workers/chunks/8967288145f8fbd20e7d.js +0 -1
- package/assets/esri/core/workers/chunks/8b6ab6202a40fe622833.js +0 -1
- package/assets/esri/core/workers/chunks/96ab518eb6ba11333dee.js +0 -1
- package/assets/esri/core/workers/chunks/9796d54ff12b6429164a.js +0 -1
- package/assets/esri/core/workers/chunks/99a777693e4539f0b03b.js +0 -1
- package/assets/esri/core/workers/chunks/9cb2ae42a8e328b1d98d.js +0 -1
- package/assets/esri/core/workers/chunks/9d3c58a0ef634d95b7bd.js +0 -1
- package/assets/esri/core/workers/chunks/a6ff3db3493543df81bc.js +0 -1
- package/assets/esri/core/workers/chunks/a8c13529367c037cdd94.js +0 -1
- package/assets/esri/core/workers/chunks/a96afc176041f698c7a1.js +0 -1
- package/assets/esri/core/workers/chunks/aa861b8eae6c85f3dad4.js +0 -1
- package/assets/esri/core/workers/chunks/ac8dca61ade28c542ae2.js +0 -1
- package/assets/esri/core/workers/chunks/ad081d8e49e7f90c3c26.js +0 -1
- package/assets/esri/core/workers/chunks/afa6912454f2a5ffadce.js +0 -1
- package/assets/esri/core/workers/chunks/b2beb6e1fd2ee6503830.js +0 -1
- package/assets/esri/core/workers/chunks/ba615f118a3a8970ef25.js +0 -1
- package/assets/esri/core/workers/chunks/ba6654a885be4b7a43f0.js +0 -1
- package/assets/esri/core/workers/chunks/bab1cfd0a901181622af.js +0 -1
- package/assets/esri/core/workers/chunks/be2b7cce79fd41627931.js +0 -1
- package/assets/esri/core/workers/chunks/c080114a69fa95b88d22.js +0 -1
- package/assets/esri/core/workers/chunks/c11474b702dfb94e8e87.js +0 -1
- package/assets/esri/core/workers/chunks/c13dfdd548dcb1bdb294.js +0 -1
- package/assets/esri/core/workers/chunks/c6bd943fe8fd13bb4806.js +0 -1
- package/assets/esri/core/workers/chunks/c6f94b92e866b881d9b9.js +0 -1
- package/assets/esri/core/workers/chunks/ca2f5faa01d99c21ec14.js +0 -1
- package/assets/esri/core/workers/chunks/cd7d83d127e085d52584.js +0 -1
- package/assets/esri/core/workers/chunks/cef4af64860ebbfc1c47.js +0 -1
- package/assets/esri/core/workers/chunks/cfbffa429d88e7709c3f.js +0 -1
- package/assets/esri/core/workers/chunks/d24c4fbc567486b1188f.js +0 -1
- package/assets/esri/core/workers/chunks/d52108864136c5a8a618.js +0 -1
- package/assets/esri/core/workers/chunks/da1c2873bdbc0956dca0.js +0 -1
- package/assets/esri/core/workers/chunks/de03439ca2c9782bf325.js +0 -1
- package/assets/esri/core/workers/chunks/de6cff7b6cbbf99b20d1.js +0 -981
- package/assets/esri/core/workers/chunks/e079cb1d53aca15b7df2.js +0 -1
- package/assets/esri/core/workers/chunks/e59764ee8cf25d4f74e2.js +0 -1
- package/assets/esri/core/workers/chunks/e6df9839b551569fbc62.js +0 -1
- package/assets/esri/core/workers/chunks/e97e986120aaadad7d4c.js +0 -1
- package/assets/esri/core/workers/chunks/f467c8f1fce22f6f599c.js +0 -1
- package/assets/esri/core/workers/chunks/f678293de9a6d8f5b5db.js +0 -1
- package/assets/esri/core/workers/chunks/f8e7755240a94b499e1f.js +0 -1
- package/assets/esri/core/workers/chunks/fd3e5d823dc7917f4b8f.js +0 -1
- package/assets/esri/core/workers/chunks/ffaf091c6023225cf5aa.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4816,2515],{1692:(e,t,i)=>{i.d(t,{Z:()=>S});var r=i(43697),s=i(66577),n=i(51773),a=i(78223),l=i(15923),o=(i(80442),i(22974)),u=i(92604),h=i(70586),d=i(31263),c=i(1153),p=i(52011);u.Z.getLogger("esri.core.Clonable");const f=e=>{let t=class extends e{clone(){const e=(0,h.s3)((0,c.vw)(this),"unable to clone instance of non-accessor class"),t=e.metadatas,i=e.store,r={},s=new Map;for(const e in t){const n=t[e],a=null==i?void 0:i.originOf(e);if(n.readOnly||!1===n.clonable||a!==d.s3.USER&&a!==d.s3.DEFAULTS)continue;const l=this[e];let u=null;const h=n.clonable;u="function"==typeof h?h(l):"reference"===h?l:(0,o.Vo)(l),null!=l&&null==u||(a===d.s3.DEFAULTS?s.set(e,u):r[e]=u)}const n=new(0,Object.getPrototypeOf(this).constructor)(r);if(s.size){var a;const e=null==(a=(0,c.vw)(n))?void 0:a.store;if(e)for(const[t,i]of s)e.set(t,i,d.s3.DEFAULTS)}return n}};return t=(0,r._)([(0,p.j)("esri.core.Clonable")],t),t};let y=class extends(f(l.Z)){};y=(0,r._)([(0,p.j)("esri.core.Clonable")],y);var _=i(96674),g=i(99001),m=i(5600),b=(i(67676),i(75215),i(33955));let w=class extends(f(_.wq)){constructor(...e){super(...e),this.isAggregate=!1,this.layer=null,this.popupTemplate=null,this.sourceLayer=null,Object.defineProperty(this,"uid",{value:(0,g.D)(),configurable:!0})}normalizeCtorArgs(e,t,i,r){return e&&!e.declaredClass?e:{geometry:e,symbol:t,attributes:i,popupTemplate:r}}set attributes(e){const t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){const t=this._get("geometry");t!==e&&(this._set("geometry",e),this._notifyLayer("geometry",t,e))}set symbol(e){const t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}set visible(e){const t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;for(const t of[this.sourceLayer,this.layer])if(t){if("popupTemplate"in t&&t.popupTemplate)return t.popupTemplate;if(e&&"defaultPopupTemplate"in t&&(0,h.pC)(t.defaultPopupTemplate))return t.defaultPopupTemplate}return null}getAttribute(e){return this.attributes&&this.attributes[e]}setAttribute(e,t){if(this.attributes){const i=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",i,t,e)}else this.attributes={[e]:t},this._notifyLayer("attributes",void 0,t,e)}getObjectId(){return this.sourceLayer&&"objectIdField"in this.sourceLayer&&this.sourceLayer.objectIdField?this.getAttribute(this.sourceLayer.objectIdField):null}toJSON(){return{geometry:(0,h.pC)(this.geometry)?this.geometry.toJSON():null,symbol:(0,h.pC)(this.symbol)?this.symbol.toJSON():null,attributes:{...this.attributes},popupTemplate:this.popupTemplate&&this.popupTemplate.toJSON()}}notifyGeometryChanged(){this._notifyLayer("geometry",this.geometry,this.geometry)}notifyMeshTransformChanged(){(0,h.pC)(this.geometry)&&"mesh"===this.geometry.type&&this._notifyLayer("transform",this.geometry.transform,this.geometry.transform)}_notifyLayer(e,t,i,r){if(!this.layer||!("graphicChanged"in this.layer))return;const s={graphic:this,property:e,oldValue:t,newValue:i};"attributes"===e&&(s.attributeName=r),this.layer.graphicChanged(s)}};(0,r._)([(0,m.Cb)({value:null})],w.prototype,"attributes",null),(0,r._)([(0,m.Cb)({value:null,types:s.qM,json:{read:b.im}})],w.prototype,"geometry",null),(0,r._)([(0,m.Cb)({type:Boolean})],w.prototype,"isAggregate",void 0),(0,r._)([(0,m.Cb)({clonable:"reference"})],w.prototype,"layer",void 0),(0,r._)([(0,m.Cb)({type:n.Z})],w.prototype,"popupTemplate",void 0),(0,r._)([(0,m.Cb)({clonable:"reference"})],w.prototype,"sourceLayer",void 0),(0,r._)([(0,m.Cb)({value:null,types:a.LB})],w.prototype,"symbol",null),(0,r._)([(0,m.Cb)({type:Boolean,value:!0})],w.prototype,"visible",null),w=(0,r._)([(0,p.j)("esri.Graphic")],w),(w||(w={})).generateUID=g.D;const S=w},28924:(e,t,i)=>{i.d(t,{Z:()=>s});var r=i(95330);class s{constructor(){this.declaredRootClass="esri.arcade.featureSetCollection",this._layerById={},this._layerByName={}}add(e,t,i){this._layerById[t]=i,this._layerByName[e]=i}featureSetByName(e,t=!0,i=["*"]){return void 0===this._layerByName[e]?this.resolvePromise(null):this.resolvePromise(this._layerByName[e])}featureSetById(e,t=!0,i=["*"]){return void 0===this._layerById[e]?this.resolvePromise(null):this.resolvePromise(this._layerById[e])}castToText(){return"object, FeatureSetCollection"}resolvePromise(e){return(0,r.DB)(e)}}},50954:(e,t,i)=>{i.r(t),i.d(t,{constructAssociationMetaDataFeatureSetFromUrl:()=>Y,constructFeatureSet:()=>H,constructFeatureSetFromPortalItem:()=>oe,constructFeatureSetFromRelationship:()=>ee,constructFeatureSetFromUrl:()=>$,convertToFeatureSet:()=>le,createFeatureSetCollectionFromMap:()=>re,createFeatureSetCollectionFromService:()=>se,getPortal:()=>ne,initialiseMetaDataCache:()=>Q,lookupUser:()=>ae});var r=i(40330),s=i(3172),n=i(28924),a=i(84328),l=i(1692),o=i(61363),u=i(70409),h=i(85065),d=i(91136),c=i(90961),p=i(3823),f=i(90658),y=i(36515),_=i(95002),g=i(41534);class m{clone(){const e=new m;return e.field=this.field,e.tofieldname=this.tofieldname,e.typeofstat=this.typeofstat,e.workingexpr=this.workingexpr,e}static parseStatField(e,t,i){const r=new m;r.field=e;const s=g.WhereClause.create(t,i),n=function(e){if("function"===e.parseTree.type){if(0===e.parseTree.args.value.length)return{name:e.parseTree.name,expr:null};if(e.parseTree.args.value.length>1)throw new Error("Statistic does not have 1 or 0 Parameters");const t=g.WhereClause.create((0,y.XF)(e.parseTree.args.value[0],f.Bj.Standardised,e.parameters),e.fieldsIndex);return{name:e.parseTree.name,expr:t}}return null}(s);if(null===n)throw new Error("Invalid Statistic Function");const a=n.name.toUpperCase().trim();if("MIN"===a){if(r.typeofstat="MIN",r.workingexpr=n.expr,null===s)throw new Error("Invalid Statistic Function Parameters")}else if("MAX"===a){if(r.typeofstat="MAX",r.workingexpr=n.expr,null===s)throw new Error("Invalid Statistic Function Parameters")}else if("COUNT"===a)r.typeofstat="COUNT",r.workingexpr=n.expr;else if("STDEV"===a){if(r.typeofstat="STDDEV",r.workingexpr=n.expr,null===s)throw new Error("Invalid Statistic Function Parameters")}else if("SUM"===a){if(r.typeofstat="SUM",r.workingexpr=n.expr,null===s)throw new Error("Invalid Statistic Function Parameters")}else if("MEAN"===a){if(r.typeofstat="AVG",r.workingexpr=n.expr,null===s)throw new Error("Invalid Statistic Function Parameters")}else if("AVG"===a){if(r.typeofstat="AVG",r.workingexpr=n.expr,null===s)throw new Error("Invalid Statistic Function Parameters")}else{if("VAR"!==a)throw new Error("Invalid Statistic Function");if(r.typeofstat="VAR",r.workingexpr=n.expr,null===s)throw new Error("Invalid Statistic Function Parameters")}return r}toStatisticsName(){switch(this.typeofstat.toUpperCase()){case"MIN":return"min";case"MAX":return"max";case"SUM":return"sum";case"COUNT":default:return"count";case"VAR":return"var";case"STDDEV":return"stddev";case"AVG":return"avg"}}}var b=i(44543),w=i(95330),S=i(82971),v=i(1231),F=i(99514);function I(e){if(!e)return"COUNT";switch(e.toLowerCase()){case"max":return"MAX";case"var":case"variance":return"VAR";case"avg":case"average":case"mean":return"AVG";case"min":return"MIN";case"sum":return"SUM";case"stdev":case"stddev":return"STDDEV";case"count":return"COUNT"}return"COUNT"}class C extends d.Z{constructor(e){super(e),this._decodedStatsfield=[],this._decodedGroupbyfield=[],this._candosimplegroupby=!0,this.phsyicalgroupbyfields=[],this.objectIdField="ROW__ID",this._internalObjectIdField="ROW__ID",this._adaptedFields=[],this.declaredClass="esri.arcade.featureset.actions.Aggregate",this._uniqueIds=1,this._maxQuery=10,this._maxProcessing=10,this._parent=e.parentfeatureset,this._config=e}isTable(){return!0}_getSet(e){return null===this._wset?this._getFilteredSet("",null,null,null,e).then((e=>(this._wset=e,this._wset))):(0,w.DB)(this._wset)}_isInFeatureSet(){return f.dj.InFeatureSet}_nextUniqueName(e){for(;1===e["T"+this._uniqueIds.toString()];)this._uniqueIds++;const t="T"+this._uniqueIds.toString();return e[t]=1,t}_convertToEsriFieldType(e){return e}_initialiseFeatureSet(){const e={};let t=!1,i=1;const r=this._parent?this._parent.getFieldsIndex():new F.Z([]);for(this.objectIdField="ROW__ID",this.globalIdField="";!1===t;){let e=!1;for(let t=0;t<this._config.groupbyfields.length;t++)if(this._config.groupbyfields[t].name.toLowerCase()===this.objectIdField.toLowerCase()){e=!0;break}if(!1===e)for(let t=0;t<this._config.statsfields.length;t++)if(this._config.statsfields[t].name.toLowerCase()===this.objectIdField.toLowerCase()){e=!0;break}!1===e?t=!0:(this.objectIdField="ROW__ID"+i.toString(),i++)}for(const e of this._config.statsfields){const t=new m;t.field=e.name,t.tofieldname=e.name,t.workingexpr=e.expression instanceof g.WhereClause?e.expression:g.WhereClause.create(e.expression,r),t.typeofstat=I(e.statistic),this._decodedStatsfield.push(t)}this._decodedGroupbyfield=[];for(const e of this._config.groupbyfields){const t={name:e.name,singlefield:null,tofieldname:e.name,expression:e.expression instanceof g.WhereClause?e.expression:g.WhereClause.create(e.expression,r)};this._decodedGroupbyfield.push(t)}if(null!==this._parent){this.geometryType=this._parent.geometryType,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField="";for(const t of this._parent.fields)e[t.name.toUpperCase()]=1;this.types=null}else this.geometryType=f.Qk.point,this.typeIdField="",this.types=null,this.spatialReference=new S.Z({wkid:4326});this.fields=[];const s=new m;s.field=this._nextUniqueName(e),s.tofieldname=this.objectIdField,s.workingexpr=g.WhereClause.create(this._parent.objectIdField,this._parent.getFieldsIndex()),s.typeofstat="MIN",this._decodedStatsfield.push(s);for(const t of this._decodedGroupbyfield){const i=new v.Z;if(t.name=this._nextUniqueName(e),i.name=t.tofieldname,i.alias=i.name,(0,y.y5)(t.expression)){const e=this._parent.getField((0,y.zR)(t.expression,f.Bj.Standardised));if(!e)throw new Error("Field is not present for Aggregation");t.name=e.name,t.singlefield=e.name,this.phsyicalgroupbyfields.push(e.name),i.type=e.type}else{i.type=this._convertToEsriFieldType((0,y.DT)(t.expression,this._parent.fields));const e=new v.Z;e.name=t.name,e.alias=e.name,this.phsyicalgroupbyfields.push(t.name),this._adaptedFields.push(new u.yN(e,t.expression)),this._candosimplegroupby=!1}this.fields.push(i)}if(this._adaptedFields.length>0)for(const e of this._parent.fields)this._adaptedFields.push(new u.$X(e));for(let t=0;t<this._decodedStatsfield.length;t++){const i=new v.Z;let r=null;const s=this._decodedStatsfield[t];s.field=this._nextUniqueName(e),s.tofieldname===this.objectIdField&&(this._internalObjectIdField=s.field),i.name=s.tofieldname,i.alias=i.name;const n=null!==s.workingexpr&&(0,y.y5)(s.workingexpr)?(0,y.zR)(s.workingexpr,f.Bj.Standardised):"";switch(this._decodedStatsfield[t].typeofstat){case"SUM":if(""!==n){if(r=this._parent.getField(n),!r)throw new Error("Field is not present for Aggregation");i.type=r.type}else i.type="double";break;case"MIN":case"MAX":if(""!==n){if(r=this._parent.getField(n),!r)throw new Error("Field is not present for Aggregation");i.type=r.type}else i.type="double";break;case"COUNT":i.type="integer";break;case"STDDEV":case"VAR":case"AVG":if(""!==n&&(r=this._parent.getField(n),!r))throw new Error("Field is not present for Aggregation");i.type="double"}this.fields.push(i)}}_canDoAggregates(){return(0,w.DB)(!1)}_getFeatures(e,t,i,r){-1!==t&&this._featureCache[t];const s=this._maxQuery;return!0===this._checkIfNeedToExpandKnownPage(e,s)?this._expandPagedSet(e,s,0,0,r).then((()=>this._getFeatures(e,t,i,r))):(0,w.DB)("success")}_getFilteredSet(e,t,i,r,s){if(""!==e)return(0,w.DB)(new c.Z([],[],!0,null));let n=null;const l={ordered:!1,nowhereclause:!1};return this._ensureLoaded().then((()=>{if(null!==i)for(let e=0;e<this._decodedStatsfield.length;e++)if(!0===(0,y.hq)(i,this._decodedStatsfield[e].tofieldname)){l.nowhereclause=!0,i=null;break}if(null!==r){l.ordered=!0;for(let e=0;e<this._decodedStatsfield.length;e++)if(!0===r.scanForField(this._decodedStatsfield[e].tofieldname)){r=null,l.ordered=!1;break}if(null!==r)for(const e of this._decodedGroupbyfield)if(null===e.singlefield&&!0===r.scanForField(e.tofieldname)){r=null,l.ordered=!1;break}}return!1===this._candosimplegroupby?(0,w.DB)(!1):this._parent._canDoAggregates(this.phsyicalgroupbyfields,this._decodedStatsfield,"",null,null)})).then((e=>{if(e){let e=null;i&&(e=this._reformulateWhereClauseWithoutGroupByFields(i));let t=null;return r&&(t=this._reformulateOrderClauseWithoutGroupByFields(r)),this._parent._getAggregatePagesDataSourceDefinition(this.phsyicalgroupbyfields,this._decodedStatsfield,"",null,e,t,this._internalObjectIdField).then((e=>(this._checkCancelled(s),n=!0===l.nowhereclause?new c.Z(e._candidates.slice(0).concat(e._known.slice(0)),[],!0===l.ordered&&e._ordered,this._clonePageDefinition(e.pagesDefinition)):new c.Z(e._candidates.slice(0),e._known.slice(0),!0===l.ordered&&e._ordered,this._clonePageDefinition(e.pagesDefinition)),n)))}let t=this._parent;if(this._adaptedFields.length>0&&(t=new u.Xx({parentfeatureset:this._parent,adaptedFields:this._adaptedFields,extraFilter:null})),!0===l.nowhereclause)n=new c.Z(["GETPAGES"],[],!1,{aggregatefeaturesetpagedefinition:!0,resultOffset:0,resultRecordCount:this._maxQuery,internal:{fullyResolved:!1,workingItem:null,type:"manual",iterator:null,set:[],subfeatureset:new h.Z({parentfeatureset:t,orderbyclause:new p.Z(this.phsyicalgroupbyfields.join(",")+","+this._parent.objectIdField+" ASC")})}});else{let e=t;if(null!==i){let t=null;i&&(t=this._reformulateWhereClauseWithoutGroupByFields(i)),e=new a.Z({parentfeatureset:e,whereclause:t})}n=new c.Z(["GETPAGES"],[],!1,{aggregatefeaturesetpagedefinition:!0,resultOffset:0,resultRecordCount:this._maxQuery,internal:{fullyResolved:!1,workingItem:null,type:"manual",iterator:null,set:[],subfeatureset:new h.Z({parentfeatureset:e,orderbyclause:new p.Z(this.phsyicalgroupbyfields.join(",")+","+this._parent.objectIdField+" ASC")})}})}return n}))}_reformulateWhereClauseWithoutStatsFields(e){for(const t of this._decodedStatsfield)e=(0,y.bB)(e,t.tofieldname,(0,y.zR)(t.workingexpr,f.Bj.Standardised),this._parent.getFieldsIndex());return e}_reformulateWhereClauseWithoutGroupByFields(e){for(const t of this._decodedGroupbyfield)t.tofieldname!==t.name&&(e=(0,y.bB)(e,t.tofieldname,(0,y.zR)(t.expression,f.Bj.Standardised),this._parent.getFieldsIndex()));return e}_reformulateOrderClauseWithoutGroupByFields(e){const t=[];for(const e of this._decodedGroupbyfield)e.tofieldname!==e.name&&t.push({field:e.tofieldname,newfield:e.name});return t.length>0?e.replaceFields(t):e}_clonePageDefinition(e){return null===e?null:!0===e.aggregatefeaturesetpagedefinition?{aggregatefeaturesetpagedefinition:!0,resultRecordCount:e.resultRecordCount,resultOffset:e.resultOffset,internal:e.internal}:this._parent._clonePageDefinition(e)}_refineSetBlock(e,t,i){try{return!0===this._checkIfNeedToExpandCandidatePage(e,this._maxQuery)?this._expandPagedSet(e,this._maxQuery,0,0,i).then((()=>this._refineSetBlock(e,t,i))):(this._checkCancelled(i),e._candidates.length,this._refineKnowns(e,t),e._candidates.length,e._candidates.length,(0,w.DB)(e))}catch(e){return(0,w.d1)(e)}}_expandPagedSet(e,t,i,r,s){return this._expandPagedSetFeatureSet(e,t,i,r,s)}_getPhysicalPage(e,t,i){return!0===e.pagesDefinition.aggregatefeaturesetpagedefinition?(0,w.Ue)(((t,r)=>{this._sequentialGetPhysicalItem(e,e.pagesDefinition.resultRecordCount,i,[]).then((e=>{t(e)}),r)})):this._getAgregagtePhysicalPage(e,t,i).then((e=>{for(const t of e){const e={geometry:t.geometry,attributes:{}};for(const i of this._decodedGroupbyfield)e.attributes[i.tofieldname]=t.attributes[i.name];for(const i of this._decodedStatsfield)e.attributes[i.tofieldname]=t.attributes[i.field];this._featureCache[e.attributes[this.objectIdField]]=new l.Z(e)}return e.length}))}_sequentialGetPhysicalItem(e,t,i,r){return(0,w.Ue)(((s,n)=>{null===e.pagesDefinition.internal.iterator&&(e.pagesDefinition.internal.iterator=e.pagesDefinition.internal.subfeatureset.iterator(i)),!0===e.pagesDefinition.internal.fullyResolved||0===t?s(r.length):this._nextAggregateItem(e,t,i,r,(n=>{null===n?s(r.length):(t-=1,s(this._sequentialGetPhysicalItem(e,t,i,r)))}),n)}))}_nextAggregateItem(e,t,i,r,s,n){try{(0,o.U)(e.pagesDefinition.internal.iterator.next()).then((a=>{if(null===a)if(null!==e.pagesDefinition.internal.workingItem){const t=this._calculateAndAppendAggregateItem(e.pagesDefinition.internal.workingItem);r.push(t),e.pagesDefinition.internal.workingItem=null,e.pagesDefinition.internal.set.push(t.attributes[this.objectIdField]),e.pagesDefinition.internal.fullyResolved=!0,s(null)}else e.pagesDefinition.internal.fullyResolved=!0,s(null);else{const l=this._generateAggregateHash(a);if(null===e.pagesDefinition.internal.workingItem)e.pagesDefinition.internal.workingItem={features:[a],id:l};else{if(l!==e.pagesDefinition.internal.workingItem.id){const i=this._calculateAndAppendAggregateItem(e.pagesDefinition.internal.workingItem);return r.push(i),e.pagesDefinition.internal.workingItem=null,e.pagesDefinition.internal.set.push(i.attributes[this.objectIdField]),t-=1,e.pagesDefinition.internal.workingItem={features:[a],id:l},void s(i)}e.pagesDefinition.internal.workingItem.features.push(a)}this._nextAggregateItem(e,t,i,r,s,n)}}),n)}catch(e){n(e)}}_calculateFieldStat(e,t,i){const r=[];for(let i=0;i<e.features.length;i++)if(null!==t.workingexpr){const s=t.workingexpr.calculateValue(e.features[i]);null!==s&&r.push(s)}else r.push(null);switch(t.typeofstat){case"MIN":i.attributes[t.tofieldname]=(0,_.tj)("min",r,-1);break;case"MAX":i.attributes[t.tofieldname]=(0,_.tj)("max",r,-1);break;case"SUM":i.attributes[t.tofieldname]=(0,_.tj)("sum",r,-1);break;case"COUNT":i.attributes[t.tofieldname]=r.length;break;case"VAR":i.attributes[t.tofieldname]=(0,_.tj)("var",r,-1);break;case"STDDEV":i.attributes[t.tofieldname]=(0,_.tj)("stddev",r,-1);break;case"AVG":i.attributes[t.tofieldname]=(0,_.tj)("avg",r,-1)}return!0}_calculateAndAppendAggregateItem(e){const t={attributes:{},geometry:null};for(const i of this._decodedGroupbyfield){const r=i.singlefield?e.features[0].attributes[i.singlefield]:i.expression.calculateValue(e.features[0]);t.attributes[i.tofieldname]=r}for(const i of this._decodedStatsfield)this._calculateFieldStat(e,i,t);const i=[];for(let r=0;r<this._decodedStatsfield.length;r++)i.push(this._calculateFieldStat(e,this._decodedStatsfield[r],t));return this._featureCache[t.attributes[this.objectIdField]]=new l.Z({attributes:t.attributes,geometry:t.geometry}),t}_generateAggregateHash(e){let t="";for(const i of this._decodedGroupbyfield){const r=i.singlefield?e.attributes[i.singlefield]:i.expression.calculateValue(e);t+=null==r?":":":"+r.toString()}return(0,b.F)(t,b.M.String)}_stat(){return(0,w.DB)({calculated:!1})}getFeatureByObjectId(){return(0,w.DB)(null)}static registerAction(){d.Z._featuresetFunctions.groupby=function(e,t){return new C({parentfeatureset:this,groupbyfields:e,statsfields:t})}}}var x=i(53073),D=i(63991),R=i(80692),k=i(33955),T=i(67284),O=i(98732),L=(i(17452),i(67900),i(98326),i(56545),i(41818)),N=(i(66577),i(34599)),P=i(57444),E=i(5396),A=i(4967),j=(i(80442),i(8744),i(74889)),B=i(75935),Z=(i(38581),i(28141),i(78760)),q=i(58539),U=i(33586);class G extends d.Z{constructor(e){super(e),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerDynamic",this._removeGeometry=!1,this._overrideFields=null,this.formulaCredential=null,this._pageJustIds=!1,this._requestStandardised=!1,this._useDefinitionExpression=!0,e.spatialReference&&(this.spatialReference=e.spatialReference),this._transparent=!0,this._maxProcessing=1e3,this._layer=e.layer,this._wset=null,void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry)}_maxQueryRate(){return f.tI}end(){return this._layer}optimisePagingFeatureQueries(e){this._pageJustIds=e}convertQueryToLruCacheKey(e){const t=(0,f.hd)(e.toJSON());return(0,b.F)(t,b.M.String)}load(){return null===this._loadPromise&&(this._loadPromise=(0,w.Ue)(((e,t)=>{try{if(!0===this._layer.loaded)return this._initialiseFeatureSet(),void e(this);this._layer.when().then((()=>{try{this._initialiseFeatureSet(),e(this)}catch(e){t(e)}}),t),this._layer.load()}catch(e){t(e)}}))),this._loadPromise}_initialiseFeatureSet(){if(null==this.spatialReference&&(this.spatialReference=this._layer.spatialReference),this.geometryType=this._layer.geometryType,this.fields=this._layer.fields.slice(0),this._layer.outFields)if(1===this._layer.outFields.length&&"*"===this._layer.outFields[0]);else{const e=[];for(const t of this.fields)if("oid"===t.type)e.push(t);else for(const i of this._layer.outFields)if(i.toLowerCase()===t.name.toLowerCase()){e.push(t);break}this.fields=e}if(null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{const e=[],t=[];for(const i of this.fields)if("oid"===i.type)e.push(i),t.push(i.name);else for(const r of this._overrideFields)if(r.toLowerCase()===i.name.toLowerCase()){e.push(i),t.push(i.name);break}this.fields=e,this._overrideFields=t}if(this._layer.source&&this._layer.source.sourceJSON){const e=this._layer.source.sourceJSON.currentVersion;!0===this._layer.source.sourceJSON.useStandardizedQueries?(this._databaseType=f.Bj.StandardisedNoInterval,null!=e&&e>=10.61&&(this._databaseType=f.Bj.Standardised)):null!=e&&(e>=10.5&&(this._databaseType=f.Bj.StandardisedNoInterval,this._requestStandardised=!0),e>=10.61&&(this._databaseType=f.Bj.Standardised))}this.objectIdField=this._layer.objectIdField;for(const e of this.fields)"global-id"===e.type&&(this.globalIdField=e.name);this.hasM=this._layer.supportsM,this.hasZ=this._layer.supportsZ,this.typeIdField=this._layer.typeIdField,this.types=this._layer.types}_isInFeatureSet(){return f.dj.InFeatureSet}_refineSetBlock(e){return(0,w.DB)(e)}_candidateIdTransform(e){return e}_getSet(e){return null===this._wset?this._ensureLoaded().then((()=>this._getFilteredSet("",null,null,null,e))).then((e=>(this._wset=e,e))):(0,w.DB)(this._wset)}_runDatabaseProbe(e){return(0,w.Ue)(((t,i)=>{try{this._ensureLoaded().then((()=>{try{const r=new P.Z;r.where=e.replace("OBJECTID",this._layer.objectIdField),this._layer.queryObjectIds(r).then((()=>{t(!0)}),(()=>{try{t(!1)}catch(e){i(e)}}))}catch(e){i(e)}}))}catch(e){i(e)}}))}_canUsePagination(){return!(!this._layer.capabilities||!this._layer.capabilities.query||!0!==this._layer.capabilities.query.supportsPagination)}_cacheableFeatureSetSourceKey(){return this._layer.url}pbfSupportedForQuery(e){return!e.outStatistics&&this._layer&&this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsFormatPBF&&!0===this._layer.capabilities.query.supportsQuantizationEditMode}queryPBF(e){return e.quantizationParameters={mode:"edit"},(0,N.executeQueryPBF)(this._layer.parsedUrl,e,new Z.J({})).then((e=>j.default.fromJSON((0,O.cn)(e.data)).unquantize()))}get gdbVersion(){return this._layer&&this._layer.capabilities&&this._layer.capabilities.data&&this._layer.capabilities.data.isVersioned?this._layer.gdbVersion?this._layer.gdbVersion:"SDE.DEFAULT":""}nativeCapabilities(){return{title:this._layer.title,source:this,canQueryRelated:!0,capabilities:this._layer.capabilities,databaseType:this._databaseType,requestStandardised:this._requestStandardised}}executeQuery(e,t){const i="execute"===t?A.e:"executeForCount"===t?L.P:E.G,r="execute"===t&&this.pbfSupportedForQuery(e);let s=null;if(this.recentlyUsedQueries){const n=this.convertQueryToLruCacheKey(e);s=this.recentlyUsedQueries.getFromCache(n),null===s&&(s=!0!==r?i[t](e):this.queryPBF(e),this.recentlyUsedQueries.addToCache(n,s),s=s.catch((e=>{throw this.recentlyUsedQueries.removeFromCache(n),e})))}return this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:e,method:t}),null===s&&(s=!0!==r?i(this._layer.parsedUrl.path,e):this.queryPBF(e)),s}_getFilteredSet(e,t,i,r,s){return this.databaseType().then((n=>{if(this.isTable()&&t&&null!==e&&""!==e)return new c.Z([],[],!0,null);if(this._canUsePagination())return this._getFilteredSetUsingPaging(e,t,i,r,s);let a="",l=!1;null!==r&&this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsOrderBy&&(a=r.constructClause(),l=!0);const o=new P.Z;return o.where=null===i?null===t?"1=1":"":(0,y.zR)(i,n),this._requestStandardised&&(o.sqlFormat="standard"),o.spatialRelationship=this._makeRelationshipEnum(e),o.outSpatialReference=this.spatialReference,o.orderByFields=""!==a?a.split(","):null,o.geometry=null===t?null:t,o.relationParameter=this._makeRelationshipParam(e),this.executeQuery(o,"executeForIds").then((e=>(null===e&&(e=[]),this._checkCancelled(s),new c.Z([],e,l,null))))}))}_expandPagedSet(e,t,i,r,s){return this._expandPagedSetFeatureSet(e,t,i,r,s)}_getFilteredSetUsingPaging(e,t,i,r,s){try{let n="",a=!1;return null!==r&&this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsOrderBy&&(n=r.constructClause(),a=!0),this.databaseType().then((r=>{let l=null===i?null===t?"1=1":"":(0,y.zR)(i,r);this._layer.definitionExpression&&this._useDefinitionExpression&&(l=""!==l?"(("+this._layer.definitionExpression+") AND ("+l+"))":this._layer.definitionExpression);let o=this._maxQueryRate();const u=this._layer.capabilities.query.maxRecordCount;void 0!==u&&u<o&&(o=u);let h=null;if(!0===this._pageJustIds)h=new c.Z([],["GETPAGES"],a,{spatialRel:this._makeRelationshipEnum(e),relationParam:this._makeRelationshipParam(e),outFields:this._layer.objectIdField,resultRecordCount:o,resultOffset:0,geometry:null===t?null:t,where:l,orderByFields:n,returnGeometry:!1,returnIdsOnly:"false",internal:{set:[],lastRetrieved:0,lastPage:0,fullyResolved:!1}});else{let i=!0;!0===this._removeGeometry&&(i=!1);const r=null!==this._overrideFields?this._overrideFields:this._fieldsIncludingObjectId(this._layer.outFields?this._layer.outFields:["*"]);h=new c.Z([],["GETPAGES"],a,{spatialRel:this._makeRelationshipEnum(e),relationParam:this._makeRelationshipParam(e),outFields:r.join(","),resultRecordCount:o,resultOffset:0,geometry:null===t?null:t,where:l,orderByFields:n,returnGeometry:i,returnIdsOnly:"false",internal:{set:[],lastRetrieved:0,lastPage:0,fullyResolved:!1}})}return this._expandPagedSet(h,o,0,1,s).then((()=>h))}))}catch(e){return(0,w.d1)(e)}}_clonePageDefinition(e){return null===e?null:!0!==e.groupbypage?{groupbypage:!1,spatialRel:e.spatialRel,relationParam:e.relationParam,outFields:e.outFields,resultRecordCount:e.resultRecordCount,resultOffset:e.resultOffset,geometry:e.geometry,where:e.where,orderByFields:e.orderByFields,returnGeometry:e.returnGeometry,returnIdsOnly:e.returnIdsOnly,internal:e.internal}:{groupbypage:!0,spatialRel:e.spatialRel,relationParam:e.relationParam,outFields:e.outFields,resultRecordCount:e.resultRecordCount,useOIDpagination:e.useOIDpagination,generatedOid:e.generatedOid,groupByFieldsForStatistics:e.groupByFieldsForStatistics,resultOffset:e.resultOffset,outStatistics:e.outStatistics,geometry:e.geometry,where:e.where,orderByFields:e.orderByFields,returnGeometry:e.returnGeometry,returnIdsOnly:e.returnIdsOnly,internal:e.internal}}_getPhysicalPage(e,t,i){try{const t=e.pagesDefinition.internal.lastRetrieved,r=t,s=e.pagesDefinition.internal.lastPage,n=new P.Z;return this._requestStandardised&&(n.sqlFormat="standard"),n.spatialRelationship=e.pagesDefinition.spatialRel,n.relationParameter=e.pagesDefinition.relationParam,n.outFields=e.pagesDefinition.outFields.split(","),n.num=e.pagesDefinition.resultRecordCount,n.start=e.pagesDefinition.internal.lastPage,n.geometry=e.pagesDefinition.geometry,n.where=e.pagesDefinition.where,n.orderByFields=""!==e.pagesDefinition.orderByFields?e.pagesDefinition.orderByFields.split(","):null,n.returnGeometry=e.pagesDefinition.returnGeometry,n.outSpatialReference=this.spatialReference,this.executeQuery(n,"execute").then((n=>{if(this._checkCancelled(i),e.pagesDefinition.internal.lastPage!==s)return"done";for(let t=0;t<n.features.length;t++)e.pagesDefinition.internal.set[r+t]=n.features[t].attributes[this._layer.objectIdField];if(!1===this._pageJustIds)for(let e=0;e<n.features.length;e++)this._featureCache[n.features[e].attributes[this._layer.objectIdField]]=n.features[e];return(void 0===n.exceededTransferLimit&&n.features.length!==e.pagesDefinition.resultRecordCount||!1===n.exceededTransferLimit)&&(e.pagesDefinition.internal.fullyResolved=!0),e.pagesDefinition.internal.lastRetrieved=t+n.features.length,e.pagesDefinition.internal.lastPage+=e.pagesDefinition.resultRecordCount,"done"}))}catch(e){return(0,w.d1)(e)}}_fieldsIncludingObjectId(e){if(null===e)return[this.objectIdField];const t=e.slice(0);if(t.indexOf("*")>-1)return t;let i=!1;for(const e of t)if(e.toUpperCase()===this.objectIdField.toUpperCase()){i=!0;break}return!1===i&&t.push(this.objectIdField),t}_getFeatures(e,t,i,r){const s=[];try{if(-1!==t&&void 0===this._featureCache[t]&&s.push(t),!0===this._checkIfNeedToExpandKnownPage(e,this._maxProcessingRate()))return this._expandPagedSet(e,this._maxProcessingRate(),0,0,r).then((()=>this._getFeatures(e,t,i,r)));let n=0;for(let r=e._lastFetchedIndex;r<e._known.length;r++){if(e._lastFetchedIndex+=1,n++,void 0===this._featureCache[e._known[r]]){let i=!1;if(null!==this._layer._mode&&void 0!==this._layer._mode){const t=this._layer._mode;if(void 0!==t._featureMap[e._known[r]]){const s=t._featureMap[e._known[r]];null!==s&&(i=!0,this._featureCache[e._known[r]]=s)}}if(!1===i&&(e._known[r]!==t&&s.push(e._known[r]),s.length>=this._maxProcessingRate()-1))break}if(n>=i&&0===s.length)break}if(0===s.length)return(0,w.DB)("success");try{const e=new P.Z;return this._requestStandardised&&(e.sqlFormat="standard"),e.objectIds=s,e.outFields=null!==this._overrideFields?this._overrideFields:this._fieldsIncludingObjectId(this._layer.outFields?this._layer.outFields:["*"]),e.returnGeometry=!0,!0===this._removeGeometry&&(e.returnGeometry=!1),e.outSpatialReference=this.spatialReference,this.executeQuery(e,"execute").then((e=>{if(this._checkCancelled(r),void 0!==e.error)return(0,w.d1)(new Error(e.error));for(let t=0;t<e.features.length;t++)this._featureCache[e.features[t].attributes[this._layer.objectIdField]]=e.features[t];return"success"}))}catch(e){return(0,w.d1)(e)}}catch(e){return(0,w.d1)(e)}}_getDistinctPages(e,t,i,r,s,n,a,l,o){return this._ensureLoaded().then((()=>this.databaseType())).then((u=>{let h=i.parseTree.column;for(let e=0;e<this._layer.fields.length;e++)if(this._layer.fields[e].name.toLowerCase()===h.toLowerCase()){h=this._layer.fields[e].name;break}const d=new P.Z;this._requestStandardised&&(d.sqlFormat="standard");let c=null===n?null===s?"1=1":"":(0,y.zR)(n,u);return this._layer.definitionExpression&&this._useDefinitionExpression&&(c=""!==c?"(("+this._layer.definitionExpression+") AND ("+c+"))":this._layer.definitionExpression),d.where=c,d.spatialRelationship=this._makeRelationshipEnum(r),d.relationParameter=this._makeRelationshipParam(r),d.geometry=null===s?null:s,d.returnDistinctValues=!0,d.returnGeometry=!1,d.outFields=[h],this.executeQuery(d,"execute").then((u=>{if(this._checkCancelled(o),!u.hasOwnProperty("features"))return(0,w.d1)(new Error("Unnexected Result querying statistics from layer"));let d=!1;for(let e=0;e<this._layer.fields.length;e++)if(this._layer.fields[e].name===h){"date"===this._layer.fields[e].type&&(d=!0);break}for(let e=0;e<u.features.length;e++){if(d){const t=u.features[e].attributes[h];null!==t?l.push(new Date(t)):l.push(t)}else l.push(u.features[e].attributes[h]);if(l.length>=a)break}return 0===u.features.length?l:u.features.length===this._layer.capabilities.query.maxRecordCount&&l.length<a?this._getDistinctPages(e+u.features.length,t,i,r,s,n,a,l,o).then((e=>({calculated:!0,result:e}))):l}))}))}_distinctStat(e,t,i,r,s,n,a){return this._getDistinctPages(0,e,t,i,r,s,n,[],a).then((e=>({calculated:!0,result:e})))}isTable(){return this._layer.isTable||null===this._layer.geometryType||"table"===this._layer.type||""===this._layer.geometryType}_countstat(e,t,i,r){return this.databaseType().then((e=>{const s=new P.Z;if(this._requestStandardised&&(s.sqlFormat="standard"),this.isTable()&&i&&null!==t&&""!==t)return{calculated:!0,result:0};let n=null===r?null===i?"1=1":"":(0,y.zR)(r,e);return this._layer.definitionExpression&&this._useDefinitionExpression&&(n=""!==n?"(("+this._layer.definitionExpression+") AND ("+n+"))":this._layer.definitionExpression),s.where=n,s.where=n,s.spatialRelationship=this._makeRelationshipEnum(t),s.relationParameter=this._makeRelationshipParam(t),s.geometry=null===i?null:i,s.returnGeometry=!1,this.executeQuery(s,"executeForCount").then((e=>({calculated:!0,result:e})))}))}_stats(e,t,i,r,s,n,a){return this._ensureLoaded().then((()=>{const l=this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsSqlExpression,o=this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsStatistics,u=this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsDistinct;return"count"===e?u?this._countstat(e,i,r,s):{calculated:!1}:!1===o||!1===(0,y.y5)(t)&&!1===l||!1===t.isStandardized?""!==i||null!==s?{calculated:!1}:this._manualStat(e,t,n,a):"distinct"===e?!1===u?""!==i||null!==s?{calculated:!1}:this._manualStat(e,t,n,a):this._distinctStat(e,t,i,r,s,n,a):this.databaseType().then((n=>{if(this.isTable()&&r&&null!==i&&""!==i)return{calculated:!0,result:null};const a=new P.Z;this._requestStandardised&&(a.sqlFormat="standard");let l=null===s?null===r?"1=1":"":(0,y.zR)(s,n);this._layer.definitionExpression&&this._useDefinitionExpression&&(l=""!==l?"(("+this._layer.definitionExpression+") AND ("+l+"))":this._layer.definitionExpression),a.where=l,a.spatialRelationship=this._makeRelationshipEnum(i),a.relationParameter=this._makeRelationshipParam(i),a.geometry=null===r?null:r;const o=new q.Z;o.statisticType=(0,_.g3)(e),o.onStatisticField=(0,y.zR)(t,n),o.outStatisticFieldName="ARCADE_STAT_RESULT",a.returnGeometry=!1;let u="ARCADE_STAT_RESULT";return a.outStatistics=[o],this.executeQuery(a,"execute").then((e=>{if(!e.hasOwnProperty("features")||0===e.features.length)return(0,w.d1)(new Error("Unnexected Result querying statistics from layer"));let t=!1;for(let i=0;i<e.fields.length;i++)if("ARCADE_STAT_RESULT"===e.fields[i].name.toUpperCase()){u=e.fields[i].name,"date"===e.fields[i].type&&(t=!0);break}if(t){let t=e.features[0].attributes[u];return null!==t&&(t=new Date(e.features[0].attributes[u])),{calculated:!0,result:t}}return{calculated:!0,result:e.features[0].attributes[u]}}))}))}))}_stat(e,t,i,r,s,n,a){return this._stats(e,t,i,r,s,n,a)}_canDoAggregates(e,t){return this._ensureLoaded().then((()=>{let e=!1;const i=this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsSqlExpression;if(void 0!==this._layer.capabilities&&null!==this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsStatistics&&!0===this._layer.capabilities.query.supportsOrderBy&&(e=!0),e)for(let r=0;r<t.length-1;r++)null!==t[r].workingexpr&&(!1===t[r].workingexpr.isStandardized||!1===(0,y.y5)(t[r].workingexpr)&&!1===i)&&(e=!1);return!1!==e}))}_makeRelationshipEnum(e){if(e.indexOf("esriSpatialRelRelation")>=0)return"relation";switch(e){case"esriSpatialRelRelation":return"relation";case"esriSpatialRelIntersects":return"intersects";case"esriSpatialRelContains":return"contains";case"esriSpatialRelOverlaps":return"overlaps";case"esriSpatialRelWithin":return"within";case"esriSpatialRelTouches":return"touches";case"esriSpatialRelCrosses":return"crosses";case"esriSpatialRelEnvelopeIntersects":return"envelope-intersects"}return e}_makeRelationshipParam(e){return e.indexOf("esriSpatialRelRelation")>=0?e.split(":")[1]:""}_getAggregatePagesDataSourceDefinition(e,t,i,r,s,n,a){return this._ensureLoaded().then((()=>this.databaseType())).then((l=>{let o="",u=!1,h=!1;null!==n&&this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsOrderBy&&(o=n.constructClause(),h=!0),this._layer.capabilities&&this._layer.capabilities.query&&!1===this._layer.capabilities.query.supportsPagination&&(h=!1,u=!0,o=this._layer.objectIdField);const d=[];for(let e=0;e<t.length;e++){const i=new q.Z;i.onStatisticField=null!==t[e].workingexpr?(0,y.zR)(t[e].workingexpr,l):"",i.outStatisticFieldName=t[e].field,i.statisticType=t[e].toStatisticsName(),d.push(i)}""===o&&(o=e.join(","));let p=this._maxQueryRate();const f=this._layer.capabilities.query.maxRecordCount;void 0!==f&&f<p&&(p=f);let _=null===s?null===r?"1=1":"":(0,y.zR)(s,l);return this._layer.definitionExpression&&this._useDefinitionExpression&&(_=""!==_?"(("+this._layer.definitionExpression+") AND ("+_+"))":this._layer.definitionExpression),new c.Z([],["GETPAGES"],h,{groupbypage:!0,spatialRel:this._makeRelationshipEnum(i),relationParam:this._makeRelationshipParam(i),outFields:["*"],useOIDpagination:u,generatedOid:a,resultRecordCount:p,resultOffset:0,groupByFieldsForStatistics:e,outStatistics:d,geometry:null===r?null:r,where:_,orderByFields:o,returnGeometry:!1,returnIdsOnly:!1,internal:{lastMaxId:-1,set:[],lastRetrieved:0,lastPage:0,fullyResolved:!1}})}))}_getAgregagtePhysicalPage(e,t,i){try{let t=e.pagesDefinition.where;!0===e.pagesDefinition.useOIDpagination&&(t=""!==t?"("+t+") AND ("+e.pagesDefinition.generatedOid+">"+e.pagesDefinition.internal.lastMaxId.toString()+")":e.pagesDefinition.generatedOid+">"+e.pagesDefinition.internal.lastMaxId.toString());const r=e.pagesDefinition.internal.lastRetrieved,s=r,n=e.pagesDefinition.internal.lastPage,a=new P.Z;return this._requestStandardised&&(a.sqlFormat="standard"),a.where=t,a.spatialRelationship=e.pagesDefinition.spatialRel,a.relationParameter=e.pagesDefinition.relationParam,a.outFields=e.pagesDefinition.outFields,a.outStatistics=e.pagesDefinition.outStatistics,a.geometry=e.pagesDefinition.geometry,a.groupByFieldsForStatistics=e.pagesDefinition.groupByFieldsForStatistics,a.num=e.pagesDefinition.resultRecordCount,a.start=e.pagesDefinition.internal.lastPage,a.returnGeometry=e.pagesDefinition.returnGeometry,a.orderByFields=""!==e.pagesDefinition.orderByFields?e.pagesDefinition.orderByFields.split(","):null,this.isTable()&&a.geometry&&a.spatialRelationship?(0,w.DB)([]):this.executeQuery(a,"execute").then((t=>{if(this._checkCancelled(i),!t.hasOwnProperty("features"))return(0,w.d1)(new Error("Unnexected Result querying aggregates from layer"));const a=[];if(e.pagesDefinition.internal.lastPage!==n)return[];for(let i=0;i<t.features.length;i++)e.pagesDefinition.internal.set[s+i]=t.features[i].attributes[e.pagesDefinition.generatedOid];for(let e=0;e<t.features.length;e++)a.push(new l.Z({attributes:t.features[e].attributes,geometry:null}));return!0===e.pagesDefinition.useOIDpagination?0===t.features.length?e.pagesDefinition.internal.fullyResolved=!0:e.pagesDefinition.internal.lastMaxId=t.features[t.features.length-1].attributes[e.pagesDefinition.generatedOid]:(void 0===t.exceededTransferLimit&&t.features.length!==e.pagesDefinition.resultRecordCount||!1===t.exceededTransferLimit)&&(e.pagesDefinition.internal.fullyResolved=!0),e.pagesDefinition.internal.lastRetrieved=r+t.features.length,e.pagesDefinition.internal.lastPage+=e.pagesDefinition.resultRecordCount,a}))}catch(e){return(0,w.d1)(e)}}static create(e,t,i,r,s){const n=new T.default({url:e,outFields:null===t?["*"]:t});return new G({layer:n,spatialReference:i,lrucache:r,interceptor:s})}relationshipMetaData(){return this._layer&&this._layer.source&&this._layer.source.sourceJSON&&this._layer.source.sourceJSON.relationships?this._layer.source.sourceJSON.relationships:[]}serviceUrl(){return(0,f.US)(this._layer.parsedUrl.path)}queryAttachments(e,t,i,r,s){if(this._layer.capabilities.data.supportsAttachment&&this._layer.capabilities.operations.supportsQueryAttachments){const n={objectIds:[e],returnMetadata:s};return(t&&t>0||i&&i>0)&&(n.size=[t&&t>0?t:0,i&&i>0?i:t+1]),r&&r.length>0&&(n.attachmentTypes=r),this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:n,method:"attachments"}),this._layer.queryAttachments(n).then((t=>{const i=[];return t&&t[e]&&t[e].forEach((t=>{const r=this._layer.parsedUrl.path+"/"+e.toString()+"/attachments/"+t.id.toString();let n=null;s&&t.exifInfo&&(n=U.Z.convertJsonToArcade(t.exifInfo,!0)),i.push(new R.Z(t.id,t.name,t.contentType,t.size,r,n))})),i}))}return(0,w.DB)([])}queryRelatedFeatures(e){const t={f:"json",relationshipId:e.relationshipId.toString(),definitionExpression:e.where,outFields:e.outFields.join(","),returnGeometry:e.returnGeometry.toString()};return void 0!==e.resultOffset&&null!==e.resultOffset&&(t.resultOffset=e.resultOffset.toString()),void 0!==e.resultRecordCount&&null!==e.resultRecordCount&&(t.resultRecordCount=e.resultRecordCount.toString()),e.orderByFields&&(t.orderByFields=e.orderByFields.join(",")),e.objectIds.length>0&&(t.objectIds=e.objectIds.join(",")),e.outSpatialReference&&(t.outSR=JSON.stringify(e.outSpatialReference.toJSON())),this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preRequestCallback({layer:this._layer,queryPayload:t,method:"relatedrecords",url:this._layer.parsedUrl.path+"/queryRelatedRecords"}),(0,s.default)(this._layer.parsedUrl.path+"/queryRelatedRecords",{responseType:"json",query:t}).then((e=>{if(e.data){const t={},i=e.data;if(i&&i.relatedRecordGroups){const e=i.spatialReference;for(const r of i.relatedRecordGroups){const s=r.objectId,n=[];for(const t of r.relatedRecords){t.geometry&&(t.geometry.spatialReference=e);const i=new l.Z({geometry:t.geometry?(0,k.im)(t.geometry):null,attributes:t.attributes});n.push(i)}t[s]={features:n,exceededTransferLimit:!0===i.exceededTransferLimit}}}return t}return(0,w.d1)("Invalid Request")}))}getFeatureByObjectId(e,t){const i=new P.Z;return i.outFields=t,i.returnGeometry=!1,i.outSpatialReference=this.spatialReference,i.where=this.objectIdField+"="+e.toString(),this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:i,method:"execute"}),(0,A.e)(this._layer.parsedUrl.path,i).then((e=>1===e.features.length?e.features[0]:null))}getIdentityUser(){return this.load().then((()=>{var e;const t=null==(e=r.id)?void 0:e.findCredential(this._layer.url);return t?t.userId:null}))}getOwningSystemUrl(){return this.load().then((()=>{var e;const t=null==(e=r.id)?void 0:e.findServerInfo(this._layer.url);if(t)return(0,w.DB)(t.owningSystemUrl);let i=this._layer.url;const n=i.toLowerCase().indexOf("/rest/services");return i=n>-1?i.substring(0,n):i,i?(i+="/rest/info",(0,w.Ue)(((e,t)=>{(0,s.default)(i,{query:{f:"json"}}).then((t=>{let i="";t.data&&t.data.owningSystemUrl&&(i=t.data.owningSystemUrl),e(i)}),(t=>{e("")}))}))):(0,w.DB)("")}))}getDataSourceFeatureSet(){const e=new G({layer:this._layer,spatialReference:this.spatialReference,outFields:this._overrideFields,includeGeometry:!this._removeGeometry,lrucache:this.recentlyUsedQueries,interceptor:this.featureSetQueryInterceptor});return e._useDefinitionExpression=!1,e}}var z=i(17805);class M extends d.Z{constructor(e){super(e),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerRelated",this._findObjectId=-1,this._requestStandardised=!1,this._removeGeometry=!1,this._overrideFields=null,this.featureObjectId=null,this.relatedLayer=null,this.relationship=null,e.spatialReference&&(this.spatialReference=e.spatialReference),this._transparent=!0,this._maxProcessing=1e3,this._layer=e.layer,this._wset=null,this._findObjectId=e.objectId,this.featureObjectId=e.objectId,this.relationship=e.relationship,this.relatedLayer=e.relatedLayer,void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry)}_maxQueryRate(){return f.tI}end(){return this._layer}optimisePagingFeatureQueries(){}load(){return null===this._loadPromise&&(this._loadPromise=(0,w.Ue)(((e,t)=>{(0,w.$6)([this._layer.load(),this.relatedLayer.load()]).then((()=>{this._initialiseFeatureSet(),e(this)}),t)}))),this._loadPromise}nativeCapabilities(){return this.relatedLayer.nativeCapabilities()}_initialiseFeatureSet(){if(null==this.spatialReference&&(this.spatialReference=this._layer.spatialReference),this.geometryType=this.relatedLayer.geometryType,this.fields=this.relatedLayer.fields.slice(0),null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{const e=[],t=[];for(const i of this.fields)if("oid"===i.type)e.push(i),t.push(i.name);else for(const r of this._overrideFields)if(r.toLowerCase()===i.name.toLowerCase()){e.push(i),t.push(i.name);break}this.fields=e,this._overrideFields=t}const e=this._layer.nativeCapabilities();e&&(this._databaseType=e.databaseType,this._requestStandardised=e.requestStandardised),this.objectIdField=this.relatedLayer.objectIdField,this.globalIdField=this.relatedLayer.globalIdField,this.hasM=this.relatedLayer.supportsM,this.hasZ=this.relatedLayer.supportsZ,this.typeIdField=this.relatedLayer.typeIdField,this.types=this.relatedLayer.types}databaseType(){return this.relatedLayer.databaseType().then((()=>(this._databaseType=this.relatedLayer._databaseType,this._databaseType)))}isTable(){return this.relatedLayer.isTable()}_isInFeatureSet(){return f.dj.InFeatureSet}_candidateIdTransform(e){return e}_getSet(e){return null===this._wset?this._ensureLoaded().then((()=>this._getFilteredSet("",null,null,null,e))).then((e=>(this._wset=e,e))):(0,w.DB)(this._wset)}_changeFeature(e){const t={};for(const i of this.fields)t[i.name]=e.attributes[i.name];return new l.Z({geometry:!0===this._removeGeometry?null:e.geometry,attributes:t})}_getFilteredSet(e,t,i,r,s){return this.databaseType().then((()=>{if(this.isTable()&&t&&null!==e&&""!==e)return new c.Z([],[],!0,null);const n=this._layer.nativeCapabilities();if(!1===n.canQueryRelated)return new c.Z([],[],!0,null);if(n.capabilities.queryRelated&&n.capabilities.queryRelated.supportsPagination)return this._getFilteredSetUsingPaging(e,t,i,r,s);let a="",l=!1;null!==r&&n.capabilities&&n.capabilities.queryRelated&&!0===n.capabilities.queryRelated.supportsOrderBy&&(a=r.constructClause(),l=!0);const o=new B.Z;o.objectIds=[this._findObjectId];const u=null!==this._overrideFields?this._overrideFields:this._fieldsIncludingObjectId(this.relatedLayer.fields?this.relatedLayer.fields.map((e=>e.name)):["*"]);o.outFields=u,o.relationshipId=this.relationship.id,o.where="1=1";let h=!0;return!0===this._removeGeometry&&(h=!1),o.returnGeometry=h,this._requestStandardised&&(o.sqlFormat="standard"),o.outSpatialReference=this.spatialReference,o.orderByFields=""!==a?a.split(","):null,n.source.queryRelatedFeatures(o).then((r=>{this._checkCancelled(s);const n=r[this._findObjectId]?r[this._findObjectId].features:[],a=[];for(let e=0;e<n.length;e++)this._featureCache[n[e].attributes[this._layer.objectIdField]]=n[e],a.push(n[e].attributes[this._layer.objectIdField]);const o=t&&null!==e&&""!==e,u=null!=i;return new c.Z(o||u?a:[],o||u?[]:a,l,null)}))}))}_fieldsIncludingObjectId(e){if(null===e)return[this.objectIdField];const t=e.slice(0);if(t.indexOf("*")>-1)return t;let i=!1;for(const e of t)if(e.toUpperCase()===this.objectIdField.toUpperCase()){i=!0;break}return!1===i&&t.push(this.objectIdField),t}_getFilteredSetUsingPaging(e,t,i,r,s){try{let n="",a=!1;const l=this._layer.nativeCapabilities();return null!==r&&l&&l.capabilities.queryRelated&&!0===l.capabilities.queryRelated.supportsOrderBy&&(n=r.constructClause(),a=!0),this.databaseType().then((()=>{let r=this._maxQueryRate();const o=l.capabilities.query.maxRecordCount;void 0!==o&&o<r&&(r=o);const u=t&&null!==e&&""!==e,h=null!=i;let d=null,p=!0;!0===this._removeGeometry&&(p=!1);const f=null!==this._overrideFields?this._overrideFields:this._fieldsIncludingObjectId(this.relatedLayer.fields?this.relatedLayer.fields.map((e=>e.name)):["*"]);return d=new c.Z(u||h?["GETPAGES"]:[],u||h?[]:["GETPAGES"],a,{outFields:f.join(","),resultRecordCount:r,resultOffset:0,objectIds:[this._findObjectId],where:"1=1",orderByFields:n,returnGeometry:p,returnIdsOnly:"false",internal:{set:[],lastRetrieved:0,lastPage:0,fullyResolved:!1}}),this._expandPagedSet(d,r,0,0,s).then((()=>d))}))}catch(e){return(0,w.d1)(e)}}_expandPagedSet(e,t,i,r,s){return this._expandPagedSetFeatureSet(e,t,i,r,s)}_clonePageDefinition(e){return null===e?null:!0!==e.groupbypage?{groupbypage:!1,outFields:e.outFields,resultRecordCount:e.resultRecordCount,resultOffset:e.resultOffset,where:e.where,objectIds:e.objectIds,orderByFields:e.orderByFields,returnGeometry:e.returnGeometry,returnIdsOnly:e.returnIdsOnly,internal:e.internal}:{groupbypage:!0,outFields:e.outFields,resultRecordCount:e.resultRecordCount,useOIDpagination:e.useOIDpagination,generatedOid:e.generatedOid,groupByFieldsForStatistics:e.groupByFieldsForStatistics,resultOffset:e.resultOffset,outStatistics:e.outStatistics,geometry:e.geometry,where:e.where,objectIds:e.objectIds,orderByFields:e.orderByFields,returnGeometry:e.returnGeometry,returnIdsOnly:e.returnIdsOnly,internal:e.internal}}_getPhysicalPage(e,t,i){try{const t=e.pagesDefinition.internal.lastRetrieved,r=t,s=e.pagesDefinition.internal.lastPage,n=this._layer.nativeCapabilities(),a=new B.Z;return!0===this._requestStandardised&&(a.sqlFormat="standard"),a.relationshipId=this.relationship.id,a.objectIds=e.pagesDefinition.objectIds,a.resultOffset=e.pagesDefinition.internal.lastPage,a.resultRecordCount=e.pagesDefinition.resultRecordCount,a.outFields=e.pagesDefinition.outFields.split(","),a.where=e.pagesDefinition.where,a.orderByFields=""!==e.pagesDefinition.orderByFields?e.pagesDefinition.orderByFields.split(","):null,a.returnGeometry=e.pagesDefinition.returnGeometry,a.outSpatialReference=this.spatialReference,n.source.queryRelatedFeatures(a).then((n=>{if(this._checkCancelled(i),e.pagesDefinition.internal.lastPage!==s)return 0;const a=n[this._findObjectId]?n[this._findObjectId].features:[];for(let t=0;t<a.length;t++)e.pagesDefinition.internal.set[r+t]=a[t].attributes[this._layer.objectIdField];for(let e=0;e<a.length;e++)this._featureCache[a[e].attributes[this._layer.objectIdField]]=a[e];const l=!n[this._findObjectId]||!1===n[this._findObjectId].exceededTransferLimit;return a.length!==e.pagesDefinition.resultRecordCount&&l&&(e.pagesDefinition.internal.fullyResolved=!0),e.pagesDefinition.internal.lastRetrieved=t+a.length,e.pagesDefinition.internal.lastPage+=e.pagesDefinition.resultRecordCount,a.length}))}catch(e){return(0,w.d1)(e)}}_getFeatures(e,t,i,r){const s=[];-1!==t&&void 0===this._featureCache[t]&&s.push(t);const n=this._maxQueryRate();if(!0===this._checkIfNeedToExpandKnownPage(e,n))return this._expandPagedSet(e,n,0,0,r).then((()=>this._getFeatures(e,t,i,r)));let a=0;for(let r=e._lastFetchedIndex;r<e._known.length&&(a++,a<=i&&(e._lastFetchedIndex+=1),!("GETPAGES"!==e._known[r]&&void 0===this._featureCache[e._known[r]]&&(e._known[r]!==t&&s.push(e._known[r]),s.length>i)))&&!(a>=i&&0===s.length);r++);return 0===s.length?(0,w.DB)("success"):(0,w.d1)(new Error("Unaccounted for Features. Not in Feature Collection"))}_refineSetBlock(e,t,i){return(0,w.DB)(e)}_stat(e,t,i,r,s,n,a){return(0,w.DB)({calculated:!1})}get gdbVersion(){return this.relatedLayer.gdbVersion}_canDoAggregates(e,t,i,r,s){return(0,w.DB)(!1)}relationshipMetaData(){return this.relatedLayer.relationshipMetaData()}serviceUrl(){return this.relatedLayer.serviceUrl()}queryAttachments(e,t,i,r,s){return this.relatedLayer.queryAttachments(e,t,i,r,s)}getFeatureByObjectId(e,t){return this.relatedLayer.getFeatureByObjectId(e,t)}getOwningSystemUrl(){return this.relatedLayer.getOwningSystemUrl()}getIdentityUser(){return this.relatedLayer.getIdentityUser()}getDataSourceFeatureSet(){return this.relatedLayer}}var W=i(48039),V=i(65587),J=i(15235);function Q(){null===W.Z.applicationCache&&(W.Z.applicationCache=new W.Z)}function K(e,t){if(W.Z.applicationCache){const i=W.Z.applicationCache.getLayerInfo(e);if(i)return i.then((i=>(0,w.DB)(new T.default({url:e,outFields:t,sourceJSON:i}))));const r=new T.default({url:e,outFields:t});let s=(0,w.Ue)(((e,t)=>{r.load().then((()=>{e(r.sourceJSON)}),(e=>{t(e)}))}));return W.Z.applicationCache&&(W.Z.applicationCache.setLayerInfo(e,s),s=s.catch((t=>{throw W.Z.applicationCache.clearLayerInfo(e),t}))),s.then((()=>(0,w.DB)(r)))}return(0,w.DB)(new T.default({url:e,outFields:t}))}function $(e,t,i,r,s,n=null){return K(e,["*"]).then((e=>(0,w.DB)(H(e,t,i,r,s,n))))}function H(e,t=null,i=null,r=!0,s=null,n=null){return!0===e._hasMemorySource()?new z.Z({layer:e,spatialReference:t,outFields:i,includeGeometry:r,lrucache:s,interceptor:n}):new G({layer:e,spatialReference:t,outFields:i,includeGeometry:r,lrucache:s,interceptor:n})}function X(e){if(null!==W.Z.applicationCache){const t=W.Z.applicationCache.getLayerInfo(e);if(null!==t)return t}let t=(0,s.default)(e,{responseType:"json",query:{f:"json"}}).then((e=>{if(e.data){const t=e.data;return t.layers||(t.layers=[]),t.tables||(t.tables=[]),(0,w.DB)(t)}return(0,w.DB)({layers:[],tables:[]})}));return null!==W.Z.applicationCache&&(W.Z.applicationCache.setLayerInfo(e,t),t=t.catch((t=>{throw W.Z.applicationCache.clearLayerInfo(e),t}))),t}function Y(e,t){const i={metadata:null,networkId:-1,unVersion:3,terminals:[],queryelem:null,layerNameLkp:{},lkp:null};return X(e).then((r=>{if(i.metadata=r,r.controllerDatasetLayers&&void 0!==r.controllerDatasetLayers.utilityNetworkLayerId&&null!==r.controllerDatasetLayers.utilityNetworkLayerId){if(r.layers)for(const e of r.layers)i.layerNameLkp[e.id]=e.name;if(r.tables)for(const e of r.tables)i.layerNameLkp[e.id]=e.name;const n=r.controllerDatasetLayers.utilityNetworkLayerId;return i.networkId=n,function(e,t){const i="QUERYDATAELEMTS:"+t.toString()+":"+e;if(null!==W.Z.applicationCache){const e=W.Z.applicationCache.getLayerInfo(i);if(null!==e)return e}let r=(0,s.default)(e+"/queryDataElements",{method:"post",responseType:"json",query:{layers:JSON.stringify([t.toString()]),f:"json"}}).then((e=>{if(e.data){const t=e.data;if(t.layerDataElements&&t.layerDataElements[0])return t.layerDataElements[0]}throw new Error("Not Found")}));return null!==W.Z.applicationCache&&(W.Z.applicationCache.setLayerInfo(i,r),r=r.catch((e=>{throw W.Z.applicationCache.clearLayerInfo(i),e}))),r}(e,n).then((r=>{if(r){i.queryelem=r,i.queryelem&&i.queryelem.dataElement&&void 0!==i.queryelem.dataElement.schemaGeneration&&(i.unVersion=i.queryelem.dataElement.schemaGeneration),i.lkp={},i.queryelem.dataElement.domainNetworks||(i.queryelem.dataElement.domainNetworks=[]);for(const e of i.queryelem.dataElement.domainNetworks){for(const t of e.edgeSources?e.edgeSources:[]){const e={layerId:t.layerId,sourceId:t.sourceId,className:i.layerNameLkp[t.layerId]?i.layerNameLkp[t.layerId]:null};e.className&&(i.lkp[e.className]=e)}for(const t of e.junctionSources?e.junctionSources:[]){const e={layerId:t.layerId,sourceId:t.sourceId,className:i.layerNameLkp[t.layerId]?i.layerNameLkp[t.layerId]:null};e.className&&(i.lkp[e.className]=e)}}if(i.queryelem.dataElement.terminalConfigurations)for(const e of i.queryelem.dataElement.terminalConfigurations)for(const t of e.terminals)i.terminals.push({terminalId:t.terminalId,terminalName:t.terminalName});return function(e){if(null!==W.Z.applicationCache){const t=W.Z.applicationCache.getLayerInfo(e);if(null!==t)return t}let t=(0,s.default)(e,{responseType:"json",query:{f:"json"}}).then((e=>{if(e.data){const t=e.data;return(0,w.DB)(t)}return(0,w.DB)(null)}));return null!==W.Z.applicationCache&&(W.Z.applicationCache.setLayerInfo(e,t),t=t.catch((t=>{throw W.Z.applicationCache.clearLayerInfo(e),t}))),t}(e+"/"+n).then((r=>{if(r.systemLayers&&void 0!==r.systemLayers.associationsTableId&&null!==r.systemLayers.associationsTableId){const s=[];return i.unVersion>=4&&(s.push("STATUS"),s.push("PERCENTALONG")),$(e+"/"+r.systemLayers.associationsTableId.toString(),t,["OBJECTID","FROMNETWORKSOURCEID","TONETWORKSOURCEID","FROMGLOBALID","TOGLOBALID","TOTERMINALID","FROMTERMINALID","ASSOCIATIONTYPE","ISCONTENTVISIBLE","GLOBALID",...s],!1,null,null).then((e=>e.load())).then((e=>i.unVersion>=4?(e=e.filter(g.WhereClause.create("STATUS NOT IN (1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 31, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 54, 55, 57, 58, 59, 60, 61, 62,63)",e.getFieldsIndex()))).load():e)).then((e=>({lkp:i.lkp,associations:e,unVersion:i.unVersion,terminals:i.terminals})))}return{associations:null,unVersion:i.unVersion,lkp:null,terminals:[]}}))}return{associations:null,unVersion:i.unVersion,lkp:null,terminals:[]}}))}return{associations:null,unVersion:i.unVersion,lkp:null,terminals:[]}}))}function ee(e,t,i,r=null,s=null,n=!0,a=null,l=null){let o=e.serviceUrl();return o?(o="/"===o.charAt(o.length-1)?o+t.relatedTableId.toString():o+"/"+t.relatedTableId.toString(),$(o,r,s,n,a,l).then((o=>new M({layer:e,relatedLayer:o,relationship:t,objectId:i,spatialReference:r,outFields:s,includeGeometry:n,lrucache:a,interceptor:l})))):null}a.Z.registerAction(),C.registerAction(),h.Z.registerAction(),x.Z.registerAction(),D.Z.registerAction();class te extends n.Z{constructor(e,t=null,i=null,r=null){super(),this._map=e,this._overridespref=t,this.lrucache=i,this.interceptor=r,this._instantLayers=[]}_makeAndAddFeatureSet(e,t=!0,i=null){const r=H(e,this._overridespref,null===i?["*"]:i,t,this.lrucache,this.interceptor);return this._instantLayers.push({featureset:r,opitem:e,includeGeometry:t,outFields:JSON.stringify(i)}),r}featureSetByName(e,t=!0,i=null){if(void 0!==this._map.loaded&&void 0!==this._map.load&&!1===this._map.loaded)return this._map.load().then((()=>{try{return this.featureSetByName(e,t,i)}catch(e){return(0,w.d1)(e)}}));null===i&&(i=["*"]),i=(i=i.slice(0)).sort();const r=JSON.stringify(i);for(let i=0;i<this._instantLayers.length;i++){const s=this._instantLayers[i];if(s.opitem.title===e&&s.includeGeometry===t&&s.outFields===r)return this.resolvePromise(this._instantLayers[i].featureset)}const s=this._map.layers.find((t=>t instanceof T.default&&t.title===e));if(s)return this.resolvePromise(this._makeAndAddFeatureSet(s,t,i));if(this._map.tables){const r=this._map.tables.find((t=>!!(t.title&&t.title===e||t.title&&t.title===e)));if(r){if(r instanceof T.default)return this.resolvePromise(this._makeAndAddFeatureSet(r,t,i));if(r._materializedTable);else{const e=r.outFields?r:{...r,outFields:["*"]};r._materializedTable=new T.default(e)}return r._materializedTable.load().then((()=>this.resolvePromise(this._makeAndAddFeatureSet(r._materializedTable,t,i))))}}return this.resolvePromise(null)}featureSetById(e,t=!0,i=["*"]){if(void 0!==this._map.loaded&&void 0!==this._map.load&&!1===this._map.loaded)return this._map.load().then((()=>{try{return this.featureSetById(e,t,i)}catch(e){return(0,w.d1)(e)}}));null===i&&(i=["*"]),i=(i=i.slice(0)).sort();const r=JSON.stringify(i);for(let i=0;i<this._instantLayers.length;i++){const s=this._instantLayers[i];if(s.opitem.id===e&&s.includeGeometry===t&&s.outFields===r)return this.resolvePromise(this._instantLayers[i].featureset)}const s=this._map.layers.find((t=>t instanceof T.default&&t.id===e));if(s)return this.resolvePromise(this._makeAndAddFeatureSet(s,t,i));if(this._map.tables){const r=this._map.tables.find((t=>t.id===e));if(r){if(r instanceof T.default)return this.resolvePromise(this._makeAndAddFeatureSet(r,t,i));if(r._materializedTable);else{const e={...r,outFields:["*"]};r._materializedTable=new T.default(e)}return r._materializedTable.load().then((()=>this.resolvePromise(this._makeAndAddFeatureSet(r._materializedTable,t,i))))}}return this.resolvePromise(null)}}class ie extends n.Z{constructor(e,t=null,i=null,r=null){super(),this._url=e,this._overridespref=t,this.lrucache=i,this.interceptor=r,this.metadata=null,this._instantLayers=[]}get url(){return this._url}_makeAndAddFeatureSet(e,t=!0,i=null){const r=H(e,this._overridespref,null===i?["*"]:i,t,this.lrucache);return this._instantLayers.push({featureset:r,opitem:e,includeGeometry:t,outFields:JSON.stringify(i)}),r}_loadMetaData(){return X(this._url).then((e=>(this.metadata=e,e)))}load(){return this._loadMetaData()}clone(){return new ie(this._url,this._overridespref,this.lrucache,this.interceptor)}featureSetByName(e,t=!0,i=null){null===i&&(i=["*"]),i=(i=i.slice(0)).sort();const r=JSON.stringify(i);for(let i=0;i<this._instantLayers.length;i++){const s=this._instantLayers[i];if(s.opitem.title===e&&s.includeGeometry===t&&s.outFields===r)return this.resolvePromise(this._instantLayers[i].featureset)}return this._loadMetaData().then((r=>{let s=null;for(const t of r.layers?r.layers:[])t.name===e&&(s=t);if(!s)for(const t of r.tables?r.tables:[])t.name===e&&(s=t);return s?K(this._url+"/"+s.id,["*"]).then((e=>this._makeAndAddFeatureSet(e,t,i))):this.resolvePromise(null)}))}featureSetById(e,t=!0,i=["*"]){null===i&&(i=["*"]),i=(i=i.slice(0)).sort();const r=JSON.stringify(i);e=null!=e?e.toString():"";for(let i=0;i<this._instantLayers.length;i++){const s=this._instantLayers[i];if(s.opitem.id===e&&s.includeGeometry===t&&s.outFields===r)return this.resolvePromise(this._instantLayers[i].featureset)}return this._loadMetaData().then((r=>{let s=null;for(const t of r.layers?r.layers:[])null!==t.id&&void 0!==t.id&&t.id.toString()===e&&(s=t);if(!s)for(const t of r.tables?r.tables:[])null!==t.id&&void 0!==t.id&&t.id.toString()===e&&(s=t);return s?K(this._url+"/"+s.id,["*"]).then((e=>this._makeAndAddFeatureSet(e,t,i))):this.resolvePromise(null)}))}}function re(e,t,i=null,r=null){return new te(e,t,i,r)}function se(e,t,i=null,r=null){return new ie(e,t,i,r)}function ne(e,t){return null===e?t:new V.Z({url:e.field("url")})}function ae(e,t,i){return r.id.findCredential(e.restUrl)?"loaded"===e.loadStatus&&""===t&&e.user&&e.user.sourceJSON&&!1===i?(0,w.DB)(e.user.sourceJSON):""===t?(0,s.default)(e.restUrl+"/community/self",{responseType:"json",query:{f:"json",...!1===i?{}:{returnUserLicenseTypeExtensions:!0}}}).then((e=>{if(e.data){const t=e.data;if(t&&t.username)return(0,w.DB)(t)}return(0,w.DB)(null)})):(0,s.default)(e.restUrl+"/community/users/"+t,{responseType:"json",query:{f:"json"}}).then((e=>{if(e.data){const t=e.data;return t.error?null:(0,w.DB)(t)}return(0,w.DB)(null)})):(0,w.DB)(null)}function le(e,t,i,r,s){if(null===e)return null;if(e instanceof T.default){switch(t){case"datasource":return H(e,s,e.outFields,!0,i,r).getDataSourceFeatureSet();case"parent":case"root":return H(e,s,e.outFields,!0,i,r)}return null}if(e instanceof d.Z)switch(t){case"datasource":return e.getDataSourceFeatureSet();case"parent":return e;case"root":return e.getRootFeatureSet()}return null}function oe(e,t,i,r,s,n,a,l=null){if(W.Z.applicationCache){const o=W.Z.applicationCache.getLayerInfo(e+":"+n.url);if(o)return o.then((e=>{try{const n=new T.default({url:(0,f.US)(e.url)+"/"+t,outFields:["*"]});return(0,w.DB)(H(n,i,r,s,a,l))}catch(e){return(0,w.d1)(e)}}),(e=>(0,w.d1)(e)))}return(0,w.Ue)(((o,u)=>{const h=new J.default({id:e,portal:n}).load();W.Z.applicationCache&&W.Z.applicationCache.setLayerInfo(e+":"+n.url,h),h.then((e=>{try{const n=new T.default({url:(0,f.US)(e.url)+"/"+t,outFields:["*"]});o(H(n,i,r,s,a,l))}catch(e){u(e)}}),(t=>{W.Z.applicationCache&&W.Z.applicationCache.clearLayerInfo(e+":"+n.url),u(t)}))}))}},70409:(e,t,i)=>{i.d(t,{Xx:()=>g,QP:()=>f,$X:()=>p,yN:()=>_,TO:()=>y});var r=i(1692),s=i(77286),n=i(91136),a=i(90961),l=i(90658),o=i(36515),u=i(95330),h=i(41534),d=i(82971);class c{constructor(e){this.field=e,this.sqlRewritable=!1}postInitialization(e,t){}}class p extends c{constructor(e){super(e),this.sqlRewritable=!0}extractValue(e){return e.attributes[this.field.name]}rewriteSql(e){return{rewritten:this.sqlRewritable,where:e}}}class f extends c{constructor(e,t,i){super((0,l.JW)(e)),this.originalField=e,this.sqlRewritable=!0,this.field.name=t,this.field.alias=i}rewriteSql(e,t){return{rewritten:this.sqlRewritable,where:(0,o.bB)(e,this.field.name,this.originalField.name,t.getFieldsIndex())}}extractValue(e){return e.attributes[this.originalField.name]}}class y extends c{constructor(e,t,i){super(e),this.codefield=t,this.lkp=i,this.reverseLkp={};for(const e in i)this.reverseLkp[i[e]]=e;this.sqlRewritable=!0}rewriteSql(e,t){const i=this.evaluateNodeToWhereClause(e.parseTree,l.Bj.Standardised,this.field.name,this.codefield instanceof h.WhereClause?(0,o.zR)(this.codefield,l.Bj.Standardised):this.codefield,e.parameters);return i.indexOf(y.BADNESS)>=0?{rewritten:!1,where:e}:{rewritten:this.sqlRewritable,where:h.WhereClause.create(i,t._parent.getFieldsIndex())}}evaluateNodeToWhereClause(e,t,i=null,r=null,s){let n,a,l,u;switch(e.type){case"interval":return(0,o.TE)(this.evaluateNodeToWhereClause(e.value,t,i,r,s),e.qualifier,e.op);case"case_expression":{let r=" CASE ";"simple"===e.format&&(r+=this.evaluateNodeToWhereClause(e.operand,t,i,y.BADNESS,s));for(let n=0;n<e.clauses.length;n++)r+=" WHEN "+this.evaluateNodeToWhereClause(e.clauses[n].operand,t,i,y.BADNESS,s)+" THEN "+this.evaluateNodeToWhereClause(e.clauses[n].value,t,i,y.BADNESS,s);return null!==e.else&&(r+=" ELSE "+this.evaluateNodeToWhereClause(e.else,t,i,y.BADNESS,s)),r+=" END ",r}case"param":{const i=s[e.value.toLowerCase()];if("string"==typeof i)return"'"+s[e.value.toLowerCase()].toString().replace(/'/g,"''")+"'";if(i instanceof Date)return(0,o.oX)(i,t);if(i instanceof Array){const e=[];for(let r=0;r<i.length;r++)"string"==typeof i[r]?e.push("'"+i[r].toString().replace(/'/g,"''")+"'"):i[r]instanceof Date?e.push((0,o.oX)(i[r],t)):e.push(i[r].toString());return e}return i.toString()}case"expr_list":a=[];for(const n of e.value)a.push(this.evaluateNodeToWhereClause(n,t,i,r,s));return a;case"unary_expr":return" ( NOT "+this.evaluateNodeToWhereClause(e.expr,t,i,y.BADNESS,s)+" ) ";case"binary_expr":switch(e.operator){case"AND":return" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,s)+" AND "+this.evaluateNodeToWhereClause(e.right,t,i,r,s)+") ";case"OR":return" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,s)+" OR "+this.evaluateNodeToWhereClause(e.right,t,i,r,s)+") ";case"IS":if("null"!==e.right.type)throw new Error("Unsupported RHS for IS");return" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,s)+" IS NULL )";case"ISNOT":if("null"!==e.right.type)throw new Error("Unsupported RHS for IS");return" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,s)+" IS NOT NULL )";case"IN":if(n=[],"expr_list"===e.right.type){if("column_ref"===e.left.type&&e.left.column.toUpperCase()===this.field.name.toUpperCase()){const n=[];let a=!0;for(const t of e.right.value){if("string"!==t.type){a=!1;break}if(void 0===this.lkp[t.value]){a=!1;break}n.push(this.lkp[t.value].toString())}if(a)return" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,s)+" IN ("+n.join(",")+")) "}return n=this.evaluateNodeToWhereClause(e.right,t,i,r,s)," ("+this.evaluateNodeToWhereClause(e.left,t,i,r,s)+" IN ("+n.join(",")+")) "}return u=this.evaluateNodeToWhereClause(e.right,t,i,r,s),u instanceof Array?" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,s)+" IN ("+u.join(",")+")) ":" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,s)+" IN ("+u+")) ";case"NOT IN":if(n=[],"expr_list"===e.right.type){if("column_ref"===e.left.type&&e.left.column.toUpperCase()===this.field.name.toUpperCase()){const n=[];let a=!0;for(const t of e.right.value){if("string"!==t.type){a=!1;break}if(void 0===this.lkp[t.value]){a=!1;break}n.push(this.lkp[t.value].toString())}if(a)return" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,s)+" NOT IN ("+n.join(",")+")) "}return n=this.evaluateNodeToWhereClause(e.right,t,i,r,s)," ("+this.evaluateNodeToWhereClause(e.left,t,i,r,s)+" NOT IN ("+n.join(",")+")) "}return u=this.evaluateNodeToWhereClause(e.right,t,i,r,s),u instanceof Array?" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,s)+" NOT IN ("+u.join(",")+")) ":" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,s)+" NOT IN ("+u+")) ";case"BETWEEN":return l=this.evaluateNodeToWhereClause(e.right,t,i,y.BADNESS,s)," ("+this.evaluateNodeToWhereClause(e.left,t,i,y.BADNESS,s)+" BETWEEN "+l[0]+" AND "+l[1]+" ) ";case"NOTBETWEEN":return l=this.evaluateNodeToWhereClause(e.right,t,i,y.BADNESS,s)," ("+this.evaluateNodeToWhereClause(e.left,t,i,y.BADNESS,s)+" NOT BETWEEN "+l[0]+" AND "+l[1]+" ) ";case"LIKE":return""!==e.escape?" ("+this.evaluateNodeToWhereClause(e.left,t,i,y.BADNESS,s)+" LIKE "+this.evaluateNodeToWhereClause(e.right,t,i,y.BADNESS,s)+" ESCAPE '"+e.escape+"') ":" ("+this.evaluateNodeToWhereClause(e.left,t,i,y.BADNESS,s)+" LIKE "+this.evaluateNodeToWhereClause(e.right,t,i,y.BADNESS,s)+") ";case"NOT LIKE":return""!==e.escape?" ("+this.evaluateNodeToWhereClause(e.left,t,i,y.BADNESS,s)+" NOT LIKE "+this.evaluateNodeToWhereClause(e.right,t,i,y.BADNESS,s)+" ESCAPE '"+e.escape+"') ":" ("+this.evaluateNodeToWhereClause(e.left,t,i,y.BADNESS,s)+" NOT LIKE "+this.evaluateNodeToWhereClause(e.right,t,i,y.BADNESS,s)+") ";case"<>":case"=":if("column_ref"===e.left.type&&"string"===e.right.type){if(e.left.column.toUpperCase()===this.field.name.toUpperCase()&&void 0!==this.lkp[e.right.value.toString()])return" ("+r+" "+e.operator+" "+this.lkp[e.right.value.toString()].toString()+") "}else if("column_ref"===e.right.type&&"string"===e.left.type&&e.right.column.toUpperCase()===this.field.name.toUpperCase())return" ("+this.lkp[e.right.value.toString()].toString()+" "+e.operator+" "+r+") ";return" ("+this.evaluateNodeToWhereClause(e.left,t,i,y.BADNESS,s)+" "+e.operator+" "+this.evaluateNodeToWhereClause(e.right,t,i,y.BADNESS,s)+") ";case"<":case">":case">=":case"<=":case"*":case"-":case"+":case"/":return" ("+this.evaluateNodeToWhereClause(e.left,t,i,y.BADNESS,s)+" "+e.operator+" "+this.evaluateNodeToWhereClause(e.right,t,i,y.BADNESS,s)+") "}throw new Error("Not Supported Operator "+e.operator);case"null":return"null";case"bool":return!0===e.value?"1":"0";case"string":return"'"+e.value.toString().replace(/'/g,"''")+"'";case"timestamp":case"date":return(0,o.oX)(e.value,t);case"number":return e.value.toString();case"current_time":return(0,o.vR)("date"===e.mode,t);case"column_ref":return i&&i.toLowerCase()===e.column.toLowerCase()?"("+r+")":e.column;case"function":{const r=this.evaluateNodeToWhereClause(e.args,t,i,y.BADNESS,s);return(0,o.fz)(e.name,r,t)}}throw new Error("Unsupported sql syntax "+e.type)}extractValue(e){return this.codefield instanceof h.WhereClause?this.reverseLkp[this.codefield.calculateValueCompiled(e)]:this.reverseLkp[e.attributes[this.codefield]]}}y.BADNESS="_!!!_BAD_LKP_!!!!";class _ extends c{constructor(e,t){super(e),this.sql=t}rewriteSql(e,t){return{rewritten:!0,where:(0,o.bB)(e,this.field.name,(0,o.zR)(this.sql,l.Bj.Standardised),t.getFieldsIndex())}}extractValue(e){return this.sql.calculateValueCompiled(e)}}class g extends n.Z{constructor(e){super(e),this._calcFunc=null,this.declaredClass="esri.arcade.featureset.actions.Adapted",this.adaptedFields=null,this._extraFilter=null,this._extraFilter=e.extraFilter,this._parent=e.parentfeatureset,this._maxProcessing=30,this.adaptedFields=e.adaptedFields}static findField(e,t){for(const i of e)if(i.name.toLowerCase()===t.toString().toLowerCase())return i;return null}_initialiseFeatureSet(){null!==this._parent?(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.spatialReference=new d.Z({wkid:4326}),this.objectIdField="",this.globalIdField="",this.geometryType=l.Qk.point,this.typeIdField="",this.types=null),this.fields=[];for(const e of this.adaptedFields)e.postInitialization(this,this._parent),this.fields.push(e.field)}_getSet(e){return null===this._wset?this._ensureLoaded().then((()=>this._extraFilter?this._getFilteredSet("",null,null,null,e):this._parent._getSet(e))).then((t=>(this._checkCancelled(e),this._wset=new a.Z(t._candidates.slice(0),t._known.slice(0),t._ordered,this._clonePageDefinition(t.pagesDefinition)),this._wset))):(0,u.DB)(this._wset)}_isInFeatureSet(e){return this._parent._isInFeatureSet(e)}_getFeatures(e,t,i,n){const l=[];-1!==t&&void 0===this._featureCache[t]&&l.push(t);const o=this._maxQueryRate();if(!0===this._checkIfNeedToExpandKnownPage(e,o))return this._expandPagedSet(e,o,0,0,n).then((()=>this._getFeatures(e,t,i,n)));let h=0;for(let r=e._lastFetchedIndex;r<e._known.length&&(h++,h<=i&&(e._lastFetchedIndex+=1),!(void 0===this._featureCache[e._known[r]]&&(e._known[r]!==t&&l.push(e._known[r]),l.length>=o)));r++);if(0===l.length)return(0,u.DB)("success");e=new a.Z([],l,e._ordered,null);const d=Math.min(l.length,i);return this._parent._getFeatures(e,-1,d,n).then((()=>{this._checkCancelled(n);const e=[];for(let t=0;t<d;t++){const i=this._parent._featureFromCache(l[t]);void 0!==i&&e.push({geometry:i.geometry,attributes:i.attributes,id:l[t]})}for(const t of e){const e=[];for(const i of this.adaptedFields)e[i.field.name]=i.extractValue(t);this._featureCache[t.id]=new r.Z({attributes:e,geometry:(0,s.r1)(t.geometry)})}return"success"}))}_fetchAndRefineFeatures(){return(0,u.d1)(new Error("Fetch and Refine should not be called in this featureset"))}_getFilteredSet(e,t,i,r,s){let n=!1;const l=this._reformulateWithoutAdaptions(i);n=l.cannot,i=l.where;let u=!1;if(null!==r){u=!0;const e=[];for(const t of this.adaptedFields)if(!(t instanceof p)&&!0===r.scanForField(t.field.name)){if(!(t instanceof f)){r=null,u=!1;break}e.push({field:t.field.name,newfield:t.originalField.name})}r&&e.length>0&&(r=r.replaceFields(e))}return null!==i?null!==this._extraFilter&&(i=(0,o.$e)(this._extraFilter,i)):i=this._extraFilter,this._ensureLoaded().then((()=>this._parent._getFilteredSet(e,t,i,r,s))).then((e=>{let t;return this._checkCancelled(s),t=!0===n?new a.Z(e._candidates.slice(0).concat(e._known.slice(0)),[],!0===u&&e._ordered,this._clonePageDefinition(e.pagesDefinition)):new a.Z(e._candidates.slice(0),e._known.slice(0),!0===u&&e._ordered,this._clonePageDefinition(e.pagesDefinition)),t}))}_reformulateWithoutAdaptions(e){const t={cannot:!1,where:e};if(null!==e)for(const i of this.adaptedFields)if(!0===(0,o.hq)(e,i.field.name)){const r=i.rewriteSql(e,this);if(!0!==r.rewritten){t.cannot=!0,t.where=null;break}t.where=r.where}return t}_stat(e,t,i,r,s,n,a){let l=!1,h=this._reformulateWithoutAdaptions(t);return l=h.cannot,t=h.where,h=this._reformulateWithoutAdaptions(s),l=l||h.cannot,null!==(s=h.where)?null!==this._extraFilter&&(s=(0,o.$e)(this._extraFilter,s)):s=this._extraFilter,!0===l?null===s&&""===i&&null===r?this._manualStat(e,t,n,a):(0,u.DB)({calculated:!1}):this._parent._stat(e,t,i,r,s,n,a).then((l=>!1===l.calculated?null===s&&""===i&&null===r?this._manualStat(e,t,n,a):{calculated:!1}:l))}_canDoAggregates(e,t,i,r,s){if(null===this._parent)return(0,u.DB)(!1);for(let t=0;t<e.length;t++)for(const i of this.adaptedFields)if(e[t].toLowerCase()===i.field.name.toLowerCase()&&!(i instanceof p))return(0,u.DB)(!1);const n=[];for(let e=0;e<t.length;e++){const i=t[e];if(null!==i.workingexpr){const e=this._reformulateWithoutAdaptions(i.workingexpr);if(e.cannot)return(0,u.DB)(!1);const t=i.clone();t.workingexpr=e.where,n.push(t)}else n.push(i)}const a=this._reformulateWithoutAdaptions(s);return a.cannot?(0,u.DB)(!1):(null!==(s=a.where)?null!==this._extraFilter&&(s=(0,o.$e)(this._extraFilter,s)):s=this._extraFilter,this._parent._canDoAggregates(e,n,i,r,s))}_getAggregatePagesDataSourceDefinition(e,t,i,r,s,n,a){if(null===this._parent)return(0,u.d1)(new Error("Should never be called"));const l=[];for(let e=0;e<t.length;e++){const i=t[e];if(null!==i.workingexpr){const e=this._reformulateWithoutAdaptions(i.workingexpr);if(e.cannot)return(0,u.d1)(new Error("Should never be called"));const t=i.clone();t.workingexpr=e.where,l.push(t)}else l.push(i)}const h=this._reformulateWithoutAdaptions(s);return h.cannot?(0,u.d1)(new Error("Should never be called")):(null!==(s=h.where)?null!==this._extraFilter&&(s=(0,o.$e)(this._extraFilter,s)):s=this._extraFilter,this._parent._getAggregatePagesDataSourceDefinition(e,l,i,r,s,n,a))}}},84328:(e,t,i)=>{i.d(t,{Z:()=>h});var r=i(91136),s=i(90961),n=i(90658),a=i(36515),l=i(95330),o=i(41534),u=i(82971);class h extends r.Z{constructor(e){super(e),this.declaredClass="esri.arcade.featureset.actions.AttributeFilter",this._maxProcessing=1e3,this._parent=e.parentfeatureset,e.whereclause instanceof o.WhereClause?(this._whereclause=e.whereclause,this._whereClauseFunction=null):(this._whereClauseFunction=e.whereclause,this._whereclause=null)}_initialiseFeatureSet(){null!==this._parent?(this.fields=this._parent.fields.slice(0),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.fields=[],this.typeIdField="",this.objectIdField="",this.globalIdField="",this.spatialReference=new u.Z({wkid:4326}),this.geometryType=n.Qk.point)}_getSet(e){return null===this._wset?this._ensureLoaded().then((()=>this._parent._getFilteredSet("",null,this._whereclause,null,e))).then((t=>(this._checkCancelled(e),null!==this._whereClauseFunction?this._wset=new s.Z(t._candidates.slice(0).concat(t._known.slice(0)),[],t._ordered,this._clonePageDefinition(t.pagesDefinition)):this._wset=new s.Z(t._candidates.slice(0),t._known.slice(0),t._ordered,this._clonePageDefinition(t.pagesDefinition)),this._wset))):(0,l.DB)(this._wset)}_isInFeatureSet(e){let t=this._parent._isInFeatureSet(e);return t===n.dj.NotInFeatureSet?t:(t=this._idstates[e],void 0===t?n.dj.Unknown:t)}_getFeature(e,t,i){return this._parent._getFeature(e,t,i)}_getFeatures(e,t,i,r){return this._parent._getFeatures(e,t,i,r)}_featureFromCache(e){return this._parent._featureFromCache(e)}executeWhereClause(e){return this._whereclause.testFeature(e)}executeWhereClauseDeferred(e){if(null!==this._whereClauseFunction)try{const t=this._whereClauseFunction(e);return(0,l.y8)(t)?t:(0,l.DB)(t)}catch(e){return(0,l.d1)(e)}return(0,l.DB)(this.executeWhereClause(e))}_fetchAndRefineFeatures(e,t,i){const r=new s.Z([],e,!1,null),a=Math.min(t,e.length);return this._parent._getFeatures(r,-1,a,i).then((()=>{if(this._checkCancelled(i),null==this._whereClauseFunction){for(let t=0;t<a;t++){const i=this._parent._featureFromCache(e[t]);!0===this.executeWhereClause(i)?this._idstates[e[t]]=n.dj.InFeatureSet:this._idstates[e[t]]=n.dj.NotInFeatureSet}return"success"}const r=[];for(let t=0;t<a;t++){const i=this._parent._featureFromCache(e[t]);r.push(this.executeWhereClauseDeferred(i))}return(0,l.$6)(r).then((i=>{for(let r=0;r<t;r++)!0===i[r]?this._idstates[e[r]]=n.dj.InFeatureSet:this._idstates[e[r]]=n.dj.NotInFeatureSet;return"success"}))}))}_getFilteredSet(e,t,i,r,n){return null!==this._whereClauseFunction||(null!==i?null!==this._whereclause&&(i=(0,a.$e)(this._whereclause,i)):i=this._whereclause),this._ensureLoaded().then((()=>this._parent._getFilteredSet(e,t,i,r,n))).then((e=>{let t;return this._checkCancelled(n),t=null!==this._whereClauseFunction?new s.Z(e._candidates.slice(0).concat(e._known.slice(0)),[],e._ordered,this._clonePageDefinition(e.pagesDefinition)):new s.Z(e._candidates.slice(0),e._known.slice(0),e._ordered,this._clonePageDefinition(e.pagesDefinition)),t}))}_stat(e,t,i,r,s,n,o){if(null!==this._whereClauseFunction)return null===s&&""===i&&null===r?this._manualStat(e,t,n,o):(0,l.DB)({calculated:!1});let u=this._whereclause;return null!==s&&null!==this._whereclause&&(u=(0,a.$e)(this._whereclause,s)),this._parent._stat(e,t,i,r,u,n,o).then((a=>!1===a.calculated?null===s&&""===i&&null===r?this._manualStat(e,t,n,o):{calculated:!1}:a))}_canDoAggregates(e,t,i,r,s){return null!==this._whereClauseFunction?(0,l.DB)(!1):(null!==s?null!==this._whereclause&&(s=(0,a.$e)(this._whereclause,s)):s=this._whereclause,null===this._parent?(0,l.DB)(!1):this._parent._canDoAggregates(e,t,i,r,s))}_getAggregatePagesDataSourceDefinition(e,t,i,r,s,n,o){return null===this._parent?(0,l.d1)(new Error("Should never be called")):(null!==s?null!==this._whereclause&&(s=(0,a.$e)(this._whereclause,s)):s=this._whereclause,this._parent._getAggregatePagesDataSourceDefinition(e,t,i,r,s,n,o))}static registerAction(){r.Z._featuresetFunctions.filter=function(e){if("function"==typeof e)return new h({parentfeatureset:this,whereclause:e});let t=null;return e instanceof o.WhereClause&&(t=e),new h({parentfeatureset:this,whereclause:t})}}}},85065:(e,t,i)=>{i.d(t,{Z:()=>o});var r=i(61363),s=i(91136),n=i(90961),a=i(3823),l=i(95330);class o extends s.Z{constructor(e){super(e),this._orderbyclause=null,this.declaredClass="esri.arcade.featureset.actions.OrderBy",this._maxProcessing=100,this._orderbyclause=e.orderbyclause,this._parent=e.parentfeatureset}_getSet(e){return null===this._wset?this._ensureLoaded().then((()=>this._getFilteredSet("",null,null,this._orderbyclause,e))).then((t=>(this._checkCancelled(e),this._wset=t,this._wset))):(0,l.DB)(this._wset)}manualOrderSet(e,t){return this.getIdColumnDictionary(e,[],-1,t).then((e=>{this._orderbyclause.order(e);const t=new n.Z([],[],!0,null);for(let i=0;i<e.length;i++)t._known.push(e[i].id);return t}))}getIdColumnDictionary(e,t,i,s){if(i<e._known.length-1){const n=this._maxQueryRate();if("GETPAGES"===e._known[i+1])return(0,r.U)(this._parent._expandPagedSet(e,n,0,0,s)).then((()=>this.getIdColumnDictionary(e,t,i,s)));let a=i+1;const l=[];for(;a<e._known.length&&"GETPAGES"!==e._known[a];)l.push(e._known[a]),a++;return i+=l.length,(0,r.U)(this._parent._getFeatureBatch(l,s)).then((r=>{this._checkCancelled(s);for(const e of r)t.push({id:e.attributes[this.objectIdField],feature:e});return this.getIdColumnDictionary(e,t,i,s)}))}return e._candidates.length>0?(0,r.U)(this._refineSetBlock(e,this._maxProcessingRate(),s)).then((()=>(this._checkCancelled(s),this.getIdColumnDictionary(e,t,i,s)))):(0,l.DB)(t)}_isInFeatureSet(e){return this._parent._isInFeatureSet(e)}_getFeatures(e,t,i,r){return this._parent._getFeatures(e,t,i,r)}_featureFromCache(e){if(void 0===this._featureCache[e]){const t=this._parent._featureFromCache(e);if(void 0===t)return;return null===t?null:(this._featureCache[e]=t,t)}return this._featureCache[e]}_fetchAndRefineFeatures(){return(0,l.d1)(new Error("Fetch and Refine should not be called in this featureset"))}_getFilteredSet(e,t,i,r,s){return this._ensureLoaded().then((()=>this._parent._getFilteredSet(e,t,i,null===r?this._orderbyclause:r,s))).then((e=>{this._checkCancelled(s);const r=new n.Z(e._candidates.slice(0),e._known.slice(0),e._ordered,this._clonePageDefinition(e.pagesDefinition));let a=!0;return e._candidates.length>0&&(a=!1),!1===r._ordered?this.manualOrderSet(r,s).then((e=>(!1===a&&(null===t&&null===i||(e=new n.Z(e._candidates.slice(0).concat(e._known.slice(0)),[],e._ordered,this._clonePageDefinition(e.pagesDefinition)))),e))):r}))}static registerAction(){s.Z._featuresetFunctions.orderBy=function(e){return""===e?this:new o({parentfeatureset:this,orderbyclause:new a.Z(e)})}}}},63991:(e,t,i)=>{i.d(t,{Z:()=>l});var r=i(91136),s=i(90961),n=i(90658),a=i(95330);class l extends r.Z{constructor(e){super(e),this._topnum=0,this.declaredClass="esri.arcade.featureset.actions.Top",this._countedin=0,this._maxProcessing=100,this._topnum=e.topnum,this._parent=e.parentfeatureset}_getSet(e){return null===this._wset?this._ensureLoaded().then((()=>this._parent._getSet(e))).then((e=>(this._wset=new s.Z(e._candidates.slice(0),e._known.slice(0),!1,this._clonePageDefinition(e.pagesDefinition)),this._setKnownLength(this._wset)>this._topnum&&(this._wset._known=this._wset._known.slice(0,this._topnum)),this._setKnownLength(this._wset)>=this._topnum&&(this._wset._candidates=[]),this._wset))):(0,a.DB)(this._wset)}_setKnownLength(e){return e._known.length>0&&"GETPAGES"===e._known[e._known.length-1]?e._known.length-1:e._known.length}_isInFeatureSet(e){const t=this._parent._isInFeatureSet(e);if(t===n.dj.NotInFeatureSet)return t;const i=this._idstates[e];return i===n.dj.InFeatureSet||i===n.dj.NotInFeatureSet?i:t===n.dj.InFeatureSet&&void 0===i?this._countedin<this._topnum?(this._idstates[e]=n.dj.InFeatureSet,this._countedin++,n.dj.InFeatureSet):(this._idstates[e]=n.dj.NotInFeatureSet,n.dj.NotInFeatureSet):n.dj.Unknown}_expandPagedSet(e,t,i,r,s){if(null===this._parent)return(0,a.d1)(new Error("Parent Paging not implemented"));if(t>this._topnum&&(t=this._topnum),this._countedin>=this._topnum&&e.pagesDefinition.internal.set.length<=e.pagesDefinition.resultOffset){let t=e._known.length;return t>0&&"GETPAGES"===e._known[t-1]&&(e._known.length=t-1),t=e._candidates.length,t>0&&"GETPAGES"===e._candidates[t-1]&&(e._candidates.length=t-1),(0,a.DB)("success")}return this._parent._expandPagedSet(e,t,i,r,s).then((t=>(this._setKnownLength(e)>this._topnum&&(e._known.length=this._topnum),this._setKnownLength(e)>=this._topnum&&(e._candidates.length=0),t)))}_getFeatures(e,t,i,r){const n=[],l=this._maxQueryRate();if(!0===this._checkIfNeedToExpandKnownPage(e,l))return this._expandPagedSet(e,l,0,0,r).then((()=>this._getFeatures(e,t,i,r)));-1!==t&&void 0===this._featureCache[t]&&n.push(t);let o=0;for(let r=e._lastFetchedIndex;r<e._known.length&&(o++,o<=i&&(e._lastFetchedIndex+=1),!(void 0===this._featureCache[e._known[r]]&&(e._known[r]!==t&&n.push(e._known[r]),n.length>l)));r++);if(0===n.length)return(0,a.DB)("success");const u=new s.Z([],n,!1,null),h=Math.min(n.length,i);return this._parent._getFeatures(u,-1,h,r).then((()=>{for(let e=0;e<h;e++){const t=this._parent._featureFromCache(n[e]);void 0!==t&&(this._featureCache[n[e]]=t)}return"success"}))}_getFilteredSet(e,t,i,r,n){return this._ensureLoaded().then((()=>this._getSet(n))).then((e=>new s.Z(e._candidates.slice(0).concat(e._known.slice(0)),[],!1,this._clonePageDefinition(e.pagesDefinition))))}_refineKnowns(e,t){let i=0,r=null;const s=[];for(let a=0;a<e._candidates.length;a++){const l=this._isInFeatureSet(e._candidates[a]);if(l===n.dj.InFeatureSet){if(e._known.push(e._candidates[a]),i+=1,null===r?r={start:a,end:a}:r.end===a-1?r.end=a:(s.push(r),r={start:a,end:a}),e._known.length>=this._topnum)break}else if(l===n.dj.NotInFeatureSet)null===r?r={start:a,end:a}:r.end===a-1?r.end=a:(s.push(r),r={start:a,end:a}),i+=1;else if(l===n.dj.Unknown)break;if(i>=t)break}null!==r&&s.push(r);for(let t=s.length-1;t>=0;t--)e._candidates.splice(s[t].start,s[t].end-s[t].start+1);this._setKnownLength(e)>this._topnum&&(e._known=e._known.slice(0,this._topnum)),this._setKnownLength(e)>=this._topnum&&(e._candidates=[])}_stat(){return(0,a.DB)({calculated:!1})}_canDoAggregates(){return(0,a.DB)(!1)}static registerAction(){r.Z._featuresetFunctions.top=function(e){return new l({parentfeatureset:this,topnum:e})}}}},17805:(e,t,i)=>{i.d(t,{Z:()=>f});var r=i(1692),s=i(91136),n=i(90961),a=i(90658),l=i(36515),o=i(95330),u=i(9361),h=i(67284),d=i(16451),c=i(1231),p=i(57444);class f extends s.Z{constructor(e){super(e),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerMemory",this._removeGeometry=!1,this._overrideFields=null,this._forceIsTable=!1,e.spatialReference&&(this.spatialReference=e.spatialReference),this._transparent=!0,this._maxProcessing=1e3,this._layer=e.layer,this._wset=null,!0===e.isTable&&(this._forceIsTable=!0),void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry)}_maxQueryRate(){return a.tI}end(){return this._layer}optimisePagingFeatureQueries(){}load(){return null===this._loadPromise&&(this._loadPromise=(0,o.Ue)(((e,t)=>{if(!0===this._layer.loaded)return this._initialiseFeatureSet(),void e(this);this._layer.when().then((()=>{try{this._initialiseFeatureSet(),e(this)}catch(e){t(e)}}),t),this._layer.load()}))),this._loadPromise}get gdbVersion(){return""}_initialiseFeatureSet(){if(null==this.spatialReference&&(this.spatialReference=this._layer.spatialReference),this.geometryType=this._layer.geometryType,this.fields=this._layer.fields.slice(0),this._layer.outFields)if(1===this._layer.outFields.length&&"*"===this._layer.outFields[0]);else{const e=[];for(const t of this.fields)if("oid"===t.type)e.push(t);else for(const i of this._layer.outFields)if(i.toLowerCase()===t.name.toLowerCase()){e.push(t);break}this.fields=e}if(null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{const e=[],t=[];for(const i of this.fields)if("oid"===i.type)e.push(i),t.push(i.name);else for(const r of this._overrideFields)if(r.toLowerCase()===i.name.toLowerCase()){e.push(i),t.push(i.name);break}this.fields=e,this._overrideFields=t}this.objectIdField=this._layer.objectIdField;for(const e of this.fields)"global-id"===e.type&&(this.globalIdField=e.name);this.hasM=this._layer.supportsM,this.hasZ=this._layer.supportsZ,this._databaseType=a.Bj.Standardised,this.typeIdField=this._layer.typeIdField,this.types=this._layer.types}isTable(){return this._forceIsTable||this._layer.isTable||"table"===this._layer.type||!this._layer.geometryType}_isInFeatureSet(){return a.dj.InFeatureSet}_candidateIdTransform(e){return e}_getSet(e){return null===this._wset?this._ensureLoaded().then((()=>this._getFilteredSet("",null,null,null,e))).then((e=>(this._wset=e,e))):(0,o.DB)(this._wset)}_changeFeature(e){const t={};for(const i of this.fields)t[i.name]=e.attributes[i.name];return new r.Z({geometry:!0===this._removeGeometry?null:e.geometry,attributes:t})}_getFilteredSet(e,t,i,r,s){let u="",h=!1;if(null!==r&&(u=r.constructClause(),h=!0),this.isTable()&&t&&null!==e&&""!==e){const e=new n.Z([],[],!0,null);return(0,o.DB)(e)}const d=new p.Z;return d.where=null===i?null===t?"1=1":"":(0,l.zR)(i,a.Bj.Standardised),d.spatialRelationship=this._makeRelationshipEnum(e),d.outSpatialReference=this.spatialReference,d.orderByFields=""!==u?u.split(","):null,d.geometry=null===t?null:t,d.returnGeometry=!0,d.relationParameter=this._makeRelationshipParam(e),this._layer.queryFeatures(d).then((e=>{if(null===e)return new n.Z([],[],h,null);this._checkCancelled(s);const t=[];return e.features.forEach((e=>{const i=e.attributes[this._layer.objectIdField];t.push(i),this._featureCache[i]=this._changeFeature(e)})),new n.Z([],t,h,null)}))}_makeRelationshipEnum(e){if(e.indexOf("esriSpatialRelRelation")>=0)return"relation";switch(e){case"esriSpatialRelRelation":return"relation";case"esriSpatialRelIntersects":return"intersects";case"esriSpatialRelContains":return"contains";case"esriSpatialRelOverlaps":return"overlaps";case"esriSpatialRelWithin":return"within";case"esriSpatialRelTouches":return"touches";case"esriSpatialRelCrosses":return"crosses";case"esriSpatialRelEnvelopeIntersects":return"envelope-intersects"}return e}_makeRelationshipParam(e){return e.indexOf("esriSpatialRelRelation")>=0?e.split(":")[1]:""}_queryAllFeatures(){if(this._wset)return(0,o.DB)(this._wset);const e=new p.Z;return e.where="1=1",this._ensureLoaded().then((()=>{if(this._layer.source&&this._layer.source.items){const e=[];return this._layer.source.items.forEach((t=>{const i=t.attributes[this._layer.objectIdField];e.push(i),this._featureCache[i]=this._changeFeature(t)})),this._wset=new n.Z([],e,!1,null),this._wset}return this._layer.queryFeatures(e).then((e=>{const t=[];return e.features.forEach((e=>{const i=e.attributes[this._layer.objectIdField];t.push(i),this._featureCache[i]=this._changeFeature(e)})),this._wset=new n.Z([],t,!1,null),this._wset}))}))}_getFeatures(e,t,i){const r=[];-1!==t&&void 0===this._featureCache[t]&&r.push(t);for(let s=e._lastFetchedIndex;s<e._known.length&&(e._lastFetchedIndex+=1,!(void 0===this._featureCache[e._known[s]]&&(e._known[s]!==t&&r.push(e._known[s]),r.length>i)));s++);return 0===r.length?(0,o.DB)("success"):(0,o.d1)(new Error("Unaccounted for Features. Not in Feature Collection"))}_refineSetBlock(e){return(0,o.DB)(e)}_stat(){return(0,o.DB)({calculated:!1})}_canDoAggregates(){return(0,o.DB)(!1)}relationshipMetaData(){return[]}static _cloneAttr(e){const t={};for(const i in e)t[i]=e[i];return t}nativeCapabilities(){return{title:this._layer.title,canQueryRelated:!1,source:this,capabilities:this._layer.capabilities,databaseType:this._databaseType,requestStandardised:!0}}static create(e,t){let i=e.layerDefinition.objectIdField;const r=e.layerDefinition.typeIdField?e.layerDefinition.typeIdField:"",s=[];if(e.layerDefinition.types)for(const t of e.layerDefinition.types)s.push(d.Z.fromJSON(t));let n=e.layerDefinition.geometryType;void 0===n&&(n=e.featureSet.geometryType||"");let a=e.featureSet.features;const l=t.toJSON();if(""===i||void 0===i){let t=!1;for(const r of e.layerDefinition.fields)if("oid"===r.type||"esriFieldTypeOID"===r.type){i=r.name,t=!0;break}if(!1===t){let t="FID",r=!0,s=0;for(;r;){let i=!0;for(const r of e.layerDefinition.fields)if(r.name===t){i=!1;break}!0===i?r=!1:(s++,t="FID"+s.toString())}e.layerDefinition.fields.push({type:"esriFieldTypeOID",name:t,alias:t});const n=[];for(let i=0;i<a.length;i++)n.push({geometry:e.featureSet.features[i].geometry,attributes:e.featureSet.features[i].attributes?this._cloneAttr(e.featureSet.features[i].attributes):{}}),n[i].attributes[t]=i;a=n,i=t}}const o=[];for(const t of e.layerDefinition.fields)t instanceof c.Z?o.push(t):o.push(c.Z.fromJSON(t));let p=n;switch(p){case"esriGeometryPoint":p="point";break;case"esriGeometryPolyline":p="polyline";break;case"esriGeometryPolygon":p="polygon";break;case"esriGeometryExtent":p="extent";break;case"esriGeometryMultipoint":p="multipoint"}for(const e of a)e.geometry&&e.geometry instanceof u.Z==0&&(e.geometry.type=p,void 0===e.geometry.spatialReference&&(e.geometry.spatialReference=l));const y={outFields:["*"],source:a,fields:o,types:s,typeIdField:r,objectIdField:i,spatialReference:t};y.geometryType=p||"point";const _=new h.default(y);return new f({layer:_,spatialReference:t,isTable:null===p||""===p})}queryAttachments(){return(0,o.DB)([])}getFeatureByObjectId(e){const t=new p.Z;return t.where=this.objectIdField+"="+e.toString(),this._layer.queryFeatures(t).then((e=>1===e.features.length?e.features[0]:null))}getOwningSystemUrl(){return(0,o.DB)("")}getIdentityUser(){return(0,o.DB)("")}}},3823:(e,t,i)=>{function r(e,t){return e===t?0:null===e?-1:null===t?1:e<t?-1:1}i.d(t,{Z:()=>s});class s{constructor(e){const t=e.split(",");this._fields=[],this._directions=[];for(let e=0;e<t.length;e++){const i=t[e].match(/\S+/g);this._fields.push(i[0]),2===i.length?"asc"===i[1].toLowerCase()?this._directions.push(1):this._directions.push(0):this._directions.push(1)}}constructClause(){let e="";for(let t=0;t<this._fields.length;t++)0!==t&&(e+=","),e+=this._fields[t],1===this._directions[t]?e+=" ASC":e+=" DESC";return e}order(e){e.sort(((e,t)=>{for(let i=0;i<this._fields.length;i++){const s=this.featureValue(e.feature,this._fields[i],i),n=this.featureValue(t.feature,this._fields[i],i);let a=0;if(a=1===this._directions[i]?r(s,n):-1*r(s,n),0!==a)return a}return 0}))}scanForField(e){for(let t=0;t<this._fields.length;t++)if(this._fields[t].toLowerCase().trim()===e.toLowerCase().trim())return!0;return!1}replaceFields(e){let t="";for(let i=0;i<this._fields.length;i++){0!==i&&(t+=",");let r=this._fields[i];for(const t of e)if(r.toLowerCase()===t.field.toLowerCase()){r=t.newfield;break}t+=r,1===this._directions[i]?t+=" ASC":t+=" DESC"}return new s(t)}featureValue(e,t,i){const r=e.attributes[t];if(void 0!==r)return r;for(const r in e.attributes)if(t.toLowerCase()===r.toLowerCase())return this._fields[i]=r,e.attributes[r];return null}}},3920:(e,t,i)=>{i.d(t,{r:()=>h,p:()=>u});var r=i(43697),s=i(15923),n=i(61247),a=i(5600),l=i(52011),o=i(89749);const u=e=>{let t=class extends e{destroy(){var e,t;this.destroyed||(null==(e=this._get("handles"))||e.destroy(),null==(t=this._get("updatingHandles"))||t.destroy())}get handles(){return this._get("handles")||new n.Z}get updatingHandles(){return this._get("updatingHandles")||new o.t}};return(0,r._)([(0,a.Cb)({readOnly:!0})],t.prototype,"handles",null),(0,r._)([(0,a.Cb)({readOnly:!0})],t.prototype,"updatingHandles",null),t=(0,r._)([(0,l.j)("esri.core.HandleOwner")],t),t};let h=class extends(u(s.Z)){};h=(0,r._)([(0,l.j)("esri.core.HandleOwner")],h)},44543:(e,t,i)=>{i.d(t,{F:()=>d,M:()=>r});const r={Base64:0,Hex:1,String:2,Raw:3};function s(e,t){const i=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(i>>16)<<16|65535&i}function n(e,t,i,r,n,a){return s(function(e,t){return e<<t|e>>>32-t}(s(s(t,e),s(r,a)),n),i)}function a(e,t,i,r,s,a,l){return n(t&i|~t&r,e,t,s,a,l)}function l(e,t,i,r,s,a,l){return n(t&r|i&~r,e,t,s,a,l)}function o(e,t,i,r,s,a,l){return n(t^i^r,e,t,s,a,l)}function u(e,t,i,r,s,a,l){return n(i^(t|~r),e,t,s,a,l)}function h(e,t){e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;let i=1732584193,r=-271733879,n=-1732584194,h=271733878;for(let t=0;t<e.length;t+=16){const d=i,c=r,p=n,f=h;i=a(i,r,n,h,e[t+0],7,-680876936),h=a(h,i,r,n,e[t+1],12,-389564586),n=a(n,h,i,r,e[t+2],17,606105819),r=a(r,n,h,i,e[t+3],22,-1044525330),i=a(i,r,n,h,e[t+4],7,-176418897),h=a(h,i,r,n,e[t+5],12,1200080426),n=a(n,h,i,r,e[t+6],17,-1473231341),r=a(r,n,h,i,e[t+7],22,-45705983),i=a(i,r,n,h,e[t+8],7,1770035416),h=a(h,i,r,n,e[t+9],12,-1958414417),n=a(n,h,i,r,e[t+10],17,-42063),r=a(r,n,h,i,e[t+11],22,-1990404162),i=a(i,r,n,h,e[t+12],7,1804603682),h=a(h,i,r,n,e[t+13],12,-40341101),n=a(n,h,i,r,e[t+14],17,-1502002290),r=a(r,n,h,i,e[t+15],22,1236535329),i=l(i,r,n,h,e[t+1],5,-165796510),h=l(h,i,r,n,e[t+6],9,-1069501632),n=l(n,h,i,r,e[t+11],14,643717713),r=l(r,n,h,i,e[t+0],20,-373897302),i=l(i,r,n,h,e[t+5],5,-701558691),h=l(h,i,r,n,e[t+10],9,38016083),n=l(n,h,i,r,e[t+15],14,-660478335),r=l(r,n,h,i,e[t+4],20,-405537848),i=l(i,r,n,h,e[t+9],5,568446438),h=l(h,i,r,n,e[t+14],9,-1019803690),n=l(n,h,i,r,e[t+3],14,-187363961),r=l(r,n,h,i,e[t+8],20,1163531501),i=l(i,r,n,h,e[t+13],5,-1444681467),h=l(h,i,r,n,e[t+2],9,-51403784),n=l(n,h,i,r,e[t+7],14,1735328473),r=l(r,n,h,i,e[t+12],20,-1926607734),i=o(i,r,n,h,e[t+5],4,-378558),h=o(h,i,r,n,e[t+8],11,-2022574463),n=o(n,h,i,r,e[t+11],16,1839030562),r=o(r,n,h,i,e[t+14],23,-35309556),i=o(i,r,n,h,e[t+1],4,-1530992060),h=o(h,i,r,n,e[t+4],11,1272893353),n=o(n,h,i,r,e[t+7],16,-155497632),r=o(r,n,h,i,e[t+10],23,-1094730640),i=o(i,r,n,h,e[t+13],4,681279174),h=o(h,i,r,n,e[t+0],11,-358537222),n=o(n,h,i,r,e[t+3],16,-722521979),r=o(r,n,h,i,e[t+6],23,76029189),i=o(i,r,n,h,e[t+9],4,-640364487),h=o(h,i,r,n,e[t+12],11,-421815835),n=o(n,h,i,r,e[t+15],16,530742520),r=o(r,n,h,i,e[t+2],23,-995338651),i=u(i,r,n,h,e[t+0],6,-198630844),h=u(h,i,r,n,e[t+7],10,1126891415),n=u(n,h,i,r,e[t+14],15,-1416354905),r=u(r,n,h,i,e[t+5],21,-57434055),i=u(i,r,n,h,e[t+12],6,1700485571),h=u(h,i,r,n,e[t+3],10,-1894986606),n=u(n,h,i,r,e[t+10],15,-1051523),r=u(r,n,h,i,e[t+1],21,-2054922799),i=u(i,r,n,h,e[t+8],6,1873313359),h=u(h,i,r,n,e[t+15],10,-30611744),n=u(n,h,i,r,e[t+6],15,-1560198380),r=u(r,n,h,i,e[t+13],21,1309151649),i=u(i,r,n,h,e[t+4],6,-145523070),h=u(h,i,r,n,e[t+11],10,-1120210379),n=u(n,h,i,r,e[t+2],15,718787259),r=u(r,n,h,i,e[t+9],21,-343485551),i=s(i,d),r=s(r,c),n=s(n,p),h=s(h,f)}return[i,r,n,h]}function d(e,t=r.Hex){const i=t||r.Base64,s=h(function(e){const t=[];for(let i=0,r=8*e.length;i<r;i+=8)t[i>>5]|=(255&e.charCodeAt(i/8))<<i%32;return t}(e),8*e.length);switch(i){case r.Raw:return s;case r.Hex:return function(e){const t="0123456789abcdef",i=[];for(let r=0,s=4*e.length;r<s;r++)i.push(t.charAt(e[r>>2]>>r%4*8+4&15)+t.charAt(e[r>>2]>>r%4*8&15));return i.join("")}(s);case r.String:return function(e){const t=[];for(let i=0,r=32*e.length;i<r;i+=8)t.push(String.fromCharCode(e[i>>5]>>>i%32&255));return t.join("")}(s);case r.Base64:return function(e){const t=[];for(let i=0,r=4*e.length;i<r;i+=3){const r=(e[i>>2]>>i%4*8&255)<<16|(e[i+1>>2]>>(i+1)%4*8&255)<<8|e[i+2>>2]>>(i+2)%4*8&255;for(let s=0;s<4;s++)8*i+6*s>32*e.length?t.push("="):t.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r>>6*(3-s)&63))}return t.join("")}(s)}}},69801:(e,t,i)=>{i.d(t,{Xq:()=>l,WJ:()=>o});var r,s,n=i(70586),a=i(44553);(s=r||(r={}))[s.ALL=0]="ALL",s[s.SOME=1]="SOME";class l{constructor(e,t,i){this._namespace=e,this._storage=t,this._removeFunc=!1,this._hit=0,this._miss=0,this._storage.register(this),this._namespace+=":",i&&(this._storage.registerRemoveFunc(this._namespace,i),this._removeFunc=!0)}destroy(){this._storage.clear(this._namespace),this._removeFunc&&this._storage.deregisterRemoveFunc(this._namespace),this._storage.deregister(this),this._storage=null}get namespace(){return this._namespace.slice(0,-1)}get hitRate(){return this._hit/(this._hit+this._miss)}get size(){return this._storage.size}get maxSize(){return this._storage.maxSize}resetHitRate(){this._hit=this._miss=0}put(e,t,i,r=0){this._storage.put(this._namespace+e,t,i,r)}get(e){const t=this._storage.get(this._namespace+e);return void 0===t?++this._miss:++this._hit,t}pop(e){const t=this._storage.pop(this._namespace+e);return void 0===t?++this._miss:++this._hit,t}updateSize(e,t,i){this._storage.updateSize(this._namespace+e,t,i)}clear(){this._storage.clear(this._namespace)}clearAll(){this._storage.clearAll()}getStats(){return this._storage.getStats()}resetStats(){this._storage.resetStats()}}class o{constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new a.Z,this._users=new a.Z}destroy(){this.clearAll(),this._removeFuncs.clear(),this._users.clear(),this._db=null}register(e){this._users.push(e)}deregister(e){this._users.removeUnordered(e)}registerRemoveFunc(e,t){this._removeFuncs.push([e,t])}deregisterRemoveFunc(e){this._removeFuncs.filterInPlace((t=>t[0]!==e))}get size(){return this._size}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,0),this._checkSizeLimit()}put(e,t,i,s){const n=this._db.get(e);if(n&&(this._size-=n.size,this._db.delete(e),n.entry!==t&&this._notifyRemove(e,n.entry,r.ALL)),i>this._maxSize)return void this._notifyRemove(e,t,r.ALL);if(void 0===t)return void console.warn("Refusing to cache undefined entry ");if(!i||i<0)return void console.warn("Refusing to cache entry with invalid size "+i);const a=1+Math.max(s,-3)- -3;this._db.set(e,{entry:t,size:i,lifetime:a,lives:a}),this._size+=i,this._checkSizeLimit()}updateSize(e,t,i){const s=this._db.get(e);if(s&&s.entry===t){for(this._size-=s.size;i>this._maxSize;){const s=this._notifyRemove(e,t,r.SOME);if(!((0,n.pC)(s)&&s>0))return void this._db.delete(e);i=s}s.size=i,this._size+=i,this._checkSizeLimit()}}pop(e){const t=this._db.get(e);if(t)return this._size-=t.size,this._db.delete(e),++this._hit,t.entry;++this._miss}get(e){const t=this._db.get(e);if(void 0!==t)return this._db.delete(e),t.lives=t.lifetime,this._db.set(e,t),++this._hit,t.entry;++this._miss}getStats(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},i=new Array;this._db.forEach(((e,r)=>{const s=e.lifetime;i[s]=(i[s]||0)+e.size,this._users.forAll((i=>{const s=i.namespace;if(r.startsWith(s)){const i=t[s]||0;t[s]=i+e.size}}))}));const r={};this._users.forAll((e=>{const i=e.namespace;if(!isNaN(e.hitRate)&&e.hitRate>0){const s=t[i]||0;t[i]=s,r[i]=Math.round(100*e.hitRate)+"%"}else r[i]="0%"}));const s=Object.keys(t);s.sort(((e,i)=>t[i]-t[e])),s.forEach((i=>e[i]=Math.round(t[i]/2**20)+"MB / "+r[i]));for(let t=i.length-1;t>=0;--t){const r=i[t];r&&(e["Priority "+(t+-3-1)]=Math.round(r/this.size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forAll((e=>e.resetHitRate()))}clear(e){this._db.forEach(((t,i)=>{i.startsWith(e)&&(this._size-=t.size,this._db.delete(i),this._notifyRemove(i,t.entry,r.ALL))}))}clearAll(){this._db.forEach(((e,t)=>this._notifyRemove(t,e.entry,r.ALL))),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,i){let r;return this._removeFuncs.some((s=>{if(e.startsWith(s[0])){const e=s[1](t,i);return"number"==typeof e&&(r=e),!0}return!1})),r}_checkSizeLimit(){if(!(this._size<=this._maxSize))for(const[e,t]of this._db){if(this._db.delete(e),t.lives<=1){this._size-=t.size;const i=this._notifyRemove(e,t.entry,r.SOME);(0,n.pC)(i)&&i>0&&(this._size+=i,t.lives=t.lifetime,t.size=i,this._db.set(e,t))}else--t.lives,this._db.set(e,t);if(this._size<=.9*this.maxSize)return}}}},66643:(e,t,i)=>{i.d(t,{Ed:()=>n,UI:()=>a,q6:()=>l,mt:()=>o});var r=i(70586),s=i(95330);function n(e,t,i){return(0,s.as)(e.map(((e,r)=>t.apply(i,[e,r]))))}function a(e,t,i){return(0,s.as)(e.map(((e,r)=>t.apply(i,[e,r])))).then((e=>e.map((e=>e.value))))}function l(e){return(0,r.Wi)(e)?(0,s.DB)():e.then((e=>({ok:!0,value:e}))).catch((e=>({ok:!1,error:e})))}function o(e){return e.then((e=>({ok:!0,value:e}))).catch((e=>((0,s.r9)(e),{ok:!1,error:e})))}},74085:(e,t,i)=>{function r(e){}i.d(t,{Bg:()=>r}),i(80442)},38581:(e,t,i)=>{i.d(t,{aX:()=>S});var r=i(68773),s=i(20102),n=i(92604),a=i(70586),l=i(17332),o=i(58901),u=i(73913),h=i(8744),d=i(40488),c=(i(66577),i(3172)),p=i(17452),f=i(33955);const y=n.Z.getLogger("esri.geometry.support.normalizeUtils");function _(e){return"polygon"===e[0].type}function g(e){return"polyline"===e[0].type}function m(e,t,i){if(t){const t=function(e,t){if(!(e instanceof o.Z||e instanceof l.Z)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw y.error(e),new s.Z(e)}const i=(0,u.x3)(e),r=[];for(const e of i){const i=[];r.push(i),i.push([e[0][0],e[0][1]]);for(let r=0;r<e.length-1;r++){const s=e[r][0],n=e[r][1],a=e[r+1][0],l=e[r+1][1],o=Math.sqrt((a-s)*(a-s)+(l-n)*(l-n)),u=(l-n)/o,h=(a-s)/o,d=o/t;if(d>1){for(let e=1;e<=d-1;e++){const r=e*t,a=h*r+s,l=u*r+n;i.push([a,l])}const e=(o+Math.floor(d-1)*t)/2,r=h*e+s,a=u*e+n;i.push([r,a])}i.push([a,l])}}return function(e){return"polygon"===e.type}(e)?new l.Z({rings:r,spatialReference:e.spatialReference}):new o.Z({paths:r,spatialReference:e.spatialReference})}(e,1e6);e=(0,d.Sx)(t,!0)}return i&&(e=(0,u.Sy)(e,i)),e}function b(e,t,i){if(Array.isArray(e)){const r=e[0];if(r>t){const i=(0,u.XZ)(r,t);e[0]=r+i*(-2*t)}else if(r<i){const t=(0,u.XZ)(r,i);e[0]=r+t*(-2*i)}}else{const r=e.x;if(r>t){const i=(0,u.XZ)(r,t);e=e.clone().offset(i*(-2*t),0)}else if(r<i){const t=(0,u.XZ)(r,i);e=e.clone().offset(t*(-2*i),0)}}return e}function w(e,t){let i=-1;for(let r=0;r<t.cutIndexes.length;r++){const s=t.cutIndexes[r],n=t.geometries[r],a=(0,u.x3)(n);for(let e=0;e<a.length;e++){const t=a[e];t.some((i=>{if(i[0]<180)return!0;{let i=0;for(let e=0;e<t.length;e++){const r=t[e][0];i=r>i?r:i}i=Number(i.toFixed(9));const r=-360*(0,u.XZ)(i,180);for(let i=0;i<t.length;i++){const t=n.getPoint(e,i);n.setPoint(e,i,t.clone().offset(r,0))}return!0}}))}if(s===i){if(_(e))for(const t of(0,u.x3)(n))e[s]=e[s].addRing(t);else if(g(e))for(const t of(0,u.x3)(n))e[s]=e[s].addPath(t)}else i=s,e[s]=n}return e}async function S(e,t,i){var s;if(!Array.isArray(e))return S([e],t);const n=null!=(s=null==t?void 0:t.url)?s:r.Z.geometryServiceUrl;let y,_,g,v,F,I,C,x,D=0;const R=[],k=[];for(const t of e)if((0,a.Wi)(t))k.push(t);else if(y||(y=t.spatialReference,_=(0,h.C5)(y),g=y.isWebMercator,I=g?102100:4326,v=u.UZ[I].maxX,F=u.UZ[I].minX,C=u.UZ[I].plus180Line,x=u.UZ[I].minus180Line),_)if("mesh"===t.type)k.push(t);else if("point"===t.type)k.push(b(t.clone(),v,F));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>b(e,v,F))),k.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,_);k.push(e.rings?new l.Z(e):e)}else if(t.extent){const e=t.extent,i=(0,u.XZ)(e.xmin,F)*(2*v);let r=0===i?t.clone():(0,u.Sy)(t.clone(),i);e.offset(i,0),e.intersects(C)&&e.xmax!==v?(D=e.xmax>D?e.xmax:D,r=m(r,g),R.push(r),k.push("cut")):e.intersects(x)&&e.xmin!==F?(D=e.xmax*(2*v)>D?e.xmax*(2*v):D,r=m(r,g,360),R.push(r),k.push("cut")):k.push(r)}else k.push(t.clone());else k.push(t);let T=(0,u.XZ)(D,v),O=-90;const L=T,N=new o.Z;for(;T>0;){const e=360*T-180;N.addPath([[e,O],[e,-1*O]]),O*=-1,T--}if(R.length>0&&L>0){const t=w(R,await async function(e,t,i,r){const s="string"==typeof e?(0,p.mN)(e):e,n=t[0].spatialReference,a={...r,query:{...s.query,f:"json",sr:JSON.stringify(n),target:JSON.stringify({geometryType:(0,f.Ji)(t[0]),geometries:t}),cutter:JSON.stringify(i)}},l=await(0,c.default)(s.path+"/cut",a),{cutIndexes:o,geometries:u=[]}=l.data;return{cutIndexes:o,geometries:u.map((e=>{const t=(0,f.im)(e);return t.spatialReference=n,t}))}}(n,R,N,i)),r=[],s=[];for(let i=0;i<k.length;i++){const n=k[i];if("cut"!==n)s.push(n);else{const n=t.shift(),l=e[i];(0,a.pC)(l)&&"polygon"===l.type&&l.rings&&l.rings.length>1&&n.rings.length>=l.rings.length?(r.push(n),s.push("simplify")):s.push(g?(0,d.$)(n):n)}}if(!r.length)return s;const l=await async function(e,t,i){const r="string"==typeof e?(0,p.mN)(e):e,s=t[0].spatialReference,n=(0,f.Ji)(t[0]),a={...i,query:{...r.query,f:"json",sr:s.wkid?s.wkid:JSON.stringify(s),geometries:JSON.stringify((l=t,{geometryType:(0,f.Ji)(l[0]),geometries:l.map((e=>e.toJSON()))}))}};var l;return function(e,t,i){const r=(0,f.q9)(t);return e.map((e=>{const t=r.fromJSON(e);return t.spatialReference=i,t}))}((await(0,c.default)(r.path+"/simplify",a)).data,n,s)}(n,r,i),o=[];for(let e=0;e<s.length;e++){const t=s[e];"simplify"!==t?o.push(t):o.push(g?(0,d.$)(l.shift()):l.shift())}return o}const P=[];for(let e=0;e<k.length;e++){const t=k[e];if("cut"!==t)P.push(t);else{const e=R.shift();P.push(!0===g?(0,d.$)(e):e)}}return Promise.resolve(P)}},73913:(e,t,i)=>{i.d(t,{UZ:()=>a,x3:()=>u,XZ:()=>l,Sy:()=>o});var r=i(58901),s=i(82971),n=i(33955);const a={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new r.Z({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:s.Z.WebMercator}),minus180Line:new r.Z({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:s.Z.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new r.Z({paths:[[[180,-180],[180,180]]],spatialReference:s.Z.WGS84}),minus180Line:new r.Z({paths:[[[-180,-180],[-180,180]]],spatialReference:s.Z.WGS84})}};function l(e,t){return Math.ceil((e-t)/(2*t))}function o(e,t){const i=u(e);for(const e of i)for(const i of e)i[0]+=t;return e}function u(e){return(0,n.oU)(e)?e.rings:e.paths}},69285:(e,t,i)=>{i.d(t,{k:()=>a});var r=i(70586),s=i(67900),n=i(8744);function a(e,t,i){if((0,r.Wi)(t)||(0,r.Wi)(i)||i.vcsWkid||(0,n.fS)(t,i))return null;const a=(0,s._R)(t)/(0,s._R)(i);if(1===a)return null;switch(e){case"point":case"esriGeometryPoint":return e=>function(e,t){e&&null!=e.z&&(e.z*=t)}(e,a);case"polyline":case"esriGeometryPolyline":return e=>function(e,t){if(e)for(const i of e.paths)for(const e of i)e.length>2&&(e[2]*=t)}(e,a);case"polygon":case"esriGeometryPolygon":return e=>function(e,t){if(e)for(const i of e.rings)for(const e of i)e.length>2&&(e[2]*=t)}(e,a);case"multipoint":case"esriGeometryMultipoint":return e=>function(e,t){if(e)for(const i of e.points)i.length>2&&(i[2]*=t)}(e,a);case"extent":case"esriGeometryExtent":return e=>function(e,t){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=t,e.zmax*=t)}(e,a);default:return null}}},54295:(e,t,i)=>{i.d(t,{V:()=>a});var r=i(43697),s=i(5600),n=(i(67676),i(80442),i(75215),i(52011));const a=e=>{let t=class extends e{get apiKey(){var e;return this._isOverridden("apiKey")?this._get("apiKey"):function(e){return"portalItem"in e}(this)?null==(e=this.portalItem)?void 0:e.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,r._)([(0,s.Cb)({type:String})],t.prototype,"apiKey",null),t=(0,r._)([(0,n.j)("esri.layers.mixins.APIKeyMixin")],t),t}},17287:(e,t,i)=>{i.d(t,{Y:()=>u});var r=i(43697),s=i(92604),n=i(70586),a=i(5600),l=(i(67676),i(80442),i(75215),i(52011)),o=i(66677);const u=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,o.Qc)(this.url);if((0,n.pC)(e)&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,o.Nm)(e,s.Z.getLogger(this.declaredClass)))}};return(0,r._)([(0,a.Cb)()],t.prototype,"title",null),(0,r._)([(0,a.Cb)({type:String})],t.prototype,"url",null),t=(0,r._)([(0,l.j)("esri.layers.mixins.ArcGISService")],t),t}},16859:(e,t,i)=>{i.d(t,{I:()=>w});var r=i(43697),s=i(40330),n=i(3172),a=i(66643),l=i(20102),o=i(92604),u=i(70586),h=i(95330),d=i(17452),c=i(5600),p=(i(67676),i(80442),i(75215),i(71715)),f=i(52011),y=i(30556),_=i(65587),g=i(15235),m=i(86082);const b=o.Z.getLogger("esri.layers.mixins.PortalLayer"),w=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0}destroy(){var e;null==(e=this.portalItem)||e.destroy(),this.portalItem=null}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,i){if(t.itemId)return new g.default({id:t.itemId,portal:i&&i.portal})}writePortalItem(e,t){e&&e.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem&&this.portalItem.id)try{const r=await i.e(8062).then(i.bind(i,18062));return(0,h.k_)(t),await r.load({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData},t)}catch(e){throw(0,h.D_)(e)||b.warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,h.r9)(e),!0))))}async _fetchUserHasEditingPrivileges(e){const t=this.url?null==s.id?void 0:s.id.findCredential(this.url):null;if(!t)return!0;const i=S.credential===t?S.user:await this._fetchEditingUser(e);return S.credential=t,S.user=i,(0,u.Wi)(i)||null==i.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(e){var t,i;const r=null==(t=this.portalItem)||null==(i=t.portal)?void 0:i.user;if(r)return r;const l=s.id.findServerInfo(this.url);if(null==l||!l.owningSystemUrl)return null;const o=`${l.owningSystemUrl}/sharing/rest`,h=_.Z.getDefault();if(h&&h.loaded&&(0,d.Fv)(h.restUrl)===(0,d.Fv)(o))return h.user;const c=`${o}/community/self`,p=(0,u.pC)(e)?e.signal:null,f=await(0,a.q6)((0,n.default)(c,{authMode:"no-prompt",query:{f:"json"},signal:p}));return f.ok?m.default.fromJSON(f.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const i=t&&t.portal,r=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||_.Z.getDefault());return i&&r&&!(0,d.tm)(r.restUrl,i.restUrl)?(t.messages&&t.messages.push(new l.Z("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save the scene, set the layer.portalItem to null or save the scene to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,r._)([(0,c.Cb)({type:g.default})],t.prototype,"portalItem",null),(0,r._)([(0,p.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,r._)([(0,y.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,r._)([(0,c.Cb)()],t.prototype,"resourceReferences",void 0),(0,r._)([(0,c.Cb)({readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),t=(0,r._)([(0,f.j)("esri.layers.mixins.PortalLayer")],t),t},S={credential:null,user:null}},70082:(e,t,i)=>{i.d(t,{Z:()=>h});var r=i(43697),s=i(35454),n=i(96674),a=i(5600),l=(i(67676),i(80442),i(75215),i(52011));const o=new s.X({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let u=class extends n.wq{constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,r._)([(0,a.Cb)({json:{write:!0}})],u.prototype,"name",void 0),(0,r._)([(0,a.Cb)({json:{write:!0}})],u.prototype,"description",void 0),(0,r._)([(0,a.Cb)({json:{read:o.read,write:o.write}})],u.prototype,"drawingTool",void 0),(0,r._)([(0,a.Cb)({json:{write:!0}})],u.prototype,"prototype",void 0),(0,r._)([(0,a.Cb)({json:{write:!0}})],u.prototype,"thumbnail",void 0),u=(0,r._)([(0,l.j)("esri.layers.support.FeatureTemplate")],u);const h=u},16451:(e,t,i)=>{i.d(t,{Z:()=>c});var r=i(43697),s=i(96674),n=i(5600),a=(i(67676),i(80442),i(75215),i(71715)),l=i(52011),o=i(30556),u=i(72729),h=i(70082);let d=class extends s.wq{constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const i of Object.keys(e))t[i]=(0,u.im)(e[i]);return t}writeDomains(e,t){const i={};for(const t of Object.keys(e)){var r;e[t]&&(i[t]=null==(r=e[t])?void 0:r.toJSON())}t.domains=i}};(0,r._)([(0,n.Cb)({json:{write:!0}})],d.prototype,"id",void 0),(0,r._)([(0,n.Cb)({json:{write:!0}})],d.prototype,"name",void 0),(0,r._)([(0,n.Cb)({json:{write:!0}})],d.prototype,"domains",void 0),(0,r._)([(0,a.r)("domains")],d.prototype,"readDomains",null),(0,r._)([(0,o.c)("domains")],d.prototype,"writeDomains",null),(0,r._)([(0,n.Cb)({type:[h.Z],json:{write:!0}})],d.prototype,"templates",void 0),d=(0,r._)([(0,l.j)("esri.layers.support.FeatureType")],d);const c=d},56765:(e,t,i)=>{i.d(t,{Z:()=>h});var r,s=i(43697),n=i(80539),a=i(96674),l=i(5600),o=(i(67676),i(80442),i(75215),i(52011));let u=r=class extends a.wq{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new n.Z}clone(){return new r({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,s._)([(0,l.Cb)({type:String,json:{write:!0}})],u.prototype,"floorField",void 0),(0,s._)([(0,l.Cb)({json:{read:!1,write:!1}})],u.prototype,"viewAllMode",void 0),(0,s._)([(0,l.Cb)({json:{read:!1,write:!1}})],u.prototype,"viewAllLevelIds",void 0),u=r=(0,s._)([(0,o.j)("esri.layers.support.LayerFloorInfo")],u);const h=u},66677:(e,t,i)=>{i.d(t,{ld:()=>f,B5:()=>d,M8:()=>_,G:()=>w,Qc:()=>c,DR:()=>p,Nm:()=>g,XG:()=>m,a7:()=>y,wH:()=>b});var r=i(70586),s=i(17452),n=i(25929);const a={mapserver:"MapServer",imageserver:"ImageServer",featureserver:"FeatureServer",sceneserver:"SceneServer",streamserver:"StreamServer",vectortileserver:"VectorTileServer"},l=Object.values(a),o=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/rest\\/services\\/(.+?)\\/(${l.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),u=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/([^\\/\\n]+)\\/(${l.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),h=/(.*?)\/(?:layers\/)?(\d+)\/?$/i;function d(e){return!!o.test(e)}function c(e){const t=(0,s.mN)(e),i=t.path.match(o)||t.path.match(u);if(!i)return null;const[,r,n,l,h]=i,d=n.indexOf("/");return{title:f(-1!==d?n.slice(d+1):n),serverType:a[l.toLowerCase()],sublayer:null!=h&&""!==h?parseInt(h,10):null,url:{path:r}}}function p(e){const t=(0,s.mN)(e).path.match(h);return t?{serviceUrl:t[1],sublayerId:Number(t[2])}:null}function f(e){return(e=e.replace(/\s*[/_]+\s*/g," "))[0].toUpperCase()+e.slice(1)}function y(e,t){const i=[];if(e){const t=c(e);(0,r.pC)(t)&&t.title&&i.push(t.title)}if(t){const e=f(t);i.push(e)}if(2===i.length){if(-1!==i[0].toLowerCase().indexOf(i[1].toLowerCase()))return i[0];if(-1!==i[1].toLowerCase().indexOf(i[0].toLowerCase()))return i[1]}return i.join(" - ")}function _(e){if(!e)return!1;const t=-1!==(e=e.toLowerCase()).indexOf(".arcgis.com/"),i=-1!==e.indexOf("//services")||-1!==e.indexOf("//tiles")||-1!==e.indexOf("//features");return t&&i}function g(e,t){return e?(0,s.Qj)((0,s.Hu)(e,t)):e}function m(e){let{url:t}=e;if(!t)return{url:t};t=(0,s.Hu)(t,e.logger);const i=(0,s.mN)(t),n=c(i.path);let a;if((0,r.pC)(n))null!=n.sublayer&&null==e.layer.layerId&&(a=n.sublayer),t=n.url.path;else if(e.nonStandardUrlAllowed){const e=p(i.path);(0,r.pC)(e)&&(t=e.serviceUrl,a=e.sublayerId)}return{url:(0,s.Qj)(t),layerId:a}}function b(e,t,i,r,a){(0,n.w)(t,r,"url",a),r.url&&null!=e.layerId&&(r.url=(0,s.v_)(r.url,i,e.layerId.toString()))}function w(e){if(!e)return!1;const t=e.toLowerCase(),i=-1!==t.indexOf("/services/"),r=-1!==t.indexOf("/mapserver/wmsserver"),s=-1!==t.indexOf("/imageserver/wmsserver"),n=-1!==t.indexOf("/wmsserver");return i&&(r||s||n)}},15235:(e,t,i)=>{i.r(t),i.d(t,{default:()=>D});var r=i(43697),s=i(99880),n=i(20102),a=i(96674),l=i(22974),o=i(83379),u=i(70586),h=i(17452),d=i(5600),c=i(75215),p=i(71715),f=i(52011),y=i(6570),_=i(65587),g=i(15923),m=i(92604),b=(i(67676),i(80442),i(90578));const w=m.Z.getLogger("esri.portal.PortalItemResource");let S=class extends g.Z{constructor(e){super(e),this.portalItem=null}normalizeCtorArgs(e){return e&&e.portalItem&&e.path?{...e,path:this._normalizePath(e.path,e.portalItem)}:e}set path(e){(0,u.pC)(e)&&(0,h.YP)(e)?w.error("portalitemresource:invalid-path","A portal item resource path must be relative"):this._set("path",e)}_castPath(e){return this._normalizePath(e,this.portalItem)}get url(){return this.portalItem&&this.path?`${this.portalItem.itemUrl}/resources/${this.path}`:null}get itemRelativeUrl(){return this.portalItem&&this.path?`./resources/${this.path}`:null}fetch(e="json",t){const i=this.url;if((0,u.Wi)(i))throw new n.Z("portal-item-resource:fetch","Portal item resource does not refer to a valid item or path");return this.portalItem.portal._request(i,{responseType:e,query:{token:this.portalItem.apiKey},signal:(0,u.U2)(t,"signal")})}async update(e,t){return(await i.e(7873).then(i.bind(i,97873))).addOrUpdateResource(this,"update",e,t)}hasPath(){return(0,u.pC)(this.path)}_normalizePath(e,t){return(0,u.Wi)(e)?e:(e=e.replace(/^\/+/,""),(0,u.pC)(t)&&(0,h.YP)(e)&&(e=(0,h.PF)(e,t.itemUrl)),e.replace(/^\/+/,"").replace(/^(\.\/)?resources\//,""))}};(0,r._)([(0,d.Cb)()],S.prototype,"portalItem",void 0),(0,r._)([(0,d.Cb)({type:String,value:null})],S.prototype,"path",null),(0,r._)([(0,b.p)("path")],S.prototype,"_castPath",null),(0,r._)([(0,d.Cb)({type:String,readOnly:!0})],S.prototype,"url",null),(0,r._)([(0,d.Cb)({type:String,readOnly:!0})],S.prototype,"itemRelativeUrl",null),S=(0,r._)([(0,f.j)("esri.portal.PortalItemResource")],S);const v=S;let F=class extends g.Z{constructor(e){super(e),this.created=null,this.rating=null}};(0,r._)([(0,d.Cb)()],F.prototype,"created",void 0),(0,r._)([(0,d.Cb)()],F.prototype,"rating",void 0),F=(0,r._)([(0,f.j)("esri.portal.PortalRating")],F);const I=F;var C;let x=C=class extends((0,a.eC)(o.Z)){constructor(e){super(e),this.access=null,this.accessInformation=null,this.apiKey=null,this.applicationProxies=null,this.avgRating=null,this.categories=null,this.created=null,this.culture=null,this.description=null,this.extent=null,this.groupCategories=null,this.id=null,this.itemControl=null,this.licenseInfo=null,this.modified=null,this.name=null,this.numComments=null,this.numRatings=null,this.numViews=null,this.owner=null,this.ownerFolder=null,this.portal=null,this.screenshots=null,this.size=null,this.snippet=null,this.sourceJSON=null,this.tags=null,this.title=null,this.type=null,this.typeKeywords=null,this.url=null}static from(e){return(0,c.TJ)(C,e)}destroy(){this.portal=null}get displayName(){const e=this.type,t=this.typeKeywords||[];let i=e;return"Feature Service"===e||"Feature Collection"===e?i=t.indexOf("Table")>-1?"Table":t.indexOf("Route Layer")>-1?"Route Layer":t.indexOf("Markup")>-1?"Markup":"Feature Layer":"Image Service"===e?i=t.indexOf("Elevation 3D Layer")>-1?"Elevation Layer":t.indexOf("Tiled Imagery")>-1?"Tiled Imagery Layer":"Imagery Layer":"Scene Service"===e?i="Scene Layer":"Scene Package"===e?i="Scene Layer Package":"Stream Service"===e?i="Feature Layer":"Geoprocessing Service"===e&&this.portal&&this.portal.isPortal?i=t.indexOf("Web Tool")>-1?"Tool":"Geoprocessing Service":"Geocoding Service"===e?i="Locator":"Geoenrichment Service"===e?i="GeoEnrichment Service":"Microsoft Powerpoint"===e?i="Microsoft PowerPoint":"GeoJson"===e?i="GeoJSON":"Globe Service"===e?i="Globe Layer":"Vector Tile Service"===e?i="Tile Layer":"netCDF"===e?i="NetCDF":"Map Service"===e?i=-1===t.indexOf("Spatiotemporal")&&(t.indexOf("Hosted Service")>-1||t.indexOf("Tiled")>-1)&&-1===t.indexOf("Relational")?"Tile Layer":"Map Image Layer":e&&e.toLowerCase().indexOf("add in")>-1?i=e.replace(/(add in)/gi,"Add-In"):"datastore catalog service"===e?i="Big Data File Share":"Compact Tile Package"===e?i="Tile Package (tpkx)":"OGCFeatureServer"===e?i="OGC Feature Layer":"web mapping application"===e&&t.indexOf("configurableApp")>-1&&(i="Instant App"),i}readExtent(e){return e&&e.length?new y.Z(e[0][0],e[0][1],e[1][0],e[1][1]):null}get iconUrl(){const e=this.type&&this.type.toLowerCase()||"",t=this.typeKeywords||[];let i,r=!1,n=!1,a=!1,l=!1,o=!1,u=!1;return e.indexOf("service")>0||"feature collection"===e||"kml"===e||"wms"===e||"wmts"===e||"wfs"===e?(r=t.indexOf("Hosted Service")>-1,"feature service"===e||"feature collection"===e||"kml"===e||"wfs"===e?(n=t.indexOf("Table")>-1,a=t.indexOf("Route Layer")>-1,l=t.indexOf("Markup")>-1,o=-1!==t.indexOf("Spatiotemporal"),u=-1!==t.indexOf("UtilityNetwork"),i=o&&n?"spatiotemporaltable":n?"table":a?"routelayer":l?"markup":o?"spatiotemporal":r?"featureshosted":u?"utilitynetwork":"features"):i="map service"===e||"wms"===e||"wmts"===e?r||t.indexOf("Tiled")>-1||"wmts"===e?"maptiles":"mapimages":"scene service"===e?t.indexOf("Line")>-1?"sceneweblayerline":t.indexOf("3DObject")>-1?"sceneweblayermultipatch":t.indexOf("Point")>-1?"sceneweblayerpoint":t.indexOf("IntegratedMesh")>-1?"sceneweblayermesh":t.indexOf("PointCloud")>-1?"sceneweblayerpointcloud":t.indexOf("Polygon")>-1?"sceneweblayerpolygon":t.indexOf("Building")>-1?"sceneweblayerbuilding":t.indexOf("Voxel")>-1?"sceneweblayervoxel":"sceneweblayer":"image service"===e?t.indexOf("Elevation 3D Layer")>-1?"elevationlayer":t.indexOf("Tiled Imagery")>-1?"tiledimagerylayer":"imagery":"stream service"===e?"streamlayer":"vector tile service"===e?"vectortile":"datastore catalog service"===e?"datastorecollection":"geocoding service"===e?"geocodeservice":"geoprocessing service"===e&&t.indexOf("Web Tool")>-1&&this.portal&&this.portal.isPortal?"tool":"layers"):i="web map"===e||"cityengine web scene"===e?"maps":"web scene"===e?t.indexOf("ViewingMode-Local")>-1?"webscenelocal":"websceneglobal":"web mapping application"===e&&t.indexOf("configurableApp")>-1?"instantapps":"web mapping application"===e||"mobile application"===e||"application"===e||"operation view"===e||"desktop application"===e?"apps":"map document"===e||"map package"===e||"published map"===e||"scene document"===e||"globe document"===e||"basemap package"===e||"mobile basemap package"===e||"mobile map package"===e||"project package"===e||"project template"===e||"pro map"===e||"layout"===e||"layer"===e&&t.indexOf("ArcGIS Pro")>-1||"explorer map"===e&&t.indexOf("Explorer Document")?"mapsgray":"service definition"===e||"csv"===e||"shapefile"===e||"cad drawing"===e||"geojson"===e||"360 vr experience"===e||"netcdf"===e||"administrative report"===e?"datafiles":"explorer add in"===e||"desktop add in"===e||"windows viewer add in"===e||"windows viewer configuration"===e?"appsgray":"arcgis pro add in"===e||"arcgis pro configuration"===e?"addindesktop":"rule package"===e||"file geodatabase"===e||"sqlite geodatabase"===e||"csv collection"===e||"kml collection"===e||"windows mobile package"===e||"map template"===e||"desktop application template"===e||"gml"===e||"arcpad package"===e||"code sample"===e||"form"===e||"document link"===e||"earth configuration"===e||"operations dashboard add in"===e||"rules package"===e||"image"===e||"workflow manager package"===e||"explorer map"===e&&t.indexOf("Explorer Mapping Application")>-1||t.indexOf("Document")>-1?"datafilesgray":"network analysis service"===e||"geoprocessing service"===e||"geodata service"===e||"geometry service"===e||"geoprocessing package"===e||"locator package"===e||"geoprocessing sample"===e||"workflow manager service"===e?"toolsgray":"layer"===e||"layer package"===e||"explorer layer"===e?"layersgray":"scene package"===e?"scenepackage":"mobile scene package"===e?"mobilescenepackage":"tile package"===e||"compact tile package"===e?"tilepackage":"task file"===e?"taskfile":"report template"===e?"report-template":"statistical data collection"===e?"statisticaldatacollection":"insights workbook"===e?"workbook":"insights model"===e?"insightsmodel":"insights page"===e?"insightspage":"insights theme"===e?"insightstheme":"hub initiative"===e?"hubinitiative":"hubpage"===e?"hubpage":"hub event"===e?"hubevent":"hub site application"===e?"hubsite":"relational database connection"===e?"relationaldatabaseconnection":"big data file share"===e?"datastorecollection":"image collection"===e?"imagecollection":"style"===e?"style":"desktop style"===e?"desktopstyle":"dashboard"===e?"dashboard":"raster function template"===e?"rasterprocessingtemplate":"vector tile package"===e?"vectortilepackage":"ortho mapping project"===e?"orthomappingproject":"ortho mapping template"===e?"orthomappingtemplate":"solution"===e?"solutions":"geopackage"===e?"geopackage":"deep learning package"===e?"deeplearningpackage":"real time analytic"===e?"realtimeanalytics":"big data analytic"===e?"bigdataanalytics":"feed"===e?"feed":"excalibur imagery project"===e?"excaliburimageryproject":"notebook"===e?"notebook":"storymap"===e?"storymap":"survey123 add in"===e?"survey123addin":"mission"===e?"mission":"mission report"===e?"missionreport":"quickcapture project"===e?"quickcaptureproject":"pro report"===e?"proreport":"urban model"===e?"urbanmodel":"web experience"===e?"experiencebuilder":"web experience template"===e?"webexperiencetemplate":"workflow"===e?"workflow":"insights script"===e?"insightsscript":"kernel gateway connection"===e?"kernelgatewayconnection":"hub initiative template"===e?"hubinitiativetemplate":"storymap theme"===e?"storymaptheme":"knowledge graph"===e?"knowledgegraph":"native application"===e?"nativeapp":"native application installer"===e?"nativeappinstaller":"link chart"===e?"linkchart":"investigation"===e?"investigation":"ogcfeatureserver"===e?"features":"pro project"===e?"proproject":"insights workbook package"===e?"insightsworkbookpackage":"apache parquet"===e?"apacheparquet":"maps",i?(0,s.V)("esri/images/portal/"+i+"16.png"):null}get isLayer(){return["Map Service","Feature Service","Feature Collection","Scene Service","Image Service","Stream Service","Vector Tile Service","WMTS","WMS"].indexOf(this.type)>-1}get itemUrl(){const e=this.get("portal.restUrl");return e?e+"/content/items/"+this.id:null}get thumbnailUrl(){const e=this.itemUrl,t=this.thumbnail;return e&&t?this.portal._normalizeUrl(`${e}/info/${t}?f=json`):null}get userItemUrl(){const e=this.get("portal.restUrl");if(!e)return null;const t=this.owner||this.get("portal.user.username");return t?`${e}/content/users/${this.ownerFolder?`${t}/${this.ownerFolder}`:t}/items/${this.id}`:null}load(e){this.portal||(this.portal=_.Z.getDefault());const t=this.portal.load(e).then((()=>this.sourceJSON?this.sourceJSON:this.id&&this.itemUrl?this.portal._request(this.itemUrl,{signal:(0,u.pC)(e)?e.signal:null,query:{token:this.apiKey}}):{})).then((e=>{this.sourceJSON=e,this.read(e)}));return this.addResolvingPromise(t),Promise.resolve(this)}addRating(e){const t={method:"post",query:{}};return e instanceof I&&(e=e.rating),isNaN(e)||"number"!=typeof e||(t.query.rating=e),this.portal._request(this.itemUrl+"/addRating",t).then((()=>new I({rating:e,created:new Date})))}clone(){const e={access:this.access,accessInformation:this.accessInformation,applicationProxies:(0,l.d9)(this.applicationProxies),avgRating:this.avgRating,categories:(0,l.d9)(this.categories),created:(0,l.d9)(this.created),culture:this.culture,description:this.description,extent:(0,l.d9)(this.extent),groupCategories:(0,l.d9)(this.groupCategories),id:this.id,itemControl:this.itemControl,licenseInfo:this.licenseInfo,modified:(0,l.d9)(this.modified),name:this.name,numComments:this.numComments,numRatings:this.numRatings,numViews:this.numViews,owner:this.owner,ownerFolder:this.ownerFolder,portal:this.portal,screenshots:(0,l.d9)(this.screenshots),size:this.size,snippet:this.snippet,tags:(0,l.d9)(this.tags),thumbnail:this.thumbnail,title:this.title,type:this.type,typeKeywords:(0,l.d9)(this.typeKeywords),url:this.url};return this.loaded&&(e.loadStatus="loaded"),new C({sourceJSON:this.sourceJSON}).set(e)}createPostQuery(){const e=this.toJSON();for(const t in e)"tags"===t&&null!==e[t]&&(e[t]=e[t].join(", ")),"typeKeywords"===t&&null!==e[t]&&(e[t]=e[t].join(", ")),"extent"===t&&e[t]&&(e[t]=JSON.stringify(e[t]));return e}deleteRating(){return this.portal._request(this.itemUrl+"/deleteRating",{method:"post"}).then((()=>{}))}fetchData(e="json",t){return this.portal._request(this.itemUrl+"/data",{responseType:e,...t,query:{token:this.apiKey}})}fetchRating(e){return this.portal._request(this.itemUrl+"/rating",{query:{token:this.apiKey},...e}).then((e=>null!=e.rating?(e.created=new Date(e.created),new I(e)):null))}fetchRelatedItems(e,t){return this.portal._requestToTypedArray(this.itemUrl+"/relatedItems",{query:{...e,token:this.apiKey},...t},C)}getThumbnailUrl(e){let t=this.thumbnailUrl;return t&&e&&(t+=`&w=${e}`),t}reload(){return this.portal._request(this.itemUrl,{cacheBust:!0,query:{token:this.apiKey}}).then((e=>(this.sourceJSON=e,this.read(e),this)))}update(e){return this.id?this.load().then((()=>this.portal._signIn())).then((()=>{const t=e&&e.data,i={method:"post"};i.query=this.createPostQuery();for(const e in i.query)null===i.query[e]&&(i.query[e]="");return i.query.clearEmptyFields=!0,null!=t&&("string"==typeof t?i.query.text=t:"object"==typeof t&&(i.query.text=JSON.stringify(t))),this.portal._request(`${this.userItemUrl}/update`,i).then((()=>this.reload()))})):Promise.reject(new n.Z("portal:item-does-not-exist","The item does not exist yet and cannot be updated"))}updateThumbnail(e){return this.id?this.load().then((()=>this.portal._signIn())).then((()=>{const t=e.thumbnail,i=e.filename,r={method:"post"};if("string"==typeof t)(0,h.HK)(t)?r.query={data:t}:r.query={url:(0,h.hF)(t)},(0,u.pC)(i)&&(r.query.filename=i);else{const e=new FormData;(0,u.pC)(i)?e.append("file",t,i):e.append("file",t),r.body=e}return this.portal._request(`${this.userItemUrl}/updateThumbnail`,r).then((()=>this.reload()))})):Promise.reject(new n.Z("portal:item-does-not-exist","The item does not exist yet and cannot be updated"))}async fetchResources(e={},t){return(await i.e(7873).then(i.bind(i,97873))).fetchResources(this,e,t)}async addResource(e,t,r){const s=await i.e(7873).then(i.bind(i,97873));return e.portalItem=this,s.addOrUpdateResource(e,"add",t,r)}async removeResource(e,t){const r=await i.e(7873).then(i.bind(i,97873));if(e.portalItem&&e.portalItem.itemUrl!==this.itemUrl)throw new n.Z("removeresource:portal-item-mismatch","The portal item associated with the provided resource does not match the item");return r.removeResource(this,e,t)}async removeAllResources(e){return(await i.e(7873).then(i.bind(i,97873))).removeAllResources(this,e)}resourceFromPath(e){return new v({portalItem:this,path:e})}toJSON(){const e=this.extent,t={created:this.created&&this.created.getTime(),description:this.description,extent:e&&[[e.xmin,e.ymin],[e.xmax,e.ymax]],id:this.id,modified:this.modified&&this.modified.getTime(),name:this.name,owner:this.owner,ownerFolder:this.ownerFolder,snippet:this.snippet,tags:this.tags,thumbnail:this.thumbnail,title:this.title,type:this.type,typeKeywords:this.typeKeywords,url:this.url};return(0,l.yd)(t)}static fromJSON(e){if(!e)return null;if(e.declaredClass)throw new Error("JSON object is already hydrated");return new C({sourceJSON:e})}_getPostQuery(){const e=this.toJSON();for(const t in e)"tags"===t&&null!==e[t]&&(e[t]=e[t].join(", ")),"typeKeywords"===t&&null!==e[t]&&(e[t]=e[t].join(", ")),"extent"===t&&e[t]&&(e[t]=JSON.stringify(e[t]));return e}};(0,r._)([(0,d.Cb)({type:["private","shared","org","public"]})],x.prototype,"access",void 0),(0,r._)([(0,d.Cb)()],x.prototype,"accessInformation",void 0),(0,r._)([(0,d.Cb)({type:String})],x.prototype,"apiKey",void 0),(0,r._)([(0,d.Cb)({json:{read:{source:"appProxies"}}})],x.prototype,"applicationProxies",void 0),(0,r._)([(0,d.Cb)()],x.prototype,"avgRating",void 0),(0,r._)([(0,d.Cb)()],x.prototype,"categories",void 0),(0,r._)([(0,d.Cb)({type:Date})],x.prototype,"created",void 0),(0,r._)([(0,d.Cb)()],x.prototype,"culture",void 0),(0,r._)([(0,d.Cb)()],x.prototype,"description",void 0),(0,r._)([(0,d.Cb)({readOnly:!0})],x.prototype,"displayName",null),(0,r._)([(0,d.Cb)({type:y.Z})],x.prototype,"extent",void 0),(0,r._)([(0,p.r)("extent")],x.prototype,"readExtent",null),(0,r._)([(0,d.Cb)()],x.prototype,"groupCategories",void 0),(0,r._)([(0,d.Cb)({readOnly:!0})],x.prototype,"iconUrl",null),(0,r._)([(0,d.Cb)()],x.prototype,"id",void 0),(0,r._)([(0,d.Cb)({readOnly:!0})],x.prototype,"isLayer",null),(0,r._)([(0,d.Cb)()],x.prototype,"itemControl",void 0),(0,r._)([(0,d.Cb)({readOnly:!0})],x.prototype,"itemUrl",null),(0,r._)([(0,d.Cb)()],x.prototype,"licenseInfo",void 0),(0,r._)([(0,d.Cb)({type:Date})],x.prototype,"modified",void 0),(0,r._)([(0,d.Cb)()],x.prototype,"name",void 0),(0,r._)([(0,d.Cb)()],x.prototype,"numComments",void 0),(0,r._)([(0,d.Cb)()],x.prototype,"numRatings",void 0),(0,r._)([(0,d.Cb)()],x.prototype,"numViews",void 0),(0,r._)([(0,d.Cb)()],x.prototype,"owner",void 0),(0,r._)([(0,d.Cb)()],x.prototype,"ownerFolder",void 0),(0,r._)([(0,d.Cb)({type:_.Z})],x.prototype,"portal",void 0),(0,r._)([(0,d.Cb)()],x.prototype,"screenshots",void 0),(0,r._)([(0,d.Cb)()],x.prototype,"size",void 0),(0,r._)([(0,d.Cb)()],x.prototype,"snippet",void 0),(0,r._)([(0,d.Cb)()],x.prototype,"sourceJSON",void 0),(0,r._)([(0,d.Cb)()],x.prototype,"tags",void 0),(0,r._)([(0,d.Cb)()],x.prototype,"thumbnail",void 0),(0,r._)([(0,d.Cb)({readOnly:!0})],x.prototype,"thumbnailUrl",null),(0,r._)([(0,d.Cb)()],x.prototype,"title",void 0),(0,r._)([(0,d.Cb)()],x.prototype,"type",void 0),(0,r._)([(0,d.Cb)()],x.prototype,"typeKeywords",void 0),(0,r._)([(0,d.Cb)()],x.prototype,"url",void 0),(0,r._)([(0,d.Cb)({readOnly:!0})],x.prototype,"userItemUrl",null),x=C=(0,r._)([(0,f.j)("esri.portal.PortalItem")],x);const D=x},99282:(e,t,i)=>{i.d(t,{a:()=>n});var r=i(67900),s=i(68441);const n={inches:(0,r.En)(1,"meters","inches"),feet:(0,r.En)(1,"meters","feet"),"us-feet":(0,r.En)(1,"meters","us-feet"),yards:(0,r.En)(1,"meters","yards"),miles:(0,r.En)(1,"meters","miles"),"nautical-miles":(0,r.En)(1,"meters","nautical-miles"),millimeters:(0,r.En)(1,"meters","millimeters"),centimeters:(0,r.En)(1,"meters","centimeters"),decimeters:(0,r.En)(1,"meters","decimeters"),meters:(0,r.En)(1,"meters","meters"),kilometers:(0,r.En)(1,"meters","kilometers"),"decimal-degrees":1/(0,r.ty)(1,"meters",s.sv.radius)}},28101:(e,t,i)=>{i.d(t,{PR:()=>v,Lq:()=>f,Km:()=>y,cM:()=>_,ap:()=>g,V3:()=>w,B3:()=>p});var r=i(22303),s=i(1692),n=i(74085),a=i(92604),l=i(70586),o=i(99282),u=i(51706);const h=a.Z.getLogger("esri.renderers.visualVariables.support.visualVariableUtils"),d=new s.Z,c=Math.PI,p=/^\s*(return\s+)?\$view\.scale\s*(;)?\s*$/i;function f(e,t,i){const s="visualVariables"in e&&e.visualVariables?e.visualVariables.filter((e=>"color"===e.type))[0]:e;if(!s)return;if("esri.renderers.visualVariables.ColorVariable"!==s.declaredClass)return void h.warn("The visualVariable should be an instance of esri.renderers.visualVariables.ColorVariable");const n="number"==typeof t,a=n?null:t,o=a&&a.attributes;let u=n?t:null;const d=s.field,{ipData:c,hasExpression:p}=s.cache;let f=s.cache.compiledFunc;if(!d&&!p){const e=s.stops;return e&&e[0]&&e[0].color}if("number"!=typeof u)if(p){if(!(0,l.pC)(i)||!(0,l.pC)(i.arcade))return void h.error("Use of arcade expressions requires an arcade context");const e={viewingMode:i.viewingMode,scale:i.scale,spatialReference:i.spatialReference},t=i.arcade.arcadeUtils,r=t.getViewInfo(e),n=t.createExecContext(a,r);if(!f){const e=t.createSyntaxTree(s.valueExpression);f=t.createFunction(e),s.cache.compiledFunc=f}u=t.executeFunction(f,n)}else o&&(u=o[d]);const y=s.normalizationField,_=o?parseFloat(o[y]):void 0;if(null!=u&&(!y||n||!isNaN(_)&&0!==_)){isNaN(_)||n||(u/=_);const e=S(u,c);if(e){const t=e[0],n=e[1],a=t===n?s.stops[t].color:r.Z.blendColors(s.stops[t].color,s.stops[n].color,e[2],(0,l.pC)(i)?i.color:void 0);return new r.Z(a)}}}function y(e,t,i){const r="visualVariables"in e&&e.visualVariables?e.visualVariables.filter((e=>"opacity"===e.type))[0]:e;if(!r)return;if("esri.renderers.visualVariables.OpacityVariable"!==r.declaredClass)return void h.warn("The visualVariable should be an instance of esri.renderers.visualVariables.OpacityVariable");const s="number"==typeof t,n=s?null:t,a=n&&n.attributes;let o=s?t:null;const u=r.field,{ipData:d,hasExpression:c}=r.cache;let p=r.cache.compiledFunc;if(!u&&!c){const e=r.stops;return e&&e[0]&&e[0].opacity}if("number"!=typeof o)if(c){if((0,l.Wi)(i)||(0,l.Wi)(i.arcade))return void h.error("Use of arcade expressions requires an arcade context");const e={viewingMode:i.viewingMode,scale:i.scale,spatialReference:i.spatialReference},t=i.arcade.arcadeUtils,s=t.getViewInfo(e),a=t.createExecContext(n,s);if(!p){const e=t.createSyntaxTree(r.valueExpression);p=t.createFunction(e),r.cache.compiledFunc=p}o=t.executeFunction(p,a)}else a&&(o=a[u]);const f=r.normalizationField,y=a?parseFloat(a[f]):void 0;if(null!=o&&(!f||s||!isNaN(y)&&0!==y)){isNaN(y)||s||(o/=y);const e=S(o,d);if(e){const t=e[0],i=e[1];if(t===i)return r.stops[t].opacity;{const s=r.stops[t].opacity;return s+(r.stops[i].opacity-s)*e[2]}}}}function _(e,t,i){const r="visualVariables"in e&&e.visualVariables?e.visualVariables.filter((e=>"rotation"===e.type))[0]:e;if(!r)return;if("esri.renderers.visualVariables.RotationVariable"!==r.declaredClass)return void h.warn("The visualVariable should be an instance of esri.renderers.visualVariables.RotationVariable");const s=r.axis||"heading",n="heading"===s&&"arithmetic"===r.rotationType?90:0,a="heading"===s&&"arithmetic"===r.rotationType?-1:1,o="number"==typeof t?null:t,u=o&&o.attributes,d=r.field,{hasExpression:c}=r.cache;let p=r.cache.compiledFunc,f=0;if(!d&&!c)return f;if(c){if((0,l.Wi)(i)||(0,l.Wi)(i.arcade))return void h.error("Use of arcade expressions requires an arcade context");const e={viewingMode:i.viewingMode,scale:i.scale,spatialReference:i.spatialReference},t=i.arcade.arcadeUtils,s=t.getViewInfo(e),n=t.createExecContext(o,s);if(!p){const e=t.createSyntaxTree(r.valueExpression);p=t.createFunction(e),r.cache.compiledFunc=p}f=t.executeFunction(p,n)}else u&&(f=u[d]||0);return f="number"!=typeof f||isNaN(f)?null:n+a*f,f}function g(e,t,i){const r="visualVariables"in e&&e.visualVariables?e.visualVariables.filter((e=>"size"===e.type))[0]:e;if(!r)return;if("esri.renderers.visualVariables.SizeVariable"!==r.declaredClass)return void h.warn("The visualVariable should be an instance of esri.renderers.visualVariables.SizeVariable");const s=function(e,t,i,r,s){switch(t.transformationType){case u.hL.Additive:return function(e,t,i,r){return e+(m(t.minSize,i,r)||t.minDataValue)}(e,t,i,r);case u.hL.Constant:return function(e,t,i){const r=e.stops;let s=r&&r.length&&r[0].size;return null==s&&(s=e.minSize),m(s,t,i)}(t,i,r);case u.hL.ClampedLinear:return function(e,t,i,r){const s=(e-t.minDataValue)/(t.maxDataValue-t.minDataValue),n=m(t.minSize,i,r),a=m(t.maxSize,i,r),o=(0,l.pC)(r)?r.shape:void 0;if(e<=t.minDataValue)return n;if(e>=t.maxDataValue)return a;if("area"===t.scaleBy&&o){const e="circle"===o,t=e?c*(n/2)**2:n*n,i=t+s*((e?c*(a/2)**2:a*a)-t);return e?2*Math.sqrt(i/c):Math.sqrt(i)}return n+s*(a-n)}(e,t,i,r);case u.hL.Proportional:return function(e,t,i,r){const s=(0,l.pC)(r)?r.shape:void 0,n=e/t.minDataValue,a=m(t.minSize,i,r),o=m(t.maxSize,i,r);let u=null;return u="circle"===s?2*Math.sqrt(n*(a/2)**2):"square"===s||"diamond"===s||"image"===s?Math.sqrt(n*a**2):n*a,b(u,a,o)}(e,t,i,r);case u.hL.Stops:return function(e,t,i,r,s){const[n,a,l]=S(e,s);if(n===a)return m(t.stops[n].size,i,r);{const e=m(t.stops[n].size,i,r);return e+(m(t.stops[a].size,i,r)-e)*l}}(e,t,i,r,s);case u.hL.RealWorldSize:return function(e,t,i,r){const s=((0,l.pC)(r)&&r.resolution?r.resolution:1)*o.a[t.valueUnit],n=m(t.minSize,i,r),a=m(t.maxSize,i,r),{valueRepresentation:u}=t;let h=null;return h="area"===u?2*Math.sqrt(e/c)/s:"radius"===u||"distance"===u?2*e/s:e/s,b(h,n,a)}(e,t,i,r);case u.hL.Identity:return e;case u.hL.Unknown:return null}}(function(e,t,i){const r="number"==typeof t,s=r?null:t,n=s&&s.attributes;let a=r?t:null;const{isScaleDriven:o}=e.cache;let d=e.cache.compiledFunc;if(o){const t=(0,l.pC)(i)?i.scale:void 0,r=(0,l.pC)(i)?i.view:void 0;a=null==t||"3d"===r?function(e){let t=null,i=null;const r=e.stops;return r?(t=r[0].value,i=r[r.length-1].value):(t=e.minDataValue||0,i=e.maxDataValue||0),(t+i)/2}(e):t}else if(!r)switch(e.inputValueType){case u.RY.Expression:{if((0,l.Wi)(i)||(0,l.Wi)(i.arcade))return void h.error("Use of arcade expressions requires an arcade context");const t={viewingMode:i.viewingMode,scale:i.scale,spatialReference:i.spatialReference},r=i.arcade.arcadeUtils,n=r.getViewInfo(t),o=r.createExecContext(s,n);if(!d){const t=r.createSyntaxTree(e.valueExpression);d=r.createFunction(t),e.cache.compiledFunc=d}a=r.executeFunction(d,o);break}case u.RY.Field:n&&(a=n[e.field]);break;case u.RY.Unknown:a=null}if(!(0,u.qh)(a))return null;if(r||!e.normalizationField)return a;const c=n?parseFloat(n[e.normalizationField]):null;return(0,u.qh)(c)&&0!==c?a/c:null}(r,t,i),r,t,i,r.cache.ipData);return null==s||isNaN(s)?0:s}function m(e,t,i){return null==e?null:(0,u.iY)(e)?g(e,t,i):(0,u.qh)(e)?e:null}function b(e,t,i){return(0,u.qh)(i)&&e>i?i:(0,u.qh)(t)&&e<t?t:e}function w(e,t,i){const{isScaleDriven:r}=e.cache;if(!(r&&"3d"===i||t))return null;const s={scale:t,view:i};let n=m(e.minSize,d,s),a=m(e.maxSize,d,s);if(null!=n||null!=a){if(n>a){const e=a;a=n,n=e}return{minSize:n,maxSize:a}}}function S(e,t){if(!t)return;let i=0,r=t.length-1;return t.some(((t,s)=>e<t?(r=s,!0):(i=s,!1))),[i,r,(e-t[i])/(t[r]-t[i])]}function v(e,t,i){const r=["proportional","proportional","proportional"];for(const s of e){const e=s.useSymbolValue?"symbol-value":g(s,t,i);switch(s.axis){case"width":r[0]=e;break;case"depth":r[1]=e;break;case"height":r[2]=e;break;case"width-and-depth":r[0]=e,r[1]=e;break;case"all":case void 0:case null:r[0]=e,r[1]=e,r[2]=e;break;default:(0,n.Bg)(s.axis)}}return r}},28694:(e,t,i)=>{i.d(t,{p:()=>n});var r=i(70586),s=i(69285);function n(e,t,i){if(!i||!i.features||!i.hasZ)return;const n=(0,s.k)(i.geometryType,t,e.outSpatialReference);if(!(0,r.Wi)(n))for(const e of i.features)n(e.geometry)}},58333:(e,t,i)=>{i.d(t,{I4:()=>s,lF:()=>a,ET:()=>n,qP:()=>l,eG:()=>o,lj:()=>h,wW:()=>u});const r=[252,146,31,255],s={type:"esriSMS",style:"esriSMSCircle",size:6,color:r,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},n={type:"esriSLS",style:"esriSLSSolid",width:.75,color:r},a={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},l={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},o={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},u={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},h={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}},89749:(e,t,i)=>{i.d(t,{t:()=>d});var r=i(43697),s=i(15923),n=i(61247),a=i(70586),l=i(17445),o=i(1654),u=i(5600),h=i(52011);let d=class extends s.Z{constructor(){super(...arguments),this.updating=!1,this.handleId=0,this.handles=new n.Z,this.scheduleHandleId=0,this.pendingPromises=new Set}destroy(){this.removeAll(),this.handles.destroy()}add(e,t,i={}){const r=++this.handleId;i.sync||this._installSyncUpdatingWatch(e,r);const s=(0,l.YP)(e,t,i);return this.handles.add(s,r),{remove:()=>this.handles.remove(r)}}addOnCollectionChange(e,t,{initial:i=!1}={}){const r=++this.handleId;return this.handles.add([(0,l.on)(e,"after-changes",this._createSyncUpdatingCallback(),l.Z_),(0,l.on)(e,"change",t,{onListenerAdd:i?e=>t({added:e.toArray(),removed:[]}):void 0})],r),{remove:()=>this.handles.remove(r)}}addPromise(e){if((0,a.Wi)(e))return e;const t=++this.handleId;this.handles.add({remove:()=>{this.pendingPromises.delete(e)&&(0!==this.pendingPromises.size||this.handles.has(c)||this._set("updating",!1))}},t),this.pendingPromises.add(e),this._set("updating",!0);const i=()=>this.handles.remove(t);return e.then(i,i),e}removeAll(){this.pendingPromises.clear(),this.handles.removeAll(),this._set("updating",!1)}_installSyncUpdatingWatch(e,t){const i=this._createSyncUpdatingCallback(),r=(0,l.YP)(e,i,{sync:!0,equals:()=>!1});return this.handles.add(r,t),r}_createSyncUpdatingCallback(){return()=>{this.handles.remove(c),++this.scheduleHandleId;const e=this.scheduleHandleId;this._get("updating")||this._set("updating",!0),this.handles.add((0,o.Os)((()=>{e===this.scheduleHandleId&&(this._set("updating",this.pendingPromises.size>0),this.handles.remove(c))})),c)}}};(0,r._)([(0,u.Cb)({readOnly:!0})],d.prototype,"updating",void 0),d=(0,r._)([(0,h.j)("esri.views.support.WatchUpdatingTracking")],d);const c=-42;var p,f;(f=p||(p={}))[f.NONE=0]="NONE",f[f.SYNC=1]="SYNC",f[f.INIT=2]="INIT"}}]);
|