@arcgis/core 5.0.0-next.6 → 5.0.0-next.8
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/KnowledgeStudio/resourceSerializationUtils.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{8f56f298e7c1a283f407.js → 0030d68d9edf42b4af57.js} +1 -1
- package/assets/esri/core/workers/chunks/01d460398f3ba6767a37.js +1 -0
- package/assets/esri/core/workers/chunks/{17d5f8dba6ebb1184506.js → 042cd64e1f4eb326c30f.js} +1 -1
- package/assets/esri/core/workers/chunks/05429f9d292a7a714309.js +316 -0
- package/assets/esri/core/workers/chunks/{66db5f77e09d25e33951.js → 063905fbf9a0c6586949.js} +1 -1
- package/assets/esri/core/workers/chunks/{9486032af3e934d85582.js → 0a5d74414dd02a2fb8e1.js} +1 -1
- package/assets/esri/core/workers/chunks/{3815ffa13e7b439bca6e.js → 0d5212f59e9b62c16164.js} +1 -1
- package/assets/esri/core/workers/chunks/{73487b9d85e726e9c012.js → 1257c37bf04d39c27b62.js} +1 -1
- package/assets/esri/core/workers/chunks/{398f356b11fd33bd3831.js → 136a7d781dad05a7463b.js} +1 -1
- package/assets/esri/core/workers/chunks/{1e4e7aedf4b779241a02.js → 15c7c10ff9ac63f0e792.js} +1 -1
- package/assets/esri/core/workers/chunks/17784cf16fa91504b9ea.js +1 -0
- package/assets/esri/core/workers/chunks/{a395373e3173e6458a56.js → 1ab37e13947d0e2e4181.js} +1 -1
- package/assets/esri/core/workers/chunks/{f03635ddf56e2ef90e4c.js → 1d06fcae4c2f02fb1c95.js} +1 -1
- package/assets/esri/core/workers/chunks/{020c8913d8e35d63080b.js → 1d15d1b20dc10fde6def.js} +1 -1
- package/assets/esri/core/workers/chunks/1dfca37f95f2b968aa54.js +1 -0
- package/assets/esri/core/workers/chunks/20975513be0a3a1da286.js +1 -0
- package/assets/esri/core/workers/chunks/{285762ff92d5388b6024.js → 2166238a7ad63a2d43c7.js} +1 -1
- package/assets/esri/core/workers/chunks/{620a94b54be3ed78350d.js → 22ca80f491e070b2a5e7.js} +1 -1
- package/assets/esri/core/workers/chunks/{88074189fa10c335370b.js → 24cd7b84cd0f3de4bff2.js} +1 -1
- package/assets/esri/core/workers/chunks/{9fac5a12e878cd745354.js → 28020063048e644f17a5.js} +1 -1
- package/assets/esri/core/workers/chunks/{95c594a87b732f5c4979.js → 2a8dff8521e1e6a10cf6.js} +1 -1
- package/assets/esri/core/workers/chunks/{7e43c105f1cfc44b7bd0.js → 2fa01bd3f3608616fd7f.js} +1 -1
- package/assets/esri/core/workers/chunks/30e220f4f843681a4cdd.js +1 -0
- package/assets/esri/core/workers/chunks/{5d3661d1fe46dd29aae9.js → 311b564e44ae637c960d.js} +1 -1
- package/assets/esri/core/workers/chunks/31c7ce65e16f7858400f.js +1 -0
- package/assets/esri/core/workers/chunks/{8a314b3790313e6dc5db.js → 333b62dad3811cff0f14.js} +1 -1
- package/assets/esri/core/workers/chunks/36d067c8d03d7a894f5f.js +1 -0
- package/assets/esri/core/workers/chunks/{e31192ae920e3e19b6aa.js → 37c1f155da14de91565a.js} +1 -1
- package/assets/esri/core/workers/chunks/{aa54b6f2aba6952af149.js → 38cc18fd93c18815ded0.js} +1 -1
- package/assets/esri/core/workers/chunks/{c55c096669677321a227.js → 38cd3648932bf2534b0f.js} +1 -1
- package/assets/esri/core/workers/chunks/{ac26e3e77df4302f47a2.js → 3afb83f5de033dda89ec.js} +1 -1
- package/assets/esri/core/workers/chunks/{f5e47eea8720ba84665b.js → 3c07aa2015ab1dff5f7b.js} +1 -1
- package/assets/esri/core/workers/chunks/{e9311386f58f3cb95c22.js → 42a1e71d09e8583a7327.js} +1 -1
- package/assets/esri/core/workers/chunks/443dfe7029ec208f670c.js +1 -0
- package/assets/esri/core/workers/chunks/{b75930d60449eceb0f1c.js → 4baf6f6e7ddedb25f806.js} +1 -1
- package/assets/esri/core/workers/chunks/{bb5484b5eeacc9ad2ceb.js → 4d0cbf9584446f411a37.js} +1 -1
- package/assets/esri/core/workers/chunks/{17103e6542aae53c7301.js → 4e3e27673d0671fc2b58.js} +1 -1
- package/assets/esri/core/workers/chunks/{5fc7b61f467f1d60a284.js → 51ab2acac4ecc1ca9c34.js} +1 -1
- package/assets/esri/core/workers/chunks/{fc4417d1260b717a9385.js → 52282f767bd0e99ddca0.js} +1 -1
- package/assets/esri/core/workers/chunks/{fc06014fb484fc8c697e.js → 53654edd766d9b4ef750.js} +1 -1
- package/assets/esri/core/workers/chunks/{90f8b4bda28af43ea019.js → 538f509d7fc8337d37ac.js} +1 -1
- package/assets/esri/core/workers/chunks/{ed8a85efbd90241512bb.js → 588533c3abe876f20f62.js} +1 -1
- package/assets/esri/core/workers/chunks/{c8733cd621105afab2ac.js → 59d3cac32ad6dad941dc.js} +1 -1
- package/assets/esri/core/workers/chunks/{72846fb9c87c6642daf0.js → 5e2ce34def5e053913b2.js} +1 -1
- package/assets/esri/core/workers/chunks/{8c056eac35d05d9524b7.js → 5f29422a051311ef9b3c.js} +1 -1
- package/assets/esri/core/workers/chunks/5f402b3c00bc4afc77b2.js +1 -0
- package/assets/esri/core/workers/chunks/{ff35a077ac6776469805.js → 61d970ed75c2c358b1e9.js} +1 -1
- package/assets/esri/core/workers/chunks/{7a6a96edc892d7060b7d.js → 629127877042ad784ad2.js} +1 -1
- package/assets/esri/core/workers/chunks/{fd2efd1d1cf9d95a87e6.js → 63a6f3e70d2b6ea57e40.js} +1 -1
- package/assets/esri/core/workers/chunks/{90b2b43b8b54c9a1ec35.js → 664ae441617afe4b17ec.js} +1 -1
- package/assets/esri/core/workers/chunks/{c4e4da69969499a89a2c.js → 695cdef5057e5461078a.js} +1 -1
- package/assets/esri/core/workers/chunks/{4c5a7249a311070d8f43.js → 6af18d7a0d314d7c1756.js} +1 -1
- package/assets/esri/core/workers/chunks/{f35aaa04cca676c2d3f8.js → 6b59f94040c7d2f6728a.js} +1 -1
- package/assets/esri/core/workers/chunks/{811d4c46c75cf6a63e78.js → 6bb7dbc46787b8e34bd9.js} +1 -1
- package/assets/esri/core/workers/chunks/6d9f2b113d6bde936a04.js +1 -0
- package/assets/esri/core/workers/chunks/{5132ca68e8c7af111a47.js → 6e22b02a9715c10578d0.js} +1 -1
- package/assets/esri/core/workers/chunks/{cd1930f08e1fc8b30b14.js → 6ee2f0f708494102a493.js} +1 -1
- package/assets/esri/core/workers/chunks/{f0e0a63962784acb4ba1.js → 6f0aec7428021e440ac9.js} +1 -1
- package/assets/esri/core/workers/chunks/{deb2854bb7d082a26f52.js → 7005d956c990a04ee8b2.js} +1 -1
- package/assets/esri/core/workers/chunks/{a3991ae8caa713d4ddcd.js → 731f7b552dde0fb325cd.js} +1 -1
- package/assets/esri/core/workers/chunks/{464d42bebb365287808d.js → 773f2c6c9d38db76dfed.js} +1 -1
- package/assets/esri/core/workers/chunks/{3f3d492f1093b7832aab.js → 7803495f8862d9025bcd.js} +1 -1
- package/assets/esri/core/workers/chunks/78694ad8229347903f41.js +1 -0
- package/assets/esri/core/workers/chunks/7e4c14d4502e3f06d94b.js +1 -0
- package/assets/esri/core/workers/chunks/{7544316a75dbd981aea6.js → 86cb097deec50b0da3f3.js} +1 -1
- package/assets/esri/core/workers/chunks/8a40ed2ee4b032822c30.js +1 -0
- package/assets/esri/core/workers/chunks/{09de8be660174a229efb.js → 8cbb28476151a37ae958.js} +1 -1
- package/assets/esri/core/workers/chunks/{62a49cfd9a2508950e9f.js → 8fedfd33c37172dba6bf.js} +1 -1
- package/assets/esri/core/workers/chunks/90cbd627d4113db3b686.js +1 -0
- package/assets/esri/core/workers/chunks/91aa1157da32f650983b.js +1 -0
- package/assets/esri/core/workers/chunks/{e7638b9ab6674bc8a18f.js → 91dfd29e2dba200eab09.js} +1 -1
- package/assets/esri/core/workers/chunks/{794748fd1edc29a621cd.js → 9698f36c143953a975d4.js} +1 -1
- package/assets/esri/core/workers/chunks/98584902c9db6faa3e4d.js +1 -0
- package/assets/esri/core/workers/chunks/9e5e05d6430712b0b1bc.js +1 -0
- package/assets/esri/core/workers/chunks/{6f4bd0ee85e7e5a74340.js → a31635a6366347dcef0f.js} +1 -1
- package/assets/esri/core/workers/chunks/a6ee40dfc471d6612f3c.js +1 -0
- package/assets/esri/core/workers/chunks/{ccc0da0e01f023c8aa1f.js → a876d6159ca120c1567e.js} +1 -1
- package/assets/esri/core/workers/chunks/{a4db5c9a90107e097df8.js → af47272aaaef0ea57e71.js} +1 -1
- package/assets/esri/core/workers/chunks/{d1fe816b6990918c13c7.js → afc13d5b842275db7dbc.js} +1 -1
- package/assets/esri/core/workers/chunks/aff8e40a641c6822af1d.js +1 -0
- package/assets/esri/core/workers/chunks/{22d6b8102e75bdef204c.js → b0365cbc3d2a41969e3b.js} +1 -1
- package/assets/esri/core/workers/chunks/{79968c183135281d2a6f.js → b3613a38178cad2ebc82.js} +1 -1
- package/assets/esri/core/workers/chunks/b548910e820d731ffe8a.js +1 -0
- package/assets/esri/core/workers/chunks/{5bd36dbf46c25bd961c8.js → b708792c84620b73c847.js} +1 -1
- package/assets/esri/core/workers/chunks/c29486c4eeb3e72effff.js +1 -0
- package/assets/esri/core/workers/chunks/{2b94623cabc6ae0f86ce.js → c37f7756d48ff9af2656.js} +1 -1
- package/assets/esri/core/workers/chunks/{1c52999a6392370844a6.js → c4090a60d149a5962179.js} +1 -1
- package/assets/esri/core/workers/chunks/{73c1d43070b4fe1e5c1e.js → c8e686efe344a33a0258.js} +1 -1
- package/assets/esri/core/workers/chunks/{6bb5158de43c4b59107f.js → c9b16fd41cd59d452522.js} +1 -1
- package/assets/esri/core/workers/chunks/ce98416437cc1a89d8ea.js +1 -0
- package/assets/esri/core/workers/chunks/{279366e6b743f9680603.js → cfff044859e6e6dcc75d.js} +1 -1
- package/assets/esri/core/workers/chunks/d07f911d40bf05fc0306.js +1 -0
- package/assets/esri/core/workers/chunks/{8833c3d168951be4bf20.js → d0d79dd3e88eecf5c314.js} +1 -1
- package/assets/esri/core/workers/chunks/{76ae1702fecc7ad7017c.js → d1e97cce5047f1791e22.js} +1 -1
- package/assets/esri/core/workers/chunks/{17acde0245ecd956306c.js → d233cc33497a663450f9.js} +1 -1
- package/assets/esri/core/workers/chunks/{36fe6b8228e622407ec2.js → d8793eead02491136841.js} +1 -1
- package/assets/esri/core/workers/chunks/{dedc4583b5f32a278124.js → d88f2fe680b8d5603ef8.js} +1 -1
- package/assets/esri/core/workers/chunks/{4d599008e1ea42321b37.js → da24ad57747714ac5eda.js} +1 -1
- package/assets/esri/core/workers/chunks/{facb3886714222772ab2.js → ddfd01bb9ba8577c3ffc.js} +1 -1
- package/assets/esri/core/workers/chunks/{50d9f69d5255af4b29bb.js → df5afa06c6deb6b40109.js} +1 -1
- package/assets/esri/core/workers/chunks/e25c4b4a03270d48f408.js +1 -0
- package/assets/esri/core/workers/chunks/e3294318daf1192b8319.js +1 -0
- package/assets/esri/core/workers/chunks/{da573ecc68e6aa8f6da9.js → e767f83f9e2de6650f80.js} +1 -1
- package/assets/esri/core/workers/chunks/e9d4cae2144974489d6e.js +1 -0
- package/assets/esri/core/workers/chunks/{91df8638b8b904e6d8c5.js → ead8d0cbcebd12dbfad7.js} +1 -1
- package/assets/esri/core/workers/chunks/{f9324e88c359c03f35aa.js → eb9c166db0db6fa60e95.js} +1 -1
- package/assets/esri/core/workers/chunks/{8ffd4710d168c2fcfd96.js → ebf23b46db56aaa88841.js} +1 -1
- package/assets/esri/core/workers/chunks/{bc241c7735e4efba734a.js → f34e3fa0c5b28531e289.js} +1 -1
- package/assets/esri/core/workers/chunks/f64037a88ab03662dc2a.js +1 -0
- package/assets/esri/core/workers/chunks/{d97fadbc69e055d183a0.js → f77f4bd6a577b92cf66f.js} +1 -1
- package/assets/esri/core/workers/chunks/{16d66770ef841564ee3f.js → f89c90f98c85667b0ebc.js} +1 -1
- package/assets/esri/core/workers/chunks/{4c4227b0ea21a5e429ab.js → fb192de7e4fa152342bb.js} +1 -1
- package/assets/esri/core/workers/chunks/fbd8d2f61f8a15bcf3db.js +1 -0
- package/assets/esri/core/workers/chunks/{2f78861afe0e9037dd8d.js → fe49321dca22dc60d105.js} +1 -1
- package/assets/esri/core/workers/chunks/{fe77ae6cf232a7a3298e.js → fef45bc59c71f88c60b5.js} +1 -1
- package/assets/esri/libs/parquet/pkg/bundle_bg.wasm +0 -0
- 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/QueueProcessor.js +1 -1
- package/core/SetUtils.js +1 -1
- package/core/has.js +1 -1
- package/geometry/operators/gx/operatorOffset.js +1 -1
- package/geometry/support/meshUtils/loadGLTFMesh.js +1 -1
- package/identity/Credential.js +1 -1
- package/identity/IdentityManager.js +1 -1
- package/identity/IdentityManagerBase.js +1 -1
- package/interfaces.d.ts +67 -27
- package/kernel.js +1 -1
- package/layers/FeatureLayer.js +1 -1
- package/layers/SceneLayer.js +1 -1
- package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
- package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
- package/layers/graphics/sources/connections/GeoEventConnection.js +1 -1
- package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
- package/layers/orientedImagery/core/ExposurePoint.js +1 -1
- package/layers/support/fieldConfigUtils.js +1 -1
- package/layers/support/rasterDatasets/pixelReader.js +1 -1
- package/layers/support/source/DataLayerSource.js +1 -1
- package/package.json +3 -3
- package/popup/FieldInfo.js +1 -1
- package/processRequest.js +5 -0
- package/request.js +1 -1
- package/requestConfig.js +5 -0
- package/requestQueue.js +5 -0
- package/rest/query/executeForCount.js +1 -1
- package/rest/query/executeForExtent.js +1 -1
- package/rest/query/executeForIds.js +1 -1
- package/rest/query/executeQueryJSON.js +1 -1
- package/rest/query/executeQueryPBF.js +1 -1
- package/rest/query/operations/query.js +1 -1
- package/rest/support/BaseImageMeasureResultValue.js +5 -0
- package/rest/support/ImageAreaResult.js +1 -1
- package/rest/support/ImageDistanceResult.js +1 -1
- package/rest/support/ImageHeightResult.js +1 -1
- package/rest/support/ImageMeasureResultAngleValue.js +5 -0
- package/rest/support/ImageMeasureResultAreaValue.js +5 -0
- package/rest/support/ImageMeasureResultLengthValue.js +5 -0
- package/rest/support/ImageWithType.js +5 -0
- package/rest/support/imageMeasureUtils.js +1 -1
- package/support/revision.js +1 -1
- package/views/2d/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiles2D.js +1 -1
- package/views/2d/layers/FeatureLayerView2D.js +1 -1
- package/views/2d/layers/features/FeaturePipelineWorker.js +1 -1
- package/views/2d/layers/features/schema/SourceSchema.js +1 -1
- package/views/2d/layers/features/sources/FeatureSource.js +1 -1
- package/views/2d/layers/features/sources/strategies/AFeatureLoadStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/ALoadStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/ParquetSnapshotLoadStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/ParquetTileLoadStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/Overrides.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/SourceChunkStore.js +1 -1
- package/views/{3d/support/ImageWithType.js → 2d/layers/features/sources/strategies/constants.js} +1 -1
- package/views/2d/layers/features/sources/strategies/support/queryAdapters.js +1 -1
- package/views/3d/analysis/Dimension/LengthDimensionSubTool.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/volumeMeasurementErrors.js +1 -1
- package/views/3d/glTF/DefaultLoadingContext.js +1 -1
- package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DTool.js +1 -1
- package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DTool.js +1 -1
- package/views/3d/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiles3D.js +1 -1
- package/views/3d/layers/ElevationLayerView3D.js +1 -1
- package/views/3d/layers/FeatureLayerViewBase3D.js +1 -1
- package/views/3d/layers/PointCloudLayerView3D.js +1 -1
- package/views/3d/layers/graphics/FeatureGraphics3DGraphicsPipeline.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DSymbolCreationContext.js +1 -1
- package/views/3d/layers/graphics/ObjectResourceCache.js +1 -1
- package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
- package/views/3d/layers/graphics/pipeline/Feature3DPipeline.js +1 -1
- package/views/3d/layers/graphics/pipeline/fetching/Tile3DFetcher.js +1 -1
- package/views/3d/layers/graphics/wosrLoader.js +1 -1
- package/views/3d/layers/i3s/I3SDataRequester.js +5 -0
- package/views/3d/layers/i3s/I3SIndex.js +1 -1
- package/views/3d/layers/i3s/I3SNodeLoader.js +1 -1
- package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
- package/views/3d/layers/support/FeatureTile.js +1 -1
- package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
- package/views/3d/layers/support/MediaLayerInteractionOptions.js +1 -1
- package/views/3d/layers/support/MediaLayerInteractionReshapeOptions.js +5 -0
- package/views/3d/layers/support/SampledGeometryMaxDistanceRatio.js +5 -0
- package/views/3d/layers/support/featureTileQuery3D.js +1 -1
- package/views/3d/layers/support/fetchTile.js +1 -1
- package/views/3d/support/ResourceController.js +1 -1
- package/views/3d/support/SharedSymbolResources.js +1 -1
- package/views/3d/support/StreamTextureCollection.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
- package/views/3d/webgl-engine/lighting/SceneLighting.js +1 -1
- package/views/3d/webgl-engine/shaders/AnimatedLine.glsl.js +6 -0
- package/views/SceneView.js +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileTool.js +1 -1
- package/views/analysis/ElevationProfile/elevationProfileGeometryUtils.js +1 -1
- package/views/draw/MultipointDrawAction.js +1 -1
- package/views/draw/PointDrawAction.js +1 -1
- package/views/draw/PolygonDrawAction.js +1 -1
- package/views/draw/PolylineDrawAction.js +1 -1
- package/views/draw/SegmentDrawAction.js +1 -1
- package/views/draw/input/CursorUpdateEvents.js +5 -0
- package/views/draw/input/DrawCompleteEvent.js +5 -0
- package/views/draw/input/VertexAddEvent.js +5 -0
- package/views/draw/input/VertexRemoveEvent.js +5 -0
- package/views/draw/input/VertexUpdateEvent.js +5 -0
- package/views/interactive/editGeometry/CheckpointingEditGeometryOperations.js +5 -0
- package/views/interactive/editGeometry/EditGeometry.js +1 -1
- package/views/interactive/editGeometry/operations/ReplayableAppendVertex.js +5 -0
- package/views/interactive/snapping/featureSources/FeatureServiceSnappingSource.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorkerHandle.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTileStore.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiledFetcher.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTilesSimple.js +1 -1
- package/webscene/spec-certification/api.js +1 -1
- package/widgets/CoordinateConversion/CoordinateConversionViewModel.js +1 -1
- package/widgets/CoordinateConversion.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/sketch/TriangulatedMeasurementAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/galleryUtils.js +1 -1
- package/widgets/PanoramicViewer/PanoramicViewerViewModel.js +1 -1
- package/widgets/PanoramicViewer/PanoramicZoomManager.js +1 -1
- package/widgets/PanoramicViewer/support/PanoramicMeshManager.js +1 -1
- package/widgets/PanoramicViewer/support/PanoramicTileNode.js +1 -1
- package/widgets/PanoramicViewer/support/PanoramicTilePyramid.js +1 -1
- package/widgets/PanoramicViewer/support/getVisibleTiles.js +5 -0
- package/widgets/Sketch/CreateToolVisibilityMap.js +5 -0
- package/widgets/Sketch/SelectionToolVisibilityMap.js +5 -0
- package/widgets/Sketch/VisibleElements.js +1 -1
- package/widgets/Sketch.js +1 -1
- package/assets/esri/core/workers/chunks/02e69f0c63d97661da60.js +0 -1
- package/assets/esri/core/workers/chunks/05eee334d58a0b9f6316.js +0 -1
- package/assets/esri/core/workers/chunks/087973e7c4fea5fcfa5e.js +0 -1
- package/assets/esri/core/workers/chunks/326a76a4e80269d4029d.js +0 -1
- package/assets/esri/core/workers/chunks/377a66034e7c1bad5599.js +0 -1
- package/assets/esri/core/workers/chunks/4442817beb7a76c95770.js +0 -1
- package/assets/esri/core/workers/chunks/459a67928bde4a62b6a4.js +0 -1
- package/assets/esri/core/workers/chunks/53bd8996e8812f1ad7b2.js +0 -1
- package/assets/esri/core/workers/chunks/557960763695abee4a83.js +0 -1
- package/assets/esri/core/workers/chunks/6201356f7f91e5c06425.js +0 -1
- package/assets/esri/core/workers/chunks/6c3b99209d542efa64d4.js +0 -1
- package/assets/esri/core/workers/chunks/7413e582bc2b16af6a0f.js +0 -1
- package/assets/esri/core/workers/chunks/7461124454bfb4fb6474.js +0 -1
- package/assets/esri/core/workers/chunks/75bf27271a31e26e1b21.js +0 -1
- package/assets/esri/core/workers/chunks/7aaaebbabee27690283c.js +0 -1
- package/assets/esri/core/workers/chunks/7c4a63aeead2505d6f02.js +0 -1
- package/assets/esri/core/workers/chunks/90250e9239c173aace88.js +0 -1
- package/assets/esri/core/workers/chunks/9786f91455350eaae493.js +0 -1
- package/assets/esri/core/workers/chunks/99859dce1925b406ccd0.js +0 -1
- package/assets/esri/core/workers/chunks/9c5cbf8810f37b1a4718.js +0 -1
- package/assets/esri/core/workers/chunks/9e8dceef4c961f56940d.js +0 -1
- package/assets/esri/core/workers/chunks/a06bac9b8f9e18874de8.js +0 -316
- package/assets/esri/core/workers/chunks/a712cdff78fc826acd8c.js +0 -1
- package/assets/esri/core/workers/chunks/d305a21666b1ed5bf33d.js +0 -1
- package/assets/esri/core/workers/chunks/d40f57f9fc47f9a9f97c.js +0 -1
- package/assets/esri/core/workers/chunks/e82f5437bd66779c6740.js +0 -1
- package/assets/esri/core/workers/chunks/f4d0ae6be1b3984228d0.js +0 -1
- package/assets/esri/core/workers/chunks/f6c8beb60f6d29945a2e.js +0 -1
- package/assets/esri/core/workers/chunks/f746e3f7ebff2bbdf333.js +0 -1
- package/views/3d/layers/i3s/I3SStreamDataController.js +0 -5
- package/views/3d/support/StreamDataLoader.js +0 -5
- package/views/3d/support/StreamDataRequester.js +0 -5
- package/views/3d/support/downloadSlots.js +0 -5
- package/views/draw/input/DrawEvents.js +0 -5
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7136,8535],{17136:(e,t,r)=>{r.d(t,{Y_:()=>S,O7:()=>R,el:()=>A});var n=r(92602),o=r(69052),s=r(49186),i=r(53966),a=r(39829),u=r(82799),l=r(16930),c=r(80754),f=r(21325),d=r(28735),m=r(43773),p=r(65864),h=r(2272),g=r(84952),y=r(92300);const x=()=>i.A.getLogger("esri.geometry.support.normalizeUtils");function w(e){return"polygon"===e[0].type}function b(e){return"polyline"===e[0].type}function v(e,t,r){if(t){const t=function(e,t){if(!(e instanceof u.A||e instanceof a.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw x().error(e),new s.A("internal:geometry",e)}const r=(0,c.r8)(e),n=[];for(const e of r){const r=[];n.push(r),r.push([e[0][0],e[0][1]]);for(let n=0;n<e.length-1;n++){const o=e[n][0],s=e[n][1],i=e[n+1][0],a=e[n+1][1],u=Math.sqrt((i-o)*(i-o)+(a-s)*(a-s)),l=(a-s)/u,c=(i-o)/u,f=u/t;if(f>1){for(let e=1;e<=f-1;e++){const n=e*t,i=c*n+o,a=l*n+s;r.push([i,a])}const e=(u+Math.floor(f-1)*t)/2,n=c*e+o,i=l*e+s;r.push([n,i])}r.push([i,a])}}return function(e){return"polygon"===e.type}(e)?new a.A({rings:n,spatialReference:e.spatialReference}):new u.A({paths:n,spatialReference:e.spatialReference})}(e,1e6);e=(0,d.ci)(t,!0)}return r&&(e=(0,c.kS)(e,r)),e}function T(e,t,r){if(Array.isArray(e)){const n=e[0];if(n>t){const r=(0,c.kd)(n,t);e[0]=n+r*(-2*t)}else if(n<r){const t=(0,c.kd)(n,r);e[0]=n+t*(-2*r)}}else{const n=e.x;if(n>t){const r=(0,c.kd)(n,t);e=e.clone().offset(r*(-2*t),0)}else if(n<r){const t=(0,c.kd)(n,r);e=e.clone().offset(t*(-2*r),0)}}return e}function M(e,t){let r=-1;for(let n=0;n<t.cutIndexes.length;n++){const o=t.cutIndexes[n],s=t.geometries[n],i=(0,c.r8)(s);for(let e=0;e<i.length;e++){const t=i[e];t.some(r=>{if(r[0]<180)return!0;{let r=0;for(let e=0;e<t.length;e++){const n=t[e][0];r=n>r?n:r}r=Number(r.toFixed(9));const n=-360*(0,c.kd)(r,180);for(let r=0;r<t.length;r++){const t=s.getPoint(e,r);s.setPoint(e,r,t.clone().offset(n,0))}return!0}})}if(o===r){if(w(e))for(const t of(0,c.r8)(s))e[o]=e[o].addRing(t);else if(b(e))for(const t of(0,c.r8)(s))e[o]=e[o].addPath(t)}else r=o,e[o]=s}return e}async function A(e,t,r){if(!Array.isArray(e))return A([e],t);t&&"string"!=typeof t&&x().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const o="string"==typeof t?t:t?.url??n.A.geometryServiceUrl;let s,i,l,w,b,R,B,S,I=0;const _=[],E=[];for(const t of e)if(null!=t)if(s||(s=t.spatialReference,i=(0,f.Vp)(s),l=s.isWebMercator,R=l?102100:4326,w=c.j7[R].maxX,b=c.j7[R].minX,B=c.j7[R].plus180Line,S=c.j7[R].minus180Line),i)if("mesh"===t.type)E.push(t);else if("point"===t.type)E.push(T(t.clone(),w,b));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map(e=>T(e,w,b)),E.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,i);E.push(e.rings?new a.A(e):e)}else if(t.extent){const e=t.extent,r=(0,c.kd)(e.xmin,b)*(2*w);let n=0===r?t.clone():(0,c.kS)(t.clone(),r);e.offset(r,0);let{xmin:o,xmax:s}=e;o=Number(o.toFixed(9)),s=Number(s.toFixed(9)),e.intersects(B)&&s!==w?(I=s>I?s:I,n=v(n,l),_.push(n),E.push("cut")):e.intersects(S)&&o!==b?(I=s*(2*w)>I?s*(2*w):I,n=v(n,l,360),_.push(n),E.push("cut")):E.push(n)}else E.push(t.clone());else E.push(t);else E.push(t);let P=(0,c.kd)(I,w),O=-90;const U=P,L=new u.A;for(;P>0;){const e=360*P-180;L.addPath([[e,O],[e,-1*O]]),O*=-1,P--}if(_.length>0&&U>0){const t=M(_,await async function(e,t,r,n){const o=(0,h.Dl)(e),s=t[0].spatialReference,i={...n,responseType:"json",query:{...o.query,f:"json",sr:(0,f.YX)(s),target:JSON.stringify({geometryType:(0,p.$B)(t[0]),geometries:t}),cutter:JSON.stringify(r)}},a=await(0,m.A)(o.path+"/cut",i),{cutIndexes:u,geometries:l=[]}=a.data;return{cutIndexes:u,geometries:l.map(e=>{const t=(0,p.rS)(e);return t.spatialReference=s,t})}}(o,_,L,r)),n=[],s=[];for(let r=0;r<E.length;r++){const o=E[r];if("cut"!==o)s.push(o);else{const o=t.shift(),i=e[r];null!=i&&"polygon"===i.type&&i.rings&&i.rings.length>1&&o.rings.length>=i.rings.length?(n.push(o),s.push("simplify")):s.push(l?(0,d.Gh)(o):o)}}if(!n.length)return s;const i=await async function(e,t,r){const n="string"==typeof e?(0,g.An)(e):e,o=t[0].spatialReference,s=(0,p.$B)(t[0]),i={...r,query:{...n.query,f:"json",sr:(0,f.YX)(o),geometries:JSON.stringify((0,y.X)(t))}},{data:a}=await(0,m.A)(n.path+"/simplify",i);return(0,y.V)(a.geometries,s,o)}(o,n,r),a=[];for(let e=0;e<s.length;e++){const t=s[e];"simplify"!==t?a.push(t):a.push(l?(0,d.Gh)(i.shift()):i.shift())}return a}const k=[];for(let e=0;e<E.length;e++){const t=E[e];if("cut"!==t)k.push(t);else{const e=_.shift();k.push(!0===l?(0,d.Gh)(e):e)}}return k}function R(e,t,r){const n=(0,f.Vp)(r);if(null==n)return e;const[o,s]=n.valid,i=2*s;let a=0,u=0;t>s?a=Math.ceil(Math.abs(t-s)/i):t<o&&(a=-Math.ceil(Math.abs(t-o)/i)),e>s?u=Math.ceil(Math.abs(e-s)/i):e<o&&(u=-Math.ceil(Math.abs(e-o)/i));let l=e+(a-u)*i;const c=l-t;return c>s?l-=i:c<o&&(l+=i),l}function B(e){const t=(0,f.Vp)(e);if(null==t)return null;const[r,n]=t.valid;return new o.hr(r,n)}const S=B(l.A.WGS84);B(l.A.WebMercator)},21015:(e,t,r)=>{r.d(t,{R:()=>u});var n=r(43773),o=r(60999),s=r(49186),i=r(74887),a=r(84952);class u{constructor(e=e=>e){this._resolveURI=e}async loadJSON(e,t){return this._load("json",e,t)}async loadBinary(e,t){return(0,a.DB)(e)?((0,i.Te)(t),(0,a.lJ)(e)):this._load("array-buffer",e,t)}async loadImage(e,t){return this._load("image",e,t)}async _load(e,t,r){t=this._resolveURI(t);const a=await(0,o.Ke)((0,n.A)(t,{responseType:e,...r}));if(a.ok)return a.value.data;throw(0,i.QP)(a.error),new s.A("gltf-loader-request-error",`Request for resource failed: ${a.error}`)}}},43609:(e,t,r)=>{r.d(t,{a:()=>s,f:()=>i,n:()=>o});var n=r(34275);function o(e,t){s(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function s(e,t,r=2,o=r){const s=t.length/2;let i=0,a=0;if(!(0,n.iu)(t)||(0,n.dk)(t)){for(let n=0;n<s;++n)e[i]=t[a],e[i+1]=t[a+1],i+=r,a+=o;return}const u=(0,n.a3)(t);if((0,n.JI)(t))for(let n=0;n<s;++n)e[i]=Math.max(t[a]/u,-1),e[i+1]=Math.max(t[a+1]/u,-1),i+=r,a+=o;else for(let n=0;n<s;++n)e[i]=t[a]/u,e[i+1]=t[a+1]/u,i+=r,a+=o}function i(e,t,r,n){const o=e.typedBuffer,s=e.typedBufferStride,i=n?.count??e.count;let a=(n?.dstIndex??0)*s;for(let e=0;e<i;++e)o[a]=t,o[a+1]=r,a+=s}Object.freeze(Object.defineProperty({__proto__:null,fill:i,normalizeIntegerBuffer:s,normalizeIntegerBufferView:o},Symbol.toStringTag,{value:"Module"}))},51530:(e,t,r)=>{r.d(t,{KB:()=>i,Xi:()=>o,pn:()=>a,x3:()=>s});var n=r(44208);class o{constructor(e){this.data=e,this.type="encoded-mesh-texture",this.encoding="image/ktx2"}}function s(e){return"encoded-mesh-texture"===e?.type}async function i(e){const t=new Blob([e]),r=await t.text();return JSON.parse(r)}async function a(e,t){if("image/ktx2"===t)return new o(e);const r=new Blob([e],{type:t});let s=URL.createObjectURL(r);switch(t){case"image/jpeg":s+="#.jpg";break;case"image/png":s+="#.png"}const i=new Image;if((0,n.A)("esri-iPhone"))return new Promise((e,t)=>{const r=()=>{o(),e(i)},n=e=>{o(),t(e)},o=()=>{URL.revokeObjectURL(s),i.removeEventListener("load",r),i.removeEventListener("error",n)};i.addEventListener("load",r),i.addEventListener("error",n),i.src=s});try{i.src=s,await i.decode()}catch(e){console.warn("Failed decoding HTMLImageElement")}return URL.revokeObjectURL(s),i}},61473:(e,t,r)=>{function n(e){return e=e||globalThis.location.hostname,l.some(t=>null!=e?.match(t))}function o(e,t){return e?(t=t||globalThis.location.hostname)?null!=t.match(s)||null!=t.match(a)?e.replace("static.arcgis.com","staticdev.arcgis.com"):null!=t.match(i)||null!=t.match(u)?e.replace("static.arcgis.com","staticqa.arcgis.com"):e:e:null}r.d(t,{EM:()=>o,b5:()=>n});const s=/^devext\.arcgis\.com$/,i=/^qaext\.arcgis\.com$/,a=/^[\w-]*\.mapsdevext\.arcgis\.com$/,u=/^[\w-]*\.mapsqa\.arcgis\.com$/,l=[/^([\w-]*\.)?[\w-]*\.zrh-dev-local\.esri\.com$/,s,i,/^jsapps\.esri\.com$/,a,u]},64304:(e,t,r)=>{r.d(t,{fetch:()=>J});var n=r(40876),o=r(61473),s=r(34727),i=r(77690),a=r(29242),u=r(58083),l=r(9093),c=r(48163),f=r(38954),d=r(51850),m=r(70328),p=r(11868),h=r(13030),g=r(73354),y=r(65686),x=r(43609),w=r(21015),b=r(84498),v=r(51530),T=r(88340);function M(e){if(null==e)return null;const t=null!=e.offset?e.offset:T.uY,r=null!=e.rotation?e.rotation:0,n=null!=e.scale?e.scale:T.Un,o=(0,a.fA)(1,0,0,0,1,0,t[0],t[1],1),s=(0,a.fA)(Math.cos(r),-Math.sin(r),0,Math.sin(r),Math.cos(r),0,0,0,1),u=(0,a.fA)(n[0],0,0,0,n[1],0,0,0,1),l=(0,a.vt)();return(0,i.lw)(l,s,u),(0,i.lw)(l,o,l),l}class A{constructor(){this.geometries=new Array,this.materials=new Array,this.textures=new Array}}class R{constructor(e,t,r){this.name=e,this.lodThreshold=t,this.pivotOffset=r,this.stageResources=new A,this.numberOfVertices=0}}var B=r(43773),S=r(60999),I=r(49186),_=r(53966),E=r(69397);class P{constructor(){this._outer=new Map}clear(){this._outer.clear()}get empty(){return 0===this._outer.size}get outerSize(){return this._outer.size}get size(){let e=0;for(const t of this._outer.values())e+=t.size;return e}get(e,t){return this._outer.get(e)?.get(t)}getInner(e){return this._outer.get(e)}set(e,t,r){const n=this._outer.get(e);n?n.set(t,r):this._outer.set(e,new Map([[t,r]]))}delete(e,t){const r=this._outer.get(e);r&&(r.delete(t),0===r.size&&this._outer.delete(e))}pop(e,t){const r=this.get(e,t);return this.delete(e,t),r}*outerMap(){for(const e of this._outer)yield e}*values(){for(const e of this._outer.values())yield*e.values()}*[Symbol.iterator](){for(const[e,t]of this._outer)for(const[r,n]of t)yield[e,r,n]}forEach(e){this._outer.forEach((t,r)=>e(t,r))}forAll(e){this._outer.forEach((t,r)=>t.forEach((t,n)=>e(t,r,n)))}copy(){const e=new P;return this.forAll((t,r,n)=>e.set(r,n,t)),e}}var O=r(74887),U=r(46140),L=r(97146),k=r(99677),j=r(46610),z=r(87170),F=r(48833),V=r(2495);const C=()=>_.A.getLogger("esri.views.3d.layers.graphics.objectResourceUtils");class ${constructor(e,t,r){this.resource=e,this.textures=t,this.usedMemory=r}}function N(e){const t=e.params,r=t.topology;let n=!0;switch(t.vertexAttributes||(C().warn("Geometry must specify vertex attributes"),n=!1),t.topology){case"PerAttributeArray":break;case"Indexed":case null:case void 0:{const e=t.faces;if(e){if(t.vertexAttributes)for(const r in t.vertexAttributes){const t=e[r];t?.values?(null!=t.valueType&&"UInt32"!==t.valueType&&(C().warn(`Unsupported indexed geometry indices type '${t.valueType}', only UInt32 is currently supported`),n=!1),null!=t.valuesPerElement&&1!==t.valuesPerElement&&(C().warn(`Unsupported indexed geometry values per element '${t.valuesPerElement}', only 1 is currently supported`),n=!1)):(C().warn(`Indexed geometry does not specify face indices for '${r}' attribute`),n=!1)}}else C().warn("Indexed geometries must specify faces"),n=!1;break}default:C().warn(`Unsupported topology '${r}'`),n=!1}e.params.material||(C().warn("Geometry requires material"),n=!1);const o=e.params.vertexAttributes;for(const e in o)o[e].values||(C().warn("Geometries with externally defined attributes are not yet supported"),n=!1);return n}function q(e){const t=(0,m.Ie)();return e.forEach(e=>{const r=e.boundingInfo;null!=r&&((0,m.iT)(t,r.bbMin),(0,m.iT)(t,r.bbMax))}),t}function G(e){switch(e){case"mask":return 2;case"maskAndTransparency":return 3;case"none":return 1;default:return 0}}function X(e){const t=e.params;return{id:1,material:t.material,texture:t.texture,region:t.texture}}const D=new U.R(1,2,"wosr");var W=r(74810);async function J(e,t){const a=function(e){const t=e.match(/(.*\.(gltf|glb))(\?lod=([0-9]+))?$/);return t?{fileType:"gltf",url:t[1],specifiedLodIndex:null!=t[4]?Number(t[4]):null}:e.match(/(.*\.(json|json\.gz))$/)?{fileType:"wosr",url:e,specifiedLodIndex:null}:{fileType:"unknown",url:e,specifiedLodIndex:null}}((0,o.EM)(e));if("wosr"===a.fileType){const e=await(t.cache?t.cache.loadWOSR(a.url,t):async function(e,t){const r=await async function(e,t){const r=await(0,S.Ke)((0,B.A)(e,t));if(r.ok)return r.value.data;(0,O.QP)(r.error),function(e){throw new I.A("",`Request for object resource failed: ${e}`)}(r.error)}(e,t),n=await async function(e,t){const r=new Array;for(const n in e){const o=e[n],s=o.images[0].data;if(!s){C().warn("Externally referenced texture data is not yet supported");continue}const i=o.encoding+";base64,"+s,a="/textureDefinitions/"+n,u="rgba"===o.channels?o.alphaChannelUsage||"transparency":"none",l={noUnpackFlip:!0,wrap:{s:10497,t:10497},preMultiplyAlpha:1!==G(u)},c=t?.disableTextures?Promise.resolve(null):(0,k.D)(i,t);r.push(c.then(e=>({refId:a,image:e,parameters:l,alphaChannelUsage:u})))}const n=await Promise.all(r),o={};for(const e of n)o[e.refId]=e;return o}(r.textureDefinitions??{},t);let o=0;for(const e in n)if(n.hasOwnProperty(e)){const t=n[e];o+=t?.image?t.image.width*t.image.height*4:0}return new $(r,n,o+(0,E.Qh)(r))}(a.url,t)),{engineResources:r,referenceBoundingBox:n}=function(e,t){const r=new Array,n=new Array,o=new Array,s=new P,i=e.resource,a=U.R.parse(i.version||"1.0","wosr");D.validate(a);const u=i.model.name,l=i.model.geometries,c=i.materialDefinitions??{},f=e.textures;let m=0;const p=new Map;for(let e=0;e<l.length;e++){const i=l[e];if(!N(i))continue;const a=X(i),u=i.params.vertexAttributes,h=[],g=e=>{if("PerAttributeArray"===i.params.topology)return null;const t=i.params.faces;for(const r in t)if(r===e)return t[r].values;return null},y=u.position,x=y.values.length/y.valuesPerElement;for(const e in u){const t=u[e],r=t.values,n=g(e)??(0,L.tM)(x);h.push([e,new j.n(r,n,t.valuesPerElement,!0)])}const w=a.texture,b=f&&f[w];if(b&&!p.has(w)){const{image:e,parameters:t}=b,r=new F.g(e,t);n.push(r),p.set(w,r)}const v=p.get(w),T=v?v.id:void 0,M=a.material;let A=s.get(M,w);if(null==A){const e=c[M.slice(M.lastIndexOf("/")+1)].params;1===e.transparency&&(e.transparency=0);const r=b?G(b.alphaChannelUsage):void 0,n={ambient:(0,d.ci)(e.diffuse),diffuse:(0,d.ci)(e.diffuse),opacity:1-(e.transparency||0),textureAlphaMode:r,textureAlphaCutoff:.33,textureId:T,doubleSided:!0,cullFace:0,colorMixMode:e.externalColorMixMode||"tint",textureAlphaPremultiplied:b?.parameters.preMultiplyAlpha??!1};t?.materialParameters&&Object.assign(n,t.materialParameters),A=new V.$U(n,t),s.set(M,w,A)}o.push(A);const R=new z.V(A,h);m+=h.find(e=>"position"===e[0])?.[1]?.indices.length??0,r.push(R)}return{engineResources:[{name:u,stageResources:{textures:n,materials:o,geometries:r},pivotOffset:i.model.pivotOffset,numberOfVertices:m,lodThreshold:null}],referenceBoundingBox:q(r)}}(e,t);return{lods:r,referenceBoundingBox:n,isEsriSymbolResource:!1,isWosr:!0}}let T;if(t.cache)T=await t.cache.loadGLTF(a.url,t,!!t.usePBR);else{const{loadGLTF:e}=await r.e(1698).then(r.bind(r,51698));T=await e(new w.R,a.url,t,t.usePBR)}const A=T.model.meta?.ESRI_proxyEllipsoid,_=T.meta.isEsriSymbolResource&&null!=A&&"EsriRealisticTreesStyle"===T.meta.ESRI_webstyle;_&&!T.customMeta.esriTreeRendering&&(T.customMeta.esriTreeRendering=!0,function(e,t){for(let r=0;r<e.model.lods.length;++r){const o=e.model.lods[r];for(const s of o.parts){const o=s.attributes.normal;if(null==o)return;const i=s.attributes.position,a=i.count,c=(0,d.vt)(),m=(0,d.vt)(),p=(0,d.vt)(),g=new Float32Array(4*a),y=new Float32Array(3*a),x=(0,u.B8)((0,l.vt)(),s.transform);let w=0,b=0;for(let u=0;u<a;u++){i.getVec(u,m),o.getVec(u,c),(0,f.t)(m,m,s.transform),(0,f.e)(p,m,t.center),(0,f.D)(p,p,t.radius);const a=p[2],l=(0,f.b)(p),d=Math.min(.45+.55*l*l,1)**n.Tf;(0,f.D)(p,p,t.radius),null!==x&&(0,f.t)(p,p,x),(0,f.n)(p,p),r+1!==e.model.lods.length&&e.model.lods.length>1&&(0,f.l)(p,p,c,a>-1?.2:Math.min(-4*a-3.8,1)),y[w]=p[0],y[w+1]=p[1],y[w+2]=p[2],w+=3,g[b]=d,g[b+1]=d,g[b+2]=d,g[b+3]=1,b+=4}s.attributes.normal=new h.xs(y.buffer),s.attributes.color=new h.Eq(g.buffer)}}}(T,A));const J=!!t.usePBR,Q=T.meta.isEsriSymbolResource?{usePBR:J,isSchematic:!1,treeRendering:_,mrrFactors:W.SY}:{usePBR:J,isSchematic:!1,treeRendering:!1,mrrFactors:W.mb},K={...t.materialParameters,treeRendering:_},{engineResources:H,referenceBoundingBox:Z}=function(e,t,r,o,a,u){const l=e.model,f=new Array,d=new Map,w=new Map,T=l.lods.length,A=(0,m.Ie)();return l.lods.forEach((e,B)=>{const S=!0===o.skipHighLods&&(T>1&&0===B||T>3&&1===B)||!1===o.skipHighLods&&null!=a&&B!==a;if(S&&0!==B)return;const I=new R(e.name,e.lodThreshold,[0,0,0]);e.parts.forEach(e=>{const a=S?new V.$U({},o):function(e,t,r,o,s,i,a,u,l){const f=e.materials.get(t.material);if(null==f)return null;const{normal:d,color:m,texCoord0:p,tangent:h}=t.attributes,g=t.material+(d?"_normal":"")+(m?"_color":"")+(p?"_texCoord0":"")+(h?"_tangent":""),y=null!=t.attributes.texCoord0,x=null!=t.attributes.normal,w=function(e){switch(e){case"BLEND":return 0;case"MASK":return 2;case"OPAQUE":case null:case void 0:return 1}}(f.alphaMode);if(!i.has(g)){if(y){const t=(t,r=!1,n=!1)=>{if(null!=t&&!a.has(t)){const o=e.textures.get(t);if(o){const e=o.data,s=r&&!(0,v.x3)(e)?u.compressionOptions:void 0;a.set(t,new F.g((0,v.x3)(e)?e.data:e,{...o.parameters,preMultiplyAlpha:!(0,v.x3)(e)&&n,encoding:(0,v.x3)(e)?e.encoding:void 0,compressionOptions:s}))}}},r=1!==w&&!l;t(f.colorTexture,r,1!==w),t(f.normalTexture),t(f.occlusionTexture,!0),t(f.emissiveTexture),t(f.metallicRoughnessTexture,!0)}const r=(0,n.xV)(f.color[0]),d=(0,n.xV)(f.color[1]),m=(0,n.xV)(f.color[2]),p=null!=f.colorTexture&&y?a.get(f.colorTexture):null,h=(0,W.Jr)(f),b=null!=f.normalTextureTransform?.scale?f.normalTextureTransform?.scale:c.Un;i.set(g,new V.$U({...o,customDepthTest:1,textureAlphaMode:w,textureAlphaCutoff:f.alphaCutoff,diffuse:[r,d,m],ambient:[r,d,m],opacity:"OPAQUE"===f.alphaMode?1:f.opacity,doubleSided:f.doubleSided,doubleSidedType:"winding-order",cullFace:f.doubleSided?0:2,hasVertexColors:!!t.attributes.color,hasVertexTangents:!!t.attributes.tangent,normalType:x?0:2,castShadows:!0,receiveShadows:f.receiveShadows,receiveAmbientOcclusion:f.receiveAmbientOcclusion,textureId:null!=p?p.id:void 0,colorMixMode:f.colorMixMode,normalTextureId:null!=f.normalTexture&&y?a.get(f.normalTexture).id:void 0,textureAlphaPremultiplied:null!=p&&!!p.parameters.preMultiplyAlpha,occlusionTextureId:null!=f.occlusionTexture&&y?a.get(f.occlusionTexture).id:void 0,emissiveTextureId:null!=f.emissiveTexture&&y?a.get(f.emissiveTexture).id:void 0,metallicRoughnessTextureId:null!=f.metallicRoughnessTexture&&y?a.get(f.metallicRoughnessTexture).id:void 0,emissiveBaseColor:[f.emissiveFactor[0],f.emissiveFactor[1],f.emissiveFactor[2]],mrrFactors:h?W.Bt:[f.metallicFactor,f.roughnessFactor,o.mrrFactors[2]],isSchematic:h,colorTextureTransformMatrix:M(f.colorTextureTransform),normalTextureTransformMatrix:M(f.normalTextureTransform),scale:[b[0],b[1]],occlusionTextureTransformMatrix:M(f.occlusionTextureTransform),emissiveTextureTransformMatrix:M(f.emissiveTextureTransform),metallicRoughnessTextureTransformMatrix:M(f.metallicRoughnessTextureTransform),...s},u))}const b=i.get(g);if(r.stageResources.materials.push(b),y){const e=e=>{null!=e&&r.stageResources.textures.push(a.get(e))};e(f.colorTexture),e(f.normalTexture),e(f.occlusionTexture),e(f.emissiveTexture),e(f.metallicRoughnessTexture)}return b}(l,e,I,t,r,d,w,o,u),{geometry:f,vertexCount:T}=function(e,t){const r=e.attributes.position.count,n=(0,b.x)(e.indices||r,e.primitiveType),o=(0,p.oe)(3*r),{typedBuffer:a,typedBufferStride:u}=e.attributes.position;(0,g.t)(o,a,e.transform,3,u);const l=[["position",new j.n(o,n,3,!0)]];if(null!=e.attributes.normal){const t=(0,p.oe)(3*r),{typedBuffer:o,typedBufferStride:a}=e.attributes.normal;(0,i.Ge)(Y,e.transform),(0,g.b)(t,o,Y,3,a),(0,s.or)(Y)&&(0,g.n)(t,t),l.push(["normal",new j.n(t,n,3,!0)])}if(null!=e.attributes.tangent){const t=(0,p.oe)(4*r),{typedBuffer:o,typedBufferStride:a}=e.attributes.tangent;(0,i.z0)(Y,e.transform),(0,y.t)(t,o,Y,4,a),(0,s.or)(Y)&&(0,g.n)(t,t,4),l.push(["tangent",new j.n(t,n,4,!0)])}if(null!=e.attributes.texCoord0){const t=(0,p.oe)(2*r),{typedBuffer:o,typedBufferStride:s}=e.attributes.texCoord0;(0,x.a)(t,o,2,s),l.push(["uv0",new j.n(t,n,2,!0)])}const c=e.attributes.color;if(null!=c){const t=new Uint8Array(4*r);4===c.elementCount?c instanceof h.Eq?(0,y.b)(t,c,1,255):(c instanceof h.XP||c instanceof h.Uz)&&(0,y.b)(t,c,1/255,255):(t.fill(255),c instanceof h.xs?(0,g.f)(t,c.typedBuffer,1,255,4,c.typedBufferStride):(e.attributes.color instanceof h.eI||e.attributes.color instanceof h.nS)&&(0,g.f)(t,c.typedBuffer,1/255,255,4,e.attributes.color.typedBufferStride)),l.push(["color",new j.n(t,n,4,!0)])}return{geometry:new z.V(t,l),vertexCount:r}}(e,a??new V.$U({},o)),R=f.boundingInfo;null!=R&&0===B&&((0,m.iT)(A,R.bbMin),(0,m.iT)(A,R.bbMax)),null!=a&&(I.stageResources.geometries.push(f),I.numberOfVertices+=T)}),S||f.push(I)}),{engineResources:f,referenceBoundingBox:A}}(T,Q,K,t,a.specifiedLodIndex,_);return{lods:H,referenceBoundingBox:Z,isEsriSymbolResource:T.meta.isEsriSymbolResource,isWosr:!1}}const Y=(0,a.vt)()},69052:(e,t,r)=>{r.d(t,{hr:()=>o,ie:()=>u,uC:()=>a});var n=r(34727);class o{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,r=!1){return s(this.range,this.min,this.max,e,t,r)}clamp(e,t=0){return(0,n.qE)(e-t,this.min,this.max)+t}monotonic(e,t,r){return e<t?t:t+i(this.range,e-t,r)}minimalMonotonic(e,t,r){return s(this.range,e,e+this.range,t,r)}center(e,t,r){return t=this.monotonic(e,t,r),this.normalize((e+t)/2,r)}diff(e,t,r){return this.monotonic(e,t,r)-e}shortestSignedDiff(e,t){e=this.normalize(e);const r=(t=this.normalize(t))-e,n=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(r)<Math.abs(n)?r:n}contains(e,t,r){return t=this.minimalMonotonic(e,t),(r=this.minimalMonotonic(e,r))>e&&r<t}}function s(e,t,r,n,o=0,s=!1){return(n-=o)<t?n+=i(e,t-n):n>r&&(n-=i(e,n-r)),s&&n===r&&(n=t),n+o}function i(e,t,r=0){return Math.ceil((t-r)/e)*e+r}const a=new o(0,2*Math.PI),u=(new o(-Math.PI,Math.PI),new o(0,360))},69397:(e,t,r)=>{r.d(t,{$B:()=>o,Qf:()=>l,Qh:()=>a,RS:()=>s,ez:()=>d,lM:()=>i,qK:()=>f});var n=r(34275);function o(e){return 32+e.length}const s=16;function i(e){if(!e)return 0;let t=f;for(const r in e)e.hasOwnProperty(r)&&(t+=u(e[r],!1));return t}function a(e){if(!e)return 0;if("number"==typeof e[0])return l(e);if(Array.isArray(e))return function(e){const t=e.length;if(0===t||"number"==typeof e[0])return c(e,8);let r=d;for(let n=0;n<t;n++)r+=u(e[n]);return r}(e);let t=f;for(const r in e)e.hasOwnProperty(r)&&(t+=u(e[r]));return t}function u(e,t=!0){switch(typeof e){case"object":return t?a(e):f;case"string":return o(e);case"number":return s;case"boolean":return 4;default:return 8}}function l(...e){return e.reduce((e,t)=>e+(t?(0,n.iu)(t)?t.byteLength+m:Array.isArray(t)?c(t,s):0:0),0)}function c(e,t){return d+e.length*t}const f=32,d=16,m=145},73354:(e,t,r)=>{r.d(t,{a:()=>f,b:()=>a,c:()=>i,d:()=>o,e:()=>d,f:()=>c,l:()=>l,n:()=>m,t:()=>s});var n=r(40876);function o(e,t,r){s(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function s(e,t,r,n=3,o=n){if(e.length/n!==Math.ceil(t.length/o))return e;const s=e.length/n,i=r[0],a=r[1],u=r[2],l=r[4],c=r[5],f=r[6],d=r[8],m=r[9],p=r[10],h=r[12],g=r[13],y=r[14];let x=0,w=0;for(let r=0;r<s;r++){const r=t[x],s=t[x+1],b=t[x+2];e[w]=i*r+l*s+d*b+h,e[w+1]=a*r+c*s+m*b+g,e[w+2]=u*r+f*s+p*b+y,x+=o,w+=n}return e}function i(e,t,r){a(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function a(e,t,r,n=3,o=n){if(e.length/n!==Math.ceil(t.length/o))return;const s=e.length/n,i=r[0],a=r[1],u=r[2],l=r[3],c=r[4],f=r[5],d=r[6],m=r[7],p=r[8];let h=0,g=0;for(let r=0;r<s;r++){const r=t[h],s=t[h+1],y=t[h+2];e[g]=i*r+l*s+d*y,e[g+1]=a*r+c*s+m*y,e[g+2]=u*r+f*s+p*y,h+=o,g+=n}}function u(e,t,r,n=3,o=n){const s=Math.min(e.length/n,t.length/o);let i=0,a=0;for(let u=0;u<s;u++)e[a]=r*t[i],e[a+1]=r*t[i+1],e[a+2]=r*t[i+2],i+=o,a+=n;return e}function l(e,t,r,n){c(e.typedBuffer,t.typedBuffer,r,n,e.typedBufferStride,t.typedBufferStride)}function c(e,t,r,o,s=3,i=s){const a=Math.min(e.length/s,t.length/i);let u=0,l=0;const c=1/n.Tf;for(let n=0;n<a;n++)e[l]=o*(r*t[u])**c,e[l+1]=o*(r*t[u+1])**c,e[l+2]=o*(r*t[u+2])**c,u+=i,l+=s}function f(e,t,r,n=3,o=n){const s=e.length/n;if(s!==Math.ceil(t.length/o))return e;let i=0,a=0;for(let u=0;u<s;u++)e[a]=t[i]+r[0],e[a+1]=t[i+1]+r[1],e[a+2]=t[i+2]+r[2],i+=o,a+=n;return e}function d(e,t){m(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function m(e,t,r=3,n=r){const o=Math.min(e.length/r,t.length/n);let s=0,i=0;for(let a=0;a<o;a++){const o=t[s],a=t[s+1],u=t[s+2],l=o*o+a*a+u*u;if(l>0){const t=1/Math.sqrt(l);e[i]=t*o,e[i+1]=t*a,e[i+2]=t*u}s+=n,i+=r}}r(44208),r(53966),Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:c,linearToSRGBView:l,normalize:m,normalizeView:d,scale:u,scaleView:function(e,t,r){u(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)},shiftRight:function(e,t,r){const n=Math.min(e.count,t.count),o=e.typedBuffer,s=e.typedBufferStride,i=t.typedBuffer,a=t.typedBufferStride;let u=0,l=0;for(let e=0;e<n;e++)o[l]=i[u]>>r,o[l+1]=i[u+1]>>r,o[l+2]=i[u+2]>>r,u+=a,l+=s},transformMat3:a,transformMat3View:i,transformMat4:s,transformMat4View:o,translate:f},Symbol.toStringTag,{value:"Module"}))},80754:(e,t,r)=>{r.d(t,{j7:()=>i,kS:()=>u,kd:()=>a,r8:()=>l});var n=r(82799),o=r(16930),s=r(65864);const i={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new n.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:o.A.WebMercator}),minus180Line:new n.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:o.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new n.A({paths:[[[180,-180],[180,180]]],spatialReference:o.A.WGS84}),minus180Line:new n.A({paths:[[[-180,-180],[-180,180]]],spatialReference:o.A.WGS84})}};function a(e,t){return Math.ceil((e-t)/(2*t))}function u(e,t){const r=l(e);for(const e of r)for(const r of e)r[0]+=t;return e}function l(e){return(0,s.Bi)(e)?e.rings:e.paths}},84498:(e,t,r)=>{r.d(t,{x:()=>i});var n=r(34275),o=r(97146),s=r(63907);function i(e,t){switch(t){case s.WR.TRIANGLES:return function(e){return"number"==typeof e?(0,o.tM)(e):(0,n.mg)(e)?new Uint16Array(e):e}(e);case s.WR.TRIANGLE_STRIP:return function(e){const t="number"==typeof e?e:e.length;if(t<3)return[];const r=t-2,n=(0,o.my)(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;t+=1)t%2==0?(n[e++]=t,n[e++]=t+1,n[e++]=t+2):(n[e++]=t+1,n[e++]=t,n[e++]=t+2)}else{let t=0;for(let o=0;o<r;o+=1)o%2==0?(n[t++]=e[o],n[t++]=e[o+1],n[t++]=e[o+2]):(n[t++]=e[o+1],n[t++]=e[o],n[t++]=e[o+2])}return n}(e);case s.WR.TRIANGLE_FAN:return function(e){const t="number"==typeof e?e:e.length;if(t<3)return new Uint16Array(0);const r=t-2,n=r<=65536?new Uint16Array(3*r):new Uint32Array(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;++t)n[e++]=0,n[e++]=t+1,n[e++]=t+2;return n}const o=e[0];let s=e[1],i=0;for(let t=0;t<r;++t){const r=e[t+2];n[i++]=o,n[i++]=s,n[i++]=r,s=r}return n}(e)}}},88340:(e,t,r)=>{function n(){return new Float32Array(2)}function o(e,t){const r=new Float32Array(2);return r[0]=e,r[1]=t,r}function s(){return n()}function i(){return o(1,1)}function a(){return o(1,0)}function u(){return o(0,1)}r.d(t,{Un:()=>c,fA:()=>o,uY:()=>l,vt:()=>n});const l=s(),c=i(),f=a(),d=u();Object.freeze(Object.defineProperty({__proto__:null,ONES:c,UNIT_X:f,UNIT_Y:d,ZEROS:l,clone:function(e){const t=new Float32Array(2);return t[0]=e[0],t[1]=e[1],t},create:n,fromValues:o,ones:i,unitX:a,unitY:u,zeros:s},Symbol.toStringTag,{value:"Module"}))},92300:(e,t,r)=>{r.d(t,{V:()=>s,X:()=>o});var n=r(65864);function o(e){return{geometryType:(0,n.$B)(e[0]),geometries:e.map(e=>e.toJSON())}}function s(e,t,r){const o=(0,n.xD)(t);return e.map(e=>{const t=o.fromJSON(e);return t.spatialReference=r,t})}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[61],{5682:(e,t,o)=>{o.d(t,{s1:()=>c});var r=o(78888),n=(o(4576),o(49186),o(44208),o(58083),o(9093)),i=(o(38954),o(51850)),s=(o(91218),o(16930),o(27993),o(19419));o(97937),o(30524),o(61956);var a=o(59418);o(73941),o(48353),o(68197);var u=o(91829);(0,u.fA)(0,0,0,.2);(0,u.fA)(0,0,0,.2),o(34727);var l=o(57005);async function c(e,t,o,n,i,s,u,l){const c=[];for(const r of t)if(r&&i.includes(r.name)){const t=`${e}/nodes/${o}/attributes/${r.key}/0`;c.push({url:t,storageInfo:r})}const d=await Promise.allSettled(c.map(e=>(0,r.A)(e.url,{responseType:"array-buffer",query:{...u,token:s},signal:l?.signal}).then(t=>(0,a.m0)(e.storageInfo,t.data)))),p=[];for(const e of n){const t={};for(let o=0;o<d.length;o++){const r=d[o];if("fulfilled"===r.status){const n=r.value;t[c[o].storageInfo.name]=(0,a.E5)(n,e)}}p.push(t)}return p}o(63201),(0,s.vt)(),(0,i.vt)(),(0,i.vt)(),(0,i.vt)(),(0,i.vt)(),(0,i.vt)(),(0,i.vt)(),(0,i.vt)(),(0,i.vt)(),(0,s.vt)(),(0,s.vt)(),new l.ab,(0,i.vt)(),new Array(72),(0,n.vt)()},37203:(e,t,o)=>{o.d(t,{Ax:()=>b,Me:()=>l,mb:()=>y});var r=o(49186);const n=!0,i={identifierOffset:0,identifierLength:10,versionOffset:10,checksumOffset:12,byteCount:16};function s(e,t,o){return{identifier:String.fromCharCode.apply(null,new Uint8Array(e,o+i.identifierOffset,i.identifierLength)),version:t.getUint16(o+i.versionOffset,n),checksum:t.getUint32(o+i.checksumOffset,n)}}const a={sizeLo:0,sizeHi:4,minX:8,minY:16,minZ:24,maxX:32,maxY:40,maxZ:48,errorX:56,errorY:64,errorZ:72,count:80,reserved:84,byteCount:88};function u(e,t){return{sizeLo:e.getUint32(t+a.sizeLo,n),sizeHi:e.getUint32(t+a.sizeHi,n),minX:e.getFloat64(t+a.minX,n),minY:e.getFloat64(t+a.minY,n),minZ:e.getFloat64(t+a.minZ,n),maxX:e.getFloat64(t+a.maxX,n),maxY:e.getFloat64(t+a.maxY,n),maxZ:e.getFloat64(t+a.maxZ,n),errorX:e.getFloat64(t+a.errorX,n),errorY:e.getFloat64(t+a.errorY,n),errorZ:e.getFloat64(t+a.errorZ,n),count:e.getUint32(t+a.count,n),reserved:e.getUint32(t+a.reserved,n)}}function l(e){const t=new DataView(e,0);let o=0;const{identifier:n,version:l}=s(e,t,o);if(o+=i.byteCount,"LEPCC "!==n)throw new r.A("lepcc-decode-error","Bad identifier");if(l>1)throw new r.A("lepcc-decode-error","Unknown version");const d=u(t,o);if(o+=a.byteCount,d.sizeHi*2**32+d.sizeLo!==e.byteLength)throw new r.A("lepcc-decode-error","Bad size");const p=new Float64Array(3*d.count),f=[],y=[],g=[],h=[];if(o=c(e,o,f),o=c(e,o,y),o=c(e,o,g),o=c(e,o,h),o!==e.byteLength)throw new r.A("lepcc-decode-error","Bad length");let b=0,w=0;for(let e=0;e<f.length;e++){w+=f[e];let t=0;for(let o=0;o<y[e];o++){t+=g[b];const e=h[b];p[3*b]=Math.min(d.maxX,d.minX+2*d.errorX*t),p[3*b+1]=Math.min(d.maxY,d.minY+2*d.errorY*w),p[3*b+2]=Math.min(d.maxZ,d.minZ+2*d.errorZ*e),b++}}return{errorX:d.errorX,errorY:d.errorY,errorZ:d.errorZ,result:p}}function c(e,t,o){const r=[];t=d(e,t,r);const n=[];for(let i=0;i<r.length;i++){n.length=0,t=d(e,t,n);for(let e=0;e<n.length;e++)o.push(n[e]+r[i])}return t}function d(e,t,o){const i=new DataView(e,t),s=i.getUint8(0),a=31&s,u=!!(32&s),l=(192&s)>>6;let c=0;if(0===l)c=i.getUint32(1,n),t+=5;else if(1===l)c=i.getUint16(1,n),t+=3;else{if(2!==l)throw new r.A("lepcc-decode-error","Bad count type");c=i.getUint8(1),t+=2}if(u)throw new r.A("lepcc-decode-error","LUT not implemented");const d=Math.ceil(c*a/8),p=new Uint8Array(e,t,d);let f=0,y=0,g=0;const h=-1>>>32-a;for(let e=0;e<c;e++){for(;y<a;)f|=p[g]<<y,y+=8,g+=1;o[e]=f&h,f>>>=a,y-=a,y+a>32&&(f|=p[g-1]>>8-y)}return t+g}const p={sizeLo:0,sizeHi:4,count:8,colorMapCount:12,lookupMethod:14,compressionMethod:15,byteCount:16};function f(e,t){return{sizeLo:e.getUint32(t+p.sizeLo,n),sizeHi:e.getUint32(t+p.sizeHi,n),count:e.getUint32(t+p.count,n),colorMapCount:e.getUint16(t+p.colorMapCount,n),lookupMethod:e.getUint8(t+p.lookupMethod),compressionMethod:e.getUint8(t+p.compressionMethod)}}function y(e){const t=new DataView(e,0);let o=0;const{identifier:n,version:a}=s(e,t,o);if(o+=i.byteCount,"ClusterRGB"!==n)throw new r.A("lepcc-decode-error","Bad identifier");if(a>1)throw new r.A("lepcc-decode-error","Unknown version");const u=f(t,o);if(o+=p.byteCount,u.sizeHi*2**32+u.sizeLo!==e.byteLength)throw new r.A("lepcc-decode-error","Bad size");if((2===u.lookupMethod||1===u.lookupMethod)&&0===u.compressionMethod){if(3*u.colorMapCount+u.count+o!==e.byteLength||u.colorMapCount>256)throw new r.A("lepcc-decode-error","Bad count");const t=new Uint8Array(e,o,3*u.colorMapCount),n=new Uint8Array(e,o+3*u.colorMapCount,u.count),i=new Uint8Array(3*u.count);for(let e=0;e<u.count;e++){const o=n[e];i[3*e]=t[3*o],i[3*e+1]=t[3*o+1],i[3*e+2]=t[3*o+2]}return i}if(0===u.lookupMethod&&0===u.compressionMethod){if(3*u.count+o!==e.byteLength||0!==u.colorMapCount)throw new r.A("lepcc-decode-error","Bad count");return new Uint8Array(e,o).slice()}if(u.lookupMethod<=2&&1===u.compressionMethod){if(o+3!==e.byteLength||1!==u.colorMapCount)throw new r.A("lepcc-decode-error","Bad count");const n=t.getUint8(o),i=t.getUint8(o+1),s=t.getUint8(o+2),a=new Uint8Array(3*u.count);for(let e=0;e<u.count;e++)a[3*e]=n,a[3*e+1]=i,a[3*e+2]=s;return a}throw new r.A("lepcc-decode-error","Bad method "+u.lookupMethod+","+u.compressionMethod)}const g={sizeLo:0,sizeHi:4,count:8,scaleFactor:12,bitsPerPoint:14,reserved:15,byteCount:16};function h(e,t){return{sizeLo:e.getUint32(t+g.sizeLo,n),sizeHi:e.getUint32(t+g.sizeHi,n),count:e.getUint32(t+g.count,n),scaleFactor:e.getUint16(t+g.scaleFactor,n),bitsPerPoint:e.getUint8(t+g.bitsPerPoint),reserved:e.getUint8(t+g.reserved)}}function b(e){const t=new DataView(e,0);let o=0;const{identifier:n,version:a}=s(e,t,o);if(o+=i.byteCount,"Intensity "!==n)throw new r.A("lepcc-decode-error","Bad identifier");if(a>1)throw new r.A("lepcc-decode-error","Unknown version");const u=h(t,o);if(o+=g.byteCount,u.sizeHi*2**32+u.sizeLo!==e.byteLength)throw new r.A("lepcc-decode-error","Bad size");const l=new Uint16Array(u.count);if(8===u.bitsPerPoint){if(u.count+o!==e.byteLength)throw new r.A("lepcc-decode-error","Bad size");const t=new Uint8Array(e,o,u.count);for(let e=0;e<u.count;e++)l[e]=t[e]*u.scaleFactor}else if(16===u.bitsPerPoint){if(2*u.count+o!==e.byteLength)throw new r.A("lepcc-decode-error","Bad size");const t=new Uint16Array(e,o,u.count);for(let e=0;e<u.count;e++)l[e]=t[e]*u.scaleFactor}else{const t=[];if(d(e,o,t)!==e.byteLength)throw new r.A("lepcc-decode-error","Bad size");for(let e=0;e<u.count;e++)l[e]=t[e]*u.scaleFactor}return l}},37352:(e,t,o)=>{o.d(t,{A:()=>l});var r,n=o(31635),i=o(7762),s=o(25482),a=o(10107),u=(o(44208),o(53966),o(87811),o(64108));let l=r=class extends s.o{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new i.A}clone(){return new r({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,n.Cg)([(0,a.MZ)({type:String,json:{write:{isRequired:!0}}})],l.prototype,"floorField",void 0),(0,n.Cg)([(0,a.MZ)({json:{read:!1,write:!1}})],l.prototype,"viewAllMode",void 0),(0,n.Cg)([(0,a.MZ)({json:{read:!1,write:!1}})],l.prototype,"viewAllLevelIds",void 0),l=r=(0,n.Cg)([(0,u.$)("esri.layers.support.LayerFloorInfo")],l)},45671:(e,t,o)=>{o.d(t,{D8:()=>i,TO:()=>n});var r=o(30524);async function n(e,t=e.popupTemplate){if(null==t)return[];const o=await t.getRequiredFields(e.fieldsIndex),{lastEditInfoEnabled:n}=t,{objectIdField:i,typeIdField:s,globalIdField:a,relationships:u}=e;if(o.includes("*"))return["*"];const l=n?(0,r.eX)(e):[],c=(0,r.DB)(e.fieldsIndex,[...o,...l]);return s&&c.push(s),c&&i&&e.fieldsIndex?.has(i)&&!c.includes(i)&&c.push(i),c&&a&&e.fieldsIndex?.has(a)&&!c.includes(a)&&c.push(a),u?.forEach(t=>{const{keyField:o}=t;c&&o&&e.fieldsIndex?.has(o)&&!c.includes(o)&&c.push(o)}),c}function i(e,t){return e&&"object"==typeof e?t?.checkPopupEnabled&&"popupEnabled"in e&&!e.popupEnabled?null:"popupTemplate"in e&&e.popupTemplate?e.popupTemplate:null!=t&&t.defaultPopupTemplateEnabled&&"defaultPopupTemplate"in e&&e.defaultPopupTemplate?e.defaultPopupTemplate:null:null}},50805:(e,t,o)=>{o.d(t,{L0:()=>b,Ot:()=>f,W4:()=>u,uV:()=>d});var r=o(31635),n=o(25482),i=o(10107),s=(o(44208),o(53966),o(87811),o(93223)),a=o(64108);let u=class extends n.o{constructor(){super(...arguments),this.nodesPerPage=null,this.rootIndex=0,this.lodSelectionMetricType=null}};(0,r.Cg)([(0,i.MZ)({type:Number})],u.prototype,"nodesPerPage",void 0),(0,r.Cg)([(0,i.MZ)({type:Number})],u.prototype,"rootIndex",void 0),(0,r.Cg)([(0,i.MZ)({type:String})],u.prototype,"lodSelectionMetricType",void 0),u=(0,r.Cg)([(0,a.$)("esri.layers.support.I3SLayerDefinitions.I3SNodePageDefinition")],u);let l=class extends n.o{constructor(){super(...arguments),this.factor=1}};(0,r.Cg)([(0,i.MZ)({type:Number,json:{read:{source:"textureSetDefinitionId"}}})],l.prototype,"id",void 0),(0,r.Cg)([(0,i.MZ)({type:Number})],l.prototype,"factor",void 0),l=(0,r.Cg)([(0,a.$)("esri.layers.support.I3SLayerDefinitions.I3SMaterialTexture")],l);let c=class extends n.o{constructor(){super(...arguments),this.baseColorFactor=[1,1,1,1],this.baseColorTexture=null,this.metallicRoughnessTexture=null,this.metallicFactor=1,this.roughnessFactor=1}};(0,r.Cg)([(0,i.MZ)({type:[Number]})],c.prototype,"baseColorFactor",void 0),(0,r.Cg)([(0,i.MZ)({type:l})],c.prototype,"baseColorTexture",void 0),(0,r.Cg)([(0,i.MZ)({type:l})],c.prototype,"metallicRoughnessTexture",void 0),(0,r.Cg)([(0,i.MZ)({type:Number})],c.prototype,"metallicFactor",void 0),(0,r.Cg)([(0,i.MZ)({type:Number})],c.prototype,"roughnessFactor",void 0),c=(0,r.Cg)([(0,a.$)("esri.layers.support.I3SLayerDefinitions.I3SMaterialPBRMetallicRoughness")],c);let d=class extends n.o{constructor(){super(...arguments),this.alphaMode="opaque",this.alphaCutoff=.25,this.doubleSided=!1,this.cullFace="none",this.normalTexture=null,this.occlusionTexture=null,this.emissiveTexture=null,this.emissiveFactor=null,this.pbrMetallicRoughness=null}};(0,r.Cg)([(0,s.e)({opaque:"opaque",mask:"mask",blend:"blend"})],d.prototype,"alphaMode",void 0),(0,r.Cg)([(0,i.MZ)({type:Number})],d.prototype,"alphaCutoff",void 0),(0,r.Cg)([(0,i.MZ)({type:Boolean})],d.prototype,"doubleSided",void 0),(0,r.Cg)([(0,s.e)({none:"none",back:"back",front:"front"})],d.prototype,"cullFace",void 0),(0,r.Cg)([(0,i.MZ)({type:l})],d.prototype,"normalTexture",void 0),(0,r.Cg)([(0,i.MZ)({type:l})],d.prototype,"occlusionTexture",void 0),(0,r.Cg)([(0,i.MZ)({type:l})],d.prototype,"emissiveTexture",void 0),(0,r.Cg)([(0,i.MZ)({type:[Number]})],d.prototype,"emissiveFactor",void 0),(0,r.Cg)([(0,i.MZ)({type:c})],d.prototype,"pbrMetallicRoughness",void 0),d=(0,r.Cg)([(0,a.$)("esri.layers.support.I3SLayerDefinitions.I3SMaterialDefinition")],d);let p=class extends n.o{};(0,r.Cg)([(0,i.MZ)({type:String,json:{read:{source:["name","index"],reader:(e,t)=>null!=e?e:`${t.index}`}}})],p.prototype,"name",void 0),(0,r.Cg)([(0,s.e)({jpg:"jpg",png:"png",dds:"dds","ktx-etc2":"ktx-etc2",ktx2:"ktx2",basis:"basis"})],p.prototype,"format",void 0),p=(0,r.Cg)([(0,a.$)("esri.layers.support.I3SLayerDefinitions.I3STextureFormat")],p);let f=class extends n.o{constructor(){super(...arguments),this.atlas=!1}};(0,r.Cg)([(0,i.MZ)({type:[p]})],f.prototype,"formats",void 0),(0,r.Cg)([(0,i.MZ)({type:Boolean})],f.prototype,"atlas",void 0),f=(0,r.Cg)([(0,a.$)("esri.layers.support.I3SLayerDefinitions.I3STextureSetDefinition")],f);let y=class extends n.o{};(0,r.Cg)([(0,s.e)({Float32:"Float32",UInt64:"UInt64",UInt32:"UInt32",UInt16:"UInt16",UInt8:"UInt8"})],y.prototype,"type",void 0),(0,r.Cg)([(0,i.MZ)({type:Number})],y.prototype,"component",void 0),y=(0,r.Cg)([(0,a.$)("esri.layers.support.I3SLayerDefinitions.I3SGeometryAttribute")],y);let g=class extends n.o{};(0,r.Cg)([(0,s.e)({draco:"draco"})],g.prototype,"encoding",void 0),(0,r.Cg)([(0,i.MZ)({type:[String]})],g.prototype,"attributes",void 0),g=(0,r.Cg)([(0,a.$)("esri.layers.support.I3SLayerDefinitions.I3SGeometryCompressedAttributes")],g);let h=class extends n.o{constructor(){super(...arguments),this.offset=0}};(0,r.Cg)([(0,i.MZ)({type:Number})],h.prototype,"offset",void 0),(0,r.Cg)([(0,i.MZ)({type:y})],h.prototype,"position",void 0),(0,r.Cg)([(0,i.MZ)({type:y})],h.prototype,"normal",void 0),(0,r.Cg)([(0,i.MZ)({type:y})],h.prototype,"uv0",void 0),(0,r.Cg)([(0,i.MZ)({type:y})],h.prototype,"color",void 0),(0,r.Cg)([(0,i.MZ)({type:y})],h.prototype,"uvRegion",void 0),(0,r.Cg)([(0,i.MZ)({type:y})],h.prototype,"featureId",void 0),(0,r.Cg)([(0,i.MZ)({type:y})],h.prototype,"faceRange",void 0),(0,r.Cg)([(0,i.MZ)({type:g})],h.prototype,"compressedAttributes",void 0),h=(0,r.Cg)([(0,a.$)("esri.layers.support.I3SLayerDefinitions.I3SGeometryBuffer")],h);let b=class extends n.o{};(0,r.Cg)([(0,s.e)({triangle:"triangle"})],b.prototype,"topology",void 0),(0,r.Cg)([(0,i.MZ)()],b.prototype,"geometryBuffers",void 0),b=(0,r.Cg)([(0,a.$)("esri.layers.support.I3SLayerDefinitions.I3SGeometryDefinition")],b)},59418:(e,t,o)=>{o.d(t,{wH:()=>g,MA:()=>p,E5:()=>f,m0:()=>b});var r=o(49186),n=o(4718),i=o(53966),s=o(34275),a=o(37203);const u=()=>i.A.getLogger("esri.views.3d.layers.i3s.I3SBinaryReader");function l(e,t,o){let n="",i=0;for(;i<o;){const s=e[t+i];if(s<128)n+=String.fromCharCode(s),i++;else if(s>=192&&s<224){if(i+1>=o)throw new r.A("utf8-decode-error","UTF-8 Decode failed. Two byte character was truncated.");const a=(31&s)<<6|63&e[t+i+1];n+=String.fromCharCode(a),i+=2}else if(s>=224&&s<240){if(i+2>=o)throw new r.A("utf8-decode-error","UTF-8 Decode failed. Multi byte character was truncated.");const a=(15&s)<<12|(63&e[t+i+1])<<6|63&e[t+i+2];n+=String.fromCharCode(a),i+=3}else{if(!(s>=240&&s<248))throw new r.A("utf8-decode-error","UTF-8 Decode failed. Invalid multi byte sequence.");{if(i+3>=o)throw new r.A("utf8-decode-error","UTF-8 Decode failed. Multi byte character was truncated.");const a=(7&s)<<18|(63&e[t+i+1])<<12|(63&e[t+i+2])<<6|63&e[t+i+3];if(a>=65536){const e=55296+(a-65536>>10),t=56320+(1023&a);n+=String.fromCharCode(e,t)}else n+=String.fromCharCode(a);i+=4}}}return n}function c(e,t){const o={byteOffset:0,byteCount:0,fields:Object.create(null)};let r=0;for(let n=0;n<t.length;n++){const i=t[n],s=i.valueType||i.type,a=v[s];o.fields[i.property]=a(e,r),r+=w[s].BYTES_PER_ELEMENT}return o.byteCount=r,o}function d(e,t,o){const n=[];let i,s,a=0;for(s=0;s<e;s+=1){if(i=t[s],i>0){if(n.push(l(o,a,i-1)),0!==o[a+i-1])throw new r.A("string-array-error","Invalid string array: missing null termination.")}else n.push(null);a+=i}return n}function p(e,t){return new(0,w[t.valueType])(e,t.byteOffset,t.count*t.valuesPerElement)}function f(e,t){if(!e)return null;const o=e[t];return(0,s.IY)(e)?o===s.PI?null:o:(0,s._G)(e)?o===s.h2?null:o:o!=o?null:o}function y(e,t,o){if(t!==e&&u().error(`Invalid ${o} buffer size\n expected: ${e}, actual: ${t})`),t<e)throw new r.A("buffer-too-small","Binary buffer is too small",{expectedSize:e,actualSize:t})}function g(e,t){const o=c(e,t&&t.header);let r=o.byteCount;const n={isDraco:!1,header:o,byteOffset:o.byteCount,byteCount:0,vertexAttributes:{}},i=o.fields,s=null!=i.vertexCount?i.vertexCount:i.count;for(const e of t.ordering){if(!t.vertexAttributes[e])continue;const o={...t.vertexAttributes[e],byteOffset:r,count:s},i=h[e]||"_"+e;n.vertexAttributes[i]=o,r+=C(o.valueType)*o.valuesPerElement*s}const a=i.faceCount;if(t.faces&&a){n.faces={};for(const e of t.ordering){if(!t.faces[e])continue;const o={...t.faces[e],byteOffset:r,count:a};n.faces[e]=o,r+=C(o.valueType)*o.valuesPerElement*a}}const u=i.featureCount;if(t.featureAttributes&&t.featureAttributeOrder&&u){n.featureAttributes={};for(const e of t.featureAttributeOrder){if(!t.featureAttributes[e])continue;const o={...t.featureAttributes[e],byteOffset:r,count:u};n.featureAttributes[e]=o,r+=("UInt64"===o.valueType?8:C(o.valueType))*o.valuesPerElement*u}}return y(r,e.byteLength,"geometry"),n.byteCount=r-n.byteOffset,n}const h={position:"position",normal:"normal",color:"color",uv0:"uv0",region:"uvRegion"};function b(e,t,o,i=!1){if("lepcc-rgb"===e.encoding)return i?(0,a.mb)(t):function(e){return Array.isArray(e)?e.length<s.y9?e:new Uint8Array(e):e.length<s.y9?Array.from(e):e}((0,a.mb)(t));if("lepcc-intensity"===e.encoding)return i?(0,a.Ax)(t):function(e){return Array.isArray(e)?e.length<s.y9?e:new Uint16Array(e):e.length<s.y9?Array.from(e):e}((0,a.Ax)(t));if(null!=e.encoding&&""!==e.encoding)throw new r.A("unknown-attribute-storage-info-encoding","Unknown Attribute Storage Info Encoding");e["attributeByteCounts "]&&!e.attributeByteCounts&&(u().warn("Warning: Trailing space in 'attributeByteCounts '."),e.attributeByteCounts=e["attributeByteCounts "]),"ObjectIds"===e.ordering[0]&&e.hasOwnProperty("objectIds")&&(u().warn("Warning: Case error in objectIds"),e.ordering[0]="objectIds");const l=function(e,t,o){const i=null!=t.header?c(e,t.header):{byteOffset:0,byteCount:0,fields:{count:o}},s={header:i,byteOffset:i.byteCount,byteCount:0,entries:Object.create(null)};let a=i.byteCount;for(let e=0;e<t.ordering.length;e++){const o=t.ordering[e],u=(0,n.o8)(t[o]);if(u.count=i.fields.count??0,"String"===u.valueType){if(u.byteOffset=a,u.byteCount=i.fields[o+"ByteCount"],"UTF-8"!==u.encoding)throw new r.A("unsupported-encoding","Unsupported String encoding.",{encoding:u.encoding});if(u.timeEncoding&&"ECMA_ISO8601"!==u.timeEncoding)throw new r.A("unsupported-time-encoding","Unsupported time encoding.",{timeEncoding:u.timeEncoding})}else{if(!m(u.valueType))throw new r.A("unsupported-value-type","Unsupported binary valueType",{valueType:u.valueType});{const e=C(u.valueType);a+=a%e!==0?e-a%e:0,u.byteOffset=a,u.byteCount=e*u.valuesPerElement*u.count}}a+=u.byteCount??0,s.entries[o]=u}return s.byteCount=a-s.byteOffset,s}(t,e,o);y(l.byteOffset+l.byteCount,t.byteLength,"attribute");const g=l.entries.attributeValues||l.entries.objectIds;if(g){if("String"===g.valueType){const e=l.entries.attributeByteCounts,o=p(t,e),r=function(e,t){return new Uint8Array(e,t.byteOffset,t.byteCount)}(t,g);return g.timeEncoding?function(e,t,o){return d(e,t,o).map(e=>{const t=e?Date.parse(e):null;return null==t||Number.isNaN(t)?null:t})}(e.count,o,r):d(e.count,o,r)}return i?p(t,g):function(e,t){const o=p(e,t);if(o.length>=s.y9)return o;const r=new Array;return o.forEach((e,t)=>r.push(f(o,t))),r}(t,g)}throw new r.A("bad-attribute-storage-info","Bad attributeStorageInfo specification.")}const w={Float32:Float32Array,Float64:Float64Array,UInt8:Uint8Array,Int8:Int8Array,UInt16:Uint16Array,Int16:Int16Array,UInt32:Uint32Array,Int32:Int32Array},v={Float32:(e,t)=>new DataView(e,0).getFloat32(t,!0),Float64:(e,t)=>new DataView(e,0).getFloat64(t,!0),UInt8:(e,t)=>new DataView(e,0).getUint8(t),Int8:(e,t)=>new DataView(e,0).getInt8(t),UInt16:(e,t)=>new DataView(e,0).getUint16(t,!0),Int16:(e,t)=>new DataView(e,0).getInt16(t,!0),UInt32:(e,t)=>new DataView(e,0).getUint32(t,!0),Int32:(e,t)=>new DataView(e,0).getInt32(t,!0)};function m(e){return w.hasOwnProperty(e)}function C(e){return m(e)?w[e].BYTES_PER_ELEMENT:0}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[61],{5682:(e,t,o)=>{o.d(t,{s1:()=>c});var r=o(43773),n=(o(4576),o(49186),o(44208),o(58083),o(9093)),i=(o(38954),o(51850)),s=(o(91218),o(16930),o(27993),o(19419));o(97937),o(30524),o(61956);var a=o(59418);o(73941),o(48353),o(68197);var u=o(91829);(0,u.fA)(0,0,0,.2);(0,u.fA)(0,0,0,.2),o(34727);var l=o(57005);async function c(e,t,o,n,i,s,u,l){const c=[];for(const r of t)if(r&&i.includes(r.name)){const t=`${e}/nodes/${o}/attributes/${r.key}/0`;c.push({url:t,storageInfo:r})}const d=await Promise.allSettled(c.map(e=>(0,r.A)(e.url,{responseType:"array-buffer",query:{...u,token:s},signal:l?.signal}).then(t=>(0,a.m0)(e.storageInfo,t.data)))),p=[];for(const e of n){const t={};for(let o=0;o<d.length;o++){const r=d[o];if("fulfilled"===r.status){const n=r.value;t[c[o].storageInfo.name]=(0,a.E5)(n,e)}}p.push(t)}return p}o(63201),(0,s.vt)(),(0,i.vt)(),(0,i.vt)(),(0,i.vt)(),(0,i.vt)(),(0,i.vt)(),(0,i.vt)(),(0,i.vt)(),(0,i.vt)(),(0,s.vt)(),(0,s.vt)(),new l.ab,(0,i.vt)(),new Array(72),(0,n.vt)()},37203:(e,t,o)=>{o.d(t,{Ax:()=>b,Me:()=>l,mb:()=>y});var r=o(49186);const n=!0,i={identifierOffset:0,identifierLength:10,versionOffset:10,checksumOffset:12,byteCount:16};function s(e,t,o){return{identifier:String.fromCharCode.apply(null,new Uint8Array(e,o+i.identifierOffset,i.identifierLength)),version:t.getUint16(o+i.versionOffset,n),checksum:t.getUint32(o+i.checksumOffset,n)}}const a={sizeLo:0,sizeHi:4,minX:8,minY:16,minZ:24,maxX:32,maxY:40,maxZ:48,errorX:56,errorY:64,errorZ:72,count:80,reserved:84,byteCount:88};function u(e,t){return{sizeLo:e.getUint32(t+a.sizeLo,n),sizeHi:e.getUint32(t+a.sizeHi,n),minX:e.getFloat64(t+a.minX,n),minY:e.getFloat64(t+a.minY,n),minZ:e.getFloat64(t+a.minZ,n),maxX:e.getFloat64(t+a.maxX,n),maxY:e.getFloat64(t+a.maxY,n),maxZ:e.getFloat64(t+a.maxZ,n),errorX:e.getFloat64(t+a.errorX,n),errorY:e.getFloat64(t+a.errorY,n),errorZ:e.getFloat64(t+a.errorZ,n),count:e.getUint32(t+a.count,n),reserved:e.getUint32(t+a.reserved,n)}}function l(e){const t=new DataView(e,0);let o=0;const{identifier:n,version:l}=s(e,t,o);if(o+=i.byteCount,"LEPCC "!==n)throw new r.A("lepcc-decode-error","Bad identifier");if(l>1)throw new r.A("lepcc-decode-error","Unknown version");const d=u(t,o);if(o+=a.byteCount,d.sizeHi*2**32+d.sizeLo!==e.byteLength)throw new r.A("lepcc-decode-error","Bad size");const p=new Float64Array(3*d.count),f=[],y=[],g=[],h=[];if(o=c(e,o,f),o=c(e,o,y),o=c(e,o,g),o=c(e,o,h),o!==e.byteLength)throw new r.A("lepcc-decode-error","Bad length");let b=0,w=0;for(let e=0;e<f.length;e++){w+=f[e];let t=0;for(let o=0;o<y[e];o++){t+=g[b];const e=h[b];p[3*b]=Math.min(d.maxX,d.minX+2*d.errorX*t),p[3*b+1]=Math.min(d.maxY,d.minY+2*d.errorY*w),p[3*b+2]=Math.min(d.maxZ,d.minZ+2*d.errorZ*e),b++}}return{errorX:d.errorX,errorY:d.errorY,errorZ:d.errorZ,result:p}}function c(e,t,o){const r=[];t=d(e,t,r);const n=[];for(let i=0;i<r.length;i++){n.length=0,t=d(e,t,n);for(let e=0;e<n.length;e++)o.push(n[e]+r[i])}return t}function d(e,t,o){const i=new DataView(e,t),s=i.getUint8(0),a=31&s,u=!!(32&s),l=(192&s)>>6;let c=0;if(0===l)c=i.getUint32(1,n),t+=5;else if(1===l)c=i.getUint16(1,n),t+=3;else{if(2!==l)throw new r.A("lepcc-decode-error","Bad count type");c=i.getUint8(1),t+=2}if(u)throw new r.A("lepcc-decode-error","LUT not implemented");const d=Math.ceil(c*a/8),p=new Uint8Array(e,t,d);let f=0,y=0,g=0;const h=-1>>>32-a;for(let e=0;e<c;e++){for(;y<a;)f|=p[g]<<y,y+=8,g+=1;o[e]=f&h,f>>>=a,y-=a,y+a>32&&(f|=p[g-1]>>8-y)}return t+g}const p={sizeLo:0,sizeHi:4,count:8,colorMapCount:12,lookupMethod:14,compressionMethod:15,byteCount:16};function f(e,t){return{sizeLo:e.getUint32(t+p.sizeLo,n),sizeHi:e.getUint32(t+p.sizeHi,n),count:e.getUint32(t+p.count,n),colorMapCount:e.getUint16(t+p.colorMapCount,n),lookupMethod:e.getUint8(t+p.lookupMethod),compressionMethod:e.getUint8(t+p.compressionMethod)}}function y(e){const t=new DataView(e,0);let o=0;const{identifier:n,version:a}=s(e,t,o);if(o+=i.byteCount,"ClusterRGB"!==n)throw new r.A("lepcc-decode-error","Bad identifier");if(a>1)throw new r.A("lepcc-decode-error","Unknown version");const u=f(t,o);if(o+=p.byteCount,u.sizeHi*2**32+u.sizeLo!==e.byteLength)throw new r.A("lepcc-decode-error","Bad size");if((2===u.lookupMethod||1===u.lookupMethod)&&0===u.compressionMethod){if(3*u.colorMapCount+u.count+o!==e.byteLength||u.colorMapCount>256)throw new r.A("lepcc-decode-error","Bad count");const t=new Uint8Array(e,o,3*u.colorMapCount),n=new Uint8Array(e,o+3*u.colorMapCount,u.count),i=new Uint8Array(3*u.count);for(let e=0;e<u.count;e++){const o=n[e];i[3*e]=t[3*o],i[3*e+1]=t[3*o+1],i[3*e+2]=t[3*o+2]}return i}if(0===u.lookupMethod&&0===u.compressionMethod){if(3*u.count+o!==e.byteLength||0!==u.colorMapCount)throw new r.A("lepcc-decode-error","Bad count");return new Uint8Array(e,o).slice()}if(u.lookupMethod<=2&&1===u.compressionMethod){if(o+3!==e.byteLength||1!==u.colorMapCount)throw new r.A("lepcc-decode-error","Bad count");const n=t.getUint8(o),i=t.getUint8(o+1),s=t.getUint8(o+2),a=new Uint8Array(3*u.count);for(let e=0;e<u.count;e++)a[3*e]=n,a[3*e+1]=i,a[3*e+2]=s;return a}throw new r.A("lepcc-decode-error","Bad method "+u.lookupMethod+","+u.compressionMethod)}const g={sizeLo:0,sizeHi:4,count:8,scaleFactor:12,bitsPerPoint:14,reserved:15,byteCount:16};function h(e,t){return{sizeLo:e.getUint32(t+g.sizeLo,n),sizeHi:e.getUint32(t+g.sizeHi,n),count:e.getUint32(t+g.count,n),scaleFactor:e.getUint16(t+g.scaleFactor,n),bitsPerPoint:e.getUint8(t+g.bitsPerPoint),reserved:e.getUint8(t+g.reserved)}}function b(e){const t=new DataView(e,0);let o=0;const{identifier:n,version:a}=s(e,t,o);if(o+=i.byteCount,"Intensity "!==n)throw new r.A("lepcc-decode-error","Bad identifier");if(a>1)throw new r.A("lepcc-decode-error","Unknown version");const u=h(t,o);if(o+=g.byteCount,u.sizeHi*2**32+u.sizeLo!==e.byteLength)throw new r.A("lepcc-decode-error","Bad size");const l=new Uint16Array(u.count);if(8===u.bitsPerPoint){if(u.count+o!==e.byteLength)throw new r.A("lepcc-decode-error","Bad size");const t=new Uint8Array(e,o,u.count);for(let e=0;e<u.count;e++)l[e]=t[e]*u.scaleFactor}else if(16===u.bitsPerPoint){if(2*u.count+o!==e.byteLength)throw new r.A("lepcc-decode-error","Bad size");const t=new Uint16Array(e,o,u.count);for(let e=0;e<u.count;e++)l[e]=t[e]*u.scaleFactor}else{const t=[];if(d(e,o,t)!==e.byteLength)throw new r.A("lepcc-decode-error","Bad size");for(let e=0;e<u.count;e++)l[e]=t[e]*u.scaleFactor}return l}},37352:(e,t,o)=>{o.d(t,{A:()=>l});var r,n=o(31635),i=o(7762),s=o(25482),a=o(10107),u=(o(44208),o(53966),o(87811),o(64108));let l=r=class extends s.o{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new i.A}clone(){return new r({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,n.Cg)([(0,a.MZ)({type:String,json:{write:{isRequired:!0}}})],l.prototype,"floorField",void 0),(0,n.Cg)([(0,a.MZ)({json:{read:!1,write:!1}})],l.prototype,"viewAllMode",void 0),(0,n.Cg)([(0,a.MZ)({json:{read:!1,write:!1}})],l.prototype,"viewAllLevelIds",void 0),l=r=(0,n.Cg)([(0,u.$)("esri.layers.support.LayerFloorInfo")],l)},45671:(e,t,o)=>{o.d(t,{D8:()=>i,TO:()=>n});var r=o(30524);async function n(e,t=e.popupTemplate){if(null==t)return[];const o=await t.getRequiredFields(e.fieldsIndex),{lastEditInfoEnabled:n}=t,{objectIdField:i,typeIdField:s,globalIdField:a,relationships:u}=e;if(o.includes("*"))return["*"];const l=n?(0,r.eX)(e):[],c=(0,r.DB)(e.fieldsIndex,[...o,...l]);return s&&c.push(s),c&&i&&e.fieldsIndex?.has(i)&&!c.includes(i)&&c.push(i),c&&a&&e.fieldsIndex?.has(a)&&!c.includes(a)&&c.push(a),u?.forEach(t=>{const{keyField:o}=t;c&&o&&e.fieldsIndex?.has(o)&&!c.includes(o)&&c.push(o)}),c}function i(e,t){return e&&"object"==typeof e?t?.checkPopupEnabled&&"popupEnabled"in e&&!e.popupEnabled?null:"popupTemplate"in e&&e.popupTemplate?e.popupTemplate:null!=t&&t.defaultPopupTemplateEnabled&&"defaultPopupTemplate"in e&&e.defaultPopupTemplate?e.defaultPopupTemplate:null:null}},50805:(e,t,o)=>{o.d(t,{L0:()=>b,Ot:()=>f,W4:()=>u,uV:()=>d});var r=o(31635),n=o(25482),i=o(10107),s=(o(44208),o(53966),o(87811),o(93223)),a=o(64108);let u=class extends n.o{constructor(){super(...arguments),this.nodesPerPage=null,this.rootIndex=0,this.lodSelectionMetricType=null}};(0,r.Cg)([(0,i.MZ)({type:Number})],u.prototype,"nodesPerPage",void 0),(0,r.Cg)([(0,i.MZ)({type:Number})],u.prototype,"rootIndex",void 0),(0,r.Cg)([(0,i.MZ)({type:String})],u.prototype,"lodSelectionMetricType",void 0),u=(0,r.Cg)([(0,a.$)("esri.layers.support.I3SLayerDefinitions.I3SNodePageDefinition")],u);let l=class extends n.o{constructor(){super(...arguments),this.factor=1}};(0,r.Cg)([(0,i.MZ)({type:Number,json:{read:{source:"textureSetDefinitionId"}}})],l.prototype,"id",void 0),(0,r.Cg)([(0,i.MZ)({type:Number})],l.prototype,"factor",void 0),l=(0,r.Cg)([(0,a.$)("esri.layers.support.I3SLayerDefinitions.I3SMaterialTexture")],l);let c=class extends n.o{constructor(){super(...arguments),this.baseColorFactor=[1,1,1,1],this.baseColorTexture=null,this.metallicRoughnessTexture=null,this.metallicFactor=1,this.roughnessFactor=1}};(0,r.Cg)([(0,i.MZ)({type:[Number]})],c.prototype,"baseColorFactor",void 0),(0,r.Cg)([(0,i.MZ)({type:l})],c.prototype,"baseColorTexture",void 0),(0,r.Cg)([(0,i.MZ)({type:l})],c.prototype,"metallicRoughnessTexture",void 0),(0,r.Cg)([(0,i.MZ)({type:Number})],c.prototype,"metallicFactor",void 0),(0,r.Cg)([(0,i.MZ)({type:Number})],c.prototype,"roughnessFactor",void 0),c=(0,r.Cg)([(0,a.$)("esri.layers.support.I3SLayerDefinitions.I3SMaterialPBRMetallicRoughness")],c);let d=class extends n.o{constructor(){super(...arguments),this.alphaMode="opaque",this.alphaCutoff=.25,this.doubleSided=!1,this.cullFace="none",this.normalTexture=null,this.occlusionTexture=null,this.emissiveTexture=null,this.emissiveFactor=null,this.pbrMetallicRoughness=null}};(0,r.Cg)([(0,s.e)({opaque:"opaque",mask:"mask",blend:"blend"})],d.prototype,"alphaMode",void 0),(0,r.Cg)([(0,i.MZ)({type:Number})],d.prototype,"alphaCutoff",void 0),(0,r.Cg)([(0,i.MZ)({type:Boolean})],d.prototype,"doubleSided",void 0),(0,r.Cg)([(0,s.e)({none:"none",back:"back",front:"front"})],d.prototype,"cullFace",void 0),(0,r.Cg)([(0,i.MZ)({type:l})],d.prototype,"normalTexture",void 0),(0,r.Cg)([(0,i.MZ)({type:l})],d.prototype,"occlusionTexture",void 0),(0,r.Cg)([(0,i.MZ)({type:l})],d.prototype,"emissiveTexture",void 0),(0,r.Cg)([(0,i.MZ)({type:[Number]})],d.prototype,"emissiveFactor",void 0),(0,r.Cg)([(0,i.MZ)({type:c})],d.prototype,"pbrMetallicRoughness",void 0),d=(0,r.Cg)([(0,a.$)("esri.layers.support.I3SLayerDefinitions.I3SMaterialDefinition")],d);let p=class extends n.o{};(0,r.Cg)([(0,i.MZ)({type:String,json:{read:{source:["name","index"],reader:(e,t)=>null!=e?e:`${t.index}`}}})],p.prototype,"name",void 0),(0,r.Cg)([(0,s.e)({jpg:"jpg",png:"png",dds:"dds","ktx-etc2":"ktx-etc2",ktx2:"ktx2",basis:"basis"})],p.prototype,"format",void 0),p=(0,r.Cg)([(0,a.$)("esri.layers.support.I3SLayerDefinitions.I3STextureFormat")],p);let f=class extends n.o{constructor(){super(...arguments),this.atlas=!1}};(0,r.Cg)([(0,i.MZ)({type:[p]})],f.prototype,"formats",void 0),(0,r.Cg)([(0,i.MZ)({type:Boolean})],f.prototype,"atlas",void 0),f=(0,r.Cg)([(0,a.$)("esri.layers.support.I3SLayerDefinitions.I3STextureSetDefinition")],f);let y=class extends n.o{};(0,r.Cg)([(0,s.e)({Float32:"Float32",UInt64:"UInt64",UInt32:"UInt32",UInt16:"UInt16",UInt8:"UInt8"})],y.prototype,"type",void 0),(0,r.Cg)([(0,i.MZ)({type:Number})],y.prototype,"component",void 0),y=(0,r.Cg)([(0,a.$)("esri.layers.support.I3SLayerDefinitions.I3SGeometryAttribute")],y);let g=class extends n.o{};(0,r.Cg)([(0,s.e)({draco:"draco"})],g.prototype,"encoding",void 0),(0,r.Cg)([(0,i.MZ)({type:[String]})],g.prototype,"attributes",void 0),g=(0,r.Cg)([(0,a.$)("esri.layers.support.I3SLayerDefinitions.I3SGeometryCompressedAttributes")],g);let h=class extends n.o{constructor(){super(...arguments),this.offset=0}};(0,r.Cg)([(0,i.MZ)({type:Number})],h.prototype,"offset",void 0),(0,r.Cg)([(0,i.MZ)({type:y})],h.prototype,"position",void 0),(0,r.Cg)([(0,i.MZ)({type:y})],h.prototype,"normal",void 0),(0,r.Cg)([(0,i.MZ)({type:y})],h.prototype,"uv0",void 0),(0,r.Cg)([(0,i.MZ)({type:y})],h.prototype,"color",void 0),(0,r.Cg)([(0,i.MZ)({type:y})],h.prototype,"uvRegion",void 0),(0,r.Cg)([(0,i.MZ)({type:y})],h.prototype,"featureId",void 0),(0,r.Cg)([(0,i.MZ)({type:y})],h.prototype,"faceRange",void 0),(0,r.Cg)([(0,i.MZ)({type:g})],h.prototype,"compressedAttributes",void 0),h=(0,r.Cg)([(0,a.$)("esri.layers.support.I3SLayerDefinitions.I3SGeometryBuffer")],h);let b=class extends n.o{};(0,r.Cg)([(0,s.e)({triangle:"triangle"})],b.prototype,"topology",void 0),(0,r.Cg)([(0,i.MZ)()],b.prototype,"geometryBuffers",void 0),b=(0,r.Cg)([(0,a.$)("esri.layers.support.I3SLayerDefinitions.I3SGeometryDefinition")],b)},59418:(e,t,o)=>{o.d(t,{wH:()=>g,MA:()=>p,E5:()=>f,m0:()=>b});var r=o(49186),n=o(4718),i=o(53966),s=o(34275),a=o(37203);const u=()=>i.A.getLogger("esri.views.3d.layers.i3s.I3SBinaryReader");function l(e,t,o){let n="",i=0;for(;i<o;){const s=e[t+i];if(s<128)n+=String.fromCharCode(s),i++;else if(s>=192&&s<224){if(i+1>=o)throw new r.A("utf8-decode-error","UTF-8 Decode failed. Two byte character was truncated.");const a=(31&s)<<6|63&e[t+i+1];n+=String.fromCharCode(a),i+=2}else if(s>=224&&s<240){if(i+2>=o)throw new r.A("utf8-decode-error","UTF-8 Decode failed. Multi byte character was truncated.");const a=(15&s)<<12|(63&e[t+i+1])<<6|63&e[t+i+2];n+=String.fromCharCode(a),i+=3}else{if(!(s>=240&&s<248))throw new r.A("utf8-decode-error","UTF-8 Decode failed. Invalid multi byte sequence.");{if(i+3>=o)throw new r.A("utf8-decode-error","UTF-8 Decode failed. Multi byte character was truncated.");const a=(7&s)<<18|(63&e[t+i+1])<<12|(63&e[t+i+2])<<6|63&e[t+i+3];if(a>=65536){const e=55296+(a-65536>>10),t=56320+(1023&a);n+=String.fromCharCode(e,t)}else n+=String.fromCharCode(a);i+=4}}}return n}function c(e,t){const o={byteOffset:0,byteCount:0,fields:Object.create(null)};let r=0;for(let n=0;n<t.length;n++){const i=t[n],s=i.valueType||i.type,a=v[s];o.fields[i.property]=a(e,r),r+=w[s].BYTES_PER_ELEMENT}return o.byteCount=r,o}function d(e,t,o){const n=[];let i,s,a=0;for(s=0;s<e;s+=1){if(i=t[s],i>0){if(n.push(l(o,a,i-1)),0!==o[a+i-1])throw new r.A("string-array-error","Invalid string array: missing null termination.")}else n.push(null);a+=i}return n}function p(e,t){return new(0,w[t.valueType])(e,t.byteOffset,t.count*t.valuesPerElement)}function f(e,t){if(!e)return null;const o=e[t];return(0,s.IY)(e)?o===s.PI?null:o:(0,s._G)(e)?o===s.h2?null:o:o!=o?null:o}function y(e,t,o){if(t!==e&&u().error(`Invalid ${o} buffer size\n expected: ${e}, actual: ${t})`),t<e)throw new r.A("buffer-too-small","Binary buffer is too small",{expectedSize:e,actualSize:t})}function g(e,t){const o=c(e,t&&t.header);let r=o.byteCount;const n={isDraco:!1,header:o,byteOffset:o.byteCount,byteCount:0,vertexAttributes:{}},i=o.fields,s=null!=i.vertexCount?i.vertexCount:i.count;for(const e of t.ordering){if(!t.vertexAttributes[e])continue;const o={...t.vertexAttributes[e],byteOffset:r,count:s},i=h[e]||"_"+e;n.vertexAttributes[i]=o,r+=C(o.valueType)*o.valuesPerElement*s}const a=i.faceCount;if(t.faces&&a){n.faces={};for(const e of t.ordering){if(!t.faces[e])continue;const o={...t.faces[e],byteOffset:r,count:a};n.faces[e]=o,r+=C(o.valueType)*o.valuesPerElement*a}}const u=i.featureCount;if(t.featureAttributes&&t.featureAttributeOrder&&u){n.featureAttributes={};for(const e of t.featureAttributeOrder){if(!t.featureAttributes[e])continue;const o={...t.featureAttributes[e],byteOffset:r,count:u};n.featureAttributes[e]=o,r+=("UInt64"===o.valueType?8:C(o.valueType))*o.valuesPerElement*u}}return y(r,e.byteLength,"geometry"),n.byteCount=r-n.byteOffset,n}const h={position:"position",normal:"normal",color:"color",uv0:"uv0",region:"uvRegion"};function b(e,t,o,i=!1){if("lepcc-rgb"===e.encoding)return i?(0,a.mb)(t):function(e){return Array.isArray(e)?e.length<s.y9?e:new Uint8Array(e):e.length<s.y9?Array.from(e):e}((0,a.mb)(t));if("lepcc-intensity"===e.encoding)return i?(0,a.Ax)(t):function(e){return Array.isArray(e)?e.length<s.y9?e:new Uint16Array(e):e.length<s.y9?Array.from(e):e}((0,a.Ax)(t));if(null!=e.encoding&&""!==e.encoding)throw new r.A("unknown-attribute-storage-info-encoding","Unknown Attribute Storage Info Encoding");e["attributeByteCounts "]&&!e.attributeByteCounts&&(u().warn("Warning: Trailing space in 'attributeByteCounts '."),e.attributeByteCounts=e["attributeByteCounts "]),"ObjectIds"===e.ordering[0]&&e.hasOwnProperty("objectIds")&&(u().warn("Warning: Case error in objectIds"),e.ordering[0]="objectIds");const l=function(e,t,o){const i=null!=t.header?c(e,t.header):{byteOffset:0,byteCount:0,fields:{count:o}},s={header:i,byteOffset:i.byteCount,byteCount:0,entries:Object.create(null)};let a=i.byteCount;for(let e=0;e<t.ordering.length;e++){const o=t.ordering[e],u=(0,n.o8)(t[o]);if(u.count=i.fields.count??0,"String"===u.valueType){if(u.byteOffset=a,u.byteCount=i.fields[o+"ByteCount"],"UTF-8"!==u.encoding)throw new r.A("unsupported-encoding","Unsupported String encoding.",{encoding:u.encoding});if(u.timeEncoding&&"ECMA_ISO8601"!==u.timeEncoding)throw new r.A("unsupported-time-encoding","Unsupported time encoding.",{timeEncoding:u.timeEncoding})}else{if(!m(u.valueType))throw new r.A("unsupported-value-type","Unsupported binary valueType",{valueType:u.valueType});{const e=C(u.valueType);a+=a%e!==0?e-a%e:0,u.byteOffset=a,u.byteCount=e*u.valuesPerElement*u.count}}a+=u.byteCount??0,s.entries[o]=u}return s.byteCount=a-s.byteOffset,s}(t,e,o);y(l.byteOffset+l.byteCount,t.byteLength,"attribute");const g=l.entries.attributeValues||l.entries.objectIds;if(g){if("String"===g.valueType){const e=l.entries.attributeByteCounts,o=p(t,e),r=function(e,t){return new Uint8Array(e,t.byteOffset,t.byteCount)}(t,g);return g.timeEncoding?function(e,t,o){return d(e,t,o).map(e=>{const t=e?Date.parse(e):null;return null==t||Number.isNaN(t)?null:t})}(e.count,o,r):d(e.count,o,r)}return i?p(t,g):function(e,t){const o=p(e,t);if(o.length>=s.y9)return o;const r=new Array;return o.forEach((e,t)=>r.push(f(o,t))),r}(t,g)}throw new r.A("bad-attribute-storage-info","Bad attributeStorageInfo specification.")}const w={Float32:Float32Array,Float64:Float64Array,UInt8:Uint8Array,Int8:Int8Array,UInt16:Uint16Array,Int16:Int16Array,UInt32:Uint32Array,Int32:Int32Array},v={Float32:(e,t)=>new DataView(e,0).getFloat32(t,!0),Float64:(e,t)=>new DataView(e,0).getFloat64(t,!0),UInt8:(e,t)=>new DataView(e,0).getUint8(t),Int8:(e,t)=>new DataView(e,0).getInt8(t),UInt16:(e,t)=>new DataView(e,0).getUint16(t,!0),Int16:(e,t)=>new DataView(e,0).getInt16(t,!0),UInt32:(e,t)=>new DataView(e,0).getUint32(t,!0),Int32:(e,t)=>new DataView(e,0).getInt32(t,!0)};function m(e){return w.hasOwnProperty(e)}function C(e){return m(e)?w[e].BYTES_PER_ELEMENT:0}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5369],{159:(e,t,n)=>{n.d(t,{A:()=>u});var i,s=n(31635),r=n(69622),o=n(10107),a=(n(44208),n(53966),n(87811),n(64108)),l=n(99157);let u=i=class extends r.A{constructor(e){super(e),this.steps=[]}getInverse(){const e=new i;for(let t=this.steps.length-1;t>=0;t--){const n=this.steps[t];e.steps.push(n.getInverse())}return e}};(0,s.Cg)([(0,o.MZ)({type:[l.A],nonNullable:!0})],u.prototype,"steps",void 0),u=i=(0,s.Cg)([(0,a.$)("esri.geometry.operators.support.GeographicTransformation")],u)},9762:(e,t,n)=>{n.r(t),n.d(t,{projectBuffer:()=>s});var i=n(37539);function s(e,t,n,s,r,o,a=Math.floor(e.length/3)){const l=(0,i.jd)(t,r);if(null==l)return!1;if(l===i.pO){if(e===s&&n===o)return!0;const t=n+3*a;for(let i=n,r=o;i<t;i++,r++)s[r]=e[i];return!0}const u=n+3*a;for(let t=n,i=o;t<u;t+=3,i+=3)l(e,t,s,i);return!0}},37539:(e,t,n)=>{n.d(t,{pO:()=>h,jd:()=>d,Tp:()=>f,w5:()=>p});var i=n(34727),s=n(83047),r=n(73941),o=n(79258);Math.PI;const a=o.$O.radius,l=o.$O.eccentricitySquared,u={a1:a*l,a2:a*l*a*l,a3:a*l*l/2,a4:a*l*a*l*2.5,a5:a*l+a*l*l/2,a6:1-l};o.$O.radius,o.$O.flattening,o.Sw.radius,o.Sw.flattening,o.sH.radius,o.sH.flattening,o.sH.radius;var c=n(21325);const p={2:{5:h,7:null,9:null,10:h,1:I,6:null,8:null,0:null,3:v,11:y,2:h,4:D},5:{5:h,7:null,9:null,10:h,1:I,6:null,8:null,0:null,3:v,11:y,2:h,4:D},7:{5:null,7:h,9:null,10:h,1:null,6:C,8:null,0:null,3:null,11:null,2:null,4:null},9:{5:null,7:null,9:h,10:h,1:null,6:null,8:b,0:null,3:null,11:null,2:null,4:null},3:{5:g,7:null,9:null,10:g,1:function(e,t,n,i){const s=e[t]/V,r=N-2*Math.atan(Math.exp(-e[t+1]/V)),o=V+e[t+2],a=Math.cos(r)*o;n[i]=Math.cos(s)*a,n[i+1]=Math.sin(s)*a,n[i+2]=Math.sin(r)*o},6:null,8:null,0:null,3:h,11:function(e,t,n,i){g(e,t,n,i),y(n,i,n,i)},2:g,4:function(e,t,n,i){g(e,t,n,i),D(n,i,n,i)}},4:{5:T,7:null,9:null,10:T,1:function(e,t,n,i){T(e,t,n,i),I(n,i,n,i)},6:null,8:null,0:null,3:function(e,t,n,i){T(e,t,n,i),v(n,i,n,i)},11:function(e,t,n,i){T(e,t,n,i),y(n,i,n,i)},2:T,4:h},1:{5:R,7:null,9:null,10:R,1:h,6:null,8:null,0:null,3:function(e,t,n,i){R(e,t,n,i),v(n,i,n,i)},11:function(e,t,n,i){R(e,t,n,i),y(n,i,n,i)},2:R,4:function(e,t,n,i){R(e,t,n,i),D(n,i,n,i)}},6:{5:null,7:M,9:null,10:M,1:null,6:h,8:null,0:null,3:null,11:null,2:null,4:null},8:{5:null,7:null,9:A,10:A,1:null,6:null,8:h,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:h,3:null,11:null,2:null,4:null},10:{5:h,7:h,9:h,10:h,1:I,6:C,8:b,0:null,3:v,11:y,2:h,4:D},11:{5:w,7:null,9:null,10:w,1:function(e,t,n,i){w(e,t,n,i),I(n,i,n,i)},6:null,8:null,0:null,3:function(e,t,n,i){w(e,t,n,i),v(n,i,n,i)},11:h,2:w,4:function(e,t,n,i){w(e,t,n,i),D(n,i,n,i)}}};function d(e,t){return f(e,t)?.projector}function f(e,t){if(null==e||null==t)return null;if(P.source.spatialReference===e&&P.dest.spatialReference===t)return P;const n=m(e,P.source),i=m(t,P.dest);return 0===n&&0===i?(0,c.aI)(e,t)?P.projector=h:P.projector=null:P.projector=p[n][i],P}function m(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 h(e,t,n,i){e!==n&&(n[i++]=e[t++],n[i++]=e[t++],n[i]=e[t])}function g(e,t,n,i){n[i]=O*(e[t]/V),n[i+1]=O*(N-2*Math.atan(Math.exp(-e[t+1]/V))),n[i+2]=e[t+2]}function v(e,t,n,s){!function(e,t,n,s,r){const o=.4999999*Math.PI,a=(0,i.qE)(L*e[t+1],-o,o),l=Math.sin(a);n[s++]=L*e[t]*r.radius,n[s++]=r.halfSemiMajorAxis*Math.log((1+l)/(1-l)),n[s]=e[t+2]}(e,t,n,s,o.$O)}function y(e,t,n,i){n[i]=e[t]*$,n[i+1]=e[t+1]*$,n[i+2]=e[t+2]}function w(e,t,n,i){n[i]=e[t]*E,n[i+1]=e[t+1]*E,n[i+2]=e[t+2]}function x(e,t,n,i,s){const r=s+e[t+2],o=L*e[t+1],a=L*e[t],l=Math.cos(o)*r;n[i]=Math.cos(a)*l,n[i+1]=Math.sin(a)*l,n[i+2]=Math.sin(o)*r}function b(e,t,n,i){x(e,t,n,i,o.Sw.radius)}function C(e,t,n,i){x(e,t,n,i,o.sH.radius)}function I(e,t,n,i){x(e,t,n,i,o.$O.radius)}function S(e,t,n,s,r){const o=e[t],a=e[t+1],l=e[t+2],u=Math.sqrt(o*o+a*a+l*l),c=(0,i.YN)(l/(0===u?1:u)),p=Math.atan2(a,o);n[s++]=O*p,n[s++]=O*c,n[s]=u-r}function A(e,t,n,i){S(e,t,n,i,o.Sw.radius)}function M(e,t,n,i){S(e,t,n,i,o.sH.radius)}function R(e,t,n,i){S(e,t,n,i,o.$O.radius)}function D(e,t,n,i){!function(e,t,n,i,s){const r=L*e[t],o=L*e[t+1],a=e[t+2],l=Math.sin(o),u=Math.cos(o),c=s.radius/Math.sqrt(1-s.eccentricitySquared*l*l);n[i++]=(c+a)*u*Math.cos(r),n[i++]=(c+a)*u*Math.sin(r),n[i++]=(c*(1-s.eccentricitySquared)+a)*l}(e,t,n,i,o.$O)}function T(e,t,n,i){const s=u,r=e[t],a=e[t+1],l=e[t+2];let c,p,d,f,m,h,g,v,y,w,x,b,C,I,S,A,M,R,D,T,P;c=Math.abs(l),p=r*r+a*a,d=Math.sqrt(p),f=p+l*l,m=Math.sqrt(f),T=Math.atan2(a,r),h=l*l/f,g=p/f,I=s.a2/m,S=s.a3-s.a4/m,g>.3?(v=c/m*(1+g*(s.a1+I+h*S)/m),D=Math.asin(v),w=v*v,y=Math.sqrt(1-w)):(y=d/m*(1-h*(s.a5-I-g*S)/m),D=Math.acos(y),w=1-y*y,v=Math.sqrt(w)),x=1-o.$O.eccentricitySquared*w,b=o.$O.radius/Math.sqrt(x),C=s.a6*b,I=d-b*y,S=c-C*v,M=y*I+v*S,A=y*S-v*I,R=A/(C/x+M),D+=R,P=M+A*R/2,l<0&&(D=-D),n[i++]=O*T,n[i++]=O*D,n[i]=P}const P={source:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},dest:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},projector:h},L=(0,i.kU)(1),O=(0,i.KJ)(1),N=.5*Math.PI,V=o.$O.radius,$=V*Math.PI/180,E=180/(V*Math.PI)},38458:(e,t,n)=>{n.d(t,{m:()=>s});const i=[[3819,3819],[3821,3824],[3889,3889],[3906,3906],[4001,4025],[4027,4036],[4039,4047],[4052,4055],[4074,4075],[4080,4081],[4120,4176],[4178,4185],[4188,4216],[4218,4289],[4291,4304],[4306,4319],[4322,4326],[4463,4463],[4470,4470],[4475,4475],[4483,4483],[4490,4490],[4555,4558],[4600,4646],[4657,4765],[4801,4811],[4813,4821],[4823,4824],[4901,4904],[5013,5013],[5132,5132],[5228,5229],[5233,5233],[5246,5246],[5252,5252],[5264,5264],[5324,5340],[5354,5354],[5360,5360],[5365,5365],[5370,5373],[5381,5381],[5393,5393],[5451,5451],[5464,5464],[5467,5467],[5489,5489],[5524,5524],[5527,5527],[5546,5546],[2044,2045],[2081,2083],[2085,2086],[2093,2093],[2096,2098],[2105,2132],[2169,2170],[2176,2180],[2193,2193],[2200,2200],[2206,2212],[2319,2319],[2320,2462],[2523,2549],[2551,2735],[2738,2758],[2935,2941],[2953,2953],[3006,3030],[3034,3035],[3038,3051],[3058,3059],[3068,3068],[3114,3118],[3126,3138],[3150,3151],[3300,3301],[3328,3335],[3346,3346],[3350,3352],[3366,3366],[3389,3390],[3416,3417],[3833,3841],[3844,3850],[3854,3854],[3873,3885],[3907,3910],[4026,4026],[4037,4038],[4417,4417],[4434,4434],[4491,4554],[4839,4839],[5048,5048],[5105,5130],[5253,5259],[5269,5275],[5343,5349],[5479,5482],[5518,5519],[5520,5520],[20004,20032],[20064,20092],[21413,21423],[21473,21483],[21896,21899],[22171,22177],[22181,22187],[22191,22197],[25884,25884],[27205,27232],[27391,27398],[27492,27492],[28402,28432],[28462,28492],[30161,30179],[30800,30800],[31251,31259],[31275,31279],[31281,31290],[31466,31700]];function s(e){return null!=e&&i.some(([t,n])=>e>=t&&e<=n)}},62815:(e,t,n)=>{n.d(t,{N:()=>o});var i=n(83047),s=n(73941),r=n(21325);function o(e,t,n){if(null==t||null==n||n.vcsWkid||(0,r.aI)(t,n)||(0,s.xP)(t)||(0,s.xP)(n))return null;const o=(0,i.G9)(t)/(0,i.G9)(n);if(1===o)return null;switch(e){case"point":case"esriGeometryPoint":return e=>function(e,t){null!=e?.z&&(e.z*=t)}(e,o);case"polyline":case"esriGeometryPolyline":return e=>function(e,t){if(e)for(const n of e.paths)for(const e of n)e.length>2&&(e[2]*=t)}(e,o);case"polygon":case"esriGeometryPolygon":return e=>function(e,t){if(e)for(const n of e.rings)for(const e of n)e.length>2&&(e[2]*=t)}(e,o);case"multipoint":case"esriGeometryMultipoint":return e=>function(e,t){if(e)for(const n of e.points)n.length>2&&(n[2]*=t)}(e,o);case"extent":case"esriGeometryEnvelope":return e=>function(e,t){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=t,e.zmax*=t)}(e,o);default:return null}}},88854:(e,t,n)=>{n.r(t),n.d(t,{default:()=>Ae});var i=n(31635),s=n(37838),r=n(69540),o=n(49186),a=n(25728),l=n(74887),u=n(36708),c=n(10107),p=(n(44208),n(53966)),d=(n(87811),n(64108)),f=n(89808),m=n(99959);const h=Symbol("isWCSGraphicOrigin");var g;class v extends m.A{get[(g=h,f.Q)](){return this.layer}constructor(e){super(),this[g]=!0,this.type="wcs",this.layer=e}get id(){return this.layer.id}}var y=n(4146),w=n(63074),x=n(69208),b=n(89015),C=n(16131),I=n(8303),S=n(63660),A=n(54310),M=n(25036),R=n(82935),D=n(10873),T=n(20437),P=n(74797),L=n(5443),O=n(38458),N=n(78888),V=n(50103);function $(e){return e.endsWith("?")?e.slice(0,-1):e}function E(e){return e.filter(({coverageSubType:e})=>null==e||""===e||/^rectified(grid|dataset)/i.test(e))}function k(e){const t={};for(let n=0;n<e.childNodes.length;n++){const i=e.childNodes[n];if(1!==i.nodeType)continue;const s=(0,V.vv)(i).toLowerCase();switch(s){case"title":case"abstract":t[s]=(0,V.mX)(i);break;case"identifier":t.id=(0,V.mX)(i);break;case"wgs84boundingbox":{const e=(0,V.pN)(i,"LowerCorner"),n=(0,V.pN)(i,"UpperCorner");t.lonLatEnvelope=new L.A({xmin:e[0],ymin:e[1],xmax:n[0],ymax:n[1],spatialReference:{wkid:4326}})}break;case"coveragesummary":t.coverageSummaries=t.coverageSummaries||[],t.coverageSummaries.push(k(i))}}return t}function j(e,t){if(e.coverageSummaries)for(let n=0;n<e.coverageSummaries.length;n++)e.coverageSummaries[n].abstract=e.coverageSummaries[n].abstract||e.abstract,e.coverageSummaries[n].lonLatEnvelope=e.coverageSummaries[n].lonLatEnvelope||e.lonLatEnvelope,e.coverageSummaries[n].title=e.coverageSummaries[n].title||e.title,j(e.coverageSummaries[n],t);null!=e.id&&t.push(e)}function G(e){const t=(0,V.V6)(e.querySelector("Operation[name=GetCapabilities]"),"Get")?.getAttribute("xlink:href")||"",n=(0,V.V6)(e.querySelector("Operation[name=DescribeCoverage]"),"Get")?.getAttribute("xlink:href")||"",i=(0,V.V6)(e.querySelector("Operation[name=GetCoverage]"),"Get")?.getAttribute("xlink:href")||"";return{getCapabilities:$(t),describeCoverage:$(n),getCoverage:$(i)}}function X(e,t=null){let n=null;n="string"==typeof e?(new DOMParser).parseFromString(e,"text/xml"):e;let i=n.documentElement.getAttribute("version");"1.0"===i?i="1.0.0":"1.1"===i&&(i="1.1.0");const s=i||t||"1.0.0",r=s.slice(0,3);let a;if("2.0"===r)a=function(e){const t=(0,V.V6)(e,"ServiceIdentification"),n=(0,V.mX)(t,"Title"),i=(0,V.Dy)(t,"ServiceTypeVersion"),s=(0,V.Dy)(t,"Profile"),r=G((0,V.V6)(e,"OperationsMetadata")),o=(0,V.IC)(e,"Contents/CoverageSummary"),a=[];for(let e=0;e<o.length;e++){const t=o[e],n=(0,V.mX)(t,"CoverageId"),i=(0,V.V6)(t,"WGS84BoundingBox");let s;if(i){const e=(0,V.pN)(i,"LowerCorner"),t=(0,V.pN)(i,"UpperCorner");s=new L.A({xmin:e[0],ymin:e[1],xmax:t[0],ymax:t[1],spatialReference:{wkid:4326}})}const r=(0,V.mX)(t,"CoverageSubtype")||"RectifiedGridCoverage";a.push({id:n,lonLatEnvelope:s,coverageSubType:r})}const l=(0,V.V6)(e,"ServiceMetadata");return{name:n,supportedVersions:i,supportedFormats:(0,V.Dy)(l,"formatSupported"),supportedInterpolations:(0,V.Dy)(l,"interpolationSupported").concat((0,V.Dy)(l,"InterpolationSupported")),onlineResources:r,profiles:s,coverages:a,gridCoverages:E(a),version:"2.0.1"}}(n);else if("1.1"===r)a=function(e){const t=(0,V.mX)(e,"ServiceIdentification/Title"),n=(0,V.Dy)(e,"ServiceIdentification/ServiceTypeVersion"),i=G((0,V.V6)(e,"OperationsMetadata")),s=[],r=(0,V.V6)(e,"Contents");for(let e=0;e<r.childNodes.length;e++){const t=r.childNodes[e];1===t.nodeType&&(0,V.g7)(t,"CoverageSummary")&&j(k(t),s)}const o=(0,V.Dy)(r,"SupportedFormat");return{name:t,onlineResources:i,coverages:s,gridCoverages:E(s),supportedVersions:n,supportedFormats:o,version:"1.1.0"}}(n);else{if("1.0"!==r)throw new o.A("wcsraster:parsecapabilities","the capabilities version is not supported");a=function(e){const t=(0,V.mX)(e,"Service/name"),n=(0,V.V6)(e,"Capability"),i=(0,V.V6)(n,"GetCapabilities/Get/OnlineResource")?.getAttribute("xlink:href")??"",s=(0,V.V6)(n,"DescribeCoverage/Get/OnlineResource")?.getAttribute("xlink:href")??"",r=(0,V.V6)(n,"GetCoverage/Get/OnlineResource")?.getAttribute("xlink:href")??"",o={getCapabilities:$(i),describeCoverage:$(s),getCoverage:$(r)},a=(0,V.IC)(e,"CoverageOfferingBrief"),l=[];for(let e=0;e<a.length;e++){const t=a[e],n=(0,V.mX)(t,"name"),i=(0,V.IC)(t,"pos"),s=(0,V.pN)(i[0]),r=(0,V.pN)(i[1]),o=new L.A({xmin:s[0],ymin:s[1],xmax:r[0],ymax:r[1],spatialReference:{wkid:4326}});l.push({id:n,lonLatEnvelope:o})}return{name:t,onlineResources:o,coverages:l,gridCoverages:E(l),supportedVersions:["1.0.0"],version:"1.0.0"}}(n)}return a.version=s,a}var F=n(39829),W=n(87186),q=n(77301);function Z(e){e.variables.forEach(e=>e.dimensions.forEach(e=>e.values??=(0,q.Xg)(e)))}function B(e){return{requestResponseCRSs:(0,V.Dy)(e,"requestResponseCRSs").map(e=>e.split(":")[1]),nativeCRSs:(0,V.Dy)(e,"nativeCRSs").map(e=>e.split(":")[1])}}function _(e,t){const n=(0,V.Dy)(e,"1.0.0"===t?"interpolationMethod":"InterpolationMethod"),i="1.0.0"===t?e.getAttribute("default"):(0,V.mX)(e,"InterpolationMethods/Default");return null!=i?[i].concat(n.filter(e=>e.toLowerCase()!==i.toLowerCase())):n}function z(e){return null==e?["nearest"]:e.map(e=>{const t=e.toLowerCase();return t.includes("nearest")?"nearest":t.includes("linear")?"bilinear":t.includes("cubic")?"cubic":null}).filter(e=>!!e)}function U(e){const t=(0,V.IC)(e,"pos"),n=(0,V.pN)(t[0]),i=(0,V.pN)(t[1]);return new L.A({xmin:n[0],ymin:n[1],xmax:i[0],ymax:i[1],spatialReference:{wkid:4326}})}function H(e,t){const n=(0,V.Dy)(e,t);return n?.length&&""!==n[0]&&!isNaN(Number(n[0]))?n.map(e=>Number(e)):null}function K(e){const t=(0,V.pN)(e,"MinimumValue"),n=(0,V.pN)(e,"MaximumValue");return t.length&&n.length?t.map((e,t)=>({min:e,max:n[t],avg:-1,stddev:-1})):null}function Y(e){return null==e?null:e.every(t=>t===e[0])?e[0]:e}function Q(e){const t=[],n=(0,V.IC)(e,"RangeSet");let i=[];for(let e=0;e<n.length;e++){const s=(0,V.mX)(n[e],"name"),r=(0,V.mX)(n[e],"label"),o=[],a=H(n[e],"nullValues/singleValue"),l=(0,V.IC)(n[e],"AxisDescription");for(let e=0;e<l.length;e++){const t=(0,V.mX)(l[e],"name"),n=(0,V.mX)(l[e],"label"),s=(0,V.Dy)(l[e],"singleValue");if(0===s.length){const t=(0,V.mX)(l[e],"min"),n=(0,V.mX)(l[e],"max"),i=Number((0,V.mX)(l[e],"res"))||1;if(null!==t&&null!==n)for(let e=parseInt(t,10);e<=parseInt(n,10);e+=i)s.push(e.toString())}"band"===t.toLowerCase()&&(i=s),o.push({name:t,label:n,values:s})}t.push({name:s,label:r,nullValues:a,axis:o})}return{rangeSet:t,bandNames:i}}function J(e=null){if(!e)return{resolution:null,units:null};let t=e.toUpperCase();const n=["Years","Months","Days","Hours","Minutes","Seconds"];let i,s,r;return t.includes("PT")?(t=t.slice(2),r=["H","M","S"].findIndex(e=>t.includes(e)),i=n[3+r],s=parseFloat(t.slice(0,-1))):(t=t.slice(1),r=["Y","M","D"].findIndex(e=>t.includes(e)),r>-1&&(i=n[r]),s=parseFloat(t.slice(0,-1))),{resolution:s,units:i}}function ee(e){const t=(0,V.IC)(e,"timeposition");if(t.length>0){const e=[];for(let n=0;n<t.length;n++)e.push(new Date((0,V.mX)(t[n])));return{begin:e[0],end:e[e.length-1],values:e}}const n=(0,V.V6)(e,"timePeriod")||(0,V.V6)(e,"TimePeriod");return n?{begin:new Date((0,V.mX)(n,"beginPosition")||(0,V.mX)(n,"BeginPosition")),end:new Date((0,V.mX)(n,"endPosition")||(0,V.mX)(n,"EndPosition")),...J((0,V.mX)(n,"timeResolution")||(0,V.mX)(n,"TimeResolution"))}:null}function te(e){const t=(0,V.V6)(e,"spatialDomain"),n=(0,V.V6)(t,"Envelope")||(0,V.V6)(t,"EnvelopeWithTimePeriod"),i=n.getAttribute("srsName").split(":"),s=i[i.length-1],r=(0,V.IC)(n,"pos"),o=(0,V.pN)(r[0]),a=(0,V.pN)(r[1]),l=parseInt(s,10),u=isNaN(l)?null:{wkid:l},c=new L.A({xmin:o[0],ymin:o[1],xmax:a[0],ymax:a[1],spatialReference:u}),p=(0,V.V6)(t,"RectifiedGrid"),d=(0,V.mX)(p,"low").split(" "),f=(0,V.mX)(p,"high").split(" "),m=parseInt(f[0],10)-parseInt(d[0],10)+1,h=parseInt(f[1],10)-parseInt(d[1],10)+1,g=(0,V.pN)(t,"origin/pos"),v=(0,V.IC)(t,"offsetVector"),y={envelope:c,columns:m,rows:h,offset:{x:parseFloat((0,V.mX)(v[0]).split(" ")[0]),y:parseFloat((0,V.mX)(v[1]).split(" ")[1])},origin:{x:g[0],y:g[1]}},w=(0,V.V6)(e,"temporalDomain")||(0,V.V6)(e,"TemporalDomain");return{spatialDomain:y,temporalDomain:w?ee(w):null}}function ne(e,t){const n=[],i=(0,V.IC)(e,"Field");let s,r=[];for(let e=0;e<i.length;e++){const o=(0,V.mX)(i[e],"Identifier"),a=(0,V.mX)(i[e],"Description"),l=(0,V.mX)(i[e],"Definition"),u=(0,V.mX)(i[e],"Abstract"),c=(0,V.mX)(i[e],"Title"),p=H(i[e],"NullValue"),d=(0,V.V6)(i[e],"AllowedValues"),f=d?K(d):null,m=_(i[e],"1.1.0"),h=[],g=(0,V.IC)(i[e],"Axis");for(let e=0;e<g.length;e++){const n=g[e].getAttribute("identifier"),i=(0,V.mX)(g[e],"UOM"),o=(0,V.mX)(g[e],"DataType"),a=(0,V.Dy)(g[e],"Key");t&&!n.toLowerCase().includes("band")||(r=a,s=p),h.push({identifier:n,uom:i,dataType:o,values:a,bandNoDataValues:s})}n.push({identifier:o,description:a,definition:l,abstract:u,title:c,supportedInterpolations:m,axis:h,nullValues:p,statistics:f})}return{rangeSet:n,bandNames:r,bandNoDataValues:s,statistics:n[0].statistics}}function ie(e){const t=(0,V.V6)(e,"SpatialDomain"),n=(0,V.V6)(t,"GridCRS"),i=(0,V.mX)(n,"GridBaseCRS"),s=(0,V.mX)(n,"GridOrigin"),r=s?.split(" ").map(e=>parseFloat(e))??[0,0],o=(0,V.pN)(n,"GridOffsets"),a=(0,V.IC)(t,"BoundingBox");let l,u,c,p;for(let e=0;e<a.length;e++){const t=a[e].getAttribute("crs")?.toLowerCase();if(null!=t)if(t.includes("imagecrs")){const t=(0,V.pN)(a[e],"LowerCorner"),n=(0,V.pN)(a[e],"UpperCorner");l=n[0]-t[0]+1,u=n[1]-t[1]+1}else if(t.indexOf("epsg")>0){const n=t.split(":");c=parseInt(n[n.length-1],10);const i=(0,V.pN)(a[e],"LowerCorner"),s=(0,V.pN)(a[e],"UpperCorner");p=new L.A({xmin:i[0],ymin:i[1],xmax:s[0],ymax:s[1],spatialReference:{wkid:c}})}}const d=l>u,f=p.xmax-p.xmin>p.ymax-p.ymin;let m=!1;(0,O.m)(c)&&(d===f?m=!1:(m=!0,p=new L.A({xmin:p.ymin,ymin:p.xmin,xmax:p.ymax,ymax:p.xmax,spatialReference:{wkid:c}})));const h={columns:l,rows:u,origin:{x:r[0],y:r[1]},offset:{x:o[0],y:o[o.length-1]},gridBaseCRS:i,envelope:p,useEPSGAxis:m},g=(0,V.V6)(e,"temporalDomain")||(0,V.V6)(e,"TemporalDomain");return{spatialDomain:h,temporalDomain:g?ee(g):null}}function se(e){const t=(0,V.V6)(e,"Envelope")||(0,V.V6)(e,"EnvelopeWithTimePeriod"),n=t.getAttribute("srsName"),i=n.slice(n.lastIndexOf("/")+1),s=t.getAttribute("axisLabels").split(" ").map(e=>e.trim()).filter(e=>""!==e.trim()),r=(0,V.pN)(t,"lowerCorner"),o=(0,V.pN)(t,"upperCorner"),a=!["y","lat","latitude","north","nor","n","b"].includes(s[0].toLowerCase());let l;const u=parseInt(i,10),c=isNaN(u)?null:{wkid:u};l=new L.A(a?{xmin:r[0],ymin:r[1],xmax:o[0],ymax:o[1],spatialReference:c}:{xmin:r[1],ymin:r[0],xmax:o[1],ymax:o[0],spatialReference:c});const p={mins:r,maxs:o},d=t.getAttribute("uomLabels").trim().split(" ");let f,m;if((0,V.g7)(t,"EnvelopeWithTimePeriod")){f=new Date((0,V.mX)(e,"beginPosition")||(0,V.mX)(e,"BeginPosition")),m=new Date((0,V.mX)(e,"endPosition")||(0,V.mX)(e,"EndPosition"));const t=d?.findIndex(e=>"oledatetime"===e?.toLowerCase());t>-1&&(d[t]="ISO8601")}return{envelope:l,axisLabels:s,uomLabels:d.length?d:null,envelopeAllDims:p,beginPosition:f,endPosition:m,isEastFirst:a}}function re(e,t){const n=[],i=(0,V.IC)(e,"DataRecord"),s=[];let r,o=[];for(let e=0;e<i.length;e++){const a=(0,V.IC)(i[e],"field"),l=[];for(let e=0;e<a.length;e++){const n=a[e].getAttribute("name"),i=(0,V.mX)(a[e],"description")||"",u=(0,V.V6)(a[e],"uom")?.getAttribute("code")||"",c=(0,V.pN)(a[e],"interval"),p=H(a[e],"nilValue")?.[0];t&&!n.toLowerCase().includes("band")||(s.push(n),c?.length&&(r=r||[],r.push({min:c[0],max:c[1],avg:-1,stddev:-1})),o.push(p)),l.push({name:n,description:i,uom:u,allowedValues:c,nilValue:p})}n.push(l)}return o.some(e=>null!=e)||(o=null),{rangeType:n,bandNames:s,bandStats:r,bandNoDataValues:o}}function oe(e){let t=1,n="";const i=.01;return Math.abs(e-1/24)<1/24*i?n="Hours":Math.abs(e-1)<1*i?n="Days":e<1?(t=Math.round(24*e),n="Hours"):e>28-i&&e<31+i||Math.round(e/30)<12?n="Months":e>365-i&&e<366+i&&(n="Years"),{interval:t,intervalUnit:n}}function ae(e,t){const n=(0,V.V6)(e,"RectifiedGrid"),i=(0,V.pN)(n,"low"),s=(0,V.pN)(n,"high"),r=[];for(let e=0;e<i.length;e++)r.push(s[e]-i[e]+1);const o=(0,V.mX)(n,"axisLabels").split(" "),a=(0,V.pN)(n,"origin/pos"),l=(0,V.IC)(n,"offsetVector"),u=[];for(let e=0;e<l.length;e++){const t=(0,V.pN)(l[e]),n=t.findIndex(e=>0!==e);u[n]=t[n]}let c,p,d,f=!1;return t?.length&&o?.length&&(f=[...t].sort((e,t)=>e<t?-1:1).join(",")===[...o].sort((e,t)=>e<t?-1:1).join(",")),["y","lat","latitude","north","nor","n","b"].includes((f?o:t)[0].toLowerCase())?(c=r[1],p=r[0],d={y:Math.abs(u[0]),x:Math.abs(u[1])}):(c=r[0],p=r[1],d={x:Math.abs(u[0]),y:Math.abs(u[1])}),{columns:c,rows:p,origin:a,offset:u,resolution:d,gridSamples:r,axisLabels:o,hasSameAxisLabelsAsBoundedBy:f}}function le(e){const t=(0,V.V6)(e,"EarthObservation");if(!t)return null;const n=(0,V.V6)(t,"phenomenonTime"),i=n?ee(n):null,s=(0,V.V6)(t,"phenomenonTime"),r=s?ee(s):null,o=(0,V.mX)(t,"featureOfInterest/Footprint/multiExtentOf/MultiSurface/surfaceMembers/Polygon/exterior/LinearRing/posList");let a=null;if(o){const e=o.split(" ").map(e=>e.trim()).filter(e=>null!=e&&""!==e).map(Number);if(e.length){const t=[];for(let n=0;n<e.length/2;n+=2)t.push(e[n],e[n+1]);a=new F.A({rings:[[t]]})}}return{observation:{phenomenonTime:i,resultTime:r,footprint:a,identifier:(0,V.mX)(e,"metaDataProperty/EarthObservationMetaData/identifier"),acquisitionType:(0,V.mX)(e,"metaDataProperty/EarthObservationMetaData/acquisitionType"),status:(0,V.mX)(e,"metaDataProperty/EarthObservationMetaData/status")}}}async function ue(e,t){const{coverageIds:n,version:i,customParameters:s,signal:r}=t,a=i.slice(0,3),u="1.0"===a?"coverage":"1.1"===a?"identifiers":"coverageId",c={service:"WCS",request:"DescribeCoverage",version:i,[u]:n.join(","),...s};try{const{data:t}=await(0,N.A)(e,{query:c,responseType:"xml",signal:r});return function(e,t){let n=null;if(n="string"==typeof e?(new DOMParser).parseFromString(e,"text/xml"):e,"1.0.0"===t)return(0,V.IC)(n,"CoverageOffering").map(e=>function(e){const t={version:"1.0"};let n,i=[];for(let s=0;s<e.childNodes.length;s++){const r=e.childNodes[s];if(1===r.nodeType)if((0,V.g7)(r,"description"))t.description=(0,V.mX)(r);else if((0,V.g7)(r,"name"))t.name=(0,V.mX)(r);else if((0,V.g7)(r,"label"))t.label=(0,V.mX)(r);else if((0,V.g7)(r,"supportedFormats"))t.supportedFormats=(0,V.Dy)(r,"formats");else if((0,V.g7)(r,"supportedCRSs"))t.supportedCRSs=B(r);else if((0,V.g7)(r,"supportedInterpolations"))t.supportedInterpolations=_(r,"1.0.0");else if((0,V.g7)(r,"lonLatEnvelope"))t.lonLatEnvelope=U(r);else if((0,V.g7)(r,"rangeSet")){const e=Q(r);t.rangeSet=e.rangeSet,i=e.bandNames;const s=e.rangeSet[0].nullValues;s?.length&&(n=Y(s))}else(0,V.g7)(r,"domainSet")&&(t.domainSet=te(r))}const s=z(t.supportedInterpolations),{name:r,description:o,label:a,lonLatEnvelope:l,supportedFormats:u}=t,{spatialDomain:c}=t.domainSet,p={x:Math.abs(c.offset.x),y:Math.abs(c.offset.y)},d=function(e){if(!e.temporalDomain)return null;const{begin:t,end:n,values:i,units:s,resolution:r}=e.temporalDomain,o={variables:[{name:"default",description:"",dimensions:[{name:"StdTime",description:"",unit:"ISO8601",values:i?.map(e=>e.getTime()),hasRegularIntervals:!i,interval:r,intervalUnit:s,extent:[t.getTime(),n.getTime()]}]}]};return Z(o),o}(t.domainSet),f=new W.A({width:c.columns,height:c.rows,pixelSize:p,pixelType:"unknown",extent:c.envelope,spatialReference:c.envelope.spatialReference,bandCount:i.length||1,noDataValue:n,multidimensionalInfo:d});return{id:r,title:t.name,description:o||a,lonLatEnvelope:l,rasterInfo:f,bandNames:i,supportedFormats:u,supportedInterpolations:s,coverageDescription:t,version:"1.0.0",useEPSGAxis:!1}}(e));const i=(0,V.IC)(n,"CoverageDescription");return"1.1.0"===t||"1.1.1"===t||"1.1.2"===t?i.map(e=>function(e,t){const n=[],i=[],s={supportedFormats:n,supportedCRSs:i,version:"1.1"};let r,o,a=[];for(let t=0;t<e.childNodes.length;t++){const l=e.childNodes[t];if(1!==l.nodeType)continue;const u=(0,V.vv)(l).toLowerCase();switch(u){case"title":case"abstract":case"identifier":s[u]=(0,V.mX)(l);break;case"supportedformat":{const e=(0,V.mX)(l);n.includes(e)||n.push(e)}break;case"supportedcrs":{const e=(0,V.mX)(l);i.includes(e)||i.push(e)}break;case"range":{const e=ne(l,!!s.domain?.temporalDomain);s.range=e.rangeSet,a=e.bandNames;const{bandNoDataValues:t}=e;t?.length&&(r=Y(t)),o=e.statistics}break;case"domain":s.domain=ie(l)}}const l=z(s.range[0].supportedInterpolations),{identifier:u,abstract:c,title:p,domain:d,range:f}=s,m={x:Math.abs(d.spatialDomain.offset.x),y:Math.abs(d.spatialDomain.offset.y)},h=function(e,t){if(!t.temporalDomain)return null;const n=e.filter(e=>!e.identifier.toLowerCase().includes("field_1")&&!e.axis.some(e=>e.identifier.includes("band"))),i=[];if(n.length&&n.forEach(e=>{const t=e.axis.map(e=>{const t=e.values.map(t=>"ISO8601"===e.uom?(t=t.trim()).toLowerCase().includes("z")?new Date(t).getTime():new Date(t+"Z").getTime():parseFloat(t.trim())),n=[Math.min.apply(null,t),Math.max.apply(null,t)];return{name:e.identifier.trim(),description:"",field:e.identifier.trim(),unit:e.uom?e.uom.trim():"",hasRegularIntervals:!1,values:t,extent:n}});i.push({name:e.identifier.trim(),description:e.description?.trim()??"",unit:"",dimensions:t,statistics:e.statistics})}),t.temporalDomain){const{begin:e,end:n,values:s,units:r,resolution:o}=t.temporalDomain;i.some(e=>e.dimensions.some(e=>"stdtime"===e.name.toLowerCase()))||i.forEach(t=>{t.dimensions.push({name:"StdTime",description:"",unit:"ISO8601",values:s?.map(e=>e.getTime()),hasRegularIntervals:!s,interval:o,intervalUnit:r,extent:[e.getTime(),n.getTime()]})})}if(i.length){const e={variables:i};return Z(e),e}return null}(f,d);h&&(r=f[0].nullValues,1===r?.length&&(r=r[0]));const g=new W.A({width:d.spatialDomain.columns,height:d.spatialDomain.rows,pixelSize:m,pixelType:"unknown",extent:d.spatialDomain.envelope,spatialReference:d.spatialDomain.envelope.spatialReference,bandCount:a.length||1,noDataValue:r,statistics:o,multidimensionalInfo:h});return{id:u,title:s.title,description:c||p,bandNames:a,rasterInfo:g,supportedFormats:n,supportedInterpolations:l,coverageDescription:s,version:t,useEPSGAxis:d.spatialDomain.useEPSGAxis}}(e,t)):i.map(e=>function(e){const t={version:"2.0"};let n,i,s=[];for(let r=0;r<e.childNodes.length;r++){const o=e.childNodes[r];if(1===o.nodeType)if((0,V.g7)(o,"coverageId"))t.coverageId=(0,V.mX)(o);else if((0,V.g7)(o,"ServiceParameters"))t.serviceParameters={supportedFormats:(0,V.Dy)(o,"nativeFormat")};else if((0,V.g7)(o,"boundedBy"))t.boundedBy=se(o);else if((0,V.g7)(o,"rangeType")){const e=re(o,t.boundedBy?.axisLabels.length>2||t.domainSet?.axisLabels.length>2);t.rangeType=e.rangeType,s=e.bandNames,n=e.bandStats;const{bandNoDataValues:r}=e;r?.length&&(i=Y(r))}else if((0,V.g7)(o,"domainSet"))t.domainSet=ae(o,t.boundedBy?.axisLabels);else if((0,V.g7)(o,"metadata")){const e=(0,V.V6)(o,"EOMetadata");t.eoMetadata=e?le(e):null}}const{coverageId:r,boundedBy:o,domainSet:a,rangeType:l,serviceParameters:u}=t,c=function(e,t,n){if(n.axisLabels.length<=2)return null;const i=[];for(let t=0;t<e.length;t++){const n=e[t];for(let e=0;e<n.length;e++)n[e].name.toLowerCase().includes("band")||i.push(n[e])}const s=[];if(i.length){const e=[];for(let i=2;i<n.axisLabels.length;i++){const s=t.uomLabels?.[i]?.trim()??"",r=n.axisLabels[i].toLowerCase().includes("time")||"iso8601"===s.toLowerCase()||"oledatetime"===s.toLowerCase();let o,a;if(r){const e=oe(n.offset[i]);o=e.interval,a=e.intervalUnit}else o=n.offset[i],a=s;const l=[];r?(l.push((0,q.$E)(t.envelopeAllDims.mins[i])),l.push((0,q.$E)(t.envelopeAllDims.maxs[i]))):(l.push(t.envelopeAllDims.mins[i]),l.push(t.envelopeAllDims.maxs[i])),e.push({name:n.axisLabels[i].trim(),description:n.axisLabels[i].trim(),unit:r?"ISO8601":s,hasRegularIntervals:!0,extent:l,interval:o,intervalUnit:a})}if(i.forEach(t=>{const{allowedValues:n}=t,i=2===n?.length?[{min:n[0],max:n[1],avg:-1,stddev:-1}]:null;s.push({name:t.name.trim(),description:t.description?.trim()??"",unit:t.uom.trim(),statistics:i,dimensions:[...e]})}),s.length){const e={variables:s};return Z(e),e}}return null}(l,o,a);return!n&&c&&(n=c?.variables[0].statistics),null!=c&&(i=l[0][0].nilValue),{id:r,title:r,description:r,bandNames:s,rasterInfo:new W.A({width:a.columns,height:a.rows,pixelSize:a.resolution,pixelType:"unknown",extent:o.envelope,spatialReference:o.envelope.spatialReference,bandCount:s.length||1,statistics:n,noDataValue:i,multidimensionalInfo:c}),supportedFormats:u.supportedFormats,coverageDescription:t,version:"2.0.1",useEPSGAxis:!1}}(e))}(t,i)}catch(e){if(!(0,l.zf)(e))throw new o.A("wcslayer:open","wcs coverage description is not valid or supported");throw e}}var ce=n(45617),pe=n(4916);function de(e,t,n=0){const i="--"+t.boundary,s=[];for(let e=0;e<i.length;e++)s.push(i.charCodeAt(e));const r=[],o="\n--"+t.boundary+"--";for(let e=0;e<o.length;e++)r.push(o.charCodeAt(e));const a=[10],l=[13,10],u=[],c=s.length,p=new Uint8Array(e,n),d=p.length-c;let f=0,m=0;for(let e=0;e<d;e++){for(m=0;m<c&&p[e+m]===s[m];m++);if(m!==c)continue;let n=!1;if(f){const i=fe(p.subarray(f,e),t);u.push(i),n=!!i.isValidImage}if(e+=c-1,p[e+1]===a[0]?e+=1:p[e+1]===l[0]&&p[e+2]===l[1]&&(e+=2),f=e+1,n)break}const h=r.length;for(let e=p.length-h-10;e<p.length-h;e++){for(m=0;m<h&&p[e+m]===r[m];m++);if(m===h){u.push(fe(p.subarray(f,e),t));break}}return u}function fe(e,t){const n=String.fromCharCode.apply(null,e.subarray(0,Math.min(300,e.length))).split("\n"),i=Math.min(n.length,7),s={contentDisposition:"inline"};let r=0;for(let o=0;o<i;o++)if(n[o].length<4)r=r+n[o].length+1;else if("content"===n[o].slice(0,7).toLowerCase()){r=r+n[o].length+1;const e=n[o].indexOf(":");if(-1===e)continue;const t=n[o].slice(0,e).trim(),i=n[o].slice(e+1).trim();switch(t.toLowerCase()){case"content-type":s.contentType=i;break;case"content-description":s.contentDescription=i;break;case"content-transfer-encoding":s.contentTransferEncoding=i;break;case"content-id":s.contentID=i;break;case"content-disposition":s.contentDisposition=i;break;case"content-location":s.contentLocation=i}}else{if(s.contentDisposition.toLowerCase().includes("inline")&&n[o].length>=4&&s.contentType?.toLowerCase().includes("image")){let t=!0,n=e.subarray(r,e.length);if(s.contentType.toLowerCase().indexOf("tif")>0){if("base64"===s.contentTransferEncoding){let e="";const t=n;for(let n=0;n<t.length;n+=65535){const i=t.subarray(n,n+65535>t.length-1?t.length-1:n+65535);e+=String.fromCharCode.apply(null,i)}const i=atob(e);n=new Uint8Array(i.length);for(let e=0;e<n.length;e++)n[e]=i.charCodeAt(e)}t=73===n[0]&&73===n[1]||77===n[0]&&77===n[1]}if(t){let t=n.buffer;"base64"!==s.contentTransferEncoding&&(t=new ArrayBuffer(e.length-r),n=new Uint8Array(t),n.set(e.subarray(r,e.length))),s.contentData=t,s.isValidImage=!0}break}if((""===t.start||s.contentID===t.start)&&s.contentType){if(s.contentType.includes("text")||s.contentType.includes("xml")){s.contentData=String.fromCharCode.apply(null,e.subarray(r,e.length));break}s.contentData=e.subarray(r,e.length)}}return s}var me=n(77649),he=n(28435);const ge=["nearest neighbor","bilinear","bicubic"],ve=["nearest","linear","cubic"],ye="response is not a supported multipart/related mediaType with inline tiff, switching to compatibility mode",we=new Set(["1.0.0","1.1.0","1.1.1","1.1.2","2.0.1"]);let xe=class extends pe.A{constructor(){super(...arguments),this.datasetFormat="WCSServer",this.tileType="Raster"}get rasterId(){return`${this.url}-${this.coverageId}-${this.version}`}async fetchRawTile(e,t,n,i={}){if(this.isBlockOutside(e,t,n))return null;const{nativePixelSize:s,spatialReference:r}=this.rasterInfo,a=2**e,l=s.x*a,u=s.y*a,{blockWidth:c,blockHeight:p}=this.getBlockWidthHeight(e),{origin:d}=this.rasterInfo.storageInfo.tileInfo,f=this.getTileExtent({x:l,y:u},t,n,d,r,[c,p]),m=this.rasterInfo.extent,h=f.xmax>m.xmax,g=f.ymin<m.ymin,v=h||g;let y=f,w=c,x=p;if(v&&(y=f.clone().intersection(m),null!=y&&(h&&(w=Math.floor((y.xmax-y.xmin)/l),y.xmax=y.xmin+l*w),g&&(x=Math.floor((y.ymax-y.ymin)/u),y.ymin=y.ymax-u*x))),null==y||w<=1||x<=1)return null;const b=await this._getCoverage(y,w,x,a,i);if(!b)return null;const{coverageDescription:C}=this.coverageInfo,{noDataValue:I,multidimensionalInfo:S}=this.rasterInfo,{multidimensionalDefinition:A}=i;let M;if(null!=S&&null!=A&&A.length){const e=A[0].variableName;if("2.0"===C.version){const t=C.rangeType[0].find(t=>t.name===e);M=t?.nilValue}else if("1.1"===C.version){const t=C.range.find(t=>t.identifier===e);M=t?.nullValues}}const R=M??I,D=await this.decodePixelBlock(b,{width:w,height:x,planes:null,pixelType:null,tiffNoDataValue:Array.isArray(R)?R[0]:R,matchAllNoData:!0});if(null==D)return null;if(D&&(D.width!==w||D.height!==x))throw new o.A("wcsraster-fetch",`the response has unexpected dimension width: ${D.width}, height: {pixelBlock.height}`);return v?(0,he.$Q)(D,{x:0,y:0},{width:p,height:p}):D}async _open(e){const{customFetchParameters:t}=this.ioConfig,n=e?.signal,i=await async function(e,t){const{version:n,customParameters:i,signal:s}=t??{},r=n?.startsWith("1.0")?"version":"acceptVersions",a={service:"WCS",request:"GetCapabilities",[r]:n,...i};try{let{data:n}=await(0,N.A)(e,{query:a,responseType:"xml",signal:s});return t?.version||function(e){let t=null;t="string"==typeof e?(new DOMParser).parseFromString(e,"text/xml"):e;const n=t.documentElement.getAttribute("version"),i=n?.slice(0,3);return null!=i&&i<"2.1"}(n)||(a[r]="2.0.1",({data:n}=await(0,N.A)(e,{query:a,responseType:"xml",signal:s}))),X(n)}catch(e){if(!(0,l.zf)(e))throw new o.A("wcslayer:open","wcs capabilities is not valid or supported");throw e}}(this.url,{version:t?.version??this.version,customParameters:t,signal:n});if(this.capabilities=i,!this.version){let e=i.version.slice(0,3);"2.0"===e||"1.1"===e||"1.0"===e?this.version=i.version:(e=i.supportedVersions.find(e=>"2.0.1"===e)||i.supportedVersions.find(e=>e.startsWith("2.0"))||i.supportedVersions.find(e=>e.startsWith("1.1"))||i.supportedVersions.find(e=>e.startsWith("1.0"))||"1.0.0",this.version=e)}const{version:s}=this;if(!we.has(s))throw new o.A("wcsraster-open",`unsupported WCS version ${s}`);const{gridCoverages:r}=i;if(!r.length)throw new o.A("wcsraster-open","cannot find rectified grid coverages");this.coverageId??=r[0].id;const{coverageId:a}=this,u=r.find(e=>e.id===a);if(null==u)throw new o.A("wcsraster-open",`the coverageId ${a} does not exist in capabilities`);const c=await ue(this.url,{coverageIds:[a],version:s,customParameters:t,signal:n});if(this.coverageInfo=c[0],s.startsWith("2.0")){const{coverageInfo:e}=this;e.lonLatEnvelope=u.lonLatEnvelope,e.supportedInterpolations=z(i.supportedInterpolations),this._patchDimensionValues201(a,n)}this.datasetName=this.coverageInfo.title;const{rasterInfo:p}=this.coverageInfo;if(this.createRemoteDatasetStorageInfo(p,512,512),this._set("rasterInfo",p),null==p.spatialReference)throw new o.A("wcsraster-open",`coverage without spatial reference is not supported: ${a}`);const{pixelType:d,bandCount:f}=await this._getPixelTypeAndBandCount(n);p.pixelType=d,1===p.bandCount&&f>1&&(p.bandCount=f),this.updateTileInfo()}async _patchDimensionValues201(e,t){const{coverageInfo:n}=this,i=n.rasterInfo.multidimensionalInfo?.variables,s=we.has("1.1.2")?"1.1.2":we.has("1.1.1")?"1.1.1":we.has("1.1.0")?"1.1.0":null,{customFetchParameters:r}=this.ioConfig;if(i&&s)try{const n=this.url.includes("/ImageServer/"),o=e.length>8&&e.startsWith("Coverage")&&n?e.slice(8):e,a=await ue(this.url,{coverageIds:[o??e],version:s,customParameters:r,signal:t}).catch(()=>{if(o)return ue(this.url,{coverageIds:[e],version:s,customParameters:r,signal:t})}),l=a?.[0].rasterInfo.multidimensionalInfo?.variables;if(l)for(const e of i){const t=l.find(({name:t})=>t===e.name);if(t?.dimensions?.length)for(let i=e.dimensions.length-1;i>=0;i--){const s=e.dimensions[i],r=t.dimensions.find(({name:e})=>e===s.name);r?r.values&&r.extent?.join(",")===s.extent?.join(",")&&(e.dimensions[i]={...s,values:r.values}):n&&e.dimensions.splice(i,1)}}}catch{}}async _getPixelTypeAndBandCount(e){const{pixelSize:t,extent:n,multidimensionalInfo:i}=this.rasterInfo,s=n.center,r=new L.A({xmin:s.x-t.x,xmax:s.x+t.x,ymin:s.y-t.y,ymax:s.y+t.y,spatialReference:n.spatialReference});let a=[];if(null!=i){const e=i.variables[0];a=[],e.dimensions.forEach(t=>{a.push(new ce.A({variableName:e.name,dimensionName:t.name,values:t.hasRegularIntervals?t.extent?.[0]:t.values?.[0],isSlice:!0}))})}const{coverageDescription:l}=this.coverageInfo,u={interpolation:"nearest",multidimensionalDefinition:a,signal:e},{version:c}=l,{ioConfig:d}=this,f="2.0"===c&&null==d.allowAnyMediaType||"1.1"===c&&null==d.use2GridOffsets;let m;try{m=await this._getCoverage(r,2,2,1,u,!0)}catch(e){if(!f)throw e;if("1.1"===c){if(!e.details?.isResolutionMismatch)throw e;d.use2GridOffsets=!0}}if(!m&&f&&("2.0"===c&&(d.allowAnyMediaType=!0),m=await this._getCoverage(r,2,2,1,u),m&&p.A.getLogger(this).warn("wcsraster:getcoverage",ye)),!m)throw new o.A("wcsraster-open","unable to determine pixel type");const h=await this.decodePixelBlock(m,{width:2,height:2,planes:null,pixelType:null});if(null==h)throw new o.A("wcsraster-open","unable to determine pixel type");return{pixelType:h.pixelType,bandCount:h.getPlaneCount()??0}}async _getCoverage(e,t,n,i,s,r=!1){const{coverageDescription:a}=this.coverageInfo,{version:l}=a,u="2.0"===l?this._getCoverage201Parameters(e,t,n,i,s,a):"1.1"===l?this._getCoverage110Parameters(e,t,n,s,a):this._getCoverage100Parameters(e,t,n,s),c="2.0"===l?await this.request(this._constructWCS201Url(u),{signal:s.signal,responseType:"array-buffer"}):await this.request(this.url,{query:u,signal:s.signal,responseType:"array-buffer"});if("1.0"===l)return c.data;if("2.0"===l&&!1!==this.ioConfig.allowAnyMediaType&&"tiff"===(0,me.g)(c.data))return r&&(this.ioConfig.allowAnyMediaType=!0,p.A.getLogger(this).warn("wcsraster:getcoverage",ye)),c.data;const d=function(e){const t=function(e){const t=e.getHeader?.("Content-Type")?.split(";");if(!t)return null;if(!(t[0].trim()??"").startsWith("multipart/"))return null;const n={boundary:"",start:"",type:""};for(let e=1;e<t.length;e++){const i=t[e].indexOf("=");if(i>0){const s=t[e].slice(0,i).trim(),r=t[e].slice(i+1).trim();n[s]=r.startsWith('"')?r.slice(1,-1):r}}return n}(e);return t?{isMultipart:!0,data:t.boundary?de(e.data,t,0):null}:{isMultipart:!1,data:null}}(c);if(d.isMultipart&&d.data){const e=d.data.find(e=>e.isValidImage);return r&&"base64"===e?.contentTransferEncoding&&p.A.getLogger(this).warn("wcsraster:getcoverage","response is base64 encoded which may impact layer display performance"),e?.contentData}const f=new Uint8Array(c.data,0,Math.min(c.data.byteLength,2e3)),m=String.fromCharCode.apply(null,f).toLowerCase().includes("exception"),h=m&&String.fromCharCode.apply(null,f).includes("A non-zero RESX/RESY or WIDTH/HEIGHT is required but neither was provided");if(m)throw new o.A("wcsraster:getcoverage","server returns an exception",{isResolutionMismatch:h});throw new o.A("wcsraster:getcoverage","response is not a supported multipart mediaType with inline tiff")}_getInterpolationIndex(e){return e&&this.coverageInfo.supportedInterpolations?.includes(e)?"nearest"===e?0:"bilinear"===e?1:"cubic"===e?2:0:0}_getCoverage100Parameters(e,t,n,i){const s=`${e.xmin},${e.ymin},${e.xmax},${e.ymax}`,r=e.spatialReference.wkid,o=(this.coverageInfo.supportedFormats||[]).find(e=>e.toLowerCase().includes("tiff"))||"GEOTIFF",{bandIds:a,interpolation:l}=i,u=this._getInterpolationIndex(l),c=a?a.map(e=>this.coverageInfo.bandNames[e]):null,p=ge[u],{multidimensionalDefinition:d}=i;let f;if(null!=d&&null!=this.rasterInfo.multidimensionalInfo){const e=d.find(e=>"StdTime"===e.dimensionName);let t=e?.values;t&&t.length>0&&(Array.isArray(t[0])&&(t=t[0]),f=t.map(e=>be(e)).join(","))}return{service:"WCS",request:"GetCoverage",version:this.version,coverage:this.coverageId,format:o,crs:`EPSG:${r}`,bbox:s,width:t,height:n,time:f,interpolation:p,band:c?.join(",")}}_getCoverage110Parameters(e,t,n,i,s){const{multidimensionalDefinition:r,bandIds:o,interpolation:a}=i,l=e.spatialReference.wkid,u=`urn:ogc:def:crs:EPSG::${l}`,c=(this.coverageInfo.supportedFormats||[]).find(e=>e.toLowerCase().includes("tiff"))||"image/tiff",p=this._getInterpolationIndex(a),d=ve[p],f=null==a||0===this.coverageInfo.supportedInterpolations?.indexOf(a),m=s.domain.spatialDomain,h=m.origin.x<=m.envelope.xmin&&m.origin.y<=m.envelope.ymin,g=e.width/t,v=e.height/n*(h?1:-1),y=h?[e.xmin,e.ymin]:[e.xmin,e.ymax],w=m.useEPSGAxis&&(0,O.m)(l),x=w?`${y[1]},${y[0]}`:`${y[0]},${y[1]}`,b=this.ioConfig.use2GridOffsets,C=w?b?`${v},${g}`:`${v},0,0,${g}`:b?`${g},${v}`:`${g},0,0,${v}`,I=g/2,S=e.xmin+I,A=e.xmax-I,M=Math.abs(v)/2,R=e.ymin+M,D=e.ymax-M,T=w?`${R},${S},${D},${A},${u}`:`${S},${R},${A},${D},${u}`,P=s.range.find(e=>e.axis.some(e=>e.identifier.toLowerCase().includes("band")));let L,N=P&&d&&o?f?`${P.identifier}[${P.axis[0].identifier}[${o.join(",")}]]`:`${P.identifier}:${d}[${P.axis[0].identifier}[${o.join(",")}]]`:null;if(null!=r&&r.length)for(let e=0;e<r.length;e++){let t=r[e].values;const n=r[e].dimensionName?.toLowerCase(),i=r[e].variableName?.toLowerCase(),o=s.range.find(e=>e.identifier.toLowerCase()===i);if(t.length>0)if(Array.isArray(t[0])&&(t=t[0]),"stdtime"===n)L=t.map(e=>be(e)).join(",");else if(o){const e=o.axis.find(e=>e.identifier.toLowerCase()===n);e&&(N=f?o.identifier+"["+e.identifier+"["+t.join(",")+"]]":o.identifier+":"+d+"["+e.identifier+"["+t.join(",")+"]]")}e===r.length-1&&o&&!N&&(N=f?o.identifier:o.identifier+":"+d)}return{service:"WCS",request:"GetCoverage",version:this.version,identifier:this.coverageId,format:c,crs:`EPSG:${l}`,boundingbox:T,gridCS:"urn:ogc:def:cs:OGC:0.0:Grid2dSquareCS",gridType:"urn:ogc:def:method:WCS:1.1:2dGridIn2dCrs",gridOrigin:x,gridOffsets:C,gridBaseCRS:u,timeSequence:L,rangeSubset:N}}_getCoverage201Parameters(e,t,n,i,s,r){const{multidimensionalDefinition:o,interpolation:a}=s,l=this._getInterpolationIndex(a);let u=null;const{supportedInterpolations:c}=this.capabilities;if(c?.length)switch(l){case 0:u=c.find(e=>e.toLowerCase().includes("nearest"));break;case 1:u=c.find(e=>e.toLowerCase().includes("linear"));break;case 2:u=c.find(e=>e.toLowerCase().includes("cubic")||e.toLowerCase().includes("quadratic"))}const p=(this.coverageInfo.supportedFormats||[]).find(e=>e.toLowerCase().includes("tiff"))||"image/tiff",{bandNames:d}=this.coverageInfo,{boundedBy:f,domainSet:m,rangeType:h}=r,g=f.isEastFirst?0:1,v=1-g,{axisLabels:y}=f,w=y[g],x=y[v],b=`http://www.opengis.net/def/crs/EPSG/0/${e.spatialReference.wkid}`,C=b,I=[];I.push(`${w}(${e.xmin},${e.xmax})`),I.push(`${x}(${e.ymin},${e.ymax})`);const S=[];if(y.length>2)for(let e=2;e<y.length;e++){const t=m.origin[e];if(y[e].toLowerCase().includes("time")){let n=t.toString();f.uomLabels?.[e].toLowerCase().includes("ole")&&(S.push(y[e]),n=be(t,!0)),I.push(y[e]+",http://www.opengis.net("+n+")")}else I.push(y[e]+",http://www.opengis.net("+t+")")}let A=null;if(null!=o&&o.length){const e=[];h.forEach(t=>t.forEach(t=>e.push(t.name)));const t=[];for(let n=0;n<o.length;n++){const i=y.find(e=>e===o[n].dimensionName),s=e.find(e=>e===o[n].variableName);if(t.includes(s)||t.push(s),i){let e=o[n].values;if(e.length>0){Array.isArray(e[0])&&(e=e[0]);let t="";t=i.toLowerCase().includes("time")?e.map(e=>be(e)).join(","):e.join(",");const n=I.findIndex(e=>e.startsWith(i+",http://www.opengis.net"));-1===n&&I.push(i+",http://www.opengis.net("+t+")"),-1===n||I[n].includes("("+t+")")||I.splice(n,1,i+",http://www.opengis.net("+t+")")}}}t.length&&(A=t.join(","))}else d?.length>=2&&(A=(s.bandIds?s.bandIds.map(e=>d[e]):d).join(","));const M=I.join("&subset="),R=!r.domainSet.hasSameAxisLabelsAsBoundedBy&&!1!==this.ioConfig.allowScaleFactor,D=R?null:`${w}(${t}),${x}(${n})`,T=R?1/i:null;return{service:"WCS",request:"GetCoverage",version:this.version,coverageId:this.coverageId,rangesubset:A,interpolation:u,scaleSize:D,scaleFactor:T,subset:M,format:p,mediaType:this.ioConfig.allowAnyMediaType?null:"multipart/related",outputcrs:b,subsettingcrs:C}}_constructWCS201Url(e){const t={...this.ioConfig.customFetchParameters,...e},n=[];return Object.keys(t).forEach(e=>{const i=t[e];null!=i&&("subset"===e?"string"==typeof i&&i.split("&subset=").forEach(e=>{e&&n.push(`subset=${encodeURIComponent(e)}`)}):n.push(`${e}=${encodeURIComponent(i)}`))}),`${encodeURI(this.url)}?${n.join("&")}`}};function be(e,t=!1){return(t?new Date((0,q.$E)(e)):new Date(e)).toISOString()}(0,i.Cg)([(0,c.MZ)({type:String,json:{write:!0}})],xe.prototype,"datasetFormat",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],xe.prototype,"tileType",void 0),(0,i.Cg)([(0,c.MZ)({type:String,json:{write:!0}})],xe.prototype,"version",void 0),(0,i.Cg)([(0,c.MZ)({type:String,json:{write:!0}})],xe.prototype,"coverageId",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],xe.prototype,"rasterId",null),xe=(0,i.Cg)([(0,d.$)("esri.layers.support.rasterDatasets.WCSRaster")],xe);var Ce=n(30291);const Ie=new Set(["milliseconds","seconds","minutes","hours","days","weeks","months","years","decades","centuries"]);let Se=class extends((0,w.dM)((0,M.j)((0,C.q)((0,I.A)((0,x.d)((0,b.o)((0,S.G)((0,R.e)((0,A.J)((0,a.P)((0,r.OU)(y.A)))))))))))){constructor(...e){super(...e),this.coverageId=null,this.version=null,this.isReference=null,this.graphicOrigin=new v(this),this.legendEnabled=!0,this.noData=0,this.operationalLayerType="WCS",this.type="wcs",this.popupEnabled=!0,this.popupTemplate=null,this.fields=null,this._debouncedSaveOperations=(0,l.sg)(async(e,t,i)=>{const{save:s,saveAs:r}=await n.e(9838).then(n.bind(n,59838));switch(e){case 0:return s(this,t);case 1:return r(this,i,t)}})}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["WCS"]},e).catch(l.QP).then(()=>this._openRaster(t))),Promise.resolve(this)}get renderer(){return super.renderer}set renderer(e){super.renderer=e}get coverageInfo(){return this.raster.coverageInfo}get defaultPopupTemplate(){return this.createPopupTemplate()}get rasterFields(){const e=[(0,P.rZ)("Pixel Value")],t=this.raster?.rasterInfo??this.serviceRasterInfo,n=t?.multidimensionalInfo;if(n){const t=(0,P.AL)(n);e.push(...t)}return e}createPopupTemplate(e){return(0,Ce.tn)({fields:this.rasterFields,title:this.title},e)}async save(e){return this._debouncedSaveOperations(0,e)}async saveAs(e,t){return this._debouncedSaveOperations(1,t,e)}async _openRaster(e){const t=new xe({url:this.url,version:this.version,coverageId:this.coverageId,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters}});if(await t.open({signal:e}),!t.rasterInfo)throw t.destroy(),new o.A("wcs-layer:load","cannot load resources on "+this.url);const{rasterInfo:n}=t;null==n.noDataValue&&(n.noDataValue=this.noData),this._set("serviceRasterInfo",n),this._set("spatialReference",n.spatialReference),null==this.title&&this.setAtOrigin("title",t.datasetName,"service"),null==this.coverageId&&this.setAtOrigin("coverageId",t.coverageInfo.id,"service"),null==this.version&&t.version&&this.setAtOrigin("version",t.version,"service"),this.setAtOrigin("tileInfo",t.rasterInfo.storageInfo.tileInfo,"service");const{multidimensionalInfo:i}=n;if(null!=i){const e=i.variables[0].dimensions.find(({name:e})=>"StdTime"===e);if(e){let t=e.extent?.[0]??e.values[0];Array.isArray(t)&&(t=t[0]);let n=e.extent?.[1]??e.values[e.values.length-1];Array.isArray(n)&&(n=n[1]);const i=Ie.has(e.intervalUnit?.toLowerCase())?e.intervalUnit?.toLowerCase():null;this.set("timeInfo",{startField:"StdTime",fullTimeExtent:{start:t,end:n},timeZone:null,interval:i?{value:e.interval,unit:i}:null})}}this.raster=t,this._configDefaultSettings(),this.addHandles((0,u.wB)(()=>this.customParameters,e=>this.raster.ioConfig.customFetchParameters=e))}};(0,i.Cg)([(0,c.MZ)({type:String,nonNullable:!0,json:{name:"wcsInfo.coverageId",write:{isRequired:!0,ignoreOrigin:!0}}})],Se.prototype,"coverageId",void 0),(0,i.Cg)([(0,c.MZ)()],Se.prototype,"coverageInfo",null),(0,i.Cg)([(0,c.MZ)({type:["1.0.0","1.1.0","1.1.1","1.1.2","2.0.1"],nonNullable:!0,json:{name:"wcsInfo.version",write:{isRequired:!0,ignoreOrigin:!0}}})],Se.prototype,"version",void 0),(0,i.Cg)([(0,c.MZ)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],Se.prototype,"isReference",void 0),(0,i.Cg)([(0,c.MZ)({json:{read:!0,write:!0}})],Se.prototype,"blendMode",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0,clonable:!1})],Se.prototype,"graphicOrigin",void 0),(0,i.Cg)([(0,c.MZ)(D.fV)],Se.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,c.MZ)({type:["show","hide"]})],Se.prototype,"listMode",void 0),(0,i.Cg)([(0,c.MZ)()],Se.prototype,"noData",void 0),(0,i.Cg)([(0,c.MZ)({type:["WCS"]})],Se.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,c.MZ)()],Se.prototype,"raster",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],Se.prototype,"type",void 0),(0,i.Cg)([(0,c.MZ)(D.M6)],Se.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,c.MZ)({type:s.A,json:{name:"popupInfo",write:!0}})],Se.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],Se.prototype,"defaultPopupTemplate",null),(0,i.Cg)([(0,c.MZ)({readOnly:!0,type:[T.A]})],Se.prototype,"fields",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0,type:[T.A]})],Se.prototype,"rasterFields",null),Se=(0,i.Cg)([(0,d.$)("esri.layers.WCSLayer")],Se);const Ae=Se},91218:(e,t,n)=>{n.r(t),n.d(t,{canProjectWithoutEngine:()=>Z,initializeProjection:()=>_,isEqualBaseGCS:()=>B,isLoaded:()=>P,isLoadedOrLoad:()=>L,isLoadedOrLoadFor:()=>O,load:()=>V,project:()=>$,projectExtent:()=>ne,projectMany:()=>E,projectMultipoint:()=>K,projectOrLoad:()=>k,projectOrLoadMany:()=>j,projectPoint:()=>U,projectPolygon:()=>ee,projectPolyline:()=>Q,projectWithZConversion:()=>q,projectWithoutEngine:()=>z,requiresLoad:()=>N,test:()=>F,tryProjectWithZConversion:()=>W,unload:()=>X});var i=n(49186),s=n(74887),r=n(62788),o=n(95488),a=n(51850),l=n(21276),u=n(73941),c=n(5443),p=n(91075),d=n(48526),f=n(86738),m=n(39829),h=n(82799),g=n(16930),v=n(159),y=n(9762),w=n(37539);function x(e,t,n,i,s,r){return b[0]=e,b[1]=t,b[2]=n,(0,y.projectBuffer)(b,i,0,s,r,0)}const b=(0,a.vt)();var C=n(21325),I=n(62815);let S=null,A=null,M=null,R=null,D={};const T=new o.I;function P(){return!!(A?.isLoaded()&&M?.isLoaded()&&R?.isLoaded())}function L(){return!!P()||((0,r.gc)(T),V(),!1)}function O(e,t){return!e||!t||Z(e,t)||L()}function N(e,t){return!Z(e,t)&&!P()}async function V(e){null==S&&(S=Promise.all([n.e(3276).then(n.bind(n,83276)).then(e=>(A=e,A.load())),n.e(8377).then(n.bind(n,8377)).then(e=>(M=e,M.load())),n.e(2158).then(n.bind(n,12158)).then(e=>(R=e,R.load()))])),await S,(0,s.Te)(e),T.notify()}function $(e,t,n){return Array.isArray(e)?0===e.length?[]:((0,l.H)(e),E(e,e[0].spatialReference,t,n)):((0,l.f)(e),E([e],e.spatialReference,t,n)[0])}function E(e,t,n,i){if(null==t||null==n)return e;if(Z(t,n,i))return e.map(e=>z(e,t,n));if(null==i?.geographicTransformation&&(0,u.jA)(t))return e.map(e=>z(e,t,g.A.WGS84)).map(e=>W(e,n));if(null==i?.geographicTransformation&&(0,u.jA)(n))return e.map(e=>W(e,g.A.WGS84)).map(e=>z(e,g.A.WGS84,n));if(!P())throw new G;if(!i?.geographicTransformation)if(i?.extendedParams)i={...i,geographicTransformation:R.getTransformation(t,n,i.areaOfInterestExtent)||new v.A};else if(!i?.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,n);let s=D[e];s||(s=R.getTransformation(t,n)||new v.A,D[e]=s),i={geographicTransformation:s}}return e[0].spatialReference||(e[0].spatialReference=t),e[0]instanceof p.A?A.executeMany(e,n,i):M.executeMany(e,n,i)}function k(e,t){const n=j([e],t);return null!=n.pending?{pending:n.pending,geometry:null}:null!=n.geometries?{pending:null,geometry:n.geometries[0]}:{pending:null,geometry:null}}function j(e,t){if(!P())for(const n of e)if(null!=n&&!(0,C.aI)(n.spatialReference,t)&&(0,C.fn)(n.spatialReference)&&(0,C.fn)(t)&&!Z(n.spatialReference,t))return(0,r.gc)(T),{pending:V(),geometries:null};return{pending:null,geometries:e.map(e=>null==e?null:(0,C.aI)(e.spatialReference,t)?e:(0,C.fn)(e.spatialReference)&&(0,C.fn)(t)?W(e,t):null)}}class G extends i.A{constructor(){super("projection:not-loaded","projection engine not fully loaded yet, please call load()")}}function X(){S=null,A=null,M=null,R=null,D={}}const F={get loadPromise(){return S}};function W(e,t){try{const n=$(e,t);if(null==n)return null;"xmin"in e&&"xmin"in n&&(n.zmin=e.zmin,n.zmax=e.zmax);const i=(0,I.N)(n.type,e.spatialReference,t);return null!=i&&i(n),n}catch(e){if(!(e instanceof G))throw e;return null}}async function q(e,t,n){const i=e.spatialReference;return null!=i&&null!=t&&await _(i,t,null,n),W(e,t)}function Z(e,t,n){return!(n?.areaOfInterestExtent||n?.extendedParams||n?.geographicTransformation)&&(!!(0,C.aI)(e,t)||(0,C.fn)(e)&&(0,C.fn)(t)&&!!(0,w.jd)(e,t))}function B(e,t){if((0,C.aI)(e,t))return!0;if(!(0,C.fn)(e)||!(0,C.fn)(t))return!1;const n=(0,C.oT)(e)||(0,C.K8)(e)||(0,C.x1)(e),i=(0,C.oT)(t)||(0,C.K8)(t)||(0,C.x1)(t);return n&&i}async function _(e,t,n,i){if(P())return(0,s.NO)(i);if(Array.isArray(e)){for(const{source:t,dest:n,options:s}of e)if(t&&n&&!Z(t,n,s))return V(i)}else if(e&&t&&!Z(e,t,n))return V(i);return(0,s.NO)(i)}function z(e,t,n){return e?"x"in e?H(e,t,new f.A,n,0):"xmin"in e?ie(e,t,new c.A,n,0):"rings"in e?te(e,t,new m.A,n,0):"paths"in e?J(e,t,new h.A,n,0):"points"in e?Y(e,t,new d.A,n,0):null:null}function U(e,t,n=t.spatialReference,i=0){return null!=n&&null!=e.spatialReference&&null!=H(e,e.spatialReference,t,n,i)}function H(e,t,n,i,s){re[0]=e.x,re[1]=e.y;const r=e.z;return re[2]=void 0!==r?r:s,(0,y.projectBuffer)(re,t,0,re,i,0)?(n.x=re[0],n.y=re[1],n.spatialReference=i,void 0!==r||(0,u.xP)(i)?(n.z=re[2],n.hasZ=!0):(n.z=void 0,n.hasZ=!1),void 0===e.m?(n.m=void 0,n.hasM=!1):(n.m=e.m,n.hasM=!0),n):null}function K(e,t,n=t.spatialReference,i=0){return null!=e.spatialReference&&null!=n&&null!=Y(e,e.spatialReference,t,n,i)}function Y(e,t,n,i,s){const{points:r,hasZ:o,hasM:a}=e,l=[],c=r.length,p=[];for(const e of r)p.push(e[0],e[1],o?e[2]:s);if(!(0,y.projectBuffer)(p,t,0,p,i,0,c))return null;const d=o||(0,u.xP)(i);for(let e=0;e<c;++e){const t=3*e,n=p[t],i=p[t+1];d&&a?l.push([n,i,p[t+2],r[e][3]]):d?l.push([n,i,p[t+2]]):a?l.push([n,i,r[e][2]]):l.push([n,i])}return n.points=l,n.spatialReference=i,n.hasZ=o,n.hasM=a,n}function Q(e,t,n=t.spatialReference,i=0){return null!=e.spatialReference&&null!=n&&null!=J(e,e.spatialReference,t,n,i)}function J(e,t,n,i,s){const{paths:r,hasZ:o,hasM:a}=e,l=[];if(!se(r,o??!1,a??!1,t,l,i,s))return null;const c=o||(0,u.xP)(i);return n.paths=l,n.spatialReference=i,n.hasZ=c,n.hasM=a,n}function ee(e,t,n=t.spatialReference,i=0){return null!=e.spatialReference&&null!=n&&null!=te(e,e.spatialReference,t,n,i)}function te(e,t,n,i,s){const{rings:r,hasZ:o,hasM:a}=e,l=[];if(!se(r,o??!1,a??!1,t,l,i,s))return null;const c=o||(0,u.xP)(i);return n.rings=l,n.spatialReference=i,n.hasZ=c,n.hasM=a,n}function ne(e,t,n=t.spatialReference,i=0){return null!=e.spatialReference&&null!=n&&null!=ie(e,e.spatialReference,t,n,i)}function ie(e,t,n,i,s){const{xmin:r,ymin:o,xmax:a,ymax:l,hasZ:c,hasM:p}=e;if(!x(r,o,c?e.zmin:s,t,re,i))return null;const d=c||(0,u.xP)(i);return n.xmin=re[0],n.ymin=re[1],d&&(n.zmin=re[2]),x(a,l,c?e.zmax:s,t,re,i)?(n.xmax=re[0],n.ymax=re[1],d&&(n.zmax=re[2]),p&&(n.mmin=e.mmin,n.mmax=e.mmax),n.spatialReference=i,n):null}function se(e,t,n,i,s,r,o=0){const a=new Array;for(const n of e)for(const e of n)a.push(e[0],e[1],t?e[2]:o);if(!(0,y.projectBuffer)(a,i,0,a,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 i of t)c&&n?e.push([a[l++],a[l++],a[l++],i[3]]):c?e.push([a[l++],a[l++],a[l++]]):n?(e.push([a[l++],a[l++],i[2]]),l++):(e.push([a[l++],a[l++]]),l++);s.push(e)}return!0}const re=(0,a.vt)()},99157:(e,t,n)=>{n.d(t,{A:()=>l});var i,s=n(31635),r=n(69622),o=n(10107),a=(n(44208),n(53966),n(87811),n(64108));let l=i=class extends r.A{constructor(e){super(e),this.isInverse=!1,this.wkt=null,this.wkid=null}getInverse(){return new i({isInverse:!this.isInverse,wkid:this.wkid,wkt:this.wkt})}};(0,s.Cg)([(0,o.MZ)()],l.prototype,"isInverse",void 0),(0,s.Cg)([(0,o.MZ)()],l.prototype,"wkt",void 0),(0,s.Cg)([(0,o.MZ)()],l.prototype,"wkid",void 0),l=i=(0,s.Cg)([(0,a.$)("esri.geometry.operators.support.GeographicTransformationStep")],l)}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5369],{159:(e,t,n)=>{n.d(t,{A:()=>u});var i,s=n(31635),r=n(69622),o=n(10107),a=(n(44208),n(53966),n(87811),n(64108)),l=n(99157);let u=i=class extends r.A{constructor(e){super(e),this.steps=[]}getInverse(){const e=new i;for(let t=this.steps.length-1;t>=0;t--){const n=this.steps[t];e.steps.push(n.getInverse())}return e}};(0,s.Cg)([(0,o.MZ)({type:[l.A],nonNullable:!0})],u.prototype,"steps",void 0),u=i=(0,s.Cg)([(0,a.$)("esri.geometry.operators.support.GeographicTransformation")],u)},9762:(e,t,n)=>{n.r(t),n.d(t,{projectBuffer:()=>s});var i=n(37539);function s(e,t,n,s,r,o,a=Math.floor(e.length/3)){const l=(0,i.jd)(t,r);if(null==l)return!1;if(l===i.pO){if(e===s&&n===o)return!0;const t=n+3*a;for(let i=n,r=o;i<t;i++,r++)s[r]=e[i];return!0}const u=n+3*a;for(let t=n,i=o;t<u;t+=3,i+=3)l(e,t,s,i);return!0}},37539:(e,t,n)=>{n.d(t,{pO:()=>h,jd:()=>d,Tp:()=>f,w5:()=>p});var i=n(34727),s=n(83047),r=n(73941),o=n(79258);Math.PI;const a=o.$O.radius,l=o.$O.eccentricitySquared,u={a1:a*l,a2:a*l*a*l,a3:a*l*l/2,a4:a*l*a*l*2.5,a5:a*l+a*l*l/2,a6:1-l};o.$O.radius,o.$O.flattening,o.Sw.radius,o.Sw.flattening,o.sH.radius,o.sH.flattening,o.sH.radius;var c=n(21325);const p={2:{5:h,7:null,9:null,10:h,1:I,6:null,8:null,0:null,3:v,11:y,2:h,4:D},5:{5:h,7:null,9:null,10:h,1:I,6:null,8:null,0:null,3:v,11:y,2:h,4:D},7:{5:null,7:h,9:null,10:h,1:null,6:C,8:null,0:null,3:null,11:null,2:null,4:null},9:{5:null,7:null,9:h,10:h,1:null,6:null,8:b,0:null,3:null,11:null,2:null,4:null},3:{5:g,7:null,9:null,10:g,1:function(e,t,n,i){const s=e[t]/V,r=N-2*Math.atan(Math.exp(-e[t+1]/V)),o=V+e[t+2],a=Math.cos(r)*o;n[i]=Math.cos(s)*a,n[i+1]=Math.sin(s)*a,n[i+2]=Math.sin(r)*o},6:null,8:null,0:null,3:h,11:function(e,t,n,i){g(e,t,n,i),y(n,i,n,i)},2:g,4:function(e,t,n,i){g(e,t,n,i),D(n,i,n,i)}},4:{5:T,7:null,9:null,10:T,1:function(e,t,n,i){T(e,t,n,i),I(n,i,n,i)},6:null,8:null,0:null,3:function(e,t,n,i){T(e,t,n,i),v(n,i,n,i)},11:function(e,t,n,i){T(e,t,n,i),y(n,i,n,i)},2:T,4:h},1:{5:R,7:null,9:null,10:R,1:h,6:null,8:null,0:null,3:function(e,t,n,i){R(e,t,n,i),v(n,i,n,i)},11:function(e,t,n,i){R(e,t,n,i),y(n,i,n,i)},2:R,4:function(e,t,n,i){R(e,t,n,i),D(n,i,n,i)}},6:{5:null,7:M,9:null,10:M,1:null,6:h,8:null,0:null,3:null,11:null,2:null,4:null},8:{5:null,7:null,9:A,10:A,1:null,6:null,8:h,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:h,3:null,11:null,2:null,4:null},10:{5:h,7:h,9:h,10:h,1:I,6:C,8:b,0:null,3:v,11:y,2:h,4:D},11:{5:w,7:null,9:null,10:w,1:function(e,t,n,i){w(e,t,n,i),I(n,i,n,i)},6:null,8:null,0:null,3:function(e,t,n,i){w(e,t,n,i),v(n,i,n,i)},11:h,2:w,4:function(e,t,n,i){w(e,t,n,i),D(n,i,n,i)}}};function d(e,t){return f(e,t)?.projector}function f(e,t){if(null==e||null==t)return null;if(P.source.spatialReference===e&&P.dest.spatialReference===t)return P;const n=m(e,P.source),i=m(t,P.dest);return 0===n&&0===i?(0,c.aI)(e,t)?P.projector=h:P.projector=null:P.projector=p[n][i],P}function m(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 h(e,t,n,i){e!==n&&(n[i++]=e[t++],n[i++]=e[t++],n[i]=e[t])}function g(e,t,n,i){n[i]=O*(e[t]/V),n[i+1]=O*(N-2*Math.atan(Math.exp(-e[t+1]/V))),n[i+2]=e[t+2]}function v(e,t,n,s){!function(e,t,n,s,r){const o=.4999999*Math.PI,a=(0,i.qE)(L*e[t+1],-o,o),l=Math.sin(a);n[s++]=L*e[t]*r.radius,n[s++]=r.halfSemiMajorAxis*Math.log((1+l)/(1-l)),n[s]=e[t+2]}(e,t,n,s,o.$O)}function y(e,t,n,i){n[i]=e[t]*$,n[i+1]=e[t+1]*$,n[i+2]=e[t+2]}function w(e,t,n,i){n[i]=e[t]*E,n[i+1]=e[t+1]*E,n[i+2]=e[t+2]}function x(e,t,n,i,s){const r=s+e[t+2],o=L*e[t+1],a=L*e[t],l=Math.cos(o)*r;n[i]=Math.cos(a)*l,n[i+1]=Math.sin(a)*l,n[i+2]=Math.sin(o)*r}function b(e,t,n,i){x(e,t,n,i,o.Sw.radius)}function C(e,t,n,i){x(e,t,n,i,o.sH.radius)}function I(e,t,n,i){x(e,t,n,i,o.$O.radius)}function S(e,t,n,s,r){const o=e[t],a=e[t+1],l=e[t+2],u=Math.sqrt(o*o+a*a+l*l),c=(0,i.YN)(l/(0===u?1:u)),p=Math.atan2(a,o);n[s++]=O*p,n[s++]=O*c,n[s]=u-r}function A(e,t,n,i){S(e,t,n,i,o.Sw.radius)}function M(e,t,n,i){S(e,t,n,i,o.sH.radius)}function R(e,t,n,i){S(e,t,n,i,o.$O.radius)}function D(e,t,n,i){!function(e,t,n,i,s){const r=L*e[t],o=L*e[t+1],a=e[t+2],l=Math.sin(o),u=Math.cos(o),c=s.radius/Math.sqrt(1-s.eccentricitySquared*l*l);n[i++]=(c+a)*u*Math.cos(r),n[i++]=(c+a)*u*Math.sin(r),n[i++]=(c*(1-s.eccentricitySquared)+a)*l}(e,t,n,i,o.$O)}function T(e,t,n,i){const s=u,r=e[t],a=e[t+1],l=e[t+2];let c,p,d,f,m,h,g,v,y,w,x,b,C,I,S,A,M,R,D,T,P;c=Math.abs(l),p=r*r+a*a,d=Math.sqrt(p),f=p+l*l,m=Math.sqrt(f),T=Math.atan2(a,r),h=l*l/f,g=p/f,I=s.a2/m,S=s.a3-s.a4/m,g>.3?(v=c/m*(1+g*(s.a1+I+h*S)/m),D=Math.asin(v),w=v*v,y=Math.sqrt(1-w)):(y=d/m*(1-h*(s.a5-I-g*S)/m),D=Math.acos(y),w=1-y*y,v=Math.sqrt(w)),x=1-o.$O.eccentricitySquared*w,b=o.$O.radius/Math.sqrt(x),C=s.a6*b,I=d-b*y,S=c-C*v,M=y*I+v*S,A=y*S-v*I,R=A/(C/x+M),D+=R,P=M+A*R/2,l<0&&(D=-D),n[i++]=O*T,n[i++]=O*D,n[i]=P}const P={source:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},dest:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},projector:h},L=(0,i.kU)(1),O=(0,i.KJ)(1),N=.5*Math.PI,V=o.$O.radius,$=V*Math.PI/180,E=180/(V*Math.PI)},38458:(e,t,n)=>{n.d(t,{m:()=>s});const i=[[3819,3819],[3821,3824],[3889,3889],[3906,3906],[4001,4025],[4027,4036],[4039,4047],[4052,4055],[4074,4075],[4080,4081],[4120,4176],[4178,4185],[4188,4216],[4218,4289],[4291,4304],[4306,4319],[4322,4326],[4463,4463],[4470,4470],[4475,4475],[4483,4483],[4490,4490],[4555,4558],[4600,4646],[4657,4765],[4801,4811],[4813,4821],[4823,4824],[4901,4904],[5013,5013],[5132,5132],[5228,5229],[5233,5233],[5246,5246],[5252,5252],[5264,5264],[5324,5340],[5354,5354],[5360,5360],[5365,5365],[5370,5373],[5381,5381],[5393,5393],[5451,5451],[5464,5464],[5467,5467],[5489,5489],[5524,5524],[5527,5527],[5546,5546],[2044,2045],[2081,2083],[2085,2086],[2093,2093],[2096,2098],[2105,2132],[2169,2170],[2176,2180],[2193,2193],[2200,2200],[2206,2212],[2319,2319],[2320,2462],[2523,2549],[2551,2735],[2738,2758],[2935,2941],[2953,2953],[3006,3030],[3034,3035],[3038,3051],[3058,3059],[3068,3068],[3114,3118],[3126,3138],[3150,3151],[3300,3301],[3328,3335],[3346,3346],[3350,3352],[3366,3366],[3389,3390],[3416,3417],[3833,3841],[3844,3850],[3854,3854],[3873,3885],[3907,3910],[4026,4026],[4037,4038],[4417,4417],[4434,4434],[4491,4554],[4839,4839],[5048,5048],[5105,5130],[5253,5259],[5269,5275],[5343,5349],[5479,5482],[5518,5519],[5520,5520],[20004,20032],[20064,20092],[21413,21423],[21473,21483],[21896,21899],[22171,22177],[22181,22187],[22191,22197],[25884,25884],[27205,27232],[27391,27398],[27492,27492],[28402,28432],[28462,28492],[30161,30179],[30800,30800],[31251,31259],[31275,31279],[31281,31290],[31466,31700]];function s(e){return null!=e&&i.some(([t,n])=>e>=t&&e<=n)}},62815:(e,t,n)=>{n.d(t,{N:()=>o});var i=n(83047),s=n(73941),r=n(21325);function o(e,t,n){if(null==t||null==n||n.vcsWkid||(0,r.aI)(t,n)||(0,s.xP)(t)||(0,s.xP)(n))return null;const o=(0,i.G9)(t)/(0,i.G9)(n);if(1===o)return null;switch(e){case"point":case"esriGeometryPoint":return e=>function(e,t){null!=e?.z&&(e.z*=t)}(e,o);case"polyline":case"esriGeometryPolyline":return e=>function(e,t){if(e)for(const n of e.paths)for(const e of n)e.length>2&&(e[2]*=t)}(e,o);case"polygon":case"esriGeometryPolygon":return e=>function(e,t){if(e)for(const n of e.rings)for(const e of n)e.length>2&&(e[2]*=t)}(e,o);case"multipoint":case"esriGeometryMultipoint":return e=>function(e,t){if(e)for(const n of e.points)n.length>2&&(n[2]*=t)}(e,o);case"extent":case"esriGeometryEnvelope":return e=>function(e,t){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=t,e.zmax*=t)}(e,o);default:return null}}},88854:(e,t,n)=>{n.r(t),n.d(t,{default:()=>Ae});var i=n(31635),s=n(37838),r=n(69540),o=n(49186),a=n(25728),l=n(74887),u=n(36708),c=n(10107),p=(n(44208),n(53966)),d=(n(87811),n(64108)),f=n(89808),m=n(99959);const h=Symbol("isWCSGraphicOrigin");var g;class v extends m.A{get[(g=h,f.Q)](){return this.layer}constructor(e){super(),this[g]=!0,this.type="wcs",this.layer=e}get id(){return this.layer.id}}var y=n(4146),w=n(63074),x=n(69208),b=n(89015),C=n(16131),I=n(8303),S=n(63660),A=n(54310),M=n(25036),R=n(82935),D=n(10873),T=n(20437),P=n(74797),L=n(5443),O=n(38458),N=n(43773),V=n(50103);function $(e){return e.endsWith("?")?e.slice(0,-1):e}function E(e){return e.filter(({coverageSubType:e})=>null==e||""===e||/^rectified(grid|dataset)/i.test(e))}function k(e){const t={};for(let n=0;n<e.childNodes.length;n++){const i=e.childNodes[n];if(1!==i.nodeType)continue;const s=(0,V.vv)(i).toLowerCase();switch(s){case"title":case"abstract":t[s]=(0,V.mX)(i);break;case"identifier":t.id=(0,V.mX)(i);break;case"wgs84boundingbox":{const e=(0,V.pN)(i,"LowerCorner"),n=(0,V.pN)(i,"UpperCorner");t.lonLatEnvelope=new L.A({xmin:e[0],ymin:e[1],xmax:n[0],ymax:n[1],spatialReference:{wkid:4326}})}break;case"coveragesummary":t.coverageSummaries=t.coverageSummaries||[],t.coverageSummaries.push(k(i))}}return t}function j(e,t){if(e.coverageSummaries)for(let n=0;n<e.coverageSummaries.length;n++)e.coverageSummaries[n].abstract=e.coverageSummaries[n].abstract||e.abstract,e.coverageSummaries[n].lonLatEnvelope=e.coverageSummaries[n].lonLatEnvelope||e.lonLatEnvelope,e.coverageSummaries[n].title=e.coverageSummaries[n].title||e.title,j(e.coverageSummaries[n],t);null!=e.id&&t.push(e)}function G(e){const t=(0,V.V6)(e.querySelector("Operation[name=GetCapabilities]"),"Get")?.getAttribute("xlink:href")||"",n=(0,V.V6)(e.querySelector("Operation[name=DescribeCoverage]"),"Get")?.getAttribute("xlink:href")||"",i=(0,V.V6)(e.querySelector("Operation[name=GetCoverage]"),"Get")?.getAttribute("xlink:href")||"";return{getCapabilities:$(t),describeCoverage:$(n),getCoverage:$(i)}}function X(e,t=null){let n=null;n="string"==typeof e?(new DOMParser).parseFromString(e,"text/xml"):e;let i=n.documentElement.getAttribute("version");"1.0"===i?i="1.0.0":"1.1"===i&&(i="1.1.0");const s=i||t||"1.0.0",r=s.slice(0,3);let a;if("2.0"===r)a=function(e){const t=(0,V.V6)(e,"ServiceIdentification"),n=(0,V.mX)(t,"Title"),i=(0,V.Dy)(t,"ServiceTypeVersion"),s=(0,V.Dy)(t,"Profile"),r=G((0,V.V6)(e,"OperationsMetadata")),o=(0,V.IC)(e,"Contents/CoverageSummary"),a=[];for(let e=0;e<o.length;e++){const t=o[e],n=(0,V.mX)(t,"CoverageId"),i=(0,V.V6)(t,"WGS84BoundingBox");let s;if(i){const e=(0,V.pN)(i,"LowerCorner"),t=(0,V.pN)(i,"UpperCorner");s=new L.A({xmin:e[0],ymin:e[1],xmax:t[0],ymax:t[1],spatialReference:{wkid:4326}})}const r=(0,V.mX)(t,"CoverageSubtype")||"RectifiedGridCoverage";a.push({id:n,lonLatEnvelope:s,coverageSubType:r})}const l=(0,V.V6)(e,"ServiceMetadata");return{name:n,supportedVersions:i,supportedFormats:(0,V.Dy)(l,"formatSupported"),supportedInterpolations:(0,V.Dy)(l,"interpolationSupported").concat((0,V.Dy)(l,"InterpolationSupported")),onlineResources:r,profiles:s,coverages:a,gridCoverages:E(a),version:"2.0.1"}}(n);else if("1.1"===r)a=function(e){const t=(0,V.mX)(e,"ServiceIdentification/Title"),n=(0,V.Dy)(e,"ServiceIdentification/ServiceTypeVersion"),i=G((0,V.V6)(e,"OperationsMetadata")),s=[],r=(0,V.V6)(e,"Contents");for(let e=0;e<r.childNodes.length;e++){const t=r.childNodes[e];1===t.nodeType&&(0,V.g7)(t,"CoverageSummary")&&j(k(t),s)}const o=(0,V.Dy)(r,"SupportedFormat");return{name:t,onlineResources:i,coverages:s,gridCoverages:E(s),supportedVersions:n,supportedFormats:o,version:"1.1.0"}}(n);else{if("1.0"!==r)throw new o.A("wcsraster:parsecapabilities","the capabilities version is not supported");a=function(e){const t=(0,V.mX)(e,"Service/name"),n=(0,V.V6)(e,"Capability"),i=(0,V.V6)(n,"GetCapabilities/Get/OnlineResource")?.getAttribute("xlink:href")??"",s=(0,V.V6)(n,"DescribeCoverage/Get/OnlineResource")?.getAttribute("xlink:href")??"",r=(0,V.V6)(n,"GetCoverage/Get/OnlineResource")?.getAttribute("xlink:href")??"",o={getCapabilities:$(i),describeCoverage:$(s),getCoverage:$(r)},a=(0,V.IC)(e,"CoverageOfferingBrief"),l=[];for(let e=0;e<a.length;e++){const t=a[e],n=(0,V.mX)(t,"name"),i=(0,V.IC)(t,"pos"),s=(0,V.pN)(i[0]),r=(0,V.pN)(i[1]),o=new L.A({xmin:s[0],ymin:s[1],xmax:r[0],ymax:r[1],spatialReference:{wkid:4326}});l.push({id:n,lonLatEnvelope:o})}return{name:t,onlineResources:o,coverages:l,gridCoverages:E(l),supportedVersions:["1.0.0"],version:"1.0.0"}}(n)}return a.version=s,a}var F=n(39829),W=n(87186),q=n(77301);function Z(e){e.variables.forEach(e=>e.dimensions.forEach(e=>e.values??=(0,q.Xg)(e)))}function B(e){return{requestResponseCRSs:(0,V.Dy)(e,"requestResponseCRSs").map(e=>e.split(":")[1]),nativeCRSs:(0,V.Dy)(e,"nativeCRSs").map(e=>e.split(":")[1])}}function _(e,t){const n=(0,V.Dy)(e,"1.0.0"===t?"interpolationMethod":"InterpolationMethod"),i="1.0.0"===t?e.getAttribute("default"):(0,V.mX)(e,"InterpolationMethods/Default");return null!=i?[i].concat(n.filter(e=>e.toLowerCase()!==i.toLowerCase())):n}function z(e){return null==e?["nearest"]:e.map(e=>{const t=e.toLowerCase();return t.includes("nearest")?"nearest":t.includes("linear")?"bilinear":t.includes("cubic")?"cubic":null}).filter(e=>!!e)}function U(e){const t=(0,V.IC)(e,"pos"),n=(0,V.pN)(t[0]),i=(0,V.pN)(t[1]);return new L.A({xmin:n[0],ymin:n[1],xmax:i[0],ymax:i[1],spatialReference:{wkid:4326}})}function H(e,t){const n=(0,V.Dy)(e,t);return n?.length&&""!==n[0]&&!isNaN(Number(n[0]))?n.map(e=>Number(e)):null}function K(e){const t=(0,V.pN)(e,"MinimumValue"),n=(0,V.pN)(e,"MaximumValue");return t.length&&n.length?t.map((e,t)=>({min:e,max:n[t],avg:-1,stddev:-1})):null}function Y(e){return null==e?null:e.every(t=>t===e[0])?e[0]:e}function Q(e){const t=[],n=(0,V.IC)(e,"RangeSet");let i=[];for(let e=0;e<n.length;e++){const s=(0,V.mX)(n[e],"name"),r=(0,V.mX)(n[e],"label"),o=[],a=H(n[e],"nullValues/singleValue"),l=(0,V.IC)(n[e],"AxisDescription");for(let e=0;e<l.length;e++){const t=(0,V.mX)(l[e],"name"),n=(0,V.mX)(l[e],"label"),s=(0,V.Dy)(l[e],"singleValue");if(0===s.length){const t=(0,V.mX)(l[e],"min"),n=(0,V.mX)(l[e],"max"),i=Number((0,V.mX)(l[e],"res"))||1;if(null!==t&&null!==n)for(let e=parseInt(t,10);e<=parseInt(n,10);e+=i)s.push(e.toString())}"band"===t.toLowerCase()&&(i=s),o.push({name:t,label:n,values:s})}t.push({name:s,label:r,nullValues:a,axis:o})}return{rangeSet:t,bandNames:i}}function J(e=null){if(!e)return{resolution:null,units:null};let t=e.toUpperCase();const n=["Years","Months","Days","Hours","Minutes","Seconds"];let i,s,r;return t.includes("PT")?(t=t.slice(2),r=["H","M","S"].findIndex(e=>t.includes(e)),i=n[3+r],s=parseFloat(t.slice(0,-1))):(t=t.slice(1),r=["Y","M","D"].findIndex(e=>t.includes(e)),r>-1&&(i=n[r]),s=parseFloat(t.slice(0,-1))),{resolution:s,units:i}}function ee(e){const t=(0,V.IC)(e,"timeposition");if(t.length>0){const e=[];for(let n=0;n<t.length;n++)e.push(new Date((0,V.mX)(t[n])));return{begin:e[0],end:e[e.length-1],values:e}}const n=(0,V.V6)(e,"timePeriod")||(0,V.V6)(e,"TimePeriod");return n?{begin:new Date((0,V.mX)(n,"beginPosition")||(0,V.mX)(n,"BeginPosition")),end:new Date((0,V.mX)(n,"endPosition")||(0,V.mX)(n,"EndPosition")),...J((0,V.mX)(n,"timeResolution")||(0,V.mX)(n,"TimeResolution"))}:null}function te(e){const t=(0,V.V6)(e,"spatialDomain"),n=(0,V.V6)(t,"Envelope")||(0,V.V6)(t,"EnvelopeWithTimePeriod"),i=n.getAttribute("srsName").split(":"),s=i[i.length-1],r=(0,V.IC)(n,"pos"),o=(0,V.pN)(r[0]),a=(0,V.pN)(r[1]),l=parseInt(s,10),u=isNaN(l)?null:{wkid:l},c=new L.A({xmin:o[0],ymin:o[1],xmax:a[0],ymax:a[1],spatialReference:u}),p=(0,V.V6)(t,"RectifiedGrid"),d=(0,V.mX)(p,"low").split(" "),f=(0,V.mX)(p,"high").split(" "),m=parseInt(f[0],10)-parseInt(d[0],10)+1,h=parseInt(f[1],10)-parseInt(d[1],10)+1,g=(0,V.pN)(t,"origin/pos"),v=(0,V.IC)(t,"offsetVector"),y={envelope:c,columns:m,rows:h,offset:{x:parseFloat((0,V.mX)(v[0]).split(" ")[0]),y:parseFloat((0,V.mX)(v[1]).split(" ")[1])},origin:{x:g[0],y:g[1]}},w=(0,V.V6)(e,"temporalDomain")||(0,V.V6)(e,"TemporalDomain");return{spatialDomain:y,temporalDomain:w?ee(w):null}}function ne(e,t){const n=[],i=(0,V.IC)(e,"Field");let s,r=[];for(let e=0;e<i.length;e++){const o=(0,V.mX)(i[e],"Identifier"),a=(0,V.mX)(i[e],"Description"),l=(0,V.mX)(i[e],"Definition"),u=(0,V.mX)(i[e],"Abstract"),c=(0,V.mX)(i[e],"Title"),p=H(i[e],"NullValue"),d=(0,V.V6)(i[e],"AllowedValues"),f=d?K(d):null,m=_(i[e],"1.1.0"),h=[],g=(0,V.IC)(i[e],"Axis");for(let e=0;e<g.length;e++){const n=g[e].getAttribute("identifier"),i=(0,V.mX)(g[e],"UOM"),o=(0,V.mX)(g[e],"DataType"),a=(0,V.Dy)(g[e],"Key");t&&!n.toLowerCase().includes("band")||(r=a,s=p),h.push({identifier:n,uom:i,dataType:o,values:a,bandNoDataValues:s})}n.push({identifier:o,description:a,definition:l,abstract:u,title:c,supportedInterpolations:m,axis:h,nullValues:p,statistics:f})}return{rangeSet:n,bandNames:r,bandNoDataValues:s,statistics:n[0].statistics}}function ie(e){const t=(0,V.V6)(e,"SpatialDomain"),n=(0,V.V6)(t,"GridCRS"),i=(0,V.mX)(n,"GridBaseCRS"),s=(0,V.mX)(n,"GridOrigin"),r=s?.split(" ").map(e=>parseFloat(e))??[0,0],o=(0,V.pN)(n,"GridOffsets"),a=(0,V.IC)(t,"BoundingBox");let l,u,c,p;for(let e=0;e<a.length;e++){const t=a[e].getAttribute("crs")?.toLowerCase();if(null!=t)if(t.includes("imagecrs")){const t=(0,V.pN)(a[e],"LowerCorner"),n=(0,V.pN)(a[e],"UpperCorner");l=n[0]-t[0]+1,u=n[1]-t[1]+1}else if(t.indexOf("epsg")>0){const n=t.split(":");c=parseInt(n[n.length-1],10);const i=(0,V.pN)(a[e],"LowerCorner"),s=(0,V.pN)(a[e],"UpperCorner");p=new L.A({xmin:i[0],ymin:i[1],xmax:s[0],ymax:s[1],spatialReference:{wkid:c}})}}const d=l>u,f=p.xmax-p.xmin>p.ymax-p.ymin;let m=!1;(0,O.m)(c)&&(d===f?m=!1:(m=!0,p=new L.A({xmin:p.ymin,ymin:p.xmin,xmax:p.ymax,ymax:p.xmax,spatialReference:{wkid:c}})));const h={columns:l,rows:u,origin:{x:r[0],y:r[1]},offset:{x:o[0],y:o[o.length-1]},gridBaseCRS:i,envelope:p,useEPSGAxis:m},g=(0,V.V6)(e,"temporalDomain")||(0,V.V6)(e,"TemporalDomain");return{spatialDomain:h,temporalDomain:g?ee(g):null}}function se(e){const t=(0,V.V6)(e,"Envelope")||(0,V.V6)(e,"EnvelopeWithTimePeriod"),n=t.getAttribute("srsName"),i=n.slice(n.lastIndexOf("/")+1),s=t.getAttribute("axisLabels").split(" ").map(e=>e.trim()).filter(e=>""!==e.trim()),r=(0,V.pN)(t,"lowerCorner"),o=(0,V.pN)(t,"upperCorner"),a=!["y","lat","latitude","north","nor","n","b"].includes(s[0].toLowerCase());let l;const u=parseInt(i,10),c=isNaN(u)?null:{wkid:u};l=new L.A(a?{xmin:r[0],ymin:r[1],xmax:o[0],ymax:o[1],spatialReference:c}:{xmin:r[1],ymin:r[0],xmax:o[1],ymax:o[0],spatialReference:c});const p={mins:r,maxs:o},d=t.getAttribute("uomLabels").trim().split(" ");let f,m;if((0,V.g7)(t,"EnvelopeWithTimePeriod")){f=new Date((0,V.mX)(e,"beginPosition")||(0,V.mX)(e,"BeginPosition")),m=new Date((0,V.mX)(e,"endPosition")||(0,V.mX)(e,"EndPosition"));const t=d?.findIndex(e=>"oledatetime"===e?.toLowerCase());t>-1&&(d[t]="ISO8601")}return{envelope:l,axisLabels:s,uomLabels:d.length?d:null,envelopeAllDims:p,beginPosition:f,endPosition:m,isEastFirst:a}}function re(e,t){const n=[],i=(0,V.IC)(e,"DataRecord"),s=[];let r,o=[];for(let e=0;e<i.length;e++){const a=(0,V.IC)(i[e],"field"),l=[];for(let e=0;e<a.length;e++){const n=a[e].getAttribute("name"),i=(0,V.mX)(a[e],"description")||"",u=(0,V.V6)(a[e],"uom")?.getAttribute("code")||"",c=(0,V.pN)(a[e],"interval"),p=H(a[e],"nilValue")?.[0];t&&!n.toLowerCase().includes("band")||(s.push(n),c?.length&&(r=r||[],r.push({min:c[0],max:c[1],avg:-1,stddev:-1})),o.push(p)),l.push({name:n,description:i,uom:u,allowedValues:c,nilValue:p})}n.push(l)}return o.some(e=>null!=e)||(o=null),{rangeType:n,bandNames:s,bandStats:r,bandNoDataValues:o}}function oe(e){let t=1,n="";const i=.01;return Math.abs(e-1/24)<1/24*i?n="Hours":Math.abs(e-1)<1*i?n="Days":e<1?(t=Math.round(24*e),n="Hours"):e>28-i&&e<31+i||Math.round(e/30)<12?n="Months":e>365-i&&e<366+i&&(n="Years"),{interval:t,intervalUnit:n}}function ae(e,t){const n=(0,V.V6)(e,"RectifiedGrid"),i=(0,V.pN)(n,"low"),s=(0,V.pN)(n,"high"),r=[];for(let e=0;e<i.length;e++)r.push(s[e]-i[e]+1);const o=(0,V.mX)(n,"axisLabels").split(" "),a=(0,V.pN)(n,"origin/pos"),l=(0,V.IC)(n,"offsetVector"),u=[];for(let e=0;e<l.length;e++){const t=(0,V.pN)(l[e]),n=t.findIndex(e=>0!==e);u[n]=t[n]}let c,p,d,f=!1;return t?.length&&o?.length&&(f=[...t].sort((e,t)=>e<t?-1:1).join(",")===[...o].sort((e,t)=>e<t?-1:1).join(",")),["y","lat","latitude","north","nor","n","b"].includes((f?o:t)[0].toLowerCase())?(c=r[1],p=r[0],d={y:Math.abs(u[0]),x:Math.abs(u[1])}):(c=r[0],p=r[1],d={x:Math.abs(u[0]),y:Math.abs(u[1])}),{columns:c,rows:p,origin:a,offset:u,resolution:d,gridSamples:r,axisLabels:o,hasSameAxisLabelsAsBoundedBy:f}}function le(e){const t=(0,V.V6)(e,"EarthObservation");if(!t)return null;const n=(0,V.V6)(t,"phenomenonTime"),i=n?ee(n):null,s=(0,V.V6)(t,"phenomenonTime"),r=s?ee(s):null,o=(0,V.mX)(t,"featureOfInterest/Footprint/multiExtentOf/MultiSurface/surfaceMembers/Polygon/exterior/LinearRing/posList");let a=null;if(o){const e=o.split(" ").map(e=>e.trim()).filter(e=>null!=e&&""!==e).map(Number);if(e.length){const t=[];for(let n=0;n<e.length/2;n+=2)t.push(e[n],e[n+1]);a=new F.A({rings:[[t]]})}}return{observation:{phenomenonTime:i,resultTime:r,footprint:a,identifier:(0,V.mX)(e,"metaDataProperty/EarthObservationMetaData/identifier"),acquisitionType:(0,V.mX)(e,"metaDataProperty/EarthObservationMetaData/acquisitionType"),status:(0,V.mX)(e,"metaDataProperty/EarthObservationMetaData/status")}}}async function ue(e,t){const{coverageIds:n,version:i,customParameters:s,signal:r}=t,a=i.slice(0,3),u="1.0"===a?"coverage":"1.1"===a?"identifiers":"coverageId",c={service:"WCS",request:"DescribeCoverage",version:i,[u]:n.join(","),...s};try{const{data:t}=await(0,N.A)(e,{query:c,responseType:"xml",signal:r});return function(e,t){let n=null;if(n="string"==typeof e?(new DOMParser).parseFromString(e,"text/xml"):e,"1.0.0"===t)return(0,V.IC)(n,"CoverageOffering").map(e=>function(e){const t={version:"1.0"};let n,i=[];for(let s=0;s<e.childNodes.length;s++){const r=e.childNodes[s];if(1===r.nodeType)if((0,V.g7)(r,"description"))t.description=(0,V.mX)(r);else if((0,V.g7)(r,"name"))t.name=(0,V.mX)(r);else if((0,V.g7)(r,"label"))t.label=(0,V.mX)(r);else if((0,V.g7)(r,"supportedFormats"))t.supportedFormats=(0,V.Dy)(r,"formats");else if((0,V.g7)(r,"supportedCRSs"))t.supportedCRSs=B(r);else if((0,V.g7)(r,"supportedInterpolations"))t.supportedInterpolations=_(r,"1.0.0");else if((0,V.g7)(r,"lonLatEnvelope"))t.lonLatEnvelope=U(r);else if((0,V.g7)(r,"rangeSet")){const e=Q(r);t.rangeSet=e.rangeSet,i=e.bandNames;const s=e.rangeSet[0].nullValues;s?.length&&(n=Y(s))}else(0,V.g7)(r,"domainSet")&&(t.domainSet=te(r))}const s=z(t.supportedInterpolations),{name:r,description:o,label:a,lonLatEnvelope:l,supportedFormats:u}=t,{spatialDomain:c}=t.domainSet,p={x:Math.abs(c.offset.x),y:Math.abs(c.offset.y)},d=function(e){if(!e.temporalDomain)return null;const{begin:t,end:n,values:i,units:s,resolution:r}=e.temporalDomain,o={variables:[{name:"default",description:"",dimensions:[{name:"StdTime",description:"",unit:"ISO8601",values:i?.map(e=>e.getTime()),hasRegularIntervals:!i,interval:r,intervalUnit:s,extent:[t.getTime(),n.getTime()]}]}]};return Z(o),o}(t.domainSet),f=new W.A({width:c.columns,height:c.rows,pixelSize:p,pixelType:"unknown",extent:c.envelope,spatialReference:c.envelope.spatialReference,bandCount:i.length||1,noDataValue:n,multidimensionalInfo:d});return{id:r,title:t.name,description:o||a,lonLatEnvelope:l,rasterInfo:f,bandNames:i,supportedFormats:u,supportedInterpolations:s,coverageDescription:t,version:"1.0.0",useEPSGAxis:!1}}(e));const i=(0,V.IC)(n,"CoverageDescription");return"1.1.0"===t||"1.1.1"===t||"1.1.2"===t?i.map(e=>function(e,t){const n=[],i=[],s={supportedFormats:n,supportedCRSs:i,version:"1.1"};let r,o,a=[];for(let t=0;t<e.childNodes.length;t++){const l=e.childNodes[t];if(1!==l.nodeType)continue;const u=(0,V.vv)(l).toLowerCase();switch(u){case"title":case"abstract":case"identifier":s[u]=(0,V.mX)(l);break;case"supportedformat":{const e=(0,V.mX)(l);n.includes(e)||n.push(e)}break;case"supportedcrs":{const e=(0,V.mX)(l);i.includes(e)||i.push(e)}break;case"range":{const e=ne(l,!!s.domain?.temporalDomain);s.range=e.rangeSet,a=e.bandNames;const{bandNoDataValues:t}=e;t?.length&&(r=Y(t)),o=e.statistics}break;case"domain":s.domain=ie(l)}}const l=z(s.range[0].supportedInterpolations),{identifier:u,abstract:c,title:p,domain:d,range:f}=s,m={x:Math.abs(d.spatialDomain.offset.x),y:Math.abs(d.spatialDomain.offset.y)},h=function(e,t){if(!t.temporalDomain)return null;const n=e.filter(e=>!e.identifier.toLowerCase().includes("field_1")&&!e.axis.some(e=>e.identifier.includes("band"))),i=[];if(n.length&&n.forEach(e=>{const t=e.axis.map(e=>{const t=e.values.map(t=>"ISO8601"===e.uom?(t=t.trim()).toLowerCase().includes("z")?new Date(t).getTime():new Date(t+"Z").getTime():parseFloat(t.trim())),n=[Math.min.apply(null,t),Math.max.apply(null,t)];return{name:e.identifier.trim(),description:"",field:e.identifier.trim(),unit:e.uom?e.uom.trim():"",hasRegularIntervals:!1,values:t,extent:n}});i.push({name:e.identifier.trim(),description:e.description?.trim()??"",unit:"",dimensions:t,statistics:e.statistics})}),t.temporalDomain){const{begin:e,end:n,values:s,units:r,resolution:o}=t.temporalDomain;i.some(e=>e.dimensions.some(e=>"stdtime"===e.name.toLowerCase()))||i.forEach(t=>{t.dimensions.push({name:"StdTime",description:"",unit:"ISO8601",values:s?.map(e=>e.getTime()),hasRegularIntervals:!s,interval:o,intervalUnit:r,extent:[e.getTime(),n.getTime()]})})}if(i.length){const e={variables:i};return Z(e),e}return null}(f,d);h&&(r=f[0].nullValues,1===r?.length&&(r=r[0]));const g=new W.A({width:d.spatialDomain.columns,height:d.spatialDomain.rows,pixelSize:m,pixelType:"unknown",extent:d.spatialDomain.envelope,spatialReference:d.spatialDomain.envelope.spatialReference,bandCount:a.length||1,noDataValue:r,statistics:o,multidimensionalInfo:h});return{id:u,title:s.title,description:c||p,bandNames:a,rasterInfo:g,supportedFormats:n,supportedInterpolations:l,coverageDescription:s,version:t,useEPSGAxis:d.spatialDomain.useEPSGAxis}}(e,t)):i.map(e=>function(e){const t={version:"2.0"};let n,i,s=[];for(let r=0;r<e.childNodes.length;r++){const o=e.childNodes[r];if(1===o.nodeType)if((0,V.g7)(o,"coverageId"))t.coverageId=(0,V.mX)(o);else if((0,V.g7)(o,"ServiceParameters"))t.serviceParameters={supportedFormats:(0,V.Dy)(o,"nativeFormat")};else if((0,V.g7)(o,"boundedBy"))t.boundedBy=se(o);else if((0,V.g7)(o,"rangeType")){const e=re(o,t.boundedBy?.axisLabels.length>2||t.domainSet?.axisLabels.length>2);t.rangeType=e.rangeType,s=e.bandNames,n=e.bandStats;const{bandNoDataValues:r}=e;r?.length&&(i=Y(r))}else if((0,V.g7)(o,"domainSet"))t.domainSet=ae(o,t.boundedBy?.axisLabels);else if((0,V.g7)(o,"metadata")){const e=(0,V.V6)(o,"EOMetadata");t.eoMetadata=e?le(e):null}}const{coverageId:r,boundedBy:o,domainSet:a,rangeType:l,serviceParameters:u}=t,c=function(e,t,n){if(n.axisLabels.length<=2)return null;const i=[];for(let t=0;t<e.length;t++){const n=e[t];for(let e=0;e<n.length;e++)n[e].name.toLowerCase().includes("band")||i.push(n[e])}const s=[];if(i.length){const e=[];for(let i=2;i<n.axisLabels.length;i++){const s=t.uomLabels?.[i]?.trim()??"",r=n.axisLabels[i].toLowerCase().includes("time")||"iso8601"===s.toLowerCase()||"oledatetime"===s.toLowerCase();let o,a;if(r){const e=oe(n.offset[i]);o=e.interval,a=e.intervalUnit}else o=n.offset[i],a=s;const l=[];r?(l.push((0,q.$E)(t.envelopeAllDims.mins[i])),l.push((0,q.$E)(t.envelopeAllDims.maxs[i]))):(l.push(t.envelopeAllDims.mins[i]),l.push(t.envelopeAllDims.maxs[i])),e.push({name:n.axisLabels[i].trim(),description:n.axisLabels[i].trim(),unit:r?"ISO8601":s,hasRegularIntervals:!0,extent:l,interval:o,intervalUnit:a})}if(i.forEach(t=>{const{allowedValues:n}=t,i=2===n?.length?[{min:n[0],max:n[1],avg:-1,stddev:-1}]:null;s.push({name:t.name.trim(),description:t.description?.trim()??"",unit:t.uom.trim(),statistics:i,dimensions:[...e]})}),s.length){const e={variables:s};return Z(e),e}}return null}(l,o,a);return!n&&c&&(n=c?.variables[0].statistics),null!=c&&(i=l[0][0].nilValue),{id:r,title:r,description:r,bandNames:s,rasterInfo:new W.A({width:a.columns,height:a.rows,pixelSize:a.resolution,pixelType:"unknown",extent:o.envelope,spatialReference:o.envelope.spatialReference,bandCount:s.length||1,statistics:n,noDataValue:i,multidimensionalInfo:c}),supportedFormats:u.supportedFormats,coverageDescription:t,version:"2.0.1",useEPSGAxis:!1}}(e))}(t,i)}catch(e){if(!(0,l.zf)(e))throw new o.A("wcslayer:open","wcs coverage description is not valid or supported");throw e}}var ce=n(45617),pe=n(4916);function de(e,t,n=0){const i="--"+t.boundary,s=[];for(let e=0;e<i.length;e++)s.push(i.charCodeAt(e));const r=[],o="\n--"+t.boundary+"--";for(let e=0;e<o.length;e++)r.push(o.charCodeAt(e));const a=[10],l=[13,10],u=[],c=s.length,p=new Uint8Array(e,n),d=p.length-c;let f=0,m=0;for(let e=0;e<d;e++){for(m=0;m<c&&p[e+m]===s[m];m++);if(m!==c)continue;let n=!1;if(f){const i=fe(p.subarray(f,e),t);u.push(i),n=!!i.isValidImage}if(e+=c-1,p[e+1]===a[0]?e+=1:p[e+1]===l[0]&&p[e+2]===l[1]&&(e+=2),f=e+1,n)break}const h=r.length;for(let e=p.length-h-10;e<p.length-h;e++){for(m=0;m<h&&p[e+m]===r[m];m++);if(m===h){u.push(fe(p.subarray(f,e),t));break}}return u}function fe(e,t){const n=String.fromCharCode.apply(null,e.subarray(0,Math.min(300,e.length))).split("\n"),i=Math.min(n.length,7),s={contentDisposition:"inline"};let r=0;for(let o=0;o<i;o++)if(n[o].length<4)r=r+n[o].length+1;else if("content"===n[o].slice(0,7).toLowerCase()){r=r+n[o].length+1;const e=n[o].indexOf(":");if(-1===e)continue;const t=n[o].slice(0,e).trim(),i=n[o].slice(e+1).trim();switch(t.toLowerCase()){case"content-type":s.contentType=i;break;case"content-description":s.contentDescription=i;break;case"content-transfer-encoding":s.contentTransferEncoding=i;break;case"content-id":s.contentID=i;break;case"content-disposition":s.contentDisposition=i;break;case"content-location":s.contentLocation=i}}else{if(s.contentDisposition.toLowerCase().includes("inline")&&n[o].length>=4&&s.contentType?.toLowerCase().includes("image")){let t=!0,n=e.subarray(r,e.length);if(s.contentType.toLowerCase().indexOf("tif")>0){if("base64"===s.contentTransferEncoding){let e="";const t=n;for(let n=0;n<t.length;n+=65535){const i=t.subarray(n,n+65535>t.length-1?t.length-1:n+65535);e+=String.fromCharCode.apply(null,i)}const i=atob(e);n=new Uint8Array(i.length);for(let e=0;e<n.length;e++)n[e]=i.charCodeAt(e)}t=73===n[0]&&73===n[1]||77===n[0]&&77===n[1]}if(t){let t=n.buffer;"base64"!==s.contentTransferEncoding&&(t=new ArrayBuffer(e.length-r),n=new Uint8Array(t),n.set(e.subarray(r,e.length))),s.contentData=t,s.isValidImage=!0}break}if((""===t.start||s.contentID===t.start)&&s.contentType){if(s.contentType.includes("text")||s.contentType.includes("xml")){s.contentData=String.fromCharCode.apply(null,e.subarray(r,e.length));break}s.contentData=e.subarray(r,e.length)}}return s}var me=n(77649),he=n(28435);const ge=["nearest neighbor","bilinear","bicubic"],ve=["nearest","linear","cubic"],ye="response is not a supported multipart/related mediaType with inline tiff, switching to compatibility mode",we=new Set(["1.0.0","1.1.0","1.1.1","1.1.2","2.0.1"]);let xe=class extends pe.A{constructor(){super(...arguments),this.datasetFormat="WCSServer",this.tileType="Raster"}get rasterId(){return`${this.url}-${this.coverageId}-${this.version}`}async fetchRawTile(e,t,n,i={}){if(this.isBlockOutside(e,t,n))return null;const{nativePixelSize:s,spatialReference:r}=this.rasterInfo,a=2**e,l=s.x*a,u=s.y*a,{blockWidth:c,blockHeight:p}=this.getBlockWidthHeight(e),{origin:d}=this.rasterInfo.storageInfo.tileInfo,f=this.getTileExtent({x:l,y:u},t,n,d,r,[c,p]),m=this.rasterInfo.extent,h=f.xmax>m.xmax,g=f.ymin<m.ymin,v=h||g;let y=f,w=c,x=p;if(v&&(y=f.clone().intersection(m),null!=y&&(h&&(w=Math.floor((y.xmax-y.xmin)/l),y.xmax=y.xmin+l*w),g&&(x=Math.floor((y.ymax-y.ymin)/u),y.ymin=y.ymax-u*x))),null==y||w<=1||x<=1)return null;const b=await this._getCoverage(y,w,x,a,i);if(!b)return null;const{coverageDescription:C}=this.coverageInfo,{noDataValue:I,multidimensionalInfo:S}=this.rasterInfo,{multidimensionalDefinition:A}=i;let M;if(null!=S&&null!=A&&A.length){const e=A[0].variableName;if("2.0"===C.version){const t=C.rangeType[0].find(t=>t.name===e);M=t?.nilValue}else if("1.1"===C.version){const t=C.range.find(t=>t.identifier===e);M=t?.nullValues}}const R=M??I,D=await this.decodePixelBlock(b,{width:w,height:x,planes:null,pixelType:null,tiffNoDataValue:Array.isArray(R)?R[0]:R,matchAllNoData:!0});if(null==D)return null;if(D&&(D.width!==w||D.height!==x))throw new o.A("wcsraster-fetch",`the response has unexpected dimension width: ${D.width}, height: {pixelBlock.height}`);return v?(0,he.$Q)(D,{x:0,y:0},{width:p,height:p}):D}async _open(e){const{customFetchParameters:t}=this.ioConfig,n=e?.signal,i=await async function(e,t){const{version:n,customParameters:i,signal:s}=t??{},r=n?.startsWith("1.0")?"version":"acceptVersions",a={service:"WCS",request:"GetCapabilities",[r]:n,...i};try{let{data:n}=await(0,N.A)(e,{query:a,responseType:"xml",signal:s});return t?.version||function(e){let t=null;t="string"==typeof e?(new DOMParser).parseFromString(e,"text/xml"):e;const n=t.documentElement.getAttribute("version"),i=n?.slice(0,3);return null!=i&&i<"2.1"}(n)||(a[r]="2.0.1",({data:n}=await(0,N.A)(e,{query:a,responseType:"xml",signal:s}))),X(n)}catch(e){if(!(0,l.zf)(e))throw new o.A("wcslayer:open","wcs capabilities is not valid or supported");throw e}}(this.url,{version:t?.version??this.version,customParameters:t,signal:n});if(this.capabilities=i,!this.version){let e=i.version.slice(0,3);"2.0"===e||"1.1"===e||"1.0"===e?this.version=i.version:(e=i.supportedVersions.find(e=>"2.0.1"===e)||i.supportedVersions.find(e=>e.startsWith("2.0"))||i.supportedVersions.find(e=>e.startsWith("1.1"))||i.supportedVersions.find(e=>e.startsWith("1.0"))||"1.0.0",this.version=e)}const{version:s}=this;if(!we.has(s))throw new o.A("wcsraster-open",`unsupported WCS version ${s}`);const{gridCoverages:r}=i;if(!r.length)throw new o.A("wcsraster-open","cannot find rectified grid coverages");this.coverageId??=r[0].id;const{coverageId:a}=this,u=r.find(e=>e.id===a);if(null==u)throw new o.A("wcsraster-open",`the coverageId ${a} does not exist in capabilities`);const c=await ue(this.url,{coverageIds:[a],version:s,customParameters:t,signal:n});if(this.coverageInfo=c[0],s.startsWith("2.0")){const{coverageInfo:e}=this;e.lonLatEnvelope=u.lonLatEnvelope,e.supportedInterpolations=z(i.supportedInterpolations),this._patchDimensionValues201(a,n)}this.datasetName=this.coverageInfo.title;const{rasterInfo:p}=this.coverageInfo;if(this.createRemoteDatasetStorageInfo(p,512,512),this._set("rasterInfo",p),null==p.spatialReference)throw new o.A("wcsraster-open",`coverage without spatial reference is not supported: ${a}`);const{pixelType:d,bandCount:f}=await this._getPixelTypeAndBandCount(n);p.pixelType=d,1===p.bandCount&&f>1&&(p.bandCount=f),this.updateTileInfo()}async _patchDimensionValues201(e,t){const{coverageInfo:n}=this,i=n.rasterInfo.multidimensionalInfo?.variables,s=we.has("1.1.2")?"1.1.2":we.has("1.1.1")?"1.1.1":we.has("1.1.0")?"1.1.0":null,{customFetchParameters:r}=this.ioConfig;if(i&&s)try{const n=this.url.includes("/ImageServer/"),o=e.length>8&&e.startsWith("Coverage")&&n?e.slice(8):e,a=await ue(this.url,{coverageIds:[o??e],version:s,customParameters:r,signal:t}).catch(()=>{if(o)return ue(this.url,{coverageIds:[e],version:s,customParameters:r,signal:t})}),l=a?.[0].rasterInfo.multidimensionalInfo?.variables;if(l)for(const e of i){const t=l.find(({name:t})=>t===e.name);if(t?.dimensions?.length)for(let i=e.dimensions.length-1;i>=0;i--){const s=e.dimensions[i],r=t.dimensions.find(({name:e})=>e===s.name);r?r.values&&r.extent?.join(",")===s.extent?.join(",")&&(e.dimensions[i]={...s,values:r.values}):n&&e.dimensions.splice(i,1)}}}catch{}}async _getPixelTypeAndBandCount(e){const{pixelSize:t,extent:n,multidimensionalInfo:i}=this.rasterInfo,s=n.center,r=new L.A({xmin:s.x-t.x,xmax:s.x+t.x,ymin:s.y-t.y,ymax:s.y+t.y,spatialReference:n.spatialReference});let a=[];if(null!=i){const e=i.variables[0];a=[],e.dimensions.forEach(t=>{a.push(new ce.A({variableName:e.name,dimensionName:t.name,values:t.hasRegularIntervals?t.extent?.[0]:t.values?.[0],isSlice:!0}))})}const{coverageDescription:l}=this.coverageInfo,u={interpolation:"nearest",multidimensionalDefinition:a,signal:e},{version:c}=l,{ioConfig:d}=this,f="2.0"===c&&null==d.allowAnyMediaType||"1.1"===c&&null==d.use2GridOffsets;let m;try{m=await this._getCoverage(r,2,2,1,u,!0)}catch(e){if(!f)throw e;if("1.1"===c){if(!e.details?.isResolutionMismatch)throw e;d.use2GridOffsets=!0}}if(!m&&f&&("2.0"===c&&(d.allowAnyMediaType=!0),m=await this._getCoverage(r,2,2,1,u),m&&p.A.getLogger(this).warn("wcsraster:getcoverage",ye)),!m)throw new o.A("wcsraster-open","unable to determine pixel type");const h=await this.decodePixelBlock(m,{width:2,height:2,planes:null,pixelType:null});if(null==h)throw new o.A("wcsraster-open","unable to determine pixel type");return{pixelType:h.pixelType,bandCount:h.getPlaneCount()??0}}async _getCoverage(e,t,n,i,s,r=!1){const{coverageDescription:a}=this.coverageInfo,{version:l}=a,u="2.0"===l?this._getCoverage201Parameters(e,t,n,i,s,a):"1.1"===l?this._getCoverage110Parameters(e,t,n,s,a):this._getCoverage100Parameters(e,t,n,s),c="2.0"===l?await this.request(this._constructWCS201Url(u),{signal:s.signal,responseType:"array-buffer"}):await this.request(this.url,{query:u,signal:s.signal,responseType:"array-buffer"});if("1.0"===l)return c.data;if("2.0"===l&&!1!==this.ioConfig.allowAnyMediaType&&"tiff"===(0,me.g)(c.data))return r&&(this.ioConfig.allowAnyMediaType=!0,p.A.getLogger(this).warn("wcsraster:getcoverage",ye)),c.data;const d=function(e){const t=function(e){const t=e.getHeader?.("Content-Type")?.split(";");if(!t)return null;if(!(t[0].trim()??"").startsWith("multipart/"))return null;const n={boundary:"",start:"",type:""};for(let e=1;e<t.length;e++){const i=t[e].indexOf("=");if(i>0){const s=t[e].slice(0,i).trim(),r=t[e].slice(i+1).trim();n[s]=r.startsWith('"')?r.slice(1,-1):r}}return n}(e);return t?{isMultipart:!0,data:t.boundary?de(e.data,t,0):null}:{isMultipart:!1,data:null}}(c);if(d.isMultipart&&d.data){const e=d.data.find(e=>e.isValidImage);return r&&"base64"===e?.contentTransferEncoding&&p.A.getLogger(this).warn("wcsraster:getcoverage","response is base64 encoded which may impact layer display performance"),e?.contentData}const f=new Uint8Array(c.data,0,Math.min(c.data.byteLength,2e3)),m=String.fromCharCode.apply(null,f).toLowerCase().includes("exception"),h=m&&String.fromCharCode.apply(null,f).includes("A non-zero RESX/RESY or WIDTH/HEIGHT is required but neither was provided");if(m)throw new o.A("wcsraster:getcoverage","server returns an exception",{isResolutionMismatch:h});throw new o.A("wcsraster:getcoverage","response is not a supported multipart mediaType with inline tiff")}_getInterpolationIndex(e){return e&&this.coverageInfo.supportedInterpolations?.includes(e)?"nearest"===e?0:"bilinear"===e?1:"cubic"===e?2:0:0}_getCoverage100Parameters(e,t,n,i){const s=`${e.xmin},${e.ymin},${e.xmax},${e.ymax}`,r=e.spatialReference.wkid,o=(this.coverageInfo.supportedFormats||[]).find(e=>e.toLowerCase().includes("tiff"))||"GEOTIFF",{bandIds:a,interpolation:l}=i,u=this._getInterpolationIndex(l),c=a?a.map(e=>this.coverageInfo.bandNames[e]):null,p=ge[u],{multidimensionalDefinition:d}=i;let f;if(null!=d&&null!=this.rasterInfo.multidimensionalInfo){const e=d.find(e=>"StdTime"===e.dimensionName);let t=e?.values;t&&t.length>0&&(Array.isArray(t[0])&&(t=t[0]),f=t.map(e=>be(e)).join(","))}return{service:"WCS",request:"GetCoverage",version:this.version,coverage:this.coverageId,format:o,crs:`EPSG:${r}`,bbox:s,width:t,height:n,time:f,interpolation:p,band:c?.join(",")}}_getCoverage110Parameters(e,t,n,i,s){const{multidimensionalDefinition:r,bandIds:o,interpolation:a}=i,l=e.spatialReference.wkid,u=`urn:ogc:def:crs:EPSG::${l}`,c=(this.coverageInfo.supportedFormats||[]).find(e=>e.toLowerCase().includes("tiff"))||"image/tiff",p=this._getInterpolationIndex(a),d=ve[p],f=null==a||0===this.coverageInfo.supportedInterpolations?.indexOf(a),m=s.domain.spatialDomain,h=m.origin.x<=m.envelope.xmin&&m.origin.y<=m.envelope.ymin,g=e.width/t,v=e.height/n*(h?1:-1),y=h?[e.xmin,e.ymin]:[e.xmin,e.ymax],w=m.useEPSGAxis&&(0,O.m)(l),x=w?`${y[1]},${y[0]}`:`${y[0]},${y[1]}`,b=this.ioConfig.use2GridOffsets,C=w?b?`${v},${g}`:`${v},0,0,${g}`:b?`${g},${v}`:`${g},0,0,${v}`,I=g/2,S=e.xmin+I,A=e.xmax-I,M=Math.abs(v)/2,R=e.ymin+M,D=e.ymax-M,T=w?`${R},${S},${D},${A},${u}`:`${S},${R},${A},${D},${u}`,P=s.range.find(e=>e.axis.some(e=>e.identifier.toLowerCase().includes("band")));let L,N=P&&d&&o?f?`${P.identifier}[${P.axis[0].identifier}[${o.join(",")}]]`:`${P.identifier}:${d}[${P.axis[0].identifier}[${o.join(",")}]]`:null;if(null!=r&&r.length)for(let e=0;e<r.length;e++){let t=r[e].values;const n=r[e].dimensionName?.toLowerCase(),i=r[e].variableName?.toLowerCase(),o=s.range.find(e=>e.identifier.toLowerCase()===i);if(t.length>0)if(Array.isArray(t[0])&&(t=t[0]),"stdtime"===n)L=t.map(e=>be(e)).join(",");else if(o){const e=o.axis.find(e=>e.identifier.toLowerCase()===n);e&&(N=f?o.identifier+"["+e.identifier+"["+t.join(",")+"]]":o.identifier+":"+d+"["+e.identifier+"["+t.join(",")+"]]")}e===r.length-1&&o&&!N&&(N=f?o.identifier:o.identifier+":"+d)}return{service:"WCS",request:"GetCoverage",version:this.version,identifier:this.coverageId,format:c,crs:`EPSG:${l}`,boundingbox:T,gridCS:"urn:ogc:def:cs:OGC:0.0:Grid2dSquareCS",gridType:"urn:ogc:def:method:WCS:1.1:2dGridIn2dCrs",gridOrigin:x,gridOffsets:C,gridBaseCRS:u,timeSequence:L,rangeSubset:N}}_getCoverage201Parameters(e,t,n,i,s,r){const{multidimensionalDefinition:o,interpolation:a}=s,l=this._getInterpolationIndex(a);let u=null;const{supportedInterpolations:c}=this.capabilities;if(c?.length)switch(l){case 0:u=c.find(e=>e.toLowerCase().includes("nearest"));break;case 1:u=c.find(e=>e.toLowerCase().includes("linear"));break;case 2:u=c.find(e=>e.toLowerCase().includes("cubic")||e.toLowerCase().includes("quadratic"))}const p=(this.coverageInfo.supportedFormats||[]).find(e=>e.toLowerCase().includes("tiff"))||"image/tiff",{bandNames:d}=this.coverageInfo,{boundedBy:f,domainSet:m,rangeType:h}=r,g=f.isEastFirst?0:1,v=1-g,{axisLabels:y}=f,w=y[g],x=y[v],b=`http://www.opengis.net/def/crs/EPSG/0/${e.spatialReference.wkid}`,C=b,I=[];I.push(`${w}(${e.xmin},${e.xmax})`),I.push(`${x}(${e.ymin},${e.ymax})`);const S=[];if(y.length>2)for(let e=2;e<y.length;e++){const t=m.origin[e];if(y[e].toLowerCase().includes("time")){let n=t.toString();f.uomLabels?.[e].toLowerCase().includes("ole")&&(S.push(y[e]),n=be(t,!0)),I.push(y[e]+",http://www.opengis.net("+n+")")}else I.push(y[e]+",http://www.opengis.net("+t+")")}let A=null;if(null!=o&&o.length){const e=[];h.forEach(t=>t.forEach(t=>e.push(t.name)));const t=[];for(let n=0;n<o.length;n++){const i=y.find(e=>e===o[n].dimensionName),s=e.find(e=>e===o[n].variableName);if(t.includes(s)||t.push(s),i){let e=o[n].values;if(e.length>0){Array.isArray(e[0])&&(e=e[0]);let t="";t=i.toLowerCase().includes("time")?e.map(e=>be(e)).join(","):e.join(",");const n=I.findIndex(e=>e.startsWith(i+",http://www.opengis.net"));-1===n&&I.push(i+",http://www.opengis.net("+t+")"),-1===n||I[n].includes("("+t+")")||I.splice(n,1,i+",http://www.opengis.net("+t+")")}}}t.length&&(A=t.join(","))}else d?.length>=2&&(A=(s.bandIds?s.bandIds.map(e=>d[e]):d).join(","));const M=I.join("&subset="),R=!r.domainSet.hasSameAxisLabelsAsBoundedBy&&!1!==this.ioConfig.allowScaleFactor,D=R?null:`${w}(${t}),${x}(${n})`,T=R?1/i:null;return{service:"WCS",request:"GetCoverage",version:this.version,coverageId:this.coverageId,rangesubset:A,interpolation:u,scaleSize:D,scaleFactor:T,subset:M,format:p,mediaType:this.ioConfig.allowAnyMediaType?null:"multipart/related",outputcrs:b,subsettingcrs:C}}_constructWCS201Url(e){const t={...this.ioConfig.customFetchParameters,...e},n=[];return Object.keys(t).forEach(e=>{const i=t[e];null!=i&&("subset"===e?"string"==typeof i&&i.split("&subset=").forEach(e=>{e&&n.push(`subset=${encodeURIComponent(e)}`)}):n.push(`${e}=${encodeURIComponent(i)}`))}),`${encodeURI(this.url)}?${n.join("&")}`}};function be(e,t=!1){return(t?new Date((0,q.$E)(e)):new Date(e)).toISOString()}(0,i.Cg)([(0,c.MZ)({type:String,json:{write:!0}})],xe.prototype,"datasetFormat",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],xe.prototype,"tileType",void 0),(0,i.Cg)([(0,c.MZ)({type:String,json:{write:!0}})],xe.prototype,"version",void 0),(0,i.Cg)([(0,c.MZ)({type:String,json:{write:!0}})],xe.prototype,"coverageId",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],xe.prototype,"rasterId",null),xe=(0,i.Cg)([(0,d.$)("esri.layers.support.rasterDatasets.WCSRaster")],xe);var Ce=n(30291);const Ie=new Set(["milliseconds","seconds","minutes","hours","days","weeks","months","years","decades","centuries"]);let Se=class extends((0,w.dM)((0,M.j)((0,C.q)((0,I.A)((0,x.d)((0,b.o)((0,S.G)((0,R.e)((0,A.J)((0,a.P)((0,r.OU)(y.A)))))))))))){constructor(...e){super(...e),this.coverageId=null,this.version=null,this.isReference=null,this.graphicOrigin=new v(this),this.legendEnabled=!0,this.noData=0,this.operationalLayerType="WCS",this.type="wcs",this.popupEnabled=!0,this.popupTemplate=null,this.fields=null,this._debouncedSaveOperations=(0,l.sg)(async(e,t,i)=>{const{save:s,saveAs:r}=await n.e(9838).then(n.bind(n,59838));switch(e){case 0:return s(this,t);case 1:return r(this,i,t)}})}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["WCS"]},e).catch(l.QP).then(()=>this._openRaster(t))),Promise.resolve(this)}get renderer(){return super.renderer}set renderer(e){super.renderer=e}get coverageInfo(){return this.raster.coverageInfo}get defaultPopupTemplate(){return this.createPopupTemplate()}get rasterFields(){const e=[(0,P.rZ)("Pixel Value")],t=this.raster?.rasterInfo??this.serviceRasterInfo,n=t?.multidimensionalInfo;if(n){const t=(0,P.AL)(n);e.push(...t)}return e}createPopupTemplate(e){return(0,Ce.tn)({fields:this.rasterFields,title:this.title},e)}async save(e){return this._debouncedSaveOperations(0,e)}async saveAs(e,t){return this._debouncedSaveOperations(1,t,e)}async _openRaster(e){const t=new xe({url:this.url,version:this.version,coverageId:this.coverageId,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters}});if(await t.open({signal:e}),!t.rasterInfo)throw t.destroy(),new o.A("wcs-layer:load","cannot load resources on "+this.url);const{rasterInfo:n}=t;null==n.noDataValue&&(n.noDataValue=this.noData),this._set("serviceRasterInfo",n),this._set("spatialReference",n.spatialReference),null==this.title&&this.setAtOrigin("title",t.datasetName,"service"),null==this.coverageId&&this.setAtOrigin("coverageId",t.coverageInfo.id,"service"),null==this.version&&t.version&&this.setAtOrigin("version",t.version,"service"),this.setAtOrigin("tileInfo",t.rasterInfo.storageInfo.tileInfo,"service");const{multidimensionalInfo:i}=n;if(null!=i){const e=i.variables[0].dimensions.find(({name:e})=>"StdTime"===e);if(e){let t=e.extent?.[0]??e.values[0];Array.isArray(t)&&(t=t[0]);let n=e.extent?.[1]??e.values[e.values.length-1];Array.isArray(n)&&(n=n[1]);const i=Ie.has(e.intervalUnit?.toLowerCase())?e.intervalUnit?.toLowerCase():null;this.set("timeInfo",{startField:"StdTime",fullTimeExtent:{start:t,end:n},timeZone:null,interval:i?{value:e.interval,unit:i}:null})}}this.raster=t,this._configDefaultSettings(),this.addHandles((0,u.wB)(()=>this.customParameters,e=>this.raster.ioConfig.customFetchParameters=e))}};(0,i.Cg)([(0,c.MZ)({type:String,nonNullable:!0,json:{name:"wcsInfo.coverageId",write:{isRequired:!0,ignoreOrigin:!0}}})],Se.prototype,"coverageId",void 0),(0,i.Cg)([(0,c.MZ)()],Se.prototype,"coverageInfo",null),(0,i.Cg)([(0,c.MZ)({type:["1.0.0","1.1.0","1.1.1","1.1.2","2.0.1"],nonNullable:!0,json:{name:"wcsInfo.version",write:{isRequired:!0,ignoreOrigin:!0}}})],Se.prototype,"version",void 0),(0,i.Cg)([(0,c.MZ)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],Se.prototype,"isReference",void 0),(0,i.Cg)([(0,c.MZ)({json:{read:!0,write:!0}})],Se.prototype,"blendMode",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0,clonable:!1})],Se.prototype,"graphicOrigin",void 0),(0,i.Cg)([(0,c.MZ)(D.fV)],Se.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,c.MZ)({type:["show","hide"]})],Se.prototype,"listMode",void 0),(0,i.Cg)([(0,c.MZ)()],Se.prototype,"noData",void 0),(0,i.Cg)([(0,c.MZ)({type:["WCS"]})],Se.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,c.MZ)()],Se.prototype,"raster",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],Se.prototype,"type",void 0),(0,i.Cg)([(0,c.MZ)(D.M6)],Se.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,c.MZ)({type:s.A,json:{name:"popupInfo",write:!0}})],Se.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],Se.prototype,"defaultPopupTemplate",null),(0,i.Cg)([(0,c.MZ)({readOnly:!0,type:[T.A]})],Se.prototype,"fields",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0,type:[T.A]})],Se.prototype,"rasterFields",null),Se=(0,i.Cg)([(0,d.$)("esri.layers.WCSLayer")],Se);const Ae=Se},91218:(e,t,n)=>{n.r(t),n.d(t,{canProjectWithoutEngine:()=>Z,initializeProjection:()=>_,isEqualBaseGCS:()=>B,isLoaded:()=>P,isLoadedOrLoad:()=>L,isLoadedOrLoadFor:()=>O,load:()=>V,project:()=>$,projectExtent:()=>ne,projectMany:()=>E,projectMultipoint:()=>K,projectOrLoad:()=>k,projectOrLoadMany:()=>j,projectPoint:()=>U,projectPolygon:()=>ee,projectPolyline:()=>Q,projectWithZConversion:()=>q,projectWithoutEngine:()=>z,requiresLoad:()=>N,test:()=>F,tryProjectWithZConversion:()=>W,unload:()=>X});var i=n(49186),s=n(74887),r=n(62788),o=n(95488),a=n(51850),l=n(21276),u=n(73941),c=n(5443),p=n(91075),d=n(48526),f=n(86738),m=n(39829),h=n(82799),g=n(16930),v=n(159),y=n(9762),w=n(37539);function x(e,t,n,i,s,r){return b[0]=e,b[1]=t,b[2]=n,(0,y.projectBuffer)(b,i,0,s,r,0)}const b=(0,a.vt)();var C=n(21325),I=n(62815);let S=null,A=null,M=null,R=null,D={};const T=new o.I;function P(){return!!(A?.isLoaded()&&M?.isLoaded()&&R?.isLoaded())}function L(){return!!P()||((0,r.gc)(T),V(),!1)}function O(e,t){return!e||!t||Z(e,t)||L()}function N(e,t){return!Z(e,t)&&!P()}async function V(e){null==S&&(S=Promise.all([n.e(3276).then(n.bind(n,83276)).then(e=>(A=e,A.load())),n.e(8377).then(n.bind(n,8377)).then(e=>(M=e,M.load())),n.e(2158).then(n.bind(n,12158)).then(e=>(R=e,R.load()))])),await S,(0,s.Te)(e),T.notify()}function $(e,t,n){return Array.isArray(e)?0===e.length?[]:((0,l.H)(e),E(e,e[0].spatialReference,t,n)):((0,l.f)(e),E([e],e.spatialReference,t,n)[0])}function E(e,t,n,i){if(null==t||null==n)return e;if(Z(t,n,i))return e.map(e=>z(e,t,n));if(null==i?.geographicTransformation&&(0,u.jA)(t))return e.map(e=>z(e,t,g.A.WGS84)).map(e=>W(e,n));if(null==i?.geographicTransformation&&(0,u.jA)(n))return e.map(e=>W(e,g.A.WGS84)).map(e=>z(e,g.A.WGS84,n));if(!P())throw new G;if(!i?.geographicTransformation)if(i?.extendedParams)i={...i,geographicTransformation:R.getTransformation(t,n,i.areaOfInterestExtent)||new v.A};else if(!i?.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,n);let s=D[e];s||(s=R.getTransformation(t,n)||new v.A,D[e]=s),i={geographicTransformation:s}}return e[0].spatialReference||(e[0].spatialReference=t),e[0]instanceof p.A?A.executeMany(e,n,i):M.executeMany(e,n,i)}function k(e,t){const n=j([e],t);return null!=n.pending?{pending:n.pending,geometry:null}:null!=n.geometries?{pending:null,geometry:n.geometries[0]}:{pending:null,geometry:null}}function j(e,t){if(!P())for(const n of e)if(null!=n&&!(0,C.aI)(n.spatialReference,t)&&(0,C.fn)(n.spatialReference)&&(0,C.fn)(t)&&!Z(n.spatialReference,t))return(0,r.gc)(T),{pending:V(),geometries:null};return{pending:null,geometries:e.map(e=>null==e?null:(0,C.aI)(e.spatialReference,t)?e:(0,C.fn)(e.spatialReference)&&(0,C.fn)(t)?W(e,t):null)}}class G extends i.A{constructor(){super("projection:not-loaded","projection engine not fully loaded yet, please call load()")}}function X(){S=null,A=null,M=null,R=null,D={}}const F={get loadPromise(){return S}};function W(e,t){try{const n=$(e,t);if(null==n)return null;"xmin"in e&&"xmin"in n&&(n.zmin=e.zmin,n.zmax=e.zmax);const i=(0,I.N)(n.type,e.spatialReference,t);return null!=i&&i(n),n}catch(e){if(!(e instanceof G))throw e;return null}}async function q(e,t,n){const i=e.spatialReference;return null!=i&&null!=t&&await _(i,t,null,n),W(e,t)}function Z(e,t,n){return!(n?.areaOfInterestExtent||n?.extendedParams||n?.geographicTransformation)&&(!!(0,C.aI)(e,t)||(0,C.fn)(e)&&(0,C.fn)(t)&&!!(0,w.jd)(e,t))}function B(e,t){if((0,C.aI)(e,t))return!0;if(!(0,C.fn)(e)||!(0,C.fn)(t))return!1;const n=(0,C.oT)(e)||(0,C.K8)(e)||(0,C.x1)(e),i=(0,C.oT)(t)||(0,C.K8)(t)||(0,C.x1)(t);return n&&i}async function _(e,t,n,i){if(P())return(0,s.NO)(i);if(Array.isArray(e)){for(const{source:t,dest:n,options:s}of e)if(t&&n&&!Z(t,n,s))return V(i)}else if(e&&t&&!Z(e,t,n))return V(i);return(0,s.NO)(i)}function z(e,t,n){return e?"x"in e?H(e,t,new f.A,n,0):"xmin"in e?ie(e,t,new c.A,n,0):"rings"in e?te(e,t,new m.A,n,0):"paths"in e?J(e,t,new h.A,n,0):"points"in e?Y(e,t,new d.A,n,0):null:null}function U(e,t,n=t.spatialReference,i=0){return null!=n&&null!=e.spatialReference&&null!=H(e,e.spatialReference,t,n,i)}function H(e,t,n,i,s){re[0]=e.x,re[1]=e.y;const r=e.z;return re[2]=void 0!==r?r:s,(0,y.projectBuffer)(re,t,0,re,i,0)?(n.x=re[0],n.y=re[1],n.spatialReference=i,void 0!==r||(0,u.xP)(i)?(n.z=re[2],n.hasZ=!0):(n.z=void 0,n.hasZ=!1),void 0===e.m?(n.m=void 0,n.hasM=!1):(n.m=e.m,n.hasM=!0),n):null}function K(e,t,n=t.spatialReference,i=0){return null!=e.spatialReference&&null!=n&&null!=Y(e,e.spatialReference,t,n,i)}function Y(e,t,n,i,s){const{points:r,hasZ:o,hasM:a}=e,l=[],c=r.length,p=[];for(const e of r)p.push(e[0],e[1],o?e[2]:s);if(!(0,y.projectBuffer)(p,t,0,p,i,0,c))return null;const d=o||(0,u.xP)(i);for(let e=0;e<c;++e){const t=3*e,n=p[t],i=p[t+1];d&&a?l.push([n,i,p[t+2],r[e][3]]):d?l.push([n,i,p[t+2]]):a?l.push([n,i,r[e][2]]):l.push([n,i])}return n.points=l,n.spatialReference=i,n.hasZ=o,n.hasM=a,n}function Q(e,t,n=t.spatialReference,i=0){return null!=e.spatialReference&&null!=n&&null!=J(e,e.spatialReference,t,n,i)}function J(e,t,n,i,s){const{paths:r,hasZ:o,hasM:a}=e,l=[];if(!se(r,o??!1,a??!1,t,l,i,s))return null;const c=o||(0,u.xP)(i);return n.paths=l,n.spatialReference=i,n.hasZ=c,n.hasM=a,n}function ee(e,t,n=t.spatialReference,i=0){return null!=e.spatialReference&&null!=n&&null!=te(e,e.spatialReference,t,n,i)}function te(e,t,n,i,s){const{rings:r,hasZ:o,hasM:a}=e,l=[];if(!se(r,o??!1,a??!1,t,l,i,s))return null;const c=o||(0,u.xP)(i);return n.rings=l,n.spatialReference=i,n.hasZ=c,n.hasM=a,n}function ne(e,t,n=t.spatialReference,i=0){return null!=e.spatialReference&&null!=n&&null!=ie(e,e.spatialReference,t,n,i)}function ie(e,t,n,i,s){const{xmin:r,ymin:o,xmax:a,ymax:l,hasZ:c,hasM:p}=e;if(!x(r,o,c?e.zmin:s,t,re,i))return null;const d=c||(0,u.xP)(i);return n.xmin=re[0],n.ymin=re[1],d&&(n.zmin=re[2]),x(a,l,c?e.zmax:s,t,re,i)?(n.xmax=re[0],n.ymax=re[1],d&&(n.zmax=re[2]),p&&(n.mmin=e.mmin,n.mmax=e.mmax),n.spatialReference=i,n):null}function se(e,t,n,i,s,r,o=0){const a=new Array;for(const n of e)for(const e of n)a.push(e[0],e[1],t?e[2]:o);if(!(0,y.projectBuffer)(a,i,0,a,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 i of t)c&&n?e.push([a[l++],a[l++],a[l++],i[3]]):c?e.push([a[l++],a[l++],a[l++]]):n?(e.push([a[l++],a[l++],i[2]]),l++):(e.push([a[l++],a[l++]]),l++);s.push(e)}return!0}const re=(0,a.vt)()},99157:(e,t,n)=>{n.d(t,{A:()=>l});var i,s=n(31635),r=n(69622),o=n(10107),a=(n(44208),n(53966),n(87811),n(64108));let l=i=class extends r.A{constructor(e){super(e),this.isInverse=!1,this.wkt=null,this.wkid=null}getInverse(){return new i({isInverse:!this.isInverse,wkid:this.wkid,wkt:this.wkt})}};(0,s.Cg)([(0,o.MZ)()],l.prototype,"isInverse",void 0),(0,s.Cg)([(0,o.MZ)()],l.prototype,"wkt",void 0),(0,s.Cg)([(0,o.MZ)()],l.prototype,"wkid",void 0),l=i=(0,s.Cg)([(0,a.$)("esri.geometry.operators.support.GeographicTransformationStep")],l)}}]);
|