@arcgis/core 5.0.0-next.31 → 5.0.0-next.33
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/applications/SceneViewer/sceneViewerUtils.d.ts +3 -0
- package/applications/SceneViewer/sceneViewerUtils.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/1dd867fa7c58c06b79ea.js +1 -0
- package/assets/esri/core/workers/chunks/22d66d1c8dfccdbbcf30.js +1 -0
- package/assets/esri/core/workers/chunks/22f745539ca54d8cd30d.js +1 -0
- package/assets/esri/core/workers/chunks/2613e482450b57f2d4f5.js +1 -0
- package/assets/esri/core/workers/chunks/27bd88e1101873d4ce12.js +1 -0
- package/assets/esri/core/workers/chunks/{1dfca37f95f2b968aa54.js → 39d2b540738431adec98.js} +1 -1
- package/assets/esri/core/workers/chunks/{5f2cf73fb2944f82661d.js → 433d249c35c56bf15806.js} +34 -34
- package/assets/esri/core/workers/chunks/446f76356fc116204ec3.js +1 -0
- package/assets/esri/core/workers/chunks/44b6b7418cbf7f778bef.js +1 -0
- package/assets/esri/core/workers/chunks/4675ed3ca3e0104d00bf.js +1 -0
- package/assets/esri/core/workers/chunks/4df7cc3477bc46fc39af.js +1 -0
- package/assets/esri/core/workers/chunks/52ecbaa2d32692d6d8df.js +1 -0
- package/assets/esri/core/workers/chunks/{3777b41b4fa2f1418402.js → 55818fe7a7aa1e5c8bbd.js} +1 -1
- package/assets/esri/core/workers/chunks/{7e6fae3660e7a6a0fa16.js → 5f781ef46ce7c4048c2f.js} +1 -1
- package/assets/esri/core/workers/chunks/63933cbcb5c12df09715.js +1 -0
- package/assets/esri/core/workers/chunks/706423d801fa9cbf2e90.js +1 -0
- package/assets/esri/core/workers/chunks/{e6df4327ac1d9b65b80d.js → 71dd80231ea656a6380c.js} +1 -1
- package/assets/esri/core/workers/chunks/725819839434c59102f3.js +1 -0
- package/assets/esri/core/workers/chunks/72cebf18da5ec5eeb666.js +1 -0
- package/assets/esri/core/workers/chunks/{bd58c027408dc858f23c.js → 77b45957cfe42523c1c8.js} +1 -1
- package/assets/esri/core/workers/chunks/{b2fbb44e219232e61cbd.js → 794960ec36e11f4416c2.js} +1 -1
- package/assets/esri/core/workers/chunks/852de585a72d902344a6.js +1 -0
- package/assets/esri/core/workers/chunks/{25fd0884dd14973c89f5.js → 866a608d489bf56bc371.js} +1 -1
- package/assets/esri/core/workers/chunks/871dd5e1f016a04b8d98.js +1 -0
- package/assets/esri/core/workers/chunks/892c417f5130b003889d.js +1 -0
- package/assets/esri/core/workers/chunks/{0bfb7db0a151a5e85dd1.js → 8ad6595ad44c2d60c1ce.js} +1 -1
- package/assets/esri/core/workers/chunks/907083c427d7fb4354e9.js +1 -0
- package/assets/esri/core/workers/chunks/{11bb437437272d8f3e2c.js → 9252854b512237b6a0ef.js} +1 -1
- package/assets/esri/core/workers/chunks/{e615983fab688d515205.js → 944dfa9309da8f49a616.js} +1 -1
- package/assets/esri/core/workers/chunks/{f2f4e34247882eceb50d.js → a2cee5ac0d4df0108425.js} +3 -3
- package/assets/esri/core/workers/chunks/a4b7ba8aec109beb5b4d.js +1 -0
- package/assets/esri/core/workers/chunks/{3bacd904cd93c8013f6a.js → ae793d814cf32db9fbde.js} +1 -1
- package/assets/esri/core/workers/chunks/{e0b70652da4a7f672cfc.js → b21cf62652ca772108c8.js} +1 -1
- package/assets/esri/core/workers/chunks/c2596f48b37092dd566c.js +1 -0
- package/assets/esri/core/workers/chunks/c82a974c8448407885e6.js +1 -0
- package/assets/esri/core/workers/chunks/c9c2e00fed979c21e2f0.js +1 -0
- package/assets/esri/core/workers/chunks/{94005916d321c879bea1.js → cb500d673ca7ec1ef945.js} +1 -1
- package/assets/esri/core/workers/chunks/d239a4ef60e348cfb05a.js +1 -0
- package/assets/esri/core/workers/chunks/d6d03f22c91f528b97e5.js +1 -0
- package/assets/esri/core/workers/chunks/{4ab89c990a82c745c0fd.js → d764b6273974f4bca31b.js} +1 -1
- package/assets/esri/core/workers/chunks/d86e59da76eea888ba86.js +1 -0
- package/assets/esri/core/workers/chunks/da517b4b07d4d27ce94c.js +1 -0
- package/assets/esri/core/workers/chunks/dc3a4ad62bc041a4f899.js +1 -0
- package/assets/esri/core/workers/chunks/defc6b50df5018bd9e86.js +1 -0
- package/assets/esri/core/workers/chunks/df458ad51be27df3d79d.js +1 -0
- package/assets/esri/core/workers/chunks/{01b8e680befff83e7d3e.js → e093e745708f722bc1b9.js} +1 -1
- package/assets/esri/core/workers/chunks/e32fc0b2c6530d28ce85.js +1 -0
- package/assets/esri/core/workers/chunks/e3a994587f9b2e88db85.js +1 -0
- package/assets/esri/core/workers/chunks/ea5bf896acfcc3106bf5.js +1 -0
- package/assets/esri/core/workers/chunks/ed1dabed10ff9f4e0369.js +1 -0
- package/assets/esri/core/workers/chunks/{a74e6d505a55ed27f004.js → f11453f24c0b728669d2.js} +1 -1
- package/assets/esri/core/workers/chunks/f2ebd6471e1259a6eac0.js +1 -0
- package/assets/esri/core/workers/chunks/{14dc21fe66c7b98fb456.js → f3127bdf28a1d9b8db27.js} +1 -1
- package/assets/esri/core/workers/chunks/f3c232fc56a29d51196a.js +1 -0
- package/assets/esri/core/workers/chunks/fee942ef802a162e0248.js +1 -0
- package/assets/esri/themes/base/widgets/_Attribution.scss +8 -0
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/chunks/BlendLayers.glsl.js +1 -1
- package/chunks/Envelope.js +1 -1
- package/chunks/GaussianSplat.glsl.js +2 -2
- package/chunks/Geometry.js +1 -1
- package/chunks/GlowComposition.glsl.js +5 -5
- package/chunks/MultiPathImpl.js +1 -1
- package/chunks/Point2D.js +1 -1
- package/chunks/UnitFactory.js +1 -1
- package/config.js +1 -1
- package/core/deprecate.js +1 -1
- package/core/keyboard.js +5 -0
- package/geometry/SpatialReference.js +1 -1
- package/geometry/operators/support/apiConverter.js +1 -1
- package/geometry/operators/support/jsonConverter.js +1 -1
- package/geometry/support/spatialReferenceUtils.js +1 -1
- package/interfaces.d.ts +552 -3
- package/kernel.js +1 -1
- package/layers/IntegratedMesh3DTilesLayer.js +1 -1
- package/layers/catalog/CatalogDynamicGroupLayer.js +1 -1
- package/layers/graphics/data/AttributesBuilder.js +1 -1
- package/layers/graphics/data/QueryEngineResult.js +1 -1
- package/layers/mixins/ArcGISImageService.js +1 -1
- package/package.json +1 -1
- package/portal/schemas/definitions.js +1 -1
- package/rest/query/operations/query.js +1 -1
- package/rest/support/LocateSetting.d.ts +4 -0
- package/rest/support/LocateSetting.js +5 -0
- package/rest/support/LocateSettingBase.d.ts +4 -0
- package/rest/support/LocateSettingBase.js +5 -0
- package/rest/support/LocateSettingSource.d.ts +4 -0
- package/rest/support/LocateSettingSource.js +5 -0
- package/rest/support/LocateSettings.d.ts +4 -0
- package/rest/support/LocateSettings.js +5 -0
- package/rest/support/LocateSettingsOverrides.d.ts +4 -0
- package/rest/support/LocateSettingsOverrides.js +5 -0
- package/rest/support/RouteParameters.js +1 -1
- package/statistics/utils.js +1 -1
- package/support/revision.js +1 -1
- package/views/2d/engine/vectorTiles/decluttering/SymbolRepository.js +1 -1
- package/views/2d/engine/vectorTiles/shaders/sources/shaderRepository.js +1 -1
- package/views/3d/GroundView3D.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightRayIntersector.js +1 -1
- package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DFrustumVisibility.js +1 -1
- package/views/3d/layers/graphics/LabelDeconflictor.js +1 -1
- package/views/3d/layers/i3s/I3SIndex.js +1 -1
- package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
- package/views/3d/layers/i3s/LayerElevationProvider.js +1 -1
- package/views/3d/state/ConstraintsManager.js +1 -1
- package/views/3d/state/NearFarHeuristic.js +1 -1
- package/views/3d/support/Attribution3D.js +5 -0
- package/views/3d/support/CombinedElevationProvider.js +1 -1
- package/views/3d/support/ElevationRange.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatFadeHelper.js +5 -0
- package/views/3d/support/gaussianSplatting/GaussianSplatFadeTexture.js +5 -0
- package/views/3d/support/gaussianSplatting/GaussianSplatOrderTexture.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianTile.js +1 -1
- package/views/3d/terrain/ElevationBounds.js +1 -1
- package/views/3d/terrain/ElevationData.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/terrain/Tile.js +1 -1
- package/views/3d/terrain/TileBlendTechniqueConfiguration.js +1 -1
- package/views/3d/terrain/TileCompositor.js +1 -1
- package/views/3d/terrain/TileRenderer.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObject.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/ComponentTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentData.glsl.js +12 -12
- package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentDataConstants.js +5 -0
- package/views/3d/webgl-engine/core/renderPasses/AllRenderPasses.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/RenderPass.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBuffer.glsl.js +10 -13
- package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBufferFields.glsl.js +7 -1
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js +6 -6
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/TileBackground.glsl.js +4 -4
- package/views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatUnpacking.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/glow/GlowComposition.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/glow/GlowCompositionTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/glow/GlowPresets.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/glow/GlowRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/OrderIndependentTransparency.js +1 -1
- package/views/3d/webgl-engine/lib/TextureBackedBuffer/BufferManager.js +1 -1
- package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBuffer.js +1 -1
- package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferFields.js +1 -1
- package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferLayout.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/materials/DefaultLayouts.js +1 -1
- package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
- package/views/3d/webgl-engine/materials/WaterTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/CheckerBoardTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ColorMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/CompositingTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/HUDMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ImageMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/LineMarkerTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/NativeLineTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/PatternTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadedColorMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/sources/edgeRenderer/AdjustProjectedPosition.glsl.js +4 -4
- package/views/3d/webgl-engine/shaders/sources/edgeRenderer/EdgeUtil.glsl.js +24 -31
- package/views/Attribution.js +5 -0
- package/views/DOMContainer.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/View.js +1 -1
- package/views/draw/support/managers/DrawTooltipManager.js +5 -0
- package/views/interactive/tooltip/content/TooltipContentDynamic.js +5 -0
- package/views/interactive/tooltip/content/tooltipContentFactory.js +1 -1
- package/views/interactive/tooltip/fields/TooltipField.js +1 -1
- package/views/interactive/tooltip/infos/DynamicTooltipInfo.js +5 -0
- package/views/layers/LayerView.js +1 -1
- package/views/support/AttributionItem.d.ts +4 -0
- package/views/support/AttributionItem.js +5 -0
- package/views/support/GroundElevationSampler.js +1 -1
- package/views/support/LayerViewManager.js +1 -1
- package/views/support/attributionUtils.js +5 -0
- package/views/support/geodesicAreaMeasurementUtils.js +1 -1
- package/views/support/geodesicLengthMeasurementUtils.js +1 -1
- package/views/ui/2d/DefaultUI2D.js +1 -1
- package/views/ui/3d/DefaultUI3D.js +1 -1
- package/widgets/Attribution/AttributionViewModel.js +1 -1
- package/widgets/Attribution.js +1 -1
- package/widgets/ElevationProfile/ElevationProfileLine.js +1 -1
- package/widgets/ElevationProfile/ElevationProfileViewModel.js +1 -1
- package/widgets/ElevationProfile.js +1 -1
- package/widgets/OrientedImageryViewer/components/ImageViewerViewModel.js +1 -1
- package/widgets/PanoramicViewer/PanoramicVideoViewerViewModel.js +1 -1
- package/widgets/PanoramicViewer/PanoramicViewerViewModel.js +1 -1
- package/widgets/Widget.js +1 -1
- package/widgets/support/decorators/accessibleHandler.js +1 -1
- package/widgets/support/jsxWidgetSupport.js +1 -1
- package/widgets/support/widget.js +1 -1
- package/widgets/support/widgetUtils.js +1 -1
- package/assets/esri/core/workers/chunks/0a1df5a724fe253b3866.js +0 -1
- package/assets/esri/core/workers/chunks/155d74b9c0ef31dc2316.js +0 -1
- package/assets/esri/core/workers/chunks/25143b919e75d5d2da05.js +0 -1
- package/assets/esri/core/workers/chunks/2c8c48433b380da59831.js +0 -1
- package/assets/esri/core/workers/chunks/2d17ed5321ca05acb8e3.js +0 -1
- package/assets/esri/core/workers/chunks/31b5747a254d13acc58e.js +0 -1
- package/assets/esri/core/workers/chunks/3ac84e324d212815e252.js +0 -1
- package/assets/esri/core/workers/chunks/41a00c77e6f7ce61e476.js +0 -1
- package/assets/esri/core/workers/chunks/447b53a9280b2b19b7a6.js +0 -1
- package/assets/esri/core/workers/chunks/45729d006db6a569715f.js +0 -1
- package/assets/esri/core/workers/chunks/50cf3cbcad2be1c1e210.js +0 -1
- package/assets/esri/core/workers/chunks/565358ea8d1bdc4d1ebc.js +0 -1
- package/assets/esri/core/workers/chunks/592afe1a41bed3b0cc31.js +0 -1
- package/assets/esri/core/workers/chunks/5aeda8a1f2ccabfdf40f.js +0 -1
- package/assets/esri/core/workers/chunks/657d9e5145da1306ace8.js +0 -1
- package/assets/esri/core/workers/chunks/6ce7ca6bebdc61d8eada.js +0 -1
- package/assets/esri/core/workers/chunks/7f7a81ed8893ab649af7.js +0 -1
- package/assets/esri/core/workers/chunks/7ffef8a19166f6b564d8.js +0 -1
- package/assets/esri/core/workers/chunks/819781a209608dcdd678.js +0 -1
- package/assets/esri/core/workers/chunks/8d57e3a0e5687ce15557.js +0 -1
- package/assets/esri/core/workers/chunks/8e9a5d38da40702def80.js +0 -1
- package/assets/esri/core/workers/chunks/8fbda0b85731ac77e1d8.js +0 -1
- package/assets/esri/core/workers/chunks/98c32d10a2344cd7a50b.js +0 -1
- package/assets/esri/core/workers/chunks/aac313257a8b1ae75b75.js +0 -1
- package/assets/esri/core/workers/chunks/be06c8a58c217a17451b.js +0 -1
- package/assets/esri/core/workers/chunks/d56548a994753b08403c.js +0 -1
- package/assets/esri/core/workers/chunks/d5b464ff83ce29b51968.js +0 -1
- package/assets/esri/core/workers/chunks/d777d7cb8df3f21ac97e.js +0 -1
- package/assets/esri/core/workers/chunks/dd95e679618b7b21a7b1.js +0 -1
- package/assets/esri/core/workers/chunks/e08a1934d98e7324776d.js +0 -1
- package/assets/esri/core/workers/chunks/e5deb72df8b2505fd325.js +0 -1
- package/assets/esri/core/workers/chunks/e689a4849f5af3f2f641.js +0 -1
- package/assets/esri/core/workers/chunks/f259ad785ce3aa970792.js +0 -1
- package/assets/esri/core/workers/chunks/f4919950a9a3703d9da3.js +0 -1
- package/assets/esri/core/workers/chunks/f6ce485c082d0d640b01.js +0 -1
- package/assets/esri/core/workers/chunks/fd9ef4b8c969962cf72b.js +0 -1
- package/layers/support/attributionUtils.js +0 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3299],{83299:(e,t,n)=>{n.r(t),n.d(t,{fromGeometries:()=>me,fromGeometry:()=>le,fromGeometryToGXGeometry:()=>ce,fromSpatialReference:()=>de,getSpatialReference:()=>oe,toGeometry:()=>he});var r=n(55537),i=n(83661),a=n(39117),s=n(95213),o=n(88885),u=n(16930);function m(){if(-1===this.m_i)return this.m_i=0,{value:{m_token:1,m_value:null},done:!1};if(this.m_i<this.m_keys.length){const e=this.m_bReturnKey,t=Math.trunc(this.m_i);return this.m_bReturnKey=!this.m_bReturnKey,this.m_i+=.5,e?{value:{m_token:5,m_value:this.m_keys[t]},done:!1}:{value:{m_token:6,m_value:this.m_o[this.m_keys[t]]},done:!1}}return{value:{m_token:3,m_value:null},done:!0}}function l(){if(-1===this.m_i)return this.m_i=0,{value:{m_token:2,m_value:null},done:!1};if(this.m_i<this.m_a.length){const e={value:{m_token:6,m_value:this.m_a[this.m_i++]},done:!1};return this.m_strict||void 0===e.value.m_value&&(e.value.m_value=Number.NaN),e}return{value:{m_token:4,m_value:null},done:!0}}n(90293);class c{createJSONObjectIterator(e){return{m_iteratorType:"object",m_o:e,m_keys:this.m_options.strict?Object.keys(e):Object.keys(e).filter(t=>void 0!==e[t]),m_i:-1,m_bReturnKey:!0,next:m}}createJSONArrayIterator(e){return{m_iteratorType:"array",m_strict:this.m_options.strict,m_i:-1,m_a:e,next:l}}constructor(e,t){this.m_currentToken=0,this.m_options=t?{...t}:{strict:!0};const n=e;this.m_iteratorStack=[n instanceof Array?this.createJSONArrayIterator(n):this.createJSONObjectIterator(n)],this.m_nextFlatToken={m_value:null,m_token:0}}nextToken(){if(0===this.m_iteratorStack.length)return this.m_currentToken=0;switch(this.m_nextFlatToken=this.m_iteratorStack.at(-1).next().value,this.m_currentValue=void 0,this.m_nextFlatToken.m_token){case 1:return this.m_currentToken=1;case 3:return this.m_iteratorStack.pop(),this.m_currentToken=3;case 2:return this.m_currentToken=2;case 4:return this.m_iteratorStack.pop(),this.m_currentToken=4;case 5:return this.m_currentValue=this.m_nextFlatToken.m_value,this.m_currentToken=5;case 6:if(this.m_nextFlatToken.m_value instanceof Array)return this.m_iteratorStack.push(this.createJSONArrayIterator(this.m_nextFlatToken.m_value)),this.nextToken();if(this.m_nextFlatToken.m_value instanceof Object)return this.m_iteratorStack.push(this.createJSONObjectIterator(this.m_nextFlatToken.m_value)),this.nextToken();if("number"==typeof this.m_nextFlatToken.m_value)return this.m_currentValue=this.m_nextFlatToken.m_value,Number.isSafeInteger(this.m_currentValue)&&this.m_currentValue>=(0,i.aJ)()&&this.m_currentValue<=(0,i.i)()?this.m_currentToken=8:this.m_currentToken=7;if("string"==typeof this.m_nextFlatToken.m_value)return this.m_currentValue=this.m_nextFlatToken.m_value,this.m_currentToken=6;if("boolean"==typeof this.m_nextFlatToken.m_value)return this.m_currentValue=this.m_nextFlatToken.m_value,this.m_currentToken=this.m_nextFlatToken.m_value?11:12;if("object"==typeof this.m_nextFlatToken.m_value)return this.m_currentValue=null,this.m_currentToken=10;(0,r.d)("unrecognized json element type")}return(0,r.d)("unrecognized json element type"),0}currentToken(){return this.m_currentToken}skipChildren(){if(0!==this.m_iteratorStack.length)switch(this.m_currentValue=void 0,this.m_nextFlatToken.m_token){case 1:return this.m_iteratorStack.pop(),this.m_nextFlatToken.m_token=3,void(this.m_currentToken=3);case 2:return this.m_iteratorStack.pop(),this.m_nextFlatToken.m_token=4,void(this.m_currentToken=4)}}currentString(){return 6!==this.m_currentToken&&5!==this.m_currentToken&&(0,r.a)("invalid token"),this.m_currentValue}currentDoubleValue(){return 7!==this.m_currentToken&&8!==this.m_currentToken&&(0,r.a)("invalid token"),this.m_currentValue}currentInt32Value(){return 8!==this.m_currentToken&&(0,r.a)("invalid token"),this.m_currentValue}currentInt64Value(){return(0,r.g)(0),0n}currentBoolValue(){return 12!==this.m_currentToken&&11!==this.m_currentToken&&(0,r.a)("invalid token"),this.m_currentValue}isError(){return 0}}class d{constructor(e){return this.m_buffer=null,this.m_view=null,this.m_sz=0,this.m_offset=0,this.m_bOwnsBuffer=!0,this.m_bLittleEndian=!0,this.m_element=new ArrayBuffer(8),this.m_elementBytes=new Uint8Array(this.m_element),this.m_elementView=new DataView(this.m_element),this.m_elementDouble=new Float64Array(this.m_element),this.m_elementFloat=new Float32Array(this.m_element),this.m_elementInt64=new BigInt64Array(this.m_element),this.m_elementInt32=new Int32Array(this.m_element),this.m_elementInt16=new Int16Array(this.m_element),void 0!==e.sz?(this.m_sz=e.sz,e.buffer?(this.m_sz<0&&(0,r.q)("size out of range"),this.m_buffer=e.buffer,this.m_offset=void 0!==e.offset?e.offset:0,this.m_view=void 0!==e.offset?new DataView(e.buffer,e.offset,e.sz):new DataView(this.m_buffer),this.m_bOwnsBuffer=!1,void(this.m_bLittleEndian=!0)):(this.m_sz<0&&(0,r.q)("size out of range"),void(this.m_sz>0&&(this.m_buffer=new ArrayBuffer(this.m_sz),this.m_view=new DataView(this.m_buffer))))):e.move?(this.m_sz=e.move.m_sz,this.m_buffer=e.move.m_buffer,this.m_view=e.move.m_view,this.m_bOwnsBuffer=e.move.m_bOwnsBuffer,this.m_bLittleEndian=e.move.m_bLittleEndian,e.move.m_buffer=null,e.move.m_view=null,e.move.m_sz=0,void(e.move.m_bOwnsBuffer=!0)):void(0,r.d)("unrecognized constructor options")}swapBytesDouble(){this.doSwap()&&(this.m_elementDouble[0]=this.m_elementBytes[0]<<56|this.m_elementBytes[1]<<48|this.m_elementBytes[2]<<40|this.m_elementBytes[3]<<32|this.m_elementBytes[4]<<24|this.m_elementBytes[5]<<16|this.m_elementBytes[6]<<8|this.m_elementBytes[7])}swapBytesInt32(){this.doSwap()&&(this.m_elementInt32[0]=this.m_elementBytes[0]<<24|this.m_elementBytes[1]<<16|this.m_elementBytes[2]<<8|this.m_elementBytes[3])}getOffset(){return this.m_offset}assignMove(e){return this===e||(this.clear(),this.m_sz=e.m_sz,this.m_buffer=e.m_buffer,this.m_view=e.m_view,this.m_bOwnsBuffer=e.m_bOwnsBuffer,this.m_bLittleEndian=e.m_bLittleEndian,e.m_buffer=null,e.m_sz=0,e.m_bOwnsBuffer=!0),this}doSwap(){return this.m_bLittleEndian!==(1===d.getNativeByteOrder())}setNativeByteOrder(){this.m_bLittleEndian=1===d.getNativeByteOrder()}setOrder(e){this.m_bLittleEndian=1===e}getOrder(){return this.m_bLittleEndian?1:0}getView(){return this.m_view||(0,r.p)("buffer not defined"),this.m_view}static getNativeByteOrder(){return 1}clear(){this.m_buffer=null,this.m_sz=0,this.m_bOwnsBuffer=!0}size(){return this.m_sz}readDouble(e){return this.doSwap()?(this.m_elementDouble[0]=this.m_view.getFloat64(e,this.m_bLittleEndian),this.swapBytesDouble(),this.m_elementDouble[0]):this.m_view.getFloat64(e,this.m_bLittleEndian)}writeDouble(e,t){this.m_elementDouble[0]=t,this.swapBytesDouble(),this.m_view.setFloat64(e,this.m_elementDouble[0],this.m_bLittleEndian)}readInt32(e){return this.doSwap()?(this.m_elementInt32[0]=this.m_view.getInt32(e,this.m_bLittleEndian),this.swapBytesInt32(),this.m_elementInt32[0]):this.m_view.getInt32(e,this.m_bLittleEndian)}writeInt32(e,t){this.m_elementInt32[0]=t,this.swapBytesInt32(),this.m_view.setInt32(e,this.m_elementInt32[0],this.m_bLittleEndian)}getPtr(){return this.m_buffer}setSizeNoRealloc(e){(0,r.g)(e>=0&&e<=this.m_sz),this.m_sz=e}}function h(e){let t=!1;for(;3!==e.nextToken();){const n=e.currentString();e.nextToken(),"uwkid"===n?t||(t=!0,8===e.currentToken()&&e.currentInt32Value()):e.skipChildren()}return null}function _(e){let t=!1,n=!1,r=!1,i=!1,s=!1,o=!1,u=!1,m=!1,l=!1,c=!1,d=!1,_=!1,f=!1,p=!1,k=!1,b=!1,y=!1,g=-1,N=-1,T=-1,v=-1,x=0,A=0,S=0,w=0,C=0,D=0,F=0,j=0,O=0,I=0,z="",E="",G=null;for(;3!==e.nextToken();){const a=e.currentString();e.nextToken(),"wkid"===a?t||(t=!0,8===e.currentToken()&&(g=e.currentInt32Value())):"latestWkid"===a?n||(n=!0,8===e.currentToken()&&(N=e.currentInt32Value())):"wkt"===a?s||(s=!0,6===e.currentToken()&&(z=e.currentString())):"wkt2"===a?s||6===e.currentToken()&&(E=e.currentString()):"vcsWkid"===a?r||(r=!0,8===e.currentToken()&&(T=e.currentInt32Value())):"latestVcsWkid"===a?i||(i=!0,8===e.currentToken()&&(v=e.currentInt32Value())):"xyTolerance"===a?u||(u=!0,o=!0,x=e.currentDoubleValue()):"zTolerance"===a?m||(m=!0,o=!0,A=e.currentDoubleValue()):"mTolerance"===a?l||(l=!0,o=!0,S=e.currentDoubleValue()):"falseX"===a?c||(c=!0,o=!0,F=e.currentDoubleValue()):"falseY"===a?d||(d=!0,o=!0,j=e.currentDoubleValue()):"falseZ"===a?_||(_=!0,o=!0,O=e.currentDoubleValue()):"falseM"===a?f||(f=!0,o=!0,I=e.currentDoubleValue()):"xyUnits"===a?p||(p=!0,o=!0,w=e.currentDoubleValue()):"zUnits"===a?k||(k=!0,o=!0,C=e.currentDoubleValue()):"mUnits"===a?b||(b=!0,o=!0,D=e.currentDoubleValue()):"unit"===a?y||(y=!0,G=h(e)):e.skipChildren()}v<=0&&T>0&&(v=T),T<=0&&v>0&&(T=v);let P=null,B=!0;if(0!==z.length&&(B=!1,(0,a.q)(z)&&(P=(0,a.b)(z))),P||0===E.length||(B=!1,(0,a.q)(E)&&(P=(0,a.b)(E))),!P&&N>0&&(B=!1,(0,a.p)(N)&&(v<=0||(0,a.aX)())&&(P=(0,a.c)(N,v))),!P&&g>0&&(B=!1,(0,a.p)(g)&&(T<=0||(0,a.aX)())&&(P=(0,a.c)(g,T))),B&&(P=(0,a.e)(G)),o&&P){const e=new a.a;P.queryPrecisionDescriptorWithoutFalseXY(e),u&&e.setTolerance(0,x),m&&e.setTolerance(1,A),l&&e.setTolerance(2,S),p&&c&&d&&e.setGridParams(F,j,w),k&&_&&e.setZParams(O,C),b&&f&&e.setMParams(I,D),P=(0,a.f)(P,e)}return P}function f(e,t,n,a){2!==a.currentToken()&&(0,r.a)("failed to parse multipath: array of array of vertices is expected");const u=e?new o.a:new o.P,m=u,l=(0,s.$)(0),c=(0,s.a1)(2,0),d=(0,s.a0)(0);let h=null,_=null,f=null,p=null,k=null,y=0,v=0,x=0;const A=new o.S,S=i.P.getNAN();let w=0,C=0;const D=e?1:0;for(;4!==a.nextToken();){2!==a.currentToken()&&(0,r.a)("failed to parse multipath: ring/path array is expected");let n=2,u=0,F=!0;const j=4;let O=0,I=0;const z=i.P.getNAN(),E=(0,i.d)(j,Number.NaN),G=(0,i.d)(j,Number.NaN);let P=!1;for(a.nextToken();4!==a.currentToken();){if(t&&1===a.currentToken())F&&(0,r.a)("failed to parse multipath: starting vertex array is expected"),f||(f=(0,s.a0)(w-1,1),p=(0,s.$)(w-1,-1),k=(0,s.a1)(0)),P=!0,n=1,({segFlag:x,toPointSz:O}=T(A,E,S,a));else{for(P=!1,2!==a.currentToken()&&(0,r.a)("failed to parse multipath: array is expected, rings/paths vertices consist of arrays of coordinates"),O=0;4!==a.nextToken();)O===j&&(0,r.a)("failed to parse multipath: each vertex array has to have at most 4 elements"),E[O++]=b(a);O<2&&(0,r.a)("failed to parse multipath: each vertex array has to have at least 2 elements"),(0,s.a5)(E[0],E[1])||(0,r.a)("failed to parse multipath: x and y must be finite")}a.nextToken();do{if(c.size()===2*w&&c.resize(g(w)),c.writePoint2D(2*w,z.setCoords(E[0],E[1])),h&&h.size()===w&&h.resize(N(w)),O>2?(h||(h=(0,s.a1)(w+1,Number.NaN)),h.write(w,E[2])):h&&h.write(w,Number.NaN),_&&_.size()===w&&_.resize(N(w)),O>3?(_||(_=(0,s.a1)(w+1,Number.NaN)),_.write(w,E[3])):_&&_.write(w,Number.NaN),F)C++,l.add(w),d.add(D),F=!1,I=O,(0,i.b)(G,E,0,0,I);else if(null!==f)if(P){const e=(0,o.a9)(x),t=k.size();k.resize(t+e),f.add(x),p.add(y),A.get().writeInBufferStream(k,y),y+=e,m.incCurveType(x,1),v++}else f.add(1),p.add(-1);w++,u++,S.setCoords(E[0],E[1])}while(u<n&&4===a.currentToken())}0!==u&&(e&&u>n&&O===I&&0===(0,i.aK)(E,G,O)?(w--,u--):null!==f&&(f.add(1),p.add(-1)))}return w&&(l.resize(C),d.resize(C),w>0&&(l.add(w),d.add(0)),m.setAttributeStreamRef(0,c),m.setPathFlagsStreamRef(d),m.setPathStreamRef(l),null!==f&&(m.updateCurveCounter(v),m.setSegmentData(p,k,f,y)),m.notifyModifiedFlags(65535)),{geometry:u,as:h,bs:_}}function p(e,t){2!==t.currentToken()&&(0,r.a)("failed to parse multipoint: array of vertices is expected");let n=0;const a=new o.M,u=(0,s.a1)(2,0);let m=0;const l=(0,i.d)(4,Number.NaN),c=new i.P;let d=null,h=null;for(;4!==t.nextToken();){for(2!==t.currentToken()&&(0,r.a)("failed to parse multipoint: array is expected, multipoint vertices consist of arrays of cooridinates"),m=0;4!==t.nextToken();)4===m&&(0,r.a)("failed to parse multipoint: each vertex array has to have at most 4 elements"),l[m++]=b(t);m<2&&(0,r.a)("failed to parse multipoint: each vertex array has to have at least 2 elements"),(0,s.a5)(l[0],l[1])||(0,r.a)("failed to parse multipoint: x and y must be finite"),u.size()===2*n&&u.resize(g(n)),u.writePoint2D(2*n,c.setCoords(l[0],l[1])),d&&d.size()===n&&d.resize(N(n)),m>2?(d||(d=(0,s.a1)(n+1,Number.NaN)),d.write(n,l[2])):d&&d.write(n,Number.NaN),h&&h.size()===n&&h.resize(N(n)),m>3?(h||(h=(0,s.a1)(n+1,Number.NaN)),h.write(n,l[3])):h&&h.write(n,Number.NaN),n++}if(n){const e=a.getImpl();e.setAttributeStreamRef(0,u),e.resizeNoInit(n),e.notifyModifiedFlags(65535)}return{geometry:a,as:d,bs:h}}function k(e,t){2!==t.currentToken()&&(0,r.a)("failed to parse array of IDs: array of array of integers is expected");const n=(0,s.a6)(2,0);let i=0,a=-1;for(;4!==t.nextToken();){const e=i;n.size()===i&&n.resize(N(i)),i++;let s=0;for(-1===a?a=2===t.currentToken()?1:0:1===a&&2!==t.currentToken()&&(0,r.a)("failed to parse array of IDs: array of array of integers is expected"),0===a&&(n.size()===i&&n.resize(N(i)),n.write(i,y(t)),s++,i++);4!==t.nextToken();)n.size()===i&&n.resize(N(i)),n.write(i,y(t)),s++,i++;if(n.write(e,s),0===a)break}return n.resize(i),n}function b(e){const t=e.currentToken();if(10===t||6===t&&"NaN"===e.currentString())return Number.NaN;{const t=e.currentDoubleValue();return Number.isNaN(t)?Number.NaN:t}}function y(e){return e.currentInt32Value()}function g(e){let t=2*Math.trunc(3*(e+1)/2);return t<8?t=8:t<32&&(t=32),t}function N(e){let t=Math.trunc(3*(e+1)/2);return t<4?t=4:t<16&&(t=16),t}function T(e,t,n,a,s){const u={segFlag:0,toPointSz:0};let m=a.currentToken();m=a.nextToken();const l=a.currentString(),c=l[0];for((1!==l.length||"a"!==c&&"b"!==c&&"c"!==c&&"n"!==c&&"q"!==c)&&(0,r.a)('failed to parse curve: expecting "a", "b", "n", "q", or "c"'),m=a.nextToken(),2!==m&&(0,r.a)("failed to parse curve: start array is expected for curve parameters"),m=a.nextToken(),2!==m&&(0,r.a)("failed to parse curve: start array is expected for to point"),u.toPointSz=0;4!==a.nextToken();)4===u.toPointSz&&(0,r.a)("failed to parse curve: vertex array cannot have more than 4 elements"),t[u.toPointSz++]=b(a);u.toPointSz<2&&(0,r.a)("failed to parse curve: vertex array must have at least 2 elements");const h=i.P.construct(t[0],t[1]),_=i.P.getNAN();let f=-1,p=-1,k=!1,y=Number.NaN,g=Number.NaN,N=Number.NaN;const T=[i.P.getNAN(),i.P.getNAN(),i.P.getNAN()],x=i.P.getNAN();if("a"===c){m=a.nextToken(),2!==m&&(0,r.a)("failed to parse curve: start array is expected for center point"),m=a.nextToken();const e=b(a);m=a.nextToken();const t=b(a);m=a.nextToken(),4!==m&&(0,r.a)("failed to parse curve: end array is expected for center point"),_.setCoords(e,t),m=a.nextToken(),f=a.currentInt32Value(),m=a.nextToken(),p=a.currentInt32Value(),m=a.nextToken(),4!==m?(k=!1,y=b(a),m=a.nextToken(),g=b(a),m=a.nextToken(),N=b(a),m=a.nextToken(),4!==m&&(0,r.a)("failed to parse curve: end array is expected for curve parameters")):k=!0,u.segFlag=4}else if("b"===c){for(let e=0;e<2;e++){m=a.nextToken(),2!==m&&(0,r.a)("failed to parse curve: start array is expected for control point"),m=a.nextToken();const t=b(a);m=a.nextToken();const n=b(a);m=a.nextToken(),4!==m&&(0,r.a)("failed to parse curve: end array is expected for control point"),T[e].setCoords(t,n)}m=a.nextToken(),4!==m&&(0,r.a)("failed to parse curve: end array is expected for curve parameters"),u.segFlag=2}else if("n"===c){{m=a.nextToken(),2!==m&&(0,r.a)("failed to parse curve: start array is expected for control point"),m=a.nextToken();const e=b(a);m=a.nextToken();const t=b(a);m=a.nextToken(),4!==m&&(0,r.a)("failed to parse curve: end array is expected for control point"),T[0].setCoords(e,t)}m=a.nextToken();const e=b(a);m=a.nextToken();const t=b(a);m=a.nextToken();const n=b(a);T[1].setCoords(e,t),T[2].setCoords(n,n),m=a.nextToken(),4!==m&&(0,r.a)("failed to parse curve: end array is expected for curve parameters"),u.segFlag=8}else if("q"===c){for(let e=0;e<1;e++){m=a.nextToken(),2!==m&&(0,r.a)("failed to parse curve: start array is expected for control point"),m=a.nextToken();const t=b(a);m=a.nextToken();const n=b(a);m=a.nextToken(),4!==m&&(0,r.a)("failed to parse curve: end array is expected for control point"),T[e].setCoords(t,n)}m=a.nextToken(),4!==m&&(0,r.a)("failed to parse curve: end array is expected for curve parameters"),u.segFlag=16}else{m=a.nextToken(),2!==m&&(0,r.a)("failed to parse curve: start array is expected for interior point"),m=a.nextToken();const e=b(a);m=a.nextToken();const t=b(a);m=a.nextToken(),4!==m&&(0,r.a)("failed to parse curve: end array is expected for interior point"),x.setCoords(e,t),m=a.nextToken(),4!==m&&(0,r.a)("failed to parse curve: end array is expected for curve parameters"),u.segFlag=4}if(m=a.nextToken(),3!==m&&(0,r.a)("failed to parse curve: end object is expected for curve"),"a"===c)if(e.createEllipticArc(),k){const t=!0;v(e.get(),n,h,_,t,f,p)}else!function(e,t,n,r,i,a,s,u,m){e.dropAllAttributes();const l=new ArrayBuffer(44),c=new d({sz:44,buffer:l});let h=0;c.writeDouble(h,r.x),h+=8,c.writeDouble(h,r.y),h+=8,c.writeDouble(h,s),h+=8,c.writeDouble(h,u),h+=8,c.writeDouble(h,m),h+=8;let _=0;a||(_|=2048),i&&(_|=4096),c.writeInt32(h,_),h+=4,function(e,t,n,r){e.m_bits=0,e.m_center.x=r.readDouble(0),e.m_center.y=r.readDouble(8),e.m_rotation=r.readDouble(16),e.m_semiMajorAxis=r.readDouble(24),e.m_minorMajorRatio=r.readDouble(32),e.m_XStart=t.x,e.m_YStart=t.y,e.m_XEnd=n.x,e.m_YEnd=n.y;const i=r.readInt32(40);if(1&i)return!1;let a=!!(64&i),s=!!(128&i);const u=!!(2048&i),m=!!(4096&i);!(512&i)&&!(1024&i)||s||(a=!0),s&&!t.equals(n)?(s=!1,a=!0):a&&t.equals(n)&&(s=!0,a=!1),s?(e.m_center.assign(t),e.m_startAngle=e.m_center.x,e.m_sweepAngle=e.m_center.y,(0,o.a8)(e,Number.NaN,u,m),e.m_semiMajorAxis=0,e.m_interior.setCoordsPoint2D(t)):a?(e.m_center.setNAN(),e.m_semiMajorAxis=1,e.m_minorMajorRatio=0,e.m_center.setNAN(),e.m_sweepAngle=0,e.m_startAngle=0,(0,o.a6)(e),e.queryCoord2D(.5,e.m_interior)):e.constructEllipticArcEndPointsCenter(t,n,e.m_semiMajorAxis,e.m_minorMajorRatio,e.m_rotation,!m,u,e.m_center),e.setProjectionBehavior(1),(0,o.a6)(e)}(e,t,n,c)}(e.get(),n,h,_,f,p,y,g,N);else if("b"===c)e.createCubicBezier(),function(e,t,n,a){e.dropAllAttributes();const s=new ArrayBuffer(32),o=new d({sz:32,buffer:s});let u=0;o.writeDouble(u,a[0].x),u+=8,o.writeDouble(u,a[0].y),u+=8,o.writeDouble(u,a[1].x),u+=8,o.writeDouble(u,a[1].y),u+=8,function(e,t,n,a){(0,r.g)(32<=a.size()),e.m_cp=(0,i.m)(i.P,2),e.m_cp[0].x=a.readDouble(0),e.m_cp[0].y=a.readDouble(8),e.m_cp[1].x=a.readDouble(16),e.m_cp[1].y=a.readDouble(24),e.m_XStart=t.x,e.m_YStart=t.y,e.m_XEnd=n.x,e.m_YEnd=n.y}(e,t,n,o)}(e.get(),n,h,T);else if("n"===c)e.createQuadraticRationalBezier(),function(e,t,n,r,i,a,s){e.dropAllAttributes();const o=new ArrayBuffer(40),u=new d({sz:40,buffer:o});let m=0;u.writeDouble(m,r.x),m+=8,u.writeDouble(m,r.y),m+=8,u.writeDouble(m,i),m+=8,u.writeDouble(m,a),m+=8,u.writeDouble(m,s),m+=8,function(e,t,n,r){e.m_cp.x=r.readDouble(0),e.m_cp.y=r.readDouble(8),e.m_weights[0]=r.readDouble(16),e.m_weights[1]=r.readDouble(24),e.m_weights[2]=r.readDouble(32),e.m_XStart=t.x,e.m_YStart=t.y,e.m_XEnd=n.x,e.m_YEnd=n.y}(e,t,n,u)}(e.get(),n,h,T[0],T[1].x,T[1].y,T[2].x);else if("q"===c)e.createQuadraticBezier(),e.get().construct(n,T[0],h);else{e.createEllipticArc();const t=!1;v(e.get(),n,h,x,t,-1,-1)}return u}function v(e,t,n,a,s,u,m){e.dropAllAttributes();const l=new ArrayBuffer(20),c=new d({sz:20,buffer:l});let h=0;c.writeDouble(h,a.x),h+=8,c.writeDouble(h,a.y),h+=8;let _=0;s?(m||(_|=8),u&&(_|=16)):_|=128,c.writeInt32(h,_),h+=4,function(e,t,n,a){0>=a.size()&&(0,r.q)("Byte_buffer out of range access"),e.m_bits=0,e.m_rotation=0,e.m_cosr=1,e.m_sinr=0,e.setStartXY(t),e.setEndXY(n);const s=i.P.getNAN();s.x=a.readDouble(0),s.y=a.readDouble(8);const u=a.readInt32(16);if(1&u)return e.m_semiMajorAxis=0,e.m_minorMajorRatio=1,e.m_interior.assign(s),e.m_center.setNAN(),e.m_sweepAngle=0,e.m_startAngle=0,(0,o.a6)(e),!1;let m=!!(64&u);const l=!!(128&u);let c=!!(32&u);const d=!!(8&u),h=!!(16&u),_=t.equals(n);m&&!_&&(m=!1,c=!0),c&&_&&(m=!0,c=!1,s.setCoords(0,0)),m||(l?c?(e.m_semiMajorAxis=1,e.m_minorMajorRatio=0,e.m_interior.assign(s),e.m_center.setNAN(),e.m_sweepAngle=0,e.m_startAngle=0):(e.constructCircularArcThreePoint(t,n,s),_&&d===e.isClockwise()&&e.reverse()):c?(e.m_semiMajorAxis=1,e.m_minorMajorRatio=0,e.m_center.setNAN(),e.m_sweepAngle=0,e.m_startAngle=0,(0,o.a6)(e),e.queryCoord2D(.5,e.m_interior)):(0,o.a7)(e,t,n,s,d,h)),m&&(e.m_center.assign(t),e.m_startAngle=s.x,e.m_sweepAngle=s.y,(0,o.a8)(e,Number.NaN,d,h),e.m_semiMajorAxis=0,e.m_minorMajorRatio=1,e.m_interior.setCoordsPoint2D(t)),e.setProjectionBehavior(0),(0,o.a6)(e)}(e,t,n,c)}function x(e,t,n,i,a){const s=e.getGeometryType();if(s===r.G.enumEllipticArc)return function(e,t,n,i,a){(0,r.g)(!(0,o.a5)(e));const s=e.getEndXY(),u=e.hasAttribute(1)&&!t,m=e.hasAttribute(2)&&!n;let l=Number.NaN,c=Number.NaN;if(u&&(l=e.getEndAttributeAsDbl(1,0)),m&&(c=e.getEndAttributeAsDbl(2,0)),e.isDegenerateToLine()||e.isDegenerate(0))return S(u,m,s.x,s.y,l,c,i,a),!0;const d=0===e.projectionBehavior(),h=!!d&&e.isClosed();if(d&&!h)a.startObject(),a.addFieldName("c"),a.startArray(),S(u,m,s.x,s.y,l,c,i,a),w(e.m_interior.x,e.m_interior.y,17,a),a.endArray(),a.endObject();else if(d){a.startObject(),a.addFieldName("a"),a.startArray(),S(u,m,s.x,s.y,l,c,i,a);const t=0,n=0;w(e.m_center.x+t,e.m_center.y+n,17,a);const r=!e.isMajor();a.addInt32(r?1:0);const o=e.isClockwise();a.addInt32(o?1:0),a.endArray(),a.endObject()}else{a.startObject(),a.addFieldName("a"),a.startArray(),S(u,m,s.x,s.y,l,c,i,a);const t=e;w(t.m_center.x,t.m_center.y,17,a);const n=!t.isMajor();a.addInt32(n?1:0);const r=t.isClockwise();a.addInt32(r?1:0),a.addDouble(t.m_rotation,17),a.addDouble(t.m_semiMajorAxis,17),a.addDouble(t.m_minorMajorRatio,17),a.endArray(),a.endObject()}return!1}(e,t,n,i,a);if(s===r.G.enumBezier)return A(e,t,n,i,a);if(s===r.G.enumRationalBezier2)return function(e,t,n,r,i){const a=e.getEndXY(),s=e.hasAttribute(1)&&!t,o=e.hasAttribute(2)&&!n;let u=Number.NaN,m=Number.NaN;s&&(u=e.getEndAttributeAsDbl(1,0)),o&&(m=e.getEndAttributeAsDbl(2,0)),i.startObject(),i.addFieldName("n"),i.startArray(),S(s,o,a.x,a.y,u,m,r,i),w(e.m_cp.x,e.m_cp.y,r,i);const l=r;return i.addDouble(e.m_weights[0],l),i.addDouble(e.m_weights[1],l),i.addDouble(e.m_weights[2],l),i.endArray(),i.endObject(),!1}(e,t,n,i,a);if(s===r.G.enumBezier2){const r=new o.J;return r.constructFromQuadraticSegment(e),A(r,t,n,i,a)}(0,r.t)("")}function A(e,t,n,r,i){const a=e.getEndXY(),s=e.hasAttribute(1)&&!t,o=e.hasAttribute(2)&&!n;let u=Number.NaN,m=Number.NaN;return s&&(u=e.getEndAttributeAsDbl(1,0)),o&&(m=e.getEndAttributeAsDbl(2,0)),i.startObject(),i.addFieldName("b"),i.startArray(),S(s,o,a.x,a.y,u,m,r,i),w(e.m_cp[0].x,e.m_cp[0].y,r,i),w(e.m_cp[1].x,e.m_cp[1].y,r,i),i.endArray(),i.endObject(),!1}function S(e,t,n,r,i,a,s,o){o.startArray(),o.addDouble(n,s),o.addDouble(r,s),e&&o.addDouble(i,s),t&&o.addDouble(a,s),o.endArray()}function w(e,t,n,r){r.startArray(),r.addDouble(e,n),r.addDouble(t,n),r.endArray()}function C(e,t,n,i){const a=n.getImpl(),u=!!(2&t),m=!!(4&t),l=!!(8&t),c=a.hasAttribute(1)&&!u,d=a.hasAttribute(2)&&!m,h=a.hasAttribute(3)&&!l,_=a.hasNonLinearSegments();c&&(i.addFieldName("hasZ"),i.addBool(!0)),d&&(i.addFieldName("hasM"),i.addBool(!0)),e?_?i.addFieldName("curveRings"):i.addFieldName("rings"):_?i.addFieldName("curvePaths"):i.addFieldName("paths");let f=null;const p=[];if(n.isEmpty())i.startArray(),i.endArray();else{const e=17-(31&t>>13);i.startArray();const l=n.getPathCount();let k=0;const b=a.getAttributeStreamRef(0);let y=null,g=null,N=null;const T=new o.S;let v=null,A=null,S=null;_&&(v=a.getSegmentFlagsStreamRef(),A=a.getSegmentIndexStreamRef(),S=a.getSegmentDataStreamRef()),c&&(y=a.getAttributeStreamRef(1)),d&&(g=a.getAttributeStreamRef(2)),h&&(N=a.getAttributeStreamRef(3),f=(0,s.Y)(3,0));for(let t=0;t<l;t++){i.startArray(),h&&p.push(0);const a=n.getPathEnd(t);if(k===a){i.endArray();continue}const s=n.isClosedPath(t);let o=b.read(2*k),l=b.read(2*k+1),_=c?y.read(k):Number.NaN,w=d?g.read(k):Number.NaN,C=h?N.read(k):0;D(c,d,o,l,_,w,e,i);let F=1;h&&(f.add(C),p[p.length-1]++);const j=o,O=l,I=_,z=w,E=C;let G=!1,P=0,B=Number.NaN,R=Number.NaN,V=0;for(let t=k+1,n=k,M=s?a+1:a;t<M;t++,n++){const s=null!==v?31&v.read(n):1;let k,M;if(t<a?(k=b.read(2*t),M=b.read(2*t+1),c&&(B=y.read(t)),d&&(R=g.read(t)),h&&(V=N.read(t))):(k=j,M=O,B=I,R=z,V=E),1!==s){G=!0,4===s?T.createEllipticArc():2===s?T.createCubicBezier():16===s?T.createQuadraticBezier():8===s?T.createQuadraticRationalBezier():(0,r.t)("JSON export.unsupported curve");const t=T.get(),a=A.read(n);t.setStartXYCoords(o,l),t.setEndXYCoords(k,M),c&&(t.setStartAttribute(1,0,_),t.setEndAttribute(1,0,B)),d&&(t.setStartAttribute(2,0,w),t.setEndAttribute(2,0,R)),t.readFromBufferStream(S,a),x(T.get(),u,m,e,i)&&P++}else D(c,d,k,M,B,R,e,i);h&&(f.add(V),p[p.length-1]++),F++,o=k,l=M,_=B,w=R,C=V}G&&0===P||(F<2&&P<1&&(D(c,d,o,l,_,w,e,i),F++,h&&(f.add(C),p[p.length-1]++)),s&&F<3&&P<2&&(D(c,d,j,O,I,z,e,i),F++,o=j,l=O,_=I,w=z,C=E,h&&(f.add(E),p[p.length-1]++))),i.endArray(),k=a}i.endArray()}if(h){i.addFieldName("ids"),i.startArray();let e=0;for(let t=0,n=p.length;t<n;++t){const n=p[t];(0,r.g)(0===n||null!==f&&e+n<=f.size()),i.startArray();for(let t=0;t<n;++t)i.addInt32(f.read(e)),e++;i.endArray()}i.endArray()}}function D(e,t,n,r,i,a,s,o){o.startArray(),o.addDouble(n,s),o.addDouble(r,s),e&&o.addDouble(i,s),t&&o.addDouble(a,s),o.endArray()}const F="a".charCodeAt(0),j="A".charCodeAt(0),O="*".charCodeAt(0),I="b".charCodeAt(0),z="\\".charCodeAt(0),E="[".charCodeAt(0),G="{".charCodeAt(0),P=":".charCodeAt(0),B=".".charCodeAt(0),R=",".charCodeAt(0),V='"'.charCodeAt(0),M="]".charCodeAt(0),U="}".charCodeAt(0),W="e".charCodeAt(0),X="E".charCodeAt(0),Y="f".charCodeAt(0),L="F".charCodeAt(0),q="/".charCodeAt(0),K="-".charCodeAt(0),J="+".charCodeAt(0),Z="n".charCodeAt(0),H="N".charCodeAt(0),Q="r".charCodeAt(0),$="t".charCodeAt(0),ee="u".charCodeAt(0),te="0".charCodeAt(0),ne="9".charCodeAt(0);class re{constructor(e){this.m_functionStack=[],this.m_pushPositions=[],this.m_utf8Decoder=new TextDecoder("utf-8",{fatal:!0}),void 0===e?(this.m_startToken=Number.MAX_SAFE_INTEGER,this.m_endToken=0,this.m_currentTokenType=0,this.m_functionStack.push(()=>this.accept_()),this.m_jsonString=null,this.m_bHasEscapes=!1):e.jsonString?this.resetParserFromString(e.jsonString):e.jsonStream?(0,r.t)("streaming json parsing not yet impl"):(0,r.d)("invalid constructor parameter")}prepSubstrString_(){}getCurrentSubstrString_(){return this.m_jsonString.slice(this.m_startToken,this.m_endToken)}stepOverCharString_(){this.m_endToken++}peekCharString_(){return this.m_jsonString.charCodeAt(this.m_endToken)}getString_(e){const t=this.m_jsonString?.slice(this.m_startToken,this.m_startToken+e-1);return this.m_endToken+=e-1,{s:t,bDone:this.m_endToken>=this.m_jsonString.length}}incrementString_(){this.m_endToken++}eofString_(){return this.m_endToken>=this.m_jsonString.length}setStringFunctions_(){this.m_prepSubstr=this.prepSubstrString_,this.m_getCurrentSubstr=this.getCurrentSubstrString_,this.m_stepOverChar=this.stepOverCharString_,this.m_peekChar=this.peekCharString_,this.m_get=this.getString_,this.m_increment=this.incrementString_,this.m_eof=this.eofString_}setStreamFunctions_(){(0,r.t)("streaming json parsing not yet impl")}reset_(){this.m_jsonString=null,this.m_endToken=0,this.m_startToken=Number.MAX_SAFE_INTEGER,this.m_currentTokenType=0,this.m_bHasEscapes=!1,this.m_functionStack.length=0,this.m_functionStack.push(()=>this.start_()),this.m_pushPositions.length=0}resetParserFromString(e){this.reset_(),this.setStringFunctions_(),this.m_jsonString=e}resetParserFromStream(e){(0,r.t)("streaming json parsing not yet impl")}resetToPosition(e){return!!this.m_jsonString&&(this.m_endToken=e,this.m_startToken=Number.MAX_VALUE,this.m_currentTokenType=0,this.m_functionStack.length=0,e>=this.m_jsonString.length?(this.m_functionStack.push(()=>this.accept_()),!1):(this.m_functionStack.push(()=>this.start_()),!0))}nextToken(){return this.m_functionStack.at(-1)(),this.m_currentTokenType}currentToken(){return this.m_currentTokenType}currentTokenStartIndex(){return this.m_startToken}currentTokenEndIndex(){return this.m_endToken}currentText(){return(0,r.g)(0),""}childrenAsString(){return(0,r.g)(0),""}skipChildren(){this.skipChildren_()}skipChildren_(){if(1===this.m_currentTokenType){let e=1;do{this.m_currentTokenType=this.nextToken(),1===this.m_currentTokenType?e++:3===this.m_currentTokenType&&e--}while(3!==this.m_currentTokenType||0!==e);return}if(2===this.m_currentTokenType){let e=1;do{this.m_currentTokenType=this.nextToken(),2===this.m_currentTokenType?e++:4===this.m_currentTokenType&&e--}while(4!==this.m_currentTokenType||0!==e);return}}currentTerminalAsString_(){switch(this.m_currentTokenType){case 7:case 8:case 9:return this.m_getCurrentSubstr().slice(0,this.m_endToken-this.m_startToken);case 10:return"null";case 11:return"true";case 12:return"false"}(0,r.a)("invalid token")}toUTF8_(e,t){let n=0,r=e;for(;t.charCodeAt(r)===z&&t.charCodeAt(r+1)===ee;)n++,r+=6;r=e;const i=new Uint8Array(n);let a=0;for(;t.charCodeAt(r)===z&&t.charCodeAt(r+1)===ee;)i[a++]=Number.parseInt(t.slice(r+2,r+6),16),r+=6;return{u8s:this.m_utf8Decoder.decode(i),end:r}}unquoteCurrentString_(){let e="",t=1;const n=this.m_endToken-this.m_startToken-1;let r=0;const i=this.m_getCurrentSubstr();for(let a=t;a<n;a++)if(i.charCodeAt(a)!==z)r++;else{switch(r>0&&(e+=i.slice(t,t+r)),i.charCodeAt(++a)){case V:e+='"';break;case ee:{const{u8s:t,end:n}=this.toUTF8_(a-1,i);a=n-1,e+=t;break}case z:e+="\\";break;case q:e+="/";break;case I:e+="\b";break;case Y:e+="\f";break;case Z:e+="\n";break;case Q:e+="\r";break;case $:e+="\t"}t=a+1,r=0}return r>0&&(e+=i.slice(t,t+r)),e}currentString(){return 5!==this.m_currentTokenType&&6!==this.m_currentTokenType?this.currentTerminalAsString_():this.m_bHasEscapes?this.unquoteCurrentString_():this.m_getCurrentSubstr().slice(1,this.m_endToken-this.m_startToken-2+1)}currentDoubleValue(){if(7!==this.m_currentTokenType&&8!==this.m_currentTokenType&&9!==this.m_currentTokenType&&6!==this.m_currentTokenType&&10!==this.m_currentTokenType&&(0,r.a)("invalid token"),10===this.m_currentTokenType)return Number.NaN;let e=this.m_getCurrentSubstr(),t=this.m_endToken-this.m_startToken;if(6===this.m_currentTokenType){if("NaN"===this.currentString())return Number.NaN;e=e.slice(1),t-=2,0===t&&(0,r.a)("invalid token")}const n=Number.parseFloat(e);if(6===this.m_currentTokenType)Number.isNaN(n)&&(0,r.a)("invalid token");else if(Number.isNaN(n))return Number.NaN;return n}currentInt32Value(){8!==this.m_currentTokenType&&6!==this.m_currentTokenType&&(0,r.a)("invalid token");let e=this.m_getCurrentSubstr(),t=this.m_endToken-this.m_startToken;6===this.m_currentTokenType&&(e=e.slice(1),t-=2,0===t&&(0,r.a)("invalid token"));const n=parseInt(e);return Number.isNaN(n)&&(0,r.a)("invalid token"),n}currentInt64Value(){return(0,r.g)(0),0n}currentBoolValue(){return(0,r.g)(0),!1}isError(){return 0}JSONString(){return(0,r.g)(0),""}pushPosition(){return(0,r.g)(0),!1}popPosition(){return(0,r.g)(0),!1}skipCStyleComments_(){(0,r.g)(0)}skipCppStyleComments_(){(0,r.g)(0)}skipComments_(){this.m_prepSubstr();let e=this.m_peekChar();this.m_stepOverChar(),this.m_eof()&&(0,r.a)("invalid token"),e=this.m_peekChar(),e===O?this.skipCStyleComments_():e===q?this.skipCppStyleComments_():(0,r.a)("invalid token")}skipWhiteSpace_(){let e;do{this.m_eof()&&(0,r.a)("invalid token");let t=this.m_peekChar();for(;t>=9&&t<=13||32===t;)this.m_increment(),this.m_eof()&&(0,r.a)("invalid token"),t=this.m_peekChar();t===q?(this.m_startToken=this.m_endToken,e=!0,this.skipComments_()):e=!1}while(e)}rightBracket_(){return this.m_peekChar()===M&&(this.m_startToken=this.m_endToken,this.m_increment(),this.m_currentTokenType=4,!0)}rightBrace_(){return this.m_peekChar()===U&&(this.m_startToken=this.m_endToken,this.m_increment(),this.m_currentTokenType=3,!0)}string_(){this.m_prepSubstr(),this.m_bHasEscapes=!1,this.m_stepOverChar(),this.m_eof()&&(0,r.a)("invalid token");let e=this.m_peekChar();for(;e!==V;){const t=e===z;if(this.m_stepOverChar(),this.m_eof()&&(0,r.a)("invalid token"),e=this.m_peekChar(),t)if(this.m_bHasEscapes=!0,e===V||e===z||e===q||e===I||e===Y||e===Z||e===Q||e===$)this.m_stepOverChar(),this.m_eof()&&(0,r.a)("invalid token"),e=this.m_peekChar();else if(e===ee)for(let t=0;t<4;t++)this.m_stepOverChar(),this.m_eof()&&(0,r.a)("invalid token"),e=this.m_peekChar(),e>=te&&e<=ne||e>=F&&e<=Y||e>=j&&e<=L||(0,r.a)("invalid token");else(0,r.a)("invalid token")}this.m_stepOverChar()}comma_(){return this.m_peekChar()===R&&(this.m_increment(),!0)}colon_(){return this.m_peekChar()===P&&(this.m_increment(),!0)}fieldNameEnd_(){this.skipWhiteSpace_(),this.m_functionStack.pop(),this.colon_()?(this.skipWhiteSpace_(),this.value_()):(0,r.a)("invalid token")}fieldNameStart_(){this.m_startToken=this.m_endToken,this.m_peekChar()!==V&&(0,r.a)("invalid token"),this.string_(),this.m_currentTokenType=5,this.m_functionStack.push(()=>this.fieldNameEnd_())}pairEnd_(){this.skipWhiteSpace_(),this.comma_()?(this.skipWhiteSpace_(),this.fieldNameStart_()):this.rightBrace_()?this.m_functionStack.pop():(0,r.a)("invalid token")}arrayStart_(){this.skipWhiteSpace_(),this.m_functionStack.pop(),this.rightBracket_()||(this.m_functionStack.push(()=>this.elementEnd_()),this.value_())}elementEnd_(){this.skipWhiteSpace_(),this.comma_()?(this.skipWhiteSpace_(),this.value_()):this.rightBracket_()?this.m_functionStack.pop():(0,r.a)("invalid token")}objectStart_(){this.skipWhiteSpace_(),this.m_functionStack.pop(),this.rightBrace_()||(this.m_functionStack.push(()=>this.pairEnd_()),this.fieldNameStart_())}valueStartObject_(){this.m_increment(),this.m_currentTokenType=1,this.m_functionStack.push(()=>this.objectStart_())}valueStartArray_(){this.m_increment(),this.m_currentTokenType=2,this.m_functionStack.push(()=>this.arrayStart_())}valueString_(){this.string_(),this.m_currentTokenType=6}int_(){this.m_peekChar()!==te?this.digits_():this.m_stepOverChar()}digits_(){let e=this.m_peekChar();do{this.m_stepOverChar(),this.m_eof()&&(0,r.a)("invalid token"),e=this.m_peekChar()}while(e>=te&&e<=ne)}frac_(){let e=this.m_peekChar();this.m_stepOverChar(),this.m_eof()&&(0,r.a)("invalid token"),e=this.m_peekChar(),e>=te&&e<=ne||(0,r.a)("invalid token"),this.digits_()}exp_(){let e=this.m_peekChar();this.m_stepOverChar(),this.m_eof()&&(0,r.a)("invalid token"),e=this.m_peekChar(),e!==J&&e!==K||(this.m_stepOverChar(),this.m_eof()&&(0,r.a)("invalid token"),e=this.m_peekChar()),e>=te&&e<=ne||(0,r.a)("invalid token"),this.digits_()}valueNumber_(){this.m_prepSubstr();let e=!1,t=this.m_peekChar();if(t===K?(this.m_stepOverChar(),this.m_eof()&&(0,r.a)("invalid token"),t=this.m_peekChar(),e=!0,t>=te&&t<=ne||(0,r.a)("invalid token"),this.int_()):this.int_(),t=this.m_peekChar(),t===B)this.m_currentTokenType=7,this.frac_(),t=this.m_peekChar(),t!==W&&t!==X||this.exp_();else if(t===W||t===X)this.m_currentTokenType=7,this.exp_();else{let t=0;e&&t++;const n=this.m_endToken-this.m_startToken-t;if(n<10)this.m_currentTokenType=8;else if(10===n){const n=this.m_getCurrentSubstr();e?n.slice(t)<="2147483648"?this.m_currentTokenType=8:this.m_currentTokenType=9:n.slice(t)<="2147483647"?this.m_currentTokenType=8:this.m_currentTokenType=9}else if(n<19)this.m_currentTokenType=9;else if(19===n){const n=this.m_getCurrentSubstr();e?n.slice(t)<="9223372036854775808"?this.m_currentTokenType=9:this.m_currentTokenType=7:n.slice(t)<="9223372036854775807"?this.m_currentTokenType=9:this.m_currentTokenType=7}else this.m_currentTokenType=7}}valueNull_(){const{s:e,bDone:t}=this.m_get(5);t&&(0,r.a)("invalid token"),"null"!==e&&(0,r.a)("invalid token"),this.m_currentTokenType=10}valueTrue_(){const{s:e,bDone:t}=this.m_get(5);t&&(0,r.a)("invalid token"),"true"!==e&&(0,r.a)("invalid token"),this.m_currentTokenType=11}valueFalse_(){const{s:e,bDone:t}=this.m_get(6);t&&(0,r.a)("invalid token"),"false"!==e&&(0,r.a)("invalid token"),this.m_currentTokenType=12}valueNan_(){const{s:e,bDone:t}=this.m_get(4);t&&(0,r.a)("invalid token"),"NaN"!==e&&(0,r.a)("invalid token"),this.m_currentTokenType=7}value_(){this.m_startToken=this.m_endToken;const e=this.m_peekChar();e===G?this.valueStartObject_():e===E?this.valueStartArray_():e===V?this.valueString_():e===K||e>=te&&e<=te+9?this.valueNumber_():e===Z?this.valueNull_():e===$?this.valueTrue_():e===Y?this.valueFalse_():e===H?this.valueNan_():(0,r.a)("invalid token")}start_(){this.skipWhiteSpace_(),this.m_functionStack.pop(),this.m_functionStack.push(()=>this.accept_());const e=this.m_peekChar();e!==G&&e!==E&&(0,r.a)("invalid token"),this.value_()}accept_(){this.m_startToken=this.m_endToken,this.m_currentTokenType=0}}const ie=new class{constructor(){this.m_pendingKey=null,this.m_acceptedObject=null,this.m_currentObject=[]}reset(){this.m_pendingKey=null,this.m_acceptedObject=null,this.m_currentObject.length=0}startObject(){const e={};this.m_pendingKey?(this.m_currentObject.at(-1)[this.m_pendingKey]=e,this.m_pendingKey=null):Array.isArray(this.m_currentObject.at(-1))&&this.m_currentObject.at(-1).push(e),this.m_currentObject.push(e)}startArray(){const e=[];this.m_pendingKey?(this.m_currentObject.at(-1)[this.m_pendingKey]=e,this.m_pendingKey=null):Array.isArray(this.m_currentObject.at(-1))&&this.m_currentObject.at(-1).push(e),this.m_currentObject.push(e)}endObject(){this.m_acceptedObject=this.m_currentObject.at(-1),this.m_currentObject.pop()}endArray(){this.m_currentObject.pop()}addFieldName(e){this.m_pendingKey=e}addValue_(e){this.m_pendingKey?(this.m_currentObject.at(-1)[this.m_pendingKey]=e,this.m_pendingKey=null):this.m_currentObject.at(-1).push(e)}addString(e){this.addValue_(e)}addDouble(e,t){this.addValue_(e)}addInt64(e){(0,r.g)(0)}addInt32(e){this.addValue_(e)}addBool(e){this.addValue_(e)}addNull(){this.addValue_(null)}getObject(){return this.m_acceptedObject}},ae=new class{getOperatorType(){return 10405}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}execute(e,t,n,i,s,o){!function(e,t,n,i){if(t||n){if(i.startObject(),null!==t)switch(t.getGeometryType()){case r.G.enumPolygon:C(!0,e,t,i);break;case r.G.enumPolyline:C(!1,e,t,i);break;case r.G.enumMultiPoint:!function(e,t,n){const i=t.getImpl(),a=i.hasAttribute(1)&&!(2&e),s=i.hasAttribute(2)&&!(4&e),o=i.hasAttribute(3)&&!(8&e);a&&(n.addFieldName("hasZ"),n.addBool(!0)),s&&(n.addFieldName("hasM"),n.addBool(!0)),n.addFieldName("points");const u=t.getPointCount();if(t.isEmpty())n.startArray(),n.endArray();else{const t=17-(31&e>>13);n.startArray();const r=i.getAttributeStreamRef(0);let o=null,m=null;a&&(o=i.getAttributeStreamRef(1)),s&&(m=i.getAttributeStreamRef(2));for(let e=0;e<u;e++){const i=r.read(2*e),u=r.read(2*e+1);let l=Number.NaN,c=Number.NaN;a&&(l=o.read(e)),s&&(c=m.read(e)),D(a,s,i,u,l,c,t,n)}n.endArray()}if(o){let e=null;i.isEmpty()||(e=i.getAttributeStreamRef(3)),(0,r.g)(0===u||null!==e&&e.size()>=u),n.addFieldName("ids"),n.startArray();for(let t=0;t<u;t++)n.addInt32(e.read(t));n.endArray()}}(e,t,i);break;case r.G.enumPoint:!function(e,t,n){const r=t.hasAttribute(1)&&!(2&e),i=t.hasAttribute(2)&&!(4&e),a=t.hasAttribute(3)&&!(8&e);if(t.isEmpty())return n.addFieldName("x"),n.addNull(),n.addFieldName("y"),n.addNull(),r&&(n.addFieldName("z"),n.addNull()),i&&(n.addFieldName("m"),n.addNull()),void(a&&(n.addFieldName("id"),n.addInt32(0)));const s=17-(31&e>>13);n.addFieldName("x"),n.addDouble(t.getX(),s),n.addFieldName("y"),n.addDouble(t.getY(),s),r&&(n.addFieldName("z"),n.addDouble(t.getZ(),s)),i&&(n.addFieldName("m"),n.addDouble(t.getM(),s)),a&&(n.addFieldName("id"),n.addInt32(t.getID()))}(e,t,i);break;case r.G.enumEnvelope:!function(e,t,n){const r=t.hasAttribute(1)&&!(2&e),i=t.hasAttribute(2)&&!(4&e),a=t.hasAttribute(3)&&!(8&e);if(t.isEmpty())return n.addFieldName("xmin"),n.addNull(),n.addFieldName("ymin"),n.addNull(),n.addFieldName("xmax"),n.addNull(),n.addFieldName("ymax"),n.addNull(),r&&(n.addFieldName("zmin"),n.addNull(),n.addFieldName("zmax"),n.addNull()),i&&(n.addFieldName("mmin"),n.addNull(),n.addFieldName("mmax"),n.addNull()),void(a&&(n.addFieldName("idmin"),n.addInt32(0),n.addFieldName("idmax"),n.addInt32(0)));const s=17-(31&e>>13);if(n.addFieldName("xmin"),n.addDouble(t.getXMin(),s),n.addFieldName("ymin"),n.addDouble(t.getYMin(),s),n.addFieldName("xmax"),n.addDouble(t.getXMax(),s),n.addFieldName("ymax"),n.addDouble(t.getYMax(),s),r){const e=t.queryInterval(1,0);n.addFieldName("zmin"),n.addDouble(e.vmin,s),n.addFieldName("zmax"),n.addDouble(e.vmax,s)}if(i){const e=t.queryInterval(2,0);n.addFieldName("mmin"),n.addDouble(e.vmin,s),n.addFieldName("mmax"),n.addDouble(e.vmax,s)}if(a){const e=t.queryInterval(3,0);n.addFieldName("idmin"),n.addInt32(e.vmin),n.addFieldName("idmax"),n.addInt32(e.vmax)}}(e,t,i);break;case r.G.enumMultipatch:(0,r.g)(0);break;default:(0,r.d)("exportToJSON")}null!==n&&(i.addFieldName("spatialReference"),function(e,t,n){n.startObject();let i=0;t.isCustomWkid()||(i=t.getOldID());let s=0;const o=t.getVCS();if(null!==o&&(o.isCustomWkid()||(s=o.getOldID()),s<=0&&(i=0)),i>0){n.addFieldName("wkid"),n.addInt32(i);const e=t.getLatestID();if(e>0&&e!==i&&(n.addFieldName("latestWkid"),n.addInt32(e)),s>0){n.addFieldName("vcsWkid"),n.addInt32(s);const e=t.getLatestVerticalID();e!==s&&(n.addFieldName("latestVcsWkid"),n.addInt32(e))}}if(0===t.getCoordinateSystemType())n.addFieldName("wkid"),n.addNull(),null!==t.getUnit()&&(n.addFieldName("unit"),function(e,t,n){n.startObject();const i=t.getID();i<=0&&(0,r.a)("cannot export unit that has no valid WKID"),n.addFieldName("uwkid"),n.addInt32(i),n.endObject()}(0,t.getUnit(),n));else if(i<=0||1&e){let r="";64&e&&(r=t.getText2(),n.addFieldName("wkt2"),n.addString(r));const i=t.getText();i!==r&&(n.addFieldName("wkt"),n.addString(i))}if(16&e){const e=new a.a;t.queryPrecisionDescriptor(e),n.addFieldName("xyTolerance"),n.addDouble(e.getTolerance(0)),n.addFieldName("zTolerance"),n.addDouble(e.getTolerance(1)),n.addFieldName("mTolerance"),n.addDouble(e.getTolerance(2)),n.addFieldName("falseX"),n.addDouble(e.getFalseX()),n.addFieldName("falseY"),n.addDouble(e.getFalseY()),n.addFieldName("xyUnits"),n.addDouble(e.getGridUnitsXY()),n.addFieldName("falseZ"),n.addDouble(e.getFalseZ()),n.addFieldName("zUnits"),n.addDouble(e.getGridUnitsZ()),n.addFieldName("falseM"),n.addDouble(e.getFalseM()),n.addFieldName("mUnits"),n.addDouble(e.getGridUnitsM())}n.endObject()}(e,n,i)),i.endObject()}}(e,t,n,i)}exportSpatialReference(e,t,n,i){(0,r.g)(0)}exportProjectionTransformation(e,t,n,i){(0,r.g)(0)}exportDatumTransformation(e,t,n,i){(0,r.g)(0)}static geometryTypeToString(e){return(0,r.g)(0),""}},se=new class{getOperatorType(){return 10404}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}execute(e,t,n,i,u,m,l){let c;"string"==typeof n?(c=new re({jsonString:n}),c.nextToken()):c=n,1!==c.currentToken()&&(0,r.a)("failed to import map geometry: start of object is expected");const d=function(e,t,n,i,a){let u=!1,m=!1,l=!1,c=!1,d=!1,h=!1,g=!1,N=!1,T=!1,v=!1,x=!1,A=!1,S=!1,w=!1,C=!1,D=!1,F=!1,j=!1,O=!1,I=!1,z=!1,E=!1,G=!1,P=!1,B=Number.NaN,R=Number.NaN,V=Number.NaN,M=Number.NaN,U=0,W=Number.NaN,X=Number.NaN,Y=Number.NaN,L=Number.NaN,q=Number.NaN,K=Number.NaN,J=Number.NaN,Z=Number.NaN,H=0,Q=0,$=!1,ee=!1,te=null,ne=null,re=null,ie=null,ae=null;for(;3!==n.nextToken();){const t=n.currentString();if(n.nextToken(),"spatialReference"===t){if(a&&!u){u=!0,1===n.currentToken()?ie=_(n):10!==n.currentToken()&&(0,r.a)("failed to parse spatial reference: object or null is expected");continue}}else if(i)if("hasZ"===t){if(!m){m=!0,$=11===n.currentToken();continue}}else if("hasM"===t){if(!l){l=!0,ee=11===n.currentToken();continue}}else if("rings"===t){if(!(d||h||e!==r.G.enumUnknown&&e!==r.G.enumPolygon)){d=!0,({geometry:ae,as:te,bs:ne}=f(!0,!1,0,n));continue}}else if("curveRings"===t){if(!h&&(e===r.G.enumUnknown||e===r.G.enumPolygon)){h=!0,({geometry:ae,as:te,bs:ne}=f(!0,!0,0,n));continue}}else if("paths"===t){if(!(g||N||e!==r.G.enumUnknown&&e!==r.G.enumPolyline)){g=!0,({geometry:ae,as:te,bs:ne}=f(!1,!1,0,n));continue}}else if("curvePaths"===t){if(!N&&(e===r.G.enumUnknown||e===r.G.enumPolyline)){N=!0,({geometry:ae,as:te,bs:ne}=f(!1,!0,0,n));continue}}else if("points"===t){if(!T&&(e===r.G.enumUnknown||e===r.G.enumMultiPoint)){T=!0,({geometry:ae,as:te,bs:ne}=p(0,n));continue}}else if("ids"===t){if(!c){c=!0,re=k(0,n);continue}}else if("x"===t){if(!v&&(e===r.G.enumUnknown||e===r.G.enumPoint)){v=!0,B=b(n);continue}}else if("y"===t){if(!x&&(e===r.G.enumUnknown||e===r.G.enumPoint)){x=!0,R=b(n);continue}}else if("z"===t){if(!A&&(e===r.G.enumUnknown||e===r.G.enumPoint)){A=!0,V=b(n);continue}}else if("m"===t){if(!S&&(e===r.G.enumUnknown||e===r.G.enumPoint)){S=!0,M=b(n);continue}}else if("id"===t){if(!w&&(e===r.G.enumUnknown||e===r.G.enumPoint)){w=!0,U=y(n);continue}}else if("xmin"===t){if(!C&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){C=!0,W=b(n);continue}}else if("ymin"===t){if(!D&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){D=!0,X=b(n);continue}}else if("mmin"===t){if(!z&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){z=!0,J=b(n);continue}}else if("zmin"===t){if(!O&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){O=!0,q=b(n);continue}}else if("idmin"===t){if(!G&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){G=!0,H=y(n);continue}}else if("xmax"===t){if(!F&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){F=!0,Y=b(n);continue}}else if("ymax"===t){if(!j&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){j=!0,L=b(n);continue}}else if("mmax"===t){if(!E&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){E=!0,Z=b(n);continue}}else if("zmax"===t){if(!I&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){I=!0,K=b(n);continue}}else if("idmax"===t){if(!P&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){P=!0,Q=y(n);continue}}else"materials"===t&&(0,r.g)(0);n.skipChildren()}if(d||h||g||N||T){let e=null,t=null;const n=ae;$&&(ae.addAttribute(1),e=te,e||(e=(0,s.a1)(n.getPointCount(),Number.NaN))),ee&&(ae.addAttribute(2),t=$?ne:te),null!=re&&ae.addAttribute(3),$&&null!=e&&n.setAttributeStreamRef(1,e),ee&&null!=t&&n.setAttributeStreamRef(2,t),null!=re&&function(e,t){if(e.isEmpty())return;const n=(0,s.a6)(2,0),i=e.getGeometryType();let a=0;i===o.M.type?a=1:i===o.P.type||i===o.a.type?a=e.getPathCount():(0,r.d)("not implemented"),n.resize(e.getPointCount(),0);let u=0;for(let s=0;s<a;++s){const a=t.read(u);u++;const m=u+a;let l=0,c=0;i===o.M.type?l=e.getPointCount():i===o.P.type||i===o.a.type?(l=e.getPathSize(s),c=e.getPathStart(s)):(0,r.d)("not implemented");for(let e=0,r=Math.min(a,l);e<r;++e)n.write(c,t.read(u)),u++,c++;u=m}e.getImpl().setAttributeStreamRef(3,n)}(n,re)}else if(v||x||S||A||w){(0,s.a4)(B,R)||(0,r.a)("failed to parse point: x and y must be finite or nan"),(Number.isNaN(R)||Number.isNaN(B))&&(B=Number.NaN,R=Number.NaN);const e=new s.P({x:B,y:R});A&&e.setZ(V),S&&e.setM(M),w&&e.setID(U),ae=e}else if(C||D||F||j||O||I||z||E||G||P){(Number.isNaN(X)||Number.isNaN(Y)||Number.isNaN(L))&&(W=Number.NaN);const e=new s.E({xmin:W,ymin:X,xmax:Y,ymax:L});O&&I&&e.setInterval(1,0,q,K),z&&E&&e.setInterval(2,0,J,Z),G&&P&&e.setInterval(3,0,H,Q),ae=e}return{...ae?{geom:ae}:{},...ie?{sr:ie}:{}}}(t,0,c,i,u);return new a.aY(d)}importSpatialReference(e){const t=_(e);return null===t&&(0,r.d)("failed to import spatial reference"),t}importProjectionTransformation(e,t){return(0,r.g)(0),{}}importDatumTransformation(e,t){return(0,r.g)(0),{}}static stringToGeometryType(e){return(e=e.toLowerCase()).startsWith("esrigeometry")||(0,r.a)("string_to_geometry_type"),e.endsWith("point")?r.G.enumPoint:e.endsWith("envelope")?r.G.enumEnvelope:e.endsWith("multipoint")?r.G.enumMultiPoint:e.endsWith("polyline")?r.G.enumPolyline:e.endsWith("polygon")?r.G.enumPolygon:void(0,r.a)("string_to_geometry_type")}};function oe(e){return Array.isArray(e)?e[0].spatialReference:e.spatialReference}function ue(e,t){const{includeGeometry:n=!0,includeSpatialReference:i=!0}=t??{};i&&(e.spatialReference?.latestVcsWkid||e.spatialReference?.vcsWkid)&&(e={...e,spatialReference:{...e.spatialReference}},delete e.spatialReference?.latestVcsWkid,delete e.spatialReference?.vcsWkid);const a=new c(e,{strict:!1});return a.nextToken(),se.execute(0,r.G.enumUnknown,a,n,i)}function me(e){let t=null;return[e.map(e=>{if(null==t){const n=le(e);return t=n.getSpatialReference(),n.getGeometry()}return ce(e)}),t]}function le(e){return e.spatialReference instanceof u.A&&(e={...e,spatialReference:e.spatialReference.toJSON()}),ue(e)}function ce(e){return ue(e,{includeSpatialReference:!1}).getGeometry()}function de(e){return e instanceof u.A&&(e=e.toJSON()),ue({x:0,y:0,spatialReference:e},{includeGeometry:!1}).getSpatialReference()}function he(e,t){return e instanceof a.aY&&(t=e.getSpatialReference(),e=e.getGeometry()),e?.isEmpty()?null:(ie.reset(),ae.execute(0,e,t,ie),ie.getObject())}},90293:(e,t,n)=>{n(79187),n(55537),n(88885),n(95213),n(83661);var r=n(39117),i=n(86211),a=n(21325);(0,r.k)()||(0,r.l)(e=>{let t,n;"number"==typeof e?t=e:n=e;const r={wkid:t,wkt:n};let s,o;if(n){s=(0,i.x1)(n);const e=(0,a.EA)(r);if(!s&&!e)throw new Error(`Unsupported WKT type: ${n}`)}else s=!(0,a.EA)(r);return o=t&&i.yD.has(t)?Math.PI/200:s?(0,i.Ao)(r):Math.PI/180,{isPCS:s,metersOrRadiansPerUnit:o,semiMajor:0,wkidOrWkt:e}})}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3299],{83299:(e,t,n)=>{n.r(t),n.d(t,{fromGeometries:()=>me,fromGeometry:()=>le,fromGeometryToGXGeometry:()=>ce,fromSpatialReference:()=>de,getSpatialReference:()=>oe,toGeometry:()=>he});var r=n(55537),i=n(83661),a=n(39117),s=n(95213),o=n(88885),u=n(16930);function m(){if(-1===this.m_i)return this.m_i=0,{value:{m_token:1,m_value:null},done:!1};if(this.m_i<this.m_keys.length){const e=this.m_bReturnKey,t=Math.trunc(this.m_i);return this.m_bReturnKey=!this.m_bReturnKey,this.m_i+=.5,e?{value:{m_token:5,m_value:this.m_keys[t]},done:!1}:{value:{m_token:6,m_value:this.m_o[this.m_keys[t]]},done:!1}}return{value:{m_token:3,m_value:null},done:!0}}function l(){if(-1===this.m_i)return this.m_i=0,{value:{m_token:2,m_value:null},done:!1};if(this.m_i<this.m_a.length){const e={value:{m_token:6,m_value:this.m_a[this.m_i++]},done:!1};return this.m_strict||void 0===e.value.m_value&&(e.value.m_value=Number.NaN),e}return{value:{m_token:4,m_value:null},done:!0}}n(90293);class c{createJSONObjectIterator(e){return{m_iteratorType:"object",m_o:e,m_keys:this.m_options.strict?Object.keys(e):Object.keys(e).filter(t=>void 0!==e[t]),m_i:-1,m_bReturnKey:!0,next:m}}createJSONArrayIterator(e){return{m_iteratorType:"array",m_strict:this.m_options.strict,m_i:-1,m_a:e,next:l}}constructor(e,t){this.m_currentToken=0,this.m_options=t?{...t}:{strict:!0};const n=e;this.m_iteratorStack=[n instanceof Array?this.createJSONArrayIterator(n):this.createJSONObjectIterator(n)],this.m_nextFlatToken={m_value:null,m_token:0}}nextToken(){if(0===this.m_iteratorStack.length)return this.m_currentToken=0;switch(this.m_nextFlatToken=this.m_iteratorStack.at(-1).next().value,this.m_currentValue=void 0,this.m_nextFlatToken.m_token){case 1:return this.m_currentToken=1;case 3:return this.m_iteratorStack.pop(),this.m_currentToken=3;case 2:return this.m_currentToken=2;case 4:return this.m_iteratorStack.pop(),this.m_currentToken=4;case 5:return this.m_currentValue=this.m_nextFlatToken.m_value,this.m_currentToken=5;case 6:if(this.m_nextFlatToken.m_value instanceof Array)return this.m_iteratorStack.push(this.createJSONArrayIterator(this.m_nextFlatToken.m_value)),this.nextToken();if(this.m_nextFlatToken.m_value instanceof Object)return this.m_iteratorStack.push(this.createJSONObjectIterator(this.m_nextFlatToken.m_value)),this.nextToken();if("number"==typeof this.m_nextFlatToken.m_value)return this.m_currentValue=this.m_nextFlatToken.m_value,Number.isSafeInteger(this.m_currentValue)&&this.m_currentValue>=(0,i.aJ)()&&this.m_currentValue<=(0,i.i)()?this.m_currentToken=8:this.m_currentToken=7;if("string"==typeof this.m_nextFlatToken.m_value)return this.m_currentValue=this.m_nextFlatToken.m_value,this.m_currentToken=6;if("boolean"==typeof this.m_nextFlatToken.m_value)return this.m_currentValue=this.m_nextFlatToken.m_value,this.m_currentToken=this.m_nextFlatToken.m_value?11:12;if("object"==typeof this.m_nextFlatToken.m_value)return this.m_currentValue=null,this.m_currentToken=10;(0,r.d)("unrecognized json element type")}return(0,r.d)("unrecognized json element type"),0}currentToken(){return this.m_currentToken}skipChildren(){if(0!==this.m_iteratorStack.length)switch(this.m_currentValue=void 0,this.m_nextFlatToken.m_token){case 1:return this.m_iteratorStack.pop(),this.m_nextFlatToken.m_token=3,void(this.m_currentToken=3);case 2:return this.m_iteratorStack.pop(),this.m_nextFlatToken.m_token=4,void(this.m_currentToken=4)}}currentString(){return 6!==this.m_currentToken&&5!==this.m_currentToken&&(0,r.a)("invalid token"),this.m_currentValue}currentDoubleValue(){return 7!==this.m_currentToken&&8!==this.m_currentToken&&(0,r.a)("invalid token"),this.m_currentValue}currentInt32Value(){return 8!==this.m_currentToken&&(0,r.a)("invalid token"),this.m_currentValue}currentInt64Value(){return(0,r.g)(0),0n}currentBoolValue(){return 12!==this.m_currentToken&&11!==this.m_currentToken&&(0,r.a)("invalid token"),this.m_currentValue}isError(){return 0}}class d{constructor(e){return this.m_buffer=null,this.m_view=null,this.m_sz=0,this.m_offset=0,this.m_bOwnsBuffer=!0,this.m_bLittleEndian=!0,this.m_element=new ArrayBuffer(8),this.m_elementBytes=new Uint8Array(this.m_element),this.m_elementView=new DataView(this.m_element),this.m_elementDouble=new Float64Array(this.m_element),this.m_elementFloat=new Float32Array(this.m_element),this.m_elementInt64=new BigInt64Array(this.m_element),this.m_elementInt32=new Int32Array(this.m_element),this.m_elementInt16=new Int16Array(this.m_element),void 0!==e.sz?(this.m_sz=e.sz,e.buffer?(this.m_sz<0&&(0,r.q)("size out of range"),this.m_buffer=e.buffer,this.m_offset=void 0!==e.offset?e.offset:0,this.m_view=void 0!==e.offset?new DataView(e.buffer,e.offset,e.sz):new DataView(this.m_buffer),this.m_bOwnsBuffer=!1,void(this.m_bLittleEndian=!0)):(this.m_sz<0&&(0,r.q)("size out of range"),void(this.m_sz>0&&(this.m_buffer=new ArrayBuffer(this.m_sz),this.m_view=new DataView(this.m_buffer))))):e.move?(this.m_sz=e.move.m_sz,this.m_buffer=e.move.m_buffer,this.m_view=e.move.m_view,this.m_bOwnsBuffer=e.move.m_bOwnsBuffer,this.m_bLittleEndian=e.move.m_bLittleEndian,e.move.m_buffer=null,e.move.m_view=null,e.move.m_sz=0,void(e.move.m_bOwnsBuffer=!0)):void(0,r.d)("unrecognized constructor options")}swapBytesDouble(){this.doSwap()&&(this.m_elementDouble[0]=this.m_elementBytes[0]<<56|this.m_elementBytes[1]<<48|this.m_elementBytes[2]<<40|this.m_elementBytes[3]<<32|this.m_elementBytes[4]<<24|this.m_elementBytes[5]<<16|this.m_elementBytes[6]<<8|this.m_elementBytes[7])}swapBytesInt32(){this.doSwap()&&(this.m_elementInt32[0]=this.m_elementBytes[0]<<24|this.m_elementBytes[1]<<16|this.m_elementBytes[2]<<8|this.m_elementBytes[3])}getOffset(){return this.m_offset}assignMove(e){return this===e||(this.clear(),this.m_sz=e.m_sz,this.m_buffer=e.m_buffer,this.m_view=e.m_view,this.m_bOwnsBuffer=e.m_bOwnsBuffer,this.m_bLittleEndian=e.m_bLittleEndian,e.m_buffer=null,e.m_sz=0,e.m_bOwnsBuffer=!0),this}doSwap(){return this.m_bLittleEndian!==(1===d.getNativeByteOrder())}setNativeByteOrder(){this.m_bLittleEndian=1===d.getNativeByteOrder()}setOrder(e){this.m_bLittleEndian=1===e}getOrder(){return this.m_bLittleEndian?1:0}getView(){return this.m_view||(0,r.p)("buffer not defined"),this.m_view}static getNativeByteOrder(){return 1}clear(){this.m_buffer=null,this.m_sz=0,this.m_bOwnsBuffer=!0}size(){return this.m_sz}readDouble(e){return this.doSwap()?(this.m_elementDouble[0]=this.m_view.getFloat64(e,this.m_bLittleEndian),this.swapBytesDouble(),this.m_elementDouble[0]):this.m_view.getFloat64(e,this.m_bLittleEndian)}writeDouble(e,t){this.m_elementDouble[0]=t,this.swapBytesDouble(),this.m_view.setFloat64(e,this.m_elementDouble[0],this.m_bLittleEndian)}readInt32(e){return this.doSwap()?(this.m_elementInt32[0]=this.m_view.getInt32(e,this.m_bLittleEndian),this.swapBytesInt32(),this.m_elementInt32[0]):this.m_view.getInt32(e,this.m_bLittleEndian)}writeInt32(e,t){this.m_elementInt32[0]=t,this.swapBytesInt32(),this.m_view.setInt32(e,this.m_elementInt32[0],this.m_bLittleEndian)}getPtr(){return this.m_buffer}setSizeNoRealloc(e){(0,r.g)(e>=0&&e<=this.m_sz),this.m_sz=e}}function h(e){let t=!1;for(;3!==e.nextToken();){const n=e.currentString();e.nextToken(),"uwkid"===n?t||(t=!0,8===e.currentToken()&&e.currentInt32Value()):e.skipChildren()}return null}function _(e){let t=!1,n=!1,r=!1,i=!1,s=!1,o=!1,u=!1,m=!1,l=!1,c=!1,d=!1,_=!1,f=!1,p=!1,k=!1,b=!1,y=!1,g=-1,N=-1,T=-1,v=-1,x=0,A=0,S=0,w=0,C=0,D=0,F=0,j=0,O=0,I=0,z="",E="",G=null;for(;3!==e.nextToken();){const a=e.currentString();e.nextToken(),"wkid"===a?t||(t=!0,8===e.currentToken()&&(g=e.currentInt32Value())):"latestWkid"===a?n||(n=!0,8===e.currentToken()&&(N=e.currentInt32Value())):"wkt"===a?s||(s=!0,6===e.currentToken()&&(z=e.currentString())):"wkt2"===a?s||6===e.currentToken()&&(E=e.currentString()):"vcsWkid"===a?r||(r=!0,8===e.currentToken()&&(T=e.currentInt32Value())):"latestVcsWkid"===a?i||(i=!0,8===e.currentToken()&&(v=e.currentInt32Value())):"xyTolerance"===a?u||(u=!0,o=!0,x=e.currentDoubleValue()):"zTolerance"===a?m||(m=!0,o=!0,A=e.currentDoubleValue()):"mTolerance"===a?l||(l=!0,o=!0,S=e.currentDoubleValue()):"falseX"===a?c||(c=!0,o=!0,F=e.currentDoubleValue()):"falseY"===a?d||(d=!0,o=!0,j=e.currentDoubleValue()):"falseZ"===a?_||(_=!0,o=!0,O=e.currentDoubleValue()):"falseM"===a?f||(f=!0,o=!0,I=e.currentDoubleValue()):"xyUnits"===a?p||(p=!0,o=!0,w=e.currentDoubleValue()):"zUnits"===a?k||(k=!0,o=!0,C=e.currentDoubleValue()):"mUnits"===a?b||(b=!0,o=!0,D=e.currentDoubleValue()):"unit"===a?y||(y=!0,G=h(e)):e.skipChildren()}v<=0&&T>0&&(v=T),T<=0&&v>0&&(T=v);let P=null,B=!0;if(0!==z.length&&(B=!1,(0,a.q)(z)&&(P=(0,a.b)(z))),P||0===E.length||(B=!1,(0,a.q)(E)&&(P=(0,a.b)(E))),!P&&N>0&&(B=!1,(0,a.p)(N)&&(v<=0||(0,a.aX)())&&(P=(0,a.c)(N,v))),!P&&g>0&&(B=!1,(0,a.p)(g)&&(T<=0||(0,a.aX)())&&(P=(0,a.c)(g,T))),B&&(P=(0,a.e)(G)),o&&P){const e=new a.a;P.queryPrecisionDescriptorWithoutFalseXY(e),u&&e.setTolerance(0,x),m&&e.setTolerance(1,A),l&&e.setTolerance(2,S),p&&c&&d&&e.setGridParams(F,j,w),k&&_&&e.setZParams(O,C),b&&f&&e.setMParams(I,D),P=(0,a.f)(P,e)}return P}function f(e,t,n,a){2!==a.currentToken()&&(0,r.a)("failed to parse multipath: array of array of vertices is expected");const u=e?new o.a:new o.P,m=u,l=(0,s.$)(0),c=(0,s.a1)(2,0),d=(0,s.a0)(0);let h=null,_=null,f=null,p=null,k=null,y=0,v=0,x=0;const A=new o.S,S=i.P.getNAN();let w=0,C=0;const D=e?1:0;for(;4!==a.nextToken();){2!==a.currentToken()&&(0,r.a)("failed to parse multipath: ring/path array is expected");let n=2,u=0,F=!0;const j=4;let O=0,I=0;const z=i.P.getNAN(),E=(0,i.d)(j,Number.NaN),G=(0,i.d)(j,Number.NaN);let P=!1;for(a.nextToken();4!==a.currentToken();){if(t&&1===a.currentToken())F&&(0,r.a)("failed to parse multipath: starting vertex array is expected"),f||(f=(0,s.a0)(w-1,1),p=(0,s.$)(w-1,-1),k=(0,s.a1)(0)),P=!0,n=1,({segFlag:x,toPointSz:O}=T(A,E,S,a));else{for(P=!1,2!==a.currentToken()&&(0,r.a)("failed to parse multipath: array is expected, rings/paths vertices consist of arrays of coordinates"),O=0;4!==a.nextToken();)O===j&&(0,r.a)("failed to parse multipath: each vertex array has to have at most 4 elements"),E[O++]=b(a);O<2&&(0,r.a)("failed to parse multipath: each vertex array has to have at least 2 elements"),(0,s.a5)(E[0],E[1])||(0,r.a)("failed to parse multipath: x and y must be finite")}a.nextToken();do{if(c.size()===2*w&&c.resize(g(w)),c.writePoint2D(2*w,z.setCoords(E[0],E[1])),h&&h.size()===w&&h.resize(N(w)),O>2?(h||(h=(0,s.a1)(w+1,Number.NaN)),h.write(w,E[2])):h&&h.write(w,Number.NaN),_&&_.size()===w&&_.resize(N(w)),O>3?(_||(_=(0,s.a1)(w+1,Number.NaN)),_.write(w,E[3])):_&&_.write(w,Number.NaN),F)C++,l.add(w),d.add(D),F=!1,I=O,(0,i.b)(G,E,0,0,I);else if(null!==f)if(P){const e=(0,o.a9)(x),t=k.size();k.resize(t+e),f.add(x),p.add(y),A.get().writeInBufferStream(k,y),y+=e,m.incCurveType(x,1),v++}else f.add(1),p.add(-1);w++,u++,S.setCoords(E[0],E[1])}while(u<n&&4===a.currentToken())}0!==u&&(e&&u>n&&O===I&&0===(0,i.aK)(E,G,O)?(w--,u--):null!==f&&(f.add(1),p.add(-1)))}return w&&(l.resize(C),d.resize(C),w>0&&(l.add(w),d.add(0)),m.setAttributeStreamRef(0,c),m.setPathFlagsStreamRef(d),m.setPathStreamRef(l),null!==f&&(m.updateCurveCounter(v),m.setSegmentData(p,k,f,y)),m.notifyModifiedFlags(65535)),{geometry:u,as:h,bs:_}}function p(e,t){2!==t.currentToken()&&(0,r.a)("failed to parse multipoint: array of vertices is expected");let n=0;const a=new o.M,u=(0,s.a1)(2,0);let m=0;const l=(0,i.d)(4,Number.NaN),c=new i.P;let d=null,h=null;for(;4!==t.nextToken();){for(2!==t.currentToken()&&(0,r.a)("failed to parse multipoint: array is expected, multipoint vertices consist of arrays of cooridinates"),m=0;4!==t.nextToken();)4===m&&(0,r.a)("failed to parse multipoint: each vertex array has to have at most 4 elements"),l[m++]=b(t);m<2&&(0,r.a)("failed to parse multipoint: each vertex array has to have at least 2 elements"),(0,s.a5)(l[0],l[1])||(0,r.a)("failed to parse multipoint: x and y must be finite"),u.size()===2*n&&u.resize(g(n)),u.writePoint2D(2*n,c.setCoords(l[0],l[1])),d&&d.size()===n&&d.resize(N(n)),m>2?(d||(d=(0,s.a1)(n+1,Number.NaN)),d.write(n,l[2])):d&&d.write(n,Number.NaN),h&&h.size()===n&&h.resize(N(n)),m>3?(h||(h=(0,s.a1)(n+1,Number.NaN)),h.write(n,l[3])):h&&h.write(n,Number.NaN),n++}if(n){const e=a.getImpl();e.setAttributeStreamRef(0,u),e.resizeNoInit(n),e.notifyModifiedFlags(65535)}return{geometry:a,as:d,bs:h}}function k(e,t){2!==t.currentToken()&&(0,r.a)("failed to parse array of IDs: array of array of integers is expected");const n=(0,s.a6)(2,0);let i=0,a=-1;for(;4!==t.nextToken();){const e=i;n.size()===i&&n.resize(N(i)),i++;let s=0;for(-1===a?a=2===t.currentToken()?1:0:1===a&&2!==t.currentToken()&&(0,r.a)("failed to parse array of IDs: array of array of integers is expected"),0===a&&(n.size()===i&&n.resize(N(i)),n.write(i,y(t)),s++,i++);4!==t.nextToken();)n.size()===i&&n.resize(N(i)),n.write(i,y(t)),s++,i++;if(n.write(e,s),0===a)break}return n.resize(i),n}function b(e){const t=e.currentToken();if(10===t||6===t&&"NaN"===e.currentString())return Number.NaN;{const t=e.currentDoubleValue();return Number.isNaN(t)?Number.NaN:t}}function y(e){return e.currentInt32Value()}function g(e){let t=2*Math.trunc(3*(e+1)/2);return t<8?t=8:t<32&&(t=32),t}function N(e){let t=Math.trunc(3*(e+1)/2);return t<4?t=4:t<16&&(t=16),t}function T(e,t,n,a,s){const u={segFlag:0,toPointSz:0};let m=a.currentToken();m=a.nextToken();const l=a.currentString(),c=l[0];for((1!==l.length||"a"!==c&&"b"!==c&&"c"!==c&&"n"!==c&&"q"!==c)&&(0,r.a)('failed to parse curve: expecting "a", "b", "n", "q", or "c"'),m=a.nextToken(),2!==m&&(0,r.a)("failed to parse curve: start array is expected for curve parameters"),m=a.nextToken(),2!==m&&(0,r.a)("failed to parse curve: start array is expected for to point"),u.toPointSz=0;4!==a.nextToken();)4===u.toPointSz&&(0,r.a)("failed to parse curve: vertex array cannot have more than 4 elements"),t[u.toPointSz++]=b(a);u.toPointSz<2&&(0,r.a)("failed to parse curve: vertex array must have at least 2 elements");const h=i.P.construct(t[0],t[1]),_=i.P.getNAN();let f=-1,p=-1,k=!1,y=Number.NaN,g=Number.NaN,N=Number.NaN;const T=[i.P.getNAN(),i.P.getNAN(),i.P.getNAN()],x=i.P.getNAN();if("a"===c){m=a.nextToken(),2!==m&&(0,r.a)("failed to parse curve: start array is expected for center point"),m=a.nextToken();const e=b(a);m=a.nextToken();const t=b(a);m=a.nextToken(),4!==m&&(0,r.a)("failed to parse curve: end array is expected for center point"),_.setCoords(e,t),m=a.nextToken(),f=a.currentInt32Value(),m=a.nextToken(),p=a.currentInt32Value(),m=a.nextToken(),4!==m?(k=!1,y=b(a),m=a.nextToken(),g=b(a),m=a.nextToken(),N=b(a),m=a.nextToken(),4!==m&&(0,r.a)("failed to parse curve: end array is expected for curve parameters")):k=!0,u.segFlag=4}else if("b"===c){for(let e=0;e<2;e++){m=a.nextToken(),2!==m&&(0,r.a)("failed to parse curve: start array is expected for control point"),m=a.nextToken();const t=b(a);m=a.nextToken();const n=b(a);m=a.nextToken(),4!==m&&(0,r.a)("failed to parse curve: end array is expected for control point"),T[e].setCoords(t,n)}m=a.nextToken(),4!==m&&(0,r.a)("failed to parse curve: end array is expected for curve parameters"),u.segFlag=2}else if("n"===c){{m=a.nextToken(),2!==m&&(0,r.a)("failed to parse curve: start array is expected for control point"),m=a.nextToken();const e=b(a);m=a.nextToken();const t=b(a);m=a.nextToken(),4!==m&&(0,r.a)("failed to parse curve: end array is expected for control point"),T[0].setCoords(e,t)}m=a.nextToken();const e=b(a);m=a.nextToken();const t=b(a);m=a.nextToken();const n=b(a);T[1].setCoords(e,t),T[2].setCoords(n,n),m=a.nextToken(),4!==m&&(0,r.a)("failed to parse curve: end array is expected for curve parameters"),u.segFlag=8}else if("q"===c){for(let e=0;e<1;e++){m=a.nextToken(),2!==m&&(0,r.a)("failed to parse curve: start array is expected for control point"),m=a.nextToken();const t=b(a);m=a.nextToken();const n=b(a);m=a.nextToken(),4!==m&&(0,r.a)("failed to parse curve: end array is expected for control point"),T[e].setCoords(t,n)}m=a.nextToken(),4!==m&&(0,r.a)("failed to parse curve: end array is expected for curve parameters"),u.segFlag=16}else{m=a.nextToken(),2!==m&&(0,r.a)("failed to parse curve: start array is expected for interior point"),m=a.nextToken();const e=b(a);m=a.nextToken();const t=b(a);m=a.nextToken(),4!==m&&(0,r.a)("failed to parse curve: end array is expected for interior point"),x.setCoords(e,t),m=a.nextToken(),4!==m&&(0,r.a)("failed to parse curve: end array is expected for curve parameters"),u.segFlag=4}if(m=a.nextToken(),3!==m&&(0,r.a)("failed to parse curve: end object is expected for curve"),"a"===c)if(e.createEllipticArc(),k){const t=!0;v(e.get(),n,h,_,t,f,p)}else!function(e,t,n,r,i,a,s,u,m){e.dropAllAttributes();const l=new ArrayBuffer(44),c=new d({sz:44,buffer:l});let h=0;c.writeDouble(h,r.x),h+=8,c.writeDouble(h,r.y),h+=8,c.writeDouble(h,s),h+=8,c.writeDouble(h,u),h+=8,c.writeDouble(h,m),h+=8;let _=0;a||(_|=2048),i&&(_|=4096),c.writeInt32(h,_),h+=4,function(e,t,n,r){e.m_bits=0,e.m_center.x=r.readDouble(0),e.m_center.y=r.readDouble(8),e.m_rotation=r.readDouble(16),e.m_semiMajorAxis=r.readDouble(24),e.m_minorMajorRatio=r.readDouble(32),e.m_XStart=t.x,e.m_YStart=t.y,e.m_XEnd=n.x,e.m_YEnd=n.y;const i=r.readInt32(40);if(1&i)return!1;let a=!!(64&i),s=!!(128&i);const u=!!(2048&i),m=!!(4096&i);!(512&i)&&!(1024&i)||s||(a=!0),s&&!t.equals(n)?(s=!1,a=!0):a&&t.equals(n)&&(s=!0,a=!1),s?(e.m_center.assign(t),e.m_startAngle=e.m_center.x,e.m_sweepAngle=e.m_center.y,(0,o.a8)(e,Number.NaN,u,m),e.m_semiMajorAxis=0,e.m_interior.setCoordsPoint2D(t)):a?(e.m_center.setNAN(),e.m_semiMajorAxis=1,e.m_minorMajorRatio=0,e.m_center.setNAN(),e.m_sweepAngle=0,e.m_startAngle=0,(0,o.a6)(e),e.queryCoord2D(.5,e.m_interior)):e.constructEllipticArcEndPointsCenter(t,n,e.m_semiMajorAxis,e.m_minorMajorRatio,e.m_rotation,!m,u,e.m_center),e.setProjectionBehavior(1),(0,o.a6)(e)}(e,t,n,c)}(e.get(),n,h,_,f,p,y,g,N);else if("b"===c)e.createCubicBezier(),function(e,t,n,a){e.dropAllAttributes();const s=new ArrayBuffer(32),o=new d({sz:32,buffer:s});let u=0;o.writeDouble(u,a[0].x),u+=8,o.writeDouble(u,a[0].y),u+=8,o.writeDouble(u,a[1].x),u+=8,o.writeDouble(u,a[1].y),u+=8,function(e,t,n,a){(0,r.g)(32<=a.size()),e.m_cp=(0,i.m)(i.P,2),e.m_cp[0].x=a.readDouble(0),e.m_cp[0].y=a.readDouble(8),e.m_cp[1].x=a.readDouble(16),e.m_cp[1].y=a.readDouble(24),e.m_XStart=t.x,e.m_YStart=t.y,e.m_XEnd=n.x,e.m_YEnd=n.y}(e,t,n,o)}(e.get(),n,h,T);else if("n"===c)e.createQuadraticRationalBezier(),function(e,t,n,r,i,a,s){e.dropAllAttributes();const o=new ArrayBuffer(40),u=new d({sz:40,buffer:o});let m=0;u.writeDouble(m,r.x),m+=8,u.writeDouble(m,r.y),m+=8,u.writeDouble(m,i),m+=8,u.writeDouble(m,a),m+=8,u.writeDouble(m,s),m+=8,function(e,t,n,r){e.m_cp.x=r.readDouble(0),e.m_cp.y=r.readDouble(8),e.m_weights[0]=r.readDouble(16),e.m_weights[1]=r.readDouble(24),e.m_weights[2]=r.readDouble(32),e.m_XStart=t.x,e.m_YStart=t.y,e.m_XEnd=n.x,e.m_YEnd=n.y}(e,t,n,u)}(e.get(),n,h,T[0],T[1].x,T[1].y,T[2].x);else if("q"===c)e.createQuadraticBezier(),e.get().construct(n,T[0],h);else{e.createEllipticArc();const t=!1;v(e.get(),n,h,x,t,-1,-1)}return u}function v(e,t,n,a,s,u,m){e.dropAllAttributes();const l=new ArrayBuffer(20),c=new d({sz:20,buffer:l});let h=0;c.writeDouble(h,a.x),h+=8,c.writeDouble(h,a.y),h+=8;let _=0;s?(m||(_|=8),u&&(_|=16)):_|=128,c.writeInt32(h,_),h+=4,function(e,t,n,a){0>=a.size()&&(0,r.q)("Byte_buffer out of range access"),e.m_bits=0,e.m_rotation=0,e.m_cosr=1,e.m_sinr=0,e.setStartXY(t),e.setEndXY(n);const s=i.P.getNAN();s.x=a.readDouble(0),s.y=a.readDouble(8);const u=a.readInt32(16);if(1&u)return e.m_semiMajorAxis=0,e.m_minorMajorRatio=1,e.m_interior.assign(s),e.m_center.setNAN(),e.m_sweepAngle=0,e.m_startAngle=0,(0,o.a6)(e),!1;let m=!!(64&u);const l=!!(128&u);let c=!!(32&u);const d=!!(8&u),h=!!(16&u),_=t.equals(n);m&&!_&&(m=!1,c=!0),c&&_&&(m=!0,c=!1,s.setCoords(0,0)),m||(l?c?(e.m_semiMajorAxis=1,e.m_minorMajorRatio=0,e.m_interior.assign(s),e.m_center.setNAN(),e.m_sweepAngle=0,e.m_startAngle=0):(e.constructCircularArcThreePoint(t,n,s),_&&d===e.isClockwise()&&e.reverse()):c?(e.m_semiMajorAxis=1,e.m_minorMajorRatio=0,e.m_center.setNAN(),e.m_sweepAngle=0,e.m_startAngle=0,(0,o.a6)(e),e.queryCoord2D(.5,e.m_interior)):(0,o.a7)(e,t,n,s,d,h)),m&&(e.m_center.assign(t),e.m_startAngle=s.x,e.m_sweepAngle=s.y,(0,o.a8)(e,Number.NaN,d,h),e.m_semiMajorAxis=0,e.m_minorMajorRatio=1,e.m_interior.setCoordsPoint2D(t)),e.setProjectionBehavior(0),(0,o.a6)(e)}(e,t,n,c)}function x(e,t,n,i,a){const s=e.getGeometryType();if(s===r.G.enumEllipticArc)return function(e,t,n,i,a){(0,r.g)(!(0,o.a5)(e));const s=e.getEndXY(),u=e.hasAttribute(1)&&!t,m=e.hasAttribute(2)&&!n;let l=Number.NaN,c=Number.NaN;if(u&&(l=e.getEndAttributeAsDbl(1,0)),m&&(c=e.getEndAttributeAsDbl(2,0)),e.isDegenerateToLine()||e.isDegenerate(0))return S(u,m,s.x,s.y,l,c,i,a),!0;const d=0===e.projectionBehavior(),h=!!d&&e.isClosed();if(d&&!h)a.startObject(),a.addFieldName("c"),a.startArray(),S(u,m,s.x,s.y,l,c,i,a),w(e.m_interior.x,e.m_interior.y,17,a),a.endArray(),a.endObject();else if(d){a.startObject(),a.addFieldName("a"),a.startArray(),S(u,m,s.x,s.y,l,c,i,a);const t=0,n=0;w(e.m_center.x+t,e.m_center.y+n,17,a);const r=!e.isMajor();a.addInt32(r?1:0);const o=e.isClockwise();a.addInt32(o?1:0),a.endArray(),a.endObject()}else{a.startObject(),a.addFieldName("a"),a.startArray(),S(u,m,s.x,s.y,l,c,i,a);const t=e;w(t.m_center.x,t.m_center.y,17,a);const n=!t.isMajor();a.addInt32(n?1:0);const r=t.isClockwise();a.addInt32(r?1:0),a.addDouble(t.m_rotation,17),a.addDouble(t.m_semiMajorAxis,17),a.addDouble(t.m_minorMajorRatio,17),a.endArray(),a.endObject()}return!1}(e,t,n,i,a);if(s===r.G.enumBezier)return A(e,t,n,i,a);if(s===r.G.enumRationalBezier2)return function(e,t,n,r,i){const a=e.getEndXY(),s=e.hasAttribute(1)&&!t,o=e.hasAttribute(2)&&!n;let u=Number.NaN,m=Number.NaN;s&&(u=e.getEndAttributeAsDbl(1,0)),o&&(m=e.getEndAttributeAsDbl(2,0)),i.startObject(),i.addFieldName("n"),i.startArray(),S(s,o,a.x,a.y,u,m,r,i),w(e.m_cp.x,e.m_cp.y,r,i);const l=r;return i.addDouble(e.m_weights[0],l),i.addDouble(e.m_weights[1],l),i.addDouble(e.m_weights[2],l),i.endArray(),i.endObject(),!1}(e,t,n,i,a);if(s===r.G.enumBezier2){const r=new o.J;return r.constructFromQuadraticSegment(e),A(r,t,n,i,a)}(0,r.t)("")}function A(e,t,n,r,i){const a=e.getEndXY(),s=e.hasAttribute(1)&&!t,o=e.hasAttribute(2)&&!n;let u=Number.NaN,m=Number.NaN;return s&&(u=e.getEndAttributeAsDbl(1,0)),o&&(m=e.getEndAttributeAsDbl(2,0)),i.startObject(),i.addFieldName("b"),i.startArray(),S(s,o,a.x,a.y,u,m,r,i),w(e.m_cp[0].x,e.m_cp[0].y,r,i),w(e.m_cp[1].x,e.m_cp[1].y,r,i),i.endArray(),i.endObject(),!1}function S(e,t,n,r,i,a,s,o){o.startArray(),o.addDouble(n,s),o.addDouble(r,s),e&&o.addDouble(i,s),t&&o.addDouble(a,s),o.endArray()}function w(e,t,n,r){r.startArray(),r.addDouble(e,n),r.addDouble(t,n),r.endArray()}function C(e,t,n,i){const a=n.getImpl(),u=!!(2&t),m=!!(4&t),l=!!(8&t),c=a.hasAttribute(1)&&!u,d=a.hasAttribute(2)&&!m,h=a.hasAttribute(3)&&!l,_=a.hasNonLinearSegments();c&&(i.addFieldName("hasZ"),i.addBool(!0)),d&&(i.addFieldName("hasM"),i.addBool(!0)),e?_?i.addFieldName("curveRings"):i.addFieldName("rings"):_?i.addFieldName("curvePaths"):i.addFieldName("paths");let f=null;const p=[];if(n.isEmpty())i.startArray(),i.endArray();else{const e=17-(31&t>>13);i.startArray();const l=n.getPathCount();let k=0;const b=a.getAttributeStreamRef(0);let y=null,g=null,N=null;const T=new o.S;let v=null,A=null,S=null;_&&(v=a.getSegmentFlagsStreamRef(),A=a.getSegmentIndexStreamRef(),S=a.getSegmentDataStreamRef()),c&&(y=a.getAttributeStreamRef(1)),d&&(g=a.getAttributeStreamRef(2)),h&&(N=a.getAttributeStreamRef(3),f=(0,s.Y)(3,0));for(let t=0;t<l;t++){i.startArray(),h&&p.push(0);const a=n.getPathEnd(t);if(k===a){i.endArray();continue}const s=n.isClosedPath(t);let o=b.read(2*k),l=b.read(2*k+1),_=c?y.read(k):Number.NaN,w=d?g.read(k):Number.NaN,C=h?N.read(k):0;D(c,d,o,l,_,w,e,i);let F=1;h&&(f.add(C),p[p.length-1]++);const j=o,O=l,I=_,z=w,E=C;let G=!1,P=0,B=Number.NaN,R=Number.NaN,V=0;for(let t=k+1,n=k,M=s?a+1:a;t<M;t++,n++){const s=null!==v?31&v.read(n):1;let k,M;if(t<a?(k=b.read(2*t),M=b.read(2*t+1),c&&(B=y.read(t)),d&&(R=g.read(t)),h&&(V=N.read(t))):(k=j,M=O,B=I,R=z,V=E),1!==s){G=!0,4===s?T.createEllipticArc():2===s?T.createCubicBezier():16===s?T.createQuadraticBezier():8===s?T.createQuadraticRationalBezier():(0,r.t)("JSON export.unsupported curve");const t=T.get(),a=A.read(n);t.setStartXYCoords(o,l),t.setEndXYCoords(k,M),c&&(t.setStartAttribute(1,0,_),t.setEndAttribute(1,0,B)),d&&(t.setStartAttribute(2,0,w),t.setEndAttribute(2,0,R)),t.readFromBufferStream(S,a),x(T.get(),u,m,e,i)&&P++}else D(c,d,k,M,B,R,e,i);h&&(f.add(V),p[p.length-1]++),F++,o=k,l=M,_=B,w=R,C=V}G&&0===P||(F<2&&P<1&&(D(c,d,o,l,_,w,e,i),F++,h&&(f.add(C),p[p.length-1]++)),s&&F<3&&P<2&&(D(c,d,j,O,I,z,e,i),F++,o=j,l=O,_=I,w=z,C=E,h&&(f.add(E),p[p.length-1]++))),i.endArray(),k=a}i.endArray()}if(h){i.addFieldName("ids"),i.startArray();let e=0;for(let t=0,n=p.length;t<n;++t){const n=p[t];(0,r.g)(0===n||null!==f&&e+n<=f.size()),i.startArray();for(let t=0;t<n;++t)i.addInt32(f.read(e)),e++;i.endArray()}i.endArray()}}function D(e,t,n,r,i,a,s,o){o.startArray(),o.addDouble(n,s),o.addDouble(r,s),e&&o.addDouble(i,s),t&&o.addDouble(a,s),o.endArray()}const F="a".charCodeAt(0),j="A".charCodeAt(0),O="*".charCodeAt(0),I="b".charCodeAt(0),z="\\".charCodeAt(0),E="[".charCodeAt(0),G="{".charCodeAt(0),P=":".charCodeAt(0),B=".".charCodeAt(0),R=",".charCodeAt(0),V='"'.charCodeAt(0),M="]".charCodeAt(0),U="}".charCodeAt(0),W="e".charCodeAt(0),X="E".charCodeAt(0),Y="f".charCodeAt(0),L="F".charCodeAt(0),q="/".charCodeAt(0),K="-".charCodeAt(0),J="+".charCodeAt(0),Z="n".charCodeAt(0),H="N".charCodeAt(0),Q="r".charCodeAt(0),$="t".charCodeAt(0),ee="u".charCodeAt(0),te="0".charCodeAt(0),ne="9".charCodeAt(0);class re{constructor(e){this.m_functionStack=[],this.m_pushPositions=[],this.m_utf8Decoder=new TextDecoder("utf-8",{fatal:!0}),void 0===e?(this.m_startToken=Number.MAX_SAFE_INTEGER,this.m_endToken=0,this.m_currentTokenType=0,this.m_functionStack.push(()=>this.accept_()),this.m_jsonString=null,this.m_bHasEscapes=!1):e.jsonString?this.resetParserFromString(e.jsonString):e.jsonStream?(0,r.t)("streaming json parsing not yet impl"):(0,r.d)("invalid constructor parameter")}prepSubstrString_(){}getCurrentSubstrString_(){return this.m_jsonString.slice(this.m_startToken,this.m_endToken)}stepOverCharString_(){this.m_endToken++}peekCharString_(){return this.m_jsonString.charCodeAt(this.m_endToken)}getString_(e){const t=this.m_jsonString?.slice(this.m_startToken,this.m_startToken+e-1);return this.m_endToken+=e-1,{s:t,bDone:this.m_endToken>=this.m_jsonString.length}}incrementString_(){this.m_endToken++}eofString_(){return this.m_endToken>=this.m_jsonString.length}setStringFunctions_(){this.m_prepSubstr=this.prepSubstrString_,this.m_getCurrentSubstr=this.getCurrentSubstrString_,this.m_stepOverChar=this.stepOverCharString_,this.m_peekChar=this.peekCharString_,this.m_get=this.getString_,this.m_increment=this.incrementString_,this.m_eof=this.eofString_}setStreamFunctions_(){(0,r.t)("streaming json parsing not yet impl")}reset_(){this.m_jsonString=null,this.m_endToken=0,this.m_startToken=Number.MAX_SAFE_INTEGER,this.m_currentTokenType=0,this.m_bHasEscapes=!1,this.m_functionStack.length=0,this.m_functionStack.push(()=>this.start_()),this.m_pushPositions.length=0}resetParserFromString(e){this.reset_(),this.setStringFunctions_(),this.m_jsonString=e}resetParserFromStream(e){(0,r.t)("streaming json parsing not yet impl")}resetToPosition(e){return!!this.m_jsonString&&(this.m_endToken=e,this.m_startToken=Number.MAX_VALUE,this.m_currentTokenType=0,this.m_functionStack.length=0,e>=this.m_jsonString.length?(this.m_functionStack.push(()=>this.accept_()),!1):(this.m_functionStack.push(()=>this.start_()),!0))}nextToken(){return this.m_functionStack.at(-1)(),this.m_currentTokenType}currentToken(){return this.m_currentTokenType}currentTokenStartIndex(){return this.m_startToken}currentTokenEndIndex(){return this.m_endToken}currentText(){return(0,r.g)(0),""}childrenAsString(){return(0,r.g)(0),""}skipChildren(){this.skipChildren_()}skipChildren_(){if(1===this.m_currentTokenType){let e=1;do{this.m_currentTokenType=this.nextToken(),1===this.m_currentTokenType?e++:3===this.m_currentTokenType&&e--}while(3!==this.m_currentTokenType||0!==e);return}if(2===this.m_currentTokenType){let e=1;do{this.m_currentTokenType=this.nextToken(),2===this.m_currentTokenType?e++:4===this.m_currentTokenType&&e--}while(4!==this.m_currentTokenType||0!==e);return}}currentTerminalAsString_(){switch(this.m_currentTokenType){case 7:case 8:case 9:return this.m_getCurrentSubstr().slice(0,this.m_endToken-this.m_startToken);case 10:return"null";case 11:return"true";case 12:return"false"}(0,r.a)("invalid token")}toUTF8_(e,t){let n=0,r=e;for(;t.charCodeAt(r)===z&&t.charCodeAt(r+1)===ee;)n++,r+=6;r=e;const i=new Uint8Array(n);let a=0;for(;t.charCodeAt(r)===z&&t.charCodeAt(r+1)===ee;)i[a++]=Number.parseInt(t.slice(r+2,r+6),16),r+=6;return{u8s:this.m_utf8Decoder.decode(i),end:r}}unquoteCurrentString_(){let e="",t=1;const n=this.m_endToken-this.m_startToken-1;let r=0;const i=this.m_getCurrentSubstr();for(let a=t;a<n;a++)if(i.charCodeAt(a)!==z)r++;else{switch(r>0&&(e+=i.slice(t,t+r)),i.charCodeAt(++a)){case V:e+='"';break;case ee:{const{u8s:t,end:n}=this.toUTF8_(a-1,i);a=n-1,e+=t;break}case z:e+="\\";break;case q:e+="/";break;case I:e+="\b";break;case Y:e+="\f";break;case Z:e+="\n";break;case Q:e+="\r";break;case $:e+="\t"}t=a+1,r=0}return r>0&&(e+=i.slice(t,t+r)),e}currentString(){return 5!==this.m_currentTokenType&&6!==this.m_currentTokenType?this.currentTerminalAsString_():this.m_bHasEscapes?this.unquoteCurrentString_():this.m_getCurrentSubstr().slice(1,this.m_endToken-this.m_startToken-2+1)}currentDoubleValue(){if(7!==this.m_currentTokenType&&8!==this.m_currentTokenType&&9!==this.m_currentTokenType&&6!==this.m_currentTokenType&&10!==this.m_currentTokenType&&(0,r.a)("invalid token"),10===this.m_currentTokenType)return Number.NaN;let e=this.m_getCurrentSubstr(),t=this.m_endToken-this.m_startToken;if(6===this.m_currentTokenType){if("NaN"===this.currentString())return Number.NaN;e=e.slice(1),t-=2,0===t&&(0,r.a)("invalid token")}const n=Number.parseFloat(e);if(6===this.m_currentTokenType)Number.isNaN(n)&&(0,r.a)("invalid token");else if(Number.isNaN(n))return Number.NaN;return n}currentInt32Value(){8!==this.m_currentTokenType&&6!==this.m_currentTokenType&&(0,r.a)("invalid token");let e=this.m_getCurrentSubstr(),t=this.m_endToken-this.m_startToken;6===this.m_currentTokenType&&(e=e.slice(1),t-=2,0===t&&(0,r.a)("invalid token"));const n=parseInt(e);return Number.isNaN(n)&&(0,r.a)("invalid token"),n}currentInt64Value(){return(0,r.g)(0),0n}currentBoolValue(){return(0,r.g)(0),!1}isError(){return 0}JSONString(){return(0,r.g)(0),""}pushPosition(){return(0,r.g)(0),!1}popPosition(){return(0,r.g)(0),!1}skipCStyleComments_(){(0,r.g)(0)}skipCppStyleComments_(){(0,r.g)(0)}skipComments_(){this.m_prepSubstr();let e=this.m_peekChar();this.m_stepOverChar(),this.m_eof()&&(0,r.a)("invalid token"),e=this.m_peekChar(),e===O?this.skipCStyleComments_():e===q?this.skipCppStyleComments_():(0,r.a)("invalid token")}skipWhiteSpace_(){let e;do{this.m_eof()&&(0,r.a)("invalid token");let t=this.m_peekChar();for(;t>=9&&t<=13||32===t;)this.m_increment(),this.m_eof()&&(0,r.a)("invalid token"),t=this.m_peekChar();t===q?(this.m_startToken=this.m_endToken,e=!0,this.skipComments_()):e=!1}while(e)}rightBracket_(){return this.m_peekChar()===M&&(this.m_startToken=this.m_endToken,this.m_increment(),this.m_currentTokenType=4,!0)}rightBrace_(){return this.m_peekChar()===U&&(this.m_startToken=this.m_endToken,this.m_increment(),this.m_currentTokenType=3,!0)}string_(){this.m_prepSubstr(),this.m_bHasEscapes=!1,this.m_stepOverChar(),this.m_eof()&&(0,r.a)("invalid token");let e=this.m_peekChar();for(;e!==V;){const t=e===z;if(this.m_stepOverChar(),this.m_eof()&&(0,r.a)("invalid token"),e=this.m_peekChar(),t)if(this.m_bHasEscapes=!0,e===V||e===z||e===q||e===I||e===Y||e===Z||e===Q||e===$)this.m_stepOverChar(),this.m_eof()&&(0,r.a)("invalid token"),e=this.m_peekChar();else if(e===ee)for(let t=0;t<4;t++)this.m_stepOverChar(),this.m_eof()&&(0,r.a)("invalid token"),e=this.m_peekChar(),e>=te&&e<=ne||e>=F&&e<=Y||e>=j&&e<=L||(0,r.a)("invalid token");else(0,r.a)("invalid token")}this.m_stepOverChar()}comma_(){return this.m_peekChar()===R&&(this.m_increment(),!0)}colon_(){return this.m_peekChar()===P&&(this.m_increment(),!0)}fieldNameEnd_(){this.skipWhiteSpace_(),this.m_functionStack.pop(),this.colon_()?(this.skipWhiteSpace_(),this.value_()):(0,r.a)("invalid token")}fieldNameStart_(){this.m_startToken=this.m_endToken,this.m_peekChar()!==V&&(0,r.a)("invalid token"),this.string_(),this.m_currentTokenType=5,this.m_functionStack.push(()=>this.fieldNameEnd_())}pairEnd_(){this.skipWhiteSpace_(),this.comma_()?(this.skipWhiteSpace_(),this.fieldNameStart_()):this.rightBrace_()?this.m_functionStack.pop():(0,r.a)("invalid token")}arrayStart_(){this.skipWhiteSpace_(),this.m_functionStack.pop(),this.rightBracket_()||(this.m_functionStack.push(()=>this.elementEnd_()),this.value_())}elementEnd_(){this.skipWhiteSpace_(),this.comma_()?(this.skipWhiteSpace_(),this.value_()):this.rightBracket_()?this.m_functionStack.pop():(0,r.a)("invalid token")}objectStart_(){this.skipWhiteSpace_(),this.m_functionStack.pop(),this.rightBrace_()||(this.m_functionStack.push(()=>this.pairEnd_()),this.fieldNameStart_())}valueStartObject_(){this.m_increment(),this.m_currentTokenType=1,this.m_functionStack.push(()=>this.objectStart_())}valueStartArray_(){this.m_increment(),this.m_currentTokenType=2,this.m_functionStack.push(()=>this.arrayStart_())}valueString_(){this.string_(),this.m_currentTokenType=6}int_(){this.m_peekChar()!==te?this.digits_():this.m_stepOverChar()}digits_(){let e=this.m_peekChar();do{this.m_stepOverChar(),this.m_eof()&&(0,r.a)("invalid token"),e=this.m_peekChar()}while(e>=te&&e<=ne)}frac_(){let e=this.m_peekChar();this.m_stepOverChar(),this.m_eof()&&(0,r.a)("invalid token"),e=this.m_peekChar(),e>=te&&e<=ne||(0,r.a)("invalid token"),this.digits_()}exp_(){let e=this.m_peekChar();this.m_stepOverChar(),this.m_eof()&&(0,r.a)("invalid token"),e=this.m_peekChar(),e!==J&&e!==K||(this.m_stepOverChar(),this.m_eof()&&(0,r.a)("invalid token"),e=this.m_peekChar()),e>=te&&e<=ne||(0,r.a)("invalid token"),this.digits_()}valueNumber_(){this.m_prepSubstr();let e=!1,t=this.m_peekChar();if(t===K?(this.m_stepOverChar(),this.m_eof()&&(0,r.a)("invalid token"),t=this.m_peekChar(),e=!0,t>=te&&t<=ne||(0,r.a)("invalid token"),this.int_()):this.int_(),t=this.m_peekChar(),t===B)this.m_currentTokenType=7,this.frac_(),t=this.m_peekChar(),t!==W&&t!==X||this.exp_();else if(t===W||t===X)this.m_currentTokenType=7,this.exp_();else{let t=0;e&&t++;const n=this.m_endToken-this.m_startToken-t;if(n<10)this.m_currentTokenType=8;else if(10===n){const n=this.m_getCurrentSubstr();e?n.slice(t)<="2147483648"?this.m_currentTokenType=8:this.m_currentTokenType=9:n.slice(t)<="2147483647"?this.m_currentTokenType=8:this.m_currentTokenType=9}else if(n<19)this.m_currentTokenType=9;else if(19===n){const n=this.m_getCurrentSubstr();e?n.slice(t)<="9223372036854775808"?this.m_currentTokenType=9:this.m_currentTokenType=7:n.slice(t)<="9223372036854775807"?this.m_currentTokenType=9:this.m_currentTokenType=7}else this.m_currentTokenType=7}}valueNull_(){const{s:e,bDone:t}=this.m_get(5);t&&(0,r.a)("invalid token"),"null"!==e&&(0,r.a)("invalid token"),this.m_currentTokenType=10}valueTrue_(){const{s:e,bDone:t}=this.m_get(5);t&&(0,r.a)("invalid token"),"true"!==e&&(0,r.a)("invalid token"),this.m_currentTokenType=11}valueFalse_(){const{s:e,bDone:t}=this.m_get(6);t&&(0,r.a)("invalid token"),"false"!==e&&(0,r.a)("invalid token"),this.m_currentTokenType=12}valueNan_(){const{s:e,bDone:t}=this.m_get(4);t&&(0,r.a)("invalid token"),"NaN"!==e&&(0,r.a)("invalid token"),this.m_currentTokenType=7}value_(){this.m_startToken=this.m_endToken;const e=this.m_peekChar();e===G?this.valueStartObject_():e===E?this.valueStartArray_():e===V?this.valueString_():e===K||e>=te&&e<=te+9?this.valueNumber_():e===Z?this.valueNull_():e===$?this.valueTrue_():e===Y?this.valueFalse_():e===H?this.valueNan_():(0,r.a)("invalid token")}start_(){this.skipWhiteSpace_(),this.m_functionStack.pop(),this.m_functionStack.push(()=>this.accept_());const e=this.m_peekChar();e!==G&&e!==E&&(0,r.a)("invalid token"),this.value_()}accept_(){this.m_startToken=this.m_endToken,this.m_currentTokenType=0}}const ie=new class{constructor(){this.m_pendingKey=null,this.m_acceptedObject=null,this.m_currentObject=[]}reset(){this.m_pendingKey=null,this.m_acceptedObject=null,this.m_currentObject.length=0}startObject(){const e={};this.m_pendingKey?(this.m_currentObject.at(-1)[this.m_pendingKey]=e,this.m_pendingKey=null):Array.isArray(this.m_currentObject.at(-1))&&this.m_currentObject.at(-1).push(e),this.m_currentObject.push(e)}startArray(){const e=[];this.m_pendingKey?(this.m_currentObject.at(-1)[this.m_pendingKey]=e,this.m_pendingKey=null):Array.isArray(this.m_currentObject.at(-1))&&this.m_currentObject.at(-1).push(e),this.m_currentObject.push(e)}endObject(){this.m_acceptedObject=this.m_currentObject.at(-1),this.m_currentObject.pop()}endArray(){this.m_currentObject.pop()}addFieldName(e){this.m_pendingKey=e}addValue_(e){this.m_pendingKey?(this.m_currentObject.at(-1)[this.m_pendingKey]=e,this.m_pendingKey=null):this.m_currentObject.at(-1).push(e)}addString(e){this.addValue_(e)}addDouble(e,t){this.addValue_(e)}addInt64(e){(0,r.g)(0)}addInt32(e){this.addValue_(e)}addBool(e){this.addValue_(e)}addNull(){this.addValue_(null)}getObject(){return this.m_acceptedObject}},ae=new class{getOperatorType(){return 10405}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}execute(e,t,n,i,s,o){!function(e,t,n,i){if(t||n){if(i.startObject(),null!==t)switch(t.getGeometryType()){case r.G.enumPolygon:C(!0,e,t,i);break;case r.G.enumPolyline:C(!1,e,t,i);break;case r.G.enumMultiPoint:!function(e,t,n){const i=t.getImpl(),a=i.hasAttribute(1)&&!(2&e),s=i.hasAttribute(2)&&!(4&e),o=i.hasAttribute(3)&&!(8&e);a&&(n.addFieldName("hasZ"),n.addBool(!0)),s&&(n.addFieldName("hasM"),n.addBool(!0)),n.addFieldName("points");const u=t.getPointCount();if(t.isEmpty())n.startArray(),n.endArray();else{const t=17-(31&e>>13);n.startArray();const r=i.getAttributeStreamRef(0);let o=null,m=null;a&&(o=i.getAttributeStreamRef(1)),s&&(m=i.getAttributeStreamRef(2));for(let e=0;e<u;e++){const i=r.read(2*e),u=r.read(2*e+1);let l=Number.NaN,c=Number.NaN;a&&(l=o.read(e)),s&&(c=m.read(e)),D(a,s,i,u,l,c,t,n)}n.endArray()}if(o){let e=null;i.isEmpty()||(e=i.getAttributeStreamRef(3)),(0,r.g)(0===u||null!==e&&e.size()>=u),n.addFieldName("ids"),n.startArray();for(let t=0;t<u;t++)n.addInt32(e.read(t));n.endArray()}}(e,t,i);break;case r.G.enumPoint:!function(e,t,n){const r=t.hasAttribute(1)&&!(2&e),i=t.hasAttribute(2)&&!(4&e),a=t.hasAttribute(3)&&!(8&e);if(t.isEmpty())return n.addFieldName("x"),n.addNull(),n.addFieldName("y"),n.addNull(),r&&(n.addFieldName("z"),n.addNull()),i&&(n.addFieldName("m"),n.addNull()),void(a&&(n.addFieldName("id"),n.addInt32(0)));const s=17-(31&e>>13);n.addFieldName("x"),n.addDouble(t.getX(),s),n.addFieldName("y"),n.addDouble(t.getY(),s),r&&(n.addFieldName("z"),n.addDouble(t.getZ(),s)),i&&(n.addFieldName("m"),n.addDouble(t.getM(),s)),a&&(n.addFieldName("id"),n.addInt32(t.getID()))}(e,t,i);break;case r.G.enumEnvelope:!function(e,t,n){const r=t.hasAttribute(1)&&!(2&e),i=t.hasAttribute(2)&&!(4&e),a=t.hasAttribute(3)&&!(8&e);if(t.isEmpty())return n.addFieldName("xmin"),n.addNull(),n.addFieldName("ymin"),n.addNull(),n.addFieldName("xmax"),n.addNull(),n.addFieldName("ymax"),n.addNull(),r&&(n.addFieldName("zmin"),n.addNull(),n.addFieldName("zmax"),n.addNull()),i&&(n.addFieldName("mmin"),n.addNull(),n.addFieldName("mmax"),n.addNull()),void(a&&(n.addFieldName("idmin"),n.addInt32(0),n.addFieldName("idmax"),n.addInt32(0)));const s=17-(31&e>>13);if(n.addFieldName("xmin"),n.addDouble(t.getXMin(),s),n.addFieldName("ymin"),n.addDouble(t.getYMin(),s),n.addFieldName("xmax"),n.addDouble(t.getXMax(),s),n.addFieldName("ymax"),n.addDouble(t.getYMax(),s),r){const e=t.queryInterval(1,0);n.addFieldName("zmin"),n.addDouble(e.vmin,s),n.addFieldName("zmax"),n.addDouble(e.vmax,s)}if(i){const e=t.queryInterval(2,0);n.addFieldName("mmin"),n.addDouble(e.vmin,s),n.addFieldName("mmax"),n.addDouble(e.vmax,s)}if(a){const e=t.queryInterval(3,0);n.addFieldName("idmin"),n.addInt32(e.vmin),n.addFieldName("idmax"),n.addInt32(e.vmax)}}(e,t,i);break;case r.G.enumMultipatch:(0,r.g)(0);break;default:(0,r.d)("exportToJSON")}null!==n&&(i.addFieldName("spatialReference"),function(e,t,n){n.startObject();let i=0;t.isCustomWkid()||(i=t.getOldID());let s=0;const o=t.getVCS();if(null!==o&&(o.isCustomWkid()||(s=o.getOldID()),s<=0&&(i=0)),i>0){n.addFieldName("wkid"),n.addInt32(i);const e=t.getLatestID();if(e>0&&e!==i&&(n.addFieldName("latestWkid"),n.addInt32(e)),s>0){n.addFieldName("vcsWkid"),n.addInt32(s);const e=t.getLatestVerticalID();e!==s&&(n.addFieldName("latestVcsWkid"),n.addInt32(e))}}if(0===t.getCoordinateSystemType())n.addFieldName("wkid"),n.addNull(),null!==t.getUnit()&&(n.addFieldName("unit"),function(e,t,n){n.startObject();const i=t.getID();i<=0&&(0,r.a)("cannot export unit that has no valid WKID"),n.addFieldName("uwkid"),n.addInt32(i),n.endObject()}(0,t.getUnit(),n));else if(i<=0||1&e){let r="";64&e&&(r=t.getText2(),n.addFieldName("wkt2"),n.addString(r));const i=t.getText();i!==r&&(n.addFieldName("wkt"),n.addString(i))}if(16&e){const e=new a.a;t.queryPrecisionDescriptor(e),n.addFieldName("xyTolerance"),n.addDouble(e.getTolerance(0)),n.addFieldName("zTolerance"),n.addDouble(e.getTolerance(1)),n.addFieldName("mTolerance"),n.addDouble(e.getTolerance(2)),n.addFieldName("falseX"),n.addDouble(e.getFalseX()),n.addFieldName("falseY"),n.addDouble(e.getFalseY()),n.addFieldName("xyUnits"),n.addDouble(e.getGridUnitsXY()),n.addFieldName("falseZ"),n.addDouble(e.getFalseZ()),n.addFieldName("zUnits"),n.addDouble(e.getGridUnitsZ()),n.addFieldName("falseM"),n.addDouble(e.getFalseM()),n.addFieldName("mUnits"),n.addDouble(e.getGridUnitsM())}n.endObject()}(e,n,i)),i.endObject()}}(e,t,n,i)}exportSpatialReference(e,t,n,i){(0,r.g)(0)}exportProjectionTransformation(e,t,n,i){(0,r.g)(0)}exportDatumTransformation(e,t,n,i){(0,r.g)(0)}static geometryTypeToString(e){return(0,r.g)(0),""}},se=new class{getOperatorType(){return 10404}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}execute(e,t,n,i,u,m,l){let c;"string"==typeof n?(c=new re({jsonString:n}),c.nextToken()):c=n,1!==c.currentToken()&&(0,r.a)("failed to import map geometry: start of object is expected");const d=function(e,t,n,i,a){let u=!1,m=!1,l=!1,c=!1,d=!1,h=!1,g=!1,N=!1,T=!1,v=!1,x=!1,A=!1,S=!1,w=!1,C=!1,D=!1,F=!1,j=!1,O=!1,I=!1,z=!1,E=!1,G=!1,P=!1,B=Number.NaN,R=Number.NaN,V=Number.NaN,M=Number.NaN,U=0,W=Number.NaN,X=Number.NaN,Y=Number.NaN,L=Number.NaN,q=Number.NaN,K=Number.NaN,J=Number.NaN,Z=Number.NaN,H=0,Q=0,$=!1,ee=!1,te=null,ne=null,re=null,ie=null,ae=null;for(;3!==n.nextToken();){const t=n.currentString();if(n.nextToken(),"spatialReference"===t){if(a&&!u){u=!0,1===n.currentToken()?ie=_(n):10!==n.currentToken()&&(0,r.a)("failed to parse spatial reference: object or null is expected");continue}}else if(i)if("hasZ"===t){if(!m){m=!0,$=11===n.currentToken();continue}}else if("hasM"===t){if(!l){l=!0,ee=11===n.currentToken();continue}}else if("rings"===t){if(!(d||h||e!==r.G.enumUnknown&&e!==r.G.enumPolygon)){d=!0,({geometry:ae,as:te,bs:ne}=f(!0,!1,0,n));continue}}else if("curveRings"===t){if(!h&&(e===r.G.enumUnknown||e===r.G.enumPolygon)){h=!0,({geometry:ae,as:te,bs:ne}=f(!0,!0,0,n));continue}}else if("paths"===t){if(!(g||N||e!==r.G.enumUnknown&&e!==r.G.enumPolyline)){g=!0,({geometry:ae,as:te,bs:ne}=f(!1,!1,0,n));continue}}else if("curvePaths"===t){if(!N&&(e===r.G.enumUnknown||e===r.G.enumPolyline)){N=!0,({geometry:ae,as:te,bs:ne}=f(!1,!0,0,n));continue}}else if("points"===t){if(!T&&(e===r.G.enumUnknown||e===r.G.enumMultiPoint)){T=!0,({geometry:ae,as:te,bs:ne}=p(0,n));continue}}else if("ids"===t){if(!c){c=!0,re=k(0,n);continue}}else if("x"===t){if(!v&&(e===r.G.enumUnknown||e===r.G.enumPoint)){v=!0,B=b(n);continue}}else if("y"===t){if(!x&&(e===r.G.enumUnknown||e===r.G.enumPoint)){x=!0,R=b(n);continue}}else if("z"===t){if(!A&&(e===r.G.enumUnknown||e===r.G.enumPoint)){A=!0,V=b(n);continue}}else if("m"===t){if(!S&&(e===r.G.enumUnknown||e===r.G.enumPoint)){S=!0,M=b(n);continue}}else if("id"===t){if(!w&&(e===r.G.enumUnknown||e===r.G.enumPoint)){w=!0,U=y(n);continue}}else if("xmin"===t){if(!C&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){C=!0,W=b(n);continue}}else if("ymin"===t){if(!D&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){D=!0,X=b(n);continue}}else if("mmin"===t){if(!z&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){z=!0,J=b(n);continue}}else if("zmin"===t){if(!O&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){O=!0,q=b(n);continue}}else if("idmin"===t){if(!G&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){G=!0,H=y(n);continue}}else if("xmax"===t){if(!F&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){F=!0,Y=b(n);continue}}else if("ymax"===t){if(!j&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){j=!0,L=b(n);continue}}else if("mmax"===t){if(!E&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){E=!0,Z=b(n);continue}}else if("zmax"===t){if(!I&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){I=!0,K=b(n);continue}}else if("idmax"===t){if(!P&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){P=!0,Q=y(n);continue}}else"materials"===t&&(0,r.g)(0);n.skipChildren()}if(d||h||g||N||T){let e=null,t=null;const n=ae;$&&(ae.addAttribute(1),e=te,e||(e=(0,s.a1)(n.getPointCount(),Number.NaN))),ee&&(ae.addAttribute(2),t=$?ne:te),null!=re&&ae.addAttribute(3),$&&null!=e&&n.setAttributeStreamRef(1,e),ee&&null!=t&&n.setAttributeStreamRef(2,t),null!=re&&function(e,t){if(e.isEmpty())return;const n=(0,s.a6)(2,0),i=e.getGeometryType();let a=0;i===o.M.type?a=1:i===o.P.type||i===o.a.type?a=e.getPathCount():(0,r.d)("not implemented"),n.resize(e.getPointCount(),0);let u=0;for(let s=0;s<a;++s){const a=t.read(u);u++;const m=u+a;let l=0,c=0;i===o.M.type?l=e.getPointCount():i===o.P.type||i===o.a.type?(l=e.getPathSize(s),c=e.getPathStart(s)):(0,r.d)("not implemented");for(let e=0,r=Math.min(a,l);e<r;++e)n.write(c,t.read(u)),u++,c++;u=m}e.getImpl().setAttributeStreamRef(3,n)}(n,re)}else if(v||x||S||A||w){(0,s.a4)(B,R)||(0,r.a)("failed to parse point: x and y must be finite or nan"),(Number.isNaN(R)||Number.isNaN(B))&&(B=Number.NaN,R=Number.NaN);const e=new s.P({x:B,y:R});A&&e.setZ(V),S&&e.setM(M),w&&e.setID(U),ae=e}else if(C||D||F||j||O||I||z||E||G||P){(Number.isNaN(X)||Number.isNaN(Y)||Number.isNaN(L))&&(W=Number.NaN);const e=new s.E({xmin:W,ymin:X,xmax:Y,ymax:L});O&&I&&e.setInterval(1,0,q,K),z&&E&&e.setInterval(2,0,J,Z),G&&P&&e.setInterval(3,0,H,Q),ae=e}return{...ae?{geom:ae}:{},...ie?{sr:ie}:{}}}(t,0,c,i,u);return new a.aY(d)}importSpatialReference(e){const t=_(e);return null===t&&(0,r.d)("failed to import spatial reference"),t}importProjectionTransformation(e,t){return(0,r.g)(0),{}}importDatumTransformation(e,t){return(0,r.g)(0),{}}static stringToGeometryType(e){return(e=e.toLowerCase()).startsWith("esrigeometry")||(0,r.a)("string_to_geometry_type"),e.endsWith("point")?r.G.enumPoint:e.endsWith("envelope")?r.G.enumEnvelope:e.endsWith("multipoint")?r.G.enumMultiPoint:e.endsWith("polyline")?r.G.enumPolyline:e.endsWith("polygon")?r.G.enumPolygon:void(0,r.a)("string_to_geometry_type")}};function oe(e){return Array.isArray(e)?e[0].spatialReference:e.spatialReference}function ue(e,t){const{includeGeometry:n=!0,includeSpatialReference:i=!0}=t??{};i&&(e.spatialReference?.latestVcsWkid||e.spatialReference?.vcsWkid)&&(e={...e,spatialReference:{...e.spatialReference}},delete e.spatialReference?.latestVcsWkid,delete e.spatialReference?.vcsWkid);const a=new c(e,{strict:!1});return a.nextToken(),se.execute(0,r.G.enumUnknown,a,n,i)}function me(e){let t=null;return[e.map(e=>{if(null==t){const n=le(e);return t=n.getSpatialReference(),n.getGeometry()}return ce(e)}),t]}function le(e){if(e.spatialReference instanceof u.A){const{wkt2:t}=e.spatialReference;e={...e,spatialReference:e.spatialReference.toJSON()},e.spatialReference.wkt2??=t}return ue(e)}function ce(e){return ue(e,{includeSpatialReference:!1}).getGeometry()}function de(e){if(e instanceof u.A){const{wkt2:t}=e;e=e.toJSON(),e.wkt2??=t}const t=ue({x:0,y:0,spatialReference:e},{includeGeometry:!1}).getSpatialReference();return 0!==t?.getCoordinateSystemType()?t:null}function he(e,t){return e instanceof a.aY&&(t=e.getSpatialReference(),e=e.getGeometry()),e?.isEmpty()?null:(ie.reset(),ae.execute(0,e,t,ie),ie.getObject())}},90293:(e,t,n)=>{n(79187),n(55537),n(88885),n(95213),n(83661);var r=n(39117),i=n(86211),a=n(21325);(0,r.k)()||(0,r.l)(e=>{let t,n;"number"==typeof e?t=e:n=e;const r={wkid:t,wkt:n};let s,o;if(n){s=(0,i.x1)(n);const e=(0,a.EA)(r);if(!s&&!e)throw new Error(`Unsupported WKT type: ${n}`)}else s=!(0,a.EA)(r);return o=t&&i.yD.has(t)?Math.PI/200:s?(0,i.Ao)(r):Math.PI/180,{isPCS:s,metersOrRadiansPerUnit:o,semiMajor:0,wkidOrWkt:e}})}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[807,3169,8125],{10767:(e,t,n)=>{n.d(t,{a:()=>o,e:()=>u,i:()=>c,s:()=>i});var r=n(70031),a=n(78125);const s=new r.O;function o(e){const t=(0,a.getSpatialReference)(e);return s.accelerateGeometry((0,a.fromGeometry)(e),(0,a.fromSpatialReference)(t),1)}function u(e,t){return s.execute((0,a.fromGeometry)(e),(0,a.fromGeometry)(t),(0,a.fromSpatialReference)(e.spatialReference),null)}const i=s.supportsCurves(),c=Object.freeze(Object.defineProperty({__proto__:null,accelerateGeometry:o,execute:u,supportsCurves:i},Symbol.toStringTag,{value:"Module"}))},25275:(e,t,n)=>{n.r(t),n.d(t,{accelerateGeometry:()=>r.a,execute:()=>r.e,supportsCurves:()=>r.s}),n(70031),n(78125);var r=n(10767)},70031:(e,t,n)=>{n.d(t,{O:()=>a});var r=n(39117);class a extends r.I{getOperatorType(){return 4}execute(e,t,n,a){return!(0,r.J)(e,t,n,4,a)}}},76061:(e,t,n)=>{n.d(t,{G:()=>r,S:()=>a});class r{*[Symbol.iterator](){let e=this.next();for(;e;)yield e,e=this.next()}}class a extends r{constructor(e){super(),this.m_iGeom=-1,this.m_aGeoms=e?e.slice():[]}next(){if(this.m_iGeom<this.m_aGeoms.length-1){const e=this.m_aGeoms[++this.m_iGeom];return this.m_aGeoms[this.m_iGeom]=null,e}return null}tock(){return!1}getGeometryID(){return this.m_iGeom}getRank(){return 1}}},78125:(e,t,n)=>{n.r(t),n.d(t,{fromExtent:()=>G,fromGeometry:()=>x,fromMultipoint:()=>C,fromPoint:()=>M,fromPolygon:()=>V,fromPolyline:()=>v,fromSpatialReference:()=>R,getSpatialReference:()=>g,toExtent:()=>d,toGeometry:()=>P,toMultipoint:()=>w,toPoint:()=>Z,toPolygon:()=>_,toPolyline:()=>S});var r=n(83661),a=(n(79187),n(55537)),s=n(95213),o=n(88885),u=n(5443),i=n(48526),c=n(86738),l=n(39829),m=n(82799),f=(n(90293),n(83299));const h="_gxVersion",p=2,y=1;function g(e){return Array.isArray(e)?e[0].spatialReference:e.spatialReference}function x(e){switch(e.type){case"point":return M(e);case"multipoint":return C(e);case"polyline":return v(e);case"polygon":return V(e);case"extent":return G(e);default:throw new Error(`Unsupported geometry type: ${e.type}`)}}function G(e){if(!e.getCacheValue(h)){const t=new s.E;t.setCoords(e.xmin,e.ymin,e.xmax,e.ymax),e.hasM&&t.setInterval(p,0,e.mmin,e.mmax),e.hasZ&&t.setInterval(y,0,e.zmin,e.zmax),e.setCacheValue(h,t)}return e.getCacheValue(h)}function C(e){if(!e.getCacheValue(h)){const t=new o.M,n=new s.P,r=e.points,a=e.hasM,u=e.hasZ,i=u?3:2;for(let e=0,s=r.length;e<s;e++){const s=r[e];n.setXYCoords(s[0],s[1]),u&&n.setZ(s[2]??0),a&&n.setM(s[i]??NaN),t.add(n)}e.setCacheValue(h,t)}return e.getCacheValue(h)}function M(e){if(!e.getCacheValue(h)){const t=new s.P;t.setXYCoords(e.x,e.y),e.hasM&&t.setM(e.m),e.hasZ&&t.setZ(e.z),e.setCacheValue(h,t)}return e.getCacheValue(h)}function V(e){if(!e.getCacheValue(h)){const{curveRings:t,hasM:n,hasZ:r,rings:a}=e,s=(0,f.fromGeometryToGXGeometry)({curveRings:t,hasM:n,hasZ:r,rings:a});e.setCacheValue(h,s)}return e.getCacheValue(h)}function v(e){if(!e.getCacheValue(h)){const{curvePaths:t,hasM:n,hasZ:r,paths:a}=e,s=(0,f.fromGeometryToGXGeometry)({curvePaths:t,hasM:n,hasZ:r,paths:a});e.setCacheValue(h,s)}return e.getCacheValue(h)}function R(e){return(0,f.fromSpatialReference)(e)}function P(e,t){if(e)switch(e.getGeometryType()){case a.G.enumPoint:return Z(e,t);case a.G.enumEnvelope:return d(e,t);case a.G.enumMultiPoint:return w(e,t);case a.G.enumPolyline:return S(e,t);case a.G.enumPolygon:return _(e,t)}return null}function d(e,t){if(e.isEmpty())return null;const n=new u.A({xmin:e.getXMin(),ymin:e.getYMin(),xmax:e.getXMax(),ymax:e.getYMax(),spatialReference:t}),r=e.getDescription();if(r.hasM()){const t=e.queryInterval(p,0);n.mmin=t.vmin,n.mmax=t.vmax}if(r.hasZ()){const t=e.queryInterval(y,0);n.zmin=t.vmin,n.zmax=t.vmax}return n.setCacheValue(h,e),n}function w(e,t){if(e.isEmpty())return null;const n=e.getDescription(),r=n.hasM(),a=n.hasZ(),o=[],u=new s.P;for(let t=0,n=e.getPointCount();t<n;t++){e.getPointByVal(t,u);const n=[u.getX(),u.getY()];a&&n.push(u.getZ()),r&&n.push(u.getM()),o.push(n)}const c=new i.A({hasM:r,hasZ:a,points:o,spatialReference:t});return c.setCacheValue(h,e),c}function Z(e,t){if(e instanceof r.P)return new c.A({x:e.x,y:e.y,spatialReference:t});if(e.isEmpty())return null;const n=new c.A({x:e.getX(),y:e.getY(),spatialReference:t}),a=e.getDescription();return a.hasM()&&(n.m=e.getM()),a.hasZ()&&(n.z=e.getZ()),n.setCacheValue(h,e),n}function _(e,t){if(e.isEmpty())return null;const n=l.A.fromJSON({spatialReference:t,...(0,f.toGeometry)(e,null)});return n.setCacheValue(h,e),n}function S(e,t){if(e.isEmpty())return null;const n=m.A.fromJSON({spatialReference:t,...(0,f.toGeometry)(e,null)});return n.setCacheValue(h,e),n}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4649],{159:(e,t,i)=>{i.d(t,{A:()=>l});var n,s=i(31635),r=i(69622),a=i(91429),o=i(99157);let l=n=class extends r.A{constructor(e){super(e),this.steps=[]}getInverse(){const e=new n;for(let t=this.steps.length-1;t>=0;t--){const i=this.steps[t];e.steps.push(i.getInverse())}return e}};(0,s.Cg)([(0,a.MZ)({type:[o.A],nonNullable:!0})],l.prototype,"steps",void 0),l=n=(0,s.Cg)([(0,a.$K)("esri.geometry.operators.support.GeographicTransformation")],l)},4197:(e,t,i)=>{i.d(t,{Vj:()=>u,cj:()=>l,jh:()=>r,l5:()=>o,xm:()=>a});var n=i(34275),s=i(9093);function r(e){return e<=n.y9?new Array(e).fill(0):new Float64Array(e)}function a(e){return((0,n.iu)(e)?e.byteLength/8:e.length)<=n.y9?Array.from(e):new Float64Array(e)}function o(e,t,i){return Array.isArray(e)?e.slice(t,t+i):e.subarray(t,t+i)}function l(e){return[...e]}function u(e){const t=(0,s.vt)();for(let i=0;i<16;++i)t[i]=e[i];return t}},5834:(e,t,i)=>{i.d(t,{A:()=>d});var n=i(31635),s=i(93637),r=i(91429),a=i(56507),o=i(41266),l=i(41366),u=i(93223);function c(e,t,i){(0,s.sM)(i,e instanceof Date?e.getTime():e,t)}let d=class extends((0,l.K)(o.A)){constructor(e){super(e),this.numBins=null,this.end=null,this.start=null,this.type="auto-interval"}};(0,n.Cg)([(0,r.MZ)({type:Number,json:{name:"parameters.numberOfBins",write:!0}})],d.prototype,"numBins",void 0),(0,n.Cg)([(0,r.MZ)({json:{name:"parameters.end",write:{writer:c}}})],d.prototype,"end",void 0),(0,n.Cg)([(0,r.MZ)({json:{name:"parameters.start",write:{writer:c}}})],d.prototype,"start",void 0),(0,n.Cg)([(0,u.e)({autoIntervalBin:"auto-interval"},{readOnly:!0})],d.prototype,"type",void 0),d=(0,n.Cg)([(0,r.$K)("esri.rest.support.AutoIntervalBinParameters")],d),d.from=(0,a.dp)(d)},8384:(e,t,i)=>{i.d(t,{G:()=>b});var n=i(4718),s=i(12359),r=i(90634),a=i(62577),o=i(21325),l=i(29441),u=i(51441),c=i(30524),d=i(87445),p=i(1873),f=i(43668);class h{constructor(e,t,i){this._fieldDataCache=new Map,this._returnDistinctMap=new Map,this.returnDistinctValues=e.returnDistinctValues??!1,this.fieldsIndex=i,this.featureAdapter=t;const n=e.outFields;if(n&&!n.includes("*")){this.outFields=n;let e=0;for(const t of n){const n=(0,l.Wq)(t),s=this.fieldsIndex.get(n),r=s?null:(0,l.j4)(n,i),a=s?s.name:(0,l.SY)(t)||"FIELD_EXP_"+e++;this._fieldDataCache.set(t,{alias:a,clause:r})}}}countDistinctValues(e){return this.returnDistinctValues?(e.forEach(e=>this.getAttributes(e)),this._returnDistinctMap.size):e.length}getAttributes(e){const t=this._processAttributesForOutFields(e);return this._processAttributesForDistinctValues(t)}getFieldValue(e,t,i){if(i)return this.featureAdapter.getAttribute(e,i.name);const n=t;let s=null;return this._fieldDataCache.has(n)?s=this._fieldDataCache.get(n)?.clause:i||(s=(0,l.j4)(t,this.fieldsIndex),this._fieldDataCache.set(n,{alias:n,clause:s})),s?.calculateValue(e,this.featureAdapter)}getDataValues(e,t,i=!0){const n=t.normalizationType,s=t.normalizationTotal,r=this.fieldsIndex.get(t.field),a=(0,c.zD)(r)||(0,c.Ah)(r),o=(0,c.OH)(r);return e.map(e=>{let r=t.field&&this.getFieldValue(e,t.field,this.fieldsIndex.get(t.field));if(t.field2?(r=`${(0,p.gJ)(r)}${t.fieldDelimiter}${(0,p.gJ)(this.getFieldValue(e,t.field2,this.fieldsIndex.get(t.field2)))}`,t.field3&&(r=`${r}${t.fieldDelimiter}${(0,p.gJ)(this.getFieldValue(e,t.field3,this.fieldsIndex.get(t.field3)))}`)):"string"==typeof r&&i&&(a?r=r?new Date(r).getTime():null:o&&(r=r?(0,d.rb)(r):null)),n&&Number.isFinite(r)){const i="field"===n&&t.normalizationField?this.getFieldValue(e,t.normalizationField,this.fieldsIndex.get(t.normalizationField)):null;r=(0,p.zS)(r,n,i,s)}return r})}async getExpressionValues(e,t,i,n,s){const{arcadeUtils:r}=await(0,f.l)(),a=r.hasGeometryOperations(t);a&&await r.enableGeometryOperations();const o=r.createFunction(t),l=r.getViewInfo(i),c={fields:this.fieldsIndex.fields};return e.map(e=>{const t={attributes:this.featureAdapter.getAttributes(e),layer:c,geometry:a?{...(0,u.pL)(n.geometryType,this.featureAdapter.getGeometry(e)),spatialReference:i?.spatialReference}:null},d=r.createExecContext(t,l,s);return r.executeFunction(o,d)})}validateItem(e,t){return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:(0,l.j4)(t,this.fieldsIndex)}),this._fieldDataCache.get(t)?.clause?.testFeature(e,this.featureAdapter)??!1}validateItems(e,t){return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:(0,l.j4)(t,this.fieldsIndex)}),this._fieldDataCache.get(t)?.clause?.testSet(e,this.featureAdapter)??!1}_processAttributesForOutFields(e){const t=this.outFields;if(!t?.length)return this.featureAdapter.getAttributes(e);const i={};for(const n of t){const{alias:t,clause:s}=this._fieldDataCache.get(n);i[t]=s?s.calculateValue(e,this.featureAdapter):this.featureAdapter.getAttribute(e,t)}return i}_processAttributesForDistinctValues(e){if(null==e||!this.returnDistinctValues)return e;const t=this.outFields,i=[];if(t)for(const n of t){const{alias:t}=this._fieldDataCache.get(n);i.push(e[t])}else for(const t in e)i.push(e[t]);const n=`${(t||["*"]).join(",")}=${i.join(",")}`;let s=this._returnDistinctMap.get(n)||0;return this._returnDistinctMap.set(n,++s),s>1?null:e}}var m=i(31464),y=i(58727);class g{constructor(e,t,i){this.objectId=e,this.target=t,this.distance=i}}class x extends g{constructor(e,t,i){super(e,t,i),this.type="vertex"}}class F extends g{constructor(e,t,i,n,s,r=!1){super(e,t,i),this.start=n,this.end=s,this.draped=r,this.type="edge"}}var _=i(5834),v=i(59977),w=i(57231),S=i(11440),I=i(60909),R=i(98623),T=i(28097);const M="bin";class b{constructor(e,t,i){this.items=e,this.query=t,this.geometryType=i.geometryType,this.hasM=i.hasM,this.hasZ=i.hasZ,this.fieldsIndex=i.fieldsIndex,this.objectIdField=i.objectIdField,this.spatialReference=i.spatialReference,this.featureAdapter=i.featureAdapter}get size(){return this.items.length}createQueryResponseForCount(){const e=new h(this.query,this.featureAdapter,this.fieldsIndex);if(!this.query.outStatistics)return e.countDistinctValues(this.items);const{groupByFieldsForStatistics:t,having:i,outStatistics:n}=this.query,s=t?.length;if(!s)return 1;const r=new Map,a=new Map,o=new Set;for(const s of n){const{statisticType:n}=s,l="exceedslimit"!==n?s.onStatisticField:void 0;if(!a.has(l)){const i=[];for(const n of t){const t=this._getAttributeValues(e,n,this.items,r);i.push(t)}a.set(l,this._calculateUniqueValues(i,this.items,e.returnDistinctValues))}const u=a.get(l);for(const t in u){const{data:n,items:s}=u[t],r=n.join(",");i&&!e.validateItems(s,i)||o.add(r)}}return o.size}async createQueryResponse(){let e;if(e=this.query.outStatistics?this.query.outStatistics.some(e=>"exceedslimit"===e.statisticType)?this._createExceedsLimitQueryResponse():await this._createStatisticsQueryResponse(this.query,this.items):this._createFeatureQueryResponse(this.query),this.query.returnQueryGeometry){const t=this.query.geometry;(0,o.fn)(this.query.outSR)&&!(0,o.aI)(t.spatialReference,this.query.outSR)?e.queryGeometry=(0,u.ag)({spatialReference:this.query.outSR,...(0,m.Cv)(t,t.spatialReference,this.query.outSR)}):e.queryGeometry=(0,u.ag)({spatialReference:this.query.outSR,...t})}return e}createSnappingResponse(e,t,i){const n=this.featureAdapter,s=z(this.hasZ,this.hasM),{point:r,mode:a}=e,o="number"==typeof e.distance?e.distance:e.distance.x,l="number"==typeof e.distance?e.distance:e.distance.y,u={candidates:[]},c="esriGeometryPolygon"===this.geometryType,d="esriGeometryPolyline"===this.geometryType||"esriGeometryPoint"===this.geometryType,p=this._getPointCreator(a,t,this.spatialReference,i),f=new C(null,0),h=new C(null,0),m={x:0,y:0,z:0};for(const t of this.items){const i=n.getGeometry(t);if(null==i)continue;const{coords:a}=i,y=i.isPoint?B:i.lengths;if(f.coords=a,h.coords=a,e.returnEdge){let e=0;for(let i=0;i<y.length;i++){const a=y[i],d=e;for(let i=0;i<a;i++,e+=s){if(!c&&i===a-1)continue;const y=f;y.coordsIndex=e;const g=h;g.coordsIndex=i===a-1?d:e+s;const x=m;if(!A(m,r,y,g))continue;const _=(r.x-x.x)/o,v=(r.y-x.y)/l,w=_*_+v*v;w<=1&&u.candidates.push(new F(n.getObjectId(t),p(x),Math.sqrt(w),p(y),p(g)))}}}if("all"===e.vertexMode){let e=0;for(let i=0;i<y.length;i++){const a=y[i],d=e,m=h;m.coordsIndex=d;for(let i=0;i<a;i++,e+=s){const s=f;if(s.coordsIndex=e,c&&i===a-1&&s.x===m.x&&s.y===m.y)continue;const d=(r.x-s.x)/o,h=(r.y-s.y)/l,y=d*d+h*h;y<=1&&u.candidates.push(new x(n.getObjectId(t),p(s),Math.sqrt(y)))}}}else if(d&&"ends"===e.vertexMode){let e=0;const i=[];for(let t=0;t<y.length;t++){i.push(e);const n=y[t];e+=n*s,!c&&n>1&&i.push(e-s)}for(const e of i){const i=f;i.coordsIndex=e;const s=(r.x-i.x)/o,a=(r.y-i.y)/l,c=s*s+a*a;c<=1&&u.candidates.push(new x(n.getObjectId(t),p(i),Math.sqrt(c)))}}}return u.candidates.sort((e,t)=>e.distance-t.distance),u}_getPointCreator(e,t,i,n){const s=null==n||(0,o.aI)(i,n)?e=>e:e=>(0,m.Cv)(e,i,n),{hasZ:r}=this;return"3d"===e?r&&t?({x:e,y:t,z:i})=>s({x:e,y:t,z:i}):({x:e,y:t})=>s({x:e,y:t,z:0}):({x:e,y:t})=>s({x:e,y:t})}async createSummaryStatisticsResponse(e){const{field:t,valueExpression:i,normalizationField:n,normalizationType:s,normalizationTotal:r,minValue:a,maxValue:o,scale:l,timeZone:u,outStatisticTypes:d}=e,f=this.fieldsIndex.get(t),h=(0,c.vE)(f)||(0,c.zD)(f)||(0,c.Ah)(f),m=await this._getDataValues({field:t,valueExpression:i,normalizationField:n,normalizationType:s,normalizationTotal:r,scale:l,timeZone:u},this.items),y=(0,p.Vb)({normalizationType:s,normalizationField:n,minValue:a,maxValue:o}),g={value:.5,fieldType:f?.type},x=(0,c.yM)(f)?(0,p.z9)({values:m,supportsNullCount:y,percentileParams:g,outStatisticTypes:d}):(0,p.G_)({values:m,minValue:a,maxValue:o,useSampleStdDev:!s,supportsNullCount:y,percentileParams:g,outStatisticTypes:d});return(0,p.oZ)(x,d,h)}async createUniqueValuesResponse(e){const{field:t,valueExpression:i,domains:n,returnAllCodedValues:s,scale:r,timeZone:a}=e,o=await this._getDataValues({field:t,field2:e.field2,field3:e.field3,fieldDelimiter:e.fieldDelimiter,valueExpression:i,scale:r,timeZone:a},this.items,!1),l=(0,p.b3)(o);return(0,p.lv)(l,n,s,e.fieldDelimiter)}async createClassBreaksResponse(e){const{field:t,valueExpression:i,normalizationField:n,normalizationType:s,normalizationTotal:r,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numClasses:c,scale:d,timeZone:f}=e,h=await this._getDataValues({field:t,valueExpression:i,normalizationField:n,normalizationType:s,normalizationTotal:r,scale:d,timeZone:f},this.items),m=(0,p.Rw)(h,{field:t,normalizationField:n,normalizationType:s,normalizationTotal:r,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numClasses:c});return(0,p.jM)(m,a)}async createHistogramResponse(e){const{field:t,valueExpression:i,normalizationField:n,normalizationType:s,normalizationTotal:r,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numBins:c,scale:d,timeZone:f}=e,h=await this._getDataValues({field:t,valueExpression:i,normalizationField:n,normalizationType:s,normalizationTotal:r,scale:d,timeZone:f},this.items);return(0,p.$y)(h,{field:t,normalizationField:n,normalizationType:s,normalizationTotal:r,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numBins:c})}_sortFeatures(e,t,i){if(e.length>1&&t?.length)for(const n of t.slice().reverse()){const t=n.split(" "),s=t[0],r=this.fieldsIndex.get(s),a=!!t[1]&&"desc"===t[1].toLowerCase(),o=(0,p.FM)(r?.type,a,"case-sensitive");e.sort((e,t)=>{const n=i(e,s,r),a=i(t,s,r);return o(n,a)})}}_createFeatureQueryResponse(e){const{items:t,geometryType:i,hasM:n,hasZ:s,objectIdField:r,spatialReference:o}=this,{outFields:l,outSR:c,quantizationParameters:d,resultRecordCount:p,resultOffset:f,returnZ:h,returnM:m}=e,y=null!=p&&t.length>(f||0)+p,g=l&&(l.includes("*")?[...this.fieldsIndex.fields]:l.map(e=>this.fieldsIndex.get(e)));return{exceededTransferLimit:y,features:this._createFeatures(e,t),fields:g,geometryType:i,hasM:n&&m,hasZ:s&&h,objectIdFieldName:r,spatialReference:(0,u.ag)(c||o),transform:d&&(0,a.VV)(d)||null}}_createFeatures(e,t){const i=new h(e,this.featureAdapter,this.fieldsIndex),{hasM:n,hasZ:s}=this,{orderByFields:r,quantizationParameters:o,returnGeometry:l,returnCentroid:c,maxAllowableOffset:d,resultOffset:p,resultRecordCount:f,returnZ:m=!1,returnM:y=!1}=e,g=s&&m,x=n&&y;let F=[],_=0;const v=[...t];if(this._sortFeatures(v,r,(e,t,n)=>i.getFieldValue(e,t,n)),this.geometryType&&(l||c)){const e=(0,a.VV)(o)??void 0,t="esriGeometryPolygon"===this.geometryType||"esriGeometryPolyline"===this.geometryType;if(l&&!c)for(const n of v){const s=this.featureAdapter.getGeometry(n),r=this._addFeatureJSONMetadata(n,{attributes:i.getAttributes(n),geometry:(0,u.pL)(this.geometryType,s,d,e,g,x)});t&&s&&!r.geometry&&(r.centroid=(0,u.LQ)(this,this.featureAdapter.getCentroid(n,this),e)),F[_++]=r}else if(!l&&c)for(const t of v)F[_++]=this._addFeatureJSONMetadata(t,{attributes:i.getAttributes(t),centroid:(0,u.LQ)(this,this.featureAdapter.getCentroid(t,this),e)});else for(const t of v)F[_++]=this._addFeatureJSONMetadata(t,{attributes:i.getAttributes(t),centroid:(0,u.LQ)(this,this.featureAdapter.getCentroid(t,this),e),geometry:(0,u.pL)(this.geometryType,this.featureAdapter.getGeometry(t),d,e,g,x)})}else for(const e of v){const t=i.getAttributes(e);t&&(F[_++]=this._addFeatureJSONMetadata(e,{attributes:t}))}const w=p||0;if(null!=f){const e=w+f;F=F.slice(w,Math.min(F.length,e))}return F}_addFeatureJSONMetadata(e,t){const i=this.featureAdapter.getMetadata?.(e);return void 0!==i&&(t.metadata=i),t}_createExceedsLimitQueryResponse(){let e=!1,t=Number.POSITIVE_INFINITY,i=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;for(const e of this.query.outStatistics??[])if("exceedslimit"===e.statisticType){t=null!=e.maxPointCount?e.maxPointCount:Number.POSITIVE_INFINITY,i=null!=e.maxRecordCount?e.maxRecordCount:Number.POSITIVE_INFINITY,n=null!=e.maxVertexCount?e.maxVertexCount:Number.POSITIVE_INFINITY;break}if("esriGeometryPoint"===this.geometryType)e=this.items.length>t;else if(this.items.length>i)e=!0;else{const t=z(this.hasZ,this.hasM),i=this.featureAdapter;e=this.items.reduce((e,t)=>{const n=i.getGeometry(t);return e+(null!=n&&n.coords.length||0)},0)/t>n}return{fields:[{name:"exceedslimit",type:"esriFieldTypeInteger",alias:"exceedslimit",sqlType:"sqlTypeInteger",domain:null,defaultValue:null}],features:[{attributes:{exceedslimit:Number(e)}}]}}async _createStatisticsQueryResponse(e,t,i={attributes:{}}){const n=[],s=new Map,r=new Map,a=new Map,o=new Map,l=new h(e,this.featureAdapter,this.fieldsIndex),u=e.outStatistics,{groupByFieldsForStatistics:d,having:p,orderByFields:f,resultRecordCount:m}=e,y=d?.length,g=!!y,x=g?d[0]:null,F=g&&!this.fieldsIndex.get(x);for(const e of u??[]){const{outStatisticFieldName:u,statisticType:f}=e,h=e,m="exceedslimit"!==f?e.onStatisticField:void 0,_="percentile_disc"===f||"percentile_cont"===f,v="EnvelopeAggregate"===f||"CentroidAggregate"===f||"ConvexHullAggregate"===f,w=g&&1===y&&(m===x||F)&&"count"===f;if(g){if(!a.has(m)){const e=[];for(const i of d){const n=this._getAttributeValues(l,i,t,s);e.push(n)}a.set(m,this._calculateUniqueValues(e,t,!v&&l.returnDistinctValues))}const e=a.get(m);if(!e)continue;const i=Object.keys(e);for(const n of i){const{count:i,data:r,items:a,itemPositions:c}=e[n],f=r.join(",");if(!p||l.validateItems(a,p)){const e=o.get(f)||{attributes:{}};if(v){e.aggregateGeometries||(e.aggregateGeometries={});const{aggregateGeometries:t,outStatisticFieldName:i}=await this._getAggregateGeometry(h,a);e.aggregateGeometries[i]=t}else{let n=null;if(w)n=i;else{const e=this._getAttributeValues(l,m,t,s),i=c.map(t=>e[t]);n=_&&"statisticParameters"in h?this._getPercentileValue(h,i):this._getStatisticValue(h,i,null,l.returnDistinctValues)}e.attributes[u]=n}let n=0;d.forEach((t,i)=>e.attributes[this.fieldsIndex.get(t)?t:"EXPR_"+ ++n]=r[i]),o.set(f,e)}}}else if(v){i.aggregateGeometries||(i.aggregateGeometries={});const{aggregateGeometries:e,outStatisticFieldName:n}=await this._getAggregateGeometry(h,t);i.aggregateGeometries[n]=e}else{const e=this._getAttributeValues(l,m,t,s);i.attributes[u]=_&&"statisticParameters"in h?this._getPercentileValue(h,e):this._getStatisticValue(h,e,r,l.returnDistinctValues)}const S="min"!==f&&"max"!==f||!(0,c.yM)(this.fieldsIndex.get(m))&&!this._isAnyDateField(m)?null:this.fieldsIndex.get(m)?.type;n.push({name:u,alias:u,type:S||"esriFieldTypeDouble"})}const _=g?Array.from(o.values()):[i];return this._sortFeatures(_,f,(e,t)=>e.attributes[t]),m&&(_.length=Math.min(m,_.length)),{fields:n,features:_}}_isAnyDateField(e){const t=this.fieldsIndex.get(e);return(0,c.vE)(t)||(0,c.zD)(t)||(0,c.Ah)(t)||(0,c.OH)(t)}async _getAggregateGeometry(e,t){const{convexHull:n,union:a}=await Promise.all([i.e(3209),i.e(7559)]).then(i.bind(i,47559)),{statisticType:o,outStatisticFieldName:l}=e,{featureAdapter:c,spatialReference:d,geometryType:p}=this,f=t.map(e=>(0,u.pL)(p,c.getGeometry(e))),h=n(d,f,!0)[0],m={aggregateGeometries:null,outStatisticFieldName:null};if("EnvelopeAggregate"===o){const e=h?(0,r.v)(h):(0,r.HA)(a(d,f));m.aggregateGeometries={...e,spatialReference:d},m.outStatisticFieldName=l||"extent"}else if("CentroidAggregate"===o){const e=h?(0,s.l8)(h):(0,s.Z4)((0,r.HA)(a(d,f)));m.aggregateGeometries={x:e[0],y:e[1],spatialReference:d},m.outStatisticFieldName=l||"centroid"}else"ConvexHullAggregate"===o&&(m.aggregateGeometries=h,m.outStatisticFieldName=l||"convexHull");return m}_getStatisticValue(e,t,i,n){const{onStatisticField:s,statisticType:r}=e;let a=null;return a=i?.has(s)?i.get(s):(0,c.yM)(this.fieldsIndex.get(s))||this._isAnyDateField(s)?(0,p.z9)({values:t,returnDistinct:n}):(0,p.G_)({values:n?[...new Set(t)]:t,minValue:null,maxValue:null,useSampleStdDev:!0}),i&&i.set(s,a),a["var"===r?"variance":r]}_getPercentileValue(e,t){const{onStatisticField:i,statisticParameters:n,statisticType:s}=e,{value:r,orderBy:a}=n,o=this.fieldsIndex.get(i);return(0,p.qg)(t,{value:r,orderBy:a,fieldType:o?.type,isDiscrete:"percentile_disc"===s})}_getAttributeValues(e,t,i,n){if(n.has(t))return n.get(t);const s=this.fieldsIndex.get(t),r=i.map(i=>e.getFieldValue(i,t,s));return n.set(t,r),r}_calculateUniqueValues(e,t,i){const n={},s=t.length;for(let r=0;r<s;r++){const s=t[r],a=[];for(const t of e)a.push(t[r]);const o=a.join(",");null==n[o]?n[o]={count:1,data:a,items:[s],itemPositions:[r]}:(i||n[o].count++,n[o].items.push(s),n[o].itemPositions.push(r))}return n}async _getDataValues(e,t,i=!0){const s=new h(this.query,this.featureAdapter,this.fieldsIndex),{valueExpression:r,scale:a,timeZone:o}=e;return r?s.getExpressionValues(t,r,{viewingMode:"map",scale:a,spatialReference:this.query.outSR||this.spatialReference},{geometryType:this.geometryType,hasZ:this.hasZ,hasM:this.hasM},o):s.getDataValues(t,(0,n.o8)(e),i)}_calculateHistogramBins(e,t,i){if(null==t.min&&null==t.max)return[];const n=t.intervals,s=t.min??0,r=t.max??0,a=n.map(([e,t])=>({minValue:e,maxValue:t,count:0,items:[]}));for(let t=0;t<e.length;t++){const o=e[t],l=i[t];if(null!=o&&o>=s&&o<=r){const e=(0,p.Ak)(n,o);e>-1&&(a[e].count++,a[e].items.push(l))}}return a}async createQueryBinsResponse(e){const t=e.bin?.splitBy;if(!t)return this._createBinsResponse(e);const{value:i,outAlias:n,valueType:s}=t,r=[],a=[{name:n??i,alias:n??i,type:s??"esriFieldTypeString"},{name:M,alias:M,type:"esriFieldTypeInteger"}],o=new h(e,this.featureAdapter,this.fieldsIndex),l=new Map,u=[...this.items];this._sortFeatures(u,[i],(e,t,i)=>o.getFieldValue(e,t,i));const c=this._getAttributeValues(o,i,u,l),d=this._calculateUniqueValues([c],u,o.returnDistinctValues);for(const t in d){const{items:s}=d[t],o=await this._createBinsResponse(e,s);if(r.push(...o.features.map(e=>({...e,attributes:{...e.attributes,[n??i]:t}}))),o.fields)for(const e of o.fields)a.some(t=>t.name===e.name)||a.push(e)}return{fields:a,features:r}}async _createBinsResponse(e,t){const i=e.bin;switch(t=t??this.items,i.type){case"autoIntervalBin":return this._createAutoIntervalBinsResponse(_.A.fromJSON(i),e,t);case"dateBin":return this._createDateBinsResponse(v.A.fromJSON(i),e,t);case"fixedBoundariesBin":return this._createFixedBoundariesBinsResponse(S.A.fromJSON(i),e,t);case"fixedIntervalBin":return this._createFixedIntervalBinsResponse(I.A.fromJSON(i),e,t)}}async _createAutoIntervalBinsResponse(e,t,i){const{field:n,normalizationField:s,numBins:r,normalizationType:a,normalizationTotal:o,start:l,end:u}=e,c=await this._getDataValues({field:e.field,normalizationField:e.normalizationField,normalizationType:e.normalizationType,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},i),d=(0,p.sU)(c,{field:n,normalizationField:s,normalizationType:a,normalizationTotal:o,numBins:r,minValue:(0,y.dO)(l,!1),maxValue:(0,y.dO)(u,!1)}),f=this._calculateHistogramBins(c,d,i);return this._createFeaturesFromHistogramBins(f,t)}async _createDateBinsResponse(e,t,i){const{field:n,interval:s,start:r,end:a,snapToData:o,returnFullIntervalBin:l}=e,u=s.unit,d=await this._getDataValues({field:e.field,timeZone:t.outTimeReference?.ianaTimeZone},i),p=(0,c.OH)(this.fieldsIndex.get(n)),f=w.g.toJSON(u),h=d.filter(Boolean).sort((e,t)=>e-t),m=null!=r?(0,y.dO)(r,p):h[0],g=null!=a?(0,y.dO)(a,p):h[h.length-1],x=[];if(null!=m&&null!=g){const e={zone:t.outTimeReference?.ianaTimeZone??R.n$},i=T.c9.fromMillis(m,e),n=T.c9.fromMillis(g,e);if("last"===o){let e=n;for(;e>i;){const t=e.minus({[f]:s.value});if(t<i){x.unshift([l?t.toMillis():i.toMillis(),e.toMillis()]);break}x.unshift([t.toMillis(),e.toMillis()]),e=t}}else{let e="first"===o?i:i.startOf(f);for(;e<=n;){const t=e.plus({[f]:s.value});if(t>n){x.push([e.toMillis(),l?t.toMillis():n.toMillis()]);break}x.push([e.toMillis(),t.toMillis()]),e=t}}}const F=this._calculateHistogramBins(d,{intervals:x,min:m,max:g},i);return this._createFeaturesFromHistogramBins(F,t)}async _createFixedBoundariesBinsResponse(e,t,i){const{field:n}=e,s=await this._getDataValues({field:n,timeZone:t.outTimeReference?.ianaTimeZone},i),r=(0,c.OH)(this.fieldsIndex.get(n)),a=e.boundaries.map(e=>(0,y.dO)(e,r)).sort((e,t)=>e-t),o=[];for(let e=0;e<a.length-1;e++)o.push([a[e],a[e+1]]);const l={intervals:o,min:a.at(0),max:a.at(-1)},u=this._calculateHistogramBins(s,l,i);return this._createFeaturesFromHistogramBins(u,t)}async _createFixedIntervalBinsResponse(e,t,i){const{field:n,interval:s,start:r,end:a}=e,o=await this._getDataValues({field:e.field,normalizationField:e.normalizationField,normalizationType:e.normalizationType,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},i),l=(0,c.OH)(this.fieldsIndex.get(n)),u=(0,p.sU)(o,{field:n,classificationMethod:"defined-interval",definedInterval:s,minValue:(0,y.dO)(r,l),maxValue:(0,y.dO)(a,l)},!0),d=this._calculateHistogramBins(o,u,i);return this._createFeaturesFromHistogramBins(d,t)}async _createFeaturesFromHistogramBins(e,t){const{upperBoundaryAlias:i,lowerBoundaryAlias:n}=t,s=n||"lowerBoundary",r=i||"upperBoundary",a=[],o=[{name:s,alias:s,type:"esriFieldTypeDouble"},{name:r,alias:r,type:"esriFieldTypeDouble"}],l=t.bin?.stackBy?.value,u=t.bin?.stackBy?.outAlias;l&&o.push({name:M,alias:M,type:"esriFieldTypeInteger"},{name:u??l,alias:u??l,type:"esriFieldTypeString"});let c=0;const d="dateBin"===t.bin.type,p=t.outTimeReference?.ianaTimeZone;for(const i of e){const{minValue:e,maxValue:n,items:f}=i,h={attributes:{}};let m;if(h.attributes[s]=d&&p&&null!=e?T.c9.fromMillis(e,{zone:p}).toISO():e,h.attributes[r]=d&&p&&null!=n?T.c9.fromMillis(n,{zone:p}).toISO():n,l?(m=await this._createStatisticsQueryResponse({...t,groupByFieldsForStatistics:[l],orderByFields:[l]},f),h.attributes[M]=++c,"flat"===t.bin.jsonStyle?a.push(...m.features.map(({attributes:{EXPR_1:e,...t},...i})=>({...i,attributes:u??e?{...t,[u??e]:e,...h.attributes}:{...t,...h.attributes}}))):(h.stackedAttributes=m.features.map(({attributes:{EXPR_1:e,...t}})=>u??e?{...t,[u??e]:e}:t),a.push(h))):(t.bin?.splitBy&&(h.attributes[M]=++c),m=await this._createStatisticsQueryResponse(t,f,h),a.push(h)),m.fields)for(const e of m.fields)o.some(t=>t.name===e.name)||o.push(e)}return"desc"===t.binOrder&&a.reverse(),{fields:o,features:a}}}function A(e,t,i,n){const s=n.x-i.x,r=n.y-i.y,a=t.x-i.x,o=t.y-i.y,l=s*s+r*r;if(0===l)return!1;const u=a*s+o*r,c=Math.min(1,Math.max(0,u/l));return e.x=i.x+s*c,e.y=i.y+r*c,!0}function z(e,t){return e?t?4:3:t?3:2}class C{constructor(e,t){this.coords=e,this.coordsIndex=t}get x(){return this.coords[this.coordsIndex]}get y(){return this.coords[this.coordsIndex+1]}get z(){return this.coords[this.coordsIndex+2]}}const B=[1]},9093:(e,t,i)=>{function n(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function s(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]]}i.d(t,{o8:()=>s,vt:()=>n,zK:()=>r});const r=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:r,clone:s,create:n,fromValues:function(e,t,i,n,s,r,a,o,l,u,c,d,p,f,h,m){return[e,t,i,n,s,r,a,o,l,u,c,d,p,f,h,m]}},Symbol.toStringTag,{value:"Module"}))},9762:(e,t,i)=>{i.r(t),i.d(t,{projectBuffer:()=>s});var n=i(37539);function s(e,t,i,s,r,a,o=Math.floor(e.length/3)){const l=(0,n.jd)(t,r);if(null==l)return!1;if(l===n.pO){if(e===s&&i===a)return!0;const t=i+3*o;for(let n=i,r=a;n<t;n++,r++)s[r]=e[n]??0;return!0}const u=i+3*o;for(let t=i,n=a;t<u;t+=3,n+=3)l(e,t,s,n);return!0}},11006:(e,t,i)=>{function n(e,t,i,n,r){s(e,t,i||0,n||e.length-1,r||a)}function s(e,t,i,n,a){for(;n>i;){if(n-i>600){var o=n-i+1,l=t-i+1,u=Math.log(o),c=.5*Math.exp(2*u/3),d=.5*Math.sqrt(u*c*(o-c)/o)*(l-o/2<0?-1:1);s(e,t,Math.max(i,Math.floor(t-l*c/o+d)),Math.min(n,Math.floor(t+(o-l)*c/o+d)),a)}var p=e[t],f=i,h=n;for(r(e,i,t),a(e[n],p)>0&&r(e,i,n);f<h;){for(r(e,f,h),f++,h--;a(e[f],p)<0;)f++;for(;a(e[h],p)>0;)h--}0===a(e[i],p)?r(e,i,h):r(e,++h,n),h<=t&&(i=h+1),t<=h&&(n=h-1)}}function r(e,t,i){var n=e[t];e[t]=e[i],e[i]=n}function a(e,t){return e<t?-1:e>t?1:0}i.d(t,{q:()=>n})},11440:(e,t,i)=>{i.d(t,{A:()=>u});var n=i(31635),s=i(93637),r=i(91429),a=i(56507),o=i(41266),l=i(93223);let u=class extends o.A{constructor(e){super(e),this.boundaries=[],this.type="fixed-boundaries"}};(0,n.Cg)([(0,r.MZ)({json:{name:"parameters.boundaries",write:{writer:function(e,t,i){(0,s.sM)(i,e&&function(e){return e[0]instanceof Date}(e)?e.map(e=>e.getTime()):e,t)}}}})],u.prototype,"boundaries",void 0),(0,n.Cg)([(0,l.e)({fixedBoundariesBin:"fixed-boundaries"},{readOnly:!0})],u.prototype,"type",void 0),u=(0,n.Cg)([(0,r.$K)("esri.rest.support.FixedBoundariesBinParameters")],u),u.from=(0,a.dp)(u)},17136:(e,t,i)=>{i.d(t,{Y_:()=>M,O7:()=>R,el:()=>I});var n=i(92602),s=i(69052),r=i(49186),a=i(53966),o=i(39829),l=i(82799),u=i(16930),c=i(80754),d=i(21325),p=i(28735),f=i(11254),h=i(65864),m=i(2272),y=i(84952),g=i(92300);const x=()=>a.A.getLogger("esri.geometry.support.normalizeUtils");function F(e){return"polygon"===e[0].type}function _(e){return"polyline"===e[0].type}function v(e,t,i){if(t){const t=function(e,t){if(!(e instanceof l.A||e instanceof o.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw x().error(e),new r.A("internal:geometry",e)}const i=(0,c.r8)(e),n=[];for(const e of i){const i=[];n.push(i),i.push([e[0][0],e[0][1]]);for(let n=0;n<e.length-1;n++){const s=e[n][0],r=e[n][1],a=e[n+1][0],o=e[n+1][1],l=Math.sqrt((a-s)*(a-s)+(o-r)*(o-r)),u=(o-r)/l,c=(a-s)/l,d=l/t;if(d>1){for(let e=1;e<=d-1;e++){const n=e*t,a=c*n+s,o=u*n+r;i.push([a,o])}const e=(l+Math.floor(d-1)*t)/2,n=c*e+s,a=u*e+r;i.push([n,a])}i.push([a,o])}}return function(e){return"polygon"===e.type}(e)?new o.A({rings:n,spatialReference:e.spatialReference}):new l.A({paths:n,spatialReference:e.spatialReference})}(e,1e6);e=(0,p.ci)(t,!0)}return i&&(e=(0,c.kS)(e,i)),e}function w(e,t,i){if(Array.isArray(e)){const n=e[0];if(n>t){const i=(0,c.kd)(n,t);e[0]=n+i*(-2*t)}else if(n<i){const t=(0,c.kd)(n,i);e[0]=n+t*(-2*i)}}else{const n=e.x;if(n>t){const i=(0,c.kd)(n,t);e=e.clone().offset(i*(-2*t),0)}else if(n<i){const t=(0,c.kd)(n,i);e=e.clone().offset(t*(-2*i),0)}}return e}function S(e,t){let i=-1;for(let n=0;n<t.cutIndexes.length;n++){const s=t.cutIndexes[n],r=t.geometries[n],a=(0,c.r8)(r);for(let e=0;e<a.length;e++){const t=a[e];t.some(i=>{if(i[0]<180)return!0;{let i=0;for(let e=0;e<t.length;e++){const n=t[e][0];i=n>i?n:i}i=Number(i.toFixed(9));const n=-360*(0,c.kd)(i,180);for(let i=0;i<t.length;i++){const t=r.getPoint(e,i);r.setPoint(e,i,t.clone().offset(n,0))}return!0}})}if(s===i){if(F(e))for(const t of(0,c.r8)(r))e[s]=e[s].addRing(t);else if(_(e))for(const t of(0,c.r8)(r))e[s]=e[s].addPath(t)}else i=s,e[s]=r}return e}async function I(e,t,i){if(!Array.isArray(e))return I([e],t);t&&"string"!=typeof t&&x().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const s="string"==typeof t?t:t?.url??n.A.geometryServiceUrl;let r,a,u,F,_,R,T,M,b=0;const A=[],z=[];for(const t of e)if(null!=t)if(r||(r=t.spatialReference,a=(0,d.Vp)(r),u=r.isWebMercator,R=u?102100:4326,F=c.j7[R].maxX,_=c.j7[R].minX,T=c.j7[R].plus180Line,M=c.j7[R].minus180Line),a)if("mesh"===t.type)z.push(t);else if("point"===t.type)z.push(w(t.clone(),F,_));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map(e=>w(e,F,_)),z.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,a);z.push(e.rings?new o.A(e):e)}else if(t.extent){const e=t.extent,i=(0,c.kd)(e.xmin,_)*(2*F);let n=0===i?t.clone():(0,c.kS)(t.clone(),i);e.offset(i,0);let{xmin:s,xmax:r}=e;s=Number(s.toFixed(9)),r=Number(r.toFixed(9)),e.intersects(T)&&r!==F?(b=r>b?r:b,n=v(n,u),A.push(n),z.push("cut")):e.intersects(M)&&s!==_?(b=r*(2*F)>b?r*(2*F):b,n=v(n,u,360),A.push(n),z.push("cut")):z.push(n)}else z.push(t.clone());else z.push(t);else z.push(t);let C=(0,c.kd)(b,F),B=-90;const N=C,O=new l.A;for(;C>0;){const e=360*C-180;O.addPath([[e,B],[e,-1*B]]),B*=-1,C--}if(A.length>0&&N>0){const t=S(A,await async function(e,t,i,n){const s=(0,m.Dl)(e),r=t[0].spatialReference,a={...n,responseType:"json",query:{...s.query,f:"json",sr:(0,d.YX)(r),target:JSON.stringify({geometryType:(0,h.$B)(t[0]),geometries:t}),cutter:JSON.stringify(i)}},o=await(0,f.A)(s.path+"/cut",a),{cutIndexes:l,geometries:u=[]}=o.data;return{cutIndexes:l,geometries:u.map(e=>{const t=(0,h.rS)(e);return t.spatialReference=r,t})}}(s,A,O,i)),n=[],r=[];for(let i=0;i<z.length;i++){const s=z[i];if("cut"!==s)r.push(s);else{const s=t.shift(),a=e[i];null!=a&&"polygon"===a.type&&a.rings&&a.rings.length>1&&s.rings.length>=a.rings.length?(n.push(s),r.push("simplify")):r.push(u?(0,p.Gh)(s):s)}}if(!n.length)return r;const a=await async function(e,t,i){const n="string"==typeof e?(0,y.An)(e):e,s=t[0].spatialReference,r=(0,h.$B)(t[0]),a={...i,query:{...n.query,f:"json",sr:(0,d.YX)(s),geometries:JSON.stringify((0,g.X)(t))}},{data:o}=await(0,f.A)(n.path+"/simplify",a);return(0,g.V)(o.geometries,r,s)}(s,n,i),o=[];for(let e=0;e<r.length;e++){const t=r[e];"simplify"!==t?o.push(t):o.push(u?(0,p.Gh)(a.shift()):a.shift())}return o}const q=[];for(let e=0;e<z.length;e++){const t=z[e];if("cut"!==t)q.push(t);else{const e=A.shift();q.push(!0===u?(0,p.Gh)(e):e)}}return q}function R(e,t,i){const n=(0,d.Vp)(i);if(null==n)return e;const[s,r]=n.valid,a=2*r;let o=0,l=0;t>r?o=Math.ceil(Math.abs(t-r)/a):t<s&&(o=-Math.ceil(Math.abs(t-s)/a)),e>r?l=Math.ceil(Math.abs(e-r)/a):e<s&&(l=-Math.ceil(Math.abs(e-s)/a));let u=e+(o-l)*a;const c=u-t;return c>r?u-=a:c<s&&(u+=a),u}function T(e){const t=(0,d.Vp)(e);if(null==t)return null;const[i,n]=t.valid;return new s.hr(i,n)}const M=T(u.A.WGS84);T(u.A.WebMercator)},29441:(e,t,i)=>{i.d(t,{MG:()=>x,SN:()=>f,SY:()=>g,VW:()=>c,Wq:()=>y,eD:()=>h,j4:()=>m,vl:()=>u});var n=i(49186),s=i(44123),r=i(98453);const a=new s.WhereClauseCache(50,500),o="unsupported-query",l=" as ",u=new Set(["esriFieldTypeOID","esriFieldTypeSmallInteger","esriFieldTypeBigInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeLong"]),c=new Set(["esriFieldTypeDate","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]),d=new Set(["esriFieldTypeString","esriFieldTypeGUID","esriFieldTypeGlobalID",...u,...c]);function p(e,t,i={}){const s=m(t,e);if(!s){const i=a.getError(t,e);throw new n.A(o,"invalid SQL expression",{expression:t,error:i})}const r=i.expressionName||"expression";if(i.validateStandardized&&!s.isStandardized)throw new n.A(o,`${r} is not standard`,{expression:t});if(i.validateAggregate&&!s.isAggregate)throw new n.A(o,`${r} does not contain a valid aggregate function`,{expression:t});return s.fieldNames}function f(e,t,i,n){if(!i)return!0;const s="where clause";return x(e,t,p(e,i,{validateStandardized:!0,expressionName:s}),{expressionName:s,query:n}),!0}function h(e,t,i,s,r){if(!i)return!0;const a="having clause",l=p(e,i,{validateAggregate:!0,expressionName:a});x(e,t,l,{expressionName:a,query:r});const u=m(i,e),c=u?.getExpressions().every(t=>{const{aggregateType:i,field:n}=t,r=e.get(n)?.name;return s.some(t=>{const{onStatisticField:n,statisticType:s}=t,a=e.get(n)?.name;return a===r&&s.toLowerCase().trim()===i})});if(!c)throw new n.A(o,"expressions in having clause should also exist in outStatistics",{having:i});return!0}function m(e,t){return e?a.get(e,t):null}function y(e){return/\((.*?)\)/.test(e)?e:e.split(l)[0]}function g(e){return e.split(l)[1]}function x(e,t,i,s={}){const r=new Map;if(function(e,t,i,n,s){const r=s.includes("*")?[...i,...s.filter(e=>"*"!==e)]:s;for(const s of r)if(t.get(s))F(e,t,i,n,s);else try{const r=p(t,y(s),{validateStandardized:!0});for(const s of r)F(e,t,i,n,s)}catch(t){e.set(s,{type:"expression-error",expression:s,error:t})}}(r,e,t,s.allowedFieldTypes??d,i),r.size){const e=s.expressionName??"expression";throw new n.A(o,`${e} contains invalid or missing fields`,{errors:Array.from(r.values()),query:s.query})}}function F(e,t,i,n,s){const a=t.get(s);a?i.has(a.name)?"all"!==n&&!1===n?.has(a.type)&&e.set(s,{type:"invalid-type",fieldName:a.name,fieldType:r.m.fromJSON(a.type),allowedFieldTypes:Array.from(n,e=>r.m.fromJSON(e))}):e.set(s,{type:"missing-field",fieldName:a.name}):e.set(s,{type:"invalid-field",fieldName:s})}},31464:(e,t,i)=>{i.d(t,{Cv:()=>m,Nk:()=>p,lK:()=>g});var n=i(4576),s=i(74887),r=i(91218),a=i(21325),o=i(28735);const l=[0,0];function u(e,t){if(!t)return null;if("x"in t){const i={x:0,y:0};return[i.x,i.y]=e(t.x,t.y,l),null!=t.z&&(i.z=t.z),null!=t.m&&(i.m=t.m),i}if("xmin"in t){const i={xmin:0,ymin:0,xmax:0,ymax:0};return[i.xmin,i.ymin]=e(t.xmin,t.ymin,l),[i.xmax,i.ymax]=e(t.xmax,t.ymax,l),t.hasZ&&(i.zmin=t.zmin,i.zmax=t.zmax,i.hasZ=!0),t.hasM&&(i.mmin=t.mmin,i.mmax=t.mmax,i.hasM=!0),i}return"rings"in t?{rings:c(t.rings,e),hasM:t.hasM,hasZ:t.hasZ}:"paths"in t?{paths:c(t.paths,e),hasM:t.hasM,hasZ:t.hasZ}:"points"in t?{points:d(t.points,e),hasM:t.hasM,hasZ:t.hasZ}:null}function c(e,t){const i=[];for(const n of e)i.push(d(n,t));return i}function d(e,t){const i=[];for(const n of e){const e=t(n[0],n[1],[0,0]);i.push(e),n.length>2&&e.push(n[2]),n.length>3&&e.push(n[3])}return i}async function p(e,t){if(!e||!t)return;const i=Array.isArray(e)?e.map(e=>null!=e.geometry?e.geometry.spatialReference:null).filter(n.Ru):[e];await(0,r.initializeProjection)(i.map(e=>({source:e,dest:t})))}const f=u.bind(null,o.je),h=u.bind(null,o.tD);function m(e,t,i,n){if(!e)return null;if(i||(i=t,t=e.spatialReference),!(0,a.fn)(t)||!(0,a.fn)(i)||(0,a.aI)(t,i))return e;if((0,o.y7)(t,i)){const t=(0,a.K8)(i)?f(e):h(e);return t.spatialReference=i,t}return(0,r.projectMany)([e],t,i,n)[0]}const y=new class{constructor(){this._jobs=[],this._timer=null,this._process=this._process.bind(this)}async push(e,t,i,n){if(!e?.length||!t||!i||(0,a.aI)(t,i))return e;const r={geometries:e,inSpatialReference:t,outSpatialReference:i,options:n,resolve:(0,s.Tw)()};return this._jobs.push(r),this._timer??=setTimeout(this._process,10),r.resolve.promise}_process(){this._timer=null;const e=this._jobs.shift();if(!e)return;const{geometries:t,inSpatialReference:i,outSpatialReference:n,resolve:s,options:l}=e;(0,o.y7)(i,n)&&null==l?.extendedParams?(0,a.K8)(n)?s(t.map(f)):s(t.map(h)):s((0,r.projectMany)(t,i,n,l)),this._jobs.length>0&&(this._timer=setTimeout(this._process,10))}};function g(e,t,i,n){return y.push(e,t,i,n)}},37539:(e,t,i)=>{i.d(t,{pO:()=>m,jd:()=>p,Tp:()=>f,w5:()=>d});var n=i(34727),s=i(86211),r=i(73941),a=i(79258);Math.PI;const o=a.$O.radius,l=a.$O.eccentricitySquared,u={a1:o*l,a2:o*l*o*l,a3:o*l*l/2,a4:o*l*o*l*2.5,a5:o*l+o*l*l/2,a6:1-l};a.$O.radius,a.$O.flattening,a.Sw.radius,a.Sw.flattening,a.sH.radius,a.sH.flattening,a.sH.radius;var c=i(21325);const d={2:{5:m,7:null,9:null,10:m,1:S,6:null,8:null,0:null,3:g,11:x,2:m,4:b},5:{5:m,7:null,9:null,10:m,1:S,6:null,8:null,0:null,3:g,11:x,2:m,4:b},7:{5:null,7:m,9:null,10:m,1:null,6:w,8:null,0:null,3:null,11:null,2:null,4:null},9:{5:null,7:null,9:m,10:m,1:null,6:null,8:v,0:null,3:null,11:null,2:null,4:null},3:{5:y,7:null,9:null,10:y,1:function(e,t,i,n){const s=e[t]/O,r=N-2*Math.atan(Math.exp(-e[t+1]/O)),a=O+(e[t+2]??0),o=Math.cos(r)*a;i[n]=Math.cos(s)*o,i[n+1]=Math.sin(s)*o,i[n+2]=Math.sin(r)*a},6:null,8:null,0:null,3:m,11:function(e,t,i,n){y(e,t,i,n),x(i,n,i,n)},2:y,4:function(e,t,i,n){y(e,t,i,n),b(i,n,i,n)}},4:{5:A,7:null,9:null,10:A,1:function(e,t,i,n){A(e,t,i,n),S(i,n,i,n)},6:null,8:null,0:null,3:function(e,t,i,n){A(e,t,i,n),g(i,n,i,n)},11:function(e,t,i,n){A(e,t,i,n),x(i,n,i,n)},2:A,4:m},1:{5:M,7:null,9:null,10:M,1:m,6:null,8:null,0:null,3:function(e,t,i,n){M(e,t,i,n),g(i,n,i,n)},11:function(e,t,i,n){M(e,t,i,n),x(i,n,i,n)},2:M,4:function(e,t,i,n){M(e,t,i,n),b(i,n,i,n)}},6:{5:null,7:T,9:null,10:T,1:null,6:m,8:null,0:null,3:null,11:null,2:null,4:null},8:{5:null,7:null,9:R,10:R,1:null,6:null,8:m,0:null,3:null,11:null,2:null,4:null},0:{5:null,7:null,9:null,10:null,1:null,6:null,8:null,0:m,3:null,11:null,2:null,4:null},10:{5:m,7:m,9:m,10:m,1:S,6:w,8:v,0:null,3:g,11:x,2:m,4:b},11:{5:F,7:null,9:null,10:F,1:function(e,t,i,n){F(e,t,i,n),S(i,n,i,n)},6:null,8:null,0:null,3:function(e,t,i,n){F(e,t,i,n),g(i,n,i,n)},11:m,2:F,4:function(e,t,i,n){F(e,t,i,n),b(i,n,i,n)}}};function p(e,t){return f(e,t)?.projector}function f(e,t){if(null==e||null==t)return null;if(z.source.spatialReference===e&&z.dest.spatialReference===t)return z;const i=h(e,z.source),n=h(t,z.dest);return 0===i&&0===n?(0,c.aI)(e,t)?z.projector=m:z.projector=null:z.projector=d[i][n],z}function h(e,t){return e?t.spatialReference===e?t.spatialReferenceId:(t.spatialReference=e,"metersPerUnit"in t&&(t.metersPerUnit=(0,s.GA)(e,1)),(0,r.jA)(e)?t.spatialReferenceId=1:(0,c.oT)(e)?t.spatialReferenceId=2:(0,c.K8)(e)?t.spatialReferenceId=3:(0,c.r1)(e)?t.spatialReferenceId=11:e.wkt===r.Ro.wkt?t.spatialReferenceId=4:4490===e.wkid?t.spatialReferenceId=5:e.wkt===r.FY.wkt?t.spatialReferenceId=6:e.wkt===r.LJ.wkt?t.spatialReferenceId=8:(0,c.q8)(e)?t.spatialReferenceId=7:(0,c.KQ)(e)?t.spatialReferenceId=9:t.spatialReferenceId=0):0}function m(e,t,i,n){e!==i&&(i[n++]=e[t++],i[n++]=e[t++],i[n]=e[t]??0)}function y(e,t,i,n){i[n]=B*(e[t]/O),i[n+1]=B*(N-2*Math.atan(Math.exp(-e[t+1]/O))),i[n+2]=e[t+2]??0}function g(e,t,i,s){!function(e,t,i,s,r){const a=.4999999*Math.PI,o=(0,n.qE)(C*e[t+1],-a,a),l=Math.sin(o);i[s++]=C*e[t]*r.radius,i[s++]=r.halfSemiMajorAxis*Math.log((1+l)/(1-l)),i[s]=e[t+2]??0}(e,t,i,s,a.$O)}function x(e,t,i,n){i[n]=e[t]*q,i[n+1]=e[t+1]*q,i[n+2]=e[t+2]??0}function F(e,t,i,n){i[n]=e[t]*G,i[n+1]=e[t+1]*G,i[n+2]=e[t+2]??0}function _(e,t,i,n,s){const r=s+(e[t+2]??0),a=C*e[t],o=C*e[t+1],l=Math.cos(o)*r;i[n]=Math.cos(a)*l,i[n+1]=Math.sin(a)*l,i[n+2]=Math.sin(o)*r}function v(e,t,i,n){_(e,t,i,n,a.Sw.radius)}function w(e,t,i,n){_(e,t,i,n,a.sH.radius)}function S(e,t,i,n){_(e,t,i,n,a.$O.radius)}function I(e,t,i,s,r){const a=e[t],o=e[t+1],l=e[t+2]??0,u=Math.sqrt(a*a+o*o+l*l),c=(0,n.YN)(l/(0===u?1:u)),d=Math.atan2(o,a);i[s++]=B*d,i[s++]=B*c,i[s]=u-r}function R(e,t,i,n){I(e,t,i,n,a.Sw.radius)}function T(e,t,i,n){I(e,t,i,n,a.sH.radius)}function M(e,t,i,n){I(e,t,i,n,a.$O.radius)}function b(e,t,i,n){!function(e,t,i,n,s){const r=C*e[t],a=C*e[t+1],o=e[t+2]??0,l=Math.sin(a),u=Math.cos(a),c=s.radius/Math.sqrt(1-s.eccentricitySquared*l*l);i[n++]=(c+o)*u*Math.cos(r),i[n++]=(c+o)*u*Math.sin(r),i[n++]=(c*(1-s.eccentricitySquared)+o)*l}(e,t,i,n,a.$O)}function A(e,t,i,n){const s=u,r=e[t],o=e[t+1],l=e[t+2]??0;let c,d,p,f,h,m,y,g,x,F,_,v,w,S,I,R,T,M,b,A,z;c=Math.abs(l),d=r*r+o*o,p=Math.sqrt(d),f=d+l*l,h=Math.sqrt(f),A=Math.atan2(o,r),m=l*l/f,y=d/f,S=s.a2/h,I=s.a3-s.a4/h,y>.3?(g=c/h*(1+y*(s.a1+S+m*I)/h),b=Math.asin(g),F=g*g,x=Math.sqrt(1-F)):(x=p/h*(1-m*(s.a5-S-y*I)/h),b=Math.acos(x),F=1-x*x,g=Math.sqrt(F)),_=1-a.$O.eccentricitySquared*F,v=a.$O.radius/Math.sqrt(_),w=s.a6*v,S=p-v*x,I=c-w*g,T=x*S+g*I,R=x*I-g*S,M=R/(w/_+T),b+=M,z=T+R*M/2,l<0&&(b=-b),i[n++]=B*A,i[n++]=B*b,i[n]=z}const z={source:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},dest:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},projector:m},C=(0,n.kU)(1),B=(0,n.KJ)(1),N=.5*Math.PI,O=a.$O.radius,q=O*Math.PI/180,G=180/(O*Math.PI)},41266:(e,t,i)=>{i.d(t,{A:()=>m});var n=i(31635),s=i(69540),r=i(66552),a=i(25482),o=i(91429),l=i(56507),u=i(93223);const c=new r.J({esriFieldTypeInteger:"integer",esriFieldTypeString:"string"});let d=class extends((0,s.OU)(a.o)){constructor(e){super(e),this.alias=null,this.responseType=null,this.type=null,this.value=null,this.valueType=null}};(0,n.Cg)([(0,o.MZ)({type:String,json:{name:"outAlias",write:!0}})],d.prototype,"alias",void 0),(0,n.Cg)([(0,o.MZ)({type:String})],d.prototype,"responseType",void 0),(0,n.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],d.prototype,"type",void 0),(0,n.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],d.prototype,"value",void 0),(0,n.Cg)([(0,u.e)(c)],d.prototype,"valueType",void 0),d=(0,n.Cg)([(0,o.$K)("esri.rest.support.AttributeBinsGrouping")],d);const p=d;d.from=(0,l.dp)(d);const f=new r.J({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeDate:"date",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"}),h=new r.J({naturalLog:"natural-log",squareRoot:"square-root"});let m=class extends((0,s.OU)(a.o)){constructor(e){super(e),this.expression=null,this.expressionValueType=null,this.field=null,this.firstDayOfWeek=null,this.hideUpperBound=null,this.splitBy=null,this.stackBy=null,this.transformation=null}};(0,n.Cg)([(0,o.MZ)({type:String,json:{name:"onExpression.value",write:!0}})],m.prototype,"expression",void 0),(0,n.Cg)([(0,u.e)(f,{name:"onExpression.valueType"})],m.prototype,"expressionValueType",void 0),(0,n.Cg)([(0,o.MZ)({type:String,json:{name:"onField",write:!0}})],m.prototype,"field",void 0),(0,n.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],m.prototype,"firstDayOfWeek",void 0),(0,n.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],m.prototype,"hideUpperBound",void 0),(0,n.Cg)([(0,o.MZ)({type:p,json:{write:{overridePolicy(){return{enabled:null!=this.splitBy?.value||null!=this.splitBy?.type}}}}})],m.prototype,"splitBy",void 0),(0,n.Cg)([(0,o.MZ)({type:p,json:{write:{target:{stackBy:{type:p},jsonStyle:{type:String}},writer:(e,t)=>{e&&(t.stackBy=e.toJSON(),null!=e.responseType&&(t.jsonStyle=e.responseType))},overridePolicy(){return{enabled:null!=this.stackBy?.value||null!=this.stackBy?.type}}},read:{source:["stackBy","jsonStyle"],reader:(e,t)=>p.fromJSON({...t.stackBy,responseType:t.jsonStyle})}}})],m.prototype,"stackBy",void 0),(0,n.Cg)([(0,u.e)(h)],m.prototype,"transformation",void 0),m=(0,n.Cg)([(0,o.$K)("esri.rest.support.BinParametersBase")],m)},41366:(e,t,i)=>{i.d(t,{K:()=>d,Q:()=>l});var n=i(31635),s=i(66552),r=i(53966),a=i(91429),o=i(93223);const l=(0,s.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),u="percent-of-total",c="field",d=e=>{const t=e;let i=class extends t{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType");const t=!!this.normalizationField,i=null!=this.normalizationTotal;return t||i?(e=t&&c||i&&u||null,t&&i&&r.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==c&&e!==u||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,n.Cg)([(0,a.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],i.prototype,"normalizationField",void 0),(0,n.Cg)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],i.prototype,"normalizationMaxValue",void 0),(0,n.Cg)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],i.prototype,"normalizationMinValue",void 0),(0,n.Cg)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],i.prototype,"normalizationTotal",void 0),(0,n.Cg)([(0,o.e)(l,{name:"parameters.normalizationType"})],i.prototype,"normalizationType",null),i=(0,n.Cg)([(0,a.$K)("esri.rest.support.NormalizationBinParametersMixin")],i),i}},44123:(e,t,i)=>{i.d(t,{WhereClauseCache:()=>r});var n=i(66344),s=i(88368);class r{constructor(e,t){this._cache=new n.q(e),this._invalidCache=new n.q(t)}get(e,t){const i=`${t?.uid}:${e}`,n=this._cache.get(i);if(n)return n;if(null!=this._invalidCache.get(i))return null;try{const n=s.A.create(e,{fieldsIndex:t});return this._cache.put(i,n),n}catch(e){return this._invalidCache.put(i,e),null}}getError(e,t){const i=`${t?.uid}:${e}`;return this._invalidCache.get(i)??null}}},44794:(e,t,i)=>{i.d(t,{v:()=>o});var n=i(4718),s=i(62788),r=i(95488);class a{constructor(e,t){this._observable=new r.I,this._value=e,this._equalityFunction=t}get value(){return(0,s.gc)(this._observable),this._value}set value(e){this._equalityFunction(e,this._value)||(this._value=e,this._observable.notify())}mutate(e){e(this._value),this._observable.notify()}}function o(e,t=n.gh){return new a(e,t)}},51441:(e,t,i)=>{i.d(t,{LQ:()=>s,ag:()=>a,pL:()=>r});var n=i(90708);function s(e,t,i,s=e.hasZ,r=e.hasM){if(null==t)return null;const a=e.hasZ&&s,o=e.hasM&&r;if(i){const e=(0,n.Nl)(t,"esriGeometryPoint",i,s,r);return(0,n.DF)(e,a,o)}return(0,n.DF)(t,a,o)}function r(e,t,i,s,r,a){if(null==t)return null;const o="coords"in t?t:t.geometry;if(null==o)return null;const{hasZ:l,hasM:u}=o,c=l&&(r??=l),d=u&&(a??=u);if(i){let t=(0,n.kz)(o,e,i,r,a);return s&&(t=(0,n.Nl)(t,e,s)),(0,n.zv)(t,e,c,d)}if(s){const t=(0,n.Nl)(o,e,s,r,a);return(0,n.zv)(t,e,c,d)}return(0,n.zv)(o,e,c,d)}function a(e){return e&&o in e?JSON.parse(JSON.stringify(e,l)):e}const o="_geVersion",l=(e,t)=>e===o?void 0:t},54339:(e,t,i)=>{function n(e,t){switch(t.type){case"object-id":case"unique-id-simple":return e.attributes[t.fieldName];case"unique-id-composite":{const i=[];for(const n of t.fieldNames)i.push(e.attributes[n]??null);return JSON.stringify(i)}}}function s(e,t){if("uniqueIdFields"in t&&t.uniqueIdFields?.length){if(1===t.uniqueIdFields.length)return e.attributes?.[t.uniqueIdFields[0]];const i=t.uniqueIdFields.map(t=>e.attributes?.[t]);return JSON.stringify(i)}return"objectIdField"in t&&t.objectIdField?e.attributes?.[t.objectIdField]:null}i.d(t,{W:()=>n,r:()=>s})},56390:(e,t,i)=>{i.d(t,{do:()=>k,Wc:()=>$});var n=i(4576),s=i(21818),r=i(49186),a=(i(44208),i(4718)),o=i(97768),l=i(74887),u=i(86211),c=i(12195),d=i(91218),p=i(70328),f=i(19419),h=i(6606),m=i(65864),y=i(17136),g=i(21325),x=i(90708),F=i(29441),_=i(51441),v=i(31464);class w{constructor(){this._storage=new Map,this._purgeInterval=5,this._sweep=()=>{if(this._timer=void 0,!this._storage)return;const e=1e3*this._purgeInterval,t=performance.now()-e;for(const[i,n]of this._storage){if(!(n.time<t))return void(this._storage.size>0&&(this._timer=setTimeout(this._sweep,e)));this._storage.delete(i)}}}destroy(){this._storage?.clear(),this._storage=null,clearTimeout(this._timer)}put(e,t){this._storage?.set(e,new I(t)),this._scheduleSweep()}get(e){const t=this._storage?.get(e);if(t)return this._storage?.delete(e),t.time=performance.now(),this._storage?.set(e,t),t.items}clear(){this._storage?.clear()}_scheduleSweep(){this._storage&&(this._timer??=setTimeout(this._sweep,1e3*this._purgeInterval))}get test(){}}let S=0;class I{constructor(e){this.items=e,this.time=performance.now(),this.id=S++}}var R=i(99352),T=i(8384),M=i(58727),b=i(62660),A=i(43668);const z="unsupported-query";async function C(e,{fieldsIndex:t,geometryType:i,spatialReference:n,availableFields:s}){if(null!=e.geometryPrecision||e.multipatchOption&&"xyFootprint"!==e.multipatchOption||e.pixelSize||e.relationParam||e.text)throw new r.A(z,"Unsupported query options",{query:e});return B(t,s,e),function(e,t,i){const{outStatistics:n,groupByFieldsForStatistics:s,having:a}=i,o=s?.length,l=n?.length;if(a){if(!o||!l)throw new r.A(z,"outStatistics and groupByFieldsForStatistics should be specified with having",{query:i});(0,F.eD)(e,t,a,n,i)}if(l){if(null==(u=n)||!u.every(e=>"exceedslimit"!==e.statisticType))return;const a=n.map(e=>e.onStatisticField).filter(Boolean);(0,F.MG)(e,t,a,{expressionName:"onStatisticFields",query:i}),o&&(0,F.MG)(e,t,s,{expressionName:"groupByFieldsForStatistics",query:i});for(const s of n){const{onStatisticField:n,statisticType:a}=s;if("percentile_disc"!==a&&"percentile_cont"!==a||!("statisticParameters"in s))e.get(n)&&"count"!==a&&"min"!==a&&"max"!==a&&(0,F.MG)(e,t,[n],{expressionName:`outStatistics with '${a}' statistic type`,allowedFieldTypes:N,query:i});else{const{statisticParameters:e}=s;if(!e)throw new r.A(z,"statisticParameters should be set for percentile type",{definition:s,query:i})}}}var u}(t,s,e),Promise.all([(0,b.c0)(e,i,n),(0,v.Nk)(n,e.outSR)]).then(()=>e)}function B(e,t,i){const{returnDistinctValues:n,outStatistics:s}=i,a=s?s.map(e=>e.outStatisticFieldName&&e.outStatisticFieldName.toLowerCase()).filter(Boolean):[];if("orderByFields"in i&&i.orderByFields&&i.orderByFields.length>0){const n=" asc",s=" desc",r=i.orderByFields.map(e=>{const t=e.toLowerCase();return t.includes(n)?t.split(n)[0]:t.includes(s)?t.split(s)[0]:e}).filter(e=>!a.includes(e));(0,F.MG)(e,t,r,{expressionName:"orderByFields",query:i})}if("outFields"in i)if(i.outFields?.length)(0,F.MG)(e,t,i.outFields,{expressionName:"outFields",query:i,allowedFieldTypes:"all"});else if(n)throw new r.A(z,"outFields should be specified for returnDistinctValues",{query:i});(0,F.SN)(e,t,i.where,i)}const N=new Set([...F.vl,...F.VW]);async function O(e,t,i,n){let s=[];if(i.valueExpression){const{arcadeUtils:e}=await(0,A.l)();s=e.extractFieldNames(i.valueExpression)}if(i.field&&s.push(i.field),i.field2&&s.push(i.field2),i.field3&&s.push(i.field3),i.normalizationField&&s.push(i.normalizationField),!s.length&&!i.valueExpression)throw new r.A(z,"field or valueExpression is required",{params:i});(0,F.MG)(e,t,s,{expressionName:"statistics",query:n})}var q=i(86420),G=i(95466),P=(i(71511),i(53966),i(36708),i(44794),i(78659)),E=i(31635),j=i(69622),D=i(91429);let V=class extends j.A{constructor(){super(...arguments),this.SCHEDULER_LOG_SLOW_TASKS=!1,this.FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES=!1}};(0,E.Cg)([(0,D.MZ)()],V.prototype,"SCHEDULER_LOG_SLOW_TASKS",void 0),(0,E.Cg)([(0,D.MZ)()],V.prototype,"FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES",void 0),V=(0,E.Cg)([(0,D.$K)("esri.views.support.debugFlags")],V),new V,Symbol("Yield");new Map([["immediate",0],["schedule",4],["slide",0],["stream loader",0],["elevation query",0],["terrain",1],["surface geometry updates",1],["LoD renderer",2],["Graphics3D",2],["I3S",2],["point cloud",2],["feature fetcher",2],["stream controller",2],["clouds generator",2],["overlay",4],["overlay renderer",4],["stage",4],["graphics deconflictor",4],["graphics filter visibility",4],["graphics scale visibility",4],["graphics frustum visibility",4],["POI frequent",6],["POI infrequent",30],["labeler",8],["feature query",8],["feature tile tree",16],["fast feature tile tree",0],["elevation alignment",12],["elevation alignment scene",14],["text texture atlas",12],["texture unload",12],["line of sight tool",16],["interactive line of sight tool",0],["snapping",0],["shadow accumulator",30],["flow generator",12],["mapview fetch queue",0],["mapview layerview update",2],["mapview vector tile parsing queue",0]]),(0,P.l5)(6.5),(0,P.l5)(1),(0,P.l5)(30),(0,P.l5)(1e3/30),(0,P.l5)(100);const Z=new class{constructor(){this._begin=performance?.now()??0,this._budget=0,this._done=!1,this._progressed=!1,this._enabled=!0}run(e){return!this.done&&(!0===e()&&this.madeProgress(),!0)}get done(){return this._done}get budget(){return this._budget}madeProgress(){return this._progressed=!0,this._done=this.elapsed>=this._budget&&this._enabled,this._done}get enabled(){return this._enabled}set enabled(e){this._enabled=e}reset(e){this._begin=this.now(),this._budget=e,this.resetProgress()}get remaining(){return Math.max(this._budget-this.elapsed,0)}now(){return performance.now()}get elapsed(){return this.now()-this._begin}resetProgress(){this._progressed=!1,this._done=!1}get hasProgressed(){return this._progressed}};Z.enabled=!1;const Q=new class{remove(){}processQueue(){}schedule(e,t,i){try{if((0,l.G4)(t)){const e=(0,l.NK)();return i?Promise.resolve(i(e)):Promise.reject(e)}return(0,l.z7)(e(Z))}catch(e){return Promise.reject(e)}}reschedule(e,t,i){return this.schedule(e,t,i)}async scheduleGenerator(e,t,i){if((0,l.G4)(t)){const e=(0,l.NK)();if(i)return i(e);throw e}const n=e(Z);for(;;){const e=n.next(Z),s=(0,l.$X)(e)?await e:e;if((0,l.G4)(t)){const e=(0,l.NK)();if(i){const t=i(e),s=n.return(null);return(0,l.$X)(s)&&await(0,l.QZ)(s),t}const t=n.throw(e);throw(0,l.$X)(t)&&await(0,l.QZ)(t),e}if(s.done)return s.value}}};class k{constructor(e){this._changeHandle=null,this.capabilities={query:R.F},this.geometryType=e.geometryType,this.hasM=!!e.hasM,this.hasZ=!!e.hasZ,this.spatialReference=e.spatialReference,this.definitionExpression=e.definitionExpression,this.featureStore=e.featureStore,this.aggregateAdapter=e.aggregateAdapter,this._cache=e.cache??new w,this.timeInfo=e.timeInfo,this.featureIdInfo=e.featureIdInfo,"object-id"===e.featureIdInfo.type&&(this.objectIdField=e.featureIdInfo.fieldName),this._changeHandle=this.featureStore.events.on("changed",()=>this._clearCache()),this.fieldsIndex=(0,c.W)(e.fieldsIndex)?e.fieldsIndex:G.A.fromJSON(e.fieldsIndex),!e.availableFields||1===e.availableFields.length&&"*"===e.availableFields[0]?this.availableFields=new Set(this.fieldsIndex.fields.map(e=>e.name)):this.availableFields=new Set(e.availableFields.map(e=>this.fieldsIndex.get(e)?.name).filter(e=>null!=e)),e.scheduler&&e.priority?this._frameTask=e.scheduler.registerTask(e.priority):this._frameTask=Q}destroy(){this._changeHandle=(0,o.xt)(this._changeHandle),this._frameTask=(0,o.xt)(this._frameTask),this._clearCache(),(0,o.pR)(this._cache)}get featureAdapter(){return this.featureStore.featureAdapter}async executeQuery(e,t){const i=(0,l.Mq)(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryFeatureSet(e),i)}async executeQueryForCount(e={},t){const i=(0,l.Mq)(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForCount(e),i)}async executeQueryForExtent(e,t){const i=(0,l.Mq)(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForExtent(e),i)}async executeQueryForIds(e,t){return Array.from(await this.executeQueryForIdSet(e,t))}async executeQueryForIdSet(e,t){const i=(0,l.Mq)(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForIdSet(e),i)}async executeQueryForLatestObservations(e,t){const i=(0,l.Mq)(t);if(!this.timeInfo?.trackIdField)throw new r.A("unsupported-query","Missing timeInfo or timeInfo.trackIdField",{query:e,timeInfo:this.timeInfo});return await this._frameTask.scheduleGenerator(()=>this._executeQueryForLatestObservations(e),i)}async executeQueryForOpaqueFeatures(e,t){const i=(0,l.Mq)(t);return(await this._frameTask.scheduleGenerator(()=>this._executeQuery(e,{}),i)).items}async executeAttributeBinsQuery(e,t){const i=(0,l.Mq)(t);return e=(0,a.o8)(e),await this._frameTask.scheduleGenerator(()=>this._executeAttributeBinsQuery(e),i)}async executeQueryForSummaryStatistics(e={},t,i){const n=(0,l.Mq)(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForSummaryStatistics(e,t),n)}async executeQueryForUniqueValues(e={},t,i){const n=(0,l.Mq)(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForUniqueValues(e,t),n)}async executeQueryForClassBreaks(e={},t,i){const n=(0,l.Mq)(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForClassBreaks(e,t),n)}async executeQueryForHistogram(e={},t,i){const n=(0,l.Mq)(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForHistogram(e,t),n)}async executeQueryForSnapping(e,t){const i=(0,l.Mq)(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForSnapping(e,i),i)}async fetchRecomputedExtents(e){const t=(0,l.Mq)(e);this._timeExtentPromise||=(0,q.W)(this.timeInfo,this.featureStore);const[i,n]=await Promise.all([this._getFullExtent(),this._timeExtentPromise]);return(0,l.Te)(t),{fullExtent:i,timeExtent:n}}_clearCache(){this._cache.clear(),this._allFeaturesPromise=null,this._timeExtentPromise=null,this._fullExtentPromise=null}async*_executeQueryFeatureSet(e){try{const t=yield*this._executeQuery(e,{});return yield,await t.createQueryResponse()}catch(t){if(t!==M.v8)throw t;return await new T.G([],e,this).createQueryResponse()}}async*_executeQueryForCount(e){try{const t=yield*this._executeQuery(e,{returnGeometry:!1,returnCentroid:!1,outSR:null});return yield,t.createQueryResponseForCount()}catch(e){if(e!==M.v8)throw e;return 0}}async*_executeQueryForExtent(e){const t=e.outSR;try{const i=yield*this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null});yield;const n=i.size;if(!n)return{count:0,extent:null};const s=await this._getBounds(i.items,i.spatialReference,t??this.spatialReference);return yield,{count:n,extent:s}}catch(e){if(e===M.v8)return{count:0,extent:null};throw e}}async*_executeQueryForIdSet(e){try{const t=yield*this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null});yield;const i=t.items,n=new Set;for(const e of i)n.add(t.featureAdapter.getObjectId(e));return n}catch(e){if(e===M.v8)return new Set;throw e}}async*_executeQueryForLatestObservations(e){try{const t=yield*this._executeQuery(e,{});return yield,this._filterLatest(t),yield,await t.createQueryResponse()}catch(t){if(t!==M.v8)throw t;return await new T.G([],e,this).createQueryResponse()}}async*_executeAttributeBinsQuery(e){let t;try{e=await(0,M.iJ)(e,this.definitionExpression,this.spatialReference),yield,e=await async function(e,t){const i=e.bin;if(!i.onField&&!i.onExpression?.value||"autoIntervalBin"===i.type&&null==i.parameters.numberOfBins||"dateBin"===i.type&&(null==i.parameters.number||null==i.parameters.unit)||"fixedBoundariesBin"===i.type&&null==i.parameters.boundaries||"fixedIntervalBin"===i.type&&null==i.parameters.interval)throw new r.A(z,"Unsupported query options",{query:e});return C(e,t)}(e,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield;const i=yield*this._executeSceneFilterQuery(e);yield,t=yield*this._executeGeometryQuery(e,i),yield,this._executeAggregateIdsQuery(t),yield,this._executeObjectIdsQuery(t),yield,this._executeTimeQuery(t),yield,this._executeAttributesQuery(t),yield}catch(i){if(i!==M.v8)throw i;t=new T.G([],e,this)}return await t.createQueryBinsResponse(e)}async*_executeQueryForSummaryStatistics(e={},t){const{field:i,normalizationField:n,valueExpression:s}=t,r=yield*this._executeQueryForStatistics(e,{field:i,normalizationField:n,valueExpression:s});return yield,await r.createSummaryStatisticsResponse(t)}async*_executeQueryForUniqueValues(e={},t){const{field:i,field2:n,field3:s,valueExpression:r}=t,a=yield*this._executeQueryForStatistics(e,{field:i,field2:n,field3:s,valueExpression:r});return yield,await a.createUniqueValuesResponse(t)}async*_executeQueryForClassBreaks(e,t){const{field:i,normalizationField:n,valueExpression:s}=t,r=yield*this._executeQueryForStatistics(e,{field:i,normalizationField:n,valueExpression:s});return yield,await r.createClassBreaksResponse(t)}async*_executeQueryForHistogram(e,t){const{field:i,normalizationField:n,valueExpression:s}=t,r=yield*this._executeQueryForStatistics(e,{field:i,normalizationField:n,valueExpression:s});return yield,await r.createHistogramResponse(t)}async*_executeQueryForSnapping(e,t){const{point:i,distance:n,returnEdge:s,vertexMode:r}=e;if(!s&&"none"===r)return{candidates:[]};let o=(0,a.o8)(e.query);o=await(0,M.T2)(o,this.definitionExpression,this.spatialReference),yield,o=await C(o,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield;const l=!(0,g.aI)(i.spatialReference,this.spatialReference);l&&(await(0,v.Nk)(i.spatialReference,this.spatialReference),yield);const u="number"==typeof n?n:n.x,c="number"==typeof n?n:n.y,d={xmin:i.x-u,xmax:i.x+u,ymin:i.y-c,ymax:i.y+c,spatialReference:i.spatialReference},p=l?(0,v.Cv)(d,this.spatialReference):d;if(!p)return{candidates:[]};const f=(await(0,y.el)((0,m.rS)(i),null,{signal:t}))[0];yield;const h=(await(0,y.el)((0,m.rS)(p),null,{signal:t}))[0];if(yield,null==f||null==h)return{candidates:[]};const x=await this._searchFeatures(L(h.toJSON()));yield;const F=new T.G(x,o,this);this._executeObjectIdsQuery(F),yield,this._executeTimeQuery(F),yield,this._executeAttributesQuery(F),yield,yield*this._executeGeometryQueryForSnapping(F),yield;const _=f.toJSON(),w=l?(0,v.Cv)(_,this.spatialReference):_,S=l?Math.max(p.xmax-p.xmin,p.ymax-p.ymin)/2:n;return F.createSnappingResponse({...e,point:w,distance:S},o.returnZ,i.spatialReference)}async _getBounds(e,t,i){const n=(0,p.hZ)((0,p.vt)(),p.qv);return await this.featureStore.forEachBounds(e,e=>(0,p.RF)(n,e)),$(n,t,i,this.spatialReference,this.hasZ)}_getFullExtent(){return this._fullExtentPromise||="getFullExtent"in this.featureStore&&this.featureStore.getFullExtent?Promise.resolve(this.featureStore.getFullExtent(this.spatialReference)):this._getAllFeatures().then(e=>this._getBounds(e,this.spatialReference,this.spatialReference)),this._fullExtentPromise}async _getAllFeaturesQueryEngineResult(e){return new T.G(await this._getAllFeatures(),e,this)}async _getAllFeatures(){if(null==this._allFeaturesPromise){const e=[];this._allFeaturesPromise=(async()=>await this.featureStore.forEach(t=>e.push(t)))().then(()=>(0,s.zI)(e))}const e=this._allFeaturesPromise,t=await e;return e===this._allFeaturesPromise?t.slice():this._getAllFeatures()}async*_executeQuery(e,t){e=(0,a.o8)(e),e=await(0,M.GC)(e,this.definitionExpression,this.spatialReference),yield,e=await C(e,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield,e={...e,...t};const i=yield*this._executeSceneFilterQuery(e);yield;const n=yield*this._executeGeometryQuery(e,i);return yield,this._executeAggregateIdsQuery(n),yield,this._executeObjectIdsQuery(n),yield,this._executeTimeQuery(n),yield,this._executeAttributesQuery(n),n}async*_executeSceneFilterQuery(e){if(null==e.sceneFilter)return null;const{outSR:t,returnGeometry:i,returnCentroid:n}=e,s=this.featureStore.featureSpatialReference,r=e.sceneFilter.geometry,a=null==s||(0,g.aI)(s,r.spatialReference)?r:(0,v.Cv)(r,s);if(!a)return null;const o=i||n,l=(0,g.fn)(t)&&!(0,g.aI)(this.spatialReference,t)&&o?async e=>this._project(e,t):e=>e;yield;const u=this.featureAdapter,c=await this._searchFeatures(L(a));if(yield,"disjoint"===e.sceneFilter.spatialRelationship){if(!c.length)return null;const t=new Set;for(const e of c)t.add(u.getObjectId(e));const i=await this._getAllFeatures();yield;const n=await(0,b.xt)("esriSpatialRelDisjoint",a,this.geometryType);yield;const s=e=>!t.has(u.getObjectId(e))||n(u.getGeometry(e)),r=yield*this._runSpatialFilter(i,s);yield;const o=new T.G(r,e,this);return await l(o)}if(!c.length)return new T.G([],e,this);if(this._canExecuteSinglePass(a,e))return await l(new T.G(c,e,this));const d=await(0,b.xt)("esriSpatialRelContains",a,this.geometryType);yield;const p=yield*this._runSpatialFilter(c,e=>d(u.getGeometry(e)));return yield,await l(new T.G(p,e,this))}async*_executeGeometryQuery(e,t){if(null!=t&&0===t.items.length)return t;const{geometry:i,outSR:s,returnGeometry:r,returnCentroid:a}=e,o=t?null:this._getCacheKey(e),l=o?this._cache.get(o):null;if(l)return new T.G(l,e,this);const u=(0,g.fn)(s)&&!(0,g.aI)(this.spatialReference,s),c=r||a,d=async e=>(u&&c&&await this._project(e,s),o&&this._cache.put(o,e.items),e),p=this.featureStore.featureSpatialReference,f=!i||null==p||(0,g.aI)(p,i.spatialReference)?i:(0,v.Cv)(i,p);if(!f)return await d(null!=t?t:await this._getAllFeaturesQueryEngineResult(e));yield;const h=this.featureAdapter;let m=await this._searchFeatures(L(i));yield;const y=e.spatialRel??"esriSpatialRelIntersects";if("esriSpatialRelDisjoint"===y){if(!m.length)return await d(null!=t?t:await this._getAllFeaturesQueryEngineResult(e));const i=new Set;for(const e of m)i.add(h.getObjectId(e));let n;null!=t?n=t.items:(yield,n=await this._getAllFeatures(),yield);const s=await(0,b.xt)(y,f,this.geometryType);yield;const r=e=>!i.has(h.getObjectId(e))||s(h.getGeometry(e)),a=yield*this._runSpatialFilter(n,r);yield;const o=new T.G(a,e,this);return await d(o)}if(null!=t){const e=new n.vW;m=m.filter(i=>(0,n.qh)(t.items,i,t.items.length,e)>=0)}if(!m.length){const t=new T.G([],e,this);return o&&this._cache.put(o,t.items),t}if(this._canExecuteSinglePass(f,e))return await d(new T.G(m,e,this));const x=await(0,b.xt)(y,f,this.geometryType);yield;const F=yield*this._runSpatialFilter(m,e=>x(h.getGeometry(e)));return yield,await d(new T.G(F,e,this))}_executeAggregateIdsQuery(e){if(0===e.items.length||!e.query.aggregateIds?.length||null==this.aggregateAdapter)return;const t=new Set;for(const i of e.query.aggregateIds)this.aggregateAdapter.getFeatureObjectIds(i).forEach(e=>t.add(e));const i=this.featureAdapter.getObjectId;e.items=e.items.filter(e=>t.has(i(e)))}_executeObjectIdsQuery(e){if(0===e.items.length||!e.query.objectIds?.length)return;const t=new Set(e.query.objectIds),i=this.featureAdapter.getObjectId;e.items=e.items.filter(e=>t.has(i(e)))}_executeTimeQuery(e){if(0===e.items.length)return;const t=(0,q.I)(this.timeInfo,e.query.timeExtent,this.featureAdapter);null!=t&&(e.items=e.items.filter(t))}_executeAttributesQuery(e){if(0===e.items.length)return;const t=(0,F.j4)(e.query.where,this.fieldsIndex);if(t){if(!t.isStandardized)throw new TypeError("Where clause is not standardized");e.items=e.items.filter(e=>t.testFeature(e,this.featureAdapter))}}async*_executeGeometryQueryForSnapping(e){const{query:t}=e,{spatialRel:i}=t;if(!e?.items?.length||!t.geometry||!i)return;const n=await(0,b.xt)(i,t.geometry,this.geometryType);yield;const s=this.featureAdapter,r=yield*this._runSpatialFilter(e.items,e=>n(s.getGeometry(e)));e.items=r}*_runSpatialFilter(e,t){if(!t)return e;if(null==this._frameTask)return e.filter(e=>t(e));let i=yield;const n=new Array;for(const s of e)t(s)&&n.push(s),i.madeProgress(),i.done&&(i=yield);return n}_filterLatest(e){const{trackIdField:t,startTimeField:i,endTimeField:n}=this.timeInfo,s=n||i,r=new Map,a=this.featureAdapter.getAttribute;for(const i of e.items){const e=a(i,t),n=a(i,s),o=r.get(e);(!o||n>a(o,s))&&r.set(e,i)}e.items=Array.from(r.values())}_getCacheKey(e){const{geometry:t,spatialRel:i,returnGeometry:n,returnCentroid:s,outSR:r,resultType:a,cacheHint:o}=e;if("tile"!==a&&!o)return null;const l=n||s;return(0,g.fn)(r)&&!(0,g.aI)(this.spatialReference,r)&&l?JSON.stringify([t,i,r]):JSON.stringify([t,i])}_canExecuteSinglePass(e,t){const{spatialRel:i}=t;return(0,b.tC)(e)&&("esriSpatialRelEnvelopeIntersects"===i||"esriGeometryPoint"===this.geometryType&&("esriSpatialRelIntersects"===i||"esriSpatialRelContains"===i))}async _project(e,t){if(!t||(0,g.aI)(this.spatialReference,t))return e;const i=this.featureAdapter,n=(0,d.isLoaded)()?await this._getFullExtent():void 0,r=await(0,v.lK)(e.items.map(e=>(0,_.pL)(this.geometryType,i.getGeometry(e))),this.spatialReference,t,{areaOfInterestExtent:n});return e.items=(0,s.zI)(r.map((t,n)=>i.cloneWithGeometry(e.items[n],(0,x.Ux)(t,this.hasZ,this.hasM)))),e}async _searchFeatures(e){const t=new Set;await Promise.all(e.map(e=>this.featureStore.forEachInBounds(e,e=>t.add(e))));const i=Array.from(t.values());return t.clear(),i}async*_executeQueryForStatistics(e,t){e=(0,a.o8)(e);try{e=await(0,M.GC)(e,this.definitionExpression,this.spatialReference),yield,e=await async function(e,t,{fieldsIndex:i,geometryType:n,spatialReference:s,availableFields:a}){if(null!=e.geometryPrecision||e.multipatchOption||e.pixelSize||e.relationParam||e.text||e.outStatistics||e.groupByFieldsForStatistics||e.having||e.orderByFields)throw new r.A(z,"Unsupported query options",{query:e});return B(i,a,e),Promise.all([O(i,a,t,e),(0,b.c0)(e,n,s),(0,v.Nk)(s,e.outSR)]).then(()=>e)}(e,t,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield;const i=yield*this._executeSceneFilterQuery(e);yield;const n=yield*this._executeGeometryQuery(e,i);return yield,this._executeAggregateIdsQuery(n),yield,this._executeObjectIdsQuery(n),yield,this._executeTimeQuery(n),yield,this._executeAttributesQuery(n),yield,n}catch(t){if(t!==M.v8)throw t;return new T.G([],e,this)}}get test(){}}function L(e){if((0,b.tC)(e)){if((0,m.ZC)(e))return[(0,f.fA)(Math.min(e.xmin,e.xmax),Math.min(e.ymin,e.ymax),Math.max(e.xmin,e.xmax),Math.max(e.ymin,e.ymax))];if((0,m.Bi)(e))return e.rings.map(e=>(0,f.fA)(Math.min(e[0][0],e[2][0]),Math.min(e[0][1],e[2][1]),Math.max(e[0][0],e[2][0]),Math.max(e[0][1],e[2][1])))}return[(0,h.Rg)((0,f.vt)(),e)]}function $(e,t,i,n,s){const r={xmin:e[0],ymin:e[1],xmax:e[3],ymax:e[4],spatialReference:(0,_.ag)(n)};s&&isFinite(e[2])&&isFinite(e[5])&&(r.zmin=e[2],r.zmax=e[5],r.hasZ=!0);const a=(0,v.Cv)(r,t,i);if(a.spatialReference=(0,_.ag)(i),a.xmax-a.xmin===0){const e=(0,u.GA)(a.spatialReference);a.xmin-=e,a.xmax+=e}if(a.ymax-a.ymin===0){const e=(0,u.GA)(a.spatialReference);a.ymin-=e,a.ymax+=e}if(s&&null!=a.zmin&&null!=a.zmax&&a.zmax-a.zmin===0){const e=(0,u.GA)(a.spatialReference);a.zmin-=e,a.zmax+=e}return a}},57231:(e,t,i)=>{i.d(t,{g:()=>n});const n=(0,i(66552).O)()({year:"years",quarter:"quarters",month:"months",week:"weeks",day:"days",hour:"hours",minute:"minutes",second:"seconds"})},58727:(e,t,i)=>{i.d(t,{GC:()=>y,T2:()=>g,VY:()=>p,dO:()=>F,iJ:()=>m,v8:()=>f});var n=i(49186),s=i(66552),r=i(86211),a=i(91218),o=i(90634),l=i(65864),u=i(17136),c=i(21325),d=i(31464);const p=new s.J({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"}),f=Object.freeze({}),h="frequency";async function m(e,t,i){const n=e.bin;return n.onField&&(n.onField=n.onField.trim()),n.onExpression?.value&&(n.onExpression.value=n.onExpression.value.trim()),n.splitBy&&(n.splitBy.value&&(n.splitBy.value=n.splitBy.value.trim()),n.splitBy.outAlias&&(n.splitBy.outAlias=n.splitBy.outAlias.trim())),n.stackBy&&(n.stackBy.value&&(n.stackBy.value=n.stackBy.value.trim()),n.stackBy.outAlias&&(n.stackBy.outAlias=n.stackBy.outAlias.trim())),"normalizationField"in n.parameters&&n.parameters.normalizationField&&(n.parameters.normalizationField=n.parameters.normalizationField.trim()),e.outStatistics?.length||(e.outStatistics=[{statisticType:"count",onStatisticField:"1",outStatisticFieldName:h}]),y(e,t,i)}async function y(e,t,i){const{outFields:n,orderByFields:s,groupByFieldsForStatistics:r,outStatistics:a}=e;if(n)for(let e=0;e<n.length;e++)n[e]=n[e].trim();if(s)for(let e=0;e<s.length;e++)s[e]=s[e].trim();if(r)for(let e=0;e<r.length;e++)r[e]=r[e].trim();if(a)for(let e=0;e<a.length;e++)a[e].onStatisticField&&(a[e].onStatisticField=a[e].onStatisticField.trim());return e.geometry&&!e.outSR&&(e.outSR=e.geometry.spatialReference),g(e,t,i)}async function g(e,t,s){if(!e)return null;let{where:a}=e;if(e.where=a=a?.trim(),(!a||/^1 *= *1$/.test(a)||t&&t===a)&&(e.where=null),!e.geometry)return e;let h=await async function(e){const{distance:t,units:s}=e,a=e.geometry;if(null==t||"vertexAttributes"in a)return a;const o=a.spatialReference,u=s?p.fromJSON(s):(0,r.Ij)(o),f=o&&((0,c.EA)(o)||(0,c.K8)(o))?a:await(0,d.Nk)(o,c.KK).then(()=>(0,d.Cv)(a,c.KK)),h=await i.e(9159).then(i.bind(i,49159));await h.load();const m=h.execute(f,t||1,{unit:u})??void 0;if(!m||!(0,l.Bi)(m)||0===m.rings.length)throw new n.A("unsupported-query:invalid-parameters","Invalid parameters for query by distance");return m}(e);if(e.distance=0,e.units=null,"esriSpatialRelEnvelopeIntersects"===e.spatialRel){const{spatialReference:t}=e.geometry;h=(0,o.HA)(h),h.spatialReference=t}if(h){await(0,d.Nk)(h.spatialReference,s),h=function(e,t){const i=e.spatialReference;return x(e,t)&&(0,l.ZC)(e)?{spatialReference:i,rings:[[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]]}:e}(h,s);const t=(await(0,u.el)((0,l.rS)(h)))[0];if(null==t)throw f;const i="quantizationParameters"in e&&e.quantizationParameters?.tolerance||"maxAllowableOffset"in e&&e.maxAllowableOffset||0,n=i&&x(h,s)?{extendedParams:{densificationStep:8*i}}:void 0,r=t.toJSON(),a=(0,d.Cv)(r,r.spatialReference,s,n);if(!a)throw f;a.spatialReference=s,e.geometry=a}return e}function x(e,t){if(!e)return!1;const i=e.spatialReference;return((0,l.ZC)(e)||(0,l.Bi)(e)||(0,l.Rg)(e))&&!(0,c.aI)(i,t)&&!(0,a.canProjectWithoutEngine)(i,t)}function F(e,t){return null==e?null:"string"==typeof e?t?new Date(`1970-01-01T${e}Z`).getTime():new Date(e).getTime():e instanceof Date?e.getTime():e}},59977:(e,t,i)=>{i.d(t,{A:()=>y});var n=i(31635),s=i(93637),r=i(91429),a=i(56507),o=i(41266),l=i(69540),u=i(25482),c=i(57231),d=i(93223);let p=class extends((0,l.OU)(u.o)){constructor(e){super(e),this.value=null,this.unit=null}};(0,n.Cg)([(0,r.MZ)({type:Number,json:{name:"number",write:!0}})],p.prototype,"value",void 0),(0,n.Cg)([(0,d.e)(c.g)],p.prototype,"unit",void 0),p=(0,n.Cg)([(0,r.$K)("esri.rest.support.DateBinTimeInterval")],p);const f=p;function h(e,t,i){(0,s.sM)(i,"string"==typeof e?e:e?.getTime(),t)}function m(e,t){const i=e.parameters[t];return i?"string"==typeof i?i:new Date(i):null}p.from=(0,a.dp)(p);let y=class extends o.A{constructor(e){super(e),this.end=null,this.interval=null,this.offset=null,this.returnFullIntervalBin=!1,this.start=null,this.snapToData=null,this.type="date"}};(0,n.Cg)([(0,r.MZ)({cast:e=>null!=e?"string"==typeof e?e:new Date(e):null,json:{name:"parameters.end",read:{reader:(e,t)=>m(t,"end")},write:{writer:h}}})],y.prototype,"end",void 0),(0,n.Cg)([(0,r.MZ)({type:f,json:{name:"parameters",write:!0}})],y.prototype,"interval",void 0),(0,n.Cg)([(0,r.MZ)({type:f,json:{name:"parameters.offset",write:!0}})],y.prototype,"offset",void 0),(0,n.Cg)([(0,r.MZ)({type:Boolean,json:{name:"parameters.returnFullIntervalBin",write:!0}})],y.prototype,"returnFullIntervalBin",void 0),(0,n.Cg)([(0,r.MZ)({cast:e=>null!=e?"string"==typeof e?e:new Date(e):null,json:{name:"parameters.start",read:{reader:(e,t)=>m(t,"start")},write:{writer:h}}})],y.prototype,"start",void 0),(0,n.Cg)([(0,r.MZ)({type:String,json:{name:"parameters.snapToData",write:!0}})],y.prototype,"snapToData",void 0),(0,n.Cg)([(0,d.e)({dateBin:"date"},{readOnly:!0})],y.prototype,"type",void 0),y=(0,n.Cg)([(0,r.$K)("esri.rest.support.DateBinParameters")],y),y.from=(0,a.dp)(y)},60909:(e,t,i)=>{i.d(t,{A:()=>d});var n=i(31635),s=i(93637),r=i(91429),a=i(56507),o=i(41266),l=i(41366),u=i(93223);function c(e,t,i){(0,s.sM)(i,e instanceof Date?e.getTime():e,t)}let d=class extends((0,l.K)(o.A)){constructor(e){super(e),this.end=null,this.interval=null,this.start=null,this.type="fixed-interval"}};(0,n.Cg)([(0,r.MZ)({json:{name:"parameters.end",write:{writer:c}}})],d.prototype,"end",void 0),(0,n.Cg)([(0,r.MZ)({type:Number,json:{name:"parameters.interval",write:!0}})],d.prototype,"interval",void 0),(0,n.Cg)([(0,r.MZ)({json:{name:"parameters.start",write:{writer:c}}})],d.prototype,"start",void 0),(0,n.Cg)([(0,u.e)({fixedIntervalBin:"fixed-interval"},{readOnly:!0})],d.prototype,"type",void 0),d=(0,n.Cg)([(0,r.$K)("esri.rest.support.FixedIntervalBinParameters")],d),d.from=(0,a.dp)(d)},62660:(e,t,i)=>{i.d(t,{tC:()=>_,c0:()=>F,xt:()=>x});var n=i(49186),s=i(94078),r=i(12176),a=i(65864),o=i(21325);function l(e,t){return c(e,t.coords[0],t.coords[1])}function u(e,t){const{coords:i,lengths:n,stride:s}=t;if(!n)return!1;for(let t=0,r=0;t<n.length;t++,r+=s)if(!c(e,i[r],i[r+1]))return!1;return!0}function c(e,t,i){if(!e)return!1;const{coords:n,lengths:s,stride:r}=e;let a=!1,o=0;for(const e of s)a=d(a,n,r,o,e,t,i),o+=e*r;return a}function d(e,t,i,n,s,r,a){let o=e,l=n;for(let e=n,u=n+s*i;e<u;e+=i){l=e+i,l===u&&(l=n);const s=t[e],c=t[e+1],d=t[l],p=t[l+1];(c<a&&p>=a||p<a&&c>=a)&&s+(a-c)/(p-c)*(d-s)<r&&(o=!o)}return o}var p=i(90708),f=i(51441),h=i(31464);const m="unsupported-query",y={spatialRelationship:{esriSpatialRelIntersects:!0,esriSpatialRelContains:!0,esriSpatialRelWithin:!0,esriSpatialRelCrosses:!0,esriSpatialRelDisjoint:!0,esriSpatialRelTouches:!0,esriSpatialRelOverlaps:!0,esriSpatialRelEnvelopeIntersects:!0,esriSpatialRelIndexIntersects:!1,esriSpatialRelRelation:!1},queryGeometry:{esriGeometryPoint:!0,esriGeometryMultiPatch:!1,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!0},layerGeometry:{esriGeometryPoint:!0,esriGeometryMultiPatch:!0,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!1}},g={esriSpatialRelIntersects:()=>Promise.all([i.e(3661),i.e(1878),i.e(9117),i.e(3299),i.e(7360)]).then(i.bind(i,55284)),esriSpatialRelContains:()=>Promise.all([i.e(3661),i.e(1878),i.e(9117),i.e(3299),i.e(1867)]).then(i.bind(i,29127)),esriSpatialRelCrosses:()=>Promise.all([i.e(3661),i.e(1878),i.e(9117),i.e(3299),i.e(9700)]).then(i.bind(i,85672)),esriSpatialRelDisjoint:()=>Promise.all([i.e(3661),i.e(1878),i.e(9117),i.e(3299),i.e(1598)]).then(i.bind(i,7978)),esriSpatialRelEnvelopeIntersects:null,esriSpatialRelIndexIntersects:null,esriSpatialRelOverlaps:()=>Promise.all([i.e(3661),i.e(1878),i.e(9117),i.e(3299),i.e(1414)]).then(i.bind(i,46178)),esriSpatialRelTouches:()=>Promise.all([i.e(3661),i.e(1878),i.e(9117),i.e(3299),i.e(2503)]).then(i.bind(i,83547)),esriSpatialRelWithin:()=>Promise.all([i.e(3661),i.e(1878),i.e(9117),i.e(3299),i.e(9265)]).then(i.bind(i,85445)),esriSpatialRelRelation:null};async function x(e,t,i){if((0,a.Bi)(t)){if("esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e)){const e=(0,p.Ye)(t,!1,!1);return t=>l(e,t)}if("esriGeometryMultipoint"===i){const i=(0,p.Ye)(t,!1,!1);if("esriSpatialRelContains"===e)return e=>u(i,e)}}if((0,a.ZC)(t)){if("esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e))return e=>(0,s.qz)(t,(0,f.pL)(i,e));if("esriGeometryMultipoint"===i&&"esriSpatialRelContains"===e)return e=>(0,s.rL)(t,(0,f.pL)(i,e));if("esriSpatialRelIntersects"===e){const e="mesh"===(n=i)?r.xB:(0,r.xK)(n);return n=>e(t,(0,f.pL)(i,n))}}var n;"esriSpatialRelEnvelopeIntersects"===e&&(e="esriSpatialRelIntersects");const o=await function(e){const t=g[e];if(null==t)throw new Error(`Cannot load unsupported spatial operator: ${e}`);return t()}(e);return e=>o.execute(t,(0,f.pL)(i,e))}async function F(e,t,i){const{spatialRel:s,geometry:r}=e;if(r){if(null==(l=s)||!0!==y.spatialRelationship[l])throw new n.A(m,"Unsupported query spatial relationship",{query:e});if((0,o.fn)(r.spatialReference)&&(0,o.fn)(i)){if(!function(e){return null!=e&&!0===y.queryGeometry[(0,a.$B)(e)]}(r))throw new n.A(m,"Unsupported query geometry type",{query:e});if(!function(e){return null!=e&&!0===y.layerGeometry[e]}(t))throw new n.A(m,"Unsupported layer geometry type",{query:e});if(e.outSR)return(0,h.Nk)(e.geometry?.spatialReference,e.outSR)}}var l}function _(e){if((0,a.ZC)(e))return!0;if((0,a.Bi)(e)){for(const t of e.rings){if(5!==t.length)return!1;if(t[0][0]!==t[1][0]||t[0][0]!==t[4][0]||t[2][0]!==t[3][0]||t[0][1]!==t[3][1]||t[0][1]!==t[4][1]||t[1][1]!==t[2][1])return!1}return!0}return!1}},62815:(e,t,i)=>{i.d(t,{N:()=>a});var n=i(86211),s=i(73941),r=i(21325);function a(e,t,i){if(null==t||null==i||i.vcsWkid||(0,r.aI)(t,i)||(0,s.xP)(t)||(0,s.xP)(i))return null;const a=(0,n.G9)(t)/(0,n.G9)(i);if(1===a)return null;switch(e){case"point":case"esriGeometryPoint":return e=>function(e,t){null!=e?.z&&(e.z*=t)}(e,a);case"polyline":case"esriGeometryPolyline":return e=>function(e,t){if(e)for(const i of e.paths)for(const e of i)e.length>2&&(e[2]*=t)}(e,a);case"polygon":case"esriGeometryPolygon":return e=>function(e,t){if(e)for(const i of e.rings)for(const e of i)e.length>2&&(e[2]*=t)}(e,a);case"multipoint":case"esriGeometryMultipoint":return e=>function(e,t){if(e)for(const i of e.points)i.length>2&&(i[2]*=t)}(e,a);case"extent":case"esriGeometryEnvelope":return e=>function(e,t){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=t,e.zmax*=t)}(e,a);default:return null}}},69052:(e,t,i)=>{i.d(t,{hr:()=>s,ie:()=>l,uC:()=>o});var n=i(34727);class s{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,i=!1){return r(this.range,this.min,this.max,e,t,i)}clamp(e,t=0){return(0,n.qE)(e-t,this.min,this.max)+t}monotonic(e,t,i){return e<t?t:t+a(this.range,e-t,i)}minimalMonotonic(e,t,i){return r(this.range,e,e+this.range,t,i)}center(e,t,i){return t=this.monotonic(e,t,i),this.normalize((e+t)/2,i)}diff(e,t,i){return this.monotonic(e,t,i)-e}shortestSignedDiff(e,t){e=this.normalize(e);const i=(t=this.normalize(t))-e,n=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(i)<Math.abs(n)?i:n}contains(e,t,i){return t=this.minimalMonotonic(e,t),(i=this.minimalMonotonic(e,i))>e&&i<t}}function r(e,t,i,n,s=0,r=!1){return(n-=s)<t?n+=a(e,t-n):n>i&&(n-=a(e,n-i)),r&&n===i&&(n=t),n+s}function a(e,t,i=0){return Math.ceil((t-i)/e)*e+i}const o=new s(0,2*Math.PI),l=(new s(-Math.PI,Math.PI),new s(0,360))},70328:(e,t,i)=>{i.d(t,{BI:()=>F,DC:()=>d,Ej:()=>f,Ie:()=>g,Jt:()=>x,Ne:()=>h,RF:()=>c,aI:()=>v,fA:()=>a,gE:()=>l,hZ:()=>y,iT:()=>p,is:()=>_,qv:()=>w,vI:()=>m,vY:()=>o,v_:()=>S,vt:()=>r,w1:()=>u});var n=i(5443),s=(i(19419),i(4197));function r(e=S){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function a(e,t,i,n,s,a,o=r()){return o[0]=e,o[1]=t,o[2]=i,o[3]=n,o[4]=s,o[5]=a,o}function o(e,t=r()){return function(e,t,i,n=r()){return y(n,w),function(e,t,i=0,n=t.length/3){let s=e[0],r=e[1],a=e[2],o=e[3],l=e[4],u=e[5];for(let e=0;e<n;e++)s=Math.min(s,t[i+3*e]),r=Math.min(r,t[i+3*e+1]),a=Math.min(a,t[i+3*e+2]),o=Math.max(o,t[i+3*e]),l=Math.max(l,t[i+3*e+1]),u=Math.max(u,t[i+3*e+2]);e[0]=s,e[1]=r,e[2]=a,e[3]=o,e[4]=l,e[5]=u}(n,e,t,i),n}(e,0,e.length/3,t)}function l(e,t=(0,s.jh)(24)){const[i,n,r,a,o,l]=e;return t[0]=i,t[1]=n,t[2]=r,t[3]=i,t[4]=n,t[5]=l,t[6]=i,t[7]=o,t[8]=r,t[9]=i,t[10]=o,t[11]=l,t[12]=a,t[13]=n,t[14]=r,t[15]=a,t[16]=n,t[17]=l,t[18]=a,t[19]=o,t[20]=r,t[21]=a,t[22]=o,t[23]=l,t}function u(e,t){const i=isFinite(e[2])||isFinite(e[5]);return new n.A(i?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function c(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 d(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[3]=Math.max(e[3],t[2]),e[4]=Math.max(e[4],t[3])}function p(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 f(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 h(e,t,i=e){return i[0]=t[0],i[1]=t[1],i[2]=t[2],i!==e&&(i[3]=e[3],i[4]=e[4],i[5]=e[5]),i}function m(e,t,i=e){return i[3]=t[0],i[4]=t[1],i[5]=t[2],i!==e&&(i[0]=e[0],i[1]=e[1],i[2]=e[2]),e}function y(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 g(e){return e?y(e,w):r(w)}function x(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 F(e,t,i,n,s){return e[0]=t,e[1]=i,e[2]=Number.NEGATIVE_INFINITY,e[3]=n,e[4]=s,e[5]=Number.POSITIVE_INFINITY,e}function _(e){return 6===e.length}function v(e,t,i){if(null==e||null==t)return e===t;if(!_(e)||!_(t))return!1;if(i){for(let n=0;n<e.length;n++)if(!i(e[n],t[n]))return!1}else for(let i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0}const w=[1/0,1/0,1/0,-1/0,-1/0,-1/0],S=[0,0,0,0,0,0];r()},80754:(e,t,i)=>{i.d(t,{j7:()=>a,kS:()=>l,kd:()=>o,r8:()=>u});var n=i(82799),s=i(16930),r=i(65864);const a={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new n.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:s.A.WebMercator}),minus180Line:new n.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:s.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new n.A({paths:[[[180,-180],[180,180]]],spatialReference:s.A.WGS84}),minus180Line:new n.A({paths:[[[-180,-180],[-180,180]]],spatialReference:s.A.WGS84})}};function o(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const i=u(e);for(const e of i)for(const i of e)i[0]+=t;return e}function u(e){return(0,r.Bi)(e)?e.rings:e.paths}},86420:(e,t,i)=>{i.d(t,{I:()=>r,W:()=>s});var n=i(21818);async function s(e,t){if(!e)return null;const i=t.featureAdapter,{startTimeField:s,endTimeField:r}=e;let a=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;if(s&&r)await t.forEach(e=>{const t=i.getAttribute((0,n.zI)(e),s),l=i.getAttribute((0,n.zI)(e),r);null==t||isNaN(t)||(a=Math.min(a,t)),null==l||isNaN(l)||(o=Math.max(o,l))});else{const e=s||r;await t.forEach(t=>{const s=i.getAttribute((0,n.zI)(t),e);null==s||isNaN(s)||(a=Math.min(a,s),o=Math.max(o,s))})}return{start:a,end:o}}function r(e,t,i){if(!t||!e)return null;const{startTimeField:n,endTimeField:s}=e;if(!n&&!s)return null;const{start:r,end:a}=t;if(null===r&&null===a)return null;if(void 0===r&&void 0===a)return()=>!1;const o=i.getAttributeAsTimestamp?.bind(i)??i.getAttribute.bind(i);return n&&s?function(e,t,i,n,s){return null!=n&&null!=s?r=>{const a=e(r,t),o=e(r,i);return(null==a||a<=s)&&(null==o||o>=n)}:null!=n?t=>{const s=e(t,i);return null==s||s>=n}:null!=s?i=>{const n=e(i,t);return null==n||n<=s}:void 0}(o,n,s,r,a):function(e,t,i,n){return null!=i&&null!=n&&i===n?n=>e(n,t)===i:null!=i&&null!=n?s=>{const r=e(s,t);return null!=r&&r>=i&&r<=n}:null!=i?n=>{const s=e(n,t);return null!=s&&s>=i}:null!=n?i=>{const s=e(i,t);return null!=s&&s<=n}:void 0}(o,n||s,r,a)}},91218:(e,t,i)=>{i.r(t),i.d(t,{canProjectWithoutEngine:()=>k,initializeProjection:()=>$,isEqualBaseGCS:()=>L,isLoaded:()=>z,isLoadedOrLoad:()=>C,isLoadedOrLoadFor:()=>B,load:()=>O,project:()=>q,projectExtent:()=>ie,projectMany:()=>G,projectMultipoint:()=>W,projectOrLoad:()=>P,projectOrLoadMany:()=>E,projectPoint:()=>H,projectPolygon:()=>ee,projectPolyline:()=>Y,projectWithZConversion:()=>Q,projectWithoutEngine:()=>U,requiresLoad:()=>N,test:()=>V,tryProjectWithZConversion:()=>Z,unload:()=>D});var n=i(49186),s=i(74887),r=i(62788),a=i(95488),o=i(51850),l=i(21276),u=i(73941),c=i(5443),d=i(91075),p=i(48526),f=i(86738),h=i(39829),m=i(82799),y=i(16930),g=i(159),x=i(9762),F=i(37539);function _(e,t,i,n,s,r){return v[0]=e,v[1]=t,v[2]=i,(0,x.projectBuffer)(v,n,0,s,r,0)}const v=(0,o.vt)();var w=i(21325),S=i(62815);let I=null,R=null,T=null,M=null,b={};const A=new a.I;function z(){return!!(R?.isLoaded()&&T?.isLoaded()&&M?.isLoaded())}function C(){return!!z()||((0,r.gc)(A),O(),!1)}function B(e,t){return!e||!t||k(e,t)||C()}function N(e,t){return!k(e,t)&&!z()}async function O(e){null==I&&(I=Promise.all([i.e(3276).then(i.bind(i,83276)).then(e=>(R=e,R.load())),i.e(8377).then(i.bind(i,8377)).then(e=>(T=e,T.load())),i.e(2158).then(i.bind(i,12158)).then(e=>(M=e,M.load()))])),await I,(0,s.Te)(e),A.notify()}function q(e,t,i){return Array.isArray(e)?0===e.length?[]:((0,l.H)(e),G(e,e[0].spatialReference,t,i)):((0,l.f)(e),G([e],e.spatialReference,t,i)[0])}function G(e,t,i,n){if(null==t||null==i)return e;if(k(t,i,n))return e.map(e=>U(e,t,i));if(null==n?.geographicTransformation&&(0,u.jA)(t))return e.map(e=>U(e,t,y.A.WGS84)).map(e=>Z(e,i));if(null==n?.geographicTransformation&&(0,u.jA)(i))return e.map(e=>Z(e,y.A.WGS84)).map(e=>U(e,y.A.WGS84,i));if(!z())throw new j;if(!n?.geographicTransformation)if(n?.extendedParams)n={...n,geographicTransformation:M.getTransformation(t,i,n.areaOfInterestExtent)||new g.A};else if(!n?.areaOfInterestExtent){const e=function(e,t){return[e.wkid?.toString()??"-1",e.wkt?.toString()??"",e.wkt2?.toString()??"",t.wkid?.toString()??"-1",t.wkt?.toString()??"",t.wkt2?.toString()??""].join()}(t,i);let s=b[e];s||(s=M.getTransformation(t,i)||new g.A,b[e]=s),n={geographicTransformation:s}}return e[0].spatialReference||(e[0].spatialReference=t),e[0]instanceof d.A?R.executeMany(e,i,n):T.executeMany(e,i,n)}function P(e,t){const i=E([e],t);return null!=i.pending?{pending:i.pending,geometry:null}:null!=i.geometries?{pending:null,geometry:i.geometries[0]}:{pending:null,geometry:null}}function E(e,t){if(!z())for(const i of e)if(null!=i&&!(0,w.aI)(i.spatialReference,t)&&(0,w.fn)(i.spatialReference)&&(0,w.fn)(t)&&!k(i.spatialReference,t))return(0,r.gc)(A),{pending:O(),geometries:null};return{pending:null,geometries:e.map(e=>null==e?null:(0,w.aI)(e.spatialReference,t)?e:(0,w.fn)(e.spatialReference)&&(0,w.fn)(t)?Z(e,t):null)}}class j extends n.A{constructor(){super("projection:not-loaded","projection engine not fully loaded yet, please call load()")}}function D(){I=null,R=null,T=null,M=null,b={}}const V={get loadPromise(){return I}};function Z(e,t){try{const i=q(e,t);if(null==i)return null;"xmin"in e&&"xmin"in i&&(i.zmin=e.zmin,i.zmax=e.zmax);const n=(0,S.N)(i.type,e.spatialReference,t);return null!=n&&n(i),i}catch(e){if(!(e instanceof j))throw e;return null}}async function Q(e,t,i){const n=e.spatialReference;return null!=n&&null!=t&&await $(n,t,null,i),Z(e,t)}function k(e,t,i){return!(i?.areaOfInterestExtent||i?.extendedParams||i?.geographicTransformation)&&(!!(0,w.aI)(e,t)||(0,w.fn)(e)&&(0,w.fn)(t)&&!!(0,F.jd)(e,t))}function L(e,t){if((0,w.aI)(e,t))return!0;if(!(0,w.fn)(e)||!(0,w.fn)(t))return!1;const i=(0,w.oT)(e)||(0,w.K8)(e)||(0,w.x1)(e),n=(0,w.oT)(t)||(0,w.K8)(t)||(0,w.x1)(t);return i&&n}async function $(e,t,i,n){if(z())return(0,s.NO)(n);if(Array.isArray(e)){for(const{source:t,dest:i,options:s}of e)if(t&&i&&!k(t,i,s))return O(n)}else if(e&&t&&!k(e,t,i))return O(n);return(0,s.NO)(n)}function U(e,t,i){return e?"x"in e?J(e,t,new f.A,i,0):"xmin"in e?ne(e,t,new c.A,i,0):"rings"in e?te(e,t,new h.A,i,0):"paths"in e?X(e,t,new m.A,i,0):"points"in e?K(e,t,new p.A,i,0):null:null}function H(e,t,i=t.spatialReference,n=0){return null!=i&&null!=e.spatialReference&&null!=J(e,e.spatialReference,t,i,n)}function J(e,t,i,n,s){re[0]=e.x,re[1]=e.y;const r=e.z;return re[2]=void 0!==r?r:s,(0,x.projectBuffer)(re,t,0,re,n,0)?(i.x=re[0],i.y=re[1],i.spatialReference=n,void 0!==r||(0,u.xP)(n)?(i.z=re[2],i.hasZ=!0):(i.z=void 0,i.hasZ=!1),void 0===e.m?(i.m=void 0,i.hasM=!1):(i.m=e.m,i.hasM=!0),i):null}function W(e,t,i=t.spatialReference,n=0){return null!=e.spatialReference&&null!=i&&null!=K(e,e.spatialReference,t,i,n)}function K(e,t,i,n,s){const{points:r,hasZ:a,hasM:o}=e,l=[],c=r.length,d=[];for(const e of r)d.push(e[0],e[1],a?e[2]:s);if(!(0,x.projectBuffer)(d,t,0,d,n,0,c))return null;const p=a||(0,u.xP)(n);for(let e=0;e<c;++e){const t=3*e,i=d[t],n=d[t+1];p&&o?l.push([i,n,d[t+2],r[e][3]]):p?l.push([i,n,d[t+2]]):o?l.push([i,n,r[e][2]]):l.push([i,n])}return i.points=l,i.spatialReference=n,i.hasZ=a,i.hasM=o,i}function Y(e,t,i=t.spatialReference,n=0){return null!=e.spatialReference&&null!=i&&null!=X(e,e.spatialReference,t,i,n)}function X(e,t,i,n,s){const{paths:r,hasZ:a,hasM:o}=e,l=[];if(!se(r,a??!1,o??!1,t,l,n,s))return null;const c=a||(0,u.xP)(n);return i.paths=l,i.spatialReference=n,i.hasZ=c,i.hasM=o,i}function ee(e,t,i=t.spatialReference,n=0){return null!=e.spatialReference&&null!=i&&null!=te(e,e.spatialReference,t,i,n)}function te(e,t,i,n,s){const{rings:r,hasZ:a,hasM:o}=e,l=[];if(!se(r,a??!1,o??!1,t,l,n,s))return null;const c=a||(0,u.xP)(n);return i.rings=l,i.spatialReference=n,i.hasZ=c,i.hasM=o,i}function ie(e,t,i=t.spatialReference,n=0){return null!=e.spatialReference&&null!=i&&null!=ne(e,e.spatialReference,t,i,n)}function ne(e,t,i,n,s){const{xmin:r,ymin:a,xmax:o,ymax:l,hasZ:c,hasM:d}=e;if(!_(r,a,c?e.zmin:s,t,re,n))return null;const p=c||(0,u.xP)(n);return i.xmin=re[0],i.ymin=re[1],p&&(i.zmin=re[2]),_(o,l,c?e.zmax:s,t,re,n)?(i.xmax=re[0],i.ymax=re[1],p&&(i.zmax=re[2]),d&&(i.mmin=e.mmin,i.mmax=e.mmax),i.spatialReference=n,i):null}function se(e,t,i,n,s,r,a=0){const o=new Array;for(const i of e)for(const e of i)o.push(e[0],e[1],t?e[2]:a);if(!(0,x.projectBuffer)(o,n,0,o,r,0))return!1;let l=0;s.length=0;const c=t||(0,u.xP)(r);for(const t of e){const e=new Array;for(const n of t)c&&i?e.push([o[l++],o[l++],o[l++],n[3]]):c?e.push([o[l++],o[l++],o[l++]]):i?(e.push([o[l++],o[l++],n[2]]),l++):(e.push([o[l++],o[l++]]),l++);s.push(e)}return!0}const re=(0,o.vt)()},92300:(e,t,i)=>{i.d(t,{V:()=>r,X:()=>s});var n=i(65864);function s(e){return{geometryType:(0,n.$B)(e[0]),geometries:e.map(e=>e.toJSON())}}function r(e,t,i){const s=(0,n.xD)(t);return e.map(e=>{const t=s.fromJSON(e);return t.spatialReference=i,t})}},95466:(e,t,i)=>{i.d(t,{A:()=>f});var n=i(49186),s=i(53966),r=i(91869),a=i(3330),o=i(12195),l=i(30524),u=i(98623),c=i(56400),d=i(28097);const p=new Map;class f{static fromJSON(e){return new f(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new f(e.fields??[],g(e))}static fromLayerJSON(e){return new f(e.fields??[],g(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const i=[];for(const e of this.fields){const t=e?.name,n=m(t);if(t&&n){const s=h(t);this._fieldsMap.set(t,e),this._fieldsMap.set(s,e),this._normalizedFieldsMap.set(n,e),i.push(`${s}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,l.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,l.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,l.te)(e)||(0,l.Xz)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}i.sort(),this.uid=i.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,l.te)(e)||(0,l.Xz)(e)||e.nullable||void 0!==(0,l.lD)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(h(e))??this._normalizedFieldsMap.get(m(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(s.A.getLogger("esri.layers.support.FieldsIndex").errorOnce(new n.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),u.n$):y.has(t.type)?u.L5:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===u.L5?a.GB.instance:t===u.n$?d.mQ.utcInstance:(0,r.tE)(p,t,()=>d.oh.create(t)):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,l.OH)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map(e=>(0,o.W)(e)?e.toJSON():e),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function h(e){return e.trim().toLowerCase()}function m(e){return(0,l.rS)(e)?.toLowerCase()??""}const y=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function g(e){const t=new Map;if(!e.fields)return t;const i=!0===e.datesInUnknownTimezone,{timeInfo:n,editFieldsInfo:s}=e,r=(n?"startField"in n?n.startField:n.startTimeField:"")??"",a=(n?"endField"in n?n.endField:n.endTimeField:"")??"",o=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,c.ZS)(e.dateFieldsTimeReference):null,l=s?function(e){return"timeZone"in e}(s)?s.timeZone??o:s.dateFieldsTimeReference?(0,c.ZS)(s.dateFieldsTimeReference):o??u.n$:null,d=n?function(e){return"timeZone"in e}(n)?n.timeZone??o:n.timeReference?(0,c.ZS)(n.timeReference):o:null,p=new Map([[h(s?.creationDateField??""),l],[h(s?.editDateField??""),l],[h(r),d],[h(a),d]]);for(const{name:n,type:s}of e.fields)if(y.has(s))t.set(n,u.L5);else if("date"!==s&&"esriFieldTypeDate"!==s)t.set(n,null);else if(i)t.set(n,u.L5);else{const e=p.get(h(n??""))??o;t.set(n,e)}return t}},99157:(e,t,i)=>{i.d(t,{A:()=>o});var n,s=i(31635),r=i(69622),a=i(91429);let o=n=class extends r.A{constructor(e){super(e),this.isInverse=!1,this.wkt=null,this.wkid=null}getInverse(){return new n({isInverse:!this.isInverse,wkid:this.wkid,wkt:this.wkt})}};(0,s.Cg)([(0,a.MZ)()],o.prototype,"isInverse",void 0),(0,s.Cg)([(0,a.MZ)()],o.prototype,"wkt",void 0),(0,s.Cg)([(0,a.MZ)()],o.prototype,"wkid",void 0),o=n=(0,s.Cg)([(0,a.$K)("esri.geometry.operators.support.GeographicTransformationStep")],o)},99352:(e,t,i)=>{i.d(t,{F:()=>n,P:()=>s});const n={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCentroidOnDegeneratedQuantizedGeometry:!0,supportsCacheHint:!0,supportsCurrentUser:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsPaginationOnAggregatedQueries:!1,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!0,supportsReturnMesh:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,maxUniqueIDCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0,supportsTrueCurve:!1},s={supportsDate:!0,supportsFixedInterval:!0,supportsAutoInterval:!0,supportsFixedBoundaries:!0,supportsStackBy:!0,supportsSplitBy:!0,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!0,supportedStatistics:{count:!0,sum:!0,avg:!0,var:!0,stddev:!0,min:!0,max:!0,percentileContinuous:!0,percentileDiscrete:!0,envelope:!0,centroid:!0,convexHull:!0},supportedNormalizationTypes:{field:!0,log:!0,naturalLog:!0,percentOfTotal:!0,squareRoot:!0}}}}]);
|