@arcgis/core 4.23.0-next.20220126 → 4.23.0-next.20220130
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/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/{97ec9eef0048760fa260.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/27474b007988855bea9d.js +1 -0
- package/assets/esri/core/workers/chunks/281b89dbf5574fc642ae.js +1 -0
- package/assets/esri/core/workers/chunks/2c8fe9bc988c3c5760a5.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/{b2ebe4f6d100e15b512d.js → 37c03cfc19086ce631c6.js} +1 -1
- package/assets/esri/core/workers/chunks/386f86f961146f530aa7.js +1 -0
- package/assets/esri/core/workers/chunks/{e6165e17fbb07bfc40a1.js → 391e96192d1ec4e55ce2.js} +1 -1
- 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/{438f0b5ae5c53ae4f06a.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/{5dfe1f8d520025e2118b.js → 57b349d1dbc0bed75b79.js} +1 -1
- package/assets/esri/core/workers/chunks/{97a28641b3b2fd31bea2.js → 5bcb3240b3c005e5fe72.js} +1 -1
- 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/{ba5eb394f098968c22d2.js → 655b55ac0cd533d7e9d7.js} +1 -1
- package/assets/esri/core/workers/chunks/{b0b036ad3ad3cd956747.js → 69fd99b7c76e9992ccf3.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/83d00afae4406ec78bc9.js +1 -0
- package/assets/esri/core/workers/chunks/{434b16731c6a81f868ef.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/949b2269457302ffc64b.js +1 -0
- package/assets/esri/core/workers/chunks/{601e697dc7414bda128a.js → 952980635afc7ec81804.js} +1 -1
- 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/{f760a3e030b0f358a92a.js → aeaa1667c2d9f1b3366b.js} +1 -1
- package/assets/esri/core/workers/chunks/{3f343f792fd9f44d6f25.js → b3f5e91116112b0b612a.js} +1 -1
- 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/{e4b84ca8ddfd48dd79b1.js → bac9fc90e6756e211160.js} +1 -1
- package/assets/esri/core/workers/chunks/{4c76146014dc15143ba3.js → be588873c16770ceb9ef.js} +1 -1
- 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/{e4e2036373166c1d5cf5.js → c2253a9f29c1aabb2b75.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/{6f50a9647f026a8d4729.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/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/widgets/_Weather.scss +1 -1
- 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 +3 -3
- 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 +11 -11
- package/chunks/TextureOnly.glsl.js +2 -2
- package/chunks/WaterSurface.glsl.js +5 -5
- package/chunks/boundedPlane.js +1 -1
- package/chunks/vxlLayer.js +1 -1
- package/core/accessorSupport/watch.js +1 -1
- package/core/clock.js +1 -1
- package/core/jsonMap.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/support/frustum.js +1 -1
- package/geometry/support/plane.js +1 -1
- package/interfaces.d.ts +232 -38
- 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/package.json +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/ObjectSymbol3DLayer.js +1 -1
- package/symbols/Symbol3D.js +1 -1
- package/symbols/WebStyleSymbol.js +1 -1
- package/symbols/cim/CIMSymbolRasterizer.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/Thumbnail.js +1 -1
- package/symbols/support/webStyleSymbolUtils.js +1 -1
- package/views/2d/MapViewConstraints.js +1 -1
- package/views/2d/engine/vectorTiles/SchemaHelper.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/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/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/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/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/Graphics3DExtrudeSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
- package/views/3d/layers/graphics/Graphics3DLineCalloutSymbolLayer.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/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/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 +10 -10
- 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/TextTextureAtlas.js +1 -1
- package/views/3d/webgl-engine/lib/Texture.js +1 -1
- package/views/3d/webgl-engine/lib/TextureUniformName.js +4 -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/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/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/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/webdoc/support/{Thumbnail.js → SlideThumbnail.js} +1 -1
- package/webmap/Bookmark.js +1 -1
- package/webmap/Version.js +1 -1
- package/webscene/Slide.js +1 -1
- package/webscene/Version.js +1 -1
- package/webscene/support/SlideVisibleLayer.js +1 -1
- package/widgets/AreaMeasurement3D/AreaMeasurement3DViewModel.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/Bookmarks/BookmarksViewModel.js +1 -1
- package/widgets/Bookmarks.js +1 -1
- package/widgets/DirectLineMeasurement3D/DirectLineMeasurement3DViewModel.js +1 -1
- package/widgets/FeatureTemplates/FeatureTemplatesViewModel.js +1 -1
- package/widgets/LineOfSight/LineOfSightViewModel.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/TimeSlider.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/InteractiveToolViewModel.js +1 -1
- package/assets/esri/core/workers/chunks/00c5bb5eecb0e89266df.js +0 -1
- package/assets/esri/core/workers/chunks/021a37e2b191298e80b7.js +0 -1
- package/assets/esri/core/workers/chunks/1370c92c40fd6271553c.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/1fbcc8424452d0256bd6.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/23b15e7c2f96d260e16c.js +0 -1
- package/assets/esri/core/workers/chunks/25a3e9bc0b4c7e0d3165.js +0 -1
- package/assets/esri/core/workers/chunks/2792ca40f1e92849247c.js +0 -1
- package/assets/esri/core/workers/chunks/2a96f1bba9ce6883e5e0.js +0 -1
- package/assets/esri/core/workers/chunks/3231ee3e090bb4cac3fc.js +0 -1
- package/assets/esri/core/workers/chunks/36a3f6fb4d1d18fcb642.js +0 -1
- package/assets/esri/core/workers/chunks/36e250278b5622ccf068.js +0 -1
- package/assets/esri/core/workers/chunks/395ba088d4864588ff66.js +0 -1
- package/assets/esri/core/workers/chunks/3aa4194dc5497c57647f.js +0 -1
- package/assets/esri/core/workers/chunks/3cc77692b2eee27b9c9e.js +0 -1
- package/assets/esri/core/workers/chunks/40a1e713f63ec77110c0.js +0 -1
- package/assets/esri/core/workers/chunks/4385a268c2a64281d1c1.js +0 -1
- package/assets/esri/core/workers/chunks/46b4bb66a54bbd8e2e57.js +0 -1
- package/assets/esri/core/workers/chunks/4bfbf5a34c9207fdcf44.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/5d991b74d958005c26c4.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/7bc5cc5dbf1b7b70ddac.js +0 -1
- package/assets/esri/core/workers/chunks/7d661129a0d8c466eeec.js +0 -1
- package/assets/esri/core/workers/chunks/8070972c0efb78523b68.js +0 -1
- package/assets/esri/core/workers/chunks/85e27fd949475f9a6bbc.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/98986e6601b0366376b4.js +0 -1
- package/assets/esri/core/workers/chunks/9cdcf9309d6feda70185.js +0 -1
- package/assets/esri/core/workers/chunks/aa861b8eae6c85f3dad4.js +0 -1
- package/assets/esri/core/workers/chunks/aace7e1fef256bb961c9.js +0 -1
- package/assets/esri/core/workers/chunks/ad081d8e49e7f90c3c26.js +0 -1
- package/assets/esri/core/workers/chunks/af5694b4d278cf1db2d9.js +0 -1
- package/assets/esri/core/workers/chunks/afbb4f802ca5774f0326.js +0 -1
- package/assets/esri/core/workers/chunks/b2c5f92e3d7606297ca9.js +0 -1
- package/assets/esri/core/workers/chunks/b8316c6469a543029bc6.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/bf0a65b4be31959f921d.js +0 -1
- package/assets/esri/core/workers/chunks/c11474b702dfb94e8e87.js +0 -1
- package/assets/esri/core/workers/chunks/c890c7fca27170e3341f.js +0 -1
- package/assets/esri/core/workers/chunks/c976785f2391c77d8a30.js +0 -1
- package/assets/esri/core/workers/chunks/ca2f5faa01d99c21ec14.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/de6cff7b6cbbf99b20d1.js +0 -981
- package/assets/esri/core/workers/chunks/e4f93c55eaefab4192b5.js +0 -1
- package/assets/esri/core/workers/chunks/e59764ee8cf25d4f74e2.js +0 -1
- package/assets/esri/core/workers/chunks/ec89466f76d0ba22525e.js +0 -1
- package/assets/esri/core/workers/chunks/ee45618c45806ab654cb.js +0 -1
- package/assets/esri/core/workers/chunks/f467c8f1fce22f6f599c.js +0 -1
- package/assets/esri/core/workers/chunks/f4baa5ea2e42b1317941.js +0 -1
- package/assets/esri/core/workers/chunks/face43cf5abcd2f5bd9d.js +0 -1
- package/assets/esri/core/workers/chunks/ffaf091c6023225cf5aa.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5404,5732],{92835:(e,t,s)=>{s.d(t,{Z:()=>y});var r,i=s(43697),n=s(96674),a=s(70586),o=s(35463),l=s(5600),u=(s(67676),s(80442),s(75215),s(71715)),d=s(52011),c=s(30556);let h=r=class extends n.wq{constructor(e){super(e),this.end=null,this.start=null}static get allTime(){return p}static get empty(){return g}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?e.getTime():null}get isAllTime(){return this.equals(r.allTime)}get isEmpty(){return this.equals(r.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?e.getTime():null}clone(){return new r({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=(0,a.pC)(this.start)?this.start.getTime():this.start,s=(0,a.pC)(this.end)?this.end.getTime():this.end,r=(0,a.pC)(e.start)?e.start.getTime():e.start,i=(0,a.pC)(e.end)?e.end.getTime():e.end;return t===r&&s===i}expandTo(e){if(this.isEmpty||this.isAllTime)return this.clone();const t=(0,a.Po)(this.start,(t=>(0,o.JE)(t,e))),s=(0,a.Po)(this.end,(t=>(0,o.Nm)((0,o.JE)(t,e),1,e)));return new r({start:t,end:s})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return r.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=(0,a.R2)(this.start,-1/0,(e=>e.getTime())),s=(0,a.R2)(this.end,1/0,(e=>e.getTime())),i=(0,a.R2)(e.start,-1/0,(e=>e.getTime())),n=(0,a.R2)(e.end,1/0,(e=>e.getTime()));let o,l;if(i>=t&&i<=s?o=i:t>=i&&t<=n&&(o=t),s>=i&&s<=n?l=s:n>=t&&n<=s&&(l=n),!isNaN(o)&&!isNaN(l)){const e=new r;return e.start=o===-1/0?null:new Date(o),e.end=l===1/0?null:new Date(l),e}return r.empty}offset(e,t){if(this.isEmpty||this.isAllTime)return this.clone();const s=new r,{start:i,end:n}=this;return(0,a.pC)(i)&&(s.start=(0,o.Nm)(i,e,t)),(0,a.pC)(n)&&(s.end=(0,o.Nm)(n,e,t)),s}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return p.clone();const t=(0,a.pC)(this.start)&&(0,a.pC)(e.start)?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,s=(0,a.pC)(this.end)&&(0,a.pC)(e.end)?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new r({start:t,end:s})}};(0,i._)([(0,l.Cb)({type:Date,json:{write:{allowNull:!0}}})],h.prototype,"end",void 0),(0,i._)([(0,u.r)("end")],h.prototype,"readEnd",null),(0,i._)([(0,c.c)("end")],h.prototype,"writeEnd",null),(0,i._)([(0,l.Cb)({readOnly:!0,json:{read:!1}})],h.prototype,"isAllTime",null),(0,i._)([(0,l.Cb)({readOnly:!0,json:{read:!1}})],h.prototype,"isEmpty",null),(0,i._)([(0,l.Cb)({type:Date,json:{write:{allowNull:!0}}})],h.prototype,"start",void 0),(0,i._)([(0,u.r)("start")],h.prototype,"readStart",null),(0,i._)([(0,c.c)("start")],h.prototype,"writeStart",null),h=r=(0,i._)([(0,d.j)("esri.TimeExtent")],h);const p=new h,g=new h({start:void 0,end:void 0}),y=h},84552:(e,t,s)=>{s.d(t,{Z:()=>c});var r,i=s(43697),n=s(96674),a=s(35463),o=s(5600),l=(s(67676),s(80442),s(75215),s(52011)),u=s(78981);let d=r=class extends n.wq{constructor(e){super(e),this.value=0,this.unit="milliseconds"}toMilliseconds(){return(0,a.rJ)(this.value,this.unit,"milliseconds")}clone(){return new r({value:this.value,unit:this.unit})}};(0,i._)([(0,o.Cb)({type:Number,json:{write:!0},nonNullable:!0})],d.prototype,"value",void 0),(0,i._)([(0,o.Cb)({type:u.v.apiValues,json:{type:u.v.jsonValues,read:u.v.read,write:u.v.write},nonNullable:!0})],d.prototype,"unit",void 0),d=r=(0,i._)([(0,l.j)("esri.TimeInterval")],d);const c=d},5732:(e,t,s)=>{s.d(t,{a:()=>n,c:()=>r,g:()=>i});var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function n(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}},25929:(e,t,s)=>{s.d(t,{M:()=>p,f:()=>n,i:()=>c,p:()=>y,r:()=>o,t:()=>a,w:()=>l});var r=s(70586),i=s(17452);function n(e,t){const s=t&&t.url&&t.url.path;if(e&&s&&(e=(0,i.hF)(e,s,{preserveProtocolRelative:!0}),t.portalItem&&t.readResourcePaths)){const s=(0,i.PF)(e,t.portalItem.itemUrl);d.test(s)&&t.readResourcePaths.push(t.portalItem.resourceFromPath(s).path)}return h(e,t&&t.portal)}function a(e,t,s=p.YES){if(!e)return e;!(0,i.YP)(e)&&t&&t.blockedRelativeUrls&&t.blockedRelativeUrls.push(e);let r=(0,i.hF)(e);if(t){const s=t.verifyItemRelativeUrls&&t.verifyItemRelativeUrls.rootPath||t.url&&t.url.path;if(s){const n=h(s,t.portal);r=(0,i.PF)(h(r,t.portal),n,n),r!==e&&t.verifyItemRelativeUrls&&t.verifyItemRelativeUrls.writtenUrls.push(r)}}return r=function(e,t){return t&&!t.isPortal&&t.urlKey&&t.customBaseUrl?(0,i.Ie)(e,`${t.urlKey}.${t.customBaseUrl}`,t.portalHostname):e}(r,t&&t.portal),(0,i.YP)(r)&&(r=(0,i.Fv)(r)),null!=t&&t.resources&&null!=t&&t.portalItem&&!(0,i.YP)(r)&&!(0,i.HK)(r)&&s===p.YES&&t.resources.toKeep.push({resource:t.portalItem.resourceFromPath(r)}),r}function o(e,t,s){return n(e,s)}function l(e,t,s,r){const i=a(e,r);void 0!==i&&(t[s]=i)}const u=/\/items\/([^\/]+)\/resources\//,d=/^\.\/resources\//;function c(e){const t=(0,r.pC)(e)?e.match(u):null;return(0,r.pC)(t)?t[1]:null}function h(e,t){if(!t||t.isPortal||!t.urlKey||!t.customBaseUrl)return e;const s=`${t.urlKey}.${t.customBaseUrl}`,r=(0,i.TI)();return(0,i.D6)(r,`${r.scheme}://${s}`)?(0,i.Ie)(e,t.portalHostname,s):(0,i.Ie)(e,s,t.portalHostname)}var p,g;(g=p||(p={}))[g.YES=0]="YES",g[g.NO=1]="NO";const y=Object.freeze({__proto__:null,fromJSON:n,toJSON:a,read:o,write:l,itemIdFromResourceUrl:c,get MarkKeep(){return p}})},3920:(e,t,s)=>{s.d(t,{r:()=>d,p:()=>u});var r=s(43697),i=s(15923),n=s(61247),a=s(5600),o=s(52011),l=s(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 l.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,o.j)("esri.core.HandleOwner")],t),t};let d=class extends(u(i.Z)){};d=(0,r._)([(0,o.j)("esri.core.HandleOwner")],d)},66643:(e,t,s)=>{s.d(t,{Ed:()=>n,UI:()=>a,q6:()=>o,mt:()=>l});var r=s(70586),i=s(95330);function n(e,t,s){return(0,i.as)(e.map(((e,r)=>t.apply(s,[e,r]))))}function a(e,t,s){return(0,i.as)(e.map(((e,r)=>t.apply(s,[e,r])))).then((e=>e.map((e=>e.value))))}function o(e){return(0,r.Wi)(e)?(0,i.DB)():e.then((e=>({ok:!0,value:e}))).catch((e=>({ok:!1,error:e})))}function l(e){return e.then((e=>({ok:!0,value:e}))).catch((e=>((0,i.r9)(e),{ok:!1,error:e})))}},43090:(e,t,s)=>{function r(e){return 32+e.length}function i(e){if(!e)return 0;let t=32;for(const s in e)if(e.hasOwnProperty(s)){const i=e[s];switch(typeof i){case"string":t+=r(i);break;case"number":t+=16;break;case"boolean":t+=4}}return t}function n(e,t){return 32+e.length*t}var a;s.d(t,{Y8:()=>a,f2:()=>i,do:()=>n}),function(e){e[e.KILOBYTES=1024]="KILOBYTES",e[e.MEGABYTES=1048576]="MEGABYTES",e[e.GIGABYTES=1073741824]="GIGABYTES"}(a||(a={}))},45091:(e,t,s)=>{s.d(t,{Z:()=>d});var r,i,n=s(80442),a=s(71143);(i=r||(r={}))[i.varint=0]="varint",i[i.fixed64=1]="fixed64",i[i.delimited=2]="delimited",i[i.fixed32=5]="fixed32",i[i.unknown=99]="unknown";const o=4294967296,l=new TextDecoder("utf-8"),u=(0,n.Z)("safari")||(0,n.Z)("ios")?6:(0,n.Z)("ff")?12:32;class d{constructor(e,t,s=0,i=(e?e.byteLength:0)){this._tag=0,this._dataType=r.unknown,this._init(e,t,s,i)}_init(e,t,s,r){this._data=e,this._dataView=t,this._pos=s,this._end=r}clone(){return new d(this._data,this._dataView,this._pos,this._end)}pos(){return this._pos}move(e){this._pos=e}nextTag(e){for(;;){if(this._pos===this._end)return!1;const t=this._decodeVarint();if(this._tag=t>>3,this._dataType=7&t,!e||e===this._tag)break;this.skip()}return!0}next(){if(this._pos===this._end)return!1;const e=this._decodeVarint();return this._tag=e>>3,this._dataType=7&e,!0}empty(){return this._pos>=this._end}tag(){return this._tag}getInt32(){return this._decodeVarint()}getInt64(){return this._decodeVarint()}getUInt32(){let e=4294967295;return e=(127&this._data[this._pos])>>>0,this._data[this._pos++]<128?e:(e=(e|(127&this._data[this._pos])<<7)>>>0,this._data[this._pos++]<128?e:(e=(e|(127&this._data[this._pos])<<14)>>>0,this._data[this._pos++]<128?e:(e=(e|(127&this._data[this._pos])<<21)>>>0,this._data[this._pos++]<128?e:(e=(e|(15&this._data[this._pos])<<28)>>>0,this._data[this._pos++]<128?e:void 0))))}getUInt64(){return this._decodeVarint()}getSInt32(){const e=this.getUInt32();return e>>>1^-(1&e)|0}getSInt64(){return this._decodeSVarint()}getBool(){const e=0!==this._data[this._pos];return this._skip(1),e}getEnum(){return this._decodeVarint()}getFixed64(){const e=this._dataView,t=this._pos,s=e.getUint32(t,!0)+e.getUint32(t+4,!0)*o;return this._skip(8),s}getSFixed64(){const e=this._dataView,t=this._pos,s=e.getUint32(t,!0)+e.getInt32(t+4,!0)*o;return this._skip(8),s}getDouble(){const e=this._dataView.getFloat64(this._pos,!0);return this._skip(8),e}getFixed32(){const e=this._dataView.getUint32(this._pos,!0);return this._skip(4),e}getSFixed32(){const e=this._dataView.getInt32(this._pos,!0);return this._skip(4),e}getFloat(){const e=this._dataView.getFloat32(this._pos,!0);return this._skip(4),e}getString(){const e=this._getLength(),t=this._pos,s=this._toString(this._data,t,t+e);return this._skip(e),s}getBytes(){const e=this._getLength(),t=this._pos,s=this._toBytes(this._data,t,t+e);return this._skip(e),s}getLength(){return this._getLengthUnsafe()}processMessageWithArgs(e,t,s,r){const i=this.getMessage(),n=e(i,t,s,r);return i.release(),n}processMessage(e){const t=this.getMessage(),s=e(t);return t.release(),s}getMessage(){const e=this._getLength(),t=d.pool.acquire();return t._init(this._data,this._dataView,this._pos,this._pos+e),this._skip(e),t}release(){d.pool.release(this)}dataType(){return this._dataType}skip(){switch(this._dataType){case r.varint:this._decodeVarint();break;case r.fixed64:this._skip(8);break;case r.delimited:this._skip(this._getLength());break;case r.fixed32:this._skip(4);break;default:throw new Error("Invalid data type!")}}skipLen(e){this._skip(e)}_skip(e){if(this._pos+e>this._end)throw new Error("Attempt to skip past the end of buffer!");this._pos+=e}_decodeVarint(){const e=this._data;let t,s=this._pos,r=0;if(this._end-s>=10)do{if(t=e[s++],r|=127&t,0==(128&t))break;if(t=e[s++],r|=(127&t)<<7,0==(128&t))break;if(t=e[s++],r|=(127&t)<<14,0==(128&t))break;if(t=e[s++],r|=(127&t)<<21,0==(128&t))break;if(t=e[s++],r+=268435456*(127&t),0==(128&t))break;if(t=e[s++],r+=34359738368*(127&t),0==(128&t))break;if(t=e[s++],r+=4398046511104*(127&t),0==(128&t))break;if(t=e[s++],r+=562949953421312*(127&t),0==(128&t))break;if(t=e[s++],r+=72057594037927940*(127&t),0==(128&t))break;if(t=e[s++],r+=0x8000000000000000*(127&t),0==(128&t))break;throw new Error("Varint too long!")}while(0);else{let i=1;for(;s!==this._end&&(t=e[s],0!=(128&t));)++s,r+=(127&t)*i,i*=128;if(s===this._end)throw new Error("Varint overrun!");++s,r+=t*i}return this._pos=s,r}_decodeSVarint(){const e=this._decodeVarint();return e%2?-(e+1)/2:e/2}_getLength(){if(this._dataType!==r.delimited)throw new Error("Not a delimited data type!");return this._decodeVarint()}_getLengthUnsafe(){return this.getUInt32()}_toString(e,t,s){if((s=Math.min(this._end,s))-t>u){const r=e.subarray(t,s);return l.decode(r)}let r="",i="";for(let n=t;n<s;++n){const t=e[n];128&t?i+="%"+t.toString(16):(r+=decodeURIComponent(i)+String.fromCharCode(t),i="")}return i.length&&(r+=decodeURIComponent(i)),r}_toBytes(e,t,s){return s=Math.min(this._end,s),new Uint8Array(e.buffer,t,s-t)}}d.pool=new a.Z(d,null,(e=>{e._data=null,e._dataView=null}))},35463:(e,t,s)=>{s.d(t,{rJ:()=>o,Nm:()=>n,JE:()=>a}),s(80442);const r={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8},i={milliseconds:{getter:"getMilliseconds",setter:"setMilliseconds",multiplier:1},seconds:{getter:"getSeconds",setter:"setSeconds",multiplier:1},minutes:{getter:"getMinutes",setter:"setMinutes",multiplier:1},hours:{getter:"getHours",setter:"setHours",multiplier:1},days:{getter:"getDate",setter:"setDate",multiplier:1},weeks:{getter:"getDate",setter:"setDate",multiplier:7},months:{getter:"getMonth",setter:"setMonth",multiplier:1},years:{getter:"getFullYear",setter:"setFullYear",multiplier:1},decades:{getter:"getFullYear",setter:"setFullYear",multiplier:10},centuries:{getter:"getFullYear",setter:"setFullYear",multiplier:100}};function n(e,t,s){const r=new Date(e.getTime());if(t&&s){const e=i[s],{getter:n,setter:a,multiplier:o}=e;if("months"===s){const e=function(e,t){const s=new Date(e,t+1,1);return s.setDate(0),s.getDate()}(r.getFullYear(),r.getMonth()+t);r.getDate()>e&&r.setDate(e)}r[a](r[n]()+t*o)}return r}function a(e,t){switch(t){case"milliseconds":return new Date(e.getTime());case"seconds":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds());case"minutes":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes());case"hours":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours());case"days":return new Date(e.getFullYear(),e.getMonth(),e.getDate());case"weeks":return new Date(e.getFullYear(),e.getMonth(),e.getDate()-e.getDay());case"months":return new Date(e.getFullYear(),e.getMonth(),1);case"years":return new Date(e.getFullYear(),0,1);case"decades":return new Date(e.getFullYear()-e.getFullYear()%10,0,1);case"centuries":return new Date(e.getFullYear()-e.getFullYear()%100,0,1);default:return new Date}}function o(e,t,s){return 0===e?0:e*r[t]/r[s]}},60437:(e,t,s)=>{s.d(t,{Gv:()=>f,Ue:()=>i,cS:()=>h,fS:()=>y,TC:()=>a,pp:()=>o,JR:()=>p,al:()=>n,t8:()=>c,Tn:()=>d,op:()=>u,dp:()=>l});var r=s(70586);function i(e=m){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function n(e,t,s,r,n,a,o=i()){return o[0]=e,o[1]=t,o[2]=s,o[3]=r,o[4]=n,o[5]=a,o}function a(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function o(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function l(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function u(e,t,s=e){return s[0]=t[0],s[1]=t[1],s[2]=t[2],s!==e&&(s[3]=e[3],s[4]=e[4],s[5]=e[5]),s}function d(e,t,s=e){return s[3]=t[0],s[4]=t[1],s[5]=t[2],s!==e&&(s[0]=e[0],s[1]=e[1],s[2]=e[2]),e}function c(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function h(e){return e?c(e,f):i(f)}function p(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function g(e){return 6===e.length}function y(e,t,s){if((0,r.Wi)(e)||(0,r.Wi)(t))return e===t;if(!g(e)||!g(t))return!1;if(s){for(let r=0;r<e.length;r++)if(!s(e[r],t[r]))return!1}else for(let s=0;s<e.length;s++)if(e[s]!==t[s])return!1;return!0}s(6570),s(24470);const f=[1/0,1/0,1/0,-1/0,-1/0,-1/0],m=[0,0,0,0,0,0];i()},37549:(e,t,s)=>{s.d(t,{H:()=>a});var r=s(80442),i=s(24133);const n={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new i.QB(9,(0,r.Z)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach(((s,r)=>{e[t++]=r})),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(this._boundsToLoad.filter((e=>this._idByBounds.has(e)))),this._boundsToLoad.length=0)}}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,s){n.minX=t[0],n.minY=t[1],n.maxX=t[2],n.maxY=t[3],e.search(n,s)}(this._index,e,(e=>t(this._idByBounds.get(e))))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},57191:(e,t,s)=>{s.d(t,{Z:()=>y});var r=s(20102),i=s(32448),n=s(92604),a=s(70586),o=s(60437),l=s(24470),u=s(98732),d=s(37549),c=s(29730),h=s(70272),p=s(5428);const g={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t)=>new h.ZP(t,e.attributes,null,e.objectId),getGeometry:e=>e.geometry,getCentroid:(e,t)=>(e.centroid||(e.centroid=(0,c.Y)(new p.Z,e.geometry,t.hasZ,t.hasM)),e.centroid)};class y{constructor(e){this.geometryInfo=e,this._boundsStore=new d.H,this._featuresById=new Map,this._markedIds=new Set,this.events=new i.Z,this.featureAdapter=g}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){if(!this.numFeatures)return null;const e=(0,l.Ue)(l.Gv);return this._featuresById.forEach((t=>{const s=this._boundsStore.get(t.objectId);s&&(e[0]=Math.min(s[0],e[0]),e[1]=Math.min(s[1],e[1]),e[2]=Math.max(s[2],e[2]),e[3]=Math.max(s[3],e[3]))})),e}get storeStatistics(){let e=0;return this._featuresById.forEach((t=>{(0,a.pC)(t.geometry)&&t.geometry.coords&&(e+=t.geometry.coords.length)})),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged()}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t,s){for(const r of e){const e=this._boundsStore.get(r.objectId);e&&t((0,o.JR)(s,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach((t=>e(t)))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,(e=>{t(this._featuresById.get(e))}))}startMarkingUsedFeatures(){this._boundsStore.invalidateIndex(),this._markedIds.clear()}sweep(){let e=!1;this._featuresById.forEach(((t,s)=>{this._markedIds.has(s)||(e=!0,this._remove(t))})),this._markedIds.clear(),e&&this._emitChanged()}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void n.Z.getLogger("esri.layers.graphics.data.FeatureStore").error(new r.Z("featurestore:invalid-feature","feature id is missing",{feature:e}));const s=this._featuresById.get(t);let i;if(this._markedIds.add(t),s?(e.displayId=s.displayId,i=this._boundsStore.get(t),this._boundsStore.delete(t)):(0,a.pC)(this.onFeatureAdd)&&this.onFeatureAdd(e),(0,a.Wi)(e.geometry)||!e.geometry.coords||!e.geometry.coords.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);i=(0,u.$)((0,a.pC)(i)?i:(0,l.Ue)(),e.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),(0,a.pC)(i)&&this._boundsStore.set(t,i),this._featuresById.set(t,e)}_remove(e){return(0,a.pC)(this.onFeatureRemove)&&this.onFeatureRemove(e),this._markedIds.delete(e.objectId),this._boundsStore.delete(e.objectId),this._featuresById.delete(e.objectId),e}}},1231:(e,t,s)=>{s.d(t,{Z:()=>f});var r,i=s(43697),n=s(35454),a=s(96674),o=s(5600),l=(s(67676),s(80442),s(75215)),u=s(36030),d=s(71715),c=s(52011),h=s(72729),p=s(86719);const g=new n.Xn({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let y=r=class extends a.wq{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=-1,this.name=null,this.nullable=!0,this.type=null,this.valueType=null}readDescription(e,{description:t}){let s;try{s=JSON.parse(t)}catch(e){}return s?s.value:null}readValueType(e,{description:t}){let s;try{s=JSON.parse(t)}catch(e){}return s?g.fromJSON(s.fieldValueType):null}clone(){return new r({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain&&this.domain.clone()||null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType})}};(0,i._)([(0,o.Cb)({type:String,json:{write:!0}})],y.prototype,"alias",void 0),(0,i._)([(0,o.Cb)({type:[String,Number],json:{write:{allowNull:!0}}})],y.prototype,"defaultValue",void 0),(0,i._)([(0,o.Cb)()],y.prototype,"description",void 0),(0,i._)([(0,d.r)("description")],y.prototype,"readDescription",null),(0,i._)([(0,o.Cb)({types:h.V5,json:{read:{reader:h.im},write:!0}})],y.prototype,"domain",void 0),(0,i._)([(0,o.Cb)({type:Boolean,json:{write:!0}})],y.prototype,"editable",void 0),(0,i._)([(0,o.Cb)({type:l.z8,json:{write:!0}})],y.prototype,"length",void 0),(0,i._)([(0,o.Cb)({type:String,json:{write:!0}})],y.prototype,"name",void 0),(0,i._)([(0,o.Cb)({type:Boolean,json:{write:!0}})],y.prototype,"nullable",void 0),(0,i._)([(0,u.J)(p.v)],y.prototype,"type",void 0),(0,i._)([(0,o.Cb)()],y.prototype,"valueType",void 0),(0,i._)([(0,d.r)("valueType",["description"])],y.prototype,"readValueType",null),y=r=(0,i._)([(0,c.j)("esri.layers.support.Field")],y);const f=y},30547:(e,t,s)=>{s.d(t,{Z:()=>v});var r,i=s(43697),n=s(92835),a=s(84552),o=s(96674),l=s(22974),u=s(70586),d=s(5600),c=(s(75215),s(71715)),h=s(52011),p=s(30556);s(67676),s(80442);let g=r=class extends o.wq{constructor(e){super(e),this.respectsDaylightSaving=!1,this.timezone=null}readRespectsDaylightSaving(e,t){return void 0!==t.respectsDaylightSaving?t.respectsDaylightSaving:void 0!==t.respectDaylightSaving&&t.respectDaylightSaving}clone(){const{respectsDaylightSaving:e,timezone:t}=this;return new r({respectsDaylightSaving:e,timezone:t})}};(0,i._)([(0,d.Cb)({type:Boolean,json:{write:!0}})],g.prototype,"respectsDaylightSaving",void 0),(0,i._)([(0,c.r)("respectsDaylightSaving",["respectsDaylightSaving","respectDaylightSaving"])],g.prototype,"readRespectsDaylightSaving",null),(0,i._)([(0,d.Cb)({type:String,json:{read:{source:"timeZone"},write:{target:"timeZone"}}})],g.prototype,"timezone",void 0),g=r=(0,i._)([(0,h.j)("esri.layers.support.TimeReference")],g);const y=g;var f,m=s(78981);let _=f=class extends o.wq{constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeReference=null,this.trackIdField=null,this.useTime=!0}readFullTimeExtent(e,t){if(!t.timeExtent||!Array.isArray(t.timeExtent)||2!==t.timeExtent.length)return null;const s=new Date(t.timeExtent[0]),r=new Date(t.timeExtent[1]);return new n.Z({start:s,end:r})}writeFullTimeExtent(e,t){e&&(0,u.pC)(e.start)&&(0,u.pC)(e.end)?t.timeExtent=[e.start.getTime(),e.end.getTime()]:t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?new a.Z({value:t.timeInterval,unit:m.v.fromJSON(t.timeIntervalUnits)}):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?new a.Z({value:t.defaultTimeInterval,unit:m.v.fromJSON(t.defaultTimeIntervalUnits)}):null}writeInterval(e,t){if(e){const s=e.toJSON();t.timeInterval=s.value,t.timeIntervalUnits=s.unit}else t.timeInterval=null,t.timeIntervalUnits=null}clone(){const{cumulative:e,endField:t,hasLiveData:s,interval:r,startField:i,timeReference:n,fullTimeExtent:a,trackIdField:o,useTime:u}=this;return new f({cumulative:e,endField:t,hasLiveData:s,interval:r,startField:i,timeReference:(0,l.d9)(n),fullTimeExtent:(0,l.d9)(a),trackIdField:o,useTime:u})}};(0,i._)([(0,d.Cb)({type:Boolean,json:{read:{source:"exportOptions.timeDataCumulative"},write:{target:"exportOptions.timeDataCumulative"}}})],_.prototype,"cumulative",void 0),(0,i._)([(0,d.Cb)({type:String,json:{read:{source:"endTimeField"},write:{target:"endTimeField",allowNull:!0}}})],_.prototype,"endField",void 0),(0,i._)([(0,d.Cb)({type:n.Z,json:{write:{enabled:!0,allowNull:!0}}})],_.prototype,"fullTimeExtent",void 0),(0,i._)([(0,c.r)("fullTimeExtent",["timeExtent"])],_.prototype,"readFullTimeExtent",null),(0,i._)([(0,p.c)("fullTimeExtent")],_.prototype,"writeFullTimeExtent",null),(0,i._)([(0,d.Cb)({type:Boolean,json:{write:!0}})],_.prototype,"hasLiveData",void 0),(0,i._)([(0,d.Cb)({type:a.Z,json:{write:{enabled:!0,allowNull:!0}}})],_.prototype,"interval",void 0),(0,i._)([(0,c.r)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],_.prototype,"readInterval",null),(0,i._)([(0,p.c)("interval")],_.prototype,"writeInterval",null),(0,i._)([(0,d.Cb)({type:String,json:{read:{source:"startTimeField"},write:{target:"startTimeField",allowNull:!0}}})],_.prototype,"startField",void 0),(0,i._)([(0,d.Cb)({type:y,json:{write:{enabled:!0,allowNull:!0}}})],_.prototype,"timeReference",void 0),(0,i._)([(0,d.Cb)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],_.prototype,"trackIdField",void 0),(0,i._)([(0,d.Cb)({type:Boolean,json:{read:{source:"exportOptions.useTime"},write:{target:"exportOptions.useTime"}}})],_.prototype,"useTime",void 0),_=f=(0,i._)([(0,h.j)("esri.layers.support.TimeInfo")],_);const v=_},66677:(e,t,s)=>{s.d(t,{ld:()=>g,B5:()=>c,M8:()=>f,G:()=>b,Qc:()=>h,DR:()=>p,Nm:()=>m,XG:()=>_,a7:()=>y,wH:()=>v});var r=s(70586),i=s(17452),n=s(25929);const a={mapserver:"MapServer",imageserver:"ImageServer",featureserver:"FeatureServer",sceneserver:"SceneServer",streamserver:"StreamServer",vectortileserver:"VectorTileServer"},o=Object.values(a),l=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/rest\\/services\\/(.+?)\\/(${o.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),u=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/([^\\/\\n]+)\\/(${o.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),d=/(.*?)\/(?:layers\/)?(\d+)\/?$/i;function c(e){return!!l.test(e)}function h(e){const t=(0,i.mN)(e),s=t.path.match(l)||t.path.match(u);if(!s)return null;const[,r,n,o,d]=s,c=n.indexOf("/");return{title:g(-1!==c?n.slice(c+1):n),serverType:a[o.toLowerCase()],sublayer:null!=d&&""!==d?parseInt(d,10):null,url:{path:r}}}function p(e){const t=(0,i.mN)(e).path.match(d);return t?{serviceUrl:t[1],sublayerId:Number(t[2])}:null}function g(e){return(e=e.replace(/\s*[/_]+\s*/g," "))[0].toUpperCase()+e.slice(1)}function y(e,t){const s=[];if(e){const t=h(e);(0,r.pC)(t)&&t.title&&s.push(t.title)}if(t){const e=g(t);s.push(e)}if(2===s.length){if(-1!==s[0].toLowerCase().indexOf(s[1].toLowerCase()))return s[0];if(-1!==s[1].toLowerCase().indexOf(s[0].toLowerCase()))return s[1]}return s.join(" - ")}function f(e){if(!e)return!1;const t=-1!==(e=e.toLowerCase()).indexOf(".arcgis.com/"),s=-1!==e.indexOf("//services")||-1!==e.indexOf("//tiles")||-1!==e.indexOf("//features");return t&&s}function m(e,t){return e?(0,i.Qj)((0,i.Hu)(e,t)):e}function _(e){let{url:t}=e;if(!t)return{url:t};t=(0,i.Hu)(t,e.logger);const s=(0,i.mN)(t),n=h(s.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(s.path);(0,r.pC)(e)&&(t=e.serviceUrl,a=e.sublayerId)}return{url:(0,i.Qj)(t),layerId:a}}function v(e,t,s,r,a){(0,n.w)(t,r,"url",a),r.url&&null!=e.layerId&&(r.url=(0,i.v_)(r.url,s,e.layerId.toString()))}function b(e){if(!e)return!1;const t=e.toLowerCase(),s=-1!==t.indexOf("/services/"),r=-1!==t.indexOf("/mapserver/wmsserver"),i=-1!==t.indexOf("/imageserver/wmsserver"),n=-1!==t.indexOf("/wmsserver");return s&&(r||i||n)}},72729:(e,t,s)=>{s.d(t,{im:()=>F,V5:()=>S}),s(80442);var r,i=s(43697),n=s(22974),a=s(5600),o=(s(75215),s(36030)),l=s(52011),u=s(96674);s(67676);let d=r=class extends u.wq{constructor(e){super(e),this.name=null,this.code=null}clone(){return new r({name:this.name,code:this.code})}};(0,i._)([(0,a.Cb)({type:String,json:{write:!0}})],d.prototype,"name",void 0),(0,i._)([(0,a.Cb)({type:[String,Number],json:{write:!0}})],d.prototype,"code",void 0),d=r=(0,i._)([(0,l.j)("esri.layers.support.CodedValue")],d);const c=d,h=new(s(35454).Xn)({inherited:"inherited",codedValue:"coded-value",range:"range"});let p=class extends u.wq{constructor(e){super(e),this.name=null,this.type=null}};(0,i._)([(0,a.Cb)({type:String,json:{write:!0}})],p.prototype,"name",void 0),(0,i._)([(0,o.J)(h)],p.prototype,"type",void 0),p=(0,i._)([(0,l.j)("esri.layers.support.Domain")],p);const g=p;var y;let f=y=class extends g{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const s=String(e);this.codedValues.some((e=>(String(e.code)===s&&(t=e.name),!!t)))}return t}clone(){return new y({codedValues:(0,n.d9)(this.codedValues),name:this.name})}};(0,i._)([(0,a.Cb)({type:[c],json:{write:!0}})],f.prototype,"codedValues",void 0),(0,i._)([(0,o.J)({codedValue:"coded-value"})],f.prototype,"type",void 0),f=y=(0,i._)([(0,l.j)("esri.layers.support.CodedValueDomain")],f);const m=f;var _;s(92604),s(37697);let v=_=class extends g{constructor(e){super(e),this.type="inherited"}clone(){return new _}};(0,i._)([(0,o.J)({inherited:"inherited"})],v.prototype,"type",void 0),v=_=(0,i._)([(0,l.j)("esri.layers.support.InheritedDomain")],v);const b=v;var T;let C=T=class extends g{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new T({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,i._)([(0,a.Cb)({type:Number,json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range&&t.range[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,s){t[s]=[this.minValue||0,e]}}}})],C.prototype,"maxValue",void 0),(0,i._)([(0,a.Cb)({type:Number,json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range&&t.range[0]},write:{target:"range",writer(e,t,s){t[s]=[e,this.maxValue||0]}}}})],C.prototype,"minValue",void 0),(0,i._)([(0,o.J)({range:"range"})],C.prototype,"type",void 0),C=T=(0,i._)([(0,l.j)("esri.layers.support.RangeDomain")],C);const w=C,S={key:"type",base:g,typeMap:{range:C,"coded-value":m,inherited:b}};function F(e){if(!e||!e.type)return null;switch(e.type){case"range":return w.fromJSON(e);case"codedValue":return m.fromJSON(e);case"inherited":return b.fromJSON(e)}return null}},86719:(e,t,s)=>{s.d(t,{v:()=>r});const r=new(s(35454).Xn)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml"})},78981:(e,t,s)=>{s.d(t,{v:()=>r});const r=(0,s(35454).wY)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})},76497:(e,t,s)=>{function r(e){const t={};for(const s in e){if("declaredClass"===s)continue;const i=e[s];if(null!=i&&"function"!=typeof i)if(Array.isArray(i)){t[s]=[];for(let e=0;e<i.length;e++)t[s][e]=r(i[e])}else"object"==typeof i?i.toJSON&&(t[s]=JSON.stringify(i)):t[s]=i}return t}s.d(t,{A:()=>r})},77863:(e,t,s)=>{s.d(t,{K9:()=>k,O7:()=>c,G$:()=>S});var r=s(20102),i=s(70586),n=s(45091),a=s(5428),o=s(78760);const l=["esriFieldTypeSmallInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeString","esriFieldTypeDate","esriFieldTypeOID","esriFieldTypeGeometry","esriFieldTypeBlob","esriFieldTypeRaster","esriFieldTypeGUID","esriFieldTypeGlobalID","esriFieldTypeXML"],u=["sqlTypeBigInt","sqlTypeBinary","sqlTypeBit","sqlTypeChar","sqlTypeDate","sqlTypeDecimal","sqlTypeDouble","sqlTypeFloat","sqlTypeGeometry","sqlTypeGUID","sqlTypeInteger","sqlTypeLongNVarchar","sqlTypeLongVarbinary","sqlTypeLongVarchar","sqlTypeNChar","sqlTypeNVarchar","sqlTypeOther","sqlTypeReal","sqlTypeSmallInt","sqlTypeSqlXml","sqlTypeTime","sqlTypeTimestamp","sqlTypeTimestamp2","sqlTypeTinyInt","sqlTypeVarbinary","sqlTypeVarchar"],d=["upperLeft","lowerLeft"];function c(e){return e>=l.length?null:l[e]}function h(e){return e>=u.length?null:u[e]}function p(e){return e>=d.length?null:d[e]}function g(e,t){return t>=e.geometryTypes.length?null:e.geometryTypes[t]}function y(e,t,s){const r=t.createPointGeometry(s);for(;e.next();)switch(e.tag()){case 3:{const s=e.getUInt32(),i=e.pos()+s;let n=0;for(;e.pos()<i;)t.addCoordinatePoint(r,e.getSInt64(),n++);break}default:e.skip()}return r}function f(e,t,s){const r=t.createGeometry(s),i=2+(s.hasZ?1:0)+(s.hasM?1:0);for(;e.next();)switch(e.tag()){case 2:{const s=e.getUInt32(),i=e.pos()+s;let n=0;for(;e.pos()<i;)t.addLength(r,e.getUInt32(),n++);break}case 3:{const s=e.getUInt32(),n=e.pos()+s;let a=0;for(t.allocateCoordinates(r);e.pos()<n;)t.addCoordinate(r,e.getSInt64(),a),a++,a===i&&(a=0);break}default:e.skip()}return r}function m(e){const t=new a.Z;let s="esriGeometryPoint";for(;e.next();)switch(e.tag()){case 2:{const s=e.getUInt32(),r=e.pos()+s;for(;e.pos()<r;)t.lengths.push(e.getUInt32());break}case 3:{const s=e.getUInt32(),r=e.pos()+s;for(;e.pos()<r;)t.coords.push(e.getSInt64());break}case 1:s=o.A[e.getEnum()];break;default:e.skip()}return{queryGeometry:t,queryGeometryType:s}}function _(e){for(;e.next();)switch(e.tag()){case 1:return e.getString();case 2:return e.getFloat();case 3:return e.getDouble();case 4:return e.getSInt32();case 5:return e.getUInt32();case 6:return e.getInt64();case 7:return e.getUInt64();case 8:return e.getSInt64();case 9:return e.getBool();default:return e.skip(),null}return null}function v(e){const t={type:c(0)};for(;e.next();)switch(e.tag()){case 1:t.name=e.getString();break;case 2:t.type=c(e.getEnum());break;case 3:t.alias=e.getString();break;case 4:t.sqlType=h(e.getEnum());break;case 5:default:e.skip();break;case 6:t.defaultValue=e.getString()}return t}function b(e){const t={};for(;e.next();)switch(e.tag()){case 1:t.name=e.getString();break;case 2:t.isSystemMaintained=e.getBool();break;default:e.skip()}return t}function T(e,t,s,r){const i=t.createFeature(s);let n=0;for(;e.next();)switch(e.tag()){case 1:{const t=r[n++].name;i.attributes[t]=e.processMessage(_);break}case 2:i.geometry=e.processMessageWithArgs(f,t,s);break;case 4:i.centroid=e.processMessageWithArgs(y,t,s);break;default:e.skip()}return i}function C(e){const t=[1,1,1,1];for(;e.next();)switch(e.tag()){case 1:t[0]=e.getDouble();break;case 2:t[1]=e.getDouble();break;case 4:t[2]=e.getDouble();break;case 3:t[3]=e.getDouble();break;default:e.skip()}return t}function w(e){const t=[0,0,0,0];for(;e.next();)switch(e.tag()){case 1:t[0]=e.getDouble();break;case 2:t[1]=e.getDouble();break;case 4:t[2]=e.getDouble();break;case 3:t[3]=e.getDouble();break;default:e.skip()}return t}function S(e){const t={originPosition:p(0)};for(;e.next();)switch(e.tag()){case 1:t.originPosition=p(e.getEnum());break;case 2:t.scale=e.processMessage(C);break;case 3:t.translate=e.processMessage(w);break;default:e.skip()}return t}function F(e){const t={};for(;e.next();)switch(e.tag()){case 1:t.shapeAreaFieldName=e.getString();break;case 2:t.shapeLengthFieldName=e.getString();break;case 3:t.units=e.getString();break;default:e.skip()}return t}function I(e,t){const s=t.createSpatialReference();for(;e.next();)switch(e.tag()){case 1:s.wkid=e.getUInt32();break;case 5:s.wkt=e.getString();break;case 2:s.latestWkid=e.getUInt32();break;case 3:s.vcsWkid=e.getUInt32();break;case 4:s.latestVcsWkid=e.getUInt32();break;default:e.skip()}return s}function E(e,t){const s=t.createFeatureResult();s.geometryType=g(t,0);let r=!1;for(;e.next();)switch(e.tag()){case 1:s.objectIdFieldName=e.getString();break;case 3:s.globalIdFieldName=e.getString();break;case 4:s.geohashFieldName=e.getString();break;case 5:s.geometryProperties=e.processMessage(F);break;case 7:s.geometryType=g(t,e.getEnum());break;case 8:s.spatialReference=e.processMessageWithArgs(I,t);break;case 10:s.hasZ=e.getBool();break;case 11:s.hasM=e.getBool();break;case 12:s.transform=e.processMessage(S);break;case 9:{const t=e.getBool();s.exceededTransferLimit=t;break}case 13:t.addField(s,e.processMessage(v));break;case 15:r||(t.prepareFeatures(s),r=!0),t.addFeature(s,e.processMessageWithArgs(T,t,s,s.fields));break;case 2:s.uniqueIdField=e.processMessage(b);break;default:e.skip()}return t.finishFeatureResult(s),s}function x(e,t){const s={};let r=null;for(;e.next();)switch(e.tag()){case 4:r=e.processMessageWithArgs(m);break;case 1:s.featureResult=e.processMessageWithArgs(E,t);break;default:e.skip()}return(0,i.pC)(r)&&s.featureResult&&t.addQueryGeometry(s,r),s}function k(e,t){try{const s=2,r=new n.Z(new Uint8Array(e),new DataView(e)),i={};for(;r.next();)r.tag()===s?i.queryResult=r.processMessageWithArgs(x,t):r.skip();return i}catch(e){throw new r.Z("query:parsing-pbf","Error while parsing FeatureSet PBF payload",{error:e})}}},78760:(e,t,s)=>{s.d(t,{A:()=>l,J:()=>u});var r=s(67900),i=s(8744),n=s(70272),a=s(44876),o=s(5428);const l=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"];class u{constructor(e){this.options=e,this.geometryTypes=l,this._coordinatePtr=0,this._vertexDimension=0}createFeatureResult(){return new a.Z}prepareFeatures(e){this._vertexDimension=2,e.hasZ&&this._vertexDimension++,e.hasM&&this._vertexDimension++}finishFeatureResult(e){if(!e||!e.features||!e.hasZ||!this.options.sourceSpatialReference||!e.spatialReference||(0,i.fS)(e.spatialReference,this.options.sourceSpatialReference)||e.spatialReference.vcsWkid)return;const t=(0,r._R)(this.options.sourceSpatialReference)/(0,r._R)(e.spatialReference);if(1!==t)for(const s of e.features){if(!(0,n.S6)(s))continue;const e=s.geometry.coords;for(let s=2;s<e.length;s+=3)e[s]*=t}}addFeature(e,t){e.features.push(t)}createFeature(){return new n.ZP}createSpatialReference(){return{wkid:0}}createGeometry(){return new o.Z}addField(e,t){e.fields.push(t)}allocateCoordinates(e){e.coords.length=e.lengths.reduce(((e,t)=>e+t),0)*this._vertexDimension,this._coordinatePtr=0}addCoordinate(e,t){e.coords[this._coordinatePtr++]=t}addCoordinatePoint(e,t){e.coords.push(t)}addLength(e,t){e.lengths.push(t)}addQueryGeometry(e,t){e.queryGeometry=t.queryGeometry,e.queryGeometryType=t.queryGeometryType}createPointGeometry(){return new o.Z}}},45178:(e,t,s)=>{s.d(t,{C:()=>i});var r=s(77863);function i(e,t){const s=(0,r.K9)(e,t),i=s.queryResult.featureResult,n=s.queryResult.queryGeometry,a=s.queryResult.queryGeometryType;if(i&&i.features&&i.features.length&&i.objectIdFieldName){const e=i.objectIdFieldName;for(const t of i.features)t.attributes&&(t.objectId=t.attributes[e])}return i&&(i.queryGeometry=n,i.queryGeometryType=a),i}},34599:(e,t,s)=>{s.r(t),s.d(t,{executeQuery:()=>g,executeQueryForCount:()=>_,executeQueryForExtent:()=>v,executeQueryForIds:()=>m,executeQueryPBF:()=>y,executeQueryPBFBuffer:()=>f,queryToQueryStringParameters:()=>p,runQuery:()=>b});var r=s(3172),i=s(70586),n=s(17452),a=s(33955),o=s(38581),l=s(66677),u=s(76497),d=s(45178),c=s(28694);const h="Layer does not support extent calculation.";function p(e,t,s=!1){const r=e.geometry,n=e.toJSON(),o=n,l=e.outSpatialReference;let u,d;if((0,i.pC)(r)){if(u=r.spatialReference,d=r.spatialReference.wkid||JSON.stringify(r.spatialReference),o.geometryType=(0,a.Ji)(r),s&&"extent"===r.type)o.geometry=`${r.xmin},${r.ymin},${r.xmax},${r.ymax}`;else if(s&&"point"===r.type)o.geometry=`${r.x},${r.y}`;else{const e=r.toJSON();delete e.spatialReference,o.geometry=JSON.stringify(e)}o.inSR=d}if(u||(u=l),n.groupByFieldsForStatistics&&(o.groupByFieldsForStatistics=n.groupByFieldsForStatistics.join(",")),n.objectIds&&(o.objectIds=n.objectIds.join(",")),n.orderByFields&&(o.orderByFields=n.orderByFields.join(",")),!n.outFields||!n.returnDistinctValues&&(null!=t&&t.returnCountOnly||null!=t&&t.returnExtentOnly||null!=t&&t.returnIdsOnly)?delete o.outFields:-1!==n.outFields.indexOf("*")?o.outFields="*":o.outFields=n.outFields.join(","),n.outSR?o.outSR=n.outSR.wkid||JSON.stringify(n.outSR):r&&(n.returnGeometry||n.returnCentroid)&&(o.outSR=o.inSR),n.returnGeometry&&delete n.returnGeometry,n.outStatistics&&(o.outStatistics=JSON.stringify(n.outStatistics)),n.pixelSize&&(o.pixelSize=JSON.stringify(n.pixelSize)),n.quantizationParameters&&(s&&(0,i.pC)(u)&&(0,i.pC)(e.quantizationParameters)&&(0,i.pC)(e.quantizationParameters.extent)&&u.equals(e.quantizationParameters.extent.spatialReference)&&delete n.quantizationParameters.extent.spatialReference,o.quantizationParameters=JSON.stringify(n.quantizationParameters)),n.parameterValues&&(o.parameterValues=JSON.stringify(n.parameterValues)),n.rangeValues&&(o.rangeValues=JSON.stringify(n.rangeValues)),n.dynamicDataSource&&(o.layer=JSON.stringify({source:n.dynamicDataSource}),delete n.dynamicDataSource),n.timeExtent){const e=n.timeExtent,{start:t,end:s}=e;null==t&&null==s||(o.time=t===s?t:`${null==t?"null":t},${null==s?"null":s}`),delete n.timeExtent}return o}async function g(e,t,s,r){const n=(0,i.pC)(t.timeExtent)&&t.timeExtent.isEmpty?{data:{features:[]}}:await b(e,t,"json",r);return(0,c.p)(t,s,n.data),n}async function y(e,t,s,r){if((0,i.pC)(t.timeExtent)&&t.timeExtent.isEmpty)return Promise.resolve({data:s.createFeatureResult()});const n=await f(e,t,r),a=n;return a.data=(0,d.C)(n.data,s),a}function f(e,t,s){return b(e,t,"pbf",s)}function m(e,t,s){return(0,i.pC)(t.timeExtent)&&t.timeExtent.isEmpty?Promise.resolve({data:{objectIds:[]}}):b(e,t,"json",s,{returnIdsOnly:!0})}function _(e,t,s){return(0,i.pC)(t.timeExtent)&&t.timeExtent.isEmpty?Promise.resolve({data:{count:0}}):b(e,t,"json",s,{returnIdsOnly:!0,returnCountOnly:!0})}function v(e,t,s){return(0,i.pC)(t.timeExtent)&&t.timeExtent.isEmpty?Promise.resolve({data:{count:0,extent:null}}):b(e,t,"json",s,{returnExtentOnly:!0,returnCountOnly:!0}).then((e=>{const t=e.data;if(t.hasOwnProperty("extent"))return e;if(t.features)throw new Error(h);if(t.hasOwnProperty("count"))throw new Error(h);return e}))}function b(e,t,s,a={},d={}){const c="string"==typeof e?(0,n.mN)(e):e,h=t.geometry?[t.geometry]:[];return a.responseType="pbf"===s?"array-buffer":"json",(0,o.aX)(h,null,a).then((e=>{const o=e&&e[0];(0,i.pC)(o)&&((t=t.clone()).geometry=o);const h=(0,l.M8)(c.path),g=(0,u.A)({...c.query,f:s,...d,...p(t,d,h)});return(0,r.default)((0,n.v_)(c.path,"query"),{...a,query:{...g,...a.query}})}))}},28694:(e,t,s)=>{s.d(t,{p:()=>n});var r=s(70586),i=s(69285);function n(e,t,s){if(!s||!s.features||!s.hasZ)return;const n=(0,i.k)(s.geometryType,t,e.outSpatialReference);if(!(0,r.Wi)(n))for(const e of s.features)n(e.geometry)}},98046:(e,t,s)=>{s.d(t,{Z:()=>p});var r,i=s(43697),n=s(22303),a=s(22974),o=s(5600),l=s(75215),u=s(36030),d=s(52011),c=s(899);let h=r=class extends c.Z{constructor(e){super(e),this.algorithm=null,this.fromColor=null,this.toColor=null,this.type="algorithmic"}clone(){return new r({fromColor:(0,a.d9)(this.fromColor),toColor:(0,a.d9)(this.toColor),algorithm:this.algorithm})}};(0,i._)([(0,u.J)({esriCIELabAlgorithm:"cie-lab",esriHSVAlgorithm:"hsv",esriLabLChAlgorithm:"lab-lch"})],h.prototype,"algorithm",void 0),(0,i._)([(0,o.Cb)({type:n.Z,json:{type:[l.z8],write:!0}})],h.prototype,"fromColor",void 0),(0,i._)([(0,o.Cb)({type:n.Z,json:{type:[l.z8],write:!0}})],h.prototype,"toColor",void 0),(0,i._)([(0,o.Cb)({type:["algorithmic"]})],h.prototype,"type",void 0),h=r=(0,i._)([(0,d.j)("esri.rest.support.AlgorithmicColorRamp")],h);const p=h},899:(e,t,s)=>{s.d(t,{Z:()=>l});var r=s(43697),i=s(96674),n=s(5600),a=(s(67676),s(80442),s(75215),s(52011));let o=class extends i.wq{constructor(e){super(e),this.type=null}};(0,r._)([(0,n.Cb)({readOnly:!0,json:{read:!1,write:!0}})],o.prototype,"type",void 0),o=(0,r._)([(0,a.j)("esri.rest.support.ColorRamp")],o);const l=o},1515:(e,t,s)=>{s.d(t,{Z:()=>c});var r,i=s(43697),n=s(22974),a=s(5600),o=(s(75215),s(52011)),l=s(98046),u=s(899);let d=r=class extends u.Z{constructor(e){super(e),this.colorRamps=null,this.type="multipart"}clone(){return new r({colorRamps:(0,n.d9)(this.colorRamps)})}};(0,i._)([(0,a.Cb)({type:[l.Z],json:{write:!0}})],d.prototype,"colorRamps",void 0),(0,i._)([(0,a.Cb)({type:["multipart"]})],d.prototype,"type",void 0),d=r=(0,i._)([(0,o.j)("esri.rest.support.MultipartColorRamp")],d);const c=d},94593:(e,t,s)=>{s.d(t,{i:()=>o,V:()=>a});var r=s(98046),i=s(899),n=s(1515);const a={key:"type",base:i.Z,typeMap:{algorithmic:r.Z,multipart:n.Z}};function o(e){return e&&e.type?"algorithmic"===e.type?r.Z.fromJSON(e):"multipart"===e.type?n.Z.fromJSON(e):null:null}},89164:(e,t,s)=>{s.d(t,{Z:()=>p});var r=s(43697),i=s(22303),n=s(35454),a=s(96674),o=s(5600),l=(s(67676),s(80442),s(75215),s(71715)),u=s(52011);const d=new n.Xn({esriSMS:"simple-marker",esriPMS:"picture-marker",esriSLS:"simple-line",esriSFS:"simple-fill",esriPFS:"picture-fill",esriTS:"text",esriSHD:"shield-label-symbol",PointSymbol3D:"point-3d",LineSymbol3D:"line-3d",PolygonSymbol3D:"polygon-3d",WebStyleSymbol:"web-style",MeshSymbol3D:"mesh-3d",LabelSymbol3D:"label-3d",CIMSymbolReference:"cim"});let c=0,h=class extends a.wq{constructor(e){super(e),this.id="sym"+c++,this.type=null,this.color=new i.Z([0,0,0,1])}readColor(e){return e&&null!=e[0]?[e[0],e[1],e[2],e[3]/255]:e}async collectRequiredFields(e,t){}hash(){return JSON.stringify(this.toJSON())}clone(){}};(0,r._)([(0,o.Cb)({type:d.apiValues,readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0,writer:d.write}}})],h.prototype,"type",void 0),(0,r._)([(0,o.Cb)({type:i.Z,json:{write:{allowNull:!0}}})],h.prototype,"color",void 0),(0,r._)([(0,l.r)("color")],h.prototype,"readColor",null),h=(0,r._)([(0,u.j)("esri.symbols.Symbol")],h);const p=h},2255:(e,t,s)=>{s.r(t),s.d(t,{FeatureServiceSnappingSourceWorker:()=>X,default:()=>K});var r=s(43697),i=s(32448),n=s(61247),a=s(70586),o=s(95330),l=s(43050),u=s(5600),d=s(67676),c=(s(80442),s(75215),s(52011)),h=s(82971),p=s(57191),g=s(7673),y=s(11145),f=s(30547),m=s(57444),_=s(15923);let v=class extends _.Z{constructor(){super(...arguments),this.updating=!1,this.pending=[]}push(e,t){this.pending.push({promise:e,callback:t}),1===this.pending.length&&this._process()}_process(){if(!this.pending.length)return void(this.updating=!1);this.updating=!0;const e=this.pending[0];e.promise.then((t=>e.callback(t))).catch((()=>{})).then((()=>{this.pending.shift(),this._process()}))}};(0,r._)([(0,u.Cb)()],v.prototype,"updating",void 0),v=(0,r._)([(0,c.j)("esri.core.AsyncSequence")],v);var b,T=s(3920),C=s(50758),w=s(92604),S=s(17445),F=s(6570),I=s(24470),E=s(98732),x=s(78760),k=s(34599),O=s(66643);class D{constructor(e,t){this.data=e,this.resolution=t,this.state={type:b.CREATED},this.alive=!0}process(e){switch(this.state.type){case b.CREATED:return this.state=this._gotoFetchCount(this.state,e),this.state.task.promise.then(e.resume,e.resume);case b.FETCH_COUNT:break;case b.FETCHED_COUNT:return this.state=this._gotoFetchFeatures(this.state,e),this.state.task.promise.then(e.resume,e.resume);case b.FETCH_FEATURES:break;case b.FETCHED_FEATURES:this.state=this._goToDone(this.state,e);case b.DONE:}return null}get debugInfo(){return{data:this.data,featureCount:this.featureCount,state:this.stateToString}}get featureCount(){switch(this.state.type){case b.CREATED:case b.FETCH_COUNT:return 0;case b.FETCHED_COUNT:return this.state.featureCount;case b.FETCH_FEATURES:return this.state.previous.featureCount;case b.FETCHED_FEATURES:return this.state.features.length;case b.DONE:return this.state.previous.features.length}}get stateToString(){switch(this.state.type){case b.CREATED:return"created";case b.FETCH_COUNT:return"fetch-count";case b.FETCHED_COUNT:return"fetched-count";case b.FETCH_FEATURES:return"fetch-features";case b.FETCHED_FEATURES:return"fetched-features";case b.DONE:return"done"}}_gotoFetchCount(e,t){return{type:b.FETCH_COUNT,previous:e,task:(0,o.vr)((async e=>{const s=await(0,O.mt)(t.fetchCount(this,e));this.state.type===b.FETCH_COUNT&&(this.state=this._gotoFetchedCount(this.state,s.ok?s.value:1/0))}))}}_gotoFetchedCount(e,t){return{type:b.FETCHED_COUNT,featureCount:t,previous:e}}_gotoFetchFeatures(e,t){return{type:b.FETCH_FEATURES,previous:e,task:(0,o.vr)((async s=>{const r=await(0,O.mt)(t.fetchFeatures(this,e.featureCount,s));this.state.type===b.FETCH_FEATURES&&(this.state=this._gotoFetchedFeatures(this.state,r.ok?r.value:[]))}))}}_gotoFetchedFeatures(e,t){return{type:b.FETCHED_FEATURES,previous:e,features:t}}_goToDone(e,t){return t.finish(this,e.features),{type:b.DONE,previous:e}}reset(){const e=this.state;switch(this.state={type:b.CREATED},e.type){case b.CREATED:case b.FETCHED_COUNT:case b.FETCHED_FEATURES:case b.DONE:break;case b.FETCH_COUNT:case b.FETCH_FEATURES:e.task.abort()}}intersects(e){return!(!(0,a.Wi)(e)&&this.data.extent)||((0,I.oJ)(e,R),(0,I.kK)(this.data.extent,R))}}!function(e){e[e.CREATED=0]="CREATED",e[e.FETCH_COUNT=1]="FETCH_COUNT",e[e.FETCHED_COUNT=2]="FETCHED_COUNT",e[e.FETCH_FEATURES=3]="FETCH_FEATURES",e[e.FETCHED_FEATURES=4]="FETCHED_FEATURES",e[e.DONE=5]="DONE"}(b||(b={}));const R=(0,I.Ue)(),N=w.Z.getLogger("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTiledFetcher");let M=class extends T.r{constructor(e){super(e),this.tilesOfInterest=[],this.availability=0,this.pendingTiles=new Map,this.pendingEdits=new v,this.pendingEditsAbortController=new AbortController}get minimumVerticesPerFeature(){var e;switch(null==(e=this.store)?void 0:e.featureStore.geometryType){case"esriGeometryPoint":case"esriGeometryMultipoint":return 1;case"esriGeometryPolygon":return 4;case"esriGeometryPolyline":return 2}}set filter(e){const t=this._get("filter"),s=this._filterProperties(e);JSON.stringify(t)!==JSON.stringify(s)&&this._set("filter",s)}set customParameters(e){const t=this._get("customParameters");JSON.stringify(t)!==JSON.stringify(e)&&this._set("customParameters",e)}get configuration(){return{filter:this.filter,customParameters:this.customParameters,tileInfo:this.tileInfo,tileSize:this.tileSize}}set tileInfo(e){const t=this._get("tileInfo");t!==e&&((0,a.pC)(e)&&(0,a.pC)(t)&&JSON.stringify(e)===JSON.stringify(t)||(this._set("tileInfo",e),this.store.tileInfo=e))}set tileSize(e){this._get("tileSize")!==e&&this._set("tileSize",e)}get updating(){return this.updatingHandles.updating||this.pendingEdits.updating}initialize(){this._initializeFetchExtent(),this.updatingHandles.add((()=>this.configuration),(()=>this.refresh())),this.updatingHandles.add((()=>this.tilesOfInterest),((e,t)=>{(0,d.fS)(e,t,(({id:e},{id:t})=>e===t))||this._process()}),S.Z_)}destroy(){this.pendingTiles.forEach((e=>this._deletePendingTile(e))),this.pendingTiles.clear(),this.store.destroy(),this.tilesOfInterest.length=0,this.pendingEditsAbortController.abort(),this.pendingEditsAbortController=null}refresh(){this.store.refresh(),this.pendingTiles.forEach((e=>this._deletePendingTile(e))),this._process()}applyEdits(e){this.pendingEdits.push(e,(async e=>{if(0===e.addedFeatures.length&&0===e.updatedFeatures.length&&0===e.deletedFeatures.length)return;for(const[,e]of this.pendingTiles)e.reset();const t={...e,deletedFeatures:e.deletedFeatures.map((({objectId:e,globalId:t})=>e&&-1!==e?e:this._lookupObjectIdByGlobalId(t)))};await this.updatingHandles.addPromise(this.store.processEdits(t,((e,t)=>this._queryFeaturesById(e,t)),this.pendingEditsAbortController.signal)),this._processPendingTiles()}))}_initializeFetchExtent(){if(!this.capabilities.query.supportsExtent)return;const e=(0,o.vr)((async e=>{try{var t;const s=await(0,k.executeQueryForExtent)(this.url,new m.Z({where:"1=1",outSpatialReference:this.spatialReference,cacheHint:!!this.capabilities.query.supportsCacheHint||void 0}),{query:this.configuration.customParameters,signal:e});this.store.extent=F.Z.fromJSON(null==(t=s.data)?void 0:t.extent)}catch(e){(0,o.r9)(e),N.warn("Failed to fetch data extent",e)}}));this.updatingHandles.addPromise(e.promise.then((()=>this._process()))),this.handles.add((0,C.kB)((()=>e.abort())))}get debugInfo(){return{numberOfFeatures:this.store.featureStore.numFeatures,tilesOfInterest:this.tilesOfInterest,pendingTiles:Array.from(this.pendingTiles.values()).map((e=>e.debugInfo)),storedTiles:this.store.debugInfo}}_process(){this._markTilesNotAlive(),this._createPendingTiles(),this._deletePendingTiles(),this._processPendingTiles()}_markTilesNotAlive(){for(const[,e]of this.pendingTiles)e.alive=!1}_createPendingTiles(){const e=this._collectMissingTilesInfo();if(this._setAvailability((0,a.Wi)(e)?1:e.coveredArea/e.fullArea),!(0,a.Wi)(e))for(const{data:t,resolution:s}of e.missingTiles){const e=this.pendingTiles.get(t.id);e?(e.resolution=s,e.alive=!0):this._createPendingTile(t,s)}}_collectMissingTilesInfo(){let e=null;for(let t=this.tilesOfInterest.length-1;t>=0;t--){const s=this.tilesOfInterest[t],r=this.store.process(s,((e,t)=>this._verifyTileComplexity(e,t)));(0,a.Wi)(e)?e=r:e.prepend(r)}return e}_deletePendingTiles(){for(const[,e]of this.pendingTiles)e.alive||this._deletePendingTile(e)}_processPendingTiles(){const e={fetchCount:(e,t)=>this._fetchCount(e,t),fetchFeatures:(e,t,s)=>this._fetchFeatures(e,t,s),finish:(e,t)=>this._finishPendingTile(e,t),resume:()=>this._processPendingTiles()};if(this._ensureFetchAllCounts(e))for(const[,t]of this.pendingTiles)this._verifyTileComplexity(this.store.getFeatureCount(t.data),t.resolution)&&this.updatingHandles.addPromise(t.process(e))}_verifyTileComplexity(e,t){return this._verifyVertexComplexity(e)&&this._verifyFeatureDensity(e,t)}_verifyVertexComplexity(e){return e*this.minimumVerticesPerFeature<B}_verifyFeatureDensity(e,t){if((0,a.Wi)(this.tileInfo))return!1;const s=this.tileSize*t;return e*(j/(s*s))<U}_ensureFetchAllCounts(e){let t=!0;for(const[,s]of this.pendingTiles)s.state.type<b.FETCHED_COUNT&&this.updatingHandles.addPromise(s.process(e)),s.state.type<=b.FETCH_COUNT&&(t=!1);return t}_finishPendingTile(e,t){this.store.add(e.data,t),this._deletePendingTile(e),this._updateAvailability()}_updateAvailability(){const e=this._collectMissingTilesInfo();this._setAvailability((0,a.Wi)(e)?1:e.coveredArea/e.fullArea)}_setAvailability(e){this._set("availability",e)}_createPendingTile(e,t){const s=new D(e,t);return this.pendingTiles.set(e.id,s),s}_deletePendingTile(e){e.reset(),this.pendingTiles.delete(e.data.id)}async _fetchCount(e,t){return this.store.fetchCount(e.data,this.url,this._createCountQuery(e),{query:this.customParameters,timeout:P,signal:t})}async _fetchFeatures(e,t,s){let r,i=0,n=0,o=t;for(;;){const l=this._createFeaturesQuery(e),u=this._setPagingParameters(l,i,o),{features:d,exceededTransferLimit:c}=await this._queryFeatures(l,s);if(u&&(i+=(0,a.Wg)(l.num)),n+=d.length,r=r?r.concat(d):d,o=t-n,!u||!c||o<=0)return r}}_filterProperties(e){return(0,a.Wi)(e)?{where:"1=1",gdbVersion:void 0,timeExtent:void 0}:{where:e.where||"1=1",timeExtent:e.timeExtent,gdbVersion:e.gdbVersion}}_lookupObjectIdByGlobalId(e){const t=this.globalIdField,s=this.objectIdField;if((0,a.Wi)(t))throw new Error("Expected globalIdField to be defined");let r=null;if(this.store.featureStore.forEach((i=>{var n;e===i.attributes[t]&&(r=null!=(n=i.objectId)?n:i.attributes[s])})),(0,a.Wi)(r))throw new Error(`Expected to find a feature with globalId ${e}`);return r}_queryFeaturesById(e,t){const s=this._createFeaturesQuery(null);return s.objectIds=e,this._queryFeatures(s,t)}_queryFeatures(e,t){return this.capabilities.query.supportsFormatPBF?this._queryFeaturesPBF(e,t):this._queryFeaturesJSON(e,t)}async _queryFeaturesPBF(e,t){const{sourceSpatialReference:s}=this,{data:r}=await(0,k.executeQueryPBF)(this.url,e,new x.J({sourceSpatialReference:s}),{query:this.configuration.customParameters,timeout:P,signal:t});return(0,E.lM)(r)}async _queryFeaturesJSON(e,t){const{sourceSpatialReference:s}=this,{data:r}=await(0,k.executeQuery)(this.url,e,s,{query:this.configuration.customParameters,timeout:P,signal:t});return(0,E.h_)(r,this.objectIdField)}_createCountQuery(e){const t=this._createBaseQuery(e);return this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0),t}_createFeaturesQuery(e){const t=this._createBaseQuery(e);return t.outFields=this.globalIdField?[this.globalIdField,this.objectIdField]:[this.objectIdField],t.returnGeometry=!0,(0,a.pC)(e)&&(this.capabilities.query.supportsResultType?t.resultType="tile":this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0)),t}_createBaseQuery(e){const t=new m.Z({returnZ:!1,returnM:!1,geometry:(0,a.pC)(this.tileInfo)&&(0,a.pC)(e)?(0,I.HH)(e.data.extent,this.tileInfo.spatialReference):void 0}),s=this.configuration.filter;return(0,a.pC)(s)&&(t.where=s.where,t.gdbVersion=s.gdbVersion,t.timeExtent=s.timeExtent),t.outSpatialReference=this.spatialReference,t}_setPagingParameters(e,t,s){if(!this.capabilities.query.supportsPagination)return!1;const{supportsMaxRecordCountFactor:r,supportsCacheHint:i,tileMaxRecordCount:n,maxRecordCount:a,supportsResultType:o}=this.capabilities.query,l=r?m.Z.MAX_MAX_RECORD_COUNT_FACTOR:1,u=l*((o||i)&&n?n:a||A);return e.start=t,r?(e.maxRecordCountFactor=Math.min(l,Math.ceil(s/u)),e.num=Math.min(s,e.maxRecordCountFactor*u)):e.num=Math.min(s,u),!0}};(0,r._)([(0,u.Cb)({constructOnly:!0})],M.prototype,"url",void 0),(0,r._)([(0,u.Cb)({constructOnly:!0})],M.prototype,"objectIdField",void 0),(0,r._)([(0,u.Cb)({constructOnly:!0})],M.prototype,"globalIdField",void 0),(0,r._)([(0,u.Cb)({constructOnly:!0})],M.prototype,"capabilities",void 0),(0,r._)([(0,u.Cb)({constructOnly:!0})],M.prototype,"sourceSpatialReference",void 0),(0,r._)([(0,u.Cb)({constructOnly:!0})],M.prototype,"spatialReference",void 0),(0,r._)([(0,u.Cb)({constructOnly:!0})],M.prototype,"store",void 0),(0,r._)([(0,u.Cb)({readOnly:!0})],M.prototype,"minimumVerticesPerFeature",null),(0,r._)([(0,u.Cb)()],M.prototype,"filter",null),(0,r._)([(0,u.Cb)()],M.prototype,"customParameters",null),(0,r._)([(0,u.Cb)({readOnly:!0})],M.prototype,"configuration",null),(0,r._)([(0,u.Cb)()],M.prototype,"tileInfo",null),(0,r._)([(0,u.Cb)()],M.prototype,"tileSize",null),(0,r._)([(0,u.Cb)()],M.prototype,"tilesOfInterest",void 0),(0,r._)([(0,u.Cb)({readOnly:!0})],M.prototype,"updating",null),(0,r._)([(0,u.Cb)({readOnly:!0})],M.prototype,"availability",void 0),M=(0,r._)([(0,c.j)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTiledFetcher")],M);const A=2e3,P=6e5,B=1e6,j=25,U=1;var q=s(43090),V=s(37549);class H{constructor(){this._store=new Map,this._byteSize=0}set(e,t){this.delete(e),this._store.set(e,t),this._byteSize+=t.byteSize}delete(e){const t=this._store.get(e);return!!this._store.delete(e)&&(this._byteSize-=t.byteSize,!0)}get(e){return this._used(e),this._store.get(e)}has(e){return this._used(e),this._store.has(e)}clear(){this._store.clear()}applyByteSizeLimit(e,t){for(const[s,r]of this._store){if(this._byteSize<=e)break;this.delete(s),t(r)}}values(){return this._store.values()}[Symbol.iterator](){return this._store[Symbol.iterator]()}_used(e){const t=this._store.get(e);t&&(this._store.delete(e),this._store.set(e,t))}}let Z=class extends _.Z{constructor(e){super(e),this.tileInfo=null,this.extent=null,this.maximumByteSize=10*q.Y8.MEGABYTES,this.tileBounds=new V.H,this.tiles=new H,this.refCounts=new Map,this.tileFeatureCounts=new Map,this.tmpBoundingRect=(0,I.Ue)()}add(e,t){const s=[];for(const e of t)this._referenceFeature(e.objectId)===W.ADDED&&s.push(e);this._addTileStorage(e,new Set(t.map((({objectId:e})=>e))),function(e){return e.reduce(((e,t)=>e+function(e){return 32+function(e){if((0,a.Wi)(e))return 0;const t=(0,q.do)(e.lengths,4);return 32+(0,q.do)(e.coords,8)+t}(e.geometry)+(0,q.f2)(e.attributes)}(t)),0)}(t)),this.featureStore.addMany(s),this.tiles.applyByteSizeLimit(this.maximumByteSize,(e=>this._removeTileStorage(e)))}destroy(){this.clear(),this.tileFeatureCounts.clear()}clear(){this.featureStore.clear(),this.tileBounds.clear(),this.tiles.clear(),this.refCounts.clear()}refresh(){this.clear(),this.tileFeatureCounts.clear()}processEdits(e,t,s){return this._processEditsDelete(e.deletedFeatures.concat(e.updatedFeatures)),this._processEditsRefetch(e.addedFeatures.concat(e.updatedFeatures),t,s)}_addTileStorage(e,t,s){this.tiles.set(e.id,new L(e,t,s)),this.tileBounds.set(e.id,e.extent),this.tileFeatureCounts.set(e.id,t.size)}_remove({id:e}){const t=this.tiles.get(e);t&&this._removeTileStorage(t)}_removeTileStorage(e){const t=[];for(const s of e.objectIds)this._unreferenceFeature(s)===W.REMOVED&&t.push(s);this.featureStore.removeManyById(t);const s=e.data.id;this.tiles.delete(s),this.tileBounds.delete(s)}_processEditsDelete(e){this.featureStore.removeManyById(e);for(const[,t]of this.tiles){for(const s of e)t.objectIds.delete(s);this.tileFeatureCounts.set(t.data.id,t.objectIds.size)}for(const t of e)this.refCounts.delete(t)}async _processEditsRefetch(e,t,s){const r=(await t(e,s)).features,{hasZ:i,hasM:n}=this.featureStore;for(const e of r){const t=(0,E.$)(this.tmpBoundingRect,e.geometry,i,n);(0,a.Wi)(t)||this.tileBounds.forEachInBounds(t,(t=>{const s=this.tiles.get(t);this.featureStore.add(e),s.objectIds.has(e.objectId)||(s.objectIds.add(e.objectId),this._referenceFeature(e.objectId),this.tileFeatureCounts.set(s.data.id,s.objectIds.size))}))}}process(e,t=(()=>!0)){if((0,a.Wi)(this.tileInfo)||!e.extent||(0,a.pC)(this.extent)&&!(0,I.kK)((0,I.oJ)(this.extent,this.tmpBoundingRect),e.extent))return new G(e);if(this.tiles.has(e.id))return new G(e);const s=this._createTileTree(e,this.tileInfo);return this._simplify(s,t,null,0,1),this._collectMissingTiles(e,s,this.tileInfo)}get debugInfo(){return Array.from(this.tiles.values()).map((({data:e})=>({data:e,featureCount:this.tileFeatureCounts.get(e.id)||0})))}getFeatureCount(e){const t=this.tileFeatureCounts.get(e.id);return null!=t?t:0}async fetchCount(e,t,s,r){const i=this.tileFeatureCounts.get(e.id);if(null!=i)return i;const n=await(0,k.executeQueryForCount)(t,s,r);return this.tileFeatureCounts.set(e.id,n.data.count),n.data.count}_createTileTree(e,t){const s=new J(e.level,e.row,e.col);return t.updateTileInfo(s,y.Z.ExtrapolateOptions.POWER_OF_TWO),this.tileBounds.forEachInBounds(e.extent,(r=>{const i=this.tiles.get(r).data;this._tilesAreRelated(e,i)&&this._populateChildren(s,i,t,this.tileFeatureCounts.get(i.id)||0)})),s}_tilesAreRelated(e,t){if(!e||!t)return!1;if(e.level===t.level)return e.row===t.row&&e.col===t.col;const s=e.level<t.level,r=s?e:t,i=s?t:e,n=1<<i.level-r.level;return Math.floor(i.row/n)===r.row&&Math.floor(i.col/n)===r.col}_populateChildren(e,t,s,r){const i=t.level-e.level-1;if(i<0)return void(e.isLeaf=!0);const n=t.row>>i,o=t.col>>i,l=e.row<<1,u=o-(e.col<<1)+(n-l<<1),d=e.children[u];if((0,a.pC)(d))this._populateChildren(d,t,s,r);else{const i=new J(e.level+1,n,o);s.updateTileInfo(i,y.Z.ExtrapolateOptions.POWER_OF_TWO),e.children[u]=i,this._populateChildren(i,t,s,r)}}_simplify(e,t,s,r,i){const n=i*i;if(e.isLeaf)return t(this.getFeatureCount(e),i)?0:(this._remove(e),(0,a.pC)(s)&&(s.children[r]=null),n);const o=i/2,l=o*o;let u=0;for(let s=0;s<e.children.length;s++){const r=e.children[s];u+=(0,a.pC)(r)?this._simplify(r,t,e,s,o):l}return 0===u?this._mergeChildren(e):1-u/n<Y&&(this._purge(e),(0,a.pC)(s)&&(s.children[r]=null),u=n),u}_mergeChildren(e){const t=new Set;let s=0;this._forEachLeaf(e,(e=>{const r=this.tiles.get(e.id);if(r){s+=r.byteSize;for(const e of r.objectIds)t.has(e)||(t.add(e),this._referenceFeature(e));this._remove(e)}})),this._addTileStorage(e,t,s),e.isLeaf=!0,e.children[0]=e.children[1]=e.children[2]=e.children[3]=null,this.tileFeatureCounts.set(e.id,t.size)}_forEachLeaf(e,t){for(const s of e.children)(0,a.Wi)(s)||(s.isLeaf?t(s):this._forEachLeaf(s,t))}_purge(e){if(!(0,a.Wi)(e))if(e.isLeaf)this._remove(e);else for(let t=0;t<e.children.length;t++){const s=e.children[t];this._purge(s),e.children[t]=null}}_collectMissingTiles(e,t,s){const r=new z(s,e,this.extent);return this._collectMissingTilesRecurse(t,r,1),r.info}_collectMissingTilesRecurse(e,t,s){if(e.isLeaf)return;if(!e.hasChildren)return void t.addMissing(e.level,e.row,e.col,s);const r=s/2;for(let s=0;s<e.children.length;s++){const i=e.children[s];(0,a.Wi)(i)?t.addMissing(e.level+1,(e.row<<1)+((2&s)>>1),(e.col<<1)+(1&s),r):this._collectMissingTilesRecurse(i,t,r)}}_referenceFeature(e){const t=(this.refCounts.get(e)||0)+1;return this.refCounts.set(e,t),1===t?W.ADDED:W.UNCHANGED}_unreferenceFeature(e){const t=(this.refCounts.get(e)||0)-1;return 0===t?(this.refCounts.delete(e),W.REMOVED):(t>0&&this.refCounts.set(e,t),W.UNCHANGED)}get test(){return{tiles:Array.from(this.tiles.values()).map((e=>`${e.data.id}:[${Array.from(e.objectIds)}]`)),featureReferences:Array.from(this.refCounts.keys()).map((e=>`${e}:${this.refCounts.get(e)}`))}}};(0,r._)([(0,u.Cb)({constructOnly:!0})],Z.prototype,"featureStore",void 0),(0,r._)([(0,u.Cb)()],Z.prototype,"tileInfo",void 0),(0,r._)([(0,u.Cb)()],Z.prototype,"extent",void 0),(0,r._)([(0,u.Cb)()],Z.prototype,"maximumByteSize",void 0),Z=(0,r._)([(0,c.j)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTileStore")],Z);class L{constructor(e,t,s){this.data=e,this.objectIds=t,this.byteSize=s}}class J{constructor(e,t,s){this.level=e,this.row=t,this.col=s,this.isLeaf=!1,this.extent=null,this.children=[null,null,null,null]}get hasChildren(){return!this.isLeaf&&((0,a.pC)(this.children[0])||(0,a.pC)(this.children[1])||(0,a.pC)(this.children[2])||(0,a.pC)(this.children[3]))}}class G{constructor(e,t=[]){this.missingTiles=t,this.fullArea=0,this.coveredArea=0,this.fullArea=(0,I.SO)(e.extent),this.coveredArea=this.fullArea}prepend(e){this.missingTiles=e.missingTiles.concat(this.missingTiles),this.coveredArea+=e.coveredArea,this.fullArea+=e.fullArea}}class z{constructor(e,t,s){this.tileInfo=e,this.extent=null,this.info=new G(t),(0,a.pC)(s)&&(this.extent=(0,I.oJ)(s))}addMissing(e,t,s,r){const i={id:null,level:e,row:t,col:s};this.tileInfo.updateTileInfo(i,y.Z.ExtrapolateOptions.POWER_OF_TWO),!(0,a.pC)(i.extent)||(0,a.pC)(this.extent)&&!(0,I.kK)(this.extent,i.extent)||(this.info.missingTiles.push({data:i,resolution:r}),this.info.coveredArea-=(0,I.SO)(i.extent))}}const Y=.18751;var W,Q;(Q=W||(W={}))[Q.ADDED=0]="ADDED",Q[Q.REMOVED=1]="REMOVED",Q[Q.UNCHANGED=2]="UNCHANGED";var $=s(89749);let X=class extends i.Z.EventedAccessor{constructor(){super(...arguments),this.isInitializing=!0,this.whenSetup=(0,o.dD)(),this.handles=new n.Z,this.updatingHandles=new $.t,this.pendingApplyEdits=new Map}get updating(){return this.featureFetcher.updating||this.isInitializing||this.updatingHandles.updating}destroy(){this.featureFetcher.destroy(),this.queryEngine.destroy(),this.featureStore.clear(),this.handles.destroy()}async setup(e){const{geometryType:t,objectIdField:s,timeInfo:r,fields:i}=e.serviceInfo;return this.featureStore=new p.Z({...e.serviceInfo,hasZ:!1,hasM:!1}),this.queryEngine=new g.Z({spatialReference:e.spatialReference,featureStore:this.featureStore,geometryType:t,fields:i,hasZ:!1,hasM:!1,objectIdField:s,timeInfo:r?f.Z.fromJSON(r):null}),this.featureFetcher=new M({store:new Z({featureStore:this.featureStore}),url:e.serviceInfo.url,objectIdField:e.serviceInfo.objectIdField,globalIdField:e.serviceInfo.globalIdField,capabilities:e.serviceInfo.capabilities,spatialReference:h.Z.fromJSON(e.spatialReference),sourceSpatialReference:h.Z.fromJSON(e.serviceInfo.spatialReference)}),this.handles.add([this.featureFetcher.watch("availability",(e=>this.emit("notify-availability",{availability:e})),!0),this.watch("updating",(()=>this._notifyUpdating()))]),this.whenSetup.resolve(),this.isInitializing=!1,this.configure(e.configuration)}async configure(e){return await this.updatingHandles.addPromise(this.whenSetup.promise),this._updateFeatureFetcherConfiguration(e),{result:{}}}async fetchCandidates(e,t){return await this.whenSetup.promise,(0,o.k_)(t),{result:await this.queryEngine.executeQueryForSnapping({point:e.point,distance:e.distance,types:e.types,query:(0,a.pC)(e.filter)?e.filter:{where:"1=1"}},(0,a.pC)(t)?t.signal:null)}}async updateTiles(e,t){return await this.updatingHandles.addPromise(this.whenSetup.promise),(0,o.k_)(t),this.featureFetcher.tileSize=e.tileSize,this.featureFetcher.tilesOfInterest=e.tiles,this.featureFetcher.tileInfo=(0,a.pC)(e.tileInfo)?y.Z.fromJSON(e.tileInfo):null,{result:{}}}async refresh(e,t){return await this.updatingHandles.addPromise(this.whenSetup.promise),(0,o.k_)(t),this.featureFetcher.refresh(),{result:{}}}async whenNotUpdating(e,t){return await this.updatingHandles.addPromise(this.whenSetup.promise),(0,o.k_)(t),await(0,o.Hl)((0,l.cm)(this,"updating"),t),{result:{}}}async getDebugInfo(e,t){return(0,o.k_)(t),{result:this.featureFetcher.debugInfo}}async beginApplyEdits(e,t){this.updatingHandles.addPromise(this.whenSetup.promise),(0,o.k_)(t);const s=(0,o.dD)();return this.pendingApplyEdits.set(e.id,s),this.featureFetcher.applyEdits(s.promise),this.updatingHandles.addPromise(s.promise),{result:{}}}async endApplyEdits(e,t){const s=this.pendingApplyEdits.get(e.id);return s&&s.resolve(e.edits),(0,o.k_)(t),{result:{}}}_updateFeatureFetcherConfiguration(e){this.featureFetcher.filter=(0,a.pC)(e.filter)?m.Z.fromJSON(e.filter):null,this.featureFetcher.customParameters=e.customParameters}_notifyUpdating(){this.emit("notify-updating",{updating:this.updating})}};function K(){return new X}(0,r._)([(0,u.Cb)({readOnly:!0})],X.prototype,"updating",null),(0,r._)([(0,u.Cb)()],X.prototype,"isInitializing",void 0),X=(0,r._)([(0,c.j)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceSnappingSourceWorker")],X)},89749:(e,t,s)=>{s.d(t,{t:()=>c});var r=s(43697),i=s(15923),n=s(61247),a=s(70586),o=s(17445),l=s(1654),u=s(5600),d=s(52011);let c=class extends i.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,s={}){const r=++this.handleId;s.sync||this._installSyncUpdatingWatch(e,r);const i=(0,o.YP)(e,t,s);return this.handles.add(i,r),{remove:()=>this.handles.remove(r)}}addOnCollectionChange(e,t,{initial:s=!1}={}){const r=++this.handleId;return this.handles.add([(0,o.on)(e,"after-changes",this._createSyncUpdatingCallback(),o.Z_),(0,o.on)(e,"change",t,{onListenerAdd:s?e=>t({added:e.items,removed:[],moved:[],target:e}):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(h)||this._set("updating",!1))}},t),this.pendingPromises.add(e),this._set("updating",!0);const s=()=>this.handles.remove(t);return e.then(s,s),e}removeAll(){this.pendingPromises.clear(),this.handles.removeAll(),this._set("updating",!1)}_installSyncUpdatingWatch(e,t){const s=this._createSyncUpdatingCallback(),r=(0,o.YP)(e,s,{sync:!0,equals:()=>!1});return this.handles.add(r,t),r}_createSyncUpdatingCallback(){return()=>{this.handles.remove(h),++this.scheduleHandleId;const e=this.scheduleHandleId;this._get("updating")||this._set("updating",!0),this.handles.add((0,l.Os)((()=>{e===this.scheduleHandleId&&(this._set("updating",this.pendingPromises.size>0),this.handles.remove(h))})),h)}}};(0,r._)([(0,u.Cb)({readOnly:!0})],c.prototype,"updating",void 0),c=(0,r._)([(0,d.j)("esri.views.support.WatchUpdatingTracking")],c);const h=-42;var p,g;(g=p||(p={}))[g.NONE=0]="NONE",g[g.SYNC=1]="SYNC",g[g.INIT=2]="INIT"}}]);
|
|
@@ -1 +0,0 @@
|
|
|
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),a=i(51773),n=i(78223),l=i(15923),o=(i(80442),i(22974)),u=i(92604),d=i(70586),h=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,d.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 a=t[e],n=null==i?void 0:i.originOf(e);if(a.readOnly||!1===a.clonable||n!==h.s3.USER&&n!==h.s3.DEFAULTS)continue;const l=this[e];let u=null;const d=a.clonable;u="function"==typeof d?d(l):"reference"===d?l:(0,o.Vo)(l),null!=l&&null==u||(n===h.s3.DEFAULTS?s.set(e,u):r[e]=u)}const a=new(0,Object.getPrototypeOf(this).constructor)(r);if(s.size){var n;const e=null==(n=(0,c.vw)(a))?void 0:n.store;if(e)for(const[t,i]of s)e.set(t,i,h.s3.DEFAULTS)}return a}};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,d.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,d.pC)(this.geometry)?this.geometry.toJSON():null,symbol:(0,d.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,d.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:a.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:n.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:()=>H,constructFeatureSet:()=>K,constructFeatureSetFromPortalItem:()=>ne,constructFeatureSetFromRelationship:()=>X,constructFeatureSetFromUrl:()=>J,convertToFeatureSet:()=>ae,createFeatureSetCollectionFromMap:()=>te,createFeatureSetCollectionFromService:()=>ie,getPortal:()=>re,initialiseMetaDataCache:()=>V,lookupUser:()=>se});var r=i(40330),s=i(3172),a=i(28924),n=i(84328),l=i(1692),o=i(61363),u=i(70409),d=i(85065),h=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),a=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===a)throw new Error("Invalid Statistic Function");const n=a.name.toUpperCase().trim();if("MIN"===n){if(r.typeofstat="MIN",r.workingexpr=a.expr,null===s)throw new Error("Invalid Statistic Function Parameters")}else if("MAX"===n){if(r.typeofstat="MAX",r.workingexpr=a.expr,null===s)throw new Error("Invalid Statistic Function Parameters")}else if("COUNT"===n)r.typeofstat="COUNT",r.workingexpr=a.expr;else if("STDEV"===n){if(r.typeofstat="STDDEV",r.workingexpr=a.expr,null===s)throw new Error("Invalid Statistic Function Parameters")}else if("SUM"===n){if(r.typeofstat="SUM",r.workingexpr=a.expr,null===s)throw new Error("Invalid Statistic Function Parameters")}else if("MEAN"===n){if(r.typeofstat="AVG",r.workingexpr=a.expr,null===s)throw new Error("Invalid Statistic Function Parameters")}else if("AVG"===n){if(r.typeofstat="AVG",r.workingexpr=a.expr,null===s)throw new Error("Invalid Statistic Function Parameters")}else{if("VAR"!==n)throw new Error("Invalid Statistic Function");if(r.typeofstat="VAR",r.workingexpr=a.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 h.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 a=null!==s.workingexpr&&(0,y.y5)(s.workingexpr)?(0,y.zR)(s.workingexpr,f.Bj.Standardised):"";switch(this._decodedStatsfield[t].typeofstat){case"SUM":if(""!==a){if(r=this._parent.getField(a),!r)throw new Error("Field is not present for Aggregation");i.type=r.type}else i.type="double";break;case"MIN":case"MAX":if(""!==a){if(r=this._parent.getField(a),!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(""!==a&&(r=this._parent.getField(a),!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 a=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),a=!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)),a)))}let t=this._parent;if(this._adaptedFields.length>0&&(t=new u.Xx({parentfeatureset:this._parent,adaptedFields:this._adaptedFields,extraFilter:null})),!0===l.nowhereclause)a=new c.Z(["GETPAGES"],[],!1,{aggregatefeaturesetpagedefinition:!0,resultOffset:0,resultRecordCount:this._maxQuery,internal:{fullyResolved:!1,workingItem:null,type:"manual",iterator:null,set:[],subfeatureset:new d.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 n.Z({parentfeatureset:e,whereclause:t})}a=new c.Z(["GETPAGES"],[],!1,{aggregatefeaturesetpagedefinition:!0,resultOffset:0,resultRecordCount:this._maxQuery,internal:{fullyResolved:!1,workingItem:null,type:"manual",iterator:null,set:[],subfeatureset:new d.Z({parentfeatureset:e,orderbyclause:new p.Z(this.phsyicalgroupbyfields.join(",")+","+this._parent.objectIdField+" ASC")})}})}return a}))}_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,a)=>{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,(a=>{null===a?s(r.length):(t-=1,s(this._sequentialGetPhysicalItem(e,t,i,r)))}),a)}))}_nextAggregateItem(e,t,i,r,s,a){try{(0,o.U)(e.pagesDefinition.internal.iterator.next()).then((n=>{if(null===n)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(n);if(null===e.pagesDefinition.internal.workingItem)e.pagesDefinition.internal.workingItem={features:[n],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:[n],id:l},void s(i)}e.pagesDefinition.internal.workingItem.features.push(n)}this._nextAggregateItem(e,t,i,r,s,a)}}),a)}catch(e){a(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(){h.Z._featuresetFunctions.groupby=function(e,t){return new C({parentfeatureset:this,groupbyfields:e,statsfields:t})}}}var x=i(53073),D=i(63991),k=i(80692),R=i(33955),T=i(67284),O=i(98732),E=i(78760),L=i(74889),P=i(57444),N=i(58539),A=i(27091),j=i(34599),B=i(33586);class q extends h.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,j.executeQueryPBF)(this._layer.parsedUrl,e,new E.J({})).then((e=>L.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=new A.Z({url:this._layer.parsedUrl.path}),r="execute"===t&&this.pbfSupportedForQuery(e);let s=null;if(this.recentlyUsedQueries){const a=this.convertQueryToLruCacheKey(e);s=this.recentlyUsedQueries.getFromCache(a),null===s&&(s=!0!==r?i[t](e):this.queryPBF(e),this.recentlyUsedQueries.addToCache(a,s),s=s.catch((e=>{throw this.recentlyUsedQueries.removeFromCache(a),e})))}return this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:e,method:t}),null===s&&(s=!0!==r?i[t](e):this.queryPBF(e)),s}_getFilteredSet(e,t,i,r,s){return this.databaseType().then((a=>{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 n="",l=!1;null!==r&&this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsOrderBy&&(n=r.constructClause(),l=!0);const o=new P.Z;return o.where=null===i?null===t?"1=1":"":(0,y.zR)(i,a),this._requestStandardised&&(o.sqlFormat="standard"),o.spatialRelationship=this._makeRelationshipEnum(e),o.outSpatialReference=this.spatialReference,o.orderByFields=""!==n?n.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 a="",n=!1;return null!==r&&this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsOrderBy&&(a=r.constructClause(),n=!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 d=null;if(!0===this._pageJustIds)d=new c.Z([],["GETPAGES"],n,{spatialRel:this._makeRelationshipEnum(e),relationParam:this._makeRelationshipParam(e),outFields:this._layer.objectIdField,resultRecordCount:o,resultOffset:0,geometry:null===t?null:t,where:l,orderByFields:a,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:["*"]);d=new c.Z([],["GETPAGES"],n,{spatialRel:this._makeRelationshipEnum(e),relationParam:this._makeRelationshipParam(e),outFields:r.join(","),resultRecordCount:o,resultOffset:0,geometry:null===t?null:t,where:l,orderByFields:a,returnGeometry:i,returnIdsOnly:"false",internal:{set:[],lastRetrieved:0,lastPage:0,fullyResolved:!1}})}return this._expandPagedSet(d,o,0,1,s).then((()=>d))}))}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,a=new P.Z;return this._requestStandardised&&(a.sqlFormat="standard"),a.spatialRelationship=e.pagesDefinition.spatialRel,a.relationParameter=e.pagesDefinition.relationParam,a.outFields=e.pagesDefinition.outFields.split(","),a.num=e.pagesDefinition.resultRecordCount,a.start=e.pagesDefinition.internal.lastPage,a.geometry=e.pagesDefinition.geometry,a.where=e.pagesDefinition.where,a.orderByFields=""!==e.pagesDefinition.orderByFields?e.pagesDefinition.orderByFields.split(","):null,a.returnGeometry=e.pagesDefinition.returnGeometry,a.outSpatialReference=this.spatialReference,this.executeQuery(a,"execute").then((a=>{if(this._checkCancelled(i),e.pagesDefinition.internal.lastPage!==s)return"done";for(let t=0;t<a.features.length;t++)e.pagesDefinition.internal.set[r+t]=a.features[t].attributes[this._layer.objectIdField];if(!1===this._pageJustIds)for(let e=0;e<a.features.length;e++)this._featureCache[a.features[e].attributes[this._layer.objectIdField]]=a.features[e];return(void 0===a.exceededTransferLimit&&a.features.length!==e.pagesDefinition.resultRecordCount||!1===a.exceededTransferLimit)&&(e.pagesDefinition.internal.fullyResolved=!0),e.pagesDefinition.internal.lastRetrieved=t+a.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 a=0;for(let r=e._lastFetchedIndex;r<e._known.length;r++){if(e._lastFetchedIndex+=1,a++,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(a>=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,a,n,l,o){return this._ensureLoaded().then((()=>this.databaseType())).then((u=>{let d=i.parseTree.column;for(let e=0;e<this._layer.fields.length;e++)if(this._layer.fields[e].name.toLowerCase()===d.toLowerCase()){d=this._layer.fields[e].name;break}const h=new P.Z;this._requestStandardised&&(h.sqlFormat="standard");let c=null===a?null===s?"1=1":"":(0,y.zR)(a,u);return this._layer.definitionExpression&&this._useDefinitionExpression&&(c=""!==c?"(("+this._layer.definitionExpression+") AND ("+c+"))":this._layer.definitionExpression),h.where=c,h.spatialRelationship=this._makeRelationshipEnum(r),h.relationParameter=this._makeRelationshipParam(r),h.geometry=null===s?null:s,h.returnDistinctValues=!0,h.returnGeometry=!1,h.outFields=[d],this.executeQuery(h,"execute").then((u=>{if(this._checkCancelled(o),!u.hasOwnProperty("features"))return(0,w.d1)(new Error("Unnexected Result querying statistics from layer"));let h=!1;for(let e=0;e<this._layer.fields.length;e++)if(this._layer.fields[e].name===d){"date"===this._layer.fields[e].type&&(h=!0);break}for(let e=0;e<u.features.length;e++){if(h){const t=u.features[e].attributes[d];null!==t?l.push(new Date(t)):l.push(t)}else l.push(u.features[e].attributes[d]);if(l.length>=n)break}return 0===u.features.length?l:u.features.length===this._layer.capabilities.query.maxRecordCount&&l.length<n?this._getDistinctPages(e+u.features.length,t,i,r,s,a,n,l,o).then((e=>({calculated:!0,result:e}))):l}))}))}_distinctStat(e,t,i,r,s,a,n){return this._getDistinctPages(0,e,t,i,r,s,a,[],n).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 a=null===r?null===i?"1=1":"":(0,y.zR)(r,e);return this._layer.definitionExpression&&this._useDefinitionExpression&&(a=""!==a?"(("+this._layer.definitionExpression+") AND ("+a+"))":this._layer.definitionExpression),s.where=a,s.where=a,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,a,n){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,a,n):"distinct"===e?!1===u?""!==i||null!==s?{calculated:!1}:this._manualStat(e,t,a,n):this._distinctStat(e,t,i,r,s,a,n):this.databaseType().then((a=>{if(this.isTable()&&r&&null!==i&&""!==i)return{calculated:!0,result:null};const n=new P.Z;this._requestStandardised&&(n.sqlFormat="standard");let l=null===s?null===r?"1=1":"":(0,y.zR)(s,a);this._layer.definitionExpression&&this._useDefinitionExpression&&(l=""!==l?"(("+this._layer.definitionExpression+") AND ("+l+"))":this._layer.definitionExpression),n.where=l,n.spatialRelationship=this._makeRelationshipEnum(i),n.relationParameter=this._makeRelationshipParam(i),n.geometry=null===r?null:r;const o=new N.Z;o.statisticType=(0,_.g3)(e),o.onStatisticField=(0,y.zR)(t,a),o.outStatisticFieldName="ARCADE_STAT_RESULT",n.returnGeometry=!1;let u="ARCADE_STAT_RESULT";return n.outStatistics=[o],this.executeQuery(n,"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,a,n){return this._stats(e,t,i,r,s,a,n)}_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,a,n){return this._ensureLoaded().then((()=>this.databaseType())).then((l=>{let o="",u=!1,d=!1;null!==a&&this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsOrderBy&&(o=a.constructClause(),d=!0),this._layer.capabilities&&this._layer.capabilities.query&&!1===this._layer.capabilities.query.supportsPagination&&(d=!1,u=!0,o=this._layer.objectIdField);const h=[];for(let e=0;e<t.length;e++){const i=new N.Z;i.onStatisticField=null!==t[e].workingexpr?(0,y.zR)(t[e].workingexpr,l):"",i.outStatisticFieldName=t[e].field,i.statisticType=t[e].toStatisticsName(),h.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"],d,{groupbypage:!0,spatialRel:this._makeRelationshipEnum(i),relationParam:this._makeRelationshipParam(i),outFields:["*"],useOIDpagination:u,generatedOid:n,resultRecordCount:p,resultOffset:0,groupByFieldsForStatistics:e,outStatistics:h,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,a=e.pagesDefinition.internal.lastPage,n=new P.Z;return this._requestStandardised&&(n.sqlFormat="standard"),n.where=t,n.spatialRelationship=e.pagesDefinition.spatialRel,n.relationParameter=e.pagesDefinition.relationParam,n.outFields=e.pagesDefinition.outFields,n.outStatistics=e.pagesDefinition.outStatistics,n.geometry=e.pagesDefinition.geometry,n.groupByFieldsForStatistics=e.pagesDefinition.groupByFieldsForStatistics,n.num=e.pagesDefinition.resultRecordCount,n.start=e.pagesDefinition.internal.lastPage,n.returnGeometry=e.pagesDefinition.returnGeometry,n.orderByFields=""!==e.pagesDefinition.orderByFields?e.pagesDefinition.orderByFields.split(","):null,this.isTable()&&n.geometry&&n.spatialRelationship?(0,w.DB)([]):this.executeQuery(n,"execute").then((t=>{if(this._checkCancelled(i),!t.hasOwnProperty("features"))return(0,w.d1)(new Error("Unnexected Result querying aggregates from layer"));const n=[];if(e.pagesDefinition.internal.lastPage!==a)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++)n.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,n}))}catch(e){return(0,w.d1)(e)}}static create(e,t,i,r,s){const a=new T.default({url:e,outFields:null===t?["*"]:t});return new q({layer:a,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 a={objectIds:[e],returnMetadata:s};return(t&&t>0||i&&i>0)&&(a.size=[t&&t>0?t:0,i&&i>0?i:t+1]),r&&r.length>0&&(a.attachmentTypes=r),this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:a,method:"attachments"}),this._layer.queryAttachments(a).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 a=null;s&&t.exifInfo&&(a=B.Z.convertJsonToArcade(t.exifInfo,!0)),i.push(new k.Z(t.id,t.name,t.contentType,t.size,r,a))})),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,a=[];for(const t of r.relatedRecords){t.geometry&&(t.geometry.spatialReference=e);const i=new l.Z({geometry:t.geometry?(0,R.im)(t.geometry):null,attributes:t.attributes});a.push(i)}t[s]={features:a,exceededTransferLimit:!0===i.exceededTransferLimit}}}return t}return(0,w.d1)("Invalid Request")}))}getFeatureByObjectId(e,t){const i=new A.Z({url:this._layer.parsedUrl.path}),r=new P.Z;return r.outFields=t,r.returnGeometry=!1,r.outSpatialReference=this.spatialReference,r.where=this.objectIdField+"="+e.toString(),this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:r,method:"execute"}),i.execute(r).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 a=i.toLowerCase().indexOf("/rest/services");return i=a>-1?i.substring(0,a):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 q({layer:this._layer,spatialReference:this.spatialReference,outFields:this._overrideFields,includeGeometry:!this._removeGeometry,lrucache:this.recentlyUsedQueries,interceptor:this.featureSetQueryInterceptor});return e._useDefinitionExpression=!1,e}}var U=i(17805),Z=i(75935);class G extends h.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 a=this._layer.nativeCapabilities();if(!1===a.canQueryRelated)return new c.Z([],[],!0,null);if(a.capabilities.queryRelated&&a.capabilities.queryRelated.supportsPagination)return this._getFilteredSetUsingPaging(e,t,i,r,s);let n="",l=!1;null!==r&&a.capabilities&&a.capabilities.queryRelated&&!0===a.capabilities.queryRelated.supportsOrderBy&&(n=r.constructClause(),l=!0);const o=new Z.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 d=!0;return!0===this._removeGeometry&&(d=!1),o.returnGeometry=d,this._requestStandardised&&(o.sqlFormat="standard"),o.outSpatialReference=this.spatialReference,o.orderByFields=""!==n?n.split(","):null,a.source.queryRelatedFeatures(o).then((r=>{this._checkCancelled(s);const a=r[this._findObjectId]?r[this._findObjectId].features:[],n=[];for(let e=0;e<a.length;e++)this._featureCache[a[e].attributes[this._layer.objectIdField]]=a[e],n.push(a[e].attributes[this._layer.objectIdField]);const o=t&&null!==e&&""!==e,u=null!=i;return new c.Z(o||u?n:[],o||u?[]:n,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 a="",n=!1;const l=this._layer.nativeCapabilities();return null!==r&&l&&l.capabilities.queryRelated&&!0===l.capabilities.queryRelated.supportsOrderBy&&(a=r.constructClause(),n=!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,d=null!=i;let h=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 h=new c.Z(u||d?["GETPAGES"]:[],u||d?[]:["GETPAGES"],n,{outFields:f.join(","),resultRecordCount:r,resultOffset:0,objectIds:[this._findObjectId],where:"1=1",orderByFields:a,returnGeometry:p,returnIdsOnly:"false",internal:{set:[],lastRetrieved:0,lastPage:0,fullyResolved:!1}}),this._expandPagedSet(h,r,0,0,s).then((()=>h))}))}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,a=this._layer.nativeCapabilities(),n=new Z.Z;return!0===this._requestStandardised&&(n.sqlFormat="standard"),n.relationshipId=this.relationship.id,n.objectIds=e.pagesDefinition.objectIds,n.resultOffset=e.pagesDefinition.internal.lastPage,n.resultRecordCount=e.pagesDefinition.resultRecordCount,n.outFields=e.pagesDefinition.outFields.split(","),n.where=e.pagesDefinition.where,n.orderByFields=""!==e.pagesDefinition.orderByFields?e.pagesDefinition.orderByFields.split(","):null,n.returnGeometry=e.pagesDefinition.returnGeometry,n.outSpatialReference=this.spatialReference,a.source.queryRelatedFeatures(n).then((a=>{if(this._checkCancelled(i),e.pagesDefinition.internal.lastPage!==s)return 0;const n=a[this._findObjectId]?a[this._findObjectId].features:[];for(let t=0;t<n.length;t++)e.pagesDefinition.internal.set[r+t]=n[t].attributes[this._layer.objectIdField];for(let e=0;e<n.length;e++)this._featureCache[n[e].attributes[this._layer.objectIdField]]=n[e];const l=!a[this._findObjectId]||!1===a[this._findObjectId].exceededTransferLimit;return n.length!==e.pagesDefinition.resultRecordCount&&l&&(e.pagesDefinition.internal.fullyResolved=!0),e.pagesDefinition.internal.lastRetrieved=t+n.length,e.pagesDefinition.internal.lastPage+=e.pagesDefinition.resultRecordCount,n.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 a=this._maxQueryRate();if(!0===this._checkIfNeedToExpandKnownPage(e,a))return this._expandPagedSet(e,a,0,0,r).then((()=>this._getFeatures(e,t,i,r)));let n=0;for(let r=e._lastFetchedIndex;r<e._known.length&&(n++,n<=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)))&&!(n>=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,a,n){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 z=i(48039),M=i(65587),W=i(15235);function V(){null===z.Z.applicationCache&&(z.Z.applicationCache=new z.Z)}function Q(e,t){if(z.Z.applicationCache){const i=z.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 z.Z.applicationCache&&(z.Z.applicationCache.setLayerInfo(e,s),s=s.catch((t=>{throw z.Z.applicationCache.clearLayerInfo(e),t}))),s.then((()=>(0,w.DB)(r)))}return(0,w.DB)(new T.default({url:e,outFields:t}))}function J(e,t,i,r,s,a=null){return Q(e,["*"]).then((e=>(0,w.DB)(K(e,t,i,r,s,a))))}function K(e,t=null,i=null,r=!0,s=null,a=null){return!0===e._hasMemorySource()?new U.Z({layer:e,spatialReference:t,outFields:i,includeGeometry:r,lrucache:s,interceptor:a}):new q({layer:e,spatialReference:t,outFields:i,includeGeometry:r,lrucache:s,interceptor:a})}function $(e){if(null!==z.Z.applicationCache){const t=z.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!==z.Z.applicationCache&&(z.Z.applicationCache.setLayerInfo(e,t),t=t.catch((t=>{throw z.Z.applicationCache.clearLayerInfo(e),t}))),t}function H(e,t){const i={metadata:null,networkId:-1,unVersion:3,terminals:[],queryelem:null,layerNameLkp:{},lkp:null};return $(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 a=r.controllerDatasetLayers.utilityNetworkLayerId;return i.networkId=a,function(e,t){const i="QUERYDATAELEMTS:"+t.toString()+":"+e;if(null!==z.Z.applicationCache){const e=z.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!==z.Z.applicationCache&&(z.Z.applicationCache.setLayerInfo(i,r),r=r.catch((e=>{throw z.Z.applicationCache.clearLayerInfo(i),e}))),r}(e,a).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!==z.Z.applicationCache){const t=z.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!==z.Z.applicationCache&&(z.Z.applicationCache.setLayerInfo(e,t),t=t.catch((t=>{throw z.Z.applicationCache.clearLayerInfo(e),t}))),t}(e+"/"+a).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")),J(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 X(e,t,i,r=null,s=null,a=!0,n=null,l=null){let o=e.serviceUrl();return o?(o="/"===o.charAt(o.length-1)?o+t.relatedTableId.toString():o+"/"+t.relatedTableId.toString(),J(o,r,s,a,n,l).then((o=>new G({layer:e,relatedLayer:o,relationship:t,objectId:i,spatialReference:r,outFields:s,includeGeometry:a,lrucache:n,interceptor:l})))):null}n.Z.registerAction(),C.registerAction(),d.Z.registerAction(),x.Z.registerAction(),D.Z.registerAction();class Y extends a.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=K(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 ee extends a.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=K(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 $(this._url).then((e=>(this.metadata=e,e)))}load(){return this._loadMetaData()}clone(){return new ee(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?Q(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?Q(this._url+"/"+s.id,["*"]).then((e=>this._makeAndAddFeatureSet(e,t,i))):this.resolvePromise(null)}))}}function te(e,t,i=null,r=null){return new Y(e,t,i,r)}function ie(e,t,i=null,r=null){return new ee(e,t,i,r)}function re(e,t){return null===e?t:new M.Z({url:e.field("url")})}function se(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 ae(e,t,i,r,s){if(null===e)return null;if(e instanceof T.default){switch(t){case"datasource":return K(e,s,e.outFields,!0,i,r).getDataSourceFeatureSet();case"parent":case"root":return K(e,s,e.outFields,!0,i,r)}return null}if(e instanceof h.Z)switch(t){case"datasource":return e.getDataSourceFeatureSet();case"parent":return e;case"root":return e.getRootFeatureSet()}return null}function ne(e,t,i,r,s,a,n,l=null){if(z.Z.applicationCache){const o=z.Z.applicationCache.getLayerInfo(e+":"+a.url);if(o)return o.then((e=>{try{const a=new T.default({url:(0,f.US)(e.url)+"/"+t,outFields:["*"]});return(0,w.DB)(K(a,i,r,s,n,l))}catch(e){return(0,w.d1)(e)}}),(e=>(0,w.d1)(e)))}return(0,w.Ue)(((o,u)=>{const d=new W.default({id:e,portal:a}).load();z.Z.applicationCache&&z.Z.applicationCache.setLayerInfo(e+":"+a.url,d),d.then((e=>{try{const a=new T.default({url:(0,f.US)(e.url)+"/"+t,outFields:["*"]});o(K(a,i,r,s,n,l))}catch(e){u(e)}}),(t=>{z.Z.applicationCache&&z.Z.applicationCache.clearLayerInfo(e+":"+a.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),a=i(91136),n=i(90961),l=i(90658),o=i(36515),u=i(95330),d=i(41534),h=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 d.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:d.WhereClause.create(i,t._parent.getFieldsIndex())}}evaluateNodeToWhereClause(e,t,i=null,r=null,s){let a,n,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 a=0;a<e.clauses.length;a++)r+=" WHEN "+this.evaluateNodeToWhereClause(e.clauses[a].operand,t,i,y.BADNESS,s)+" THEN "+this.evaluateNodeToWhereClause(e.clauses[a].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":n=[];for(const a of e.value)n.push(this.evaluateNodeToWhereClause(a,t,i,r,s));return n;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(a=[],"expr_list"===e.right.type){if("column_ref"===e.left.type&&e.left.column.toUpperCase()===this.field.name.toUpperCase()){const a=[];let n=!0;for(const t of e.right.value){if("string"!==t.type){n=!1;break}if(void 0===this.lkp[t.value]){n=!1;break}a.push(this.lkp[t.value].toString())}if(n)return" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,s)+" IN ("+a.join(",")+")) "}return a=this.evaluateNodeToWhereClause(e.right,t,i,r,s)," ("+this.evaluateNodeToWhereClause(e.left,t,i,r,s)+" IN ("+a.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(a=[],"expr_list"===e.right.type){if("column_ref"===e.left.type&&e.left.column.toUpperCase()===this.field.name.toUpperCase()){const a=[];let n=!0;for(const t of e.right.value){if("string"!==t.type){n=!1;break}if(void 0===this.lkp[t.value]){n=!1;break}a.push(this.lkp[t.value].toString())}if(n)return" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,s)+" NOT IN ("+a.join(",")+")) "}return a=this.evaluateNodeToWhereClause(e.right,t,i,r,s)," ("+this.evaluateNodeToWhereClause(e.left,t,i,r,s)+" NOT IN ("+a.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 d.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 a.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 h.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 n.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,a){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,a).then((()=>this._getFeatures(e,t,i,a)));let d=0;for(let r=e._lastFetchedIndex;r<e._known.length&&(d++,d<=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 n.Z([],l,e._ordered,null);const h=Math.min(l.length,i);return this._parent._getFeatures(e,-1,h,a).then((()=>{this._checkCancelled(a);const e=[];for(let t=0;t<h;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 a=!1;const l=this._reformulateWithoutAdaptions(i);a=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===a?new n.Z(e._candidates.slice(0).concat(e._known.slice(0)),[],!0===u&&e._ordered,this._clonePageDefinition(e.pagesDefinition)):new n.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,a,n){let l=!1,d=this._reformulateWithoutAdaptions(t);return l=d.cannot,t=d.where,d=this._reformulateWithoutAdaptions(s),l=l||d.cannot,null!==(s=d.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,a,n):(0,u.DB)({calculated:!1}):this._parent._stat(e,t,i,r,s,a,n).then((l=>!1===l.calculated?null===s&&""===i&&null===r?this._manualStat(e,t,a,n):{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 a=[];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,a.push(t)}else a.push(i)}const n=this._reformulateWithoutAdaptions(s);return n.cannot?(0,u.DB)(!1):(null!==(s=n.where)?null!==this._extraFilter&&(s=(0,o.$e)(this._extraFilter,s)):s=this._extraFilter,this._parent._canDoAggregates(e,a,i,r,s))}_getAggregatePagesDataSourceDefinition(e,t,i,r,s,a,n){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 d=this._reformulateWithoutAdaptions(s);return d.cannot?(0,u.d1)(new Error("Should never be called")):(null!==(s=d.where)?null!==this._extraFilter&&(s=(0,o.$e)(this._extraFilter,s)):s=this._extraFilter,this._parent._getAggregatePagesDataSourceDefinition(e,l,i,r,s,a,n))}}},84328:(e,t,i)=>{i.d(t,{Z:()=>d});var r=i(91136),s=i(90961),a=i(90658),n=i(36515),l=i(95330),o=i(41534),u=i(82971);class d 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=a.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===a.dj.NotInFeatureSet?t:(t=this._idstates[e],void 0===t?a.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),n=Math.min(t,e.length);return this._parent._getFeatures(r,-1,n,i).then((()=>{if(this._checkCancelled(i),null==this._whereClauseFunction){for(let t=0;t<n;t++){const i=this._parent._featureFromCache(e[t]);!0===this.executeWhereClause(i)?this._idstates[e[t]]=a.dj.InFeatureSet:this._idstates[e[t]]=a.dj.NotInFeatureSet}return"success"}const r=[];for(let t=0;t<n;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]]=a.dj.InFeatureSet:this._idstates[e[r]]=a.dj.NotInFeatureSet;return"success"}))}))}_getFilteredSet(e,t,i,r,a){return null!==this._whereClauseFunction||(null!==i?null!==this._whereclause&&(i=(0,n.$e)(this._whereclause,i)):i=this._whereclause),this._ensureLoaded().then((()=>this._parent._getFilteredSet(e,t,i,r,a))).then((e=>{let t;return this._checkCancelled(a),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,a,o){if(null!==this._whereClauseFunction)return null===s&&""===i&&null===r?this._manualStat(e,t,a,o):(0,l.DB)({calculated:!1});let u=this._whereclause;return null!==s&&null!==this._whereclause&&(u=(0,n.$e)(this._whereclause,s)),this._parent._stat(e,t,i,r,u,a,o).then((n=>!1===n.calculated?null===s&&""===i&&null===r?this._manualStat(e,t,a,o):{calculated:!1}:n))}_canDoAggregates(e,t,i,r,s){return null!==this._whereClauseFunction?(0,l.DB)(!1):(null!==s?null!==this._whereclause&&(s=(0,n.$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,a,o){return null===this._parent?(0,l.d1)(new Error("Should never be called")):(null!==s?null!==this._whereclause&&(s=(0,n.$e)(this._whereclause,s)):s=this._whereclause,this._parent._getAggregatePagesDataSourceDefinition(e,t,i,r,s,a,o))}static registerAction(){r.Z._featuresetFunctions.filter=function(e){if("function"==typeof e)return new d({parentfeatureset:this,whereclause:e});let t=null;return e instanceof o.WhereClause&&(t=e),new d({parentfeatureset:this,whereclause:t})}}}},85065:(e,t,i)=>{i.d(t,{Z:()=>o});var r=i(61363),s=i(91136),a=i(90961),n=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 a.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 a=this._maxQueryRate();if("GETPAGES"===e._known[i+1])return(0,r.U)(this._parent._expandPagedSet(e,a,0,0,s)).then((()=>this.getIdColumnDictionary(e,t,i,s)));let n=i+1;const l=[];for(;n<e._known.length&&"GETPAGES"!==e._known[n];)l.push(e._known[n]),n++;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 a.Z(e._candidates.slice(0),e._known.slice(0),e._ordered,this._clonePageDefinition(e.pagesDefinition));let n=!0;return e._candidates.length>0&&(n=!1),!1===r._ordered?this.manualOrderSet(r,s).then((e=>(!1===n&&(null===t&&null===i||(e=new a.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 n.Z(e)})}}}},63991:(e,t,i)=>{i.d(t,{Z:()=>l});var r=i(91136),s=i(90961),a=i(90658),n=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,n.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===a.dj.NotInFeatureSet)return t;const i=this._idstates[e];return i===a.dj.InFeatureSet||i===a.dj.NotInFeatureSet?i:t===a.dj.InFeatureSet&&void 0===i?this._countedin<this._topnum?(this._idstates[e]=a.dj.InFeatureSet,this._countedin++,a.dj.InFeatureSet):(this._idstates[e]=a.dj.NotInFeatureSet,a.dj.NotInFeatureSet):a.dj.Unknown}_expandPagedSet(e,t,i,r,s){if(null===this._parent)return(0,n.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,n.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 a=[],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]&&a.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&&a.push(e._known[r]),a.length>l)));r++);if(0===a.length)return(0,n.DB)("success");const u=new s.Z([],a,!1,null),d=Math.min(a.length,i);return this._parent._getFeatures(u,-1,d,r).then((()=>{for(let e=0;e<d;e++){const t=this._parent._featureFromCache(a[e]);void 0!==t&&(this._featureCache[a[e]]=t)}return"success"}))}_getFilteredSet(e,t,i,r,a){return this._ensureLoaded().then((()=>this._getSet(a))).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 n=0;n<e._candidates.length;n++){const l=this._isInFeatureSet(e._candidates[n]);if(l===a.dj.InFeatureSet){if(e._known.push(e._candidates[n]),i+=1,null===r?r={start:n,end:n}:r.end===n-1?r.end=n:(s.push(r),r={start:n,end:n}),e._known.length>=this._topnum)break}else if(l===a.dj.NotInFeatureSet)null===r?r={start:n,end:n}:r.end===n-1?r.end=n:(s.push(r),r={start:n,end:n}),i+=1;else if(l===a.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,n.DB)({calculated:!1})}_canDoAggregates(){return(0,n.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),a=i(90961),n=i(90658),l=i(36515),o=i(95330),u=i(9361),d=i(67284),h=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 n.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=n.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 n.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="",d=!1;if(null!==r&&(u=r.constructClause(),d=!0),this.isTable()&&t&&null!==e&&""!==e){const e=new a.Z([],[],!0,null);return(0,o.DB)(e)}const h=new p.Z;return h.where=null===i?null===t?"1=1":"":(0,l.zR)(i,n.Bj.Standardised),h.spatialRelationship=this._makeRelationshipEnum(e),h.outSpatialReference=this.spatialReference,h.orderByFields=""!==u?u.split(","):null,h.geometry=null===t?null:t,h.returnGeometry=!0,h.relationParameter=this._makeRelationshipParam(e),this._layer.queryFeatures(h).then((e=>{if(null===e)return new a.Z([],[],d,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 a.Z([],t,d,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 a.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 a.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(h.Z.fromJSON(t));let a=e.layerDefinition.geometryType;void 0===a&&(a=e.featureSet.geometryType||"");let n=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 a=[];for(let i=0;i<n.length;i++)a.push({geometry:e.featureSet.features[i].geometry,attributes:e.featureSet.features[i].attributes?this._cloneAttr(e.featureSet.features[i].attributes):{}}),a[i].attributes[t]=i;n=a,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=a;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 n)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:n,fields:o,types:s,typeIdField:r,objectIdField:i,spatialReference:t};y.geometryType=p||"point";const _=new d.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),a=this.featureValue(t.feature,this._fields[i],i);let n=0;if(n=1===this._directions[i]?r(s,a):-1*r(s,a),0!==n)return n}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:()=>d,p:()=>u});var r=i(43697),s=i(15923),a=i(61247),n=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 a.Z}get updatingHandles(){return this._get("updatingHandles")||new o.t}};return(0,r._)([(0,n.Cb)({readOnly:!0})],t.prototype,"handles",null),(0,r._)([(0,n.Cb)({readOnly:!0})],t.prototype,"updatingHandles",null),t=(0,r._)([(0,l.j)("esri.core.HandleOwner")],t),t};let d=class extends(u(s.Z)){};d=(0,r._)([(0,l.j)("esri.core.HandleOwner")],d)},44543:(e,t,i)=>{i.d(t,{F:()=>h,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 a(e,t,i,r,a,n){return s(function(e,t){return e<<t|e>>>32-t}(s(s(t,e),s(r,n)),a),i)}function n(e,t,i,r,s,n,l){return a(t&i|~t&r,e,t,s,n,l)}function l(e,t,i,r,s,n,l){return a(t&r|i&~r,e,t,s,n,l)}function o(e,t,i,r,s,n,l){return a(t^i^r,e,t,s,n,l)}function u(e,t,i,r,s,n,l){return a(i^(t|~r),e,t,s,n,l)}function d(e,t){e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;let i=1732584193,r=-271733879,a=-1732584194,d=271733878;for(let t=0;t<e.length;t+=16){const h=i,c=r,p=a,f=d;i=n(i,r,a,d,e[t+0],7,-680876936),d=n(d,i,r,a,e[t+1],12,-389564586),a=n(a,d,i,r,e[t+2],17,606105819),r=n(r,a,d,i,e[t+3],22,-1044525330),i=n(i,r,a,d,e[t+4],7,-176418897),d=n(d,i,r,a,e[t+5],12,1200080426),a=n(a,d,i,r,e[t+6],17,-1473231341),r=n(r,a,d,i,e[t+7],22,-45705983),i=n(i,r,a,d,e[t+8],7,1770035416),d=n(d,i,r,a,e[t+9],12,-1958414417),a=n(a,d,i,r,e[t+10],17,-42063),r=n(r,a,d,i,e[t+11],22,-1990404162),i=n(i,r,a,d,e[t+12],7,1804603682),d=n(d,i,r,a,e[t+13],12,-40341101),a=n(a,d,i,r,e[t+14],17,-1502002290),r=n(r,a,d,i,e[t+15],22,1236535329),i=l(i,r,a,d,e[t+1],5,-165796510),d=l(d,i,r,a,e[t+6],9,-1069501632),a=l(a,d,i,r,e[t+11],14,643717713),r=l(r,a,d,i,e[t+0],20,-373897302),i=l(i,r,a,d,e[t+5],5,-701558691),d=l(d,i,r,a,e[t+10],9,38016083),a=l(a,d,i,r,e[t+15],14,-660478335),r=l(r,a,d,i,e[t+4],20,-405537848),i=l(i,r,a,d,e[t+9],5,568446438),d=l(d,i,r,a,e[t+14],9,-1019803690),a=l(a,d,i,r,e[t+3],14,-187363961),r=l(r,a,d,i,e[t+8],20,1163531501),i=l(i,r,a,d,e[t+13],5,-1444681467),d=l(d,i,r,a,e[t+2],9,-51403784),a=l(a,d,i,r,e[t+7],14,1735328473),r=l(r,a,d,i,e[t+12],20,-1926607734),i=o(i,r,a,d,e[t+5],4,-378558),d=o(d,i,r,a,e[t+8],11,-2022574463),a=o(a,d,i,r,e[t+11],16,1839030562),r=o(r,a,d,i,e[t+14],23,-35309556),i=o(i,r,a,d,e[t+1],4,-1530992060),d=o(d,i,r,a,e[t+4],11,1272893353),a=o(a,d,i,r,e[t+7],16,-155497632),r=o(r,a,d,i,e[t+10],23,-1094730640),i=o(i,r,a,d,e[t+13],4,681279174),d=o(d,i,r,a,e[t+0],11,-358537222),a=o(a,d,i,r,e[t+3],16,-722521979),r=o(r,a,d,i,e[t+6],23,76029189),i=o(i,r,a,d,e[t+9],4,-640364487),d=o(d,i,r,a,e[t+12],11,-421815835),a=o(a,d,i,r,e[t+15],16,530742520),r=o(r,a,d,i,e[t+2],23,-995338651),i=u(i,r,a,d,e[t+0],6,-198630844),d=u(d,i,r,a,e[t+7],10,1126891415),a=u(a,d,i,r,e[t+14],15,-1416354905),r=u(r,a,d,i,e[t+5],21,-57434055),i=u(i,r,a,d,e[t+12],6,1700485571),d=u(d,i,r,a,e[t+3],10,-1894986606),a=u(a,d,i,r,e[t+10],15,-1051523),r=u(r,a,d,i,e[t+1],21,-2054922799),i=u(i,r,a,d,e[t+8],6,1873313359),d=u(d,i,r,a,e[t+15],10,-30611744),a=u(a,d,i,r,e[t+6],15,-1560198380),r=u(r,a,d,i,e[t+13],21,1309151649),i=u(i,r,a,d,e[t+4],6,-145523070),d=u(d,i,r,a,e[t+11],10,-1120210379),a=u(a,d,i,r,e[t+2],15,718787259),r=u(r,a,d,i,e[t+9],21,-343485551),i=s(i,h),r=s(r,c),a=s(a,p),d=s(d,f)}return[i,r,a,d]}function h(e,t=r.Hex){const i=t||r.Base64,s=d(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,a=i(70586),n=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 n.Z,this._users=new n.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 a=this._db.get(e);if(a&&(this._size-=a.size,this._db.delete(e),a.entry!==t&&this._notifyRemove(e,a.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 n=1+Math.max(s,-3)- -3;this._db.set(e,{entry:t,size:i,lifetime:n,lives:n}),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,a.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,a.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:()=>a,UI:()=>n,q6:()=>l,mt:()=>o});var r=i(70586),s=i(95330);function a(e,t,i){return(0,s.as)(e.map(((e,r)=>t.apply(i,[e,r]))))}function n(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)},69285:(e,t,i)=>{i.d(t,{k:()=>n});var r=i(70586),s=i(67900),a=i(8744);function n(e,t,i){if((0,r.Wi)(t)||(0,r.Wi)(i)||i.vcsWkid||(0,a.fS)(t,i))return null;const n=(0,s._R)(t)/(0,s._R)(i);if(1===n)return null;switch(e){case"point":case"esriGeometryPoint":return e=>function(e,t){e&&null!=e.z&&(e.z*=t)}(e,n);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,n);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,n);case"multipoint":case"esriGeometryMultipoint":return e=>function(e,t){if(e)for(const i of e.points)i.length>2&&(i[2]*=t)}(e,n);case"extent":case"esriGeometryExtent":return e=>function(e,t){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=t,e.zmax*=t)}(e,n);default:return null}}},54295:(e,t,i)=>{i.d(t,{V:()=>n});var r=i(43697),s=i(5600),a=(i(67676),i(80442),i(75215),i(52011));const n=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,a.j)("esri.layers.mixins.APIKeyMixin")],t),t}},17287:(e,t,i)=>{i.d(t,{Y:()=>u});var r=i(43697),s=i(92604),a=i(70586),n=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,a.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,n.Cb)()],t.prototype,"title",null),(0,r._)([(0,n.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),a=i(3172),n=i(66643),l=i(20102),o=i(92604),u=i(70586),d=i(95330),h=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,d.k_)(t),await r.load({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData},t)}catch(e){throw(0,d.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,d.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`,d=_.Z.getDefault();if(d&&d.loaded&&(0,h.Fv)(d.restUrl)===(0,h.Fv)(o))return d.user;const c=`${o}/community/self`,p=(0,u.pC)(e)?e.signal:null,f=await(0,n.q6)((0,a.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,h.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:()=>d});var r=i(43697),s=i(35454),a=i(96674),n=i(5600),l=(i(67676),i(80442),i(75215),i(52011));const o=new s.Xn({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 a.wq{constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,r._)([(0,n.Cb)({json:{write:!0}})],u.prototype,"name",void 0),(0,r._)([(0,n.Cb)({json:{write:!0}})],u.prototype,"description",void 0),(0,r._)([(0,n.Cb)({json:{read:o.read,write:o.write}})],u.prototype,"drawingTool",void 0),(0,r._)([(0,n.Cb)({json:{write:!0}})],u.prototype,"prototype",void 0),(0,r._)([(0,n.Cb)({json:{write:!0}})],u.prototype,"thumbnail",void 0),u=(0,r._)([(0,l.j)("esri.layers.support.FeatureTemplate")],u);const d=u},16451:(e,t,i)=>{i.d(t,{Z:()=>c});var r=i(43697),s=i(96674),a=i(5600),n=(i(67676),i(80442),i(75215),i(71715)),l=i(52011),o=i(30556),u=i(72729),d=i(70082);let h=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,a.Cb)({json:{write:!0}})],h.prototype,"id",void 0),(0,r._)([(0,a.Cb)({json:{write:!0}})],h.prototype,"name",void 0),(0,r._)([(0,a.Cb)({json:{write:!0}})],h.prototype,"domains",void 0),(0,r._)([(0,n.r)("domains")],h.prototype,"readDomains",null),(0,r._)([(0,o.c)("domains")],h.prototype,"writeDomains",null),(0,r._)([(0,a.Cb)({type:[d.Z],json:{write:!0}})],h.prototype,"templates",void 0),h=(0,r._)([(0,l.j)("esri.layers.support.FeatureType")],h);const c=h},56765:(e,t,i)=>{i.d(t,{Z:()=>d});var r,s=i(43697),a=i(80539),n=i(96674),l=i(5600),o=(i(67676),i(80442),i(75215),i(52011));let u=r=class extends n.wq{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new a.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 d=u},66677:(e,t,i)=>{i.d(t,{ld:()=>f,B5:()=>h,M8:()=>_,G:()=>w,Qc:()=>c,DR:()=>p,Nm:()=>g,XG:()=>m,a7:()=>y,wH:()=>b});var r=i(70586),s=i(17452),a=i(25929);const n={mapserver:"MapServer",imageserver:"ImageServer",featureserver:"FeatureServer",sceneserver:"SceneServer",streamserver:"StreamServer",vectortileserver:"VectorTileServer"},l=Object.values(n),o=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/rest\\/services\\/(.+?)\\/(${l.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),u=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/([^\\/\\n]+)\\/(${l.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),d=/(.*?)\/(?:layers\/)?(\d+)\/?$/i;function h(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,a,l,d]=i,h=a.indexOf("/");return{title:f(-1!==h?a.slice(h+1):a),serverType:n[l.toLowerCase()],sublayer:null!=d&&""!==d?parseInt(d,10):null,url:{path:r}}}function p(e){const t=(0,s.mN)(e).path.match(d);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),a=c(i.path);let n;if((0,r.pC)(a))null!=a.sublayer&&null==e.layer.layerId&&(n=a.sublayer),t=a.url.path;else if(e.nonStandardUrlAllowed){const e=p(i.path);(0,r.pC)(e)&&(t=e.serviceUrl,n=e.sublayerId)}return{url:(0,s.Qj)(t),layerId:n}}function b(e,t,i,r,n){(0,a.w)(t,r,"url",n),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"),a=-1!==t.indexOf("/wmsserver");return i&&(r||s||a)}},15235:(e,t,i)=>{i.r(t),i.d(t,{default:()=>D});var r=i(43697),s=i(99880),a=i(20102),n=i(96674),l=i(22974),o=i(83379),u=i(70586),d=i(17452),h=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,d.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 a.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,d.YP)(e)&&(e=(0,d.PF)(e,t.itemUrl)),e.replace(/^\/+/,"").replace(/^(\.\/)?resources\//,""))}};(0,r._)([(0,h.Cb)()],S.prototype,"portalItem",void 0),(0,r._)([(0,h.Cb)({type:String,value:null})],S.prototype,"path",null),(0,r._)([(0,b.p)("path")],S.prototype,"_castPath",null),(0,r._)([(0,h.Cb)({type:String,readOnly:!0})],S.prototype,"url",null),(0,r._)([(0,h.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,h.Cb)()],F.prototype,"created",void 0),(0,r._)([(0,h.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,n.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,a=!1,n=!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?(a=t.indexOf("Table")>-1,n=t.indexOf("Route Layer")>-1,l=t.indexOf("Markup")>-1,o=-1!==t.indexOf("Spatiotemporal"),u=-1!==t.indexOf("UtilityNetwork"),i=o&&a?"spatiotemporaltable":a?"table":n?"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 a.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,d.HK)(t)?r.query={data:t}:r.query={url:(0,d.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 a.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 a.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,h.Cb)({type:["private","shared","org","public"]})],x.prototype,"access",void 0),(0,r._)([(0,h.Cb)()],x.prototype,"accessInformation",void 0),(0,r._)([(0,h.Cb)({type:String})],x.prototype,"apiKey",void 0),(0,r._)([(0,h.Cb)({json:{read:{source:"appProxies"}}})],x.prototype,"applicationProxies",void 0),(0,r._)([(0,h.Cb)()],x.prototype,"avgRating",void 0),(0,r._)([(0,h.Cb)()],x.prototype,"categories",void 0),(0,r._)([(0,h.Cb)({type:Date})],x.prototype,"created",void 0),(0,r._)([(0,h.Cb)()],x.prototype,"culture",void 0),(0,r._)([(0,h.Cb)()],x.prototype,"description",void 0),(0,r._)([(0,h.Cb)({readOnly:!0})],x.prototype,"displayName",null),(0,r._)([(0,h.Cb)({type:y.Z})],x.prototype,"extent",void 0),(0,r._)([(0,p.r)("extent")],x.prototype,"readExtent",null),(0,r._)([(0,h.Cb)()],x.prototype,"groupCategories",void 0),(0,r._)([(0,h.Cb)({readOnly:!0})],x.prototype,"iconUrl",null),(0,r._)([(0,h.Cb)()],x.prototype,"id",void 0),(0,r._)([(0,h.Cb)({readOnly:!0})],x.prototype,"isLayer",null),(0,r._)([(0,h.Cb)()],x.prototype,"itemControl",void 0),(0,r._)([(0,h.Cb)({readOnly:!0})],x.prototype,"itemUrl",null),(0,r._)([(0,h.Cb)()],x.prototype,"licenseInfo",void 0),(0,r._)([(0,h.Cb)({type:Date})],x.prototype,"modified",void 0),(0,r._)([(0,h.Cb)()],x.prototype,"name",void 0),(0,r._)([(0,h.Cb)()],x.prototype,"numComments",void 0),(0,r._)([(0,h.Cb)()],x.prototype,"numRatings",void 0),(0,r._)([(0,h.Cb)()],x.prototype,"numViews",void 0),(0,r._)([(0,h.Cb)()],x.prototype,"owner",void 0),(0,r._)([(0,h.Cb)()],x.prototype,"ownerFolder",void 0),(0,r._)([(0,h.Cb)({type:_.Z})],x.prototype,"portal",void 0),(0,r._)([(0,h.Cb)()],x.prototype,"screenshots",void 0),(0,r._)([(0,h.Cb)()],x.prototype,"size",void 0),(0,r._)([(0,h.Cb)()],x.prototype,"snippet",void 0),(0,r._)([(0,h.Cb)()],x.prototype,"sourceJSON",void 0),(0,r._)([(0,h.Cb)()],x.prototype,"tags",void 0),(0,r._)([(0,h.Cb)()],x.prototype,"thumbnail",void 0),(0,r._)([(0,h.Cb)({readOnly:!0})],x.prototype,"thumbnailUrl",null),(0,r._)([(0,h.Cb)()],x.prototype,"title",void 0),(0,r._)([(0,h.Cb)()],x.prototype,"type",void 0),(0,r._)([(0,h.Cb)()],x.prototype,"typeKeywords",void 0),(0,r._)([(0,h.Cb)()],x.prototype,"url",void 0),(0,r._)([(0,h.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:()=>a});var r=i(67900),s=i(68441);const a={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),a=i(74085),n=i(92604),l=i(70586),o=i(99282),u=i(51706);const d=n.Z.getLogger("esri.renderers.visualVariables.support.visualVariableUtils"),h=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 d.warn("The visualVariable should be an instance of esri.renderers.visualVariables.ColorVariable");const a="number"==typeof t,n=a?null:t,o=n&&n.attributes;let u=a?t:null;const h=s.field,{ipData:c,hasExpression:p}=s.cache;let f=s.cache.compiledFunc;if(!h&&!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 d.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),a=t.createExecContext(n,r);if(!f){const e=t.createSyntaxTree(s.valueExpression);f=t.createFunction(e),s.cache.compiledFunc=f}u=t.executeFunction(f,a)}else o&&(u=o[h]);const y=s.normalizationField,_=o?parseFloat(o[y]):void 0;if(null!=u&&(!y||a||!isNaN(_)&&0!==_)){isNaN(_)||a||(u/=_);const e=S(u,c);if(e){const t=e[0],a=e[1],n=t===a?s.stops[t].color:r.Z.blendColors(s.stops[t].color,s.stops[a].color,e[2],(0,l.pC)(i)?i.color:void 0);return new r.Z(n)}}}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 d.warn("The visualVariable should be an instance of esri.renderers.visualVariables.OpacityVariable");const s="number"==typeof t,a=s?null:t,n=a&&a.attributes;let o=s?t:null;const u=r.field,{ipData:h,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 d.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(a,s);if(!p){const e=t.createSyntaxTree(r.valueExpression);p=t.createFunction(e),r.cache.compiledFunc=p}o=t.executeFunction(p,n)}else n&&(o=n[u]);const f=r.normalizationField,y=n?parseFloat(n[f]):void 0;if(null!=o&&(!f||s||!isNaN(y)&&0!==y)){isNaN(y)||s||(o/=y);const e=S(o,h);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 d.warn("The visualVariable should be an instance of esri.renderers.visualVariables.RotationVariable");const s=r.axis||"heading",a="heading"===s&&"arithmetic"===r.rotationType?90:0,n="heading"===s&&"arithmetic"===r.rotationType?-1:1,o="number"==typeof t?null:t,u=o&&o.attributes,h=r.field,{hasExpression:c}=r.cache;let p=r.cache.compiledFunc,f=0;if(!h&&!c)return f;if(c){if((0,l.Wi)(i)||(0,l.Wi)(i.arcade))return void d.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(o,s);if(!p){const e=t.createSyntaxTree(r.valueExpression);p=t.createFunction(e),r.cache.compiledFunc=p}f=t.executeFunction(p,a)}else u&&(f=u[h]||0);return f="number"!=typeof f||isNaN(f)?null:a+n*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 d.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),a=m(t.minSize,i,r),n=m(t.maxSize,i,r),o=(0,l.pC)(r)?r.shape:void 0;if(e<=t.minDataValue)return a;if(e>=t.maxDataValue)return n;if("area"===t.scaleBy&&o){const e="circle"===o,t=e?c*(a/2)**2:a*a,i=t+s*((e?c*(n/2)**2:n*n)-t);return e?2*Math.sqrt(i/c):Math.sqrt(i)}return a+s*(n-a)}(e,t,i,r);case u.hL.Proportional:return function(e,t,i,r){const s=(0,l.pC)(r)?r.shape:void 0,a=e/t.minDataValue,n=m(t.minSize,i,r),o=m(t.maxSize,i,r);let u=null;return u="circle"===s?2*Math.sqrt(a*(n/2)**2):"square"===s||"diamond"===s||"image"===s?Math.sqrt(a*n**2):a*n,b(u,n,o)}(e,t,i,r);case u.hL.Stops:return function(e,t,i,r,s){const[a,n,l]=S(e,s);if(a===n)return m(t.stops[a].size,i,r);{const e=m(t.stops[a].size,i,r);return e+(m(t.stops[n].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],a=m(t.minSize,i,r),n=m(t.maxSize,i,r),{valueRepresentation:u}=t;let d=null;return d="area"===u?2*Math.sqrt(e/c)/s:"radius"===u||"distance"===u?2*e/s:e/s,b(d,a,n)}(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,a=s&&s.attributes;let n=r?t:null;const{isScaleDriven:o}=e.cache;let h=e.cache.compiledFunc;if(o){const t=(0,l.pC)(i)?i.scale:void 0,r=(0,l.pC)(i)?i.view:void 0;n=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 d.error("Use of arcade expressions requires an arcade context");const t={viewingMode:i.viewingMode,scale:i.scale,spatialReference:i.spatialReference},r=i.arcade.arcadeUtils,a=r.getViewInfo(t),o=r.createExecContext(s,a);if(!h){const t=r.createSyntaxTree(e.valueExpression);h=r.createFunction(t),e.cache.compiledFunc=h}n=r.executeFunction(h,o);break}case u.RY.Field:a&&(n=a[e.field]);break;case u.RY.Unknown:n=null}if(!(0,u.qh)(n))return null;if(r||!e.normalizationField)return n;const c=a?parseFloat(a[e.normalizationField]):null;return(0,u.qh)(c)&&0!==c?n/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 a=m(e.minSize,h,s),n=m(e.maxSize,h,s);if(null!=a||null!=n){if(a>n){const e=n;n=a,a=e}return{minSize:a,maxSize:n}}}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,a.Bg)(s.axis)}}return r}},28694:(e,t,i)=>{i.d(t,{p:()=>a});var r=i(70586),s=i(69285);function a(e,t,i){if(!i||!i.features||!i.hasZ)return;const a=(0,s.k)(i.geometryType,t,e.outSpatialReference);if(!(0,r.Wi)(a))for(const e of i.features)a(e.geometry)}},58333:(e,t,i)=>{i.d(t,{I4:()=>s,lF:()=>n,ET:()=>a,qP:()=>l,eG:()=>o,lj:()=>d,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]}},a={type:"esriSLS",style:"esriSLSSolid",width:.75,color:r},n={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},d={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}},89749:(e,t,i)=>{i.d(t,{t:()=>h});var r=i(43697),s=i(15923),a=i(61247),n=i(70586),l=i(17445),o=i(1654),u=i(5600),d=i(52011);let h=class extends s.Z{constructor(){super(...arguments),this.updating=!1,this.handleId=0,this.handles=new a.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.items,removed:[],moved:[],target:e}):void 0})],r),{remove:()=>this.handles.remove(r)}}addPromise(e){if((0,n.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})],h.prototype,"updating",void 0),h=(0,r._)([(0,d.j)("esri.views.support.WatchUpdatingTracking")],h);const c=-42;var p,f;(f=p||(p={}))[f.NONE=0]="NONE",f[f.SYNC=1]="SYNC",f[f.INIT=2]="INIT"}}]);
|