@arcgis/core 4.34.0-next.7 → 4.34.0-next.9
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/Map.js +1 -1
- package/applications/ExperienceBuilder/sketchUtils.d.ts +1 -0
- package/applications/ExperienceBuilder/sketchUtils.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{feaf79b69d2e2a1f2aa2.js → 06877ea5b9df7de89aff.js} +1 -1
- package/assets/esri/core/workers/chunks/{44db659fd4e711f8e22f.js → 076f830d6d0337dfce9d.js} +1 -1
- package/assets/esri/core/workers/chunks/09907c9ff597df9bc954.js +1 -0
- package/assets/esri/core/workers/chunks/0dbb350ce651bc236ec8.js +1 -0
- package/assets/esri/core/workers/chunks/0ed4ec00ef16aa58a33d.js +1 -0
- package/assets/esri/core/workers/chunks/{0624ae07d3af8d5f1ac8.js → 15b3eb60f86954783fab.js} +1 -1
- package/assets/esri/core/workers/chunks/{b845586219f284a215b2.js → 1db026cc25338dbc208e.js} +1 -1
- package/assets/esri/core/workers/chunks/21de4516bf5c9630edfd.js +1 -0
- package/assets/esri/core/workers/chunks/2254989ca3ff3960f2fe.js +1 -0
- package/assets/esri/core/workers/chunks/248a198f97871a8d6dd6.js +1 -0
- package/assets/esri/core/workers/chunks/2dbd18df5c691c8d0a61.js +1 -0
- package/assets/esri/core/workers/chunks/2e1ceff3f88a6c78dfa2.js +1 -0
- package/assets/esri/core/workers/chunks/{847e88e1d6da1e74cdc8.js → 2ecc1057d53e0b4a60b7.js} +1 -1
- package/assets/esri/core/workers/chunks/3025e420e13e2bc8c0a1.js +1 -0
- package/assets/esri/core/workers/chunks/32537e2b014bc3d82f5c.js +346 -0
- package/assets/esri/core/workers/chunks/34f55bb89ddf26b10260.js +1 -0
- package/assets/esri/core/workers/chunks/355ab428a04ee9fcf888.js +1 -0
- package/assets/esri/core/workers/chunks/{28e31ac00dc95a1318e9.js → 3916879b9ca8c6979011.js} +1 -1
- package/assets/esri/core/workers/chunks/3a74654fa539f78ceb86.js +1 -0
- package/assets/esri/core/workers/chunks/3bec10a4f01757590c1c.js +1 -0
- package/assets/esri/core/workers/chunks/{a4c108e913d2dc0edc7b.js → 4088f4c25a09932a3eb1.js} +1 -1
- package/assets/esri/core/workers/chunks/427318722815bef1496b.js +1 -0
- package/assets/esri/core/workers/chunks/4c3bd6cc0badb78c7112.js +1 -0
- package/assets/esri/core/workers/chunks/500fb5f615f0c1db1b66.js +1 -0
- package/assets/esri/core/workers/chunks/5222523fff30d07f88de.js +1 -0
- package/assets/esri/core/workers/chunks/{412eef58cb0d24826375.js → 52c34d6ecd9d45a33e69.js} +1 -1
- package/assets/esri/core/workers/chunks/539541dec5fcf3b657aa.js +1 -0
- package/assets/esri/core/workers/chunks/53e8c061f36516c3c3e4.js +1 -0
- package/assets/esri/core/workers/chunks/{ca76950d81ab4ebb65e1.js → 58f403f956b7b3467344.js} +1 -1
- package/assets/esri/core/workers/chunks/5a01bd7a9ee24be7bac4.js +1 -0
- package/assets/esri/core/workers/chunks/5bfcb3d87380e7f85b08.js +1 -0
- package/assets/esri/core/workers/chunks/5d3246b8fc50f9d9e2c4.js +1 -0
- package/assets/esri/core/workers/chunks/{4dd0a5f327fa5fc7249d.js → 5ef1095842e21090f1f4.js} +1 -1
- package/assets/esri/core/workers/chunks/614bc3f05873b37af091.js +1 -0
- package/assets/esri/core/workers/chunks/6194636638b0439fccd8.js +1 -0
- package/assets/esri/core/workers/chunks/66e4cb2479bed1384ed5.js +1 -0
- package/assets/esri/core/workers/chunks/6b0ae9ccdd1acef5b5b4.js +1 -0
- package/assets/esri/core/workers/chunks/7112b092d98172b7db8b.js +1 -0
- package/assets/esri/core/workers/chunks/72ea996b03932c0f004f.js +1 -0
- package/assets/esri/core/workers/chunks/74d18c22fa1c178bd9df.js +1 -0
- package/assets/esri/core/workers/chunks/766e08d0c56b2b31b63b.js +1 -0
- package/assets/esri/core/workers/chunks/77dbb1d5d5e1a6ced932.js +1 -0
- package/assets/esri/core/workers/chunks/{bd7b54db7fd278b15500.js → 7a2189614f2dad49ffcd.js} +1 -1
- package/assets/esri/core/workers/chunks/7ae88c141a5d85e5bb88.js +1 -0
- package/assets/esri/core/workers/chunks/7aef81778155be373d3e.js +1 -0
- package/assets/esri/core/workers/chunks/7e1906d35a764f7f10b0.js +1 -0
- package/assets/esri/core/workers/chunks/80777a9db53bee2ad8a8.js +1 -0
- package/assets/esri/core/workers/chunks/8249b5de5c15461a6787.js +1 -0
- package/assets/esri/core/workers/chunks/8385c13ac10e595374cb.js +1 -0
- package/assets/esri/core/workers/chunks/83db8bd42f94f97c7cf1.js +1 -0
- package/assets/esri/core/workers/chunks/87623ebe32c6ae9cb223.js +1 -0
- package/assets/esri/core/workers/chunks/88b1214c284c2ec7d51b.js +1 -0
- package/assets/esri/core/workers/chunks/8b86c75426c55b29ebed.js +1 -0
- package/assets/esri/core/workers/chunks/8c4b26d86483646c70d2.js +1 -0
- package/assets/esri/core/workers/chunks/9cb242dfc3765b590f51.js +1 -0
- package/assets/esri/core/workers/chunks/9ddb0b07be31c3747238.js +1 -0
- package/assets/esri/core/workers/chunks/9f0f1472f36b42c507d1.js +1 -0
- package/assets/esri/core/workers/chunks/{f840e1655c4f6b6630be.js → 9f964467f7353039dd9c.js} +19 -19
- package/assets/esri/core/workers/chunks/9fe62638dc7dce466612.js +1 -0
- package/assets/esri/core/workers/chunks/a2e9141ff4efd13413a1.js +66 -0
- package/assets/esri/core/workers/chunks/adf6982e2d8102669cdf.js +1 -0
- package/assets/esri/core/workers/chunks/{d9b2263e0a9f9068ab62.js → b6c3a2d93a59df9a1418.js} +1 -1
- package/assets/esri/core/workers/chunks/b763292829aa4d3fab60.js +1 -0
- package/assets/esri/core/workers/chunks/ba015f4f72714820a12f.js +1 -0
- package/assets/esri/core/workers/chunks/bbbd58b02a3ee8fe595e.js +1 -0
- package/assets/esri/core/workers/chunks/c3d95f7f4370486eed2c.js +1 -0
- package/assets/esri/core/workers/chunks/c3df693d1bce8f189fa2.js +1 -0
- package/assets/esri/core/workers/chunks/{6993a59cbb78bc26f029.js → c45a314ace9725aa250e.js} +1 -1
- package/assets/esri/core/workers/chunks/c96fed4889712f5a9135.js +1 -0
- package/assets/esri/core/workers/chunks/c9fbada1e84981784f6c.js +1 -0
- package/assets/esri/core/workers/chunks/cefcecbeef4f0a46f58c.js +1 -0
- package/assets/esri/core/workers/chunks/d2317b87aa2ac3ad97a6.js +1 -0
- package/assets/esri/core/workers/chunks/{0bbb38f59f37c51c72f0.js → d45a4e5806a80b69ceec.js} +1 -1
- package/assets/esri/core/workers/chunks/{7a23dc625a812a562c21.js → d5f770302dc686e55ba7.js} +1 -1
- package/assets/esri/core/workers/chunks/dc14507cfc052faa5890.js +1 -0
- package/assets/esri/core/workers/chunks/e7a440476cd1eb4c6547.js +1 -0
- package/assets/esri/core/workers/chunks/ede9738ac20e7dd5ce63.js +1 -0
- package/assets/esri/core/workers/chunks/eec034d88db320880133.js +1 -0
- package/assets/esri/core/workers/chunks/f1e87720b425d7fb348a.js +1 -0
- package/assets/esri/core/workers/chunks/f2863c501d62dece5fdd.js +1 -0
- package/assets/esri/core/workers/chunks/f5741d09fd4e1809f580.js +1 -0
- package/assets/esri/core/workers/chunks/f9e1b73976027e17cd03.js +1 -0
- package/assets/esri/core/workers/chunks/fd207a40faf882d3b2a3.js +1 -0
- package/assets/esri/core/workers/chunks/fe3832107278244dc04d.js +1 -0
- package/assets/esri/widgets/Editor/t9n/Editor.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_ar.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_bg.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_bs.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_ca.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_cs.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_da.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_de.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_el.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_en.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_es.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_et.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_fi.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_fr.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_he.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_hr.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_hu.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_id.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_it.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_ja.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_ko.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_lt.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_lv.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_nl.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_no.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_pl.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_pt-BR.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_pt-PT.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_ro.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_ru.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_sk.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_sl.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_sr.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_sv.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_th.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_tr.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_uk.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_vi.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_zh-CN.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_zh-HK.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_zh-TW.json +1 -1
- package/chunks/aiServices.js +1 -1
- package/config.js +1 -1
- package/core/workers/Connection.js +1 -1
- package/core/workers/RemoteClient.js +1 -1
- package/core/workers/WorkerHandle.js +1 -1
- package/effects/FocusArea.d.ts +4 -0
- package/effects/FocusArea.js +1 -1
- package/effects/FocusAreaOutline.d.ts +4 -0
- package/effects/FocusAreaOutline.js +1 -1
- package/effects/FocusAreas.d.ts +4 -0
- package/effects/FocusAreas.js +1 -1
- package/geometry.js +1 -1
- package/interfaces.d.ts +319 -43
- package/kernel.js +1 -1
- package/layers/BuildingSceneLayer.js +1 -1
- package/layers/GroupLayer.js +1 -1
- package/layers/ImageryLayer.js +1 -1
- package/layers/ImageryTileLayer.js +1 -1
- package/layers/VideoLayer.js +1 -1
- package/layers/buildingSublayers/BuildingComponentSublayer.js +1 -1
- package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
- package/layers/graphics/editingSupport.js +1 -1
- package/layers/mixins/ImageryTileMixin.js +1 -1
- package/layers/mixins/operationalLayerModuleMap.js +1 -1
- package/layers/mixins/operationalLayers.js +1 -1
- package/layers/support/BuildingSummaryStatistics.js +1 -1
- package/layers/support/PromiseQueue.js +1 -1
- package/layers/support/TelemetryDisplay.js +1 -1
- package/layers/support/TitleCreator.js +1 -1
- package/layers/support/arcgisLayers.js +1 -1
- package/layers/support/featurePopupQueryUtils.js +5 -0
- package/layers/support/fieldUtils.js +1 -1
- package/layers/support/layersCreator.js +1 -1
- package/layers/support/multiLayerServiceUtils.js +5 -0
- package/networks/CircuitManager.js +1 -1
- package/networks/UnitIdentifierManager.js +1 -1
- package/networks/UtilityNetwork.js +1 -1
- package/networks/support/UNTraceConfiguration.js +1 -1
- package/networks/support/typeUtils.js +1 -1
- package/package.json +1 -1
- package/portal/PortalItem.js +1 -1
- package/portal/support/layersLoader.js +1 -1
- package/portal/support/portalLayers.js +1 -1
- package/rasterRenderers.js +1 -1
- package/renderers.js +1 -1
- package/rest/featureService/FeatureService.js +1 -1
- package/rest/locator/locationToAddress.js +1 -1
- package/rest/networks/circuits/queryCircuits.js +1 -1
- package/rest/networks/circuits/support/QueryCircuitsParameters.js +1 -1
- package/rest/networks/support/CircuitTraceResult.js +5 -0
- package/rest/networks/support/TraceResult.js +1 -1
- package/rest/networks/unitIdentifiers/support/{QueryUnitIdentifiersParamters.js → QueryUnitIdentifiersParameters.js} +1 -1
- package/rest/support/LocationToAddressParameters.js +1 -1
- package/rest/support/geocodeEnums.js +5 -0
- package/support/revision.js +1 -1
- package/symbols/cim/animationUtils.js +1 -1
- package/symbols/cim/cimAnalyzer.js +1 -1
- package/symbols/cim/defaultCIMValues.js +1 -1
- package/symbols/cim/effects/EffectEnclosingPolygon.js +1 -1
- package/symbols/cim/utils.js +1 -1
- package/symbols/support/cimSymbolUtils.js +1 -1
- package/symbols/support/previewCIMSymbol.js +1 -1
- package/symbols.js +1 -1
- package/views/2d/engine/webgl/animations/infos.js +1 -1
- package/views/2d/engine/webgl/animations/instructions.js +1 -1
- package/views/2d/engine/webgl/animations/utils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/GraphicInstanceStore.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/TechniqueRegistry.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/TechniqueType.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AAnimatedPolyShader.js +5 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AAnimatedShader.js +5 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedFillShader.js +5 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedLineShader.js +5 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedPolyMeshWriters.js +5 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedTechniques.js +5 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/ComputedAnimatedParams.js +5 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/attributes.js +5 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/enums.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/createGraphicSymbolMeshSchemas.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/line/LineMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriterRegistry.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ComplexFillShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/LineShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/hittestUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/utils.js +1 -1
- package/views/2d/layers/MediaLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/features/schema/processor/symbols/ComplexSymbolSchema.js +1 -1
- package/views/2d/layers/features/schema/processor/symbols/utils.js +1 -1
- package/views/3d/interactive/editingTools/reshape/ReshapeTool3D.js +1 -1
- package/views/3d/interactive/visualElements/DrapedVisualElementResources.js +1 -1
- package/views/3d/layers/BuildingComponentSublayerView3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/PointCloudLayerView3D.js +1 -1
- package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DSymbolCreationContext.js +1 -1
- package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
- package/views/3d/layers/i3s/I3SMaterialUtil.js +1 -1
- package/views/3d/layers/i3s/I3SUtil.js +1 -1
- package/views/3d/layers/support/DefinitionExpressionSceneLayerView.js +1 -1
- package/views/3d/layers/support/FeatureVisibilityFilter.js +1 -1
- package/views/3d/layers/support/PopupSceneLayerView.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/terrain/TileRenderer.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/AllRenderPasses.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +3 -3
- package/views/3d/webgl-engine/lib/Texture.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/SelectionManager.js +1 -1
- package/views/VideoView.js +1 -1
- package/views/draw/support/GraphicMover.js +1 -1
- package/views/layers/CatalogDynamicGroupLayerView.js +1 -1
- package/views/layers/FeatureLayerView.js +1 -1
- package/views/layers/ImageryLayerView.js +1 -1
- package/views/layers/ImageryTileLayerView.js +1 -1
- package/views/layers/PointCloudLayerView.js +1 -1
- package/views/support/TextureCompressionTracker.js +5 -0
- package/views/webgl/Texture.js +1 -1
- package/webdoc/support/writeUtils.js +1 -1
- package/webmap/utils.js +1 -1
- package/widgets/Attachments.js +1 -1
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/Directions/DirectionsVisibleElements.js +1 -1
- package/widgets/Directions.js +1 -1
- package/widgets/Editor/AddAssociationWorkflowData.js +1 -1
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
- package/widgets/Editor/UpdateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/UpdateRecordWorkflowData.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Expand.js +1 -1
- package/widgets/Feature/support/featureUtils.js +1 -1
- package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationItemList.js +1 -1
- package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
- package/widgets/FeatureForm/featureFormUtils.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/FeatureTable/Grid/Grid.js +1 -1
- package/widgets/Features/FeaturesViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/sketch/TriangulatedMeasurementAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/components/OrientedImageryVideoViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/components/SequentialNavigationUI.js +1 -1
- package/widgets/OrientedImageryViewer/navigation/queries.js +1 -1
- package/widgets/OrientedImageryViewer/videoViewerUtils.js +5 -0
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/Search/LocatorSearchSource.js +1 -1
- package/widgets/Search/SearchSource.js +1 -1
- package/widgets/Search/SearchViewModel.js +1 -1
- package/widgets/Search/support/locatorUtils.js +1 -1
- package/widgets/Sketch.js +1 -1
- package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.js +1 -1
- package/widgets/support/SelectionToolbar.js +1 -1
- package/widgets/support/Selector2D/SelectionOperation.js +1 -1
- package/widgets/support/Selector2D/selectorUtils.js +1 -1
- package/assets/esri/core/workers/chunks/003ddb190a5cc56f7925.js +0 -1
- package/assets/esri/core/workers/chunks/03db109e9b695528c35d.js +0 -1
- package/assets/esri/core/workers/chunks/09da6b3085fc84cd69d5.js +0 -1
- package/assets/esri/core/workers/chunks/0a770f283eb77c8dc97a.js +0 -1
- package/assets/esri/core/workers/chunks/0b70b2ee62904318a12c.js +0 -1
- package/assets/esri/core/workers/chunks/0c2dccec20c0994366fe.js +0 -1
- package/assets/esri/core/workers/chunks/0d78fc2c2bc1152f84db.js +0 -1
- package/assets/esri/core/workers/chunks/0fb5de3f8a4d69b2d514.js +0 -1
- package/assets/esri/core/workers/chunks/17e43a050fbf8dc87588.js +0 -1
- package/assets/esri/core/workers/chunks/1d7f2abfccc54659d6f2.js +0 -1
- package/assets/esri/core/workers/chunks/1f9c6fbcd4d0eae1e574.js +0 -1
- package/assets/esri/core/workers/chunks/22e53cb1c8c575fa4d46.js +0 -1
- package/assets/esri/core/workers/chunks/2cf82d3645c75d311e99.js +0 -1
- package/assets/esri/core/workers/chunks/2d90806faa4269828948.js +0 -1
- package/assets/esri/core/workers/chunks/377a7f0f7d304ff9fe5b.js +0 -1
- package/assets/esri/core/workers/chunks/3bf1cf6c3cba172e2f6d.js +0 -1
- package/assets/esri/core/workers/chunks/3d7eedb787c1e3b9fbfc.js +0 -1
- package/assets/esri/core/workers/chunks/3fe7be535affae31de7e.js +0 -1
- package/assets/esri/core/workers/chunks/417293f00b2c21cc3175.js +0 -1
- package/assets/esri/core/workers/chunks/41cbba9b286cf5558a9c.js +0 -1
- package/assets/esri/core/workers/chunks/42bb9bb6fe44a47d9b81.js +0 -1
- package/assets/esri/core/workers/chunks/465f2db4ab8aa9c9f907.js +0 -1
- package/assets/esri/core/workers/chunks/4ca0738ed38c15b68a77.js +0 -1
- package/assets/esri/core/workers/chunks/515e3295495d0958db7e.js +0 -1
- package/assets/esri/core/workers/chunks/51ba7345c31e6eb79060.js +0 -1
- package/assets/esri/core/workers/chunks/5200be8bce60fa831026.js +0 -1
- package/assets/esri/core/workers/chunks/52a57106a41b8c9483d7.js +0 -1
- package/assets/esri/core/workers/chunks/536d7986ebb710a8a452.js +0 -1
- package/assets/esri/core/workers/chunks/5617532299f73d186968.js +0 -1
- package/assets/esri/core/workers/chunks/56d2a20c1b143697aa19.js +0 -1
- package/assets/esri/core/workers/chunks/5890740d5a761b038560.js +0 -1
- package/assets/esri/core/workers/chunks/5dbd8d81d94cfda5bb32.js +0 -1
- package/assets/esri/core/workers/chunks/5e1f7fe6bbc5754efee1.js +0 -1
- package/assets/esri/core/workers/chunks/61f9747c960d959b571b.js +0 -346
- package/assets/esri/core/workers/chunks/74182421ba425720dc7f.js +0 -1
- package/assets/esri/core/workers/chunks/74c0db9e3a62e9839b23.js +0 -1
- package/assets/esri/core/workers/chunks/7b12607633bbdc318936.js +0 -1
- package/assets/esri/core/workers/chunks/86023cc5ccbc7ac43479.js +0 -1
- package/assets/esri/core/workers/chunks/87eca6de502d18d8b7eb.js +0 -1
- package/assets/esri/core/workers/chunks/8aa8f9986b966ccb64e2.js +0 -1
- package/assets/esri/core/workers/chunks/8d14e957219364a81d5f.js +0 -66
- package/assets/esri/core/workers/chunks/937b653b10e8704b38bf.js +0 -1
- package/assets/esri/core/workers/chunks/98ef17d15517368d2383.js +0 -1
- package/assets/esri/core/workers/chunks/9cac00d4bfac14aaae12.js +0 -1
- package/assets/esri/core/workers/chunks/a0c35521e677459f6fa3.js +0 -1
- package/assets/esri/core/workers/chunks/a32dcd5bc4680374d30c.js +0 -1
- package/assets/esri/core/workers/chunks/aaa6d45316a7d3466d0f.js +0 -1
- package/assets/esri/core/workers/chunks/ae733c963d61065faa54.js +0 -1
- package/assets/esri/core/workers/chunks/b2a6afa0cd537805b4b8.js +0 -1
- package/assets/esri/core/workers/chunks/bf9b6b74654d303a6dae.js +0 -1
- package/assets/esri/core/workers/chunks/c6580fdcdc33153008b0.js +0 -1
- package/assets/esri/core/workers/chunks/c779335f5d5455c77a62.js +0 -1
- package/assets/esri/core/workers/chunks/c77cfd8790877393353a.js +0 -1
- package/assets/esri/core/workers/chunks/c9ab067b07d1eab974d1.js +0 -1
- package/assets/esri/core/workers/chunks/d3c0d7799c92c6f0e7d3.js +0 -1
- package/assets/esri/core/workers/chunks/d52f5214a0330ed2e05e.js +0 -1
- package/assets/esri/core/workers/chunks/dbe10c20df7e0e563a0b.js +0 -1
- package/assets/esri/core/workers/chunks/df7ca2fe12e22ccfde17.js +0 -1
- package/assets/esri/core/workers/chunks/df933eac03dc63064723.js +0 -1
- package/assets/esri/core/workers/chunks/e89345c7af9d3d4d8452.js +0 -1
- package/assets/esri/core/workers/chunks/ee6240636d04d7d37b7b.js +0 -1
- package/assets/esri/core/workers/chunks/ef7955a2509be0f03ca2.js +0 -1
- package/assets/esri/core/workers/chunks/f1c6df5cf2ccb6ac47a1.js +0 -1
- package/assets/esri/core/workers/chunks/f3d97a4c4f433adbdab5.js +0 -1
- package/assets/esri/core/workers/chunks/fc0a3db3d6d26c763fb9.js +0 -1
- package/assets/esri/core/workers/chunks/fd4c020297badcb81947.js +0 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerTechnique.js +0 -5
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedShader.js +0 -5
- package/views/support/TextureCompressionHandle.js +0 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5943],{18768:(e,t,i)=>{i.d(t,{b:()=>l});var s=i(90237),r=i(53966),n=i(10107),a=(i(44208),i(87811),i(40608)),o=i(60694);const l=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,o.qg)(this.url);if(e?.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,o.Jf)(e,r.A.getLogger(this)))}};return(0,s._)([(0,n.MZ)()],t.prototype,"title",null),(0,s._)([(0,n.MZ)({type:String})],t.prototype,"url",null),t=(0,s._)([(0,a.$)("esri.layers.mixins.ArcGISService")],t),t}},21312:(e,t,i)=>{i.d(t,{A:()=>m});var s,r=i(90237),n=i(10107),a=(i(44208),i(53966),i(87811),i(93223)),o=i(36005),l=i(40608),c=i(43937),u=i(5443),f=i(86738),h=i(82434);function p(e,t,i){const{x:s,y:r}=t;if(i<2)return{x:e[0]+s*e[2]+r*e[4],y:e[1]+s*e[3]+r*e[5]};if(2===i){const t=s*s,i=r*r,n=s*r;return{x:e[0]+s*e[2]+r*e[4]+t*e[6]+n*e[8]+i*e[10],y:e[1]+s*e[3]+r*e[5]+t*e[7]+n*e[9]+i*e[11]}}const n=s*s,a=r*r,o=s*r,l=n*s,c=n*r,u=s*a,f=r*a;return{x:e[0]+s*e[2]+r*e[4]+n*e[6]+o*e[8]+a*e[10]+l*e[12]+c*e[14]+u*e[16]+f*e[18],y:e[1]+s*e[3]+r*e[5]+n*e[7]+o*e[9]+a*e[11]+l*e[13]+c*e[15]+u*e[17]+f*e[19]}}function d(e,t,i){const{xmin:s,ymin:r,xmax:n,ymax:a,spatialReference:o}=t;let l=[];if(i<2)l.push({x:s,y:a}),l.push({x:n,y:a}),l.push({x:s,y:r}),l.push({x:n,y:r});else{let e=10;for(let t=0;t<e;t++)l.push({x:s,y:r+(a-r)*t/(e-1)}),l.push({x:n,y:r+(a-r)*t/(e-1)});e=8;for(let t=1;t<=e;t++)l.push({x:s+(n-s)*t/e,y:r}),l.push({x:s+(n-s)*t/e,y:a})}l=l.map((t=>p(e,t,i)));const c=l.map((e=>e.x)),f=l.map((e=>e.y));return new u.A({xmin:Math.min.apply(null,c),xmax:Math.max.apply(null,c),ymin:Math.min.apply(null,f),ymax:Math.max.apply(null,f),spatialReference:o})}let m=s=class extends h.A{constructor(){super(...arguments),this.polynomialOrder=1,this.type="polynomial"}readForwardCoefficients(e,t){const{coeffX:i,coeffY:s}=t;if(!i?.length||!s?.length||i.length!==s.length)return null;const r=[];for(let e=0;e<i.length;e++)r.push(i[e]),r.push(s[e]);return r}writeForwardCoefficients(e,t,i){const s=[],r=[];for(let t=0;t<e?.length;t++)t%2==0?s.push(e[t]):r.push(e[t]);t.coeffX=s,t.coeffY=r}get inverseCoefficients(){let e=this._get("inverseCoefficients");const t=this._get("forwardCoefficients");return!e&&t&&this.polynomialOrder<2&&(e=function(e){const[t,i,s,r,n,a]=e,o=s*a-n*r,l=n*r-s*a;return[(n*i-t*a)/o,(s*i-t*r)/l,a/o,r/l,-n/o,-s/l]}(t)),e}set inverseCoefficients(e){this._set("inverseCoefficients",e)}readInverseCoefficients(e,t){const{inverseCoeffX:i,inverseCoeffY:s}=t;if(!i?.length||!s?.length||i.length!==s.length)return null;const r=[];for(let e=0;e<i.length;e++)r.push(i[e]),r.push(s[e]);return r}writeInverseCoefficients(e,t,i){const s=[],r=[];for(let t=0;t<e?.length;t++)t%2==0?s.push(e[t]):r.push(e[t]);t.inverseCoeffX=s,t.inverseCoeffY=r}get affectsPixelSize(){return this.polynomialOrder>0}forwardTransform(e){if("point"===e.type){const t=p(this.forwardCoefficients,e,this.polynomialOrder);return new f.A({x:t.x,y:t.y,spatialReference:e.spatialReference})}return d(this.forwardCoefficients,e,this.polynomialOrder)}inverseTransform(e){if("point"===e.type){const t=p(this.inverseCoefficients,e,this.polynomialOrder);return new f.A({x:t.x,y:t.y,spatialReference:e.spatialReference})}return d(this.inverseCoefficients,e,this.polynomialOrder)}clone(){return new s({polynomialOrder:this.polynomialOrder,forwardCoefficients:this.forwardCoefficients?[...this.forwardCoefficients]:null,inverseCoefficients:this.inverseCoefficients?[...this.inverseCoefficients]:null})}};(0,r._)([(0,n.MZ)({json:{write:!0}})],m.prototype,"polynomialOrder",void 0),(0,r._)([(0,n.MZ)()],m.prototype,"forwardCoefficients",void 0),(0,r._)([(0,o.w)("forwardCoefficients",["coeffX","coeffY"])],m.prototype,"readForwardCoefficients",null),(0,r._)([(0,c.K)("forwardCoefficients")],m.prototype,"writeForwardCoefficients",null),(0,r._)([(0,n.MZ)({json:{write:!0}})],m.prototype,"inverseCoefficients",null),(0,r._)([(0,o.w)("inverseCoefficients",["inverseCoeffX","inverseCoeffY"])],m.prototype,"readInverseCoefficients",null),(0,r._)([(0,c.K)("inverseCoefficients")],m.prototype,"writeInverseCoefficients",null),(0,r._)([(0,n.MZ)()],m.prototype,"affectsPixelSize",null),(0,r._)([(0,a.e)({PolynomialXform:"polynomial"})],m.prototype,"type",void 0),m=s=(0,r._)([(0,l.$)("esri.layers.support.rasterTransforms.PolynomialTransform")],m)},24212:(e,t,i)=>{function s(e,t){return function(e,t){return t?.mode?t.mode:function(e){return e?l:c}(e).mode}(null==e||(e.hasZ??!1),t)}function r(e,t,i){return i&&i.mode!==t?`${e} only support ${t} elevation mode`:null}function n(e,t,i){return i?.mode===t?`${e} do not support ${t} elevation mode`:null}function a(e,t){return null!=t?.featureExpressionInfo&&"0"!==t.featureExpressionInfo.expression?`${e} do not support featureExpressionInfo`:null}function o(e,t){t&&e.warn(".elevationInfo=",t)}i.d(t,{$7:()=>n,B:()=>r,XF:()=>o,tW:()=>a,w7:()=>s}),i(83047),i(16271);const l={mode:"absolute-height",offset:0},c={mode:"on-the-ground",offset:null}},25943:(e,t,i)=>{i.d(t,{d:()=>A});var s,r=i(90237),n=i(78888),a=i(69622),o=i(71903),l=i(49186),c=i(36563),u=(i(44208),i(66344)),f=i(3694),h=i(74887),p=i(36708),d=i(11932),m=i(84952),y=i(10107),g=(i(53966),i(87811),i(40608)),w=i(72802),v=i(4718),x=i(69397),b=i(34275);class I{constructor(e){!function(e){if(!e?.location)throw new l.A("tilemap:missing-location","Location missing from tilemap response");if(!1===e.valid)throw new l.A("tilemap:invalid","Tilemap response was marked as invalid");if(!e.data)throw new l.A("tilemap:missing-data","Data missing from tilemap response");if(!Array.isArray(e.data))throw new l.A("tilemap:data-mismatch","Data must be an array of numbers");if(e.data.length!==e.location.width*e.location.height)throw new l.A("tilemap:data-mismatch","Number of data items does not match width/height of tilemap")}(e);const{location:t,data:i}=e;this.location=Object.freeze((0,v.o8)(t));const s=this.location.width,r=this.location.height;let n=!0,a=!0;const o=function(e,t=!1){return e<=b.y9?t?new Array(e).fill(0):new Array(e):new Uint32Array(e)}(Math.ceil(s*r/32));let c=0;for(let e=0;e<i.length;e++){const t=e%32;i[e]?(a=!1,o[c]|=1<<t):n=!1,31===t&&++c}a?(this._availability="unavailable",this.byteSize=40):n?(this._availability="available",this.byteSize=40):(this._availability=o,this.byteSize=40+(0,x.Qf)(o))}getAvailability(e,t){if("unavailable"===this._availability||"available"===this._availability)return this._availability;const i=(e-this.location.top)*this.location.width+(t-this.location.left),s=i%32,r=i>>5,n=this._availability;return r<0||r>n.length?"unknown":n[r]&1<<s?"available":"unavailable"}static fromDefinition(e,t){const i=e.service.request||n.A,{row:s,col:r,width:a,height:o}=e,c={query:{f:"json"}};return t=t?{...c,...t}:c,i(function(e){let t;if(e.service.tileServers?.length){const i=e.service.tileServers;t=`${i&&i.length?i[e.row%i.length]:e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}else t=`${e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`;const i=e.service.query;return i&&(t=`${t}?${i}`),t}(e),t).then((e=>e.data)).catch((e=>{if(422===e?.details?.httpStatus)return{location:{top:s,left:r,width:a,height:o},valid:!0,data:new Array(a*o).fill(0)};throw e})).then((e=>{if(e.location&&(e.location.top!==s||e.location.left!==r||e.location.width!==a||e.location.height!==o))throw new l.A("tilemap:location-mismatch","Tilemap response for different location than requested",{response:e,definition:{top:s,left:r,width:a,height:o}});return I.fromJSON(e)}))}static fromJSON(e){return Object.freeze(new I(e))}}function _(e){return`${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}function S(e,t,i){return new l.A("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i})}let A=class extends a.A{static{s=this}constructor(e){super(e),this._pendingTilemapRequests={},this.request=n.A,this.size=32,this._prefetchingEnabled=!0}initialize(){this._tilemapCache=new u.q(2*o.u.MEGABYTES),this.addHandles((0,p.wB)((()=>{const{layer:e}=this;return[e?.parsedUrl,e?.tileServers,e?.apiKey,e?.customParameters]}),(()=>this._initializeTilemapDefinition()),p.Vh))}get effectiveMinLOD(){return this.minLOD??this.layer.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.layer.tileInfo.lods[this.layer.tileInfo.lods.length-1].level}getAvailability(e,t,i){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return"unavailable";const s=this._tilemapFromCache(e,t,i,this._tmpTilemapDefinition);return s?s.getAvailability(t,i):"unknown"}fetchAvailability(e,t,i,s){return!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD?Promise.reject(S(e,t,i)):this._fetchTilemap(e,t,i,s).catch((e=>e)).then((s=>{if(s instanceof I){const r=s.getAvailability(t,i);if("unavailable"===r)throw S(e,t,i);return r}if((0,h.zf)(s))throw s;return"unknown"}))}fetchAvailabilityUpsample(e,t,i,s,r){s.level=e,s.row=t,s.col=i;const n=this.layer.tileInfo;n.updateTileInfo(s);const a=this.fetchAvailability(e,t,i,r).catch((e=>{if((0,h.zf)(e))throw e;if(n.upsampleTile(s))return this.fetchAvailabilityUpsample(s.level,s.row,s.col,s,r);throw e}));return this._fetchAvailabilityUpsamplePrefetch(s.id,e,t,i,r,a),a}async _fetchAvailabilityUpsamplePrefetch(e,t,i,r,n,a){if(!this._prefetchingEnabled||null==e)return;const o=`prefetch-${e}`;if(this.hasHandles(o))return;const l=new AbortController;a.then((()=>l.abort()),(()=>l.abort()));let u=!1;const f=(0,c.hA)((()=>{u||(u=!0,l.abort())}));if(this.addHandles(f,o),await(0,d.md)(10,l.signal).catch((()=>{})),u||(u=!0,this.removeHandles(o)),(0,h.G4)(l))return;const p=new w.U(e,t,i,r),m={...n,signal:l.signal},y=this.layer.tileInfo;for(let e=0;s._prefetches.length<s._maxPrefetch&&y.upsampleTile(p);++e){const e=this.fetchAvailability(p.level,p.row,p.col,m);s._prefetches.push(e);const t=()=>{s._prefetches.removeUnordered(e)};e.then(t,t)}}static{this._maxPrefetch=4}static{this._prefetches=new f.A({initialSize:s._maxPrefetch})}_fetchTilemap(e,t,i,s){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return Promise.reject(new l.A("tilemap-cache:level-unavailable",`Level ${e} is unavailable in the service`));const r=this._tmpTilemapDefinition,n=this._tilemapFromCache(e,t,i,r);if(n)return Promise.resolve(n);const a=s?.signal;return s={...s,signal:null},new Promise(((e,t)=>{(0,h.u7)(a,(()=>t((0,h.NK)())));const i=_(r);let n=this._pendingTilemapRequests[i];if(!n){n=I.fromDefinition(r,s).then((e=>(this._tilemapCache.put(i,e,e.byteSize),e)));const e=()=>{delete this._pendingTilemapRequests[i]};this._pendingTilemapRequests[i]=n,n.then(e,e)}n.then(e,t)}))}_initializeTilemapDefinition(){if(!this.layer.parsedUrl)return;const{parsedUrl:e,apiKey:t,customParameters:i}=this.layer;this._tilemapCache.clear(),this._tmpTilemapDefinition={service:{url:e.path,query:(0,m.x0)({...e.query,...i,token:t??e.query?.token}),tileServers:this.layer.tileServers,request:this.request},width:this.size,height:this.size,level:0,row:0,col:0}}_tilemapFromCache(e,t,i,s){s.level=e,s.row=t-t%this.size,s.col=i-i%this.size;const r=_(s);return this._tilemapCache.get(r)}get test(){}};(0,r._)([(0,y.MZ)({constructOnly:!0})],A.prototype,"layer",void 0),(0,r._)([(0,y.MZ)({constructOnly:!0})],A.prototype,"minLOD",void 0),(0,r._)([(0,y.MZ)({constructOnly:!0})],A.prototype,"maxLOD",void 0),(0,r._)([(0,y.MZ)({constructOnly:!0})],A.prototype,"request",void 0),(0,r._)([(0,y.MZ)({constructOnly:!0})],A.prototype,"size",void 0),A=s=(0,r._)([(0,g.$)("esri.layers.support.TilemapCache")],A)},35943:(e,t,i)=>{i.r(t),i.d(t,{default:()=>Ge});var s=i(90237),r=i(13874),n=i(69540),a=i(49186),o=i(53966),l=i(92071),c=i(74887),u=i(36708),f=i(10107),h=i(56507),p=i(44208),d=(i(87811),i(40608)),m=i(4146),y=i(18768),g=i(63074),w=i(69208),v=i(89015),x=i(16131),b=i(8303),I=i(63660),_=i(56551),S=i(54310),A=i(25036),T=i(82935),R=i(10873),C=i(20437),M=i(74797),O=i(22796),F=i(76353),P=i(84169),k=i(4916),D=i(68197),N=i(5443),E=i(16930),L=i(73444),B=i(14140),z=i(16019);function J(e){return["x","e","east","long","longitude"].includes(e.toLowerCase())}function $(e){return["y","n","west","lat","latitude"].includes(e.toLowerCase())}function U(e){const{axes:t}=e.domain,i=Object.keys(t),s=[],r=[];let n=-1,a=-1,o=[];for(let e=0;e<i.length;e++){const l=i[e];J(l)?n=e:$(l)&&(a=e);const c=t[l],u=[];if("values"in c){c.values.forEach((e=>u.push("string"==typeof e?new Date(e).getTime():e)));const e=u[1]-u[0];s.push([u[0]-.5*e,u[u.length-1]+.5*e]),r.push(e)}else{const{start:e,stop:t,num:i}=c,n=(t-e)/(i-1);s.push([e-.5*n,t+.5*n]),r.push(n);for(let t=0;t<i;t++)u.push(e+n*t)}o.push({name:l,values:u,extent:[u[0],u[u.length-1]]})}n>-1&&-1===a?a=0===n?1:0:a>-1&&-1===n?n=0===a?1:0:-1===a&&-1===n&&(n=0,a=1),o=o.filter(((e,t)=>!(t===n||t===a)));const{referencing:l}=e.domain,c=l.find((e=>e.coordinates.includes(i[n]))).system.id,u=c?.slice(c.lastIndexOf("/")+1),f=null==u||"CRS84"===u?4326:Number(u),h=new E.A({wkid:f}),[p,d]=s[n],[m,y]=s[a],g=new N.A({xmin:p,xmax:d,ymin:m,ymax:y,spatialReference:h});return{width:Math.round(g.width/r[n]),height:Math.round(g.height/r[a]),extent:g,dimensions:o}}function V(e){const t=(0,L.ZS)()?.language;return t?e[t]??Object.values(e)[0]:Object.values(e)[0]}function j(){return Math.round(255*Math.random())}function Z(e){const t={},{parameters:i}=e;if(!i)return t;for(const[e,s]of Object.entries(i)){const{type:i,description:r,unit:n,categoryEncoding:a,observedProperty:o}=s;if("Parameter"===i&&(t[e]={},r&&(t[e].description=V(r)),n&&(t[e].unit=n.label?V(n.label):null,t[e].symbol=n.symbol?.value),a)){const i=Object.entries(a).map(((e,t)=>({OID:t,Value:Number(e[1]),ClassName:e[0].slice(e[0].lastIndexOf("/")+1),Count:1})));let s=!1;o?.categories?.length&&(o.categories.forEach((e=>{if(!e.id)return;const t=e.id.slice(e.id.lastIndexOf("/")+1),r=i.find((e=>e.ClassName===t));if(!r)return;const n=e.label?V(e.label):null;if(r.Label=n,e.preferredColor){const t=D.A.fromHex(e.preferredColor);t&&(s=!0,r.Red=t.r,r.Green=t.g,r.Blue=t.b)}})),s&&i.forEach((e=>{null==e.Red&&(e.Red=j(),e.Green=j(),e.Blue=j())})));const r={objectIdFieldName:"",fields:[{name:"OID",type:"esriFieldTypeOID",alias:"OID",domain:null},{name:"Value",type:"esriFieldTypeInteger",alias:"Value",domain:null},{name:"Count",type:"esriFieldTypeDouble",alias:"Count",domain:null},{name:"ClassName",type:"esriFieldTypeString",alias:"ClassName",domain:null,length:50},{name:"Label",type:"esriFieldTypeString",alias:"Label",domain:null,length:50}],features:i.map((e=>({attributes:e})))};s&&r.fields.push({name:"Red",type:"esriFieldTypeInteger",alias:"Red",domain:null},{name:"Green",type:"esriFieldTypeInteger",alias:"Green",domain:null},{name:"Blue",type:"esriFieldTypeInteger",alias:"Blue",domain:null}),t[e].attributeTable=r}}return t}function q(e){let t=Number.MAX_VALUE,i=-Number.MAX_VALUE;for(let s=0;s<e.length;s++){const r=e[s];null!=r&&(r<t&&(t=r),r>i&&(i=r))}return(0,z.X1)(t,i)}function G(e,t,i){const s=e.map(((e,i)=>({name:e,count:t[i]}))).sort(((e,t)=>e.name>t.name?-1:1)),r=(n=1,e=>n*=e.count);var n;const a=[...s.slice(1),{name:"",count:1}].reverse().map(r).reverse();let o=0;for(let r=e.length-1;r>=0;r--)o+=a[s.findIndex((({name:t})=>t===e[r]))]*(i%t[r]),i=Math.floor(i/t[r]);return o}var H=i(45617),W=i(87186),X=i(77301),Y=i(28435),K=i(6952);let Q=class extends k.A{constructor(){super(...arguments),this.datasetFormat="MEMORY",this.source=null}get url(){return""}fetchRawTile(e,t,i,s={}){if(!this._pixelBlockTiles){const{rasterInfo:r}=this,[n,a]=r.storageInfo.tileInfo.size,{sliceId:o}=s,{pixelBlocks:l}=this.source,c={pixelBlock:null==o?l[0]:l[o],useBilinear:"thematic"!==r.dataType,tileSize:{width:n,height:a},level:e,row:t,col:i},u=this.rasterJobHandler?this.rasterJobHandler.clipTile(c,s):(0,Y.J$)(c);return Promise.resolve(u)}const r=this._pixelBlockTiles.get(`${e}/${t}/${i}`);return Promise.resolve(r)}async _open(e){const t=this.source,{pixelBlocks:i,attributeTable:s,statistics:r,histograms:n,name:a,nativeExtent:o,transform:l}=t,c=i[0],{width:u,height:f,pixelType:h}=c,p=t.extent??new N.A({xmin:-.5,ymin:.5,xmax:u-.5,ymax:f-.5,spatialReference:new E.A({wkid:3857})}),d=t.isPseudoSpatialReference??!t.extent,m={x:p.width/u,y:p.height/f},y={...t.keyProperties};s&&(y.DataType="Thematic");const g=new W.A({width:u,height:f,pixelType:h,extent:p,nativeExtent:o,attributeTable:s,transform:l,pixelSize:m,spatialReference:p.spatialReference,bandCount:c.pixels.length,keyProperties:y,multidimensionalInfo:t.multidimensionalInfo,statistics:r,isPseudoSpatialReference:d,histograms:n});this.ioConfig.skipMapInfo&&this.updateImageSpaceRasterInfo(g),this.createRemoteDatasetStorageInfo(g,512,512),this._set("rasterInfo",g),this.updateTileInfo(),g.multidimensionalInfo?await this._buildMDimStats(t.pixelBlocks,g.multidimensionalInfo):await this._buildInMemoryRaster(c,{width:512,height:512},e),g.multidimensionalInfo||(this.source=null),this.datasetName=a}async _buildInMemoryRaster(e,t,i){const{rasterInfo:s}=this,r=s.storageInfo.maximumPyramidLevel??0,n="thematic"!==s.dataType,o=this.rasterJobHandler?this.rasterJobHandler.split({pixelBlock:e,tileSize:t,maximumPyramidLevel:r,useBilinear:n},i):Promise.resolve((0,Y.lD)(e,t,r,n)),l=null!=s.statistics,u=null!=s.histograms,f=this.ioConfig.skipStatistics||l?Promise.resolve({statistics:null,histograms:null}):this.rasterJobHandler?this.rasterJobHandler.estimateStatisticsHistograms({pixelBlock:e},i):Promise.resolve((0,K.f4)(e)),h=await(0,c.Lx)([o,f]);if(!h[0].value&&h[1].value)throw new a.A("inmemory-raster:open","failed to build in memory raster");this._pixelBlockTiles=h[0].value,l||(s.statistics=h[1].value?.statistics),u||(s.histograms=h[1].value?.histograms)}async _buildMDimStats(e,t,i){for(let s=0;s<t.variables.length;s++){const r=t.variables[s];if(r.statistics)continue;const n=r.dimensions.map((e=>new H.A({variableName:r.name,dimensionName:e.name,values:[e.values?.[0]??e.extent?.[0]],isSlice:!0}))),a=(0,X.NG)(n,t),o=null==a?null:e[a];if(null==o)continue;const l=this.rasterJobHandler?await this.rasterJobHandler.computeStatisticsHistograms({pixelBlock:o},i):(0,K.eH)(o);r.statistics=l.statistics,r.histograms||(r.histograms=l.histograms)}}};(0,s._)([(0,f.MZ)({type:String,json:{write:!0}})],Q.prototype,"datasetFormat",void 0),(0,s._)([(0,f.MZ)()],Q.prototype,"source",void 0),(0,s._)([(0,f.MZ)()],Q.prototype,"url",null),Q=(0,s._)([(0,d.$)("esri.layers.support.rasterDatasets.InMemoryRaster")],Q);const ee=Q;var te=i(22671);let ie=class extends k.A{constructor(){super(...arguments),this.datasetFormat="CovJSON"}fetchRawTile(e,t,i,s={}){return this._inMemoryRaster.fetchRawTile(e,t,i,s)}async _open(e){const{extent:t,pixelBlocks:i,multidimensionalInfo:s,attributeTable:r,bandNames:n}=await this._fetchData(e),{statistics:a,histograms:o}=(0,K.eH)(i[0]),l=n?.map((e=>({BandName:e}))),c={DataType:r?"Thematic":s?"Scientific":"Generic",BandProperties:l},u=new ee({source:{extent:t,pixelBlocks:i,attributeTable:r?te.A.fromJSON(r):null,multidimensionalInfo:s,statistics:a,histograms:o,keyProperties:c,isPseudoSpatialReference:!1}});await u.open(),this._inMemoryRaster=u;const f=this.source?"":this.url.slice(this.url.lastIndexOf("/")+1);this._set("datasetName",f.slice(0,f.indexOf("."))),this._set("rasterInfo",u.rasterInfo)}async _fetchData(e){const t=this.source??(await this.request(this.url,{signal:e?.signal})).data,i="imagery-tile-layer:open-coverage-json";if("coverage"!==t.type?.toLowerCase()||"grid"!==t.domain?.domainType?.toLowerCase())throw new a.A(i,"Only coverage with Grid domain type is supported");if(!t.ranges)throw new a.A(i,"Missing ranges in the grid coverage data");if(!t.domain.referencing?.length)throw new a.A(i,"Missing domain referencing in the grid coverage data");const s=Object.values(t.ranges);for(let e=0;e<s.length;e++){const{axisNames:t,shape:r,type:n,values:o}=s[e];if(!("ndarray"===n.toLowerCase()&&o?.length&&t?.length&&r?.length))throw new a.A(i,"Only ranges with valid NdArray, axisNames, shape, and inline values are supported");if(!J(t[t.length-1])||!$(t[t.length-2]))throw new a.A(i,"Only row-major ordered pixel values are supported. X axis must be the last axis.")}return function(e){const{width:t,height:i,extent:s,dimensions:r}=U(e),{ranges:n}=e,a=Object.keys(n).sort(((e,t)=>e<t?-1:1)),o=[];for(let e=0;e<a.length;e++){const t=a[e];r?.length&&o.push({name:t,dimensions:r})}const l=Z(e);o.forEach((e=>l[e.name]&&Object.assign(e,l[e.name])));const c=o.length?{variables:o}:void 0,u=[];for(let e=0;e<a.length;e++){const s=a[e],{values:o,dataType:l,axisNames:c,shape:f}=n[s],h=f.length>2?e*f.slice(0,-2).reduce(((e,t)=>e*t)):0,p=c.slice(0,-2),d=f.slice(0,-2),m="float"===l?"f32":q(o),y=t*i,g=o.length/y;for(let s=0;s<g;s++){const n=B.A.createEmptyBand(m,y),a=new Uint8Array(y).fill(255);let l=!1;const c=s*y;for(let e=0;e<y;e++){const t=o[c+e];null==t?(a[e]=0,l=!0):n[e]=t}if(0===e||r?.length){const e=new B.A({width:t,height:i,mask:l?a:null,pixels:[n],pixelType:m});e.updateStatistics(),r?.length?u[G(p,d,s)+h]=e:u.push(e)}else{const e=u[s];e.pixels.push(n),l?e.mask&&(e.mask=B.A.combineBandMasks([e.mask,a])):e.mask=l?a:null}}}const f=Object.values(l).find((e=>e.attributeTable))?.attributeTable;return{extent:s,pixelBlocks:u,multidimensionalInfo:c,attributeTable:f,bandNames:c?void 0:a}}(t)}};(0,s._)([(0,f.MZ)({type:String,json:{write:!0}})],ie.prototype,"datasetFormat",void 0),(0,s._)([(0,f.MZ)({constructOnly:!0})],ie.prototype,"source",void 0),ie=(0,s._)([(0,d.$)("esri.layers.support.rasterDatasets.CovJSONRaster")],ie);const se=ie;var re=i(4576),ne=i(21325),ae=i(50103),oe=i(21312);function le(e,t){if(!e||!t)return null;const i=[];for(let s=0;s<e.length;s++)i.push(e[s]),i.push(t[s]);return i}function ce(e){if(!e)return null;let t=Number(e);if(!isNaN(t)&&0!==t)return new E.A({wkid:t});if(e=String(e).trim(),(0,ne.jp)(e))return new E.A({wkt2:e});const i=e.toUpperCase();if(i.startsWith("COMPD_CS")){if(!i.includes("VERTCS")||!i.includes("GEOGCS")&&!i.startsWith("PROJCS"))return null;const s=i.indexOf("VERTCS"),r=i.indexOf("PROJCS"),n=r>-1?r:i.indexOf("GEOGCS");if(-1===n)return null;const a=e.slice(n,e.lastIndexOf("]",s)+1).trim(),o=e.slice(s,e.lastIndexOf("]")).trim();t=ue(a);const l=new E.A(t?{wkid:t}:{wkt:a}),c=ue(o);return c&&(l.vcsWkid=c),l}return i.startsWith("GEOGCS")||i.startsWith("PROJCS")?(t=ue(e),new E.A(0!==t?{wkid:t}:{wkt:e})):null}function ue(e){const t=e.replaceAll("]","[").replaceAll('"',"").split("[").map((e=>e.trim())).filter((e=>""!==e)),i=t[t.length-1].split(","),s=i[0]?.toLowerCase();if(("epsg"===s||"esri"===s)&&e.endsWith('"]]')){const e=Number(i[1]);if(!isNaN(e)&&0!==e)return e}return 0}function fe(e){if("pamdataset"!==e?.documentElement.tagName?.toLowerCase())return{};const t={spatialReference:null,transform:null,metadata:{},rasterBands:[],statistics:null,histograms:null};e.documentElement.childNodes.forEach((e=>{if(1===e.nodeType)if((0,ae.g7)(e,"SRS")){if(!t.spatialReference){const i=(0,ae.mX)(e);t.spatialReference=ce(i)}}else if((0,ae.g7)(e,"Metadata"))if("xml:ESRI"===e.getAttribute("domain")){const{spatialReference:i,transform:s}=function(e){const t=(0,ae.V6)(e,"GeodataXform"),i=ce((0,ae.v7)(t,"SpatialReference/WKID")||(0,ae.mX)(t,"SpatialReference/WKT"));if("typens:PolynomialXform"!==t.getAttribute("xsi:type"))return{spatialReference:i,transform:null};const s=(0,ae.v7)(t,"PolynomialOrder")??1,r=(0,ae.Ui)(t,"CoeffX/Double"),n=(0,ae.Ui)(t,"CoeffY/Double"),a=(0,ae.Ui)(t,"InverseCoeffX/Double"),o=(0,ae.Ui)(t,"InverseCoeffY/Double"),l=le(r,n),c=le(a,o);return{spatialReference:i,transform:l&&c&&l.length&&c.length?new oe.A({spatialReference:i,polynomialOrder:s,forwardCoefficients:l,inverseCoefficients:c}):null}}(e);t.transform=s,t.spatialReference||(t.spatialReference=i)}else(0,ae.IC)(e,"MDI").forEach((e=>t.metadata[e.getAttribute("key")]=(0,ae.mX)(e)));else if((0,ae.g7)(e,"PAMRasterBand")){const i=function(e){const t=(0,ae.v7)(e,"NoDataValue"),i=(0,ae.V6)(e,"Histograms/HistItem"),s=(0,ae.v7)(i,"HistMin"),r=(0,ae.v7)(i,"HistMax"),n=(0,ae.v7)(i,"BucketCount"),a=(0,ae.mX)(i,"HistCounts")?.split("|").map((e=>Number(e)));let o,l,c,u;(0,ae.IC)(e,"Metadata/MDI").forEach((e=>{const t=Number(e.textContent??e.nodeValue);switch(e.getAttribute("key").toUpperCase()){case"STATISTICS_MINIMUM":o=t;break;case"STATISTICS_MAXIMUM":l=t;break;case"STATISTICS_MEAN":c=t;break;case"STATISTICS_STDDEV":u=t}}));const f=(0,ae.v7)(e,"Metadata/SourceBandIndex");return{noDataValue:t,histogram:a?.length&&null!=s&&null!=r?{min:s,max:r,size:n||a.length,counts:a}:null,sourceBandIndex:f,statistics:null!=o&&null!=l?{min:o,max:l,avg:c,stddev:u}:null}}(e);null!=i.sourceBandIndex&&null==t.rasterBands[i.sourceBandIndex]?t.rasterBands[i.sourceBandIndex]=i:t.rasterBands.push(i)}}));const i=t.rasterBands;if(i.length){const e=!!i[0].statistics;t.statistics=e?i.map((e=>e.statistics)).filter(re.Ru):null;const s=!!i[0].histogram;t.histograms=s?i.map((e=>e.histogram)).filter(re.Ru):null}return t}var he=i(51244);let pe=class extends k.A{fetchRawTile(e,t,i,s={}){return this._inMemoryRaster.fetchRawTile(e,t,i,s)}async _open(e){const t=await this._fetchData(e);let{spatialReference:i,statistics:s,histograms:r,transform:n}=await this._fetchAuxiliaryData(e);const a=!i;a&&(i=new E.A({wkid:3857})),r?.length&&null==s&&(s=(0,K.Pg)(r));const{width:o,height:l}=t;let c=new N.A({xmin:-.5,ymin:.5-l,xmax:o-.5,ymax:.5,spatialReference:i});const u=n?n.forwardTransform(c):c;let f=!0;if(n){const e=n.forwardCoefficients;f=e&&0===e[1]&&0===e[2],f&&(n=null,c=u)}const h=new ee({source:{extent:u,nativeExtent:c,transform:n,pixelBlocks:[t],statistics:s,histograms:r,keyProperties:{DateType:"Processed"},isPseudoSpatialReference:a},ioConfig:{sampling:"closest",skipStatistics:!0}});this.ioConfig.skipMapInfo&&(h.ioConfig.skipMapInfo=!0),await h.open(),h.source=null,this._set("rasterInfo",h.rasterInfo),this._inMemoryRaster=h}async _fetchData(e){const{data:t}=await this.request(this.url,{responseType:"array-buffer",signal:e?.signal}),i=(0,he.g)(t).toUpperCase();if("JPG"!==i&&"PNG"!==i&&"GIF"!==i&&"BMP"!==i)throw new a.A("image-aux-raster:open","the data is not a supported format");this._set("datasetFormat",i);const s=i.toLowerCase(),r="gif"===s||"bmp"===s||!(0,p.A)("ios"),n=await this.decodePixelBlock(t,{format:s,useCanvas:r,hasNoZlibMask:!0});if(null==n)throw new a.A("image-aux-raster:open","the data cannot be decoded");return n}async _fetchAuxiliaryData(e){const t=e?.signal,{skipExtensions:i=[],skipMapInfo:s}=this.ioConfig,r=s||i.includes("aux.xml")?null:this.request(this.url+".aux.xml",{responseType:"xml",signal:t}),n=this.datasetFormat,a="JPG"===n?"jgw":"PNG"===n?"pgw":"BMP"===n?"bpw":null,o=a&&i.includes(a)?null:this.request(this.url.slice(0,this.url.lastIndexOf("."))+"."+a,{responseType:"text",signal:t}),l=await(0,c.Lx)([r,o]);if(t?.aborted)throw(0,c.NK)();const u=fe(l[0].value?.data);if(!u.transform){const e=l[1].value?l[1].value.data.split("\n").slice(0,6).map((e=>Number(e))):null;u.transform=6===e?.length?new oe.A({forwardCoefficients:[e[4],e[5],e[0],-e[1],e[2],-e[3]]}):null}return u}};(0,s._)([(0,f.MZ)({type:String,json:{write:!0}})],pe.prototype,"datasetFormat",void 0),pe=(0,s._)([(0,d.$)("esri.layers.support.rasterDatasets.ImageAuxRaster")],pe);const de=pe;var me=i(97768),ye=i(84952),ge=i(86738),we=i(20223),ve=i(87045),xe=i(25943),be=i(73037),Ie=i(82371);let _e=class extends k.A{constructor(){super(...arguments),this._levelOffset=0,this._tilemapCache=null,this._slices=null,this.datasetFormat="RasterTileServer",this.tileType=null}async fetchRawTile(e,t,i,s={}){const{storageInfo:r,extent:n}=this.rasterInfo,{transposeInfo:a}=r,o=null!=a&&!!s.transposedVariableName;if(this._slices&&!o&&null==s.sliceId)return null;const l=o?0:r.maximumPyramidLevel-e+this._levelOffset,c=`${this.url}/tile/${l}/${t}/${i}`,u=this._slices?o?{variable:s.transposedVariableName}:{sliceId:s.sliceId||0}:null;let f,h;if(r.isBsqTile){const e=(s.bandIds?.length?s.bandIds:[0,1,2]).map((e=>this.request(c,{query:{...u,bandId:e},responseType:"array-buffer",signal:s.signal}))),t=await Promise.all(e),i=t.map((e=>e.data.byteLength)).reduce(((e,t)=>e+t)),r=new Uint8Array(i);h=[];let n=0;for(const{data:e}of t)h.push(n),r.set(new Uint8Array(e),n),n+=e.byteLength;f=r.buffer}else f=(await this.request(c,{query:u,responseType:"array-buffer",signal:s.signal})).data;if(!f)return null;const p=o?a.tileSize:r.tileInfo.size,d=await this.decodePixelBlock(f,{width:p[0],height:p[1],planes:h?.length,offsets:h,pixelType:null,isPoint:"Elevation"===this.tileType,returnInterleaved:o,noDataValue:this.rasterInfo.noDataValue});if(null==d)return null;const m=r.blockBoundary[e];if("jpg"!==r.compression||i>m.minCol&&i<m.maxCol&&t>m.minRow&&t<m.maxRow)return d;const{origin:y,blockWidth:g,blockHeight:w}=r,{x:v,y:x}=this.getPyramidPixelSize(e),b=Math.round((n.xmin-y.x)/v)%g,I=Math.round((n.xmax-y.x)/v)%g||g,_=Math.round((y.y-n.ymax)/x)%w,S=Math.round((y.y-n.ymin)/x)%w||w,A=i===m.minCol?b:0,T=t===m.minRow?_:0,R=i===m.maxCol?I:g,C=t===m.maxRow?S:w;return(0,Y.z$)(d,{x:A,y:T},{width:R-A,height:C-T}),d}getSliceIndex(e){if(!this._slices||null==e||0===e.length)return null;const t=e;for(let e=0;e<this._slices.length;e++){const i=this._slices[e].multidimensionalDefinition;if(i.length===t.length&&!i.some((e=>{const i=t.find((t=>e.variableName===t.variableName&&t.dimensionName===e.dimensionName));return!i||(Array.isArray(e.values[0])?`${e.values[0][0]}-${e.values[0][1]}`:e.values[0])!==(Array.isArray(i.values[0])?`${i.values[0][0]}-${i.values[0][1]}`:i.values[0])})))return e}return null}async fetchVariableStatisticsHistograms(e,t){const i=this.request(this.url+"/statistics",{query:{variable:e,f:"json"},signal:t}).then((e=>e.data?.statistics)),s=this.request(this.url+"/histograms",{query:{variable:e,f:"json"},signal:t}).then((e=>e.data?.histograms)),r=await Promise.all([i,s]);return r[0]&&r[0].forEach((e=>{e.avg=e.mean,e.stddev=e.standardDeviation})),r[1]?.[0]?.counts?.length||(r[1]=null),{statistics:r[0]||null,histograms:r[1]||null}}async computeBestPyramidLevelForLocation(e,t={}){if(!this._tilemapCache)return 0;let i=this.identifyPixelLocation(e,0,t.datumTransformation);if(null===i)return null;let s=0;const{maximumPyramidLevel:r}=this.rasterInfo.storageInfo;let n=r-s+this._levelOffset;const a=i.srcLocation;for(;n>=0;){try{if("available"===await this._tilemapCache.fetchAvailability(n,i.row,i.col,t))break}catch{}if(n--,s++,i=this.identifyPixelLocation(a,s,t.datumTransformation),null===i)return null}return-1===n||null==i?null:s}async _open(e){const t=e?.signal,i=this.sourceJSON?{data:this.sourceJSON}:await this.request(this.url,{query:{f:"json"},signal:t});i.ssl&&(this.url=this.url.replace(/^http:/i,"https:"));const s=i.data;if(this.sourceJSON=s,!s)throw new a.A("imageserverraster:open","cannot initialize tiled image service, missing service info");if(!s.tileInfo)throw new a.A("imageserverraster:open","use ImageryLayer to open non-tiled image services");this._fixScaleInServiceInfo(),this.tileType=s.cacheType,null==this.tileType&&(["jpg","jpeg","png","png8","png24","png32","mixed"].includes(s.tileInfo.format.toLowerCase())?this.tileType="Map":"lerc"===s.tileInfo.format.toLowerCase()?this.tileType="Elevation":this.tileType="Raster"),this.datasetName=s.name?.slice(s.name.indexOf("/")+1)??"";const r=await this._fetchRasterInfo({signal:t});if(null==r)throw new a.A("image-server-raster:open","cannot initialize image service");(0,Ie.E9)(r,s);const n="Map"===this.tileType?function(e,t){if(!e)return null;const{minScale:i,maxScale:s,minLOD:r,maxLOD:n}=t;if(null!=r&&null!=n)return ve.A.fromJSON({...e,lods:e.lods.filter((({level:e})=>null!=e&&e>=r&&e<=n))});if(0!==i&&0!==s){const t=e=>Math.round(1e4*e)/1e4,r=i?t(i):1/0,n=s?t(s):-1/0;return ve.A.fromJSON({...e,lods:e.lods.filter((e=>{const i=t(e.scale);return i<=r&&i>=n}))})}return ve.A.fromJSON(e)}(s.tileInfo,s):ve.A.fromJSON(s.tileInfo);(0,me.Lw)(n);const[o,l]=this._computeMinMaxLOD(r,n),{extent:c,pixelSize:u}=r,f=.5/r.width*u.x,h=Math.max(u.x,u.y),{lods:p}=n;("Map"!==this.tileType&&0!==s.maxScale||Math.abs(u.x-u.y)>f||!p.some((e=>Math.abs(e.resolution-h)<f)))&&(u.x=u.y=o.resolution,r.width=Math.ceil((c.xmax-c.xmin)/u.x-.1),r.height=Math.ceil((c.ymax-c.ymin)/u.y-.1));const d=o.level-l.level,[m,y]=n.size,g=[],w=[];p.forEach(((e,t)=>{e.level>=l.level&&e.level<=o.level&&g.push({x:e.resolution,y:e.resolution}),t<p.length-1&&w.push(Math.round(10*e.resolution/p[t+1].resolution)/10)})),g.sort(((e,t)=>e.x-t.x));const v=this.computeBlockBoundary(c,m,y,n.origin,g,d),x=g.length>1?g.slice(1):null;let b;s.transposeInfo&&(b={tileSize:[s.transposeInfo.rows,s.transposeInfo.cols],packetSize:r.keyProperties?._yxs.PacketSize??0});const I=w.length<=1||w.length>=3&&w.slice(0,-1).every((e=>e===w[0]))?w[0]??2:Math.round(10/(l.resolution/o.resolution)**(-1/d))/10;if(r.storageInfo=new we.A({blockWidth:n.size[0],blockHeight:n.size[1],pyramidBlockWidth:n.size[0],pyramidBlockHeight:n.size[1],pyramidResolutions:x,pyramidScalingFactor:I,compression:n.format,origin:n.origin,firstPyramidLevel:1,maximumPyramidLevel:d,tileInfo:n,isBsqTile:!!s.bsq,transposeInfo:b,blockBoundary:v}),function(e){const{extent:t,spatialReference:i}=e;t.xmin>-1&&t.xmax>181&&i?.wkid&&i.isGeographic&&(e.nativeExtent=e.extent,e.transform=new be.A,e.extent=e.transform.forwardTransform(t))}(r),this._set("rasterInfo",r),s.capabilities.toLowerCase().includes("tilemap")){const e={tileInfo:r.storageInfo.tileInfo,parsedUrl:(0,ye.An)(this.url),url:this.url,tileServers:[]};this._tilemapCache=new xe.d({layer:e})}}async _fetchRasterInfo(e){const t=this.sourceJSON;if("Map"===this.tileType){const e=t.fullExtent||t.extent,i=Math.ceil((e.xmax-e.xmin)/t.pixelSizeX-.1),s=Math.ceil((e.ymax-e.ymin)/t.pixelSizeY-.1),r=E.A.fromJSON(t.spatialReference||e.spatialReference),n=new ge.A({x:t.pixelSizeX,y:t.pixelSizeY,spatialReference:r});return new W.A({width:i,height:s,bandCount:3,extent:N.A.fromJSON(e),spatialReference:r,pixelSize:n,pixelType:"u8",statistics:null,keyProperties:{DataType:"processed"}})}const{signal:i}=e,s=(0,Ie.Tw)(this.url,this.sourceJSON,{signal:i,query:this.ioConfig.customFetchParameters}),r=t.hasMultidimensions?this.request(`${this.url}/slices`,{query:{f:"json"},signal:i}).then((e=>e.data?.slices)).catch((()=>null)):null,n=await Promise.all([s,r]);return this._slices=n[1],n[0]}_fixScaleInServiceInfo(){const{sourceJSON:e}=this;e.minScale&&e.minScale<0&&(e.minScale=0),e.maxScale&&e.maxScale<0&&(e.maxScale=0)}_computeMinMaxLOD(e,t){const{pixelSize:i}=e,s=.5/e.width*i.x,{lods:r}=t,n=t.lodAt(Math.max.apply(null,r.map((e=>e.level)))),a=t.lodAt(Math.min.apply(null,r.map((e=>e.level)))),{tileType:o}=this;if("Map"===o)return this._levelOffset=r[0].level,[n,a];if("Raster"===o)return[r.find((e=>e.resolution===i.x))??n,a];const{minScale:l,maxScale:c}=this.sourceJSON;let u=n;c>0&&(u=r.find((e=>Math.abs(e.scale-c)<s)),u||(u=r.filter((e=>e.scale>c)).sort(((e,t)=>e.scale>t.scale?1:-1))[0]??n));let f=a;return l>0&&(f=r.find((e=>Math.abs(e.scale-l)<s))??a,this._levelOffset=f.level-a.level),[u,f]}};(0,s._)([(0,f.MZ)({type:String,json:{write:!0}})],_e.prototype,"datasetFormat",void 0),(0,s._)([(0,f.MZ)()],_e.prototype,"tileType",void 0),_e=(0,s._)([(0,d.$)("esri.layers.support.rasterDatasets.ImageServerRaster")],_e);const Se=_e;var Ae=i(47124);const Te=new Map;Te.set("Int8","s8"),Te.set("UInt8","u8"),Te.set("Int16","s16"),Te.set("UInt16","u16"),Te.set("Int32","s32"),Te.set("UInt32","u32"),Te.set("Float32","f32"),Te.set("Float64","f32"),Te.set("Double64","f32");const Re=new Map;Re.set("none",{blobExtension:".til",isOneSegment:!0,decoderFormat:"bip"}),Re.set("lerc",{blobExtension:".lrc",isOneSegment:!1,decoderFormat:"lerc"}),Re.set("deflate",{blobExtension:".pzp",isOneSegment:!0,decoderFormat:"deflate"}),Re.set("jpeg",{blobExtension:".pjg",isOneSegment:!0,decoderFormat:"jpg"});let Ce=class extends k.A{constructor(){super(...arguments),this._files=null,this._storageIndex=null,this.datasetFormat="MRF"}async fetchRawTile(e,t,i,s={}){const{blockWidth:r,blockHeight:n,blockBoundary:a}=this.rasterInfo.storageInfo,o=a[e];if(!o||o.maxRow<t||o.maxCol<i||o.minRow>t||o.minCol>i)return null;const{bandCount:l,pixelType:c}=this.rasterInfo,{ranges:u,actualTileWidth:f,actualTileHeight:h}=this._getTileLocation(e,t,i);if(!u||0===u.length)return null;if(0===u[0].from&&0===u[0].to){const e=new Uint8Array(r*n);return new B.A({width:r,height:n,pixels:void 0,mask:e,validPixelCount:0})}const{bandIds:p}=this.ioConfig,d=this._getBandSegmentCount(),m=[];let y=0;for(y=0;y<d;y++)p&&!p.includes(y)||m.push(this.request(this._files.data,{range:{from:u[y].from,to:u[y].to},responseType:"array-buffer",signal:s.signal}));const g=await Promise.all(m),w=g.map((e=>e.data.byteLength)).reduce(((e,t)=>e+t)),v=new Uint8Array(w),x=[];let b=0;for(y=0;y<d;y++)x.push(b),v.set(new Uint8Array(g[y].data),b),b+=g[y].data.byteLength;const I=Re.get(this.rasterInfo.storageInfo.compression).decoderFormat,_=await this.decodePixelBlock(v.buffer,{width:r,height:n,format:I,planes:p?.length||l,offsets:x,pixelType:c});if(null==_)return null;let{noDataValue:S}=this.rasterInfo;if(null!=S&&"lerc"!==I&&!_.mask&&(S=S[0],null!=S)){const e=_.width*_.height,t=new Uint8Array(e);if(Math.abs(S)>1e24)for(y=0;y<e;y++)Math.abs((_.pixels[0][y]-S)/S)>1e-6&&(t[y]=1);else for(y=0;y<e;y++)_.pixels[0][y]!==S&&(t[y]=1);_.mask=t}let A=0,T=0;if(f!==r||h!==n){let e=_.mask;if(e)for(y=0;y<n;y++)if(T=y*r,y<h)for(A=f;A<r;A++)e[T+A]=0;else for(A=0;A<r;A++)e[T+A]=0;else for(e=new Uint8Array(r*n),_.mask=e,y=0;y<h;y++)for(T=y*r,A=0;A<f;A++)e[T+A]=1}return _}async _open(e){this.datasetName=this.url.slice(this.url.lastIndexOf("/")+1);const t=e?e.signal:null,i=await this.request(this.url,{responseType:"xml",signal:t}),{rasterInfo:s,files:r}=this._parseHeader(i.data),{skipMapInfo:n,skipExtensions:a=[]}=this.ioConfig;if(!a.includes("aux.xml")&&!n){const t=await this._fetchAuxiliaryData(e);null!=t&&(s.statistics=t.statistics??s.statistics,s.histograms=t.histograms,t.histograms&&null==s.statistics&&(s.statistics=(0,K.Pg)(t.histograms)))}n&&this.updateImageSpaceRasterInfo(s),this._set("rasterInfo",s),this._files=r;const o=await this.request(r.index,{responseType:"array-buffer",signal:t});this._storageIndex=function(e){if(e.byteLength%16>0)throw new Error("invalid array buffer must be multiples of 16");let t,i,s,r,n,a;if(Ae.Z){for(i=new Uint8Array(e),r=new ArrayBuffer(e.byteLength),s=new Uint8Array(r),n=0;n<e.byteLength/4;n++)for(a=0;a<4;a++)s[4*n+a]=i[4*n+3-a];t=new Uint32Array(r)}else t=new Uint32Array(e);return t}(o.data);const{blockWidth:l,blockHeight:c}=this.rasterInfo.storageInfo,u=this.rasterInfo.storageInfo.pyramidScalingFactor,{width:f,height:h}=this.rasterInfo,p=[],d=this._getBandSegmentCount();let m=0,y=-1;for(;m<this._storageIndex.length;){y++;const e=Math.ceil(f/l/u**y)-1,t=Math.ceil(h/c/u**y)-1;m+=(e+1)*(t+1)*d*4,p.push({maxRow:t,maxCol:e,minCol:0,minRow:0})}this.rasterInfo.storageInfo.blockBoundary=p,y>0&&(this.rasterInfo.storageInfo.firstPyramidLevel=1,this.rasterInfo.storageInfo.maximumPyramidLevel=y),this.updateTileInfo()}_getBandSegmentCount(){return Re.get(this.rasterInfo.storageInfo.compression).isOneSegment?1:this.rasterInfo.bandCount}_getTileLocation(e,t,i){const{blockWidth:s,blockHeight:r,pyramidScalingFactor:n}=this.rasterInfo.storageInfo,{width:a,height:o}=this.rasterInfo,l=this._getBandSegmentCount();let c,u,f,h=0,p=0;for(f=0;f<e;f++)p=n**f,c=Math.ceil(a/s/p),u=Math.ceil(o/r/p),h+=c*u;p=n**e,c=Math.ceil(a/s/p),u=Math.ceil(o/r/p),h+=t*c+i,h*=4*l;const d=this._storageIndex.subarray(h,h+4*l);let m=0,y=0;const g=[];for(let e=0;e<l;e++)m=d[4*e]*2**32+d[4*e+1],y=m+d[4*e+2]*2**32+d[4*e+3],g.push({from:m,to:y});return{ranges:g,actualTileWidth:i<c-1?s:Math.ceil(a/p)-s*(c-1),actualTileHeight:t<u-1?r:Math.ceil(o/p)-r*(u-1)}}_parseHeader(e){const t=(0,ae.V6)(e,"MRF_META/Raster");if(!t)throw new a.A("mrf:open","not a valid MRF format");const i=(0,ae.V6)(t,"Size"),s=parseInt(i.getAttribute("x"),10),r=parseInt(i.getAttribute("y"),10),n=parseInt(i.getAttribute("c"),10),o=((0,ae.mX)(t,"Compression")||"none").toLowerCase();if(!Re.has(o))throw new a.A("mrf:open","currently does not support compression "+o);const l=(0,ae.mX)(t,"DataType")||"UInt8",c=Te.get(l);if(null==c)throw new a.A("mrf:open","currently does not support pixel type "+l);const u=(0,ae.V6)(t,"PageSize"),f=parseInt(u.getAttribute("x"),10),h=parseInt(u.getAttribute("y"),10),p=(0,ae.V6)(t,"DataValues");let d,m;if(p&&(m=p.getAttribute("NoData"),null!=m&&(d=m.trim().split(" ").map((e=>parseFloat(e))))),(0,ae.V6)(e,"MRF_META/CachedSource"))throw new a.A("mrf:open","currently does not support MRF referencing other data files");const y=(0,ae.V6)(e,"MRF_META/GeoTags"),g=(0,ae.V6)(y,"BoundingBox");let w,v=!1;if(null!=g){const e=parseFloat(g.getAttribute("minx")),t=parseFloat(g.getAttribute("miny")),i=parseFloat(g.getAttribute("maxx")),s=parseFloat(g.getAttribute("maxy")),r=(0,ae.mX)(y,"Projection")||"";let n=E.A.WGS84;if("LOCAL_CS[]"!==r)if(r.toLowerCase().startsWith("epsg:")){const e=Number(r.slice(5));isNaN(e)||0===e||(n=new E.A({wkid:e}))}else n=ce(r)??E.A.WGS84;else v=!0,n=new E.A({wkid:3857});w=new N.A(e,t,i,s),w.spatialReference=n}else v=!0,w=new N.A({xmin:-.5,ymin:.5-r,xmax:s-.5,ymax:.5,spatialReference:new E.A({wkid:3857})});const x=(0,ae.V6)(e,"MRF_META/Rsets"),b=parseInt(x?.getAttribute("scale")||"2",10),I=w.spatialReference,_=new we.A({origin:new ge.A({x:w.xmin,y:w.ymax,spatialReference:I}),blockWidth:f,blockHeight:h,pyramidBlockWidth:f,pyramidBlockHeight:h,compression:o,pyramidScalingFactor:b}),S=new ge.A({x:w.width/s,y:w.height/r,spatialReference:I}),A=new W.A({width:s,height:r,extent:w,isPseudoSpatialReference:v,spatialReference:I,bandCount:n,pixelType:c,pixelSize:S,noDataValue:d,storageInfo:_}),T=(0,ae.mX)(e,"datafile"),R=(0,ae.mX)(e,"IndexFile");return{rasterInfo:A,files:{mrf:this.url,index:R||this.url.replace(".mrf",".idx"),data:T||this.url.replace(".mrf",Re.get(o).blobExtension)}}}async _fetchAuxiliaryData(e){try{const{data:t}=await this.request(this.url+".aux.xml",{responseType:"xml",signal:e?.signal});return fe(t)}catch{return null}}};(0,s._)([(0,f.MZ)()],Ce.prototype,"_files",void 0),(0,s._)([(0,f.MZ)()],Ce.prototype,"_storageIndex",void 0),(0,s._)([(0,f.MZ)({type:String,json:{write:!0}})],Ce.prototype,"datasetFormat",void 0),Ce=(0,s._)([(0,d.$)("esri.layers.support.rasterDatasets.MRFRaster")],Ce);const Me=Ce;var Oe=i(15265);function Fe(e){const t=e.fields,i=e.records,s=t.some((e=>"oid"===e.name.toLowerCase()))?"OBJECTID":"OID",r=[{name:s,type:"esriFieldTypeOID",alias:"OID"}].concat(t.map((e=>({name:e.name,type:"esriFieldType"+e.typeName,alias:e.name})))),n=r.map((e=>e.name)),a=[];let o=0,l=0;return i.forEach((e=>{const t={};for(t[s]=o++,l=1;l<n.length;l++)t[n[l]]=e[l-1];a.push({attributes:t})})),{displayFieldName:"",fields:r,features:a}}class Pe{static get supportedVersions(){return[5]}static parse(e){const t=new DataView(e),i=3&t.getUint8(0);if(3!==i)return{header:{version:i},recordSet:null};const s=t.getUint32(4,!0),r=t.getUint16(8,!0),n=t.getUint16(10,!0),a={version:i,recordCount:s,headerByteCount:r,recordByteCount:n};let o=32;const l=[],c=[];let u;if(3===i){for(;13!==t.getUint8(o);)u=String.fromCharCode(t.getUint8(o+11)).trim(),l.push({name:(0,Oe.w)(new Uint8Array(e,o,11)),type:u,typeName:["String","Date","Double","Boolean","String","Integer"][["C","D","F","L","M","N"].indexOf(u)],length:t.getUint8(o+16)}),o+=32;if(o+=1,l.length>0)for(;c.length<s&&e.byteLength-o>n;){const i=[];32===t.getUint8(o)?(o+=1,l.forEach((t=>{if("C"===t.type)i.push((0,Oe.w)(new Uint8Array(e,o,t.length)).trim());else if("N"===t.type)i.push(parseInt(String.fromCharCode.apply(null,new Uint8Array(e,o,t.length)).trim(),10));else if("F"===t.type)i.push(parseFloat(String.fromCharCode.apply(null,new Uint8Array(e,o,t.length)).trim()));else if("D"===t.type){const s=String.fromCharCode.apply(null,new Uint8Array(e,o,t.length)).trim();i.push(new Date(parseInt(s.slice(0,4),10),parseInt(s.slice(4,6),10)-1,parseInt(s.slice(6,8),10)))}o+=t.length})),c.push(i)):o+=n}}return{header:a,fields:l,records:c,recordSet:Fe({fields:l,records:c})}}}var ke=i(45664),De=i(12196);const Ne=(e,t)=>e.get(t)?.values,Ee=(e,t)=>e.get(t)?.values?.[0];let Le=class extends k.A{constructor(){super(...arguments),this._files=null,this._headerInfo=null,this._bufferSize=1048576,this._chunkSize=10485760,this.datasetFormat="TIFF"}async fetchRawTile(e,t,i,s={}){if(!this._headerInfo?.isSupported||this.isBlockOutside(e,t,i))return null;const r=await this._fetchRawTiffTile(e,t,i,!1,s);if(null!=r&&this._headerInfo.hasMaskBand){const n=await this._fetchRawTiffTile(e,t,i,!0,s);null!=n&&n.pixels[0]instanceof Uint8Array&&(r.mask=n.pixels[0])}return r}async _open(e){const t=e?e.signal:null,{data:i}=await this.request(this.url,{range:{from:0,to:this._bufferSize},responseType:"array-buffer",signal:t});if(!i)throw new a.A("tiffraster:open","failed to open url "+this.url);this.datasetName=this.url.slice(this.url.lastIndexOf("/")+1,this.url.lastIndexOf("."));const{littleEndian:s,firstIFDPos:r,isBigTiff:n}=(0,ke.uT)(i),l=[],c={fileChunk:i,posIFD:r,fileOffset:0};await this._readIFDs(l,c,s,n?8:4,t);const{imageInfo:u,rasterInfo:f}=function(e){const t=(0,ke.uc)(e),{width:i,height:s,tileWidth:r,tileHeight:n,planes:a,pixelType:o,compression:l,firstPyramidLevel:c,maximumPyramidLevel:u,pyramidBlockWidth:f,pyramidBlockHeight:h,pyramidResolutions:p,tileBoundary:d,affine:m,metadata:y}=t;let g=ce(t.extent.spatialReference?.wkt||t.extent.spatialReference?.wkid),w=!!t.isPseudoGeographic;null==g&&(w=!0,g=new E.A({wkid:3857}));const v=new N.A({...t.extent,spatialReference:g}),x=new ge.A(v?{x:v.xmin,y:v.ymax,spatialReference:g}:{x:0,y:0}),b=new we.A({blockWidth:r,blockHeight:n,pyramidBlockWidth:f,pyramidBlockHeight:h,compression:l,origin:x,firstPyramidLevel:c,maximumPyramidLevel:u,pyramidResolutions:p,blockBoundary:d}),I=new ge.A({x:(v.xmax-v.xmin)/i,y:(v.ymax-v.ymin)/s,spatialReference:g}),_=y?{BandProperties:y.bandProperties,DataType:y.dataType}:{};let S=null;const A=Ee(e[0],"PHOTOMETRICINTERPRETATION"),T=Ne(e[0],"COLORMAP");if(A<=3&&T?.length>3&&T.length%3==0){S=[];const e=T.length/3;for(let t=0;t<e;t++)S.push([t,T[t]>>>8,T[t+e]>>>8,T[t+2*e]>>>8])}const R=new W.A({width:i,height:s,bandCount:a,pixelType:o,pixelSize:I,storageInfo:b,spatialReference:g,isPseudoSpatialReference:w,keyProperties:_,extent:v,colormap:S,statistics:y?y.statistics:null});if(m?.length&&(R.nativeExtent=new N.A({xmin:-.5,ymin:.5-s,xmax:i-.5,ymax:.5,spatialReference:g}),R.transform=new oe.A({polynomialOrder:1,forwardCoefficients:[m[2]+m[0]/2,m[5]-m[3]/2,m[0],m[3],-m[1],-m[4]]}),R.extent=R.transform.forwardTransform(R.nativeExtent),R.pixelSize=new ge.A({x:(v.xmax-v.xmin)/i,y:(v.ymax-v.ymin)/s,spatialReference:g}),b.origin.x=-.5,b.origin.y=.5),p){const{x:e,y:t}=R.pixelSize;p.forEach((i=>{i.x*=e,i.y*=t}))}return{imageInfo:t,rasterInfo:R}}(l),h=(0,ke.zS)(l),p=(0,ke.r9)(l);if(this._headerInfo={littleEndian:s,isBigTiff:n,ifds:l,pyramidIFDs:h,maskIFDs:p,...u},this._set("rasterInfo",f),!u.isSupported)throw new a.A("tiffraster:open","this tiff is not supported: "+u.message);if(!u.tileWidth)throw new a.A("tiffraster:open","none-tiled tiff is not optimized for access, convert to COG and retry.");f.isPseudoSpatialReference&&o.A.getLogger(this).warn("The spatial reference for this tiff is unsupported. Only EPSG spatial reference codes and Esri WKTs are supported.");const d=l[0].get("PREDICTOR")?.values?.[0],m=l[0].get("SAMPLEFORMAT")?.values?.[0];if(3===m&&2===d)throw new a.A("tiffraster:open","unsupported horizontal difference encoding. Predictor=3 is supported for floating point data");const{skipMapInfo:y,skipExtensions:g=[]}=this.ioConfig;if(!g.includes("aux.xml")&&!y){const t=await this._fetchAuxiliaryMetaData(e);null!=t&&function(e,t){if(t.statistics=e.statistics??t.statistics,t.histograms=e.histograms,e.histograms&&null==t.statistics&&(t.statistics=(0,K.Pg)(e.histograms)),e.transform&&null==t.transform){t.transform=e.transform,t.nativeExtent=t.extent;const i=t.transform.forwardTransform(t.nativeExtent);t.pixelSize=new ge.A({x:(i.xmax-i.xmin)/t.width,y:(i.ymax-i.ymin)/t.height,spatialReference:t.spatialReference}),t.extent=i}t.isPseudoSpatialReference&&e.spatialReference&&(t.spatialReference=e.spatialReference,t.extent.spatialReference=t.nativeExtent.spatialReference=t.storageInfo.origin.spatialReference=t.spatialReference)}(t,f)}g.includes("vat.dbf")||1!==f.bandCount||"u8"!==f.pixelType||y||(f.attributeTable=await this._fetchAuxiliaryTable(e),null!=f.attributeTable&&(f.keyProperties.DataType="thematic")),y&&this.updateImageSpaceRasterInfo(f),this.updateTileInfo()}async _validateOrFetchHeaderBuffer(e,t){let{fileChunk:i,fileOffset:s,posIFD:r}=e;return(r+8>=i.byteLength||r<0)&&(s=r+s,i=(await this.request(this.url,{range:{from:s,to:s+this._bufferSize},responseType:"array-buffer",signal:t})).data,r=0),{fileChunk:i,fileOffset:s,posIFD:r}}async _readIFDs(e,t,i,s=4,r){if(!t.posIFD)return null;t=await this._validateOrFetchHeaderBuffer(t,r);const n=await this._readIFD(t,i,De.NB,s,r);if(!n?.ifd)throw new a.A("tiffraster:open","cannot parse tiff header. failed to open url "+this.url);if(e.push(n.ifd),!n.nextIFD)return null;t.posIFD=n.nextIFD-t.fileOffset,await this._readIFDs(e,t,i,s,r)}async _readIFD(e,t,i=De.NB,s=4,r){let{fileChunk:n,posIFD:a,fileOffset:o}=e;if(!e.fileChunk)return null;const l=(0,ke.JM)(n,t,a,o,i,s);if(l.success){const e=[];if(l.ifd?.forEach((t=>{t.values||e.push(t)})),e.length>0&&await this._fillOffsets(e,t,l.nextIFD,r),l.ifd?.has("GEOKEYDIRECTORY")){const e=l.ifd.get("GEOKEYDIRECTORY"),i=e?.values;if(i&&i.length>4){const s=i[0]+"."+i[1]+"."+i[2];a=e.valueOffset+6-o;const l=await this._validateOrFetchHeaderBuffer({fileChunk:n,posIFD:a,fileOffset:o},r),c=await this._readIFD(l,t,De.YC,2,r);e.data=c?.ifd,e.data&&e.data.set("GEOTIFFVersion",{id:0,type:2,valueCount:1,valueOffset:null,values:[s]})}}return l}return l.requiredBufferSize?(n=(await this.request(this.url,{range:{from:o,to:o+a+l.requiredBufferSize+8},responseType:"array-buffer",signal:r})).data,n.byteLength<a+l.requiredBufferSize?null:(e.fileChunk=n,e.fileOffset=o,this._readIFD(e,t,i,s,r))):null}async _fillOffsets(e,t,i,s){const r=e.filter((e=>null!=e.offlineOffsetSize));if(0===r.length)return;const n=r.map((e=>e.offlineOffsetSize)),a=Math.min.apply(null,n.map((e=>e[0]))),o=Math.max.apply(null,n.map((e=>e[0]+e[1])));let l=1===n.length||o-a<=this._bufferSize;if(!l&&n.length>1&&(n.sort(((e,t)=>e[0]-t[0])),l=n.reduce(((e,t)=>e===t[0]?t[0]+t[1]:0),n[0][0])===o),l){const e=await this._fetchOffsets(a,Math.max(o,a+this._bufferSize),s);return void r.forEach((i=>(0,ke.Cr)(e,t,i,a)))}const c=r.map((async e=>{const i=e.offlineOffsetSize,r=await this._fetchOffsets(i[0],i[1]+i[0],s);(0,ke.Cr)(r,t,e,i[0])}));await Promise.all(c)}async _fetchOffsets(e,t,i){const s=[],r=this._chunkSize,n=Math.ceil((t-e)/r);let a=e;for(let e=0;e<n;e++)s.push(this.request(this.url,{range:{from:a,to:e===n-1?t:a+r-1},responseType:"array-buffer",signal:i})),a+=r;const o=await Promise.all(s);if(1===n)return o[0].data;const l=new Uint8Array(t-e+1);for(let e=0;e<n;e++)l.set(new Uint8Array(o[e].data),e*r);return l.buffer}async _fetchRawTiffTile(e,t,i,s,r={}){const n=this._getTileLocation(e,t,i,s);if(!n)return null;const{ranges:a,actualTileWidth:o,actualTileHeight:l,ifd:c}=n,u=a.map((e=>this.request(this.url,{range:e,responseType:"array-buffer",signal:r.signal}))),f=await Promise.all(u),h=f.map((e=>e.data.byteLength)).reduce(((e,t)=>e+t)),p=1===f.length?f[0].data:new ArrayBuffer(h),d=[0],m=[0];if(f.length>1){const e=new Uint8Array(p);for(let t=0,i=0;t<f.length;t++){const s=f[t].data;e.set(new Uint8Array(s),i),d[t]=i,i+=s.byteLength,m[t]=s.byteLength}}const{blockWidth:y,blockHeight:g}=this.getBlockWidthHeight(e),w=await this.decodePixelBlock(p,{format:"tiff",customOptions:{headerInfo:this._headerInfo,ifd:c,offsets:d,sizes:m},width:y,height:g,planes:null,pixelType:null});if(null==w)return null;let v,x,b;if(o!==y||l!==g){let e=w.mask;if(e)for(v=0;v<g;v++)if(b=v*y,v<l)for(x=o;x<y;x++)e[b+x]=0;else for(x=0;x<y;x++)e[b+x]=0;else for(e=new Uint8Array(y*g),w.mask=e,v=0;v<l;v++)for(b=v*y,x=0;x<o;x++)e[b+x]=1}return w}_getTileLocation(e,t,i,s=!1){const{firstPyramidLevel:r,blockBoundary:n}=this.rasterInfo.storageInfo,a=0===e?0:e-(r-1),{_headerInfo:o}=this;if(!o)return null;const l=s?o.maskIFDs[a]:0===a?o?.ifds[0]:o?.pyramidIFDs[a-1];if(!l)return null;const c=(0,ke.XO)(l,o),u=Ne(l,"TILEOFFSETS");if(void 0===u)return null;const f=Ne(l,"TILEBYTECOUNTS"),{minRow:h,minCol:p,maxRow:d,maxCol:m}=n[a];if(t>d||i>m||t<h||i<p)return null;const y=Ee(l,"IMAGEWIDTH"),g=Ee(l,"IMAGELENGTH"),w=Ee(l,"TILEWIDTH"),v=Ee(l,"TILELENGTH"),x=[];if(c){const{bandCount:e}=this.rasterInfo;for(let s=0;s<e;s++){const e=s*(d+1)*(m+1)+t*(m+1)+i;x[s]={from:u[e],to:u[e]+f[e]-1}}}else{const e=t*(m+1)+i;x.push({from:u[e],to:u[e]+f[e]-1})}for(let e=0;e<x.length;e++)if(null==x[e].from||!x[e].to||x[e].to<0)return null;return{ranges:x,ifd:l,actualTileWidth:i===m&&y%w||w,actualTileHeight:t===d&&g%v||v}}async _fetchAuxiliaryMetaData(e){try{const{data:t}=await this.request(this.url+".aux.xml",{responseType:"xml",signal:e?.signal});return fe(t)}catch{return null}}async _fetchAuxiliaryTable(e){try{const{data:t}=await this.request(this.url+".vat.dbf",{responseType:"array-buffer",signal:e?.signal}),i=Pe.parse(t);return i?.recordSet?te.A.fromJSON(i.recordSet):null}catch{return null}}};(0,s._)([(0,f.MZ)()],Le.prototype,"_files",void 0),(0,s._)([(0,f.MZ)()],Le.prototype,"_headerInfo",void 0),(0,s._)([(0,f.MZ)()],Le.prototype,"_bufferSize",void 0),(0,s._)([(0,f.MZ)()],Le.prototype,"_chunkSize",void 0),(0,s._)([(0,f.MZ)({type:String,json:{write:!0}})],Le.prototype,"datasetFormat",void 0),Le=(0,s._)([(0,d.$)("esri.layers.support.rasterDatasets.TIFFRaster")],Le);const Be=Le,ze=new Map;ze.set("MRF",{desc:"Meta Raster Format",constructor:Me}),ze.set("TIFF",{desc:"GeoTIFF",constructor:Be}),ze.set("RasterTileServer",{desc:"Raster Tile Server",constructor:Se}),ze.set("JPG",{desc:"JPG Raster Format",constructor:de}),ze.set("PNG",{desc:"PNG Raster Format",constructor:de}),ze.set("GIF",{desc:"GIF Raster Format",constructor:de}),ze.set("BMP",{desc:"BMP Raster Format",constructor:de}),ze.set("CovJSON",{desc:"COVJSON Raster Format",constructor:se}),ze.set("MEMORY",{desc:"In Memory Raster Format",constructor:ee});class Je{static get supportedFormats(){const e=new Set;return ze.forEach(((t,i)=>e.add(i))),e}static async open(e){const{url:t,ioConfig:i,source:s,sourceJSON:r}=e;let n=e.datasetFormat??i?.datasetFormat;null==n&&(t.includes(".")?n=t.slice(t.lastIndexOf(".")+1).toUpperCase():"coverage"===s?.type?.toLowerCase()?n="CovJSON":s?.extent&&s.pixelblocks&&(n="MEMORY")),"OVR"===n||"TIF"===n?n="TIFF":"JPG"===n||"JPEG"===n||"JFIF"===n?n="JPG":"COVJSON"===n&&(n="CovJSON"),t.toLowerCase().includes("/imageserver")&&!t.toLowerCase().includes("/wcsserver")&&(n="RasterTileServer");const o={url:t,source:s,sourceJSON:r,datasetFormat:n,ioConfig:i??{bandIds:null,sampling:null}};if(Object.keys(o).forEach((e=>{null==o[e]&&delete o[e]})),n){if(!this.supportedFormats.has(n))throw new a.A("rasterfactory:open","not a supported format "+n);if("CRF"===n)throw new a.A("rasterfactory:open",`cannot open raster: ${t}`);const i=new(0,ze.get(n).constructor)(o);return await i.open({signal:e.signal}),i}const l=Array.from(ze.keys()).filter((e=>"CovJSON"!==e&&"Memory"!==e));let c=0;const u=()=>{if(n=l[c++],!n)return null;if("CRF"===n)return null;const t=new(0,ze.get(n).constructor)(o);return t.open({signal:e.signal}).then((()=>t)).catch((()=>u()))};return u()}static register(e,t,i){ze.has(e.toUpperCase())||ze.set(e.toUpperCase(),{desc:t,constructor:i})}}var $e=i(6049),Ue=i(24212),Ve=i(30291),je=i(88625),Ze=i(92935);let qe=class extends((0,g.dM)((0,A.j)((0,x.q)((0,b.A)((0,_.H)((0,w.d)((0,v.o)((0,I.G)((0,T.e)((0,y.b)((0,S.J)((0,l.P)(n.A.ClonableMixin(m.A)))))))))))))){constructor(...e){super(...e),this._primaryRasters=[],this.legendEnabled=!0,this.isReference=null,this.listMode="show",this.sourceJSON=null,this.version=null,this.type="imagery-tile",this.operationalLayerType="ArcGISTiledImageServiceLayer",this.popupEnabled=!0,this.popupTemplate=null,this.fields=null,this.source=void 0,this._debouncedSaveOperations=(0,c.sg)((async(e,t,s)=>{const{save:r,saveAs:n}=await i.e(9838).then(i.bind(i,59838));switch(e){case Ze.X.SAVE:return r(this,t);case Ze.X.SAVE_AS:return n(this,s,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:["Image Service"]},e).catch(c.QP).then((()=>this._openRaster(t)))),Promise.resolve(this)}set elevationInfo(e){this._set("elevationInfo",e),this.loaded&&this._validateElevationInfo()}get defaultPopupTemplate(){return this.createPopupTemplate()}get rasterFields(){const e=[(0,M.rZ)("Pixel Value"),(0,M.dy)("Raw Pixel Value")],t=this.raster?.rasterInfo??this.serviceRasterInfo,i=t?.attributeTable;if(i){const t=(0,M.jC)(i);e.push(...t)}const s=t?.dataType,r=t?.multidimensionalInfo;if(("vector-magdir"===s||"vector-uv"===s)&&null!=r){const t=r.variables[0].unit?.trim(),i=(0,M.DV)(t),s=(0,M.y6)();e.push(i,s)}if(r){const t=(0,M.AL)(r);e.push(...t)}return e}createPopupTemplate(e){const{rasterFields:t}=this,i=e?.visibleFieldNames??new Set(t.map((({name:e})=>e)).filter((e=>e!==M.F_.rawServicePixelValue))),s=(0,Ve.tn)({fields:t,title:this.title},{...e,visibleFieldNames:i}),{rasterInfo:r}=this.raster;return s?.fieldInfos&&r&&(0,M.h4)(s.fieldInfos,r),s}async generateRasterInfo(e,t){if(e=(0,h.PZ)(O.A,e),await this.load(),!e||"none"===e.functionName?.toLowerCase())return this.serviceRasterInfo;try{const{rasterInfo:i}=await this._openFunctionRaster(e,t);return i}catch(e){if(e instanceof a.A)throw e;throw new a.A("imagery-tile-layer","the given raster function is not supported")}}async save(e){return this._debouncedSaveOperations(Ze.X.SAVE,e)}async saveAs(e,t){return this._debouncedSaveOperations(Ze.X.SAVE_AS,t,e)}write(e,t){const i=this._primaryRasters[0]??this.raster;if(this.loaded?"RasterTileServer"===i.datasetFormat&&("Raster"===i.tileType||"Map"===i.tileType):this.url&&/\/ImageServer(\/|\/?$)/i.test(this.url))return super.write(e,t);if(t?.messages){const e=`${t.origin}/${t.layerContainerType||"operational-layers"}`;t.messages.push(new a.A("layer:unsupported",`Layers (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this}))}return null}async _openRaster(e){let t=!1;if(this.raster)await this._openFromRaster(this.raster,e),t=(0,F.q)(this.raster),!t&&this.rasterFunction&&(this._primaryRasters=[this.raster],await this._initializeWithFunctionRaster(this.rasterFunction));else{const{url:t,rasterFunction:i,source:s}=this;if(!t&&!s)throw new a.A("imagery-tile-layer:open","missing url or source parameter");s?await this._openFromSource(s,e):i?await this._openFromUrlWithRasterFunction(t,i,e):await this._openFromUrl(t,e)}const i=this.raster.rasterInfo;if(!i)throw new a.A("imagery-tile-layer:load","cannot load resources on "+this.url);if(this._set("serviceRasterInfo",t?i:this._primaryRasters[0].rasterInfo),this._set("spatialReference",i.spatialReference),this.sourceJSON=this.sourceJSON||this.raster.sourceJSON,null!=this.sourceJSON){const e="Map"===this.raster.tileType&&null!=this.sourceJSON.minLOD&&null!=this.sourceJSON.maxLOD?this.sourceJSON:{...this.sourceJSON,minScale:0,maxScale:0};this.read(e,{origin:"service"})}else this.read({tileInfo:this.serviceRasterInfo?.storageInfo.tileInfo.toJSON()},{origin:"service"});this.title||(this.title=this.raster.datasetName),"Map"===this.raster.tileType&&(this.popupEnabled=!1),this._configDefaultSettings(),this.addHandles((0,u.wB)((()=>this.customParameters),(e=>{this.raster&&(this.raster.ioConfig.customFetchParameters=e)})))}async _openFromRaster(e,t){e.rasterInfo||await e.open({signal:t}),this._primaryRasters=(0,F.p)(e),this.url||(this.url=this._primaryRasters[0].url)}async _openFromUrlWithRasterFunction(e,t,i){const s=[e];t&&(0,$e.UD)(t.toJSON(),s);const r=await Promise.all(s.map((e=>Je.open({url:e,sourceJSON:this.sourceJSON,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},signal:i})))),n=r.findIndex((e=>null==e));if(n>-1)throw new a.A("imagery-tile-layer:open",`cannot open raster: ${s[n]}`);return this._primaryRasters=r,this._initializeWithFunctionRaster(t)}async _openFromUrl(e,t){const i=await Je.open({url:e,sourceJSON:this.sourceJSON,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},signal:t});if(null==i)throw new a.A("imagery-tile-layer:open",`cannot open raster: ${e}`);this._primaryRasters=[i],this.raster=i}async _openFromSource(e,t){const i="the tiled imagery data source is not supported",s="coverage"===e.type?.toLowerCase()?"CovJSON":e.extent&&e.pixelBlock?"MEMORY":null;if(!s)throw new a.A("imagery-tile-layer:open",i);"MEMORY"===s&&(e={...e,pixelBlock:void 0,pixelBlocks:[e.pixelBlock]});const r=await Je.open({url:"",source:e,datasetFormat:s,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},signal:t});if(null==r)throw new a.A("imagery-tile-layer:open",i);this._primaryRasters=[r],this.rasterFunction?await this._initializeWithFunctionRaster(this.rasterFunction):this.raster=r}async _openFunctionRaster(e,t){const i={raster:this._primaryRasters[0]};this._primaryRasters.length>1&&this._primaryRasters.forEach((e=>i[e.url]=e));const s=(0,$e.vt)(e.functionDefinition?.toJSON()??e.toJSON(),i),r=new P.A({rasterFunction:s});return await r.open(t),r}async _initializeWithFunctionRaster(e,t){try{this.raster=await this._openFunctionRaster(e,t)}catch(e){e instanceof a.A&&o.A.getLogger(this).error("imagery-tile-layer:open",e.message),o.A.getLogger(this).warn("imagery-tile-layer:open","the raster function cannot be applied and is removed"),this._set("rasterFunction",null),this.raster=this._primaryRasters[0]}}_validateElevationInfo(){const e=this.elevationInfo;(0,Ue.XF)(o.A.getLogger(this),(0,Ue.$7)("ImageryTile layers","relative-to-scene",e)),(0,Ue.XF)(o.A.getLogger(this),(0,Ue.tW)("ImageryTile layers",e))}};(0,s._)([(0,f.MZ)({clonable:!1})],qe.prototype,"_primaryRasters",void 0),(0,s._)([(0,f.MZ)({type:je.A,value:null,json:{read:!1}})],qe.prototype,"elevationInfo",null),(0,s._)([(0,f.MZ)(R.fV)],qe.prototype,"legendEnabled",void 0),(0,s._)([(0,f.MZ)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],qe.prototype,"isReference",void 0),(0,s._)([(0,f.MZ)({type:["show","hide"]})],qe.prototype,"listMode",void 0),(0,s._)([(0,f.MZ)({json:{read:!0,write:!0}})],qe.prototype,"blendMode",void 0),(0,s._)([(0,f.MZ)({type:O.A,json:{name:"renderingRule",write:!0}})],qe.prototype,"rasterFunction",void 0),(0,s._)([(0,f.MZ)()],qe.prototype,"sourceJSON",void 0),(0,s._)([(0,f.MZ)({readOnly:!0,json:{origins:{service:{read:{source:"currentVersion"}}}}})],qe.prototype,"version",void 0),(0,s._)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],qe.prototype,"type",void 0),(0,s._)([(0,f.MZ)({type:["ArcGISTiledImageServiceLayer"]})],qe.prototype,"operationalLayerType",void 0),(0,s._)([(0,f.MZ)({type:Boolean,value:!0,json:{read:{source:"disablePopup",reader:(e,t)=>!t.disablePopup},write:{target:"disablePopup",overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType}},writer(e,t,i){t[i]=!e}}}})],qe.prototype,"popupEnabled",void 0),(0,s._)([(0,f.MZ)({type:r.A,json:{read:{source:"popupInfo"},write:{target:"popupInfo",overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType}}}}})],qe.prototype,"popupTemplate",void 0),(0,s._)([(0,f.MZ)({readOnly:!0})],qe.prototype,"defaultPopupTemplate",null),(0,s._)([(0,f.MZ)({readOnly:!0,type:[C.A]})],qe.prototype,"fields",void 0),(0,s._)([(0,f.MZ)({readOnly:!0,type:[C.A]})],qe.prototype,"rasterFields",null),(0,s._)([(0,f.MZ)({constructOnly:!0})],qe.prototype,"source",void 0),qe=(0,s._)([(0,d.$)("esri.layers.ImageryTileLayer")],qe);const Ge=qe},56551:(e,t,i)=>{i.d(t,{H:()=>h});var s=i(90237),r=i(10107),n=(i(44208),i(53966),i(87811),i(40608)),a=i(69540),o=i(25482),l=i(56507),c=i(93223),u=i(94359);let f=class extends(a.A.ClonableMixin(o.A)){constructor(e){super(e),this.name=void 0,this.method="none",this.value=void 0,this.bandIds=void 0,this.renderer=void 0}};(0,s._)([(0,r.MZ)({type:String,json:{write:{isRequired:!0}}})],f.prototype,"name",void 0),(0,s._)([(0,r.MZ)({type:["raster-function-template","variable","none"],json:{write:{isRequired:!0}}}),(0,c.e)({rasterFunctionTemplate:"raster-function-template",variable:"variable",none:"none"})],f.prototype,"method",void 0),(0,s._)([(0,r.MZ)({type:String,json:{write:{isRequired:!0}}})],f.prototype,"value",void 0),(0,s._)([(0,r.MZ)({type:[l.jz],json:{write:{isRequired:!0}}})],f.prototype,"bandIds",void 0),(0,s._)([(0,r.MZ)({types:u.uy,json:{write:!0,origins:{"web-scene":{types:u.Gj,write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type&&"flow"!==e.type})}}}}})],f.prototype,"renderer",void 0),f=(0,s._)([(0,n.$)("esri.renderers.support.RasterPresetRenderer")],f);const h=e=>{let t=class extends e{constructor(){super(...arguments),this.activePresetRendererName=null,this.presetRenderers=null}};return(0,s._)([(0,r.MZ)({type:String,json:{name:"layerDefinition.activePresetRendererName",write:{allowNull:!0}}})],t.prototype,"activePresetRendererName",void 0),(0,s._)([(0,r.MZ)({type:[f],json:{name:"layerDefinition.presetRenderers",write:!0}})],t.prototype,"presetRenderers",void 0),t=(0,s._)([(0,n.$)("esri.layers.mixins.RasterPresetRendererMixin")],t),t}},69397:(e,t,i)=>{i.d(t,{$B:()=>r,Qf:()=>c,Qh:()=>o,RS:()=>n,ez:()=>h,lM:()=>a,qK:()=>f});var s=i(34275);function r(e){return 32+e.length}const n=16;function a(e){if(!e)return 0;let t=f;for(const i in e)e.hasOwnProperty(i)&&(t+=l(e[i],!1));return t}function o(e){if(!e)return 0;if("number"==typeof e[0])return c(e);if(Array.isArray(e))return function(e){const t=e.length;if(0===t||"number"==typeof e[0])return u(e,8);let i=h;for(let s=0;s<t;s++)i+=l(e[s]);return i}(e);let t=f;for(const i in e)e.hasOwnProperty(i)&&(t+=l(e[i]));return t}function l(e,t=!0){switch(typeof e){case"object":return t?o(e):f;case"string":return r(e);case"number":return n;case"boolean":return 4;default:return 8}}function c(...e){return e.reduce(((e,t)=>e+(t?(0,s.iu)(t)?t.byteLength+p:Array.isArray(t)?u(t,n):0:0)),0)}function u(e,t){return h+e.length*t}const f=32,h=16,p=145},71903:(e,t,i)=>{var s;i.d(t,{u:()=>s}),function(e){e[e.KILOBYTES=1024]="KILOBYTES",e[e.MEGABYTES=1048576]="MEGABYTES",e[e.GIGABYTES=1073741824]="GIGABYTES"}(s||(s={}))},73037:(e,t,i)=>{i.d(t,{A:()=>c});var s,r=i(90237),n=i(10107),a=(i(44208),i(53966),i(87811),i(93223)),o=i(40608),l=i(82434);let c=s=class extends l.A{constructor(){super(...arguments),this.type="gcs-shift",this.tolerance=1e-8}forwardTransform(e){return"point"===(e=e.clone()).type?(e.x>180+this.tolerance&&(e.x-=360),e):(e.xmin>=180-this.tolerance?(e.xmax-=360,e.xmin-=360):e.xmax>180+this.tolerance&&(e.xmin=-180,e.xmax=180),e)}inverseTransform(e){return"point"===(e=e.clone()).type?(e.x<-this.tolerance&&(e.x+=360),e):(e.xmin<-this.tolerance&&(e.xmin+=360,e.xmax+=360),e)}clone(){return new s({tolerance:this.tolerance})}};(0,r._)([(0,a.e)({GCSShiftXform:"gcs-shift"})],c.prototype,"type",void 0),(0,r._)([(0,n.MZ)()],c.prototype,"tolerance",void 0),c=s=(0,r._)([(0,o.$)("esri.layers.support.rasterTransforms.GCSShiftTransform")],c)},82371:(e,t,i)=>{i.d(t,{E9:()=>d,Tw:()=>h,X6:()=>p});var s=i(78888),r=i(5443),n=i(86738),a=i(16930),o=i(87186),l=i(20223),c=i(2272),u=i(22671);async function f(e,t,i){const f=(0,c.Dl)(e),{rasterFunction:h,sourceJSON:p}=t||{},d=h?JSON.stringify(h.rasterFunctionDefinition||h):null,m=(0,c.lF)({...f.query,renderingRule:d,f:"json"}),y=(0,c.jV)(m,i);e=f.path;const g=p||await(0,s.A)(e,y).then((e=>e.data)),w=g.hasRasterAttributeTable?(0,s.A)(`${e}/rasterAttributeTable`,y):null,v=g.hasColormap?(0,s.A)(`${e}/colormap`,y):null,x=g.hasHistograms?(0,s.A)(`${e}/histograms`,y):null,b=g.currentVersion>=10.3?(0,s.A)(`${e}/keyProperties`,y):null,I=g.hasMultidimensions?(0,s.A)(`${e}/multidimensionalInfo`,y):null,_=await Promise.allSettled([w,v,x,b,I]);let S=null;if(g.minValues&&g.minValues.length===g.bandCount){S=[];for(let e=0;e<g.minValues.length;e++)S.push({min:g.minValues[e],max:g.maxValues[e],avg:g.meanValues[e],stddev:g.stdvValues[e]})}const A=r.A.fromJSON(g.extent),T=Math.ceil(A.width/g.pixelSizeX-.1),R=Math.ceil(A.height/g.pixelSizeY-.1),C=a.A.fromJSON(g.spatialReference||g.extent.spatialReference),M="fulfilled"===_[0].status?_[0].value?.data:null,O=M?.features?.length?u.A.fromJSON(M):null,F="fulfilled"===_[1].status?_[1].value?.data.colormap:null,P=F?.length?F:null,k="fulfilled"===_[2].status?_[2].value?.data.histograms:null,D=k?.[0]?.counts?.length?k:null,N="fulfilled"===_[3].status?_[3].value?.data??{}:{},E="fulfilled"===_[4].status?_[4].value?.data.multidimensionalInfo:null,L=E?.variables?.length?E:null;L&&L.variables.forEach((e=>{e.statistics?.length&&e.statistics.forEach((e=>{e.avg=e.mean,e.stddev=e.standardDeviation})),e.dimensions?.forEach((e=>{"StdTime"!==e.name||e.recurring||e.unit||(e.unit="ISO8601")}))}));const{defaultVariable:B,serviceDataType:z}=g;B&&B!==N.DefaultVariable&&(N.DefaultVariable=B),z?.includes("esriImageServiceDataTypeVector")&&!z.includes(N.DataType)&&(N.DataType=z.replace("esriImageServiceDataType",""));let J=g.noDataValue;g.noDataValues?.length&&g.noDataValues.some((e=>e!==J))&&(J=g.noDataValues);const $=g.transposeInfo?new l.A({blockWidth:256,blockHeight:256,pyramidBlockWidth:256,pyramidBlockHeight:256,pyramidScalingFactor:2,compression:"lerc",origin:new n.A({x:g.extent.xmin,y:g.extent.ymax,spatialReference:C}),firstPyramidLevel:1,maximumPyramidLevel:Math.max(0,Math.round(Math.log(Math.max(T,R))/Math.LN2-8)),transposeInfo:g.transposeInfo}):void 0;return new o.A({width:T,height:R,bandCount:g.bandCount,extent:r.A.fromJSON(g.extent),spatialReference:C,pixelSize:new n.A({x:g.pixelSizeX,y:g.pixelSizeY,spatialReference:C}),pixelType:g.pixelType.toLowerCase(),statistics:S,attributeTable:O,colormap:P,histograms:D,keyProperties:N,noDataValue:J,multidimensionalInfo:L,storageInfo:$})}function h(e,t,i){return f(e,{sourceJSON:t},i)}function p(e,t,i){return f(e,{rasterFunction:t},i)}function d(e,t){e.attributeTable||(t.hasRasterAttributeTable=!1),e.histograms||(t.hasHistograms=!1),e.colormap||(t.hasColormap=!1),e.multidimensionalInfo||(t.hasMultidimensions=!1)}},82434:(e,t,i)=>{i.d(t,{A:()=>o});var s=i(90237),r=i(25482),n=i(10107),a=(i(44208),i(53966),i(87811),i(40608));let o=class extends r.A{get affectsPixelSize(){return!1}forwardTransform(e){return e}inverseTransform(e){return e}};(0,s._)([(0,n.MZ)()],o.prototype,"affectsPixelSize",null),(0,s._)([(0,n.MZ)({json:{write:!0}})],o.prototype,"spatialReference",void 0),o=(0,s._)([(0,a.$)("esri.layers.support.rasterTransforms.BaseRasterTransform")],o)}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5943],{18768:(e,t,i)=>{i.d(t,{b:()=>l});var s=i(90237),r=i(53966),n=i(10107),a=(i(44208),i(87811),i(40608)),o=i(60694);const l=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,o.qg)(this.url);if(e?.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,o.Jf)(e,r.A.getLogger(this)))}};return(0,s._)([(0,n.MZ)()],t.prototype,"title",null),(0,s._)([(0,n.MZ)({type:String})],t.prototype,"url",null),t=(0,s._)([(0,a.$)("esri.layers.mixins.ArcGISService")],t),t}},21312:(e,t,i)=>{i.d(t,{A:()=>m});var s,r=i(90237),n=i(10107),a=(i(44208),i(53966),i(87811),i(93223)),o=i(36005),l=i(40608),c=i(43937),u=i(5443),f=i(86738),h=i(82434);function p(e,t,i){const{x:s,y:r}=t;if(i<2)return{x:e[0]+s*e[2]+r*e[4],y:e[1]+s*e[3]+r*e[5]};if(2===i){const t=s*s,i=r*r,n=s*r;return{x:e[0]+s*e[2]+r*e[4]+t*e[6]+n*e[8]+i*e[10],y:e[1]+s*e[3]+r*e[5]+t*e[7]+n*e[9]+i*e[11]}}const n=s*s,a=r*r,o=s*r,l=n*s,c=n*r,u=s*a,f=r*a;return{x:e[0]+s*e[2]+r*e[4]+n*e[6]+o*e[8]+a*e[10]+l*e[12]+c*e[14]+u*e[16]+f*e[18],y:e[1]+s*e[3]+r*e[5]+n*e[7]+o*e[9]+a*e[11]+l*e[13]+c*e[15]+u*e[17]+f*e[19]}}function d(e,t,i){const{xmin:s,ymin:r,xmax:n,ymax:a,spatialReference:o}=t;let l=[];if(i<2)l.push({x:s,y:a}),l.push({x:n,y:a}),l.push({x:s,y:r}),l.push({x:n,y:r});else{let e=10;for(let t=0;t<e;t++)l.push({x:s,y:r+(a-r)*t/(e-1)}),l.push({x:n,y:r+(a-r)*t/(e-1)});e=8;for(let t=1;t<=e;t++)l.push({x:s+(n-s)*t/e,y:r}),l.push({x:s+(n-s)*t/e,y:a})}l=l.map((t=>p(e,t,i)));const c=l.map((e=>e.x)),f=l.map((e=>e.y));return new u.A({xmin:Math.min.apply(null,c),xmax:Math.max.apply(null,c),ymin:Math.min.apply(null,f),ymax:Math.max.apply(null,f),spatialReference:o})}let m=s=class extends h.A{constructor(){super(...arguments),this.polynomialOrder=1,this.type="polynomial"}readForwardCoefficients(e,t){const{coeffX:i,coeffY:s}=t;if(!i?.length||!s?.length||i.length!==s.length)return null;const r=[];for(let e=0;e<i.length;e++)r.push(i[e]),r.push(s[e]);return r}writeForwardCoefficients(e,t,i){const s=[],r=[];for(let t=0;t<e?.length;t++)t%2==0?s.push(e[t]):r.push(e[t]);t.coeffX=s,t.coeffY=r}get inverseCoefficients(){let e=this._get("inverseCoefficients");const t=this._get("forwardCoefficients");return!e&&t&&this.polynomialOrder<2&&(e=function(e){const[t,i,s,r,n,a]=e,o=s*a-n*r,l=n*r-s*a;return[(n*i-t*a)/o,(s*i-t*r)/l,a/o,r/l,-n/o,-s/l]}(t)),e}set inverseCoefficients(e){this._set("inverseCoefficients",e)}readInverseCoefficients(e,t){const{inverseCoeffX:i,inverseCoeffY:s}=t;if(!i?.length||!s?.length||i.length!==s.length)return null;const r=[];for(let e=0;e<i.length;e++)r.push(i[e]),r.push(s[e]);return r}writeInverseCoefficients(e,t,i){const s=[],r=[];for(let t=0;t<e?.length;t++)t%2==0?s.push(e[t]):r.push(e[t]);t.inverseCoeffX=s,t.inverseCoeffY=r}get affectsPixelSize(){return this.polynomialOrder>0}forwardTransform(e){if("point"===e.type){const t=p(this.forwardCoefficients,e,this.polynomialOrder);return new f.A({x:t.x,y:t.y,spatialReference:e.spatialReference})}return d(this.forwardCoefficients,e,this.polynomialOrder)}inverseTransform(e){if("point"===e.type){const t=p(this.inverseCoefficients,e,this.polynomialOrder);return new f.A({x:t.x,y:t.y,spatialReference:e.spatialReference})}return d(this.inverseCoefficients,e,this.polynomialOrder)}clone(){return new s({polynomialOrder:this.polynomialOrder,forwardCoefficients:this.forwardCoefficients?[...this.forwardCoefficients]:null,inverseCoefficients:this.inverseCoefficients?[...this.inverseCoefficients]:null})}};(0,r._)([(0,n.MZ)({json:{write:!0}})],m.prototype,"polynomialOrder",void 0),(0,r._)([(0,n.MZ)()],m.prototype,"forwardCoefficients",void 0),(0,r._)([(0,o.w)("forwardCoefficients",["coeffX","coeffY"])],m.prototype,"readForwardCoefficients",null),(0,r._)([(0,c.K)("forwardCoefficients")],m.prototype,"writeForwardCoefficients",null),(0,r._)([(0,n.MZ)({json:{write:!0}})],m.prototype,"inverseCoefficients",null),(0,r._)([(0,o.w)("inverseCoefficients",["inverseCoeffX","inverseCoeffY"])],m.prototype,"readInverseCoefficients",null),(0,r._)([(0,c.K)("inverseCoefficients")],m.prototype,"writeInverseCoefficients",null),(0,r._)([(0,n.MZ)()],m.prototype,"affectsPixelSize",null),(0,r._)([(0,a.e)({PolynomialXform:"polynomial"})],m.prototype,"type",void 0),m=s=(0,r._)([(0,l.$)("esri.layers.support.rasterTransforms.PolynomialTransform")],m)},24212:(e,t,i)=>{function s(e,t){return function(e,t){return t?.mode?t.mode:function(e){return e?l:c}(e).mode}(null==e||(e.hasZ??!1),t)}function r(e,t,i){return i&&i.mode!==t?`${e} only support ${t} elevation mode`:null}function n(e,t,i){return i?.mode===t?`${e} do not support ${t} elevation mode`:null}function a(e,t){return null!=t?.featureExpressionInfo&&"0"!==t.featureExpressionInfo.expression?`${e} do not support featureExpressionInfo`:null}function o(e,t){t&&e.warn(".elevationInfo=",t)}i.d(t,{$7:()=>n,B:()=>r,XF:()=>o,tW:()=>a,w7:()=>s}),i(83047),i(16271);const l={mode:"absolute-height",offset:0},c={mode:"on-the-ground",offset:null}},25943:(e,t,i)=>{i.d(t,{d:()=>A});var s,r=i(90237),n=i(78888),a=i(69622),o=i(71903),l=i(49186),c=i(36563),u=(i(44208),i(66344)),f=i(3694),h=i(74887),p=i(36708),d=i(11932),m=i(84952),y=i(10107),g=(i(53966),i(87811),i(40608)),w=i(72802),v=i(4718),x=i(69397),b=i(34275);class I{constructor(e){!function(e){if(!e?.location)throw new l.A("tilemap:missing-location","Location missing from tilemap response");if(!1===e.valid)throw new l.A("tilemap:invalid","Tilemap response was marked as invalid");if(!e.data)throw new l.A("tilemap:missing-data","Data missing from tilemap response");if(!Array.isArray(e.data))throw new l.A("tilemap:data-mismatch","Data must be an array of numbers");if(e.data.length!==e.location.width*e.location.height)throw new l.A("tilemap:data-mismatch","Number of data items does not match width/height of tilemap")}(e);const{location:t,data:i}=e;this.location=Object.freeze((0,v.o8)(t));const s=this.location.width,r=this.location.height;let n=!0,a=!0;const o=function(e,t=!1){return e<=b.y9?t?new Array(e).fill(0):new Array(e):new Uint32Array(e)}(Math.ceil(s*r/32));let c=0;for(let e=0;e<i.length;e++){const t=e%32;i[e]?(a=!1,o[c]|=1<<t):n=!1,31===t&&++c}a?(this._availability="unavailable",this.byteSize=40):n?(this._availability="available",this.byteSize=40):(this._availability=o,this.byteSize=40+(0,x.Qf)(o))}getAvailability(e,t){if("unavailable"===this._availability||"available"===this._availability)return this._availability;const i=(e-this.location.top)*this.location.width+(t-this.location.left),s=i%32,r=i>>5,n=this._availability;return r<0||r>n.length?"unknown":n[r]&1<<s?"available":"unavailable"}static fromDefinition(e,t){const i=e.service.request||n.A,{row:s,col:r,width:a,height:o}=e,c={query:{f:"json"}};return t=t?{...c,...t}:c,i(function(e){let t;if(e.service.tileServers?.length){const i=e.service.tileServers;t=`${i&&i.length?i[e.row%i.length]:e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}else t=`${e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`;const i=e.service.query;return i&&(t=`${t}?${i}`),t}(e),t).then((e=>e.data)).catch((e=>{if(422===e?.details?.httpStatus)return{location:{top:s,left:r,width:a,height:o},valid:!0,data:new Array(a*o).fill(0)};throw e})).then((e=>{if(e.location&&(e.location.top!==s||e.location.left!==r||e.location.width!==a||e.location.height!==o))throw new l.A("tilemap:location-mismatch","Tilemap response for different location than requested",{response:e,definition:{top:s,left:r,width:a,height:o}});return I.fromJSON(e)}))}static fromJSON(e){return Object.freeze(new I(e))}}function _(e){return`${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}function S(e,t,i){return new l.A("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i})}let A=class extends a.A{static{s=this}constructor(e){super(e),this._pendingTilemapRequests={},this.request=n.A,this.size=32,this._prefetchingEnabled=!0}initialize(){this._tilemapCache=new u.q(2*o.u.MEGABYTES),this.addHandles((0,p.wB)((()=>{const{layer:e}=this;return[e?.parsedUrl,e?.tileServers,e?.apiKey,e?.customParameters]}),(()=>this._initializeTilemapDefinition()),p.Vh))}get effectiveMinLOD(){return this.minLOD??this.layer.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.layer.tileInfo.lods[this.layer.tileInfo.lods.length-1].level}getAvailability(e,t,i){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return"unavailable";const s=this._tilemapFromCache(e,t,i,this._tmpTilemapDefinition);return s?s.getAvailability(t,i):"unknown"}fetchAvailability(e,t,i,s){return!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD?Promise.reject(S(e,t,i)):this._fetchTilemap(e,t,i,s).catch((e=>e)).then((s=>{if(s instanceof I){const r=s.getAvailability(t,i);if("unavailable"===r)throw S(e,t,i);return r}if((0,h.zf)(s))throw s;return"unknown"}))}fetchAvailabilityUpsample(e,t,i,s,r){s.level=e,s.row=t,s.col=i;const n=this.layer.tileInfo;n.updateTileInfo(s);const a=this.fetchAvailability(e,t,i,r).catch((e=>{if((0,h.zf)(e))throw e;if(n.upsampleTile(s))return this.fetchAvailabilityUpsample(s.level,s.row,s.col,s,r);throw e}));return this._fetchAvailabilityUpsamplePrefetch(s.id,e,t,i,r,a),a}async _fetchAvailabilityUpsamplePrefetch(e,t,i,r,n,a){if(!this._prefetchingEnabled||null==e)return;const o=`prefetch-${e}`;if(this.hasHandles(o))return;const l=new AbortController;a.then((()=>l.abort()),(()=>l.abort()));let u=!1;const f=(0,c.hA)((()=>{u||(u=!0,l.abort())}));if(this.addHandles(f,o),await(0,d.md)(10,l.signal).catch((()=>{})),u||(u=!0,this.removeHandles(o)),(0,h.G4)(l))return;const p=new w.U(e,t,i,r),m={...n,signal:l.signal},y=this.layer.tileInfo;for(let e=0;s._prefetches.length<s._maxPrefetch&&y.upsampleTile(p);++e){const e=this.fetchAvailability(p.level,p.row,p.col,m);s._prefetches.push(e);const t=()=>{s._prefetches.removeUnordered(e)};e.then(t,t)}}static{this._maxPrefetch=4}static{this._prefetches=new f.A({initialSize:s._maxPrefetch})}_fetchTilemap(e,t,i,s){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return Promise.reject(new l.A("tilemap-cache:level-unavailable",`Level ${e} is unavailable in the service`));const r=this._tmpTilemapDefinition,n=this._tilemapFromCache(e,t,i,r);if(n)return Promise.resolve(n);const a=s?.signal;return s={...s,signal:null},new Promise(((e,t)=>{(0,h.u7)(a,(()=>t((0,h.NK)())));const i=_(r);let n=this._pendingTilemapRequests[i];if(!n){n=I.fromDefinition(r,s).then((e=>(this._tilemapCache.put(i,e,e.byteSize),e)));const e=()=>{delete this._pendingTilemapRequests[i]};this._pendingTilemapRequests[i]=n,n.then(e,e)}n.then(e,t)}))}_initializeTilemapDefinition(){if(!this.layer.parsedUrl)return;const{parsedUrl:e,apiKey:t,customParameters:i}=this.layer;this._tilemapCache.clear(),this._tmpTilemapDefinition={service:{url:e.path,query:(0,m.x0)({...e.query,...i,token:t??e.query?.token}),tileServers:this.layer.tileServers,request:this.request},width:this.size,height:this.size,level:0,row:0,col:0}}_tilemapFromCache(e,t,i,s){s.level=e,s.row=t-t%this.size,s.col=i-i%this.size;const r=_(s);return this._tilemapCache.get(r)}get test(){}};(0,r._)([(0,y.MZ)({constructOnly:!0})],A.prototype,"layer",void 0),(0,r._)([(0,y.MZ)({constructOnly:!0})],A.prototype,"minLOD",void 0),(0,r._)([(0,y.MZ)({constructOnly:!0})],A.prototype,"maxLOD",void 0),(0,r._)([(0,y.MZ)({constructOnly:!0})],A.prototype,"request",void 0),(0,r._)([(0,y.MZ)({constructOnly:!0})],A.prototype,"size",void 0),A=s=(0,r._)([(0,g.$)("esri.layers.support.TilemapCache")],A)},35943:(e,t,i)=>{i.r(t),i.d(t,{default:()=>Ge});var s=i(90237),r=i(13874),n=i(69540),a=i(49186),o=i(53966),l=i(92071),c=i(74887),u=i(36708),f=i(10107),h=i(56507),p=i(44208),d=(i(87811),i(40608)),m=i(4146),y=i(18768),g=i(63074),w=i(69208),v=i(89015),x=i(16131),b=i(8303),I=i(63660),_=i(56551),S=i(54310),A=i(25036),T=i(82935),R=i(10873),C=i(20437),M=i(74797),O=i(22796),F=i(76353),P=i(84169),k=i(4916),D=i(68197),N=i(5443),E=i(16930),L=i(73444),B=i(14140),z=i(16019);function J(e){return["x","e","east","long","longitude"].includes(e.toLowerCase())}function $(e){return["y","n","west","lat","latitude"].includes(e.toLowerCase())}function U(e){const{axes:t}=e.domain,i=Object.keys(t),s=[],r=[];let n=-1,a=-1,o=[];for(let e=0;e<i.length;e++){const l=i[e];J(l)?n=e:$(l)&&(a=e);const c=t[l],u=[];if("values"in c){c.values.forEach((e=>u.push("string"==typeof e?new Date(e).getTime():e)));const e=u[1]-u[0];s.push([u[0]-.5*e,u[u.length-1]+.5*e]),r.push(e)}else{const{start:e,stop:t,num:i}=c,n=(t-e)/(i-1);s.push([e-.5*n,t+.5*n]),r.push(n);for(let t=0;t<i;t++)u.push(e+n*t)}o.push({name:l,values:u,extent:[u[0],u[u.length-1]]})}n>-1&&-1===a?a=0===n?1:0:a>-1&&-1===n?n=0===a?1:0:-1===a&&-1===n&&(n=0,a=1),o=o.filter(((e,t)=>!(t===n||t===a)));const{referencing:l}=e.domain,c=l.find((e=>e.coordinates.includes(i[n]))).system.id,u=c?.slice(c.lastIndexOf("/")+1),f=null==u||"CRS84"===u?4326:Number(u),h=new E.A({wkid:f}),[p,d]=s[n],[m,y]=s[a],g=new N.A({xmin:p,xmax:d,ymin:m,ymax:y,spatialReference:h});return{width:Math.round(g.width/r[n]),height:Math.round(g.height/r[a]),extent:g,dimensions:o}}function V(e){const t=(0,L.ZS)()?.language;return t?e[t]??Object.values(e)[0]:Object.values(e)[0]}function j(){return Math.round(255*Math.random())}function Z(e){const t={},{parameters:i}=e;if(!i)return t;for(const[e,s]of Object.entries(i)){const{type:i,description:r,unit:n,categoryEncoding:a,observedProperty:o}=s;if("Parameter"===i&&(t[e]={},r&&(t[e].description=V(r)),n&&(t[e].unit=n.label?V(n.label):null,t[e].symbol=n.symbol?.value),a)){const i=Object.entries(a).map(((e,t)=>({OID:t,Value:Number(e[1]),ClassName:e[0].slice(e[0].lastIndexOf("/")+1),Count:1})));let s=!1;o?.categories?.length&&(o.categories.forEach((e=>{if(!e.id)return;const t=e.id.slice(e.id.lastIndexOf("/")+1),r=i.find((e=>e.ClassName===t));if(!r)return;const n=e.label?V(e.label):null;if(r.Label=n,e.preferredColor){const t=D.A.fromHex(e.preferredColor);t&&(s=!0,r.Red=t.r,r.Green=t.g,r.Blue=t.b)}})),s&&i.forEach((e=>{null==e.Red&&(e.Red=j(),e.Green=j(),e.Blue=j())})));const r={objectIdFieldName:"",fields:[{name:"OID",type:"esriFieldTypeOID",alias:"OID",domain:null},{name:"Value",type:"esriFieldTypeInteger",alias:"Value",domain:null},{name:"Count",type:"esriFieldTypeDouble",alias:"Count",domain:null},{name:"ClassName",type:"esriFieldTypeString",alias:"ClassName",domain:null,length:50},{name:"Label",type:"esriFieldTypeString",alias:"Label",domain:null,length:50}],features:i.map((e=>({attributes:e})))};s&&r.fields.push({name:"Red",type:"esriFieldTypeInteger",alias:"Red",domain:null},{name:"Green",type:"esriFieldTypeInteger",alias:"Green",domain:null},{name:"Blue",type:"esriFieldTypeInteger",alias:"Blue",domain:null}),t[e].attributeTable=r}}return t}function q(e){let t=Number.MAX_VALUE,i=-Number.MAX_VALUE;for(let s=0;s<e.length;s++){const r=e[s];null!=r&&(r<t&&(t=r),r>i&&(i=r))}return(0,z.X1)(t,i)}function G(e,t,i){const s=e.map(((e,i)=>({name:e,count:t[i]}))).sort(((e,t)=>e.name>t.name?-1:1)),r=(n=1,e=>n*=e.count);var n;const a=[...s.slice(1),{name:"",count:1}].reverse().map(r).reverse();let o=0;for(let r=e.length-1;r>=0;r--)o+=a[s.findIndex((({name:t})=>t===e[r]))]*(i%t[r]),i=Math.floor(i/t[r]);return o}var H=i(45617),W=i(87186),X=i(77301),Y=i(28435),K=i(6952);let Q=class extends k.A{constructor(){super(...arguments),this.datasetFormat="MEMORY",this.source=null}get url(){return""}fetchRawTile(e,t,i,s={}){if(!this._pixelBlockTiles){const{rasterInfo:r}=this,[n,a]=r.storageInfo.tileInfo.size,{sliceId:o}=s,{pixelBlocks:l}=this.source,c={pixelBlock:null==o?l[0]:l[o],useBilinear:"thematic"!==r.dataType,tileSize:{width:n,height:a},level:e,row:t,col:i},u=this.rasterJobHandler?this.rasterJobHandler.clipTile(c,s):(0,Y.J$)(c);return Promise.resolve(u)}const r=this._pixelBlockTiles.get(`${e}/${t}/${i}`);return Promise.resolve(r)}async _open(e){const t=this.source,{pixelBlocks:i,attributeTable:s,statistics:r,histograms:n,name:a,nativeExtent:o,transform:l}=t,c=i[0],{width:u,height:f,pixelType:h}=c,p=t.extent??new N.A({xmin:-.5,ymin:.5,xmax:u-.5,ymax:f-.5,spatialReference:new E.A({wkid:3857})}),d=t.isPseudoSpatialReference??!t.extent,m={x:p.width/u,y:p.height/f},y={...t.keyProperties};s&&(y.DataType="Thematic");const g=new W.A({width:u,height:f,pixelType:h,extent:p,nativeExtent:o,attributeTable:s,transform:l,pixelSize:m,spatialReference:p.spatialReference,bandCount:c.pixels.length,keyProperties:y,multidimensionalInfo:t.multidimensionalInfo,statistics:r,isPseudoSpatialReference:d,histograms:n});this.ioConfig.skipMapInfo&&this.updateImageSpaceRasterInfo(g),this.createRemoteDatasetStorageInfo(g,512,512),this._set("rasterInfo",g),this.updateTileInfo(),g.multidimensionalInfo?await this._buildMDimStats(t.pixelBlocks,g.multidimensionalInfo):await this._buildInMemoryRaster(c,{width:512,height:512},e),g.multidimensionalInfo||(this.source=null),this.datasetName=a}async _buildInMemoryRaster(e,t,i){const{rasterInfo:s}=this,r=s.storageInfo.maximumPyramidLevel??0,n="thematic"!==s.dataType,o=this.rasterJobHandler?this.rasterJobHandler.split({pixelBlock:e,tileSize:t,maximumPyramidLevel:r,useBilinear:n},i):Promise.resolve((0,Y.lD)(e,t,r,n)),l=null!=s.statistics,u=null!=s.histograms,f=this.ioConfig.skipStatistics||l?Promise.resolve({statistics:null,histograms:null}):this.rasterJobHandler?this.rasterJobHandler.estimateStatisticsHistograms({pixelBlock:e},i):Promise.resolve((0,K.f4)(e)),h=await(0,c.Lx)([o,f]);if(!h[0].value&&h[1].value)throw new a.A("inmemory-raster:open","failed to build in memory raster");this._pixelBlockTiles=h[0].value,l||(s.statistics=h[1].value?.statistics),u||(s.histograms=h[1].value?.histograms)}async _buildMDimStats(e,t,i){for(let s=0;s<t.variables.length;s++){const r=t.variables[s];if(r.statistics)continue;const n=r.dimensions.map((e=>new H.A({variableName:r.name,dimensionName:e.name,values:[e.values?.[0]??e.extent?.[0]],isSlice:!0}))),a=(0,X.NG)(n,t),o=null==a?null:e[a];if(null==o)continue;const l=this.rasterJobHandler?await this.rasterJobHandler.computeStatisticsHistograms({pixelBlock:o},i):(0,K.eH)(o);r.statistics=l.statistics,r.histograms||(r.histograms=l.histograms)}}};(0,s._)([(0,f.MZ)({type:String,json:{write:!0}})],Q.prototype,"datasetFormat",void 0),(0,s._)([(0,f.MZ)()],Q.prototype,"source",void 0),(0,s._)([(0,f.MZ)()],Q.prototype,"url",null),Q=(0,s._)([(0,d.$)("esri.layers.support.rasterDatasets.InMemoryRaster")],Q);const ee=Q;var te=i(22671);let ie=class extends k.A{constructor(){super(...arguments),this.datasetFormat="CovJSON"}fetchRawTile(e,t,i,s={}){return this._inMemoryRaster.fetchRawTile(e,t,i,s)}async _open(e){const{extent:t,pixelBlocks:i,multidimensionalInfo:s,attributeTable:r,bandNames:n}=await this._fetchData(e),{statistics:a,histograms:o}=(0,K.eH)(i[0]),l=n?.map((e=>({BandName:e}))),c={DataType:r?"Thematic":s?"Scientific":"Generic",BandProperties:l},u=new ee({source:{extent:t,pixelBlocks:i,attributeTable:r?te.A.fromJSON(r):null,multidimensionalInfo:s,statistics:a,histograms:o,keyProperties:c,isPseudoSpatialReference:!1}});await u.open(),this._inMemoryRaster=u;const f=this.source?"":this.url.slice(this.url.lastIndexOf("/")+1);this._set("datasetName",f.slice(0,f.indexOf("."))),this._set("rasterInfo",u.rasterInfo)}async _fetchData(e){const t=this.source??(await this.request(this.url,{signal:e?.signal})).data,i="imagery-tile-layer:open-coverage-json";if("coverage"!==t.type?.toLowerCase()||"grid"!==t.domain?.domainType?.toLowerCase())throw new a.A(i,"Only coverage with Grid domain type is supported");if(!t.ranges)throw new a.A(i,"Missing ranges in the grid coverage data");if(!t.domain.referencing?.length)throw new a.A(i,"Missing domain referencing in the grid coverage data");const s=Object.values(t.ranges);for(let e=0;e<s.length;e++){const{axisNames:t,shape:r,type:n,values:o}=s[e];if(!("ndarray"===n.toLowerCase()&&o?.length&&t?.length&&r?.length))throw new a.A(i,"Only ranges with valid NdArray, axisNames, shape, and inline values are supported");if(!J(t[t.length-1])||!$(t[t.length-2]))throw new a.A(i,"Only row-major ordered pixel values are supported. X axis must be the last axis.")}return function(e){const{width:t,height:i,extent:s,dimensions:r}=U(e),{ranges:n}=e,a=Object.keys(n).sort(((e,t)=>e<t?-1:1)),o=[];for(let e=0;e<a.length;e++){const t=a[e];r?.length&&o.push({name:t,dimensions:r})}const l=Z(e);o.forEach((e=>l[e.name]&&Object.assign(e,l[e.name])));const c=o.length?{variables:o}:void 0,u=[];for(let e=0;e<a.length;e++){const s=a[e],{values:o,dataType:l,axisNames:c,shape:f}=n[s],h=f.length>2?e*f.slice(0,-2).reduce(((e,t)=>e*t)):0,p=c.slice(0,-2),d=f.slice(0,-2),m="float"===l?"f32":q(o),y=t*i,g=o.length/y;for(let s=0;s<g;s++){const n=B.A.createEmptyBand(m,y),a=new Uint8Array(y).fill(255);let l=!1;const c=s*y;for(let e=0;e<y;e++){const t=o[c+e];null==t?(a[e]=0,l=!0):n[e]=t}if(0===e||r?.length){const e=new B.A({width:t,height:i,mask:l?a:null,pixels:[n],pixelType:m});e.updateStatistics(),r?.length?u[G(p,d,s)+h]=e:u.push(e)}else{const e=u[s];e.pixels.push(n),l?e.mask&&(e.mask=B.A.combineBandMasks([e.mask,a])):e.mask=l?a:null}}}const f=Object.values(l).find((e=>e.attributeTable))?.attributeTable;return{extent:s,pixelBlocks:u,multidimensionalInfo:c,attributeTable:f,bandNames:c?void 0:a}}(t)}};(0,s._)([(0,f.MZ)({type:String,json:{write:!0}})],ie.prototype,"datasetFormat",void 0),(0,s._)([(0,f.MZ)({constructOnly:!0})],ie.prototype,"source",void 0),ie=(0,s._)([(0,d.$)("esri.layers.support.rasterDatasets.CovJSONRaster")],ie);const se=ie;var re=i(4576),ne=i(21325),ae=i(50103),oe=i(21312);function le(e,t){if(!e||!t)return null;const i=[];for(let s=0;s<e.length;s++)i.push(e[s]),i.push(t[s]);return i}function ce(e){if(!e)return null;let t=Number(e);if(!isNaN(t)&&0!==t)return new E.A({wkid:t});if(e=String(e).trim(),(0,ne.jp)(e))return new E.A({wkt2:e});const i=e.toUpperCase();if(i.startsWith("COMPD_CS")){if(!i.includes("VERTCS")||!i.includes("GEOGCS")&&!i.startsWith("PROJCS"))return null;const s=i.indexOf("VERTCS"),r=i.indexOf("PROJCS"),n=r>-1?r:i.indexOf("GEOGCS");if(-1===n)return null;const a=e.slice(n,e.lastIndexOf("]",s)+1).trim(),o=e.slice(s,e.lastIndexOf("]")).trim();t=ue(a);const l=new E.A(t?{wkid:t}:{wkt:a}),c=ue(o);return c&&(l.vcsWkid=c),l}return i.startsWith("GEOGCS")||i.startsWith("PROJCS")?(t=ue(e),new E.A(0!==t?{wkid:t}:{wkt:e})):null}function ue(e){const t=e.replaceAll("]","[").replaceAll('"',"").split("[").map((e=>e.trim())).filter((e=>""!==e)),i=t[t.length-1].split(","),s=i[0]?.toLowerCase();if(("epsg"===s||"esri"===s)&&e.endsWith('"]]')){const e=Number(i[1]);if(!isNaN(e)&&0!==e)return e}return 0}function fe(e){if("pamdataset"!==e?.documentElement.tagName?.toLowerCase())return{};const t={spatialReference:null,transform:null,metadata:{},rasterBands:[],statistics:null,histograms:null};e.documentElement.childNodes.forEach((e=>{if(1===e.nodeType)if((0,ae.g7)(e,"SRS")){if(!t.spatialReference){const i=(0,ae.mX)(e);t.spatialReference=ce(i)}}else if((0,ae.g7)(e,"Metadata"))if("xml:ESRI"===e.getAttribute("domain")){const{spatialReference:i,transform:s}=function(e){const t=(0,ae.V6)(e,"GeodataXform"),i=ce((0,ae.v7)(t,"SpatialReference/WKID")||(0,ae.mX)(t,"SpatialReference/WKT"));if("typens:PolynomialXform"!==t.getAttribute("xsi:type"))return{spatialReference:i,transform:null};const s=(0,ae.v7)(t,"PolynomialOrder")??1,r=(0,ae.Ui)(t,"CoeffX/Double"),n=(0,ae.Ui)(t,"CoeffY/Double"),a=(0,ae.Ui)(t,"InverseCoeffX/Double"),o=(0,ae.Ui)(t,"InverseCoeffY/Double"),l=le(r,n),c=le(a,o);return{spatialReference:i,transform:l&&c&&l.length&&c.length?new oe.A({spatialReference:i,polynomialOrder:s,forwardCoefficients:l,inverseCoefficients:c}):null}}(e);t.transform=s,t.spatialReference||(t.spatialReference=i)}else(0,ae.IC)(e,"MDI").forEach((e=>t.metadata[e.getAttribute("key")]=(0,ae.mX)(e)));else if((0,ae.g7)(e,"PAMRasterBand")){const i=function(e){const t=(0,ae.v7)(e,"NoDataValue"),i=(0,ae.V6)(e,"Histograms/HistItem"),s=(0,ae.v7)(i,"HistMin"),r=(0,ae.v7)(i,"HistMax"),n=(0,ae.v7)(i,"BucketCount"),a=(0,ae.mX)(i,"HistCounts")?.split("|").map((e=>Number(e)));let o,l,c,u;(0,ae.IC)(e,"Metadata/MDI").forEach((e=>{const t=Number(e.textContent??e.nodeValue);switch(e.getAttribute("key").toUpperCase()){case"STATISTICS_MINIMUM":o=t;break;case"STATISTICS_MAXIMUM":l=t;break;case"STATISTICS_MEAN":c=t;break;case"STATISTICS_STDDEV":u=t}}));const f=(0,ae.v7)(e,"Metadata/SourceBandIndex");return{noDataValue:t,histogram:a?.length&&null!=s&&null!=r?{min:s,max:r,size:n||a.length,counts:a}:null,sourceBandIndex:f,statistics:null!=o&&null!=l?{min:o,max:l,avg:c,stddev:u}:null}}(e);null!=i.sourceBandIndex&&null==t.rasterBands[i.sourceBandIndex]?t.rasterBands[i.sourceBandIndex]=i:t.rasterBands.push(i)}}));const i=t.rasterBands;if(i.length){const e=!!i[0].statistics;t.statistics=e?i.map((e=>e.statistics)).filter(re.Ru):null;const s=!!i[0].histogram;t.histograms=s?i.map((e=>e.histogram)).filter(re.Ru):null}return t}var he=i(51244);let pe=class extends k.A{fetchRawTile(e,t,i,s={}){return this._inMemoryRaster.fetchRawTile(e,t,i,s)}async _open(e){const t=await this._fetchData(e);let{spatialReference:i,statistics:s,histograms:r,transform:n}=await this._fetchAuxiliaryData(e);const a=!i;a&&(i=new E.A({wkid:3857})),r?.length&&null==s&&(s=(0,K.Pg)(r));const{width:o,height:l}=t;let c=new N.A({xmin:-.5,ymin:.5-l,xmax:o-.5,ymax:.5,spatialReference:i});const u=n?n.forwardTransform(c):c;let f=!0;if(n){const e=n.forwardCoefficients;f=e&&0===e[1]&&0===e[2],f&&(n=null,c=u)}const h=new ee({source:{extent:u,nativeExtent:c,transform:n,pixelBlocks:[t],statistics:s,histograms:r,keyProperties:{DateType:"Processed"},isPseudoSpatialReference:a},ioConfig:{sampling:"closest",skipStatistics:!0}});this.ioConfig.skipMapInfo&&(h.ioConfig.skipMapInfo=!0),await h.open(),h.source=null,this._set("rasterInfo",h.rasterInfo),this._inMemoryRaster=h}async _fetchData(e){const{data:t}=await this.request(this.url,{responseType:"array-buffer",signal:e?.signal}),i=(0,he.g)(t).toUpperCase();if("JPG"!==i&&"PNG"!==i&&"GIF"!==i&&"BMP"!==i)throw new a.A("image-aux-raster:open","the data is not a supported format");this._set("datasetFormat",i);const s=i.toLowerCase(),r="gif"===s||"bmp"===s||!(0,p.A)("ios"),n=await this.decodePixelBlock(t,{format:s,useCanvas:r,hasNoZlibMask:!0});if(null==n)throw new a.A("image-aux-raster:open","the data cannot be decoded");return n}async _fetchAuxiliaryData(e){const t=e?.signal,{skipExtensions:i=[],skipMapInfo:s}=this.ioConfig,r=s||i.includes("aux.xml")?null:this.request(this.url+".aux.xml",{responseType:"xml",signal:t}),n=this.datasetFormat,a="JPG"===n?"jgw":"PNG"===n?"pgw":"BMP"===n?"bpw":null,o=a&&i.includes(a)?null:this.request(this.url.slice(0,this.url.lastIndexOf("."))+"."+a,{responseType:"text",signal:t}),l=await(0,c.Lx)([r,o]);if(t?.aborted)throw(0,c.NK)();const u=fe(l[0].value?.data);if(!u.transform){const e=l[1].value?l[1].value.data.split("\n").slice(0,6).map((e=>Number(e))):null;u.transform=6===e?.length?new oe.A({forwardCoefficients:[e[4],e[5],e[0],-e[1],e[2],-e[3]]}):null}return u}};(0,s._)([(0,f.MZ)({type:String,json:{write:!0}})],pe.prototype,"datasetFormat",void 0),pe=(0,s._)([(0,d.$)("esri.layers.support.rasterDatasets.ImageAuxRaster")],pe);const de=pe;var me=i(97768),ye=i(84952),ge=i(86738),we=i(20223),ve=i(87045),xe=i(25943),be=i(73037),Ie=i(82371);let _e=class extends k.A{constructor(){super(...arguments),this._levelOffset=0,this._tilemapCache=null,this._slices=null,this.datasetFormat="RasterTileServer",this.tileType=null}async fetchRawTile(e,t,i,s={}){const{storageInfo:r,extent:n}=this.rasterInfo,{transposeInfo:a}=r,o=null!=a&&!!s.transposedVariableName;if(this._slices&&!o&&null==s.sliceId)return null;const l=o?0:r.maximumPyramidLevel-e+this._levelOffset,c=`${this.url}/tile/${l}/${t}/${i}`,u=this._slices?o?{variable:s.transposedVariableName}:{sliceId:s.sliceId||0}:null;let f,h;if(r.isBsqTile){const e=(s.bandIds?.length?s.bandIds:[0,1,2]).map((e=>this.request(c,{query:{...u,bandId:e},responseType:"array-buffer",signal:s.signal}))),t=await Promise.all(e),i=t.map((e=>e.data.byteLength)).reduce(((e,t)=>e+t)),r=new Uint8Array(i);h=[];let n=0;for(const{data:e}of t)h.push(n),r.set(new Uint8Array(e),n),n+=e.byteLength;f=r.buffer}else f=(await this.request(c,{query:u,responseType:"array-buffer",signal:s.signal})).data;if(!f)return null;const p=o?a.tileSize:r.tileInfo.size,d=await this.decodePixelBlock(f,{width:p[0],height:p[1],planes:h?.length,offsets:h,pixelType:null,isPoint:"Elevation"===this.tileType,returnInterleaved:o,noDataValue:this.rasterInfo.noDataValue});if(null==d)return null;const m=r.blockBoundary[e];if("jpg"!==r.compression||i>m.minCol&&i<m.maxCol&&t>m.minRow&&t<m.maxRow)return d;const{origin:y,blockWidth:g,blockHeight:w}=r,{x:v,y:x}=this.getPyramidPixelSize(e),b=Math.round((n.xmin-y.x)/v)%g,I=Math.round((n.xmax-y.x)/v)%g||g,_=Math.round((y.y-n.ymax)/x)%w,S=Math.round((y.y-n.ymin)/x)%w||w,A=i===m.minCol?b:0,T=t===m.minRow?_:0,R=i===m.maxCol?I:g,C=t===m.maxRow?S:w;return(0,Y.z$)(d,{x:A,y:T},{width:R-A,height:C-T}),d}getSliceIndex(e){if(!this._slices||null==e||0===e.length)return null;const t=e;for(let e=0;e<this._slices.length;e++){const i=this._slices[e].multidimensionalDefinition;if(i.length===t.length&&!i.some((e=>{const i=t.find((t=>e.variableName===t.variableName&&t.dimensionName===e.dimensionName));return!i||(Array.isArray(e.values[0])?`${e.values[0][0]}-${e.values[0][1]}`:e.values[0])!==(Array.isArray(i.values[0])?`${i.values[0][0]}-${i.values[0][1]}`:i.values[0])})))return e}return null}async fetchVariableStatisticsHistograms(e,t){const i=this.request(this.url+"/statistics",{query:{variable:e,f:"json"},signal:t}).then((e=>e.data?.statistics)),s=this.request(this.url+"/histograms",{query:{variable:e,f:"json"},signal:t}).then((e=>e.data?.histograms)),r=await Promise.all([i,s]);return r[0]&&r[0].forEach((e=>{e.avg=e.mean,e.stddev=e.standardDeviation})),r[1]?.[0]?.counts?.length||(r[1]=null),{statistics:r[0]||null,histograms:r[1]||null}}async computeBestPyramidLevelForLocation(e,t={}){if(!this._tilemapCache)return 0;let i=this.identifyPixelLocation(e,0,t.datumTransformation);if(null===i)return null;let s=0;const{maximumPyramidLevel:r}=this.rasterInfo.storageInfo;let n=r-s+this._levelOffset;const a=i.srcLocation;for(;n>=0;){try{if("available"===await this._tilemapCache.fetchAvailability(n,i.row,i.col,t))break}catch{}if(n--,s++,i=this.identifyPixelLocation(a,s,t.datumTransformation),null===i)return null}return-1===n||null==i?null:s}async _open(e){const t=e?.signal,i=this.sourceJSON?{data:this.sourceJSON}:await this.request(this.url,{query:{f:"json"},signal:t});i.ssl&&(this.url=this.url.replace(/^http:/i,"https:"));const s=i.data;if(this.sourceJSON=s,!s)throw new a.A("imageserverraster:open","cannot initialize tiled image service, missing service info");if(!s.tileInfo)throw new a.A("imageserverraster:open","use ImageryLayer to open non-tiled image services");this._fixScaleInServiceInfo(),this.tileType=s.cacheType,null==this.tileType&&(["jpg","jpeg","png","png8","png24","png32","mixed"].includes(s.tileInfo.format.toLowerCase())?this.tileType="Map":"lerc"===s.tileInfo.format.toLowerCase()?this.tileType="Elevation":this.tileType="Raster"),this.datasetName=s.name?.slice(s.name.indexOf("/")+1)??"";const r=await this._fetchRasterInfo({signal:t});if(null==r)throw new a.A("image-server-raster:open","cannot initialize image service");(0,Ie.E9)(r,s);const n="Map"===this.tileType?function(e,t){if(!e)return null;const{minScale:i,maxScale:s,minLOD:r,maxLOD:n}=t;if(null!=r&&null!=n)return ve.A.fromJSON({...e,lods:e.lods.filter((({level:e})=>null!=e&&e>=r&&e<=n))});if(0!==i&&0!==s){const t=e=>Math.round(1e4*e)/1e4,r=i?t(i):1/0,n=s?t(s):-1/0;return ve.A.fromJSON({...e,lods:e.lods.filter((e=>{const i=t(e.scale);return i<=r&&i>=n}))})}return ve.A.fromJSON(e)}(s.tileInfo,s):ve.A.fromJSON(s.tileInfo);(0,me.Lw)(n);const[o,l]=this._computeMinMaxLOD(r,n),{extent:c,pixelSize:u}=r,f=.5/r.width*u.x,h=Math.max(u.x,u.y),{lods:p}=n;("Map"!==this.tileType&&0!==s.maxScale||Math.abs(u.x-u.y)>f||!p.some((e=>Math.abs(e.resolution-h)<f)))&&(u.x=u.y=o.resolution,r.width=Math.ceil((c.xmax-c.xmin)/u.x-.1),r.height=Math.ceil((c.ymax-c.ymin)/u.y-.1));const d=o.level-l.level,[m,y]=n.size,g=[],w=[];p.forEach(((e,t)=>{e.level>=l.level&&e.level<=o.level&&g.push({x:e.resolution,y:e.resolution}),t<p.length-1&&w.push(Math.round(10*e.resolution/p[t+1].resolution)/10)})),g.sort(((e,t)=>e.x-t.x));const v=this.computeBlockBoundary(c,m,y,n.origin,g,d),x=g.length>1?g.slice(1):null;let b;s.transposeInfo&&(b={tileSize:[s.transposeInfo.rows,s.transposeInfo.cols],packetSize:r.keyProperties?._yxs.PacketSize??0});const I=w.length<=1||w.length>=3&&w.slice(0,-1).every((e=>e===w[0]))?w[0]??2:Math.round(10/(l.resolution/o.resolution)**(-1/d))/10;if(r.storageInfo=new we.A({blockWidth:n.size[0],blockHeight:n.size[1],pyramidBlockWidth:n.size[0],pyramidBlockHeight:n.size[1],pyramidResolutions:x,pyramidScalingFactor:I,compression:n.format,origin:n.origin,firstPyramidLevel:1,maximumPyramidLevel:d,tileInfo:n,isBsqTile:!!s.bsq,transposeInfo:b,blockBoundary:v}),function(e){const{extent:t,spatialReference:i}=e;t.xmin>-1&&t.xmax>181&&i?.wkid&&i.isGeographic&&(e.nativeExtent=e.extent,e.transform=new be.A,e.extent=e.transform.forwardTransform(t))}(r),this._set("rasterInfo",r),s.capabilities.toLowerCase().includes("tilemap")){const e={tileInfo:r.storageInfo.tileInfo,parsedUrl:(0,ye.An)(this.url),url:this.url,tileServers:[]};this._tilemapCache=new xe.d({layer:e})}}async _fetchRasterInfo(e){const t=this.sourceJSON;if("Map"===this.tileType){const e=t.fullExtent||t.extent,i=Math.ceil((e.xmax-e.xmin)/t.pixelSizeX-.1),s=Math.ceil((e.ymax-e.ymin)/t.pixelSizeY-.1),r=E.A.fromJSON(t.spatialReference||e.spatialReference),n=new ge.A({x:t.pixelSizeX,y:t.pixelSizeY,spatialReference:r});return new W.A({width:i,height:s,bandCount:3,extent:N.A.fromJSON(e),spatialReference:r,pixelSize:n,pixelType:"u8",statistics:null,keyProperties:{DataType:"processed"}})}const{signal:i}=e,s=(0,Ie.Tw)(this.url,this.sourceJSON,{signal:i,query:this.ioConfig.customFetchParameters}),r=t.hasMultidimensions?this.request(`${this.url}/slices`,{query:{f:"json"},signal:i}).then((e=>e.data?.slices)).catch((()=>null)):null,n=await Promise.all([s,r]);return this._slices=n[1],n[0]}_fixScaleInServiceInfo(){const{sourceJSON:e}=this;e.minScale&&e.minScale<0&&(e.minScale=0),e.maxScale&&e.maxScale<0&&(e.maxScale=0)}_computeMinMaxLOD(e,t){const{pixelSize:i}=e,s=.5/e.width*i.x,{lods:r}=t,n=t.lodAt(Math.max.apply(null,r.map((e=>e.level)))),a=t.lodAt(Math.min.apply(null,r.map((e=>e.level)))),{tileType:o}=this;if("Map"===o)return this._levelOffset=r[0].level,[n,a];if("Raster"===o)return[r.find((e=>e.resolution===i.x))??n,a];const{minScale:l,maxScale:c}=this.sourceJSON;let u=n;c>0&&(u=r.find((e=>Math.abs(e.scale-c)<s)),u||(u=r.filter((e=>e.scale>c)).sort(((e,t)=>e.scale>t.scale?1:-1))[0]??n));let f=a;return l>0&&(f=r.find((e=>Math.abs(e.scale-l)<s))??a,this._levelOffset=f.level-a.level),[u,f]}};(0,s._)([(0,f.MZ)({type:String,json:{write:!0}})],_e.prototype,"datasetFormat",void 0),(0,s._)([(0,f.MZ)()],_e.prototype,"tileType",void 0),_e=(0,s._)([(0,d.$)("esri.layers.support.rasterDatasets.ImageServerRaster")],_e);const Se=_e;var Ae=i(47124);const Te=new Map;Te.set("Int8","s8"),Te.set("UInt8","u8"),Te.set("Int16","s16"),Te.set("UInt16","u16"),Te.set("Int32","s32"),Te.set("UInt32","u32"),Te.set("Float32","f32"),Te.set("Float64","f32"),Te.set("Double64","f32");const Re=new Map;Re.set("none",{blobExtension:".til",isOneSegment:!0,decoderFormat:"bip"}),Re.set("lerc",{blobExtension:".lrc",isOneSegment:!1,decoderFormat:"lerc"}),Re.set("deflate",{blobExtension:".pzp",isOneSegment:!0,decoderFormat:"deflate"}),Re.set("jpeg",{blobExtension:".pjg",isOneSegment:!0,decoderFormat:"jpg"});let Ce=class extends k.A{constructor(){super(...arguments),this._files=null,this._storageIndex=null,this.datasetFormat="MRF"}async fetchRawTile(e,t,i,s={}){const{blockWidth:r,blockHeight:n,blockBoundary:a}=this.rasterInfo.storageInfo,o=a[e];if(!o||o.maxRow<t||o.maxCol<i||o.minRow>t||o.minCol>i)return null;const{bandCount:l,pixelType:c}=this.rasterInfo,{ranges:u,actualTileWidth:f,actualTileHeight:h}=this._getTileLocation(e,t,i);if(!u||0===u.length)return null;if(0===u[0].from&&0===u[0].to){const e=new Uint8Array(r*n);return new B.A({width:r,height:n,pixels:void 0,mask:e,validPixelCount:0})}const{bandIds:p}=this.ioConfig,d=this._getBandSegmentCount(),m=[];let y=0;for(y=0;y<d;y++)p&&!p.includes(y)||m.push(this.request(this._files.data,{range:{from:u[y].from,to:u[y].to},responseType:"array-buffer",signal:s.signal}));const g=await Promise.all(m),w=g.map((e=>e.data.byteLength)).reduce(((e,t)=>e+t)),v=new Uint8Array(w),x=[];let b=0;for(y=0;y<d;y++)x.push(b),v.set(new Uint8Array(g[y].data),b),b+=g[y].data.byteLength;const I=Re.get(this.rasterInfo.storageInfo.compression).decoderFormat,_=await this.decodePixelBlock(v.buffer,{width:r,height:n,format:I,planes:p?.length||l,offsets:x,pixelType:c});if(null==_)return null;let{noDataValue:S}=this.rasterInfo;if(null!=S&&"lerc"!==I&&!_.mask&&(S=S[0],null!=S)){const e=_.width*_.height,t=new Uint8Array(e);if(Math.abs(S)>1e24)for(y=0;y<e;y++)Math.abs((_.pixels[0][y]-S)/S)>1e-6&&(t[y]=1);else for(y=0;y<e;y++)_.pixels[0][y]!==S&&(t[y]=1);_.mask=t}let A=0,T=0;if(f!==r||h!==n){let e=_.mask;if(e)for(y=0;y<n;y++)if(T=y*r,y<h)for(A=f;A<r;A++)e[T+A]=0;else for(A=0;A<r;A++)e[T+A]=0;else for(e=new Uint8Array(r*n),_.mask=e,y=0;y<h;y++)for(T=y*r,A=0;A<f;A++)e[T+A]=1}return _}async _open(e){this.datasetName=this.url.slice(this.url.lastIndexOf("/")+1);const t=e?e.signal:null,i=await this.request(this.url,{responseType:"xml",signal:t}),{rasterInfo:s,files:r}=this._parseHeader(i.data),{skipMapInfo:n,skipExtensions:a=[]}=this.ioConfig;if(!a.includes("aux.xml")&&!n){const t=await this._fetchAuxiliaryData(e);null!=t&&(s.statistics=t.statistics??s.statistics,s.histograms=t.histograms,t.histograms&&null==s.statistics&&(s.statistics=(0,K.Pg)(t.histograms)))}n&&this.updateImageSpaceRasterInfo(s),this._set("rasterInfo",s),this._files=r;const o=await this.request(r.index,{responseType:"array-buffer",signal:t});this._storageIndex=function(e){if(e.byteLength%16>0)throw new Error("invalid array buffer must be multiples of 16");let t,i,s,r,n,a;if(Ae.Z){for(i=new Uint8Array(e),r=new ArrayBuffer(e.byteLength),s=new Uint8Array(r),n=0;n<e.byteLength/4;n++)for(a=0;a<4;a++)s[4*n+a]=i[4*n+3-a];t=new Uint32Array(r)}else t=new Uint32Array(e);return t}(o.data);const{blockWidth:l,blockHeight:c}=this.rasterInfo.storageInfo,u=this.rasterInfo.storageInfo.pyramidScalingFactor,{width:f,height:h}=this.rasterInfo,p=[],d=this._getBandSegmentCount();let m=0,y=-1;for(;m<this._storageIndex.length;){y++;const e=Math.ceil(f/l/u**y)-1,t=Math.ceil(h/c/u**y)-1;m+=(e+1)*(t+1)*d*4,p.push({maxRow:t,maxCol:e,minCol:0,minRow:0})}this.rasterInfo.storageInfo.blockBoundary=p,y>0&&(this.rasterInfo.storageInfo.firstPyramidLevel=1,this.rasterInfo.storageInfo.maximumPyramidLevel=y),this.updateTileInfo()}_getBandSegmentCount(){return Re.get(this.rasterInfo.storageInfo.compression).isOneSegment?1:this.rasterInfo.bandCount}_getTileLocation(e,t,i){const{blockWidth:s,blockHeight:r,pyramidScalingFactor:n}=this.rasterInfo.storageInfo,{width:a,height:o}=this.rasterInfo,l=this._getBandSegmentCount();let c,u,f,h=0,p=0;for(f=0;f<e;f++)p=n**f,c=Math.ceil(a/s/p),u=Math.ceil(o/r/p),h+=c*u;p=n**e,c=Math.ceil(a/s/p),u=Math.ceil(o/r/p),h+=t*c+i,h*=4*l;const d=this._storageIndex.subarray(h,h+4*l);let m=0,y=0;const g=[];for(let e=0;e<l;e++)m=d[4*e]*2**32+d[4*e+1],y=m+d[4*e+2]*2**32+d[4*e+3],g.push({from:m,to:y});return{ranges:g,actualTileWidth:i<c-1?s:Math.ceil(a/p)-s*(c-1),actualTileHeight:t<u-1?r:Math.ceil(o/p)-r*(u-1)}}_parseHeader(e){const t=(0,ae.V6)(e,"MRF_META/Raster");if(!t)throw new a.A("mrf:open","not a valid MRF format");const i=(0,ae.V6)(t,"Size"),s=parseInt(i.getAttribute("x"),10),r=parseInt(i.getAttribute("y"),10),n=parseInt(i.getAttribute("c"),10),o=((0,ae.mX)(t,"Compression")||"none").toLowerCase();if(!Re.has(o))throw new a.A("mrf:open","currently does not support compression "+o);const l=(0,ae.mX)(t,"DataType")||"UInt8",c=Te.get(l);if(null==c)throw new a.A("mrf:open","currently does not support pixel type "+l);const u=(0,ae.V6)(t,"PageSize"),f=parseInt(u.getAttribute("x"),10),h=parseInt(u.getAttribute("y"),10),p=(0,ae.V6)(t,"DataValues");let d,m;if(p&&(m=p.getAttribute("NoData"),null!=m&&(d=m.trim().split(" ").map((e=>parseFloat(e))))),(0,ae.V6)(e,"MRF_META/CachedSource"))throw new a.A("mrf:open","currently does not support MRF referencing other data files");const y=(0,ae.V6)(e,"MRF_META/GeoTags"),g=(0,ae.V6)(y,"BoundingBox");let w,v=!1;if(null!=g){const e=parseFloat(g.getAttribute("minx")),t=parseFloat(g.getAttribute("miny")),i=parseFloat(g.getAttribute("maxx")),s=parseFloat(g.getAttribute("maxy")),r=(0,ae.mX)(y,"Projection")||"";let n=E.A.WGS84;if("LOCAL_CS[]"!==r)if(r.toLowerCase().startsWith("epsg:")){const e=Number(r.slice(5));isNaN(e)||0===e||(n=new E.A({wkid:e}))}else n=ce(r)??E.A.WGS84;else v=!0,n=new E.A({wkid:3857});w=new N.A(e,t,i,s),w.spatialReference=n}else v=!0,w=new N.A({xmin:-.5,ymin:.5-r,xmax:s-.5,ymax:.5,spatialReference:new E.A({wkid:3857})});const x=(0,ae.V6)(e,"MRF_META/Rsets"),b=parseInt(x?.getAttribute("scale")||"2",10),I=w.spatialReference,_=new we.A({origin:new ge.A({x:w.xmin,y:w.ymax,spatialReference:I}),blockWidth:f,blockHeight:h,pyramidBlockWidth:f,pyramidBlockHeight:h,compression:o,pyramidScalingFactor:b}),S=new ge.A({x:w.width/s,y:w.height/r,spatialReference:I}),A=new W.A({width:s,height:r,extent:w,isPseudoSpatialReference:v,spatialReference:I,bandCount:n,pixelType:c,pixelSize:S,noDataValue:d,storageInfo:_}),T=(0,ae.mX)(e,"datafile"),R=(0,ae.mX)(e,"IndexFile");return{rasterInfo:A,files:{mrf:this.url,index:R||this.url.replace(".mrf",".idx"),data:T||this.url.replace(".mrf",Re.get(o).blobExtension)}}}async _fetchAuxiliaryData(e){try{const{data:t}=await this.request(this.url+".aux.xml",{responseType:"xml",signal:e?.signal});return fe(t)}catch{return null}}};(0,s._)([(0,f.MZ)()],Ce.prototype,"_files",void 0),(0,s._)([(0,f.MZ)()],Ce.prototype,"_storageIndex",void 0),(0,s._)([(0,f.MZ)({type:String,json:{write:!0}})],Ce.prototype,"datasetFormat",void 0),Ce=(0,s._)([(0,d.$)("esri.layers.support.rasterDatasets.MRFRaster")],Ce);const Me=Ce;var Oe=i(15265);function Fe(e){const t=e.fields,i=e.records,s=t.some((e=>"oid"===e.name.toLowerCase()))?"OBJECTID":"OID",r=[{name:s,type:"esriFieldTypeOID",alias:"OID"}].concat(t.map((e=>({name:e.name,type:"esriFieldType"+e.typeName,alias:e.name})))),n=r.map((e=>e.name)),a=[];let o=0,l=0;return i.forEach((e=>{const t={};for(t[s]=o++,l=1;l<n.length;l++)t[n[l]]=e[l-1];a.push({attributes:t})})),{displayFieldName:"",fields:r,features:a}}class Pe{static get supportedVersions(){return[5]}static parse(e){const t=new DataView(e),i=3&t.getUint8(0);if(3!==i)return{header:{version:i},recordSet:null};const s=t.getUint32(4,!0),r=t.getUint16(8,!0),n=t.getUint16(10,!0),a={version:i,recordCount:s,headerByteCount:r,recordByteCount:n};let o=32;const l=[],c=[];let u;if(3===i){for(;13!==t.getUint8(o);)u=String.fromCharCode(t.getUint8(o+11)).trim(),l.push({name:(0,Oe.w)(new Uint8Array(e,o,11)),type:u,typeName:["String","Date","Double","Boolean","String","Integer"][["C","D","F","L","M","N"].indexOf(u)],length:t.getUint8(o+16)}),o+=32;if(o+=1,l.length>0)for(;c.length<s&&e.byteLength-o>n;){const i=[];32===t.getUint8(o)?(o+=1,l.forEach((t=>{if("C"===t.type)i.push((0,Oe.w)(new Uint8Array(e,o,t.length)).trim());else if("N"===t.type)i.push(parseInt(String.fromCharCode.apply(null,new Uint8Array(e,o,t.length)).trim(),10));else if("F"===t.type)i.push(parseFloat(String.fromCharCode.apply(null,new Uint8Array(e,o,t.length)).trim()));else if("D"===t.type){const s=String.fromCharCode.apply(null,new Uint8Array(e,o,t.length)).trim();i.push(new Date(parseInt(s.slice(0,4),10),parseInt(s.slice(4,6),10)-1,parseInt(s.slice(6,8),10)))}o+=t.length})),c.push(i)):o+=n}}return{header:a,fields:l,records:c,recordSet:Fe({fields:l,records:c})}}}var ke=i(45664),De=i(12196);const Ne=(e,t)=>e.get(t)?.values,Ee=(e,t)=>e.get(t)?.values?.[0];let Le=class extends k.A{constructor(){super(...arguments),this._files=null,this._headerInfo=null,this._bufferSize=1048576,this._chunkSize=10485760,this.datasetFormat="TIFF"}async fetchRawTile(e,t,i,s={}){if(!this._headerInfo?.isSupported||this.isBlockOutside(e,t,i))return null;const r=await this._fetchRawTiffTile(e,t,i,!1,s);if(null!=r&&this._headerInfo.hasMaskBand){const n=await this._fetchRawTiffTile(e,t,i,!0,s);null!=n&&n.pixels[0]instanceof Uint8Array&&(r.mask=n.pixels[0])}return r}async _open(e){const t=e?e.signal:null,{data:i}=await this.request(this.url,{range:{from:0,to:this._bufferSize},responseType:"array-buffer",signal:t});if(!i)throw new a.A("tiffraster:open","failed to open url "+this.url);this.datasetName=this.url.slice(this.url.lastIndexOf("/")+1,this.url.lastIndexOf("."));const{littleEndian:s,firstIFDPos:r,isBigTiff:n}=(0,ke.uT)(i),l=[],c={fileChunk:i,posIFD:r,fileOffset:0};await this._readIFDs(l,c,s,n?8:4,t);const{imageInfo:u,rasterInfo:f}=function(e){const t=(0,ke.uc)(e),{width:i,height:s,tileWidth:r,tileHeight:n,planes:a,pixelType:o,compression:l,firstPyramidLevel:c,maximumPyramidLevel:u,pyramidBlockWidth:f,pyramidBlockHeight:h,pyramidResolutions:p,tileBoundary:d,affine:m,metadata:y}=t;let g=ce(t.extent.spatialReference?.wkt||t.extent.spatialReference?.wkid),w=!!t.isPseudoGeographic;null==g&&(w=!0,g=new E.A({wkid:3857}));const v=new N.A({...t.extent,spatialReference:g}),x=new ge.A(v?{x:v.xmin,y:v.ymax,spatialReference:g}:{x:0,y:0}),b=new we.A({blockWidth:r,blockHeight:n,pyramidBlockWidth:f,pyramidBlockHeight:h,compression:l,origin:x,firstPyramidLevel:c,maximumPyramidLevel:u,pyramidResolutions:p,blockBoundary:d}),I=new ge.A({x:(v.xmax-v.xmin)/i,y:(v.ymax-v.ymin)/s,spatialReference:g}),_=y?{BandProperties:y.bandProperties,DataType:y.dataType}:{};let S=null;const A=Ee(e[0],"PHOTOMETRICINTERPRETATION"),T=Ne(e[0],"COLORMAP");if(A<=3&&T?.length>3&&T.length%3==0){S=[];const e=T.length/3;for(let t=0;t<e;t++)S.push([t,T[t]>>>8,T[t+e]>>>8,T[t+2*e]>>>8])}const R=new W.A({width:i,height:s,bandCount:a,pixelType:o,pixelSize:I,storageInfo:b,spatialReference:g,isPseudoSpatialReference:w,keyProperties:_,extent:v,colormap:S,statistics:y?y.statistics:null});if(m?.length&&(R.nativeExtent=new N.A({xmin:-.5,ymin:.5-s,xmax:i-.5,ymax:.5,spatialReference:g}),R.transform=new oe.A({polynomialOrder:1,forwardCoefficients:[m[2]+m[0]/2,m[5]-m[3]/2,m[0],m[3],-m[1],-m[4]]}),R.extent=R.transform.forwardTransform(R.nativeExtent),R.pixelSize=new ge.A({x:(v.xmax-v.xmin)/i,y:(v.ymax-v.ymin)/s,spatialReference:g}),b.origin.x=-.5,b.origin.y=.5),p){const{x:e,y:t}=R.pixelSize;p.forEach((i=>{i.x*=e,i.y*=t}))}return{imageInfo:t,rasterInfo:R}}(l),h=(0,ke.zS)(l),p=(0,ke.r9)(l);if(this._headerInfo={littleEndian:s,isBigTiff:n,ifds:l,pyramidIFDs:h,maskIFDs:p,...u},this._set("rasterInfo",f),!u.isSupported)throw new a.A("tiffraster:open","this tiff is not supported: "+u.message);if(!u.tileWidth)throw new a.A("tiffraster:open","none-tiled tiff is not optimized for access, convert to COG and retry.");f.isPseudoSpatialReference&&o.A.getLogger(this).warn("The spatial reference for this tiff is unsupported. Only EPSG spatial reference codes and Esri WKTs are supported.");const d=l[0].get("PREDICTOR")?.values?.[0],m=l[0].get("SAMPLEFORMAT")?.values?.[0];if(3===m&&2===d)throw new a.A("tiffraster:open","unsupported horizontal difference encoding. Predictor=3 is supported for floating point data");const{skipMapInfo:y,skipExtensions:g=[]}=this.ioConfig;if(!g.includes("aux.xml")&&!y){const t=await this._fetchAuxiliaryMetaData(e);null!=t&&function(e,t){if(t.statistics=e.statistics??t.statistics,t.histograms=e.histograms,e.histograms&&null==t.statistics&&(t.statistics=(0,K.Pg)(e.histograms)),e.transform&&null==t.transform){t.transform=e.transform,t.nativeExtent=t.extent;const i=t.transform.forwardTransform(t.nativeExtent);t.pixelSize=new ge.A({x:(i.xmax-i.xmin)/t.width,y:(i.ymax-i.ymin)/t.height,spatialReference:t.spatialReference}),t.extent=i}t.isPseudoSpatialReference&&e.spatialReference&&(t.spatialReference=e.spatialReference,t.extent.spatialReference=t.nativeExtent.spatialReference=t.storageInfo.origin.spatialReference=t.spatialReference)}(t,f)}g.includes("vat.dbf")||1!==f.bandCount||"u8"!==f.pixelType||y||(f.attributeTable=await this._fetchAuxiliaryTable(e),null!=f.attributeTable&&(f.keyProperties.DataType="thematic")),y&&this.updateImageSpaceRasterInfo(f),this.updateTileInfo()}async _validateOrFetchHeaderBuffer(e,t){let{fileChunk:i,fileOffset:s,posIFD:r}=e;return(r+8>=i.byteLength||r<0)&&(s=r+s,i=(await this.request(this.url,{range:{from:s,to:s+this._bufferSize},responseType:"array-buffer",signal:t})).data,r=0),{fileChunk:i,fileOffset:s,posIFD:r}}async _readIFDs(e,t,i,s=4,r){if(!t.posIFD)return null;t=await this._validateOrFetchHeaderBuffer(t,r);const n=await this._readIFD(t,i,De.NB,s,r);if(!n?.ifd)throw new a.A("tiffraster:open","cannot parse tiff header. failed to open url "+this.url);if(e.push(n.ifd),!n.nextIFD)return null;t.posIFD=n.nextIFD-t.fileOffset,await this._readIFDs(e,t,i,s,r)}async _readIFD(e,t,i=De.NB,s=4,r){let{fileChunk:n,posIFD:a,fileOffset:o}=e;if(!e.fileChunk)return null;const l=(0,ke.JM)(n,t,a,o,i,s);if(l.success){const e=[];if(l.ifd?.forEach((t=>{t.values||e.push(t)})),e.length>0&&await this._fillOffsets(e,t,l.nextIFD,r),l.ifd?.has("GEOKEYDIRECTORY")){const e=l.ifd.get("GEOKEYDIRECTORY"),i=e?.values;if(i&&i.length>4){const s=i[0]+"."+i[1]+"."+i[2];a=e.valueOffset+6-o;const l=await this._validateOrFetchHeaderBuffer({fileChunk:n,posIFD:a,fileOffset:o},r),c=await this._readIFD(l,t,De.YC,2,r);e.data=c?.ifd,e.data&&e.data.set("GEOTIFFVersion",{id:0,type:2,valueCount:1,valueOffset:null,values:[s]})}}return l}return l.requiredBufferSize?(n=(await this.request(this.url,{range:{from:o,to:o+a+l.requiredBufferSize+8},responseType:"array-buffer",signal:r})).data,n.byteLength<a+l.requiredBufferSize?null:(e.fileChunk=n,e.fileOffset=o,this._readIFD(e,t,i,s,r))):null}async _fillOffsets(e,t,i,s){const r=e.filter((e=>null!=e.offlineOffsetSize));if(0===r.length)return;const n=r.map((e=>e.offlineOffsetSize)),a=Math.min.apply(null,n.map((e=>e[0]))),o=Math.max.apply(null,n.map((e=>e[0]+e[1])));let l=1===n.length||o-a<=this._bufferSize;if(!l&&n.length>1&&(n.sort(((e,t)=>e[0]-t[0])),l=n.reduce(((e,t)=>e===t[0]?t[0]+t[1]:0),n[0][0])===o),l){const e=await this._fetchOffsets(a,Math.max(o,a+this._bufferSize),s);return void r.forEach((i=>(0,ke.Cr)(e,t,i,a)))}const c=r.map((async e=>{const i=e.offlineOffsetSize,r=await this._fetchOffsets(i[0],i[1]+i[0],s);(0,ke.Cr)(r,t,e,i[0])}));await Promise.all(c)}async _fetchOffsets(e,t,i){const s=[],r=this._chunkSize,n=Math.ceil((t-e)/r);let a=e;for(let e=0;e<n;e++)s.push(this.request(this.url,{range:{from:a,to:e===n-1?t:a+r-1},responseType:"array-buffer",signal:i})),a+=r;const o=await Promise.all(s);if(1===n)return o[0].data;const l=new Uint8Array(t-e+1);for(let e=0;e<n;e++)l.set(new Uint8Array(o[e].data),e*r);return l.buffer}async _fetchRawTiffTile(e,t,i,s,r={}){const n=this._getTileLocation(e,t,i,s);if(!n)return null;const{ranges:a,actualTileWidth:o,actualTileHeight:l,ifd:c}=n,u=a.map((e=>this.request(this.url,{range:e,responseType:"array-buffer",signal:r.signal}))),f=await Promise.all(u),h=f.map((e=>e.data.byteLength)).reduce(((e,t)=>e+t)),p=1===f.length?f[0].data:new ArrayBuffer(h),d=[0],m=[0];if(f.length>1){const e=new Uint8Array(p);for(let t=0,i=0;t<f.length;t++){const s=f[t].data;e.set(new Uint8Array(s),i),d[t]=i,i+=s.byteLength,m[t]=s.byteLength}}const{blockWidth:y,blockHeight:g}=this.getBlockWidthHeight(e),w=await this.decodePixelBlock(p,{format:"tiff",customOptions:{headerInfo:this._headerInfo,ifd:c,offsets:d,sizes:m},width:y,height:g,planes:null,pixelType:null});if(null==w)return null;let v,x,b;if(o!==y||l!==g){let e=w.mask;if(e)for(v=0;v<g;v++)if(b=v*y,v<l)for(x=o;x<y;x++)e[b+x]=0;else for(x=0;x<y;x++)e[b+x]=0;else for(e=new Uint8Array(y*g),w.mask=e,v=0;v<l;v++)for(b=v*y,x=0;x<o;x++)e[b+x]=1}return w}_getTileLocation(e,t,i,s=!1){const{firstPyramidLevel:r,blockBoundary:n}=this.rasterInfo.storageInfo,a=0===e?0:e-(r-1),{_headerInfo:o}=this;if(!o)return null;const l=s?o.maskIFDs[a]:0===a?o?.ifds[0]:o?.pyramidIFDs[a-1];if(!l)return null;const c=(0,ke.XO)(l,o),u=Ne(l,"TILEOFFSETS");if(void 0===u)return null;const f=Ne(l,"TILEBYTECOUNTS"),{minRow:h,minCol:p,maxRow:d,maxCol:m}=n[a];if(t>d||i>m||t<h||i<p)return null;const y=Ee(l,"IMAGEWIDTH"),g=Ee(l,"IMAGELENGTH"),w=Ee(l,"TILEWIDTH"),v=Ee(l,"TILELENGTH"),x=[];if(c){const{bandCount:e}=this.rasterInfo;for(let s=0;s<e;s++){const e=s*(d+1)*(m+1)+t*(m+1)+i;x[s]={from:u[e],to:u[e]+f[e]-1}}}else{const e=t*(m+1)+i;x.push({from:u[e],to:u[e]+f[e]-1})}for(let e=0;e<x.length;e++)if(null==x[e].from||!x[e].to||x[e].to<0)return null;return{ranges:x,ifd:l,actualTileWidth:i===m&&y%w||w,actualTileHeight:t===d&&g%v||v}}async _fetchAuxiliaryMetaData(e){try{const{data:t}=await this.request(this.url+".aux.xml",{responseType:"xml",signal:e?.signal});return fe(t)}catch{return null}}async _fetchAuxiliaryTable(e){try{const{data:t}=await this.request(this.url+".vat.dbf",{responseType:"array-buffer",signal:e?.signal}),i=Pe.parse(t);return i?.recordSet?te.A.fromJSON(i.recordSet):null}catch{return null}}};(0,s._)([(0,f.MZ)()],Le.prototype,"_files",void 0),(0,s._)([(0,f.MZ)()],Le.prototype,"_headerInfo",void 0),(0,s._)([(0,f.MZ)()],Le.prototype,"_bufferSize",void 0),(0,s._)([(0,f.MZ)()],Le.prototype,"_chunkSize",void 0),(0,s._)([(0,f.MZ)({type:String,json:{write:!0}})],Le.prototype,"datasetFormat",void 0),Le=(0,s._)([(0,d.$)("esri.layers.support.rasterDatasets.TIFFRaster")],Le);const Be=Le,ze=new Map;ze.set("MRF",{desc:"Meta Raster Format",constructor:Me}),ze.set("TIFF",{desc:"GeoTIFF",constructor:Be}),ze.set("RasterTileServer",{desc:"Raster Tile Server",constructor:Se}),ze.set("JPG",{desc:"JPG Raster Format",constructor:de}),ze.set("PNG",{desc:"PNG Raster Format",constructor:de}),ze.set("GIF",{desc:"GIF Raster Format",constructor:de}),ze.set("BMP",{desc:"BMP Raster Format",constructor:de}),ze.set("CovJSON",{desc:"COVJSON Raster Format",constructor:se}),ze.set("MEMORY",{desc:"In Memory Raster Format",constructor:ee});class Je{static get supportedFormats(){const e=new Set;return ze.forEach(((t,i)=>e.add(i))),e}static async open(e){const{url:t,ioConfig:i,source:s,sourceJSON:r}=e;let n=e.datasetFormat??i?.datasetFormat;null==n&&(t.includes(".")?n=t.slice(t.lastIndexOf(".")+1).toUpperCase():"coverage"===s?.type?.toLowerCase()?n="CovJSON":s?.extent&&s.pixelblocks&&(n="MEMORY")),"OVR"===n||"TIF"===n?n="TIFF":"JPG"===n||"JPEG"===n||"JFIF"===n?n="JPG":"COVJSON"===n&&(n="CovJSON"),t.toLowerCase().includes("/imageserver")&&!t.toLowerCase().includes("/wcsserver")&&(n="RasterTileServer");const o={url:t,source:s,sourceJSON:r,datasetFormat:n,ioConfig:i??{bandIds:null,sampling:null}};if(Object.keys(o).forEach((e=>{null==o[e]&&delete o[e]})),n){if(!this.supportedFormats.has(n))throw new a.A("rasterfactory:open","not a supported format "+n);if("CRF"===n)throw new a.A("rasterfactory:open",`cannot open raster: ${t}`);const i=new(0,ze.get(n).constructor)(o);return await i.open({signal:e.signal}),i}const l=Array.from(ze.keys()).filter((e=>"CovJSON"!==e&&"Memory"!==e));let c=0;const u=()=>{if(n=l[c++],!n)return null;if("CRF"===n)return null;const t=new(0,ze.get(n).constructor)(o);return t.open({signal:e.signal}).then((()=>t)).catch((()=>u()))};return u()}static register(e,t,i){ze.has(e.toUpperCase())||ze.set(e.toUpperCase(),{desc:t,constructor:i})}}var $e=i(6049),Ue=i(24212),Ve=i(30291),je=i(88625),Ze=i(92935);let qe=class extends((0,g.dM)((0,A.j)((0,x.q)((0,b.A)((0,_.H)((0,w.d)((0,v.o)((0,I.G)((0,T.e)((0,y.b)((0,S.J)((0,l.P)(n.A.ClonableMixin(m.A)))))))))))))){constructor(...e){super(...e),this._primaryRasters=[],this.legendEnabled=!0,this.isReference=null,this.listMode="show",this.sourceJSON=null,this.version=null,this.type="imagery-tile",this.operationalLayerType="ArcGISTiledImageServiceLayer",this.popupEnabled=!0,this.popupTemplate=null,this.fields=null,this.source=void 0,this._debouncedSaveOperations=(0,c.sg)((async(e,t,s)=>{const{save:r,saveAs:n}=await i.e(9838).then(i.bind(i,59838));switch(e){case Ze.X.SAVE:return r(this,t);case Ze.X.SAVE_AS:return n(this,s,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:["Image Service"]},e).catch(c.QP).then((()=>this._openRaster(t)))),Promise.resolve(this)}set elevationInfo(e){this._set("elevationInfo",e),this._validateElevationInfo()}get defaultPopupTemplate(){return this.createPopupTemplate()}get rasterFields(){const e=[(0,M.rZ)("Pixel Value"),(0,M.dy)("Raw Pixel Value")],t=this.raster?.rasterInfo??this.serviceRasterInfo,i=t?.attributeTable;if(i){const t=(0,M.jC)(i);e.push(...t)}const s=t?.dataType,r=t?.multidimensionalInfo;if(("vector-magdir"===s||"vector-uv"===s)&&null!=r){const t=r.variables[0].unit?.trim(),i=(0,M.DV)(t),s=(0,M.y6)();e.push(i,s)}if(r){const t=(0,M.AL)(r);e.push(...t)}return e}createPopupTemplate(e){const{rasterFields:t}=this,i=e?.visibleFieldNames??new Set(t.map((({name:e})=>e)).filter((e=>e!==M.F_.rawServicePixelValue))),s=(0,Ve.tn)({fields:t,title:this.title},{...e,visibleFieldNames:i}),{rasterInfo:r}=this.raster;return s?.fieldInfos&&r&&(0,M.h4)(s.fieldInfos,r),s}async generateRasterInfo(e,t){if(e=(0,h.PZ)(O.A,e),await this.load(),!e||"none"===e.functionName?.toLowerCase())return this.serviceRasterInfo;try{const{rasterInfo:i}=await this._openFunctionRaster(e,t);return i}catch(e){if(e instanceof a.A)throw e;throw new a.A("imagery-tile-layer","the given raster function is not supported")}}async save(e){return this._debouncedSaveOperations(Ze.X.SAVE,e)}async saveAs(e,t){return this._debouncedSaveOperations(Ze.X.SAVE_AS,t,e)}write(e,t){const i=this._primaryRasters[0]??this.raster;if(this.loaded?"RasterTileServer"===i.datasetFormat&&("Raster"===i.tileType||"Map"===i.tileType):this.url&&/\/ImageServer(\/|\/?$)/i.test(this.url))return super.write(e,t);if(t?.messages){const e=`${t.origin}/${t.layerContainerType||"operational-layers"}`;t.messages.push(new a.A("layer:unsupported",`Layers (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this}))}return null}async _openRaster(e){let t=!1;if(this.raster)await this._openFromRaster(this.raster,e),t=(0,F.q)(this.raster),!t&&this.rasterFunction&&(this._primaryRasters=[this.raster],await this._initializeWithFunctionRaster(this.rasterFunction));else{const{url:t,rasterFunction:i,source:s}=this;if(!t&&!s)throw new a.A("imagery-tile-layer:open","missing url or source parameter");s?await this._openFromSource(s,e):i?await this._openFromUrlWithRasterFunction(t,i,e):await this._openFromUrl(t,e)}const i=this.raster.rasterInfo;if(!i)throw new a.A("imagery-tile-layer:load","cannot load resources on "+this.url);if(this._set("serviceRasterInfo",t?i:this._primaryRasters[0].rasterInfo),this._set("spatialReference",i.spatialReference),this.sourceJSON=this.sourceJSON||this.raster.sourceJSON,null!=this.sourceJSON){const e="Map"===this.raster.tileType&&null!=this.sourceJSON.minLOD&&null!=this.sourceJSON.maxLOD?this.sourceJSON:{...this.sourceJSON,minScale:0,maxScale:0};this.read(e,{origin:"service"})}else this.read({tileInfo:this.serviceRasterInfo?.storageInfo.tileInfo.toJSON()},{origin:"service"});this.title||(this.title=this.raster.datasetName),"Map"===this.raster.tileType&&(this.popupEnabled=!1),this._configDefaultSettings(),this.addHandles((0,u.wB)((()=>this.customParameters),(e=>{this.raster&&(this.raster.ioConfig.customFetchParameters=e)})))}async _openFromRaster(e,t){e.rasterInfo||await e.open({signal:t}),this._primaryRasters=(0,F.p)(e),this.url||(this.url=this._primaryRasters[0].url)}async _openFromUrlWithRasterFunction(e,t,i){const s=[e];t&&(0,$e.UD)(t.toJSON(),s);const r=await Promise.all(s.map((e=>Je.open({url:e,sourceJSON:this.sourceJSON,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},signal:i})))),n=r.findIndex((e=>null==e));if(n>-1)throw new a.A("imagery-tile-layer:open",`cannot open raster: ${s[n]}`);return this._primaryRasters=r,this._initializeWithFunctionRaster(t)}async _openFromUrl(e,t){const i=await Je.open({url:e,sourceJSON:this.sourceJSON,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},signal:t});if(null==i)throw new a.A("imagery-tile-layer:open",`cannot open raster: ${e}`);this._primaryRasters=[i],this.raster=i}async _openFromSource(e,t){const i="the tiled imagery data source is not supported",s="coverage"===e.type?.toLowerCase()?"CovJSON":e.extent&&e.pixelBlock?"MEMORY":null;if(!s)throw new a.A("imagery-tile-layer:open",i);"MEMORY"===s&&(e={...e,pixelBlock:void 0,pixelBlocks:[e.pixelBlock]});const r=await Je.open({url:"",source:e,datasetFormat:s,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},signal:t});if(null==r)throw new a.A("imagery-tile-layer:open",i);this._primaryRasters=[r],this.rasterFunction?await this._initializeWithFunctionRaster(this.rasterFunction):this.raster=r}async _openFunctionRaster(e,t){const i={raster:this._primaryRasters[0]};this._primaryRasters.length>1&&this._primaryRasters.forEach((e=>i[e.url]=e));const s=(0,$e.vt)(e.functionDefinition?.toJSON()??e.toJSON(),i),r=new P.A({rasterFunction:s});return await r.open(t),r}async _initializeWithFunctionRaster(e,t){try{this.raster=await this._openFunctionRaster(e,t)}catch(e){e instanceof a.A&&o.A.getLogger(this).error("imagery-tile-layer:open",e.message),o.A.getLogger(this).warn("imagery-tile-layer:open","the raster function cannot be applied and is removed"),this._set("rasterFunction",null),this.raster=this._primaryRasters[0]}}_validateElevationInfo(){const e=this.elevationInfo;(0,Ue.XF)(o.A.getLogger(this),(0,Ue.$7)("ImageryTile layers","relative-to-scene",e)),(0,Ue.XF)(o.A.getLogger(this),(0,Ue.tW)("ImageryTile layers",e))}};(0,s._)([(0,f.MZ)({clonable:!1})],qe.prototype,"_primaryRasters",void 0),(0,s._)([(0,f.MZ)({type:je.A,value:null,json:{read:!1}})],qe.prototype,"elevationInfo",null),(0,s._)([(0,f.MZ)(R.fV)],qe.prototype,"legendEnabled",void 0),(0,s._)([(0,f.MZ)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],qe.prototype,"isReference",void 0),(0,s._)([(0,f.MZ)({type:["show","hide"]})],qe.prototype,"listMode",void 0),(0,s._)([(0,f.MZ)({json:{read:!0,write:!0}})],qe.prototype,"blendMode",void 0),(0,s._)([(0,f.MZ)({type:O.A,json:{name:"renderingRule",write:!0}})],qe.prototype,"rasterFunction",void 0),(0,s._)([(0,f.MZ)()],qe.prototype,"sourceJSON",void 0),(0,s._)([(0,f.MZ)({readOnly:!0,json:{origins:{service:{read:{source:"currentVersion"}}}}})],qe.prototype,"version",void 0),(0,s._)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],qe.prototype,"type",void 0),(0,s._)([(0,f.MZ)({type:["ArcGISTiledImageServiceLayer"]})],qe.prototype,"operationalLayerType",void 0),(0,s._)([(0,f.MZ)({type:Boolean,value:!0,json:{read:{source:"disablePopup",reader:(e,t)=>!t.disablePopup},write:{target:"disablePopup",overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType}},writer(e,t,i){t[i]=!e}}}})],qe.prototype,"popupEnabled",void 0),(0,s._)([(0,f.MZ)({type:r.A,json:{read:{source:"popupInfo"},write:{target:"popupInfo",overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType}}}}})],qe.prototype,"popupTemplate",void 0),(0,s._)([(0,f.MZ)({readOnly:!0})],qe.prototype,"defaultPopupTemplate",null),(0,s._)([(0,f.MZ)({readOnly:!0,type:[C.A]})],qe.prototype,"fields",void 0),(0,s._)([(0,f.MZ)({readOnly:!0,type:[C.A]})],qe.prototype,"rasterFields",null),(0,s._)([(0,f.MZ)({constructOnly:!0})],qe.prototype,"source",void 0),qe=(0,s._)([(0,d.$)("esri.layers.ImageryTileLayer")],qe);const Ge=qe},56551:(e,t,i)=>{i.d(t,{H:()=>h});var s=i(90237),r=i(10107),n=(i(44208),i(53966),i(87811),i(40608)),a=i(69540),o=i(25482),l=i(56507),c=i(93223),u=i(94359);let f=class extends(a.A.ClonableMixin(o.A)){constructor(e){super(e),this.name=void 0,this.method="none",this.value=void 0,this.bandIds=void 0,this.renderer=void 0}};(0,s._)([(0,r.MZ)({type:String,json:{write:{isRequired:!0}}})],f.prototype,"name",void 0),(0,s._)([(0,r.MZ)({type:["raster-function-template","variable","none"],json:{write:{isRequired:!0}}}),(0,c.e)({rasterFunctionTemplate:"raster-function-template",variable:"variable",none:"none"})],f.prototype,"method",void 0),(0,s._)([(0,r.MZ)({type:String,json:{write:{isRequired:!0}}})],f.prototype,"value",void 0),(0,s._)([(0,r.MZ)({type:[l.jz],json:{write:{isRequired:!0}}})],f.prototype,"bandIds",void 0),(0,s._)([(0,r.MZ)({types:u.uy,json:{write:!0,origins:{"web-scene":{types:u.Gj,write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type&&"flow"!==e.type})}}}}})],f.prototype,"renderer",void 0),f=(0,s._)([(0,n.$)("esri.renderers.support.RasterPresetRenderer")],f);const h=e=>{let t=class extends e{constructor(){super(...arguments),this.activePresetRendererName=null,this.presetRenderers=null}};return(0,s._)([(0,r.MZ)({type:String,json:{name:"layerDefinition.activePresetRendererName",write:{allowNull:!0}}})],t.prototype,"activePresetRendererName",void 0),(0,s._)([(0,r.MZ)({type:[f],json:{name:"layerDefinition.presetRenderers",write:!0}})],t.prototype,"presetRenderers",void 0),t=(0,s._)([(0,n.$)("esri.layers.mixins.RasterPresetRendererMixin")],t),t}},69397:(e,t,i)=>{i.d(t,{$B:()=>r,Qf:()=>c,Qh:()=>o,RS:()=>n,ez:()=>h,lM:()=>a,qK:()=>f});var s=i(34275);function r(e){return 32+e.length}const n=16;function a(e){if(!e)return 0;let t=f;for(const i in e)e.hasOwnProperty(i)&&(t+=l(e[i],!1));return t}function o(e){if(!e)return 0;if("number"==typeof e[0])return c(e);if(Array.isArray(e))return function(e){const t=e.length;if(0===t||"number"==typeof e[0])return u(e,8);let i=h;for(let s=0;s<t;s++)i+=l(e[s]);return i}(e);let t=f;for(const i in e)e.hasOwnProperty(i)&&(t+=l(e[i]));return t}function l(e,t=!0){switch(typeof e){case"object":return t?o(e):f;case"string":return r(e);case"number":return n;case"boolean":return 4;default:return 8}}function c(...e){return e.reduce(((e,t)=>e+(t?(0,s.iu)(t)?t.byteLength+p:Array.isArray(t)?u(t,n):0:0)),0)}function u(e,t){return h+e.length*t}const f=32,h=16,p=145},71903:(e,t,i)=>{var s;i.d(t,{u:()=>s}),function(e){e[e.KILOBYTES=1024]="KILOBYTES",e[e.MEGABYTES=1048576]="MEGABYTES",e[e.GIGABYTES=1073741824]="GIGABYTES"}(s||(s={}))},73037:(e,t,i)=>{i.d(t,{A:()=>c});var s,r=i(90237),n=i(10107),a=(i(44208),i(53966),i(87811),i(93223)),o=i(40608),l=i(82434);let c=s=class extends l.A{constructor(){super(...arguments),this.type="gcs-shift",this.tolerance=1e-8}forwardTransform(e){return"point"===(e=e.clone()).type?(e.x>180+this.tolerance&&(e.x-=360),e):(e.xmin>=180-this.tolerance?(e.xmax-=360,e.xmin-=360):e.xmax>180+this.tolerance&&(e.xmin=-180,e.xmax=180),e)}inverseTransform(e){return"point"===(e=e.clone()).type?(e.x<-this.tolerance&&(e.x+=360),e):(e.xmin<-this.tolerance&&(e.xmin+=360,e.xmax+=360),e)}clone(){return new s({tolerance:this.tolerance})}};(0,r._)([(0,a.e)({GCSShiftXform:"gcs-shift"})],c.prototype,"type",void 0),(0,r._)([(0,n.MZ)()],c.prototype,"tolerance",void 0),c=s=(0,r._)([(0,o.$)("esri.layers.support.rasterTransforms.GCSShiftTransform")],c)},82371:(e,t,i)=>{i.d(t,{E9:()=>d,Tw:()=>h,X6:()=>p});var s=i(78888),r=i(5443),n=i(86738),a=i(16930),o=i(87186),l=i(20223),c=i(2272),u=i(22671);async function f(e,t,i){const f=(0,c.Dl)(e),{rasterFunction:h,sourceJSON:p}=t||{},d=h?JSON.stringify(h.rasterFunctionDefinition||h):null,m=(0,c.lF)({...f.query,renderingRule:d,f:"json"}),y=(0,c.jV)(m,i);e=f.path;const g=p||await(0,s.A)(e,y).then((e=>e.data)),w=g.hasRasterAttributeTable?(0,s.A)(`${e}/rasterAttributeTable`,y):null,v=g.hasColormap?(0,s.A)(`${e}/colormap`,y):null,x=g.hasHistograms?(0,s.A)(`${e}/histograms`,y):null,b=g.currentVersion>=10.3?(0,s.A)(`${e}/keyProperties`,y):null,I=g.hasMultidimensions?(0,s.A)(`${e}/multidimensionalInfo`,y):null,_=await Promise.allSettled([w,v,x,b,I]);let S=null;if(g.minValues&&g.minValues.length===g.bandCount){S=[];for(let e=0;e<g.minValues.length;e++)S.push({min:g.minValues[e],max:g.maxValues[e],avg:g.meanValues[e],stddev:g.stdvValues[e]})}const A=r.A.fromJSON(g.extent),T=Math.ceil(A.width/g.pixelSizeX-.1),R=Math.ceil(A.height/g.pixelSizeY-.1),C=a.A.fromJSON(g.spatialReference||g.extent.spatialReference),M="fulfilled"===_[0].status?_[0].value?.data:null,O=M?.features?.length?u.A.fromJSON(M):null,F="fulfilled"===_[1].status?_[1].value?.data.colormap:null,P=F?.length?F:null,k="fulfilled"===_[2].status?_[2].value?.data.histograms:null,D=k?.[0]?.counts?.length?k:null,N="fulfilled"===_[3].status?_[3].value?.data??{}:{},E="fulfilled"===_[4].status?_[4].value?.data.multidimensionalInfo:null,L=E?.variables?.length?E:null;L&&L.variables.forEach((e=>{e.statistics?.length&&e.statistics.forEach((e=>{e.avg=e.mean,e.stddev=e.standardDeviation})),e.dimensions?.forEach((e=>{"StdTime"!==e.name||e.recurring||e.unit||(e.unit="ISO8601")}))}));const{defaultVariable:B,serviceDataType:z}=g;B&&B!==N.DefaultVariable&&(N.DefaultVariable=B),z?.includes("esriImageServiceDataTypeVector")&&!z.includes(N.DataType)&&(N.DataType=z.replace("esriImageServiceDataType",""));let J=g.noDataValue;g.noDataValues?.length&&g.noDataValues.some((e=>e!==J))&&(J=g.noDataValues);const $=g.transposeInfo?new l.A({blockWidth:256,blockHeight:256,pyramidBlockWidth:256,pyramidBlockHeight:256,pyramidScalingFactor:2,compression:"lerc",origin:new n.A({x:g.extent.xmin,y:g.extent.ymax,spatialReference:C}),firstPyramidLevel:1,maximumPyramidLevel:Math.max(0,Math.round(Math.log(Math.max(T,R))/Math.LN2-8)),transposeInfo:g.transposeInfo}):void 0;return new o.A({width:T,height:R,bandCount:g.bandCount,extent:r.A.fromJSON(g.extent),spatialReference:C,pixelSize:new n.A({x:g.pixelSizeX,y:g.pixelSizeY,spatialReference:C}),pixelType:g.pixelType.toLowerCase(),statistics:S,attributeTable:O,colormap:P,histograms:D,keyProperties:N,noDataValue:J,multidimensionalInfo:L,storageInfo:$})}function h(e,t,i){return f(e,{sourceJSON:t},i)}function p(e,t,i){return f(e,{rasterFunction:t},i)}function d(e,t){e.attributeTable||(t.hasRasterAttributeTable=!1),e.histograms||(t.hasHistograms=!1),e.colormap||(t.hasColormap=!1),e.multidimensionalInfo||(t.hasMultidimensions=!1)}},82434:(e,t,i)=>{i.d(t,{A:()=>o});var s=i(90237),r=i(25482),n=i(10107),a=(i(44208),i(53966),i(87811),i(40608));let o=class extends r.A{get affectsPixelSize(){return!1}forwardTransform(e){return e}inverseTransform(e){return e}};(0,s._)([(0,n.MZ)()],o.prototype,"affectsPixelSize",null),(0,s._)([(0,n.MZ)({json:{write:!0}})],o.prototype,"spatialReference",void 0),o=(0,s._)([(0,a.$)("esri.layers.support.rasterTransforms.BaseRasterTransform")],o)}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[788,8407],{5503:(e,t,s)=>{s.d(t,{A:()=>x});var i,n=s(90237),r=s(98291),o=s(65529),h=s(36563),l=s(4718),a=s(93687);!function(e){e[e.ADD=1]="ADD",e[e.REMOVE=2]="REMOVE",e[e.MOVE=4]="MOVE"}(i||(i={}));var c,u=s(11932),f=s(56507),_=s(62788),g=s(10107),d=s(7695),m=s(40608),p=s(95488),v=s(12195);class b{constructor(e,t,s,i,n){this.target=e,this.added=t,this.removed=s,this.start=i,this.deleteCount=n}}const y=new a.A(class{constructor(){this.target=null,this.cancellable=!1,this.defaultPrevented=!1,this.item=void 0,this.type=void 0}preventDefault(){this.cancellable&&(this.defaultPrevented=!0)}reset(e){this.defaultPrevented=!1,this.item=e}},void 0,(e=>{e.item=null,e.target=null,e.defaultPrevented=!1,e.cancellable=!1}));function E(e){e&&"object"==typeof e&&"destroy"in e&&"function"==typeof e.destroy&&e.destroy()}function A(e){return e?e instanceof I?e.toArray():e.length?Array.prototype.slice.apply(e):[]:[]}function C(e){if(e?.length)return e[0]}function M(e,t,s,i){const n=Math.min(e.length-s,t.length-i);let r=0;for(;r<n&&e[s+r]===t[i+r];)r++;return r}function w(e,t,s,i){t&&t.forEach(((t,n,r)=>{e.push(t),w(e,s.call(i,t,n,r),s,i)}))}const O=new Set,L=new Set,R=new Set,D=new Map;let S=0,I=class extends o.A.EventedAccessor{static{c=this}static{this.ofType=e=>{if(!e)return c;if(D.has(e))return D.get(e);let t=null;if("function"==typeof e)t=e.prototype.declaredClass;else if(e.base)t=e.base.prototype.declaredClass;else for(const s in e.typeMap){const i=e.typeMap[s].prototype.declaredClass;t?t+=` | ${i}`:t=i}let s=class extends c{};return(0,n._)([(0,d.u)({Type:e,ensureType:"function"==typeof e?(0,f.dp)(e):(0,f.aq)(e)})],s.prototype,"itemType",void 0),s=(0,n._)([(0,m.$)(`esri.core.Collection<${t}>`)],s),D.set(e,s),s}}static isCollection(e){return null!=e&&e instanceof c}constructor(e){super(e),this._chgListeners=[],this._notifications=null,this._updating=!1,this._timer=null,this._observable=new p.I,this.length=0,this._items=[],Object.defineProperty(this,"uid",{value:S++})}normalizeCtorArgs(e){return e?Array.isArray(e)||e instanceof c?{items:e}:e:{}}destroy(){this._removeAllRaw(),this._timer&&this._timer.remove(),this._emitter.destroy(),this._notifications=null}*[Symbol.iterator](){yield*this.items}get items(){return(0,_.gc)(this._observable),this._items}set items(e){this._emitBeforeChanges(i.ADD)||(this._splice(0,this.length,A(e)),this._emitAfterChanges(i.ADD))}hasEventListener(e){return!this.destroyed&&("change"===e?this._chgListeners.length>0:this._emitter.hasEventListener(e))}on(e,t){if(this.destroyed)return(0,h.hA)();if("change"===e){const e=this._chgListeners,s={removed:!1,callback:t};return e.push(s),this._notifications&&this._notifications.push({listeners:e.slice(),items:this._items.slice(),changes:[]}),(0,h.hA)((()=>{s.removed=!0,e.splice(e.indexOf(s),1)}))}return this._emitter.on(e,t)}once(e,t){const s="deref"in t?()=>t.deref():()=>t,i=this.on(e,(e=>{s()?.call(null,e),i.remove()}));return i}add(e,t){if((0,_.gc)(this._observable),this._emitBeforeChanges(i.ADD))return this;const s=this.getNextIndex(t??null);return this._splice(s,0,[e]),this._emitAfterChanges(i.ADD),this}addMany(e,t=this._items.length){if((0,_.gc)(this._observable),!e?.length)return this;if(this._emitBeforeChanges(i.ADD))return this;const s=this.getNextIndex(t);return this._splice(s,0,A(e)),this._emitAfterChanges(i.ADD),this}at(e){if((0,_.gc)(this._observable),(e=Math.trunc(e)||0)<0&&(e+=this.length),!(e<0||e>=this.length))return this._items[e]}removeAll(){if((0,_.gc)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return[];const e=this._removeAllRaw();return this._emitAfterChanges(i.REMOVE),e}_removeAllRaw(){return 0===this.length?[]:this._splice(0,this.length)||[]}clone(){return(0,_.gc)(this._observable),this._createNewInstance({items:this._items.map(l.o8)})}concat(...e){(0,_.gc)(this._observable);const t=e.map(A);return this._createNewInstance({items:this._items.concat(...t)})}drain(e,t){if((0,_.gc)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return;const s=this._splice(0,this.length),n=s.length;for(let i=0;i<n;i++)e.call(t,s[i],i,s);this._emitAfterChanges(i.REMOVE)}destroyAll(){this.drain(E)}destroyMany(e){const t=this.removeMany(e);return t.forEach(E),t}every(e,t){return(0,_.gc)(this._observable),this._items.every(e,t)}filter(e,t){(0,_.gc)(this._observable);const s=2===arguments.length?this._items.filter(e,t):this._items.filter(e);return this._createNewInstance({items:s})}find(e,t){return(0,_.gc)(this._observable),this._items.find(e,t)}findIndex(e,t){return(0,_.gc)(this._observable),this._items.findIndex(e,t)}flatten(e,t){(0,_.gc)(this._observable);const s=[];return w(s,this,e,t),new c(s)}forEach(e,t){return(0,_.gc)(this._observable),this._items.forEach(e,t)}getItemAt(e){return(0,_.gc)(this._observable),this._items[e]}getNextIndex(e){(0,_.gc)(this._observable);const t=this.length;return(e=e??t)<0?e=0:e>t&&(e=t),e}includes(e,t=0){return(0,_.gc)(this._observable),this._items.includes(e,t)}indexOf(e,t=0){return(0,_.gc)(this._observable),this._items.indexOf(e,t)}join(e=","){return(0,_.gc)(this._observable),this._items.join(e)}lastIndexOf(e,t=this.length-1){return(0,_.gc)(this._observable),this._items.lastIndexOf(e,t)}map(e,t){(0,_.gc)(this._observable);const s=this._items.map(e,t);return new c({items:s})}reorder(e,t=this.length-1){(0,_.gc)(this._observable);const s=this.indexOf(e);if(-1!==s){if(t<0?t=0:t>=this.length&&(t=this.length-1),s!==t){if(this._emitBeforeChanges(i.MOVE))return e;this._splice(s,1),this._splice(t,0,[e]),this._emitAfterChanges(i.MOVE)}return e}}pop(){if((0,_.gc)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return;const e=C(this._splice(this.length-1,1));return this._emitAfterChanges(i.REMOVE),e}push(...e){return(0,_.gc)(this._observable),this._emitBeforeChanges(i.ADD)||(this._splice(this.length,0,e),this._emitAfterChanges(i.ADD)),this.length}reduce(e,t){(0,_.gc)(this._observable);const s=this._items;return 2===arguments.length?s.reduce(e,t):s.reduce(e)}reduceRight(e,t){(0,_.gc)(this._observable);const s=this._items;return 2===arguments.length?s.reduceRight(e,t):s.reduceRight(e)}remove(e){return(0,_.gc)(this._observable),this.removeAt(this.indexOf(e))}removeAt(e){if((0,_.gc)(this._observable),e<0||e>=this.length||this._emitBeforeChanges(i.REMOVE))return;const t=C(this._splice(e,1));return this._emitAfterChanges(i.REMOVE),t}removeMany(e){if((0,_.gc)(this._observable),!e?.length||this._emitBeforeChanges(i.REMOVE))return[];const t=e instanceof c?e.toArray():e,s=this._items,n=[],r=t.length;for(let e=0;e<r;e++){const i=t[e],r=s.indexOf(i);if(r>-1){const i=1+M(t,s,e+1,r+1),o=this._splice(r,i);o&&o.length>0&&n.push.apply(n,o),e+=i-1}}return this._emitAfterChanges(i.REMOVE),n}reverse(){if((0,_.gc)(this._observable),this._emitBeforeChanges(i.MOVE))return this;const e=this._splice(0,this.length);return e&&(e.reverse(),this._splice(0,0,e)),this._emitAfterChanges(i.MOVE),this}shift(){if((0,_.gc)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return;const e=C(this._splice(0,1));return this._emitAfterChanges(i.REMOVE),e}slice(e=0,t=this.length){return(0,_.gc)(this._observable),this._createNewInstance({items:this._items.slice(e,t)})}some(e,t){return(0,_.gc)(this._observable),this._items.some(e,t)}sort(e){if((0,_.gc)(this._observable),!this.length||this._emitBeforeChanges(i.MOVE)||!this._requiresSort(e))return this;const t=this._splice(0,this.length);return arguments.length?t.sort(e):t.sort(),this._splice(0,0,t),this._emitAfterChanges(i.MOVE),this}_requiresSort(e=(e,t)=>e===t?0:e<t?-1:1){const t=this.length-1;for(let s=0;s<t;s++)if(e(this.items[s],this.items[s+1])>0)return!0;return!1}splice(e,t,...s){(0,_.gc)(this._observable),1===arguments.length&&(t=this.length),t??=0;const n=(t?i.REMOVE:0)|(s.length?i.ADD:0);if(this._emitBeforeChanges(n))return[];const r=this._splice(e,t,s)||[];return this._emitAfterChanges(n),r}toArray(){return(0,_.gc)(this._observable),this._items.slice()}toJSON(e){return(0,_.gc)(this._observable),this.toArray().map((t=>(0,v.W)(t)?t.toJSON(e):t))}toLocaleString(){return(0,_.gc)(this._observable),this._items.toLocaleString()}toString(){return(0,_.gc)(this._observable),this._items.toString()}unshift(...e){return(0,_.gc)(this._observable),!e.length||this._emitBeforeChanges(i.ADD)||(this._splice(0,0,e),this._emitAfterChanges(i.ADD)),this.length}_createNewInstance(e){return new this.constructor(e)}_splice(e,t,s){const i=this._items,n=this.itemType;let r,o;if(!this._notifications&&this.hasEventListener("change")&&(this._notifications=[{listeners:this._chgListeners.slice(),items:this._items.slice(),changes:[]}],this._timer&&this._timer.remove(),this._updating=!0,this._timer=(0,u._)((()=>this._dispatchChange()))),e<0&&(e+=this.length),t){if(o=i.splice(e,t),this.hasEventListener("before-remove")){const t=y.acquire();t.target=this,t.cancellable=!0;for(let s=0,n=o.length;s<n;s++)r=o[s],t.reset(r),this.emit("before-remove",t),t.defaultPrevented&&(o.splice(s,1),i.splice(e,0,r),e+=1,s-=1,n-=1);y.release(t)}if(this.length=this._items.length,this.hasEventListener("after-remove")){const e=y.acquire();e.target=this,e.cancellable=!1;const t=o.length;for(let s=0;s<t;s++)e.reset(o[s]),this.emit("after-remove",e);y.release(e)}}if(s?.length){if(n){const e=[];for(const t of s){const s=n.ensureType(t);null==s&&null!=t||e.push(s)}s=e}const t=this.hasEventListener("before-add"),r=this.hasEventListener("after-add"),o=e===this.length;if(t||r){const n=y.acquire();n.target=this,n.cancellable=!0;const h=y.acquire();h.target=this,h.cancellable=!1;for(const l of s)t?(n.reset(l),this.emit("before-add",n),n.defaultPrevented||(o?i.push(l):i.splice(e++,0,l),this._set("length",i.length),r&&(h.reset(l),this.emit("after-add",h)))):(o?i.push(l):i.splice(e++,0,l),this._set("length",i.length),h.reset(l),this.emit("after-add",h));y.release(h),y.release(n)}else{if(o)for(const e of s)i.push(e);else i.splice(e,0,...s);this._set("length",i.length)}}if((s?.length||o?.length)&&this._notifyChangeEvent(s,o),this.hasEventListener("after-splice")){const i=new b(this,s,o,e,t);this.emit("after-splice",i)}return o}_emitBeforeChanges(e){let t=!1;if(this.hasEventListener("before-changes")){const s=y.acquire();s.target=this,s.cancellable=!0,s.type=e,this.emit("before-changes",s),t=s.defaultPrevented,y.release(s)}return t}_emitAfterChanges(e){if(this.hasEventListener("after-changes")){const t=y.acquire();t.target=this,t.cancellable=!1,t.type=e,this.emit("after-changes",t),y.release(t)}this._observable.notify()}_notifyChangeEvent(e,t){this.hasEventListener("change")&&this._notifications&&this._notifications[this._notifications.length-1].changes.push({added:e,removed:t})}get updating(){return this._updating}_dispatchChange(){if(this._timer&&(this._timer.remove(),this._timer=null),this._updating=!1,!this._notifications)return;const e=this._notifications;this._notifications=null;for(const t of e){const e=t.changes;O.clear(),L.clear(),R.clear();for(const{added:t,removed:s}of e){if(t)if(0===R.size&&0===L.size)for(const e of t)O.add(e);else for(const e of t)L.has(e)?(R.add(e),L.delete(e)):R.has(e)||O.add(e);if(s)if(0===R.size&&0===O.size)for(const e of s)L.add(e);else for(const e of s)O.has(e)?O.delete(e):(R.delete(e),L.add(e))}const s=r.A.acquire();O.forEach((e=>{s.push(e)}));const i=r.A.acquire();L.forEach((e=>{i.push(e)}));const n=this._items,o=t.items,h=r.A.acquire();if(R.forEach((e=>{o.indexOf(e)!==n.indexOf(e)&&h.push(e)})),t.listeners&&(s.length||i.length||h.length)){const e={target:this,added:s,removed:i,moved:h},n=t.listeners.length;for(let s=0;s<n;s++){const i=t.listeners[s];i.removed||i.callback.call(this,e)}}r.A.release(s),r.A.release(i),r.A.release(h)}O.clear(),L.clear(),R.clear()}};(0,n._)([(0,g.MZ)()],I.prototype,"_updating",void 0),(0,n._)([(0,g.MZ)()],I.prototype,"length",void 0),(0,n._)([(0,g.MZ)()],I.prototype,"items",null),(0,n._)([(0,g.MZ)({readOnly:!0})],I.prototype,"updating",null),I=c=(0,n._)([(0,m.$)("esri.core.Collection")],I);const x=I},7695:(e,t,s)=>{function i(e){return(t,s)=>{t[s]=e}}s.d(t,{u:()=>i})},10407:(e,t,s)=>{s.d(t,{It:()=>_,LG:()=>o,OM:()=>a,Sm:()=>c,Y:()=>h,bK:()=>l,mm:()=>f,sQ:()=>u});var i=s(98988),n=s(16930),r=s(28735);function o(e,t){if(!h(e,t)){const s=e.typeKeywords;s?s.push(t):e.typeKeywords=[t]}}function h(e,t){return!!e.typeKeywords?.includes(t)}function l(e){return h(e,f.HOSTED_SERVICE)}function a(e,t){const s=e.typeKeywords;if(s){const e=s.indexOf(t);e>-1&&s.splice(e,1)}}function c(e,t,s){s?o(e,t):a(e,t)}async function u(e){const t=e.clone().normalize();let s;if(t.length>1)for(const e of t)s?e.width>s.width&&(s=e):s=e;else s=t[0];return async function(e){const t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,r.ci)(e);const s=n.A.WGS84;return await(0,i.initializeProjection)(t,s),(0,i.project)(e,s)}(s)}const f={CHARTS:"Charts",DYNAMIC:"Dynamic",DEVELOPER_BASEMAP:"DeveloperBasemap",GROUP_LAYER_MAP:"Map",HOSTED_SERVICE:"Hosted Service",JSAPI:"ArcGIS API for JavaScript",LOCAL_SCENE:"ViewingMode-Local",METADATA:"Metadata",MULTI_LAYER:"Multilayer",ORIENTED_IMAGERY_LAYER:"OrientedImageryLayer",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery"};function _(e){const{portal:t,isOrgItem:s,itemControl:i}=e,n=t.user?.privileges;let r=!n||n.includes("features:user:edit"),o=!!s&&!!n?.includes("features:user:fullEdit");const h="update"===i||"admin"===i;return h?o=r=!0:o&&(r=!0),{features:{edit:r,fullEdit:o},content:{updateItem:h}}}},36708:(e,t,s)=>{s.d(t,{C_:()=>f,OH:()=>d,Vh:()=>m,on:()=>u,pc:()=>p,wB:()=>l,z7:()=>a});var i=s(37955),n=s(36563),r=s(97768),o=s(74887),h=s(14012);function l(e,t,s={}){return c(e,t,s,_)}function a(e,t,s={}){return c(e,t,s,g)}function c(e,t,s={},i){let n=null;const o=s.once?(e,s)=>{i(e)&&((0,r.xt)(n),t(e,s))}:(e,s)=>{i(e)&&t(e,s)};if(n=(0,h.Cn)(e,o,s.sync,s.equals),s.initial){const t=e();o(t,t)}return n}function u(e,t,s,o={}){let h=null,a=null,c=null;function u(){h&&a&&(a.remove(),o.onListenerRemove?.(h),h=null,a=null)}function f(e){o.once&&o.once&&(0,r.xt)(c),s(e)}const _=l(e,((e,s)=>{u(),(0,i.wb)(e)&&(h=e,a=(0,i.on)(e,t,f),o.onListenerAdd?.(e))}),{sync:o.sync,initial:!0});return c=(0,n.hA)((()=>{_.remove(),u()})),c}function f(e,t){return function(e,t,s){if((0,o.G4)(s))return Promise.reject((0,o.NK)());const i=e();if(t?.(i))return Promise.resolve(i);let h=null;function l(){h=(0,r.xt)(h)}return new Promise(((i,r)=>{h=(0,n.vE)([(0,o.u7)(s,(()=>{l(),r((0,o.NK)())})),c(e,(e=>{l(),i(e)}),{sync:!1,once:!0},t??_)])}))}(e,g,t)}function _(e){return!0}function g(e){return!!e}s(80559);const d={sync:!0},m={initial:!0},p={sync:!0,initial:!0}},60999:(e,t,s)=>{s.d(t,{DZ:()=>g,Ke:()=>_,Tj:()=>c,UT:()=>d,jJ:()=>a});var i=s(90237),n=s(69622),r=s(97768),o=s(74887),h=s(10107),l=s(40608);function a(e,t,s){return(0,o.Lx)(e.map(((e,i)=>t.apply(s,[e,i]))))}async function c(e,t,s){return(await(0,o.Lx)(e.map(((e,i)=>t.apply(s,[e,i]))))).map((e=>e.value))}function u(e){return{ok:!0,value:e}}function f(e){return{ok:!1,error:e}}async function _(e){if(null==e)return{ok:!1,error:new Error("no promise provided")};try{return u(await e)}catch(e){return f(e)}}async function g(e){try{return u(await e)}catch(e){return(0,o.QP)(e),f(e)}}function d(e,t){return new m(e,t)}let m=class extends n.A{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,r.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:s}=this._abortController;this.promise=e(s),this.promise.then((e=>{this._result=u(e),this._cleanup()}),(e=>{this._result=f(e),this._cleanup()})),this._abortHandle=(0,o.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,r.xt)(this._abortHandle),this._abortController=null}};(0,i._)([(0,h.MZ)()],m.prototype,"value",null),(0,i._)([(0,h.MZ)()],m.prototype,"error",null),(0,i._)([(0,h.MZ)()],m.prototype,"finished",null),(0,i._)([(0,h.MZ)()],m.prototype,"promise",void 0),(0,i._)([(0,h.MZ)()],m.prototype,"_result",void 0),m=(0,i._)([(0,l.$)("esri.core.asyncUtils.ReactiveTask")],m)},65529:(e,t,s)=>{s.d(t,{A:()=>l});var i=s(90237),n=s(69622),r=s(36563),o=s(40608);class h{constructor(){this._emitter=new h.EventEmitter(this)}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}}!function(e){class t{constructor(e=null){this._target=e,this._listenersMap=null}clear(){this._listenersMap?.clear(),this._listenersMap=null}destroy(){this.clear()}emit(e,t){let s=this._listenersMap?.get(e);if(!s)return!1;const i=this._target||this;let n=!1;for(const e of s.slice()){const s="deref"in e?e.deref():e;s?s?.call(i,t):n=!0}return n&&(s=s.filter((e=>!("deref"in e)||null!=e.deref())),this._listenersMap.set(e,s)),s.length>0}on(e,t){if(Array.isArray(e)){const s=e.map((e=>this.on(e,t)));return(0,r.vE)(s)}if(e.includes(","))throw new TypeError("Evented.on() with a comma delimited string of event types is not supported");this._listenersMap??=new Map;const s=this._listenersMap.get(e)||[];return s.push(t),this._listenersMap.set(e,s),(0,r.hA)((()=>{const s=this._listenersMap?.get(e),i=s?.indexOf(t)??-1;i>=0&&s.splice(i,1)}))}once(e,t){const s=this.on(e,(e=>{s.remove();const i="deref"in t?t.deref():t;i?.call(null,e)}));return s}hasEventListener(e){const t=this._listenersMap?.get(e);return null!=t&&t.length>0}}e.EventEmitter=t,e.EventedMixin=e=>{let s=class extends e{constructor(){super(...arguments),this._emitter=new t}destroy(){this._emitter.clear()}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}};return s=(0,i._)([(0,o.$)("esri.core.Evented")],s),s};let s=class extends n.A{constructor(){super(...arguments),this._emitter=new h.EventEmitter(this)}destroy(){this._emitter.clear()}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}};s=(0,i._)([(0,o.$)("esri.core.Evented.EventedAccessor")],s),e.EventedAccessor=s}(h||(h={}));const l=h},77548:(e,t,s)=>{s.d(t,{tk:()=>u,BR:()=>c,wI:()=>a,Ov:()=>h,W_:()=>l,TU:()=>o,XX:()=>r});var i=s(70333),n=s(78888);s(5503),s(36563),s(36708),new WeakMap;const r={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function o(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function h(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function l(e){const t=e?.type;return("feature"===t||"subtype-group"===t||"oriented-imagery"===t)&&"feature-layer"===e?.source?.type}async function a(e,t){const s=i.id?.findServerInfo(e);if(null!=s?.currentVersion)return s.owningSystemUrl||null;const r=e.toLowerCase().indexOf("/rest/services");if(-1===r)return null;const o=`${e.slice(0,r)}/rest/info`,h=null!=t?t.signal:null,{data:l}=await(0,n.A)(o,{query:{f:"json"},responseType:"json",signal:h});return l?.owningSystemUrl||null}function c(e){return function(e){if(!("capabilities"in e))return!1;switch(e.type){case"catalog":case"catalog-footprint":case"csv":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"scene":case"sublayer":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function u(e){return!!function(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":return!0;default:return!1}}(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3610],{4902:(t,e,r)=>{r.d(e,{A:()=>u});var s=r(90237),i=r(40608);let o=0;const n=t=>{let e=class extends t{constructor(...t){super(...t),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+o++})}};return e=(0,s._)([(0,i.$)("esri.core.Identifiable")],e),e};let l=class extends(n(class{})){};var a;l=(0,s._)([(0,i.$)("esri.core.Identifiable")],l),(a=l||(l={})).IdentifiableMixin=n,a.NumericIdentifiableMixin=t=>{let e=class extends t{constructor(...t){super(...t),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:o++})}};return e=(0,s._)([(0,i.$)("esri.core.Identifiable.NumericIdentifiable")],e),e};const u=l},8303:(t,e,r)=>{r.d(e,{A:()=>v});var s=r(90237),i=r(92602),o=r(70333),n=r(78888),l=r(60999),a=r(49186),u=r(53966),h=r(97768),c=r(74887),p=r(84952),d=r(10107),y=(r(44208),r(87811),r(36005)),m=r(40608),g=r(43937),f=r(77548),S=r(20655),w=r(80812),b=r(41318),_=r(10407);const v=t=>{let e=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,h.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(t){t!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",t))}readPortalItem(t,e,r){if(e.itemId)return new w.default({id:e.itemId,portal:r?.portal})}writePortalItem(t,e){t?.id&&(e.itemId=t.id)}async loadFromPortal(t,e){if(this.portalItem?.id)try{const{load:s}=await r.e(1204).then(r.bind(r,41204));return(0,c.Te)(e),await s({instance:this,supportedTypes:t.supportedTypes,validateItem:t.validateItem,supportsData:t.supportsData,layerModuleTypeMap:t.layerModuleTypeMap,populateGroupLayer:t.populateGroupLayer},e)}catch(t){throw(0,c.zf)(t)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${t}`),t}}async finishLoadEditablePortalLayer(t){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(t).catch((t=>((0,c.QP)(t),!0))))}async setUserPrivileges(t,e){if(!i.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(e);if(this.url)try{const{features:{edit:r,fullEdit:s},content:{updateItem:i}}=await this._fetchUserPrivileges(t,e);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",s),this._set("userHasUpdateItemPrivileges",i)}catch(t){(0,c.QP)(t)}}async _fetchUserPrivileges(t,e){let r=this.portalItem;if(!t||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(e);const s=!o.id?.findCredential(this.url),i=t===r.id;if(i&&r.portal.user)return this._getUserPrivileges(r,s);let n,l;if(i)n=r.portal.url;else try{n=await(0,f.wI)(this.url,e)}catch(t){(0,c.QP)(t)}if(!n||!(0,p.b8)(n,r.portal.url))return this._fetchFallbackUserPrivileges(e);try{const t=null!=e?e.signal:null;l=await(o.id?.getCredential(`${n}/sharing`,{prompt:!1,signal:t}))}catch(t){(0,c.QP)(t)}const a=!0,u=!1,h=!1;if(!l)return{features:{edit:a,fullEdit:u},content:{updateItem:h}};try{if(i?await r.reload():(r=new w.default({id:t,portal:{url:n}}),await r.load(e)),r.portal.user)return this._getUserPrivileges(r,s)}catch(t){(0,c.QP)(t)}return{features:{edit:a,fullEdit:u},content:{updateItem:h}}}_getUserPrivileges(t,e){const r=(0,_.It)(t);return e&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(t){let e=!0;try{e=await this._fetchUserHasEditingPrivileges(t)}catch(t){(0,c.QP)(t)}return{features:{edit:e,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(t){const e=this.url?o.id?.findCredential(this.url):null;if(!e)return!0;const r=M.credential===e?M.user:await this._fetchEditingUser(t);return M.credential=e,M.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(t){const e=this.portalItem?.portal?.user;if(e)return e;const r=o.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const s=`${r.owningSystemUrl}/sharing/rest`,i=S.A.getDefault();if(i&&i.loaded&&(0,p.S8)(i.restUrl)===(0,p.S8)(s))return i.user;const a=`${s}/community/self`,u=null!=t?t.signal:null,h=await(0,l.Ke)((0,n.A)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return h.ok?b.A.fromJSON(h.value.data):null}read(t,e){e&&(e.layer=this),super.read(t,e)}write(t,e){const r=e?.portal,s=this.portalItem?.id&&(this.portalItem.portal||S.A.getDefault());return r&&s&&!(0,p.ut)(s.restUrl,r.restUrl)?(e.messages&&e.messages.push(new a.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(t,{...e,layer:this})}};return(0,s._)([(0,d.MZ)({type:w.default})],e.prototype,"portalItem",null),(0,s._)([(0,y.w)("web-document","portalItem",["itemId"])],e.prototype,"readPortalItem",null),(0,s._)([(0,g.K)("web-document","portalItem",{itemId:{type:String}})],e.prototype,"writePortalItem",null),(0,s._)([(0,d.MZ)({clonable:!1})],e.prototype,"resourceReferences",void 0),(0,s._)([(0,d.MZ)({type:Boolean,readOnly:!0})],e.prototype,"userHasEditingPrivileges",void 0),(0,s._)([(0,d.MZ)({type:Boolean,readOnly:!0})],e.prototype,"userHasFullEditingPrivileges",void 0),(0,s._)([(0,d.MZ)({type:Boolean,readOnly:!0})],e.prototype,"userHasUpdateItemPrivileges",void 0),e=(0,s._)([(0,m.$)("esri.layers.mixins.PortalLayer")],e),e},M={credential:null,user:null}},20378:(t,e,r)=>{r.d(e,{A:()=>p});var s=r(90237),i=r(68197),o=r(66552),n=r(25482),l=r(10107),a=(r(44208),r(53966),r(87811),r(36005)),u=r(40608);const h=new o.J({esriSMS:"simple-marker",esriPMS:"picture-marker",esriSLS:"simple-line",esriSFS:"simple-fill",esriPFS:"picture-fill",esriTS:"text",esriSHD:"shield-label-symbol",PointSymbol3D:"point-3d",LineSymbol3D:"line-3d",PolygonSymbol3D:"polygon-3d",WebStyleSymbol:"web-style",MeshSymbol3D:"mesh-3d",LabelSymbol3D:"label-3d",CIMSymbolReference:"cim"});let c=0,p=class extends n.A{constructor(t){super(t),this.id="sym"+c++,this.type=null,this.color=new i.A([0,0,0,1])}readColor(t){return null!=t?.[0]?[t[0],t[1],t[2],t[3]/255]:t}async collectRequiredFields(t,e){}hash(){return JSON.stringify(this.toJSON())}clone(){}};(0,s._)([(0,l.MZ)({type:h.apiValues,readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0,writer:h.write,isRequired:!0}}})],p.prototype,"type",void 0),(0,s._)([(0,l.MZ)({type:i.A,json:{write:{allowNull:!0}}})],p.prototype,"color",void 0),(0,s._)([(0,a.w)("color")],p.prototype,"readColor",null),p=(0,s._)([(0,u.$)("esri.symbols.Symbol")],p)},27865:(t,e,r)=>{r.d(e,{O9:()=>o,dw:()=>n,mj:()=>i});var s=r(59247);function i(t,e){const r=t.length>e.length?t:e;return(t.length>e.length?e:t).every(((t,e)=>t.type===r[e].type))}function o(t,e){const r=t.length>e.length?t:e,i=t.length>e.length?e:t;for(let t=i.length;t<r.length;t++)i.push((0,s.sK)(r[t]))}function n(t){const e=t[0];return!!e&&"type"in e}},31593:(t,e,r)=>{r.d(e,{A:()=>v});var s=r(90237),i=r(66552),o=r(4718),n=r(90629),l=r(10107),a=(r(44208),r(53966),r(93223)),u=r(40608),h=(r(87811),r(20378));let c=class extends h.A{constructor(t){super(t),this.type="simple-line",this.width=.75}hash(){return`${this.type}.${this.width}`}};(0,s._)([(0,a.e)({esriSLS:"simple-line"},{readOnly:!0})],c.prototype,"type",void 0),(0,s._)([(0,l.MZ)({type:Number,cast:n.cr,json:{write:!0}})],c.prototype,"width",void 0),c=(0,s._)([(0,u.$)("esri.symbols.LineSymbol")],c);var p,d=r(68197),y=r(25482),m=r(36005),g=r(43937),f=r(83213);let S=p=class extends y.A{constructor(t){super(t),this.placement="begin-end",this.type="line-marker",this.style="arrow"}writeStyle(t,e,r,s){e[r]="web-map"===s?.origin?"arrow":t}set color(t){this._set("color",t)}readColor(t){return null!=t?.[0]?[t[0],t[1],t[2],t[3]/255]:t}writeColor(t,e,r,s){"web-map"===s?.origin||(e[r]=t)}clone(){return new p({color:(0,o.o8)(this.color),placement:this.placement,style:this.style})}hash(){return`${this.placement}.${this.color?.hash()}.${this.style}`}};(0,s._)([(0,l.MZ)({type:["begin","end","begin-end"],json:{write:!0}})],S.prototype,"placement",void 0),(0,s._)([(0,a.e)({"line-marker":"line-marker"},{readOnly:!0}),(0,l.MZ)({json:{origins:{"web-map":{write:!1}}}})],S.prototype,"type",void 0),(0,s._)([(0,l.MZ)({type:f.z})],S.prototype,"style",void 0),(0,s._)([(0,g.K)("style")],S.prototype,"writeStyle",null),(0,s._)([(0,l.MZ)({type:d.A,value:null,json:{write:{allowNull:!0}}})],S.prototype,"color",null),(0,s._)([(0,m.w)("color")],S.prototype,"readColor",null),(0,s._)([(0,g.K)("color")],S.prototype,"writeColor",null),S=p=(0,s._)([(0,u.$)("esri.symbols.LineSymbolMarker")],S);const w=S;var b;const _=new i.J({esriSLSSolid:"solid",esriSLSDash:"dash",esriSLSDot:"dot",esriSLSDashDot:"dash-dot",esriSLSDashDotDot:"long-dash-dot-dot",esriSLSNull:"none",esriSLSShortDash:"short-dash",esriSLSShortDot:"short-dot",esriSLSShortDashDot:"short-dash-dot",esriSLSShortDashDotDot:"short-dash-dot-dot",esriSLSLongDash:"long-dash",esriSLSLongDashDot:"long-dash-dot"});let v=b=class extends c{constructor(...t){super(...t),this.type="simple-line",this.style="solid",this.cap="round",this.join="round",this.marker=null,this.miterLimit=2}normalizeCtorArgs(t,e,r,s,i,o){if(t&&"string"!=typeof t)return t;const l={};return null!=t&&(l.style=t),null!=e&&(l.color=e),null!=r&&(l.width=(0,n.cr)(r)),null!=s&&(l.cap=s),null!=i&&(l.join=i),null!=o&&(l.miterLimit=(0,n.cr)(o)),l}clone(){return new b({color:(0,o.o8)(this.color),style:this.style,width:this.width,cap:this.cap,join:this.join,miterLimit:this.miterLimit,marker:this.marker?.clone()})}hash(){return`${super.hash()}.${this.color?.hash()}.${this.style}.${this.cap}.${this.join}.${this.miterLimit}.${this.marker?.hash()}`}};(0,s._)([(0,a.e)({esriSLS:"simple-line"},{readOnly:!0})],v.prototype,"type",void 0),(0,s._)([(0,l.MZ)({type:_.apiValues,json:{read:_.read,write:_.write}})],v.prototype,"style",void 0),(0,s._)([(0,l.MZ)({type:["butt","round","square"],json:{write:{overridePolicy:(t,e,r)=>({enabled:"round"!==t&&null==r?.origin})}}})],v.prototype,"cap",void 0),(0,s._)([(0,l.MZ)({type:["miter","round","bevel"],json:{write:{overridePolicy:(t,e,r)=>({enabled:"round"!==t&&null==r?.origin})}}})],v.prototype,"join",void 0),(0,s._)([(0,l.MZ)({types:{key:"type",base:null,defaultKeyValue:"line-marker",typeMap:{"line-marker":w}},json:{write:!0,origins:{"web-scene":{write:!1}}}})],v.prototype,"marker",void 0),(0,s._)([(0,l.MZ)({type:Number,json:{read:!1,write:!1}})],v.prototype,"miterLimit",void 0),v=b=(0,s._)([(0,u.$)("esri.symbols.SimpleLineSymbol")],v)},53930:(t,e,r)=>{r.d(e,{A:()=>g});var s,i=r(90237),o=r(68197),n=r(66552),l=r(4718),a=r(90629),u=r(10107),h=(r(44208),r(53966),r(93223)),c=r(40608),p=r(43937),d=r(89420),y=r(31593);const m=new n.J({esriSMSCircle:"circle",esriSMSSquare:"square",esriSMSCross:"cross",esriSMSX:"x",esriSMSDiamond:"diamond",esriSMSTriangle:"triangle",esriSMSPath:"path"});let g=s=class extends d.A{constructor(...t){super(...t),this.color=new o.A([255,255,255,.25]),this.type="simple-marker",this.size=12,this.style="circle",this.outline=new y.A}normalizeCtorArgs(t,e,r,s){if(t&&"string"!=typeof t)return t;const i={};return t&&(i.style=t),null!=e&&(i.size=(0,a.cr)(e)),r&&(i.outline=r),s&&(i.color=s),i}writeColor(t,e){t&&"x"!==this.style&&"cross"!==this.style&&(e.color=t.toJSON()),null===t&&(e.color=null)}set path(t){this.style="path",this._set("path",t)}clone(){return new s({angle:this.angle,color:(0,l.o8)(this.color),outline:this.outline&&this.outline.clone(),path:this.path,size:this.size,style:this.style,xoffset:this.xoffset,yoffset:this.yoffset})}hash(){return`${super.hash()}.${this.color&&this.color.hash()}.${this.path}.${this.style}.${this.outline?.hash()}`}};(0,i._)([(0,u.MZ)()],g.prototype,"color",void 0),(0,i._)([(0,p.K)("color")],g.prototype,"writeColor",null),(0,i._)([(0,h.e)({esriSMS:"simple-marker"},{readOnly:!0})],g.prototype,"type",void 0),(0,i._)([(0,u.MZ)()],g.prototype,"size",void 0),(0,i._)([(0,u.MZ)({type:m.apiValues,json:{read:m.read,write:m.write}})],g.prototype,"style",void 0),(0,i._)([(0,u.MZ)({type:String,json:{write:!0}})],g.prototype,"path",null),(0,i._)([(0,u.MZ)({types:{key:"type",base:null,defaultKeyValue:"simple-line",typeMap:{"simple-line":y.A}},json:{default:null,write:!0}})],g.prototype,"outline",void 0),g=s=(0,i._)([(0,c.$)("esri.symbols.SimpleMarkerSymbol")],g)},58592:(t,e,r)=>{r.d(e,{A:()=>d});var s,i=r(90237),o=r(4718),n=r(90629),l=r(10107),a=(r(44208),r(53966),r(93223)),u=r(36005),h=r(40608),c=r(89420),p=r(77040);let d=s=class extends c.A{constructor(...t){super(...t),this.color=null,this.type="picture-marker",this.url=null,this.source=null,this.height=12,this.width=12,this.size=null}normalizeCtorArgs(t,e,r){if(t&&"string"!=typeof t&&null==t.imageData)return t;const s={};return t&&(s.url=t),null!=e&&(s.width=(0,n.cr)(e)),null!=r&&(s.height=(0,n.cr)(r)),s}readHeight(t,e){return e.size||t}readWidth(t,e){return e.size||t}clone(){const t=new s({angle:this.angle,height:this.height,url:this.url,width:this.width,xoffset:this.xoffset,yoffset:this.yoffset});return t._set("source",(0,o.o8)(this.source)),t}hash(){return`${super.hash()}.${this.height}.${this.url}.${this.width}`}};(0,i._)([(0,l.MZ)({json:{write:!1}})],d.prototype,"color",void 0),(0,i._)([(0,a.e)({esriPMS:"picture-marker"},{readOnly:!0})],d.prototype,"type",void 0),(0,i._)([(0,l.MZ)(p.ku)],d.prototype,"url",void 0),(0,i._)([(0,l.MZ)(p.k7)],d.prototype,"source",void 0),(0,i._)([(0,l.MZ)({type:Number,cast:n.cr,json:{write:!0}})],d.prototype,"height",void 0),(0,i._)([(0,u.w)("height",["height","size"])],d.prototype,"readHeight",null),(0,i._)([(0,l.MZ)({type:Number,cast:n.cr,json:{write:!0}})],d.prototype,"width",void 0),(0,i._)([(0,l.MZ)({json:{write:!1}})],d.prototype,"size",void 0),d=s=(0,i._)([(0,h.$)("esri.symbols.PictureMarkerSymbol")],d)},59247:(t,e,r)=>{r.d(e,{bv:()=>a,Fk:()=>u,yG:()=>h,$b:()=>c,Nd:()=>p,jm:()=>d,sK:()=>g});var s=r(40876),i=r(90629);function o(){const t=new Float32Array(16);return t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}const n=o();Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:n,clone:function(t){const e=new Float32Array(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},create:o,fromValues:function(t,e,r,s,i,o,n,l,a,u,h,c,p,d,y,m){const g=new Float32Array(16);return g[0]=t,g[1]=e,g[2]=r,g[3]=s,g[4]=i,g[5]=o,g[6]=n,g[7]=l,g[8]=a,g[9]=u,g[10]=h,g[11]=c,g[12]=p,g[13]=d,g[14]=y,g[15]=m,g}},Symbol.toStringTag,{value:"Module"}));var l=r(58083);class a{constructor(t,e,r){this.strength=t,this.radius=e,this.threshold=r,this.type="bloom"}interpolate(t,e,r){this.strength=y(t.strength,e.strength,r),this.radius=y(t.radius,e.radius,r),this.threshold=y(t.threshold,e.threshold,r)}clone(){return new a(this.strength,this.radius,this.threshold)}toJSON(){return{type:"bloom",radius:m(this.radius),strength:this.strength,threshold:this.threshold}}}class u{constructor(t){this.radius=t,this.type="blur"}interpolate(t,e,r){this.radius=Math.round(y(t.radius,e.radius,r))}clone(){return new u(this.radius)}toJSON(){return{type:"blur",radius:m(this.radius)}}}class h{constructor(t,e){this.type=t,this.amount=e,"invert"!==this.type&&"grayscale"!==this.type&&"sepia"!==this.type||(this.amount=Math.min(this.amount,1))}get colorMatrix(){return this._colorMatrix||this._updateMatrix(),this._colorMatrix}interpolate(t,e,r){this.amount=y(t.amount,e.amount,r),this._updateMatrix()}clone(){return new h(this.type,this.amount)}toJSON(){return{type:this.type,amount:this.amount}}_updateMatrix(){const t=this._colorMatrix||o();switch(this.type){case"brightness":this._colorMatrix=((t,e)=>{const r=(0,l.hZ)(t,e,0,0,0,0,e,0,0,0,0,e,0,0,0,0,1);return(0,l.mg)(r,r)})(t,this.amount);break;case"contrast":this._colorMatrix=((t,e)=>{const r=(0,l.hZ)(t,e,0,0,.5-.5*e,0,e,0,.5-.5*e,0,0,e,.5-.5*e,0,0,0,1);return(0,l.mg)(r,r)})(t,this.amount);break;case"grayscale":this._colorMatrix=(t=>{const e=1-this.amount,r=(0,l.hZ)(t,.2126+.7874*e,.7152-.7152*e,.0722-.0722*e,0,.2126-.2126*e,.7152+.2848*e,.0722-.0722*e,0,.2126-.2126*e,.7152-.7152*e,.0722+.9278*e,0,0,0,0,1);return(0,l.mg)(r,r)})(t);break;case"invert":this._colorMatrix=((t,e)=>{const r=1-2*e,s=(0,l.hZ)(t,r,0,0,e,0,r,0,e,0,0,r,e,0,0,0,1);return(0,l.mg)(s,s)})(t,this.amount);break;case"saturate":this._colorMatrix=((t,e)=>{const r=(0,l.hZ)(t,.213+.787*e,.715-.715*e,.072-.072*e,0,.213-.213*e,.715+.285*e,.072-.072*e,0,.213-.213*e,.715-.715*e,.072+.928*e,0,0,0,0,1);return(0,l.mg)(r,r)})(t,this.amount);break;case"sepia":this._colorMatrix=(t=>{const e=1-this.amount,r=(0,l.hZ)(t,.393+.607*e,.769-.769*e,.189-.189*e,0,.349-.349*e,.686+.314*e,.168-.168*e,0,.272-.272*e,.534-.534*e,.131+.869*e,0,0,0,0,1);return(0,l.mg)(r,r)})(t)}}}class c{constructor(t,e,r,s){this.offsetX=t,this.offsetY=e,this.blurRadius=r,this.color=s,this.type="drop-shadow"}interpolate(t,e,r){this.offsetX=y(t.offsetX,e.offsetX,r),this.offsetY=y(t.offsetY,e.offsetY,r),this.blurRadius=y(t.blurRadius,e.blurRadius,r),this.color[0]=Math.round(y(t.color[0],e.color[0],r)),this.color[1]=Math.round(y(t.color[1],e.color[1],r)),this.color[2]=Math.round(y(t.color[2],e.color[2],r)),this.color[3]=y(t.color[3],e.color[3],r)}clone(){return new c(this.offsetX,this.offsetY,this.blurRadius,[...this.color])}toJSON(){const t=[...this.color];return t[3]*=255,{type:"drop-shadow",xoffset:m(this.offsetX),yoffset:m(this.offsetY),blurRadius:m(this.blurRadius),color:t}}}class p{constructor(t){this.angle=t,this.type="hue-rotate"}get colorMatrix(){return this._colorMatrix||this._updateMatrix(),this._colorMatrix}interpolate(t,e,r){this.angle=y(t.angle,e.angle,r),this._updateMatrix()}clone(){return new p(this.angle)}toJSON(){return{type:"hue-rotate",angle:this.angle}}_updateMatrix(){const t=this._colorMatrix||o();this._colorMatrix=((t,e)=>{const r=Math.sin(e*Math.PI/180),s=Math.cos(e*Math.PI/180),i=(0,l.hZ)(t,.213+.787*s-.213*r,.715-.715*s-.715*r,.072-.072*s+.928*r,0,.213-.213*s+.143*r,.715+.285*s+.14*r,.072-.072*s-.283*r,0,.213-.213*s-.787*r,.715-.715*s+.715*r,.072+.928*s+.072*r,0,0,0,0,1);return(0,l.mg)(i,i)})(t,this.angle)}}class d{constructor(t){this.amount=t,this.type="opacity",this.amount=Math.min(this.amount,1)}interpolate(t,e,r){this.amount=y(t.amount,e.amount,r)}clone(){return new d(this.amount)}toJSON(){return{type:"opacity",amount:this.amount}}}function y(t,e,r){return t+(e-t)*r}function m(t){return Math.round(1e3*(0,i.PN)(t))/1e3}function g(t){switch(t.type){case"grayscale":case"sepia":case"invert":return new h(t.type,0);case"saturate":case"brightness":case"contrast":return new h(t.type,1);case"opacity":return new d(1);case"hue-rotate":return new p(0);case"blur":return new u(0);case"drop-shadow":return new c(0,0,0,[...(0,s.TS)("transparent")]);case"bloom":return new a(0,0,1)}}},63201:(t,e,r)=>{r.r(e),r.d(e,{default:()=>L});var s=r(90237),i=r(92602),o=r(78888),n=r(92071),l=r(74887),a=r(84952),u=r(10107),h=(r(44208),r(53966),r(87811),r(36005)),c=r(40608),p=r(5443),d=r(21325),y=r(4146),m=r(63074),g=r(16131),f=r(8303),S=r(54310),w=r(25036),b=r(10873),_=r(58592),v=r(94985),M=r(31593),A=r(53930),x=r(20378);const P=["atom","xml"],$={base:x.A,key:"type",typeMap:{"simple-line":M.A},errorContext:"symbol"},Z={base:x.A,key:"type",typeMap:{"picture-marker":_.A,"simple-marker":A.A},errorContext:"symbol"},D={base:x.A,key:"type",typeMap:{"simple-fill":v.A},errorContext:"symbol"};let T=class extends((0,m.dM)((0,S.J)((0,g.q)((0,f.A)((0,w.j)((0,n.P)(y.A))))))){constructor(...t){super(...t),this.description=null,this.fullExtent=null,this.legendEnabled=!0,this.lineSymbol=null,this.pointSymbol=null,this.polygonSymbol=null,this.operationalLayerType="GeoRSS",this.url=null,this.type="geo-rss"}normalizeCtorArgs(t,e){return"string"==typeof t?{url:t,...e}:t}readFeatureCollections(t,e){return e.featureCollection.layers.forEach((t=>{const e=t.layerDefinition.drawingInfo.renderer.symbol;e&&"esriSFS"===e.type&&e.outline?.style.includes("esriSFS")&&(e.outline.style="esriSLSSolid")})),e.featureCollection.layers}get hasPoints(){return this._hasGeometry("esriGeometryPoint")}get hasPolylines(){return this._hasGeometry("esriGeometryPolyline")}get hasPolygons(){return this._hasGeometry("esriGeometryPolygon")}get title(){const t=this._get("title");return t&&"defaults"!==this.originOf("title")?t:this.url?(0,a.e7)(this.url,P)||"GeoRSS":t}set title(t){this._set("title",t)}load(t){const e=null!=t?t.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Map Service","Feature Service","Feature Collection","Scene Service"]},t).catch(l.QP).then((()=>this._fetchService(e))).then((t=>{this.read(t,{origin:"service"})}))),Promise.resolve(this)}async hasDataChanged(){const t=await this._fetchService();return this.read(t,{origin:"service",ignoreDefaults:!0}),!0}async _fetchService(t){const e=this.spatialReference,{data:r}=await(0,o.A)(i.A.geoRSSServiceUrl,{query:{url:this.url,refresh:!!this.loaded||void 0,outSR:(0,d.oT)(e)?void 0:e.wkid??JSON.stringify(e)},signal:t});return r}_hasGeometry(t){return this.featureCollections?.some((e=>e.featureSet?.geometryType===t&&e.featureSet.features?.length>0))??!1}};(0,s._)([(0,u.MZ)()],T.prototype,"description",void 0),(0,s._)([(0,u.MZ)()],T.prototype,"featureCollections",void 0),(0,s._)([(0,h.w)("service","featureCollections",["featureCollection.layers"])],T.prototype,"readFeatureCollections",null),(0,s._)([(0,u.MZ)({type:p.A,json:{name:"lookAtExtent"}})],T.prototype,"fullExtent",void 0),(0,s._)([(0,u.MZ)(b.id)],T.prototype,"id",void 0),(0,s._)([(0,u.MZ)(b.fV)],T.prototype,"legendEnabled",void 0),(0,s._)([(0,u.MZ)({types:$,json:{write:!0}})],T.prototype,"lineSymbol",void 0),(0,s._)([(0,u.MZ)({type:["show","hide"]})],T.prototype,"listMode",void 0),(0,s._)([(0,u.MZ)({types:Z,json:{write:!0}})],T.prototype,"pointSymbol",void 0),(0,s._)([(0,u.MZ)({types:D,json:{write:!0}})],T.prototype,"polygonSymbol",void 0),(0,s._)([(0,u.MZ)({type:["GeoRSS"]})],T.prototype,"operationalLayerType",void 0),(0,s._)([(0,u.MZ)(b.OZ)],T.prototype,"url",void 0),(0,s._)([(0,u.MZ)({json:{origins:{service:{read:{source:"name",reader:t=>t||void 0}}}}})],T.prototype,"title",null),(0,s._)([(0,u.MZ)({readOnly:!0,json:{read:!1},value:"geo-rss"})],T.prototype,"type",void 0),T=(0,s._)([(0,c.$)("esri.layers.GeoRSSLayer")],T);const L=T},64272:(t,e,r)=>{r.d(e,{T:()=>p});var s,i=r(90237),o=r(25482),n=r(88930),l=r(10107),a=(r(44208),r(53966),r(87811),r(36005)),u=r(40608),h=r(43937),c=r(98623);let p=class extends o.A{static{s=this}static get allTime(){return d}static get empty(){return y}static fromArray(t){return new s({start:null!=t[0]?new Date(t[0]):t[0],end:null!=t[1]?new Date(t[1]):t[1]})}constructor(t){super(t),this.end=null,this.start=null}readEnd(t,e){return null!=e.end?new Date(e.end):null}writeEnd(t,e){e.end=t?.getTime()??null}get isAllTime(){return this.equals(s.allTime)}get isEmpty(){return this.equals(s.empty)}readStart(t,e){return null!=e.start?new Date(e.start):null}writeStart(t,e){e.start=t?.getTime()??null}clone(){return new s({end:this.end,start:this.start})}equals(t){if(!t)return!1;const e=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,s=t.start?.getTime()??t.start,i=t.end?.getTime()??t.end;return e===s&&r===i}expandTo(t,e=c.qU){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=(0,n.lL)(r,t,e));let i=this.end;if(i){const r=(0,n.lL)(i,t,e);i=i.getTime()===r.getTime()?r:(0,n.S1)(r,1,t,e)}return new s({start:r,end:i})}intersection(t){if(!t)return this.clone();if(this.isEmpty||t.isEmpty)return s.empty;if(this.isAllTime)return t.clone();if(t.isAllTime)return this.clone();const e=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,i=t.start?.getTime()??-1/0,o=t.end?.getTime()??1/0;let n,l;return i>=e&&i<=r?n=i:e>=i&&e<=o&&(n=e),r>=i&&r<=o?l=r:o>=e&&o<=r&&(l=o),null==n||null==l||isNaN(n)||isNaN(l)?s.empty:new s({start:n===-1/0?null:new Date(n),end:l===1/0?null:new Date(l)})}offset(t,e,r=c.qU){if(this.isEmpty||this.isAllTime)return this.clone();const i=new s,{start:o,end:l}=this;return null!=o&&(i.start=(0,n.S1)(o,t,e,r)),null!=l&&(i.end=(0,n.S1)(l,t,e,r)),i}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(t){if(!t||t.isEmpty)return this.clone();if(this.isEmpty)return t.clone();if(this.isAllTime||t.isAllTime)return d.clone();const e=null!=this.start&&null!=t.start?new Date(Math.min(this.start.getTime(),t.start.getTime())):null,r=null!=this.end&&null!=t.end?new Date(Math.max(this.end.getTime(),t.end.getTime())):null;return new s({start:e,end:r})}};(0,i._)([(0,l.MZ)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"end",void 0),(0,i._)([(0,a.w)("end")],p.prototype,"readEnd",null),(0,i._)([(0,h.K)("end")],p.prototype,"writeEnd",null),(0,i._)([(0,l.MZ)({readOnly:!0,json:{read:!1}})],p.prototype,"isAllTime",null),(0,i._)([(0,l.MZ)({readOnly:!0,json:{read:!1}})],p.prototype,"isEmpty",null),(0,i._)([(0,l.MZ)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"start",void 0),(0,i._)([(0,a.w)("start")],p.prototype,"readStart",null),(0,i._)([(0,h.K)("start")],p.prototype,"writeStart",null),p=s=(0,i._)([(0,u.$)("esri.time.TimeExtent")],p);const d=new p,y=new p({start:void 0,end:void 0})},65851:(t,e,r)=>{r.d(e,{A:()=>a});var s=r(90237),i=r(10107),o=(r(44208),r(53966),r(87811),r(40608)),n=r(31593),l=r(20378);let a=class extends l.A{constructor(t){super(t),this.outline=null,this.type=null}hash(){return`${this.type}.${this.outline?.hash()}`}};(0,s._)([(0,i.MZ)({types:{key:"type",base:null,defaultKeyValue:"simple-line",typeMap:{"simple-line":n.A}},json:{default:null,write:!0}})],a.prototype,"outline",void 0),(0,s._)([(0,i.MZ)({type:["simple-fill","picture-fill"],readOnly:!0})],a.prototype,"type",void 0),a=(0,s._)([(0,o.$)("esri.symbols.FillSymbol")],a)},68197:(t,e,r)=>{r.d(e,{A:()=>c});var s,i,o=r(40876),n=r(34727),l=r(56507);function a(t){return(0,n.qE)((0,l.Vr)(t),0,255)}function u(t,e){const r=t.toString(16).padStart(2,"0");return e?r.slice(0,1):r}class h{static blendColors(t,e,r,s=new h){return s.r=Math.round(t.r+(e.r-t.r)*r),s.g=Math.round(t.g+(e.g-t.g)*r),s.b=Math.round(t.b+(e.b-t.b)*r),s.a=t.a+(e.a-t.a)*r,s._sanitize()}static fromRgb(t,e){const r=(0,o.lT)(t);return r?h.fromArray(r,e):null}static fromHex(t,e=new h){const r=(0,o.oW)(t);return r?h.fromArray(r,e):null}static fromArray(t,e=new h){return e._set(Number(t[0]),Number(t[1]),Number(t[2]),Number(t[3])),isNaN(e.a)&&(e.a=1),e._sanitize()}static fromString(t,e){const r=(0,o.Eq)(t);return r?h.fromArray(r,e):null}static fromJSON(t){return null!=t?new h([t[0],t[1],t[2],(t[3]??255)/255]):void 0}static toUnitRGB(t){return null!=t?[t.r/255,t.g/255,t.b/255]:null}static toUnitRGBA(t){return null!=t?[t.r/255,t.g/255,t.b/255,null!=t.a?t.a:1]:null}constructor(t){this.r=255,this.g=255,this.b=255,this.a=1,t&&this.setColor(t)}get isBright(){return.299*this.r+.587*this.g+.114*this.b>=127}setColor(t){return"string"==typeof t?h.fromString(t,this):Array.isArray(t)?h.fromArray(t,this):(this._set(t.r??0,t.g??0,t.b??0,t.a??1),t instanceof h||this._sanitize()),this}toRgb(){return[this.r,this.g,this.b]}toRgba(){return[this.r,this.g,this.b,this.a]}toHex(t){const e=t?.capitalize??!1,r=t?.digits??6,s=3===r||4===r,i=4===r||8===r,o=`#${u(this.r,s)}${u(this.g,s)}${u(this.b,s)}${i?u(Math.round(255*this.a),s):""}`;return e?o.toUpperCase():o}toCss(t=!1){const e=this.r+", "+this.g+", "+this.b;return t?`rgba(${e}, ${this.a})`:`rgb(${e})`}toString(){return this.toCss(!0)}toJSON(){return this.toArray()}toArray(t=h.AlphaMode.ALWAYS){const e=a(this.r),r=a(this.g),s=a(this.b);return t===h.AlphaMode.ALWAYS||1!==this.a?[e,r,s,a(255*this.a)]:[e,r,s]}clone(){return new h(this.toRgba())}hash(){return this.r<<24|this.g<<16|this.b<<8|255*this.a}equals(t){return null!=t&&t.r===this.r&&t.g===this.g&&t.b===this.b&&t.a===this.a}_sanitize(){return this.r=(0,o.c1)(this.r),this.g=(0,o.c1)(this.g),this.b=(0,o.c1)(this.b),this.a=(0,o.G1)(this.a),this}_set(t,e,r,s){this.r=t,this.g=e,this.b=r,this.a=s}}h.prototype.declaredClass="esri.Color",(i=(s=h||(h={})).AlphaMode||(s.AlphaMode={}))[i.ALWAYS=0]="ALWAYS",i[i.UNLESS_OPAQUE=1]="UNLESS_OPAQUE";const c=h},69540:(t,e,r)=>{r.d(e,{A:()=>p});var s=r(90237),i=r(69622),o=(r(44208),r(4718)),n=(r(53966),r(97768)),l=r(35666),a=r(88620),u=r(40608);const h=t=>{let e=class extends t{clone(){const t=(0,a.oY)(this);(0,n.Lw)(t,"unable to clone instance of non-accessor class");const e=t.metadata,r=t.store,s={},i=new Map;for(const t in e){const n=e[t],a=r?.originOf(t),u=n.clonable;if(n.readOnly||!1===u||a!==l.Gr.USER&&a!==l.Gr.DEFAULTS&&a!==l.Gr.WEB_MAP&&a!==l.Gr.WEB_SCENE)continue;const h=this[t];let c=null;c="function"==typeof u?u(h):"reference"===u?h:(0,o.TU)(h),null!=h&&null==c||(a===l.Gr.DEFAULTS?i.set(t,c):s[t]=c)}const u=new(0,Object.getPrototypeOf(this).constructor)(s);if(i.size){const t=(0,a.oY)(u)?.store;if(t)for(const[e,r]of i)t.set(e,r,l.Gr.DEFAULTS)}return u}};return e=(0,s._)([(0,u.$)("esri.core.Clonable")],e),e};let c=class extends(h(i.A)){};c=(0,s._)([(0,u.$)("esri.core.Clonable")],c),(c||(c={})).ClonableMixin=h;const p=c},77040:(t,e,r)=>{r.d(e,{k7:()=>l,ku:()=>n});var s=r(84952),i=r(97159);function o(t,e){if(!(0,s.oP)(t)){const r=function(t){if(!t)return null;const{origin:e,layer:r}=t;if("service"!==e&&"portal-item"!==e)return null;const s=r?.type;return"feature"===s||"stream"===s?r.parsedUrl?.path:"map-image"===s||"tile"===s?t.url?.path:null}(e);if(r)return(0,s.fj)(r,"images",t)}return(0,i.f)(t,e)}const n={json:{read:{source:["imageData","url"],reader:function(t,e,r){return e.imageData?(0,s.Hg)({mediaType:e.contentType||"image/png",isBase64:!0,data:e.imageData}):o(e.url,r)}},write:{writer(t,e,r,o){!function(t,e,r,o){if((0,s.DB)(t)){const n=(0,s.r$)(t);if(!n)return;e.contentType=n.mediaType,e.imageData=n.data,r&&r.imageData===e.imageData&&r.url&&(0,i.w)(r.url,e,"url",o)}else(0,i.w)(t,e,"url",o)}(t,e,this.source,o)}}}},l={readOnly:!0,json:{read:{source:["imageData","url"],reader(t,e,r){const s={};return e.imageData&&(s.imageData=e.imageData),e.contentType&&(s.contentType=e.contentType),e.url&&(s.url=o(e.url,r)),s}}}}},78553:(t,e,r)=>{r.d(e,{D:()=>o,p:()=>i});var s=r(56507);function i(t){const e=(0,s.Vr)(100*(1-t));return Math.max(0,Math.min(e,100))}function o(t){const e=1-t/100;return Math.max(0,Math.min(e,1))}},83213:(t,e,r)=>{r.d(e,{x:()=>s,z:()=>i});const s=["begin","end","begin-end"],i=["arrow","circle","square","diamond","cross","x"]},89420:(t,e,r)=>{r.d(e,{A:()=>u});var s=r(90237),i=r(90629),o=r(10107),n=r(56507),l=(r(44208),r(87811),r(40608)),a=r(20378);let u=class extends a.A{constructor(t){super(t),this.angle=0,this.type=null,this.xoffset=0,this.yoffset=0,this.size=9}hash(){return`${this.type}.${this.angle}.${this.size}.${this.xoffset}.${this.yoffset}`}};(0,s._)([(0,o.MZ)({type:Number,json:{read:t=>t&&-1*t,write:(t,e)=>e.angle=t&&-1*t}})],u.prototype,"angle",void 0),(0,s._)([(0,o.MZ)({type:["simple-marker","picture-marker"],readOnly:!0})],u.prototype,"type",void 0),(0,s._)([(0,o.MZ)({type:Number,cast:i.cr,json:{write:!0}})],u.prototype,"xoffset",void 0),(0,s._)([(0,o.MZ)({type:Number,cast:i.cr,json:{write:!0}})],u.prototype,"yoffset",void 0),(0,s._)([(0,o.MZ)({cast:t=>"auto"===t?t:(0,n.GB)((0,i.cr)(t)),json:{write:!0}})],u.prototype,"size",void 0),u=(0,s._)([(0,l.$)("esri.symbols.MarkerSymbol")],u)},90629:(t,e,r)=>{r.d(e,{Lz:()=>n,PN:()=>l,cr:()=>a,tc:()=>u});const s=/^-?(\d+(\.\d+)?)\s*((px)|(pt))?$/i,i="screenUtils.toPt: input not recognized!",o=96;function n(t){return t?t/72*o:0}function l(t){return t?72*t/o:0}function a(t){if("string"==typeof t){const e=t.match(s);if(e){const r=Number(e[1]),s=e[3]&&e[3].toLowerCase(),i="-"===t.charAt(0),o="px"===s?l(r):r;return i?-o:o}return console.warn(i),null}return t}function u(t=0,e=0){return{x:t,y:e}}},94985:(t,e,r)=>{r.d(e,{A:()=>y});var s,i=r(90237),o=r(68197),n=r(66552),l=r(4718),a=r(10107),u=(r(44208),r(53966),r(93223)),h=r(40608),c=r(65851),p=r(31593);const d=new n.J({esriSFSSolid:"solid",esriSFSNull:"none",esriSFSHorizontal:"horizontal",esriSFSVertical:"vertical",esriSFSForwardDiagonal:"forward-diagonal",esriSFSBackwardDiagonal:"backward-diagonal",esriSFSCross:"cross",esriSFSDiagonalCross:"diagonal-cross"});let y=s=class extends c.A{constructor(...t){super(...t),this.color=new o.A([0,0,0,.25]),this.outline=new p.A,this.type="simple-fill",this.style="solid"}normalizeCtorArgs(t,e,r){if(t&&"string"!=typeof t)return t;const s={};return t&&(s.style=t),e&&(s.outline=e),r&&(s.color=r),s}clone(){return new s({color:(0,l.o8)(this.color),outline:this.outline&&this.outline.clone(),style:this.style})}hash(){return`${super.hash()}${this.style}.${this.color&&this.color.hash()}`}};(0,i._)([(0,a.MZ)()],y.prototype,"color",void 0),(0,i._)([(0,a.MZ)()],y.prototype,"outline",void 0),(0,i._)([(0,u.e)({esriSFS:"simple-fill"},{readOnly:!0})],y.prototype,"type",void 0),(0,i._)([(0,a.MZ)({type:d.apiValues,json:{read:d.read,write:d.write}})],y.prototype,"style",void 0),y=s=(0,i._)([(0,h.$)("esri.symbols.SimpleFillSymbol")],y)}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3186],{17311:(e,t,i)=>{i.d(t,{A:()=>d});var s=i(90237),r=i(69622),n=i(60999),a=i(5503),l=i(10107),o=(i(44208),i(53966),i(87811),i(40608)),u=i(30524),c=i(43668);let d=class extends r.A{constructor(e){super(e),this._featureUtils=null,this.effectivePopupTemplate=null}get _arcadeTask(){return this.expressionsUsedInTitle.length>0?this._get("_arcadeTask")||(0,n.UT)((()=>(0,c.l)())):null}get featureUtilsPromise(){return this._get("featureUtilsPromise")??Promise.all([i.e(4560),i.e(9926)]).then(i.bind(i,29926)).then((e=>this._featureUtils=e))}get calculatedExpressions(){const e=new a.A;if(!this.expressionsUsedInTitle.length)return e;if(!this._arcadeTask?.value){for(const t of this.expressionsUsedInTitle??[])e.push({name:t.name,invalid:!0});return e}for(const t of this.expressionsUsedInTitle)try{const i=this._arcadeTask.value.arcade.parseScript(t.expression,["$layer","$map","$datastore"]);if(i.isAsync){e.push({name:t.name,invalid:!0});break}e.push({name:t.name,syntax:i,invalid:!1,func:this._arcadeTask.value.arcade.compileScript(i,{vars:{$feature:"any"}})})}catch{e.push({name:t.name,invalid:!0});break}return e}get expressionsUsedInTitle(){let e=this.effectivePopupTemplate?.title??"";return"string"!=typeof e?[]:(e=e.toLowerCase(),this.effectivePopupTemplate?.expressionInfos?.filter((t=>e.includes(`{expression/${t.name.toLowerCase()}}`)))??[])}get fieldInfoMap(){return this._featureUtils?this._createFieldInfoMap(this._featureUtils.getAllFieldInfos(this.effectivePopupTemplate)):null}get hasBadExpressions(){return this.calculatedExpressions.some((e=>!0===e.invalid))}get requiredFields(){const e=new Set;if(this._arcadeTask?.value&&!this.hasBadExpressions)for(const t of this.calculatedExpressions?.toArray()??[])try{const i=this._arcadeTask.value.arcade.extractFieldLiterals(t.syntax);for(const t of i){const i=t.split("."),s=this.fieldsIndex.get(i.at(-1)??"");s&&e.add(s.name)}}catch{}const t=this._extractFieldNames(this.workingTitle);for(const i of t){const t=this.fieldsIndex.get(i);t&&e.add(t.name)}return e}get titleFromDisplayField(){let e="";return this.displayField&&(e=this.fieldsIndex.get(this.displayField)?.name??""),e||(e=this.fieldsIndex.get(this.objectIdField)?.name??""),e?`{${e}}`:""}get workingTitle(){const e=this.effectivePopupTemplate?this.effectivePopupTemplate.title:"";return""===e||null==e||this.hasBadExpressions||"string"!=typeof e?this.titleFromDisplayField:e}async getTitle(e,t,i){try{const{attributes:s}=t,r=i?.timeZone??"system",[{substituteFieldsInLinksAndAttributes:n}]=await Promise.all([this.featureUtilsPromise,this._arcadeTask?.promise]);if(i.fetchMissingFields&&(t=await this._checkAndReQueryGraphic(e,t)),this.workingTitle&&this.fieldInfoMap){const i=this._createFormattedAttributes(e,t,r).global;return n({attributes:s,expressionAttributes:null,fieldInfoMap:this.fieldInfoMap,globalAttributes:i,layer:e,text:this.workingTitle})}return""}catch{}return""}async _checkAndReQueryGraphic(e,t){const i=t.getObjectId();if(null==i)return t;if(!(0,u.Kl)(t,this.requiredFields)){const t=e.createQuery();t.where="1=1",t.outFields=[...this.requiredFields],t.objectIds=[i];const s=await e.queryFeatures(t);if(1===s?.features.length)return s.features[0]}return t}_createFieldInfoMap(e){const t=new Map;if(!e)return t;for(const i of e){if(!i.fieldName)continue;const e=this.fieldsIndex.get(i.fieldName),s=e?.name??i.fieldName;i.fieldName=s,t.set(s.toLowerCase(),i)}return t}_createFormattedAttributes(e,t,i="system"){const s=this.effectivePopupTemplate?.fieldInfos??[],r={};if(!this._featureUtils)return{};if(!this.hasBadExpressions&&this.calculatedExpressions.length>0&&this._arcadeTask?.value){const i=this._arcadeTask.value.Feature.createFromGraphicLikeObject(t.geometry,t.attributes,e,null);for(const e of this.calculatedExpressions)try{r[`expression/${e.name}`]=e.func({vars:{$feature:i}})}catch{}}const n={...t.attributes,...r};return{global:this._featureUtils.formatAttributes({fieldInfos:s,attributes:n,graphic:t,timeZone:i,layer:e,fieldInfoMap:this.fieldInfoMap}),content:[]}}_extractFieldNames(e){return(0,u.nw)(e).filter((e=>!(0===e.indexOf("relationships/")||0===e.indexOf("expression/"))))}};(0,s._)([(0,l.MZ)({readOnly:!0})],d.prototype,"_arcadeTask",null),(0,s._)([(0,l.MZ)()],d.prototype,"_featureUtils",void 0),(0,s._)([(0,l.MZ)({readOnly:!0})],d.prototype,"featureUtilsPromise",null),(0,s._)([(0,l.MZ)({readOnly:!0})],d.prototype,"calculatedExpressions",null),(0,s._)([(0,l.MZ)()],d.prototype,"displayField",void 0),(0,s._)([(0,l.MZ)()],d.prototype,"effectivePopupTemplate",void 0),(0,s._)([(0,l.MZ)()],d.prototype,"expressionsUsedInTitle",null),(0,s._)([(0,l.MZ)()],d.prototype,"fieldsIndex",void 0),(0,s._)([(0,l.MZ)()],d.prototype,"fieldInfoMap",null),(0,s._)([(0,l.MZ)()],d.prototype,"fields",void 0),(0,s._)([(0,l.MZ)()],d.prototype,"objectIdField",void 0),(0,s._)([(0,l.MZ)()],d.prototype,"requiredFields",null),d=(0,s._)([(0,o.$)("esri.layers.support.TitleCreator")],d)},41560:(e,t,i)=>{i.d(t,{Ch:()=>a,mW:()=>n});var s=i(34727),r=i(39516);function n(e,t){return{...t,filterMode:e.mode}}function a(e,t,i){const n=function(e){if("manual"===u(e))return null;const t=[Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY];for(const{minScale:i,maxScale:s}of e.filters)t[0]=Math.max(t[0],c(i)),t[1]=Math.min(t[1],d(s));return t}(e);if(n&&((0,s.gg)(t,n[0])||(0,s.ZH)(i,n[1])))return"";const a=Array.from(l(e,t,i)),o=function(e,t,i){if(0===e.length)return!0;const r=c(e.at(0)?.minScale),n=d(e.at(-1)?.maxScale);if((0,s.ZH)(r,t)||(0,s.gg)(n,i))return!0;for(let t=0;t<e.length-1;t++){const i=e[t],r=e[t+1];if((0,s.ZH)(c(r.minScale),d(i.maxScale)))return!0}return!1}(a,t,i)?"1=1":a.map((e=>e.where||"1=1")).reduce(((e,t)=>(0,r.IW)(e,t)),"");return o&&"1=1"!==o?o:""}function*l(e,t,i){if("manual"===u(e)){const t=e.filters.find((t=>t.id===e.activeFilterId));t&&(yield t)}else{"object"==typeof t&&(t=t.scale);for(const s of e.filters)o(s.minScale,s.maxScale,t,i)&&(yield s)}}function o(e,t,i,r){return e=c(e),i=c(i),t=d(t),!(!(0,s.Sp)(i,e)&&(r??i)>e||(0,s.Hx)(t,i)||void 0!==r&&(0,s.Sp)(r,e))}function u(e){return"mode"in e?e.mode:e.filterMode}function c(e){return e||Number.POSITIVE_INFINITY}function d(e){return e||0}},92935:(e,t,i)=>{var s;i.d(t,{X:()=>s}),function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(s||(s={}))}}]);
|