@arcgis/core 4.28.0-next.20230621 → 4.28.0-next.20230623
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/Basemap.js +1 -1
- package/arcade/ArcadeModuleResolver.js +1 -1
- package/arcade/Feature.js +1 -1
- package/arcade/arcadeCompiler.js +1 -1
- package/arcade/arcadeTimeUtils.js +1 -1
- package/arcade/featureset/actions/GroupBy.js +1 -1
- package/arcade/featureset/sources/FeatureLayerDynamic.js +1 -1
- package/arcade/featureset/support/sqlUtils.js +1 -1
- package/arcade/functions/date.js +1 -1
- package/arcade/functions/geomasync.js +1 -1
- package/arcade/functions/geometry.js +1 -1
- package/arcade/functions/geomsync.js +1 -1
- package/arcade/functions/string.js +1 -1
- package/arcade/languageUtils.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/0380e9f61b6f3ca85139.js +1 -0
- package/assets/esri/core/workers/chunks/0bd95f46a0a9005a19f9.js +1 -0
- package/assets/esri/core/workers/chunks/0c621046b7211cdde980.js +1 -0
- package/assets/esri/core/workers/chunks/0e0267739728e5413f1d.js +1 -0
- package/assets/esri/core/workers/chunks/{39079bcfd35ed73c4e34.js → 156e801a3262f0ac79c0.js} +1 -1
- package/assets/esri/core/workers/chunks/19b4f02fb2392d964582.js +1 -0
- package/assets/esri/core/workers/chunks/1ae75f5282e983f6d768.js +1 -0
- package/assets/esri/core/workers/chunks/2179b3e9e532ca8ef982.js +1 -0
- package/assets/esri/core/workers/chunks/21aaa7fa0e5482670010.js +1 -0
- package/assets/esri/core/workers/chunks/26212a08ea383547335b.js +1 -0
- package/assets/esri/core/workers/chunks/{2420ec029236ab31d908.js → 2882a55a971af1f7858b.js} +1 -1
- package/assets/esri/core/workers/chunks/294285f2822c101326ec.js +1 -0
- package/assets/esri/core/workers/chunks/29f9a380610e4fd98a7c.js +1 -0
- package/assets/esri/core/workers/chunks/303238fc2fcdbb277981.js +1 -0
- package/assets/esri/core/workers/chunks/{3db8ae98799c752afe60.js → 34958516e604d487c625.js} +1 -1
- package/assets/esri/core/workers/chunks/3bee743f4c9370045a5d.js +1 -0
- package/assets/esri/core/workers/chunks/{8e08968505483dc58e00.js → 40ee4e0a5000a08c3abd.js} +1 -1
- package/assets/esri/core/workers/chunks/4128e45e17c9e5280e11.js +1 -0
- package/assets/esri/core/workers/chunks/4f88c4d1d2103843aca8.js +1 -0
- package/assets/esri/core/workers/chunks/505792ce8cbbddd2e815.js +1 -0
- package/assets/esri/core/workers/chunks/{3d42fa4ab5f8632d690a.js → 5237b3938be0d4bc6045.js} +1 -1
- package/assets/esri/core/workers/chunks/{57077e608f20d3a931e8.js → 570e94f4fbefc856d303.js} +1 -1
- package/assets/esri/core/workers/chunks/{4b235d1b6a72773cd4f4.js → 57bb8516fa998a0fba78.js} +1 -1
- package/assets/esri/core/workers/chunks/57bf3ff01d738cedc292.js +1 -0
- package/assets/esri/core/workers/chunks/{1e9e68312cd865358260.js → 60486acc5dacf73f851a.js} +1 -1
- package/assets/esri/core/workers/chunks/6208f2dfa9dfd3bca000.js +1 -0
- package/assets/esri/core/workers/chunks/64008bde5d3ffd9f2499.js +1 -0
- package/assets/esri/core/workers/chunks/69f51a7768bf51c9e346.js +1 -0
- package/assets/esri/core/workers/chunks/719f741a0e45c3e694ba.js +1 -0
- package/assets/esri/core/workers/chunks/{cfe379a78a983373b3ac.js → 7304f45f5622a68253e4.js} +1 -1
- package/assets/esri/core/workers/chunks/733b70d6e5c466a67e9c.js +1 -0
- package/assets/esri/core/workers/chunks/7694521b44681d52b713.js +1 -0
- package/assets/esri/core/workers/chunks/840fd05ceaa038c476d6.js +1 -0
- package/assets/esri/core/workers/chunks/89f7fd2ab92aa14fe0c0.js +1 -0
- package/assets/esri/core/workers/chunks/8a6f29f2ebd59783bb1b.js +1 -0
- package/assets/esri/core/workers/chunks/9d487b7817ccf5bceff6.js +1 -0
- package/assets/esri/core/workers/chunks/{42b6315e21c4c1345ba5.js → 9f5337a80963e0b3c009.js} +1 -1
- package/assets/esri/core/workers/chunks/a0face18b3ea567999ef.js +1 -0
- package/assets/esri/core/workers/chunks/b773c8854e98384ac8ac.js +1 -0
- package/assets/esri/core/workers/chunks/{fb44d872b9dbadcf8ccf.js → b9ef05c22bc3e395bcb3.js} +1 -1
- package/assets/esri/core/workers/chunks/bc5e34200776cfc83d5b.js +1 -0
- package/assets/esri/core/workers/chunks/{cfc3dcca2b69d20d5375.js → c0b9cc091efd5db827de.js} +1 -1
- package/assets/esri/core/workers/chunks/c9f5e949830196ad9458.js +1 -0
- package/assets/esri/core/workers/chunks/{036301f545aba2b8e485.js → cc15e28a99694120556d.js} +1 -1
- package/assets/esri/core/workers/chunks/ce7f575a6c2053c7ca17.js +1 -0
- package/assets/esri/core/workers/chunks/ce9c99cee3d1a3963e7c.js +1 -0
- package/assets/esri/core/workers/chunks/cf9a87b53ea74bae6a37.js +1 -0
- package/assets/esri/core/workers/chunks/d16850b98a53ade0de10.js +1 -0
- package/assets/esri/core/workers/chunks/d24f7ef6eca8c91b90b4.js +1 -0
- package/assets/esri/core/workers/chunks/dbd86e4b7983873cbe7c.js +1 -0
- package/assets/esri/core/workers/chunks/{3c3f65913006b84b2289.js → de20572d334abd4a7d82.js} +1 -1
- package/assets/esri/core/workers/chunks/e009e7f074a572894f48.js +1 -0
- package/assets/esri/core/workers/chunks/{cb004c492e22c50f9bfa.js → f3eb89cff63e00f036c6.js} +1 -1
- package/assets/esri/core/workers/chunks/{b2a423d9ce8bb784267c.js → f53f20c7100092823487.js} +1 -1
- package/assets/esri/core/workers/chunks/f6040205c50e2795a1a0.js +1 -0
- package/assets/esri/core/workers/chunks/{915734255a79bff3ef0f.js → fcd54e9e64c2864f183c.js} +1 -1
- package/assets/esri/t9n/common.json +1 -1
- package/assets/esri/t9n/common_en.json +1 -1
- package/assets/esri/themes/base/_core.scss +6 -2
- package/assets/esri/themes/base/_mixins.scss +0 -147
- package/assets/esri/themes/base/widgets/_AreaMeasurement2D.scss +0 -8
- package/assets/esri/themes/base/widgets/_AreaMeasurement3D.scss +0 -8
- package/assets/esri/themes/base/widgets/_DirectLineMeasurement3D.scss +0 -1
- package/assets/esri/themes/base/widgets/_DistanceMeasurement2D.scss +0 -1
- package/assets/esri/themes/base/widgets/_MeasurementWidgetContent.scss +67 -0
- package/assets/esri/themes/base/widgets/_Slice.scss +17 -54
- package/assets/esri/themes/base/widgets/_UnitSelect.scss +14 -0
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/assets/esri/widgets/AreaMeasurement2D/t9n/AreaMeasurement2D.json +1 -1
- package/assets/esri/widgets/AreaMeasurement2D/t9n/AreaMeasurement2D_en.json +1 -1
- package/assets/esri/widgets/AreaMeasurement3D/t9n/AreaMeasurement3D.json +1 -1
- package/assets/esri/widgets/AreaMeasurement3D/t9n/AreaMeasurement3D_en.json +1 -1
- package/assets/esri/widgets/DirectLineMeasurement3D/t9n/DirectLineMeasurement3D.json +1 -1
- package/assets/esri/widgets/DirectLineMeasurement3D/t9n/DirectLineMeasurement3D_en.json +1 -1
- package/assets/esri/widgets/DistanceMeasurement2D/t9n/DistanceMeasurement2D.json +1 -1
- package/assets/esri/widgets/DistanceMeasurement2D/t9n/DistanceMeasurement2D_en.json +1 -1
- package/chunks/HUDMaterial.glsl.js +39 -39
- package/chunks/HighlightBlur.glsl.js +2 -2
- package/chunks/ShadowHighlight.glsl.js +1 -1
- package/chunks/arcade.js +1 -1
- package/chunks/languageUtils.js +1 -1
- package/core/HandleOwner.js +1 -1
- package/core/promiseUtils.js +1 -1
- package/core/support/{WatchUpdatingTracking.js → UpdatingHandles.js} +1 -1
- package/core/workers/workerFactory.js +1 -1
- package/geometry/projection.js +1 -1
- package/interfaces.d.ts +270 -5
- package/kernel.js +1 -1
- package/layers/Layer.js +1 -1
- package/layers/LinkChartLayer.d.ts +4 -0
- package/layers/LinkChartLayer.js +1 -1
- package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
- package/layers/mixins/PortalLayer.js +1 -1
- package/layers/support/TileInfoTilemapCache.js +1 -1
- package/package.json +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/cimAnalyzer.js +1 -1
- package/views/2d/layers/features/controllers/FeatureController2D.js +1 -1
- package/views/2d/layers/features/sources/DataTileSource.js +1 -1
- package/views/2d/layers/features/support/AttributeStore.js +1 -1
- package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
- package/views/2d/layers/imagery/ImageryTileView2D.js +1 -1
- package/views/3d/analysis/Dimension/LengthDimensionSubTool.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightVisualization.js +1 -1
- package/views/3d/environment/ChapmanAtmosphere.js +1 -1
- package/views/3d/environment/CloudsGenerator.js +1 -1
- package/views/3d/environment/EnvironmentRenderer.js +1 -1
- package/views/3d/environment/Precipitation.js +1 -1
- package/views/3d/environment/SceneViewEnvironmentManager.js +1 -1
- package/views/3d/environment/Stars.js +1 -1
- package/views/3d/interactive/editingTools/moveGraphic/GraphicMoveTool.js +1 -1
- package/views/3d/interactive/editingTools/reshapeGraphic/ReshapeOperation.js +1 -1
- package/views/3d/interactive/editingTools/transformGraphic/GraphicTransformTool.js +1 -1
- package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DTool.js +1 -1
- package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DTool.js +1 -1
- package/views/3d/interactive/visualElements/PointVisualElement.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/ImageryTileLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
- package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DLineCalloutSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DScaleVisibility.js +1 -1
- package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/GraphicsProcessor.js +1 -1
- package/views/3d/layers/graphics/Labeler.js +1 -1
- package/views/3d/layers/graphics/labelPlacement.js +1 -1
- package/views/3d/layers/support/FeatureTileTree3DDebugger.js +1 -1
- package/views/3d/layers/support/FeatureVisibilityFilter.js +1 -1
- package/views/3d/layers/support/HeatmapFeatureProcessor.js +1 -1
- package/views/3d/state/ViewState.js +1 -1
- package/views/3d/state/ViewStateManager.js +1 -1
- package/views/3d/support/DisplayQualityProfile.js +1 -1
- package/views/3d/support/MemoryController.js +1 -1
- package/views/3d/support/SceneViewPerformanceInfo.js +1 -1
- package/views/3d/support/cameraUtils.js +1 -1
- package/views/3d/support/viewpointUtils.js +1 -1
- package/views/3d/terrain/OverlayFramebufferObject.js +1 -1
- package/views/3d/terrain/OverlayManager.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/webgl-engine/Stage.js +1 -1
- package/views/3d/webgl-engine/core/FBOCache.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/hud/HUDOcclusionPass.glsl.js +6 -7
- package/views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js +1 -1
- package/views/3d/webgl-engine/lib/Highlight.js +1 -1
- package/views/3d/webgl-engine/lib/OffscreenRendering.js +1 -1
- package/views/3d/webgl-engine/lib/RenderPluginManager.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/SSAOHelper.js +1 -1
- package/views/3d/webgl-engine/lib/SmaaRenderPass.js +1 -1
- package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
- package/views/LayerViewManager.js +1 -1
- package/views/ToolViewManager.js +1 -1
- package/views/draw/DrawOperation.js +1 -1
- package/views/draw/PointDrawAction.js +1 -1
- package/views/interactive/snapping/FeatureSnappingEngine.js +1 -1
- package/views/interactive/snapping/featureSources/FeatureServiceSnappingSource.js +1 -1
- package/views/interactive/snapping/featureSources/GraphicsSnappingSource.js +1 -1
- package/views/interactive/snapping/featureSources/I3SSnappingSource.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorker.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorkerHandle.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiledFetcher.js +1 -1
- package/views/layers/LayerView.js +1 -1
- package/views/overlay/ViewOverlay.js +1 -1
- package/views/webgl/Texture.js +1 -1
- package/widgets/AreaMeasurement2D.js +1 -1
- package/widgets/AreaMeasurement3D.js +1 -1
- package/widgets/DirectLineMeasurement3D.js +1 -1
- package/widgets/DistanceMeasurement2D.js +1 -1
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor/Workflow.js +1 -1
- package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
- package/widgets/FeatureForm/FieldInput.js +1 -1
- package/widgets/FeatureForm/FormExpressionArcadeExecutor.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/Slice.js +1 -1
- package/widgets/UtilityNetworkValidateTopology/UtilityNetworkValidateTopologyViewModel.js +1 -1
- package/widgets/support/MeasurementWidgetContent.js +5 -0
- package/widgets/support/UnitSelect.js +5 -0
- package/assets/esri/core/workers/chunks/0254165377538522c830.js +0 -1
- package/assets/esri/core/workers/chunks/07f16ea775b39a1a4a7b.js +0 -1
- package/assets/esri/core/workers/chunks/170c72126d10b1fdb2b0.js +0 -1
- package/assets/esri/core/workers/chunks/1bbc868d2430103951eb.js +0 -1
- package/assets/esri/core/workers/chunks/1d2ef88a8d028adef102.js +0 -1
- package/assets/esri/core/workers/chunks/2ef70c9b2484a11b7435.js +0 -1
- package/assets/esri/core/workers/chunks/39ae4b9b766f674bc6f2.js +0 -1
- package/assets/esri/core/workers/chunks/3b3d676b609c47a77164.js +0 -1
- package/assets/esri/core/workers/chunks/3d9a8cb638cf9b8ca4b3.js +0 -1
- package/assets/esri/core/workers/chunks/42f3421740a5479559dc.js +0 -1
- package/assets/esri/core/workers/chunks/45629ff775e77234b227.js +0 -1
- package/assets/esri/core/workers/chunks/52315f93a6f0ad59bd90.js +0 -1
- package/assets/esri/core/workers/chunks/5bb96e602d7cecbecf54.js +0 -1
- package/assets/esri/core/workers/chunks/63322229183f1d4eaa70.js +0 -1
- package/assets/esri/core/workers/chunks/642510b0371311ff8e16.js +0 -1
- package/assets/esri/core/workers/chunks/6995ace1d25d67c98d0e.js +0 -1
- package/assets/esri/core/workers/chunks/7e4013f8c31c9a9438c6.js +0 -1
- package/assets/esri/core/workers/chunks/82939ead43848a13f765.js +0 -1
- package/assets/esri/core/workers/chunks/8b6b963230df56850580.js +0 -1
- package/assets/esri/core/workers/chunks/95ff92d7caa34664d58f.js +0 -1
- package/assets/esri/core/workers/chunks/9e570cd4a48c30c83ae6.js +0 -1
- package/assets/esri/core/workers/chunks/a9e9297267614c4c4f3b.js +0 -1
- package/assets/esri/core/workers/chunks/b052463ffb7cb32306dc.js +0 -1
- package/assets/esri/core/workers/chunks/b31974524932e638df8c.js +0 -1
- package/assets/esri/core/workers/chunks/b75b4b132dbd9cb9d372.js +0 -1
- package/assets/esri/core/workers/chunks/c1dfbda75abc748a6ca4.js +0 -1
- package/assets/esri/core/workers/chunks/c8702e53a8ad6cf6ab85.js +0 -1
- package/assets/esri/core/workers/chunks/c90416e7bf29eb1d4536.js +0 -1
- package/assets/esri/core/workers/chunks/cad7a2092ea7f51dbd8b.js +0 -1
- package/assets/esri/core/workers/chunks/d0e2b42dca51711f2c6f.js +0 -1
- package/assets/esri/core/workers/chunks/d2a127f7bb0e2ba14a13.js +0 -1
- package/assets/esri/core/workers/chunks/df96824a6f76bad1370c.js +0 -1
- package/assets/esri/core/workers/chunks/e097f41bbfac00250477.js +0 -1
- package/assets/esri/core/workers/chunks/e3243d120a23a9b48392.js +0 -1
- package/assets/esri/core/workers/chunks/e55f80b774e090a0aa04.js +0 -1
- package/assets/esri/core/workers/chunks/e668c7e2e61aae6ca6e0.js +0 -1
- package/assets/esri/core/workers/chunks/ef900614353505afb210.js +0 -1
- package/assets/esri/core/workers/chunks/f0299d93a95f40ea7cf7.js +0 -1
- package/assets/esri/core/workers/chunks/f23b95d7e51a144ad065.js +0 -1
- package/assets/esri/core/workers/chunks/f263e73a25fae4beffae.js +0 -1
|
@@ -631,7 +631,7 @@ return mat3(T, B, normal);
|
|
|
631
631
|
}`),t.textureCoordinateType!==i.N.None&&(e.include(o.i,t),r.uniforms.add(t.pbrTextureBindType===c.P.Pass?new l.A("normalTexture",(e=>e.textureNormal)):new s.R("normalTexture",(e=>e.textureNormal))),r.code.add(a.H`vec3 computeTextureNormal(mat3 tangentSpace, vec2 uv) {
|
|
632
632
|
vec3 rawNormal = textureLookup(normalTexture, uv).rgb * 2.0 - 1.0;
|
|
633
633
|
return tangentSpace * rawNormal;
|
|
634
|
-
}`))}},72241:(e,t,r)=>{r.d(t,{K:()=>$});var i=r(74709),o=r(98069);r(4307),r(69801);var n=r(35371),a=(r(80442),r(92604)),s=r(70586),l=r(67676),c=r(1533),d=r(49300),u=r(7575);const h=a.Z.getLogger("esri.views.webgl.BufferObject");class m{static createIndex(e,t,r){return new m(e,n.w0.ELEMENT_ARRAY_BUFFER,t,r)}static createVertex(e,t,r){return new m(e,n.w0.ARRAY_BUFFER,t,r)}static createUniform(e,t,r){if(e.type!==u.zO.WEBGL2)throw new Error("Uniform buffers are supported in WebGL2 only!");return new m(e,n.w0.UNIFORM_BUFFER,t,r)}static createPixelPack(e,t=n.l1.STREAM_READ,r){if(e.type!==u.zO.WEBGL2)throw new Error("Pixel pack buffers are supported in WebGL2 only!");const i=new m(e,n.w0.PIXEL_PACK_BUFFER,t);return r&&i.setSize(r),i}static createPixelUnpack(e,t=n.l1.STREAM_DRAW,r){if(e.type!==u.zO.WEBGL2)throw new Error("Pixel unpack buffers are supported in WebGL2 only!");return new m(e,n.w0.PIXEL_UNPACK_BUFFER,t,r)}constructor(e,t,r,i){this._context=e,this.bufferType=t,this.usage=r,this._glName=null,this._size=-1,this._indexType=void 0,e.instanceCounter.increment(n._g.BufferObject,this),this._glName=this._context.gl.createBuffer(),(0,d.zu)(this._context.gl),i&&this.setData(i)}get glName(){return this._glName}get size(){return this._size}get indexType(){return this._indexType}get byteLength(){return this.bufferType===n.w0.ELEMENT_ARRAY_BUFFER?this._indexType===n.g.UNSIGNED_INT?4*this._size:2*this._size:this._size}get _isVAOAware(){return this.bufferType===n.w0.ELEMENT_ARRAY_BUFFER||this.bufferType===n.w0.ARRAY_BUFFER}dispose(){this._context?.gl?(this._glName&&(this._context.gl.deleteBuffer(this._glName),this._glName=null),this._context.instanceCounter.decrement(n._g.BufferObject,this),this._context=null):this._glName&&h.warn("Leaked WebGL buffer object")}setSize(e,t=null){if(e<=0&&h.error("Buffer size needs to be positive!"),this.bufferType===n.w0.ELEMENT_ARRAY_BUFFER&&null!=t)switch(this._indexType=t,t){case n.g.UNSIGNED_SHORT:e*=2;break;case n.g.UNSIGNED_INT:e*=4}this._setBufferData(e)}setData(e){if(!e)return;let t=e.byteLength;this.bufferType===n.w0.ELEMENT_ARRAY_BUFFER&&((0,c.Uc)(e)&&(t/=2,this._indexType=n.g.UNSIGNED_SHORT),(0,c.ZY)(e)&&(t/=4,this._indexType=n.g.UNSIGNED_INT)),this._setBufferData(t,e)}_setBufferData(e,t=null){this._size=e;const r=this._context.getBoundVAO();this._isVAOAware&&this._context.bindVAO(null),this._context.bindBuffer(this);const i=this._context.gl;null!=t?i.bufferData(this.bufferType,t,this.usage):i.bufferData(this.bufferType,e,this.usage),(0,d.zu)(i),this._isVAOAware&&this._context.bindVAO(r)}setSubData(e,t,r,i){if(!e)return;(t<0||t*e.BYTES_PER_ELEMENT>=this.byteLength)&&h.error("offset is out of range!"),r>=i&&h.error("end must be bigger than start!"),(t+(i-r))*e.BYTES_PER_ELEMENT>this.byteLength&&h.error("An attempt to write beyond the end of the buffer!");const o=this._context.getBoundVAO();this._isVAOAware&&this._context.bindVAO(null),this._context.bindBuffer(this);const n=this._context.gl;if(this._context.type===u.zO.WEBGL2)n.bufferSubData(this.bufferType,t*e.BYTES_PER_ELEMENT,e,r,i-r);else{const o=0===r&&i===e.length?e:e.subarray(r,i);n.bufferSubData(this.bufferType,t*e.BYTES_PER_ELEMENT,o)}(0,d.zu)(n),this._isVAOAware&&this._context.bindVAO(o)}getSubData(e,t=0,r,i){if(this._context.type!==u.zO.WEBGL2)return void h.error("Get buffer subdata is supported in WebGL2 only!");if(r<0||i<0)return void h.error("Problem getting subdata: offset and length were less than zero!");const o=function(e){return(0,l.zG)(e)}(e)?e.BYTES_PER_ELEMENT:1;if(o*((r??0)+(i??0))>e.byteLength)return void h.error("Problem getting subdata: offset and length exceeded destination size!");t+o*(i??0)>this.byteLength&&h.warn("Potential problem getting subdata: requested data exceeds buffer size!");const a=this._context.gl;this._context.bindBuffer(this,n.w0.COPY_READ_BUFFER),a.getBufferSubData(n.w0.COPY_READ_BUFFER,t,e,r,i),this._context.unbindBuffer(n.w0.COPY_READ_BUFFER)}async getSubDataAsync(e,t=0,r,i){this._context.type===u.zO.WEBGL2?(await this._context.clientWaitAsync(),this.getSubData(e,t,r,i)):h.error("Get buffer subdata is supported in WebGL2 only!")}}var f=r(4375),p=r(45762);class g{constructor(e,t){this._context=e,this._descriptor=t,this.type=f.B.RenderBuffer,this._context.instanceCounter.increment(n._g.Renderbuffer,this);const r=this._context.gl;this.glName=r.createRenderbuffer(),this._context.bindRenderbuffer(this);const{width:i,height:o,internalFormat:a,multisampled:s}=t;if(s){if(this._context.type!==u.zO.WEBGL2)throw new Error("Multisampled renderbuffers are not supported in WebGL1!");r.renderbufferStorageMultisample(r.RENDERBUFFER,this.samples,a,i,o)}else r.renderbufferStorage(r.RENDERBUFFER,a,i,o)}get descriptor(){return this._descriptor}get samples(){const e=this._descriptor.samples,t=this._context.parameters.maxSamples;return e?Math.min(e,t):t}get gpuMemoryUsage(){return(e=this._descriptor).width<=0||e.height<=0||null==e.internalFormat?0:e.width*e.height*(0,p.RG)(e.internalFormat);var e}resize(e,t){const r=this._descriptor;if(r.width===e&&r.height===t)return;r.width=e,r.height=t;const i=this._context.gl;this._context.bindRenderbuffer(this),r.multisampled?i.renderbufferStorageMultisample(i.RENDERBUFFER,this.samples,r.internalFormat,r.width,r.height):i.renderbufferStorage(i.RENDERBUFFER,r.internalFormat,r.width,r.height)}dispose(){this._context&&(this._context.gl.deleteRenderbuffer(this.glName),this._context.instanceCounter.decrement(n._g.Renderbuffer,this),this._context=null)}}var v=r(57088);const _=a.Z.getLogger("esri.views.webgl.FramebufferObject");class T{constructor(e,t,r=null){this._context=e,this._glName=null,this._colorAttachments=new Map,this._depthStencilBuffer=null,this._depthStencilTexture=null,this._initialized=!1,e.instanceCounter.increment(n._g.FramebufferObject,this);const i=x(t)?t:new v.x(this._context,t);if(this._colorAttachments.set(n.VY.COLOR_ATTACHMENT0,i),this._validateTextureDescriptor(i.descriptor),this._validateColorAttachmentPoint(n.VY.COLOR_ATTACHMENT0),null!=r)if(function(e){return x(e)||null!=e&&"pixelFormat"in e}(r))this._context.capabilities.depthTexture||console.error("Setting the depth/stencil texture as an attachment requires WEBGL_depth_texture or WebGL2"),this._depthStencilTexture=x(r)?r:new v.x(this._context,r),this._validateTextureDescriptor(this._depthStencilTexture.descriptor);else{const e=function(e){return null!=e&&"type"in e&&e.type===f.B.RenderBuffer}(r)?r:new g(this._context,r);this._depthStencilBuffer=e,this._validateRenderBufferDescriptor(e.descriptor)}}dispose(){if(0===this._colorAttachments.size&&!this._glName)return;const e=this._context.getBoundFramebufferObject();this._colorAttachments.forEach(((e,t)=>this.detachColorTexture(t)?.dispose())),this.detachDepthStencilBuffer()?.dispose(),this.detachDepthStencilTexture()?.dispose(),this._glName&&(this._context.gl.deleteFramebuffer(this._glName),this._glName=null),this._context.bindFramebuffer(e),this._context.instanceCounter.decrement(n._g.FramebufferObject,this)}get glName(){return this._glName}get colorTexture(){return this._colorAttachments.get(n.VY.COLOR_ATTACHMENT0)}get depthStencil(){return this._depthStencilTexture||this._depthStencilBuffer}get depthStencilTexture(){return this._depthStencilTexture}get width(){const e=this._colorAttachments.get(n.VY.COLOR_ATTACHMENT0);return e?.descriptor?.width??0}get height(){const e=this._colorAttachments.get(n.VY.COLOR_ATTACHMENT0);return e?.descriptor?.height??0}get gpuMemoryUsage(){return[...this._colorAttachments].reduce(((e,[t,r])=>e+r.gpuMemoryUsage),this.depthStencil?.gpuMemoryUsage??0)}getColorTexture(e){const t=this._colorAttachments.get(e);return t&&x(t)?t:null}attachColorTexture(e,t=n.VY.COLOR_ATTACHMENT0){if(!e)return;this._validateColorAttachmentPoint(t);const r=e.descriptor;this._validateTextureDescriptor(r),this.detachColorTexture(t)?.dispose(),this._initialized&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(e.glName,t)),this._colorAttachments.set(t,e)}detachColorTexture(e=n.VY.COLOR_ATTACHMENT0){const t=this._colorAttachments.get(e);if(t)return this._initialized&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(null,e)),this._colorAttachments.delete(e),t}setColorTextureTarget(e,t=n.VY.COLOR_ATTACHMENT0){const r=this._colorAttachments.get(t);r&&this._framebufferTexture2D(r.glName,t,e)}attachDepthStencil(e){if(e)switch(e.type){case f.B.Texture:return this._attachDepthStencilTexture(e);case f.B.RenderBuffer:return this._attachDepthStencilBuffer(e)}}_attachDepthStencilTexture(e){if(null==e)return;const t=e.descriptor;t.pixelFormat!==n.VI.DEPTH_STENCIL&&t.pixelFormat!==n.VI.DEPTH24_STENCIL8&&console.error("Depth/Stencil texture must have a pixel type of DEPTH_STENCIL!"),t.dataType!==n.Br.UNSIGNED_INT_24_8&&console.error("Depth/Stencil texture must have data type of UNSIGNED_INT_24_8!"),this._context.capabilities.depthTexture||console.error("Extension WEBGL_depth_texture isn't supported therefore it is no possible to set the depth/stencil texture!"),this._validateTextureDescriptor(t),this._disposeDepthStencilAttachments(),this._initialized&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(e.glName,n.Lu)),this._depthStencilTexture?.dispose(),this._depthStencilTexture=e}detachDepthStencilTexture(){const e=this._depthStencilTexture;return e&&this._initialized&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(null,n.Lu)),this._depthStencilTexture=null,e}_attachDepthStencilBuffer(e){if(null==e)return;const t=e.descriptor;if(t.internalFormat!==n.Tg.DEPTH_STENCIL&&t.internalFormat!==n.Tg.DEPTH_COMPONENT16&&t.internalFormat!==n.Tg.DEPTH24_STENCIL8&&console.error("Depth/Stencil buffer must have correct internalFormat"),this._validateRenderBufferDescriptor(t),this._disposeDepthStencilAttachments(),this._initialized){this._context.bindFramebuffer(this);const r=this._context.gl,i=this._getGLAttachmentPoint(t);r.framebufferRenderbuffer(n.qi.FRAMEBUFFER,i,r.RENDERBUFFER,e.glName)}this._depthStencilBuffer?.dispose(),this._depthStencilBuffer=e}detachDepthStencilBuffer(){const e=this._depthStencilBuffer;if(e&&this._initialized){this._context.bindFramebuffer(this);const t=this._context.gl,r=this._getGLAttachmentPoint(e.descriptor);t.framebufferRenderbuffer(n.qi.FRAMEBUFFER,r,t.RENDERBUFFER,null)}return this._depthStencilBuffer=null,e}copyToTexture(e,t,r,i,o,a,s){(e<0||t<0||o<0||a<0)&&console.error("Offsets cannot be negative!"),(r<=0||i<=0)&&console.error("Copy width and height must be greater than zero!");const l=s.descriptor;s.descriptor.target!==n.No.TEXTURE_2D&&console.error("Texture target must be TEXTURE_2D!"),(null==l?.width||null==l?.height||e+r>this.width||t+i>this.height||o+r>l.width||a+i>l.height)&&console.error("Bad dimensions, the current input values will attempt to read or copy out of bounds!");const c=this._context,d=c.bindTexture(s,v.x.TEXTURE_UNIT_FOR_UPDATES);c.setActiveTexture(v.x.TEXTURE_UNIT_FOR_UPDATES),c.bindFramebuffer(this),c.gl.copyTexSubImage2D(n.No.TEXTURE_2D,0,o,a,e,t,r,i),c.bindTexture(d,v.x.TEXTURE_UNIT_FOR_UPDATES)}readPixels(e,t,r,i,o,n,a){(r<=0||i<=0)&&console.error("Copy width and height must be greater than zero!"),a||console.error("Target memory is not initialized!"),this._context.bindFramebuffer(this),this._context.gl.readPixels(e,t,r,i,o,n,a)}async readPixelsAsync(e,t,r,i,o,a,s){if(this._context.type!==u.zO.WEBGL2)return(0,d.hZ)()&&console.warn("Attempting to read pixels using pixel buffer object without WebGL2"),void this.readPixels(e,t,r,i,o,a,s);const l=this._context.gl,c=m.createPixelPack(this._context,n.l1.STREAM_READ,s.byteLength);this._context.bindBuffer(c),this._context.bindFramebuffer(this),l.readPixels(e,t,r,i,o,a,0),this._context.unbindBuffer(n.w0.PIXEL_PACK_BUFFER),await c.getSubDataAsync(s),c.dispose()}resize(e,t){if(this.width===e&&this.height===t)return;const r={width:e,height:t};b(r,this._context.parameters.maxTextureSize),this._colorAttachments.forEach((e=>e.resize(r.width,r.height))),this._depthStencilTexture?.resize(r.width,r.height),this._initialized&&(b(r,this._context.parameters.maxRenderbufferSize),this._depthStencilBuffer?.resize(r.width,r.height),this._context.getBoundFramebufferObject()===this&&this._context.bindFramebuffer(null),this._initialized=!1)}initializeAndBind(e=n.qi.FRAMEBUFFER){const t=this._context.gl;if(this._initialized)return void t.bindFramebuffer(e,this.glName);this._glName&&t.deleteFramebuffer(this._glName);const r=t.createFramebuffer();t.bindFramebuffer(e,r),this._colorAttachments.forEach(((t,r)=>this._framebufferTexture2D(t.glName,r,E(t),e)));const i=this._depthStencilBuffer;if(i){const r=this._getGLAttachmentPoint(i.descriptor);t.framebufferRenderbuffer(e,r,t.RENDERBUFFER,i.glName)}else this._depthStencilTexture&&this._framebufferTexture2D(this._depthStencilTexture.glName,t.DEPTH_STENCIL_ATTACHMENT,E(this._depthStencilTexture),e);(0,d.hZ)()&&t.checkFramebufferStatus(e)!==t.FRAMEBUFFER_COMPLETE&&console.error("Framebuffer is incomplete!"),this._glName=r,this._initialized=!0}_framebufferTexture2D(e,t=n.VY.COLOR_ATTACHMENT0,r=n.No.TEXTURE_2D,i=n.qi.FRAMEBUFFER,o=0){this._context.gl.framebufferTexture2D(i,t,r,e,o)}_disposeDepthStencilAttachments(){const e=this._context.gl;if(this._depthStencilBuffer){if(this._initialized){this._context.bindFramebuffer(this);const t=this._getGLAttachmentPoint(this._depthStencilBuffer.descriptor);e.framebufferRenderbuffer(n.qi.FRAMEBUFFER,t,e.RENDERBUFFER,null)}this._depthStencilBuffer=(0,s.M2)(this._depthStencilBuffer)}this._depthStencilTexture&&(this._initialized&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(null,e.DEPTH_STENCIL_ATTACHMENT)),this._depthStencilTexture=(0,s.M2)(this._depthStencilTexture))}_validateTextureDescriptor(e){e.target!==n.No.TEXTURE_2D&&e.target!==n.No.TEXTURE_CUBE_MAP&&console.error("Texture type must be TEXTURE_2D or TEXTURE_CUBE_MAP!"),b(e,this._context.parameters.maxTextureSize),this._validateBufferDimensions(e)}_validateRenderBufferDescriptor(e){b(e,this._context.parameters.maxRenderbufferSize),this._validateBufferDimensions(e)}_validateBufferDimensions(e){e.width<=0&&(e.width=this.width),e.height<=0&&(e.height=this.height),this.width>0&&this.height>0&&(this.width===e.width&&this.height===e.height||console.error("Attachment size must match framebuffer size!"))}_getGLAttachmentPoint(e){switch(e.internalFormat){case n.Tg.DEPTH_COMPONENT16:case n.Tg.DEPTH_COMPONENT24:case n.Tg.DEPTH_COMPONENT32F:return this._context.gl.DEPTH_ATTACHMENT;case n.Tg.DEPTH24_STENCIL8:case n.Tg.DEPTH32F_STENCIL8:case n.Tg.DEPTH_STENCIL:return this._context.gl.DEPTH_STENCIL_ATTACHMENT;case n.Tg.STENCIL_INDEX8:return this._context.gl.STENCIL_ATTACHMENT}}_validateColorAttachmentPoint(e){if(-1===T._MAX_COLOR_ATTACHMENTS){const e=this._context.capabilities.drawBuffers;if(e){const t=this._context.gl;T._MAX_COLOR_ATTACHMENTS=t.getParameter(e.MAX_COLOR_ATTACHMENTS)}else T._MAX_COLOR_ATTACHMENTS=1}const t=e-n.VY.COLOR_ATTACHMENT0;t+1>T._MAX_COLOR_ATTACHMENTS&&a.Z.getLogger("esri.views.webgl.FrameBufferObject").error("esri.FrameBufferObject",`illegal attachment point for color attachment: ${t+1}. Implementation supports up to ${T._MAX_COLOR_ATTACHMENTS} color attachments`)}}function x(e){return null!=e&&"type"in e&&e.type===f.B.Texture}function b(e,t){const r=Math.max(e.width,e.height);if(r>t){_.warn(`Resizing FBO attachment size ${e.width}x${e.height} to device limit ${t}`);const i=t/r;return e.width=Math.round(e.width*i),e.height=Math.round(e.height*i),!1}return!0}function E(e){return e.descriptor.target===n.No.TEXTURE_CUBE_MAP?n.No.TEXTURE_CUBE_MAP_POSITIVE_X:n.No.TEXTURE_2D}T._MAX_COLOR_ATTACHMENTS=-1;var A,S,R=r(47859);(S=A||(A={}))[S.RG_CLAMPED=0]="RG_CLAMPED",S[S.RGBA_CLAMPED=1]="RGBA_CLAMPED",S[S.RGBA_CLAMPED_MIPMAP=2]="RGBA_CLAMPED_MIPMAP",S[S.R16F=3]="R16F",S[S.RGBA16F=4]="RGBA16F",S[S.RGBA4=5]="RGBA4";const w=new R.X;w.pixelFormat=n.VI.RG,w.internalFormat=n.lP.RG8,w.wrapMode=n.e8.CLAMP_TO_EDGE;(new R.X).wrapMode=n.e8.CLAMP_TO_EDGE;const C=new R.X;C.wrapMode=n.e8.CLAMP_TO_EDGE,C.samplingMode=n.cw.LINEAR_MIPMAP_LINEAR,C.hasMipmap=!0,C.maxAnisotropy=8;const O=new R.X;O.pixelFormat=n.VI.RED,O.dataType=n.Br.HALF_FLOAT,O.internalFormat=n.lP.R16F,O.samplingMode=n.cw.NEAREST;const y=new R.X;y.dataType=n.Br.HALF_FLOAT,y.internalFormat=n.lP.RGBA16F,y.samplingMode=n.cw.NEAREST;const M=new R.X;var P;M.internalFormat=n.lP.RGBA4,M.dataType=n.Br.UNSIGNED_SHORT_4_4_4_4,A.RG_CLAMPED,A.RGBA_CLAMPED,A.RGBA_CLAMPED_MIPMAP,A.R16F,A.RGBA16F,A.RGBA4,function(e){e[e.DEPTH_STENCIL_TEXTURE=0]="DEPTH_STENCIL_TEXTURE",e[e.DEPTH16_BUFFER=1]="DEPTH16_BUFFER"}(P||(P={}));const I=new R.X;I.pixelFormat=n.VI.DEPTH_STENCIL,I.dataType=n.Br.UNSIGNED_INT_24_8,I.samplingMode=n.cw.NEAREST,I.wrapMode=n.e8.CLAMP_TO_EDGE,P.DEPTH_STENCIL_TEXTURE,P.DEPTH16_BUFFER,new class{constructor(e,t,r=t){this.internalFormat=e,this.width=t,this.height=r,this.multisampled=!1,this.samples=1}}(n.Tg.DEPTH_COMPONENT16,4);var N=r(83475),L=r(35065),D=r(21968);new D.G(L.T.POSITION,3,n.g.FLOAT,0,12),new D.G(L.T.POSITION,3,n.g.FLOAT,0,20),new D.G(L.T.UV0,2,n.g.FLOAT,12,20),new D.G(L.T.POSITION,3,n.g.FLOAT,0,32),new D.G(L.T.NORMAL,3,n.g.FLOAT,12,32),new D.G(L.T.UV0,2,n.g.FLOAT,24,32),new D.G(L.T.POSITION,3,n.g.FLOAT,0,16),new D.G(L.T.COLOR,4,n.g.UNSIGNED_BYTE,12,16),new D.G(L.T.POSITION,2,n.g.FLOAT,0,8),new D.G(L.T.POSITION,2,n.g.FLOAT,0,16),new D.G(L.T.UV0,2,n.g.FLOAT,8,16),a.Z.getLogger("esri.views.webgl.VertexArrayObject");var F=r(78869),H=r(14589),B=r(59377),U=r(59915),G=r(27097);class V extends H.A{initializeProgram(e){return new B.$(e.rctx,V.shader.get().build(),N.i)}initializePipeline(){return(0,G.sm)({colorWrite:G.BK})}}V.shader=new F.J(U.S,(()=>r.e(8092).then(r.bind(r,88092))));var z=r(25377);class W extends H.A{initializeProgram(e){return new B.$(e.rctx,W.shader.get().build(),N.i)}initializePipeline(){return(0,G.sm)({colorWrite:G.BK})}}W.shader=new F.J(z.S,(()=>r.e(9243).then(r.bind(r,49243)))),r(97323);const k=2;function $(e,t){const r=e.fragment;t.receiveAmbientOcclusion?(r.uniforms.add(new o.A("ssaoTex",((e,t)=>t.ssaoHelper.colorTexture))),r.constants.add("blurSizePixelsInverse","float",1/k),r.code.add(i.H`float evaluateAmbientOcclusionInverse() {
|
|
634
|
+
}`))}},72241:(e,t,r)=>{r.d(t,{K:()=>$});var i=r(74709),o=r(98069);r(4307),r(69801);var n=r(35371),a=(r(80442),r(92604)),s=r(70586),l=r(67676),c=r(1533),d=r(49300),u=r(7575);const h=a.Z.getLogger("esri.views.webgl.BufferObject");class m{static createIndex(e,t,r){return new m(e,n.w0.ELEMENT_ARRAY_BUFFER,t,r)}static createVertex(e,t,r){return new m(e,n.w0.ARRAY_BUFFER,t,r)}static createUniform(e,t,r){if(e.type!==u.zO.WEBGL2)throw new Error("Uniform buffers are supported in WebGL2 only!");return new m(e,n.w0.UNIFORM_BUFFER,t,r)}static createPixelPack(e,t=n.l1.STREAM_READ,r){if(e.type!==u.zO.WEBGL2)throw new Error("Pixel pack buffers are supported in WebGL2 only!");const i=new m(e,n.w0.PIXEL_PACK_BUFFER,t);return r&&i.setSize(r),i}static createPixelUnpack(e,t=n.l1.STREAM_DRAW,r){if(e.type!==u.zO.WEBGL2)throw new Error("Pixel unpack buffers are supported in WebGL2 only!");return new m(e,n.w0.PIXEL_UNPACK_BUFFER,t,r)}constructor(e,t,r,i){this._context=e,this.bufferType=t,this.usage=r,this._glName=null,this._size=-1,this._indexType=void 0,e.instanceCounter.increment(n._g.BufferObject,this),this._glName=this._context.gl.createBuffer(),(0,d.zu)(this._context.gl),i&&this.setData(i)}get glName(){return this._glName}get size(){return this._size}get indexType(){return this._indexType}get byteLength(){return this.bufferType===n.w0.ELEMENT_ARRAY_BUFFER?this._indexType===n.g.UNSIGNED_INT?4*this._size:2*this._size:this._size}get _isVAOAware(){return this.bufferType===n.w0.ELEMENT_ARRAY_BUFFER||this.bufferType===n.w0.ARRAY_BUFFER}dispose(){this._context?.gl?(this._glName&&(this._context.gl.deleteBuffer(this._glName),this._glName=null),this._context.instanceCounter.decrement(n._g.BufferObject,this),this._context=null):this._glName&&h.warn("Leaked WebGL buffer object")}setSize(e,t=null){if(e<=0&&h.error("Buffer size needs to be positive!"),this.bufferType===n.w0.ELEMENT_ARRAY_BUFFER&&null!=t)switch(this._indexType=t,t){case n.g.UNSIGNED_SHORT:e*=2;break;case n.g.UNSIGNED_INT:e*=4}this._setBufferData(e)}setData(e){if(!e)return;let t=e.byteLength;this.bufferType===n.w0.ELEMENT_ARRAY_BUFFER&&((0,c.Uc)(e)&&(t/=2,this._indexType=n.g.UNSIGNED_SHORT),(0,c.ZY)(e)&&(t/=4,this._indexType=n.g.UNSIGNED_INT)),this._setBufferData(t,e)}_setBufferData(e,t=null){this._size=e;const r=this._context.getBoundVAO();this._isVAOAware&&this._context.bindVAO(null),this._context.bindBuffer(this);const i=this._context.gl;null!=t?i.bufferData(this.bufferType,t,this.usage):i.bufferData(this.bufferType,e,this.usage),(0,d.zu)(i),this._isVAOAware&&this._context.bindVAO(r)}setSubData(e,t,r,i){if(!e)return;(t<0||t*e.BYTES_PER_ELEMENT>=this.byteLength)&&h.error("offset is out of range!"),r>=i&&h.error("end must be bigger than start!"),(t+(i-r))*e.BYTES_PER_ELEMENT>this.byteLength&&h.error("An attempt to write beyond the end of the buffer!");const o=this._context.getBoundVAO();this._isVAOAware&&this._context.bindVAO(null),this._context.bindBuffer(this);const n=this._context.gl;if(this._context.type===u.zO.WEBGL2)n.bufferSubData(this.bufferType,t*e.BYTES_PER_ELEMENT,e,r,i-r);else{const o=0===r&&i===e.length?e:e.subarray(r,i);n.bufferSubData(this.bufferType,t*e.BYTES_PER_ELEMENT,o)}(0,d.zu)(n),this._isVAOAware&&this._context.bindVAO(o)}getSubData(e,t=0,r,i){if(this._context.type!==u.zO.WEBGL2)return void h.error("Get buffer subdata is supported in WebGL2 only!");if(r<0||i<0)return void h.error("Problem getting subdata: offset and length were less than zero!");const o=function(e){return(0,l.zG)(e)}(e)?e.BYTES_PER_ELEMENT:1;if(o*((r??0)+(i??0))>e.byteLength)return void h.error("Problem getting subdata: offset and length exceeded destination size!");t+o*(i??0)>this.byteLength&&h.warn("Potential problem getting subdata: requested data exceeds buffer size!");const a=this._context.gl;this._context.bindBuffer(this,n.w0.COPY_READ_BUFFER),a.getBufferSubData(n.w0.COPY_READ_BUFFER,t,e,r,i),this._context.unbindBuffer(n.w0.COPY_READ_BUFFER)}async getSubDataAsync(e,t=0,r,i){this._context.type===u.zO.WEBGL2?(await this._context.clientWaitAsync(),this.getSubData(e,t,r,i)):h.error("Get buffer subdata is supported in WebGL2 only!")}}var f=r(4375),p=r(45762);class g{constructor(e,t){this._context=e,this._descriptor=t,this.type=f.B.RenderBuffer,this._context.instanceCounter.increment(n._g.Renderbuffer,this);const r=this._context.gl;this.glName=r.createRenderbuffer(),this._context.bindRenderbuffer(this);const{width:i,height:o,internalFormat:a,multisampled:s}=t;if(s){if(this._context.type!==u.zO.WEBGL2)throw new Error("Multisampled renderbuffers are not supported in WebGL1!");r.renderbufferStorageMultisample(r.RENDERBUFFER,this.samples,a,i,o)}else r.renderbufferStorage(r.RENDERBUFFER,a,i,o)}get descriptor(){return this._descriptor}get samples(){const e=this._descriptor.samples,t=this._context.parameters.maxSamples;return e?Math.min(e,t):t}get gpuMemoryUsage(){return(e=this._descriptor).width<=0||e.height<=0||null==e.internalFormat?0:e.width*e.height*(0,p.RG)(e.internalFormat);var e}resize(e,t){const r=this._descriptor;if(r.width===e&&r.height===t)return;r.width=e,r.height=t;const i=this._context.gl;this._context.bindRenderbuffer(this),r.multisampled?i.renderbufferStorageMultisample(i.RENDERBUFFER,this.samples,r.internalFormat,r.width,r.height):i.renderbufferStorage(i.RENDERBUFFER,r.internalFormat,r.width,r.height)}dispose(){this._context&&(this._context.gl.deleteRenderbuffer(this.glName),this._context.instanceCounter.decrement(n._g.Renderbuffer,this),this._context=null)}}var v=r(57088);const _=a.Z.getLogger("esri.views.webgl.FramebufferObject");class T{constructor(e,t,r=null){this._context=e,this._glName=null,this._colorAttachments=new Map,this._depthStencilBuffer=null,this._depthStencilTexture=null,this._initialized=!1,e.instanceCounter.increment(n._g.FramebufferObject,this);const i=x(t)?t:new v.x(this._context,t);if(this._colorAttachments.set(n.VY.COLOR_ATTACHMENT0,i),this._validateTextureDescriptor(i.descriptor),this._validateColorAttachmentPoint(n.VY.COLOR_ATTACHMENT0),null!=r)if(function(e){return x(e)||null!=e&&"pixelFormat"in e}(r))this._context.capabilities.depthTexture||console.error("Setting the depth/stencil texture as an attachment requires WEBGL_depth_texture or WebGL2"),this._depthStencilTexture=x(r)?r:new v.x(this._context,r),this._validateTextureDescriptor(this._depthStencilTexture.descriptor);else{const e=function(e){return null!=e&&"type"in e&&e.type===f.B.RenderBuffer}(r)?r:new g(this._context,r);this._depthStencilBuffer=e,this._validateRenderBufferDescriptor(e.descriptor)}}dispose(){if(0===this._colorAttachments.size&&!this._glName)return;const e=this._context.getBoundFramebufferObject();this._colorAttachments.forEach(((e,t)=>this.detachColorTexture(t)?.dispose())),this.detachDepthStencilBuffer()?.dispose(),this.detachDepthStencilTexture()?.dispose(),this._glName&&(this._context.gl.deleteFramebuffer(this._glName),this._glName=null),this._context.bindFramebuffer(e),this._context.instanceCounter.decrement(n._g.FramebufferObject,this)}get glName(){return this._glName}get colorTexture(){return this._colorAttachments.get(n.VY.COLOR_ATTACHMENT0)}get depthStencil(){return this._depthStencilTexture||this._depthStencilBuffer}get depthStencilTexture(){return this._depthStencilTexture}get width(){const e=this._colorAttachments.get(n.VY.COLOR_ATTACHMENT0);return e?.descriptor?.width??0}get height(){const e=this._colorAttachments.get(n.VY.COLOR_ATTACHMENT0);return e?.descriptor?.height??0}get gpuMemoryUsage(){return[...this._colorAttachments].reduce(((e,[t,r])=>e+r.gpuMemoryUsage),this.depthStencil?.gpuMemoryUsage??0)}getColorTexture(e){const t=this._colorAttachments.get(e);return t&&x(t)?t:null}attachColorTexture(e,t=n.VY.COLOR_ATTACHMENT0){if(!e)return;this._validateColorAttachmentPoint(t);const r=e.descriptor;this._validateTextureDescriptor(r),this.detachColorTexture(t)?.dispose(),this._initialized&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(e.glName,t)),this._colorAttachments.set(t,e)}detachColorTexture(e=n.VY.COLOR_ATTACHMENT0){const t=this._colorAttachments.get(e);if(t)return this._initialized&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(null,e)),this._colorAttachments.delete(e),t}setColorTextureTarget(e,t=n.VY.COLOR_ATTACHMENT0){const r=this._colorAttachments.get(t);r&&this._framebufferTexture2D(r.glName,t,e)}attachDepthStencil(e){if(e)switch(e.type){case f.B.Texture:return this._attachDepthStencilTexture(e);case f.B.RenderBuffer:return this._attachDepthStencilBuffer(e)}}_attachDepthStencilTexture(e){if(null==e)return;const t=e.descriptor;t.pixelFormat!==n.VI.DEPTH_STENCIL&&t.pixelFormat!==n.VI.DEPTH24_STENCIL8&&console.error("Depth/Stencil texture must have a pixel type of DEPTH_STENCIL!"),t.dataType!==n.Br.UNSIGNED_INT_24_8&&console.error("Depth/Stencil texture must have data type of UNSIGNED_INT_24_8!"),this._context.capabilities.depthTexture||console.error("Extension WEBGL_depth_texture isn't supported therefore it is no possible to set the depth/stencil texture!"),this._validateTextureDescriptor(t),this._disposeDepthStencilAttachments(),this._initialized&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(e.glName,n.Lu)),this._depthStencilTexture?.dispose(),this._depthStencilTexture=e}detachDepthStencilTexture(){const e=this._depthStencilTexture;return e&&this._initialized&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(null,n.Lu)),this._depthStencilTexture=null,e}_attachDepthStencilBuffer(e){if(null==e)return;const t=e.descriptor;if(t.internalFormat!==n.Tg.DEPTH_STENCIL&&t.internalFormat!==n.Tg.DEPTH_COMPONENT16&&t.internalFormat!==n.Tg.DEPTH24_STENCIL8&&console.error("Depth/Stencil buffer must have correct internalFormat"),this._validateRenderBufferDescriptor(t),this._disposeDepthStencilAttachments(),this._initialized){this._context.bindFramebuffer(this);const r=this._context.gl,i=this._getGLAttachmentPoint(t);r.framebufferRenderbuffer(n.qi.FRAMEBUFFER,i,r.RENDERBUFFER,e.glName)}this._depthStencilBuffer?.dispose(),this._depthStencilBuffer=e}detachDepthStencilBuffer(){const e=this._depthStencilBuffer;if(e&&this._initialized){this._context.bindFramebuffer(this);const t=this._context.gl,r=this._getGLAttachmentPoint(e.descriptor);t.framebufferRenderbuffer(n.qi.FRAMEBUFFER,r,t.RENDERBUFFER,null)}return this._depthStencilBuffer=null,e}copyToTexture(e,t,r,i,o,a,s){(e<0||t<0||o<0||a<0)&&console.error("Offsets cannot be negative!"),(r<=0||i<=0)&&console.error("Copy width and height must be greater than zero!");const l=s.descriptor;s.descriptor.target!==n.No.TEXTURE_2D&&console.error("Texture target must be TEXTURE_2D!"),(null==l?.width||null==l?.height||e+r>this.width||t+i>this.height||o+r>l.width||a+i>l.height)&&console.error("Bad dimensions, the current input values will attempt to read or copy out of bounds!");const c=this._context,d=c.bindTexture(s,v.x.TEXTURE_UNIT_FOR_UPDATES);c.setActiveTexture(v.x.TEXTURE_UNIT_FOR_UPDATES),c.bindFramebuffer(this),c.gl.copyTexSubImage2D(n.No.TEXTURE_2D,0,o,a,e,t,r,i),c.bindTexture(d,v.x.TEXTURE_UNIT_FOR_UPDATES)}readPixels(e,t,r,i,o,n,a){(r<=0||i<=0)&&console.error("Copy width and height must be greater than zero!"),a||console.error("Target memory is not initialized!"),this._context.bindFramebuffer(this),this._context.gl.readPixels(e,t,r,i,o,n,a)}async readPixelsAsync(e,t,r,i,o,a,s){if(this._context.type!==u.zO.WEBGL2)return(0,d.hZ)()&&console.warn("Attempting to read pixels using pixel buffer object without WebGL2"),void this.readPixels(e,t,r,i,o,a,s);const l=this._context.gl,c=m.createPixelPack(this._context,n.l1.STREAM_READ,s.byteLength);this._context.bindBuffer(c),this._context.bindFramebuffer(this),l.readPixels(e,t,r,i,o,a,0),this._context.unbindBuffer(n.w0.PIXEL_PACK_BUFFER),await c.getSubDataAsync(s),c.dispose()}resize(e,t){if(this.width===e&&this.height===t)return;const r={width:e,height:t};b(r,this._context.parameters.maxTextureSize),this._colorAttachments.forEach((e=>e.resize(r.width,r.height))),this._depthStencilTexture?.resize(r.width,r.height),this._initialized&&(b(r,this._context.parameters.maxRenderbufferSize),this._depthStencilBuffer?.resize(r.width,r.height),this._context.getBoundFramebufferObject()===this&&this._context.bindFramebuffer(null),this._initialized=!1)}initializeAndBind(e=n.qi.FRAMEBUFFER){const t=this._context.gl;if(this._initialized)return void t.bindFramebuffer(e,this.glName);this._glName&&t.deleteFramebuffer(this._glName);const r=t.createFramebuffer();t.bindFramebuffer(e,r),this._colorAttachments.forEach(((t,r)=>this._framebufferTexture2D(t.glName,r,E(t),e)));const i=this._depthStencilBuffer;if(i){const r=this._getGLAttachmentPoint(i.descriptor);t.framebufferRenderbuffer(e,r,t.RENDERBUFFER,i.glName)}else this._depthStencilTexture&&this._framebufferTexture2D(this._depthStencilTexture.glName,t.DEPTH_STENCIL_ATTACHMENT,E(this._depthStencilTexture),e);(0,d.hZ)()&&t.checkFramebufferStatus(e)!==t.FRAMEBUFFER_COMPLETE&&console.error("Framebuffer is incomplete!"),this._glName=r,this._initialized=!0}_framebufferTexture2D(e,t=n.VY.COLOR_ATTACHMENT0,r=n.No.TEXTURE_2D,i=n.qi.FRAMEBUFFER,o=0){this._context.gl.framebufferTexture2D(i,t,r,e,o)}_disposeDepthStencilAttachments(){const e=this._context.gl;if(this._depthStencilBuffer){if(this._initialized){this._context.bindFramebuffer(this);const t=this._getGLAttachmentPoint(this._depthStencilBuffer.descriptor);e.framebufferRenderbuffer(n.qi.FRAMEBUFFER,t,e.RENDERBUFFER,null)}this._depthStencilBuffer=(0,s.M2)(this._depthStencilBuffer)}this._depthStencilTexture&&(this._initialized&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(null,e.DEPTH_STENCIL_ATTACHMENT)),this._depthStencilTexture=(0,s.M2)(this._depthStencilTexture))}_validateTextureDescriptor(e){e.target!==n.No.TEXTURE_2D&&e.target!==n.No.TEXTURE_CUBE_MAP&&console.error("Texture type must be TEXTURE_2D or TEXTURE_CUBE_MAP!"),b(e,this._context.parameters.maxTextureSize),this._validateBufferDimensions(e)}_validateRenderBufferDescriptor(e){b(e,this._context.parameters.maxRenderbufferSize),this._validateBufferDimensions(e)}_validateBufferDimensions(e){e.width<=0&&(e.width=this.width),e.height<=0&&(e.height=this.height),this.width>0&&this.height>0&&(this.width===e.width&&this.height===e.height||console.error("Attachment size must match framebuffer size!"))}_getGLAttachmentPoint(e){switch(e.internalFormat){case n.Tg.DEPTH_COMPONENT16:case n.Tg.DEPTH_COMPONENT24:case n.Tg.DEPTH_COMPONENT32F:return this._context.gl.DEPTH_ATTACHMENT;case n.Tg.DEPTH24_STENCIL8:case n.Tg.DEPTH32F_STENCIL8:case n.Tg.DEPTH_STENCIL:return this._context.gl.DEPTH_STENCIL_ATTACHMENT;case n.Tg.STENCIL_INDEX8:return this._context.gl.STENCIL_ATTACHMENT}}_validateColorAttachmentPoint(e){if(-1===T._MAX_COLOR_ATTACHMENTS){const e=this._context.capabilities.drawBuffers;if(e){const t=this._context.gl;T._MAX_COLOR_ATTACHMENTS=t.getParameter(e.MAX_COLOR_ATTACHMENTS)}else T._MAX_COLOR_ATTACHMENTS=1}const t=e-n.VY.COLOR_ATTACHMENT0;t+1>T._MAX_COLOR_ATTACHMENTS&&a.Z.getLogger("esri.views.webgl.FrameBufferObject").error("esri.FrameBufferObject",`illegal attachment point for color attachment: ${t+1}. Implementation supports up to ${T._MAX_COLOR_ATTACHMENTS} color attachments`)}}function x(e){return null!=e&&"type"in e&&e.type===f.B.Texture}function b(e,t){const r=Math.max(e.width,e.height);if(r>t){_.warn(`Resizing FBO attachment size ${e.width}x${e.height} to device limit ${t}`);const i=t/r;return e.width=Math.round(e.width*i),e.height=Math.round(e.height*i),!1}return!0}function E(e){return e.descriptor.target===n.No.TEXTURE_CUBE_MAP?n.No.TEXTURE_CUBE_MAP_POSITIVE_X:n.No.TEXTURE_2D}T._MAX_COLOR_ATTACHMENTS=-1;var A,S,R=r(47859);(S=A||(A={}))[S.RG=0]="RG",S[S.RGBA4=1]="RGBA4",S[S.RGBA=2]="RGBA",S[S.RGBA_MIPMAP=3]="RGBA_MIPMAP",S[S.R16F=4]="R16F",S[S.RGBA16F=5]="RGBA16F";const w=new R.X;w.pixelFormat=n.VI.RG,w.internalFormat=n.lP.RG8,w.wrapMode=n.e8.CLAMP_TO_EDGE;const C=new R.X;C.internalFormat=n.lP.RGBA4,C.dataType=n.Br.UNSIGNED_SHORT_4_4_4_4,C.wrapMode=n.e8.CLAMP_TO_EDGE;(new R.X).wrapMode=n.e8.CLAMP_TO_EDGE;const O=new R.X;O.wrapMode=n.e8.CLAMP_TO_EDGE,O.samplingMode=n.cw.LINEAR_MIPMAP_LINEAR,O.hasMipmap=!0,O.maxAnisotropy=8;const y=new R.X;y.pixelFormat=n.VI.RED,y.dataType=n.Br.HALF_FLOAT,y.internalFormat=n.lP.R16F,y.samplingMode=n.cw.NEAREST;const M=new R.X;var P;M.dataType=n.Br.HALF_FLOAT,M.internalFormat=n.lP.RGBA16F,M.samplingMode=n.cw.NEAREST,A.RG,A.RGBA4,A.RGBA,A.RGBA_MIPMAP,A.R16F,A.RGBA16F,function(e){e[e.DEPTH_STENCIL_TEXTURE=0]="DEPTH_STENCIL_TEXTURE",e[e.DEPTH16_BUFFER=1]="DEPTH16_BUFFER"}(P||(P={}));const I=new R.X;I.pixelFormat=n.VI.DEPTH_STENCIL,I.dataType=n.Br.UNSIGNED_INT_24_8,I.samplingMode=n.cw.NEAREST,I.wrapMode=n.e8.CLAMP_TO_EDGE,P.DEPTH_STENCIL_TEXTURE,P.DEPTH16_BUFFER,new class{constructor(e,t,r=t){this.internalFormat=e,this.width=t,this.height=r,this.multisampled=!1,this.samples=1}}(n.Tg.DEPTH_COMPONENT16,4);var N=r(83475),L=r(35065),D=r(21968);new D.G(L.T.POSITION,3,n.g.FLOAT,0,12),new D.G(L.T.POSITION,3,n.g.FLOAT,0,20),new D.G(L.T.UV0,2,n.g.FLOAT,12,20),new D.G(L.T.POSITION,3,n.g.FLOAT,0,32),new D.G(L.T.NORMAL,3,n.g.FLOAT,12,32),new D.G(L.T.UV0,2,n.g.FLOAT,24,32),new D.G(L.T.POSITION,3,n.g.FLOAT,0,16),new D.G(L.T.COLOR,4,n.g.UNSIGNED_BYTE,12,16),new D.G(L.T.POSITION,2,n.g.FLOAT,0,8),new D.G(L.T.POSITION,2,n.g.FLOAT,0,16),new D.G(L.T.UV0,2,n.g.FLOAT,8,16),a.Z.getLogger("esri.views.webgl.VertexArrayObject");var F=r(78869),H=r(14589),B=r(59377),U=r(59915),G=r(27097);class V extends H.A{initializeProgram(e){return new B.$(e.rctx,V.shader.get().build(),N.i)}initializePipeline(){return(0,G.sm)({colorWrite:G.BK})}}V.shader=new F.J(U.S,(()=>r.e(8092).then(r.bind(r,88092))));var z=r(25377);class W extends H.A{initializeProgram(e){return new B.$(e.rctx,W.shader.get().build(),N.i)}initializePipeline(){return(0,G.sm)({colorWrite:G.BK})}}W.shader=new F.J(z.S,(()=>r.e(9243).then(r.bind(r,49243)))),r(97323);const k=2;function $(e,t){const r=e.fragment;t.receiveAmbientOcclusion?(r.uniforms.add(new o.A("ssaoTex",((e,t)=>t.ssaoHelper.colorTexture))),r.constants.add("blurSizePixelsInverse","float",1/k),r.code.add(i.H`float evaluateAmbientOcclusionInverse() {
|
|
635
635
|
vec2 ssaoTextureSizeInverse = 1.0 / vec2(textureSize(ssaoTex, 0));
|
|
636
636
|
return texture(ssaoTex, gl_FragCoord.xy * blurSizePixelsInverse * ssaoTextureSizeInverse).a;
|
|
637
637
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6748,9880],{66748:(e,t,n)=>{n.r(t),n.d(t,{registerFunctions:()=>L});var r=n(40330),o=n(28228),s=n(33586),a=n(27535),i=n(77286),l=n(61363),c=n(26520),u=n(71201),f=n(67900),h=n(6570),d=n(9361),m=n(8667),g=n(65091),w=n(94139),y=n(38913),p=n(58901),v=n(33955),b=n(48522);function _(e){return 0===r.i8.indexOf("4.")?y.Z.fromExtent(e):new y.Z({spatialReference:e.spatialReference,rings:[[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]]})}function k(e,t,n){if((0,l.C)(e,2,2,t,n),e[0]instanceof d.Z&&e[1]instanceof d.Z);else if(e[0]instanceof d.Z&&null===e[1]);else if(e[1]instanceof d.Z&&null===e[0]);else if(null!==e[0]||null!==e[1])throw new a.aV(t,a.rH.InvalidParameter,n)}async function Z(e,t){if("polygon"!==e.type&&"polyline"!==e.type&&"extent"!==e.type)return 0;let n=1;(e.spatialReference.vcsWkid||e.spatialReference.latestVcsWkid)&&(n=(0,u._R)(e.spatialReference)/(0,f.c9)(e.spatialReference));let r=0;if("polyline"===e.type)for(const t of e.paths)for(let e=1;e<t.length;e++)r+=(0,u.AW)(t[e],t[e-1],n);else if("polygon"===e.type)for(const t of e.rings){for(let e=1;e<t.length;e++)r+=(0,u.AW)(t[e],t[e-1],n);(t[0][0]!==t[t.length-1][0]||t[0][1]!==t[t.length-1][1]||void 0!==t[0][2]&&t[0][2]!==t[t.length-1][2])&&(r+=(0,u.AW)(t[0],t[t.length-1],n))}else"extent"===e.type&&(r+=2*(0,u.AW)([e.xmin,e.ymin,0],[e.xmax,e.ymin,0],n),r+=2*(0,u.AW)([e.xmin,e.ymin,0],[e.xmin,e.ymax,0],n),r*=2,r+=4*Math.abs((0,l.D)(e.zmax,0)*n-(0,l.D)(e.zmin,0)*n));const o=new p.Z({hasZ:!1,hasM:!1,spatialReference:e.spatialReference,paths:[[0,0],[0,r]]});return(0,m.sz)(o,t)}function L(e){"async"===e.mode&&(e.functions.disjoint=function(t,n){return e.standardFunctionAsync(t,n,((e,r,o)=>(k(o=(0,l.L)(o),t,n),null===o[0]||null===o[1]||(0,m.ED)(o[0],o[1]))))},e.functions.intersects=function(t,n){return e.standardFunctionAsync(t,n,((e,r,o)=>(k(o=(0,l.L)(o),t,n),null!==o[0]&&null!==o[1]&&(0,m.kK)(o[0],o[1]))))},e.functions.touches=function(t,n){return e.standardFunctionAsync(t,n,((e,r,o)=>(k(o=(0,l.L)(o),t,n),null!==o[0]&&null!==o[1]&&(0,m.W4)(o[0],o[1]))))},e.functions.crosses=function(t,n){return e.standardFunctionAsync(t,n,((e,r,o)=>(k(o=(0,l.L)(o),t,n),null!==o[0]&&null!==o[1]&&(0,m.jU)(o[0],o[1]))))},e.functions.within=function(t,n){return e.standardFunctionAsync(t,n,((e,r,o)=>(k(o=(0,l.L)(o),t,n),null!==o[0]&&null!==o[1]&&(0,m.uh)(o[0],o[1]))))},e.functions.contains=function(t,n){return e.standardFunctionAsync(t,n,((e,r,o)=>(k(o=(0,l.L)(o),t,n),null!==o[0]&&null!==o[1]&&(0,m.r3)(o[0],o[1]))))},e.functions.overlaps=function(t,n){return e.standardFunctionAsync(t,n,((e,r,o)=>(k(o=(0,l.L)(o),t,n),null!==o[0]&&null!==o[1]&&(0,m.Nm)(o[0],o[1]))))},e.functions.equals=function(t,n){return e.standardFunctionAsync(t,n,((e,r,o)=>((0,l.C)(o,2,2,t,n),o[0]===o[1]||(o[0]instanceof d.Z&&o[1]instanceof d.Z?(0,m.fS)(o[0],o[1]):!(!(0,l.k)(o[0])||!(0,l.k)(o[1]))&&o[0].equals(o[1])))))},e.functions.relate=function(t,n){return e.standardFunctionAsync(t,n,((e,r,o)=>{if(o=(0,l.L)(o),(0,l.C)(o,3,3,t,n),o[0]instanceof d.Z&&o[1]instanceof d.Z)return(0,m.LV)(o[0],o[1],(0,l.j)(o[2]));if(o[0]instanceof d.Z&&null===o[1])return!1;if(o[1]instanceof d.Z&&null===o[0])return!1;if(null===o[0]&&null===o[1])return!1;throw new a.aV(t,a.rH.InvalidParameter,n)}))},e.functions.intersection=function(t,n){return e.standardFunctionAsync(t,n,((e,r,o)=>(k(o=(0,l.L)(o),t,n),null===o[0]||null===o[1]?null:(0,m.wf)(o[0],o[1]))))},e.functions.union=function(t,n){return e.standardFunctionAsync(t,n,((e,r,o)=>{const s=[];if(0===(o=(0,l.L)(o)).length)throw new a.aV(t,a.rH.WrongNumberOfParameters,n);if(1===o.length)if((0,l.m)(o[0])){const e=(0,l.L)(o[0]);for(let r=0;r<e.length;r++)if(null!==e[r]){if(!(e[r]instanceof d.Z))throw new a.aV(t,a.rH.InvalidParameter,n);s.push(e[r])}}else{if(!(0,l.o)(o[0])){if(o[0]instanceof d.Z)return(0,l.y)((0,i.r1)(o[0]),t.spatialReference);if(null===o[0])return null;throw new a.aV(t,a.rH.InvalidParameter,n)}{const e=(0,l.L)(o[0].toArray());for(let r=0;r<e.length;r++)if(null!==e[r]){if(!(e[r]instanceof d.Z))throw new a.aV(t,a.rH.InvalidParameter,n);s.push(e[r])}}}else for(let e=0;e<o.length;e++)if(null!==o[e]){if(!(o[e]instanceof d.Z))throw new a.aV(t,a.rH.InvalidParameter,n);s.push(o[e])}return 0===s.length?null:(0,m.G0)(s)}))},e.functions.difference=function(t,n){return e.standardFunctionAsync(t,n,((e,r,o)=>(k(o=(0,l.L)(o),t,n),null!==o[0]&&null===o[1]?(0,i.r1)(o[0]):null===o[0]?null:(0,m.e5)(o[0],o[1]))))},e.functions.symmetricdifference=function(t,n){return e.standardFunctionAsync(t,n,((e,r,o)=>(k(o=(0,l.L)(o),t,n),null===o[0]&&null===o[1]?null:null===o[0]?(0,i.r1)(o[1]):null===o[1]?(0,i.r1)(o[0]):(0,m.Sp)(o[0],o[1]))))},e.functions.clip=function(t,n){return e.standardFunctionAsync(t,n,((e,r,o)=>{if(o=(0,l.L)(o),(0,l.C)(o,2,2,t,n),!(o[1]instanceof h.Z)&&null!==o[1])throw new a.aV(t,a.rH.InvalidParameter,n);if(null===o[0])return null;if(!(o[0]instanceof d.Z))throw new a.aV(t,a.rH.InvalidParameter,n);return null===o[1]?null:(0,m.oq)(o[0],o[1])}))},e.functions.cut=function(t,n){return e.standardFunctionAsync(t,n,((e,r,o)=>{if(o=(0,l.L)(o),(0,l.C)(o,2,2,t,n),!(o[1]instanceof p.Z)&&null!==o[1])throw new a.aV(t,a.rH.InvalidParameter,n);if(null===o[0])return[];if(!(o[0]instanceof d.Z))throw new a.aV(t,a.rH.InvalidParameter,n);return null===o[1]?[(0,i.r1)(o[0])]:(0,m.z7)(o[0],o[1])}))},e.functions.area=function(t,n){return e.standardFunctionAsync(t,n,(async(e,r,o)=>{if((0,l.C)(o,1,2,t,n),null===(o=(0,l.L)(o))[0])return 0;if((0,l.r)(o[0])){const e=await o[0].sumArea((0,i.EI)((0,l.D)(o[1],-1)),!1,t.abortSignal);if(t.abortSignal.aborted)throw new a.aV(t,a.rH.Cancelled,n);return e}if((0,l.m)(o[0])||(0,l.o)(o[0])){const e=(0,l.N)(o[0],t.spatialReference);return null===e?0:(0,m.CJ)(e,(0,i.EI)((0,l.D)(o[1],-1)))}if(!(o[0]instanceof d.Z))throw new a.aV(t,a.rH.InvalidParameter,n);return(0,m.CJ)(o[0],(0,i.EI)((0,l.D)(o[1],-1)))}))},e.functions.areageodetic=function(t,n){return e.standardFunctionAsync(t,n,(async(e,r,o)=>{if((0,l.C)(o,1,2,t,n),null===(o=(0,l.L)(o))[0])return 0;if((0,l.r)(o[0])){const e=await o[0].sumArea((0,i.EI)((0,l.D)(o[1],-1)),!0,t.abortSignal);if(t.abortSignal.aborted)throw new a.aV(t,a.rH.Cancelled,n);return e}if((0,l.m)(o[0])||(0,l.o)(o[0])){const e=(0,l.N)(o[0],t.spatialReference);return null===e?0:(0,m.Y4)(e,(0,i.EI)((0,l.D)(o[1],-1)))}if(!(o[0]instanceof d.Z))throw new a.aV(t,a.rH.InvalidParameter,n);return(0,m.Y4)(o[0],(0,i.EI)((0,l.D)(o[1],-1)))}))},e.functions.length=function(t,n){return e.standardFunctionAsync(t,n,(async(e,r,o)=>{if((0,l.C)(o,1,2,t,n),null===(o=(0,l.L)(o))[0])return 0;if((0,l.r)(o[0])){const e=await o[0].sumLength((0,i.Lz)((0,l.D)(o[1],-1)),!1,t.abortSignal);if(t.abortSignal.aborted)throw new a.aV(t,a.rH.Cancelled,n);return e}if((0,l.m)(o[0])||(0,l.o)(o[0])){const e=(0,l.M)(o[0],t.spatialReference);return null===e?0:(0,m.sz)(e,(0,i.Lz)((0,l.D)(o[1],-1)))}if(!(o[0]instanceof d.Z))throw new a.aV(t,a.rH.InvalidParameter,n);return(0,m.sz)(o[0],(0,i.Lz)((0,l.D)(o[1],-1)))}))},e.functions.length3d=function(t,n){return e.standardFunctionAsync(t,n,((e,r,o)=>{if((0,l.C)(o,1,2,t,n),null===(o=(0,l.L)(o))[0])return 0;if((0,l.m)(o[0])||(0,l.o)(o[0])){const e=(0,l.M)(o[0],t.spatialReference);return null===e?0:!0===e.hasZ?Z(e,(0,i.Lz)((0,l.D)(o[1],-1))):(0,m.sz)(e,(0,i.Lz)((0,l.D)(o[1],-1)))}if(!(o[0]instanceof d.Z))throw new a.aV(t,a.rH.InvalidParameter,n);return!0===o[0].hasZ?Z(o[0],(0,i.Lz)((0,l.D)(o[1],-1))):(0,m.sz)(o[0],(0,i.Lz)((0,l.D)(o[1],-1)))}))},e.functions.lengthgeodetic=function(t,n){return e.standardFunctionAsync(t,n,(async(e,r,o)=>{if((0,l.C)(o,1,2,t,n),null===(o=(0,l.L)(o))[0])return 0;if((0,l.r)(o[0])){const e=await o[0].sumLength((0,i.Lz)((0,l.D)(o[1],-1)),!0,t.abortSignal);if(t.abortSignal.aborted)throw new a.aV(t,a.rH.Cancelled,n);return e}if((0,l.m)(o[0])||(0,l.o)(o[0])){const e=(0,l.M)(o[0],t.spatialReference);return null===e?0:(0,m.kQ)(e,(0,i.Lz)((0,l.D)(o[1],-1)))}if(!(o[0]instanceof d.Z))throw new a.aV(t,a.rH.InvalidParameter,n);return(0,m.kQ)(o[0],(0,i.Lz)((0,l.D)(o[1],-1)))}))},e.functions.distance=function(t,n){return e.standardFunctionAsync(t,n,((e,r,o)=>{o=(0,l.L)(o),(0,l.C)(o,2,3,t,n);let s=o[0];((0,l.m)(o[0])||(0,l.o)(o[0]))&&(s=(0,l.O)(o[0],t.spatialReference));let c=o[1];if(((0,l.m)(o[1])||(0,l.o)(o[1]))&&(c=(0,l.O)(o[1],t.spatialReference)),!(s instanceof d.Z))throw new a.aV(t,a.rH.InvalidParameter,n);if(!(c instanceof d.Z))throw new a.aV(t,a.rH.InvalidParameter,n);return(0,m.TE)(s,c,(0,i.Lz)((0,l.D)(o[2],-1)))}))},e.functions.distancegeodetic=function(t,n){return e.standardFunctionAsync(t,n,((e,r,o)=>{o=(0,l.L)(o),(0,l.C)(o,2,3,t,n);const s=o[0],c=o[1];if(!(s instanceof w.Z))throw new a.aV(t,a.rH.InvalidParameter,n);if(!(c instanceof w.Z))throw new a.aV(t,a.rH.InvalidParameter,n);const u=new p.Z({paths:[],spatialReference:s.spatialReference});return u.addPath([s,c]),(0,m.kQ)(u,(0,i.Lz)((0,l.D)(o[2],-1)))}))},e.functions.densify=function(t,n){return e.standardFunctionAsync(t,n,((e,r,o)=>{if(o=(0,l.L)(o),(0,l.C)(o,2,3,t,n),null===o[0])return null;if(!(o[0]instanceof d.Z))throw new a.aV(t,a.rH.InvalidParameter,n);const s=(0,l.g)(o[1]);if(isNaN(s))throw new a.aV(t,a.rH.InvalidParameter,n);if(s<=0)throw new a.aV(t,a.rH.InvalidParameter,n);return o[0]instanceof y.Z||o[0]instanceof p.Z?(0,m.Cz)(o[0],s,(0,i.Lz)((0,l.D)(o[2],-1))):o[0]instanceof h.Z?(0,m.Cz)(_(o[0]),s,(0,i.Lz)((0,l.D)(o[2],-1))):o[0]}))},e.functions.densifygeodetic=function(t,n){return e.standardFunctionAsync(t,n,((e,r,o)=>{if(o=(0,l.L)(o),(0,l.C)(o,2,3,t,n),null===o[0])return null;if(!(o[0]instanceof d.Z))throw new a.aV(t,a.rH.InvalidParameter,n);const s=(0,l.g)(o[1]);if(isNaN(s))throw new a.aV(t,a.rH.InvalidParameter,n);if(s<=0)throw new a.aV(t,a.rH.InvalidParameter,n);return o[0]instanceof y.Z||o[0]instanceof p.Z?(0,m.j2)(o[0],s,(0,i.Lz)((0,l.D)(o[2],-1))):o[0]instanceof h.Z?(0,m.j2)(_(o[0]),s,(0,i.Lz)((0,l.D)(o[2],-1))):o[0]}))},e.functions.generalize=function(t,n){return e.standardFunctionAsync(t,n,((e,r,o)=>{if(o=(0,l.L)(o),(0,l.C)(o,2,4,t,n),null===o[0])return null;if(!(o[0]instanceof d.Z))throw new a.aV(t,a.rH.InvalidParameter,n);const s=(0,l.g)(o[1]);if(isNaN(s))throw new a.aV(t,a.rH.InvalidParameter,n);return(0,m.D$)(o[0],s,(0,l.h)((0,l.D)(o[2],!0)),(0,i.Lz)((0,l.D)(o[3],-1)))}))},e.functions.buffer=function(t,n){return e.standardFunctionAsync(t,n,((e,r,o)=>{if(o=(0,l.L)(o),(0,l.C)(o,2,3,t,n),null===o[0])return null;if(!(o[0]instanceof d.Z))throw new a.aV(t,a.rH.InvalidParameter,n);const s=(0,l.g)(o[1]);if(isNaN(s))throw new a.aV(t,a.rH.InvalidParameter,n);return 0===s?(0,i.r1)(o[0]):(0,m.f3)(o[0],s,(0,i.Lz)((0,l.D)(o[2],-1)))}))},e.functions.buffergeodetic=function(t,n){return e.standardFunctionAsync(t,n,((e,r,o)=>{if(o=(0,l.L)(o),(0,l.C)(o,2,3,t,n),null===o[0])return null;if(!(o[0]instanceof d.Z))throw new a.aV(t,a.rH.InvalidParameter,n);const s=(0,l.g)(o[1]);if(isNaN(s))throw new a.aV(t,a.rH.InvalidParameter,n);return 0===s?(0,i.r1)(o[0]):(0,m.rd)(o[0],s,(0,i.Lz)((0,l.D)(o[2],-1)))}))},e.functions.offset=function(t,n){return e.standardFunctionAsync(t,n,((e,r,o)=>{if(o=(0,l.L)(o),(0,l.C)(o,2,6,t,n),null===o[0])return null;if(!(o[0]instanceof y.Z||o[0]instanceof p.Z))throw new a.aV(t,a.rH.InvalidParameter,n);const s=(0,l.g)(o[1]);if(isNaN(s))throw new a.aV(t,a.rH.InvalidParameter,n);const c=(0,l.g)((0,l.D)(o[4],10));if(isNaN(c))throw new a.aV(t,a.rH.InvalidParameter,n);const u=(0,l.g)((0,l.D)(o[5],0));if(isNaN(u))throw new a.aV(t,a.rH.InvalidParameter,n);return(0,m.cv)(o[0],s,(0,i.Lz)((0,l.D)(o[2],-1)),(0,l.j)((0,l.D)(o[3],"round")).toLowerCase(),c,u)}))},e.functions.rotate=function(t,n){return e.standardFunctionAsync(t,n,((e,r,o)=>{o=(0,l.L)(o),(0,l.C)(o,2,3,t,n);let s=o[0];if(null===s)return null;if(!(s instanceof d.Z))throw new a.aV(t,a.rH.InvalidParameter,n);s instanceof h.Z&&(s=y.Z.fromExtent(s));const i=(0,l.g)(o[1]);if(isNaN(i))throw new a.aV(t,a.rH.InvalidParameter,n);const c=(0,l.D)(o[2],null);if(null===c)return(0,m.U1)(s,i);if(c instanceof w.Z)return(0,m.U1)(s,i,c);throw new a.aV(t,a.rH.InvalidParameter,n)}))},e.functions.centroid=function(t,n){return e.standardFunctionAsync(t,n,((e,r,o)=>{if(o=(0,l.L)(o),(0,l.C)(o,1,1,t,n),null===o[0])return null;let s=o[0];if(((0,l.m)(o[0])||(0,l.o)(o[0]))&&(s=(0,l.O)(o[0],t.spatialReference)),null===s)return null;if(!(s instanceof d.Z))throw new a.aV(t,a.rH.InvalidParameter,n);return s instanceof w.Z?(0,l.y)((0,i.r1)(o[0]),t.spatialReference):s instanceof y.Z?s.centroid:s instanceof p.Z?(0,u.s9)(s):s instanceof g.Z?(0,u.Ay)(s):s instanceof h.Z?s.center:null}))},e.functions.multiparttosinglepart=function(t,n){return e.standardFunctionAsync(t,n,(async(e,r,o)=>{o=(0,l.L)(o),(0,l.C)(o,1,1,t,n);const s=[];if(null===o[0])return null;if(!(o[0]instanceof d.Z))throw new a.aV(t,a.rH.InvalidParameter,n);if(o[0]instanceof w.Z)return[(0,l.y)((0,i.r1)(o[0]),t.spatialReference)];if(o[0]instanceof h.Z)return[(0,l.y)((0,i.r1)(o[0]),t.spatialReference)];const c=await(0,m.og)(o[0]);if(c instanceof y.Z){const e=[],t=[];for(let n=0;n<c.rings.length;n++)if(c.isClockwise(c.rings[n])){const t=(0,v.im)({rings:[c.rings[n]],hasZ:!0===c.hasZ,hazM:!0===c.hasM,spatialReference:c.spatialReference.toJSON()});e.push(t)}else t.push({ring:c.rings[n],pt:c.getPoint(n,0)});for(let n=0;n<t.length;n++)for(let r=0;r<e.length;r++)if(e[r].contains(t[n].pt)){e[r].addRing(t[n].ring);break}return e}if(c instanceof p.Z){const e=[];for(let t=0;t<c.paths.length;t++){const n=(0,v.im)({paths:[c.paths[t]],hasZ:!0===c.hasZ,hazM:!0===c.hasM,spatialReference:c.spatialReference.toJSON()});e.push(n)}return e}if(o[0]instanceof g.Z){const e=(0,l.y)((0,i.r1)(o[0]),t.spatialReference);for(let t=0;t<e.points.length;t++)s.push(e.getPoint(t));return s}return null}))},e.functions.issimple=function(t,n){return e.standardFunctionAsync(t,n,((e,r,o)=>{if(o=(0,l.L)(o),(0,l.C)(o,1,1,t,n),null===o[0])return!0;if(!(o[0]instanceof d.Z))throw new a.aV(t,a.rH.InvalidParameter,n);return(0,m.Gg)(o[0])}))},e.functions.simplify=function(t,n){return e.standardFunctionAsync(t,n,((e,r,o)=>{if(o=(0,l.L)(o),(0,l.C)(o,1,1,t,n),null===o[0])return null;if(!(o[0]instanceof d.Z))throw new a.aV(t,a.rH.InvalidParameter,n);return(0,m.og)(o[0])}))},e.functions.convexhull=function(t,n){return e.standardFunctionAsync(t,n,((e,r,o)=>{if(o=(0,l.L)(o),(0,l.C)(o,1,1,t,n),null===o[0])return null;if(!(o[0]instanceof d.Z))throw new a.aV(t,a.rH.InvalidParameter,n);return(0,m.JI)(o[0])}))},e.functions.getuser=function(t,n){return e.standardFunctionAsync(t,n,(async(e,r,i)=>{(0,l.C)(i,0,2,t,n);let u=(0,l.D)(i[1],""),f=!0===u;if(u=!0===u||!1===u?"":(0,l.j)(u),0===i.length||i[0]instanceof o.Z){let e=null;e=t.services&&t.services.portal?t.services.portal:b.Z.getDefault(),i.length>0&&(e=(0,c._)(i[0],e));const n=await(0,c.q)(e,u,f);if(n){const e=JSON.parse(JSON.stringify(n));for(const t of["lastLogin","created","modified"])void 0!==e[t]&&null!==e[t]&&(e[t]=new Date(e[t]));return s.Z.convertObjectToArcadeDictionary(e,(0,l.G)(t))}return null}let h=null;if((0,l.r)(i[0])&&(h=i[0]),h){if(f=!1,u)return null;await h.load();const e=await h.getOwningSystemUrl();if(!e){if(!u){const e=await h.getIdentityUser();return e?s.Z.convertObjectToArcadeDictionary({username:e},(0,l.G)(t)):null}return null}let n=null;n=t.services&&t.services.portal?t.services.portal:b.Z.getDefault(),n=(0,c._)(new o.Z(e),n);const r=await(0,c.q)(n,u,f);if(r){const e=JSON.parse(JSON.stringify(r));for(const t of["lastLogin","created","modified"])void 0!==e[t]&&null!==e[t]&&(e[t]=new Date(e[t]));return s.Z.convertObjectToArcadeDictionary(e,(0,l.G)(t))}return null}throw new a.aV(t,a.rH.InvalidParameter,n)}))}),e.functions.nearestcoordinate=function(t,n){return e.standardFunctionAsync(t,n,(async(e,r,o)=>{if(o=(0,l.L)(o),(0,l.C)(o,2,2,t,n),!(o[0]instanceof d.Z||null===o[0]))throw new a.aV(t,a.rH.InvalidParameter,n);if(!(o[1]instanceof w.Z||null===o[1]))throw new a.aV(t,a.rH.InvalidParameter,n);if(null===o[0]||null===o[1])return null;const i=await(0,m.FH)(o[0],o[1]);return null===i?null:s.Z.convertObjectToArcadeDictionary({coordinate:i.coordinate,distance:i.distance},(0,l.G)(t),!1,!0)}))},e.functions.nearestvertex=function(t,n){return e.standardFunctionAsync(t,n,(async(e,r,o)=>{if(o=(0,l.L)(o),(0,l.C)(o,2,2,t,n),!(o[0]instanceof d.Z||null===o[0]))throw new a.aV(t,a.rH.InvalidParameter,n);if(!(o[1]instanceof w.Z||null===o[1]))throw new a.aV(t,a.rH.InvalidParameter,n);if(null===o[0]||null===o[1])return null;const i=await(0,m._L)(o[0],o[1]);return null===i?null:s.Z.convertObjectToArcadeDictionary({coordinate:i.coordinate,distance:i.distance},(0,l.G)(t),!1,!0)}))}}},26520:(e,t,n)=>{n.d(t,{_:()=>a,q:()=>i});var r=n(40330),o=n(3172),s=n(48522);function a(e,t){return null===e?t:new s.Z({url:e.field("url")})}async function i(e,t,n){const s=r.id?.findCredential(e.restUrl);if(!s)return null;if("loaded"===e.loadStatus&&""===t&&e.user&&e.user.sourceJSON&&!1===n)return e.user.sourceJSON;if(""===t){const t=await(0,o.default)(e.restUrl+"/community/self",{responseType:"json",query:{f:"json",...!1===n?{}:{returnUserLicenseTypeExtensions:!0}}});if(t.data){const e=t.data;if(e&&e.username)return e}return null}const a=await(0,o.default)(e.restUrl+"/community/users/"+t,{responseType:"json",query:{f:"json"}});if(a.data){const e=a.data;return e.error?null:e}return null}},99880:(e,t,n)=>{n.d(t,{V:()=>l});var r=n(68773),o=(n(3172),n(20102)),s=n(92604),a=n(81271);const i=s.Z.getLogger("esri.assets");function l(e){if(!r.default.assetsPath)throw i.errorOnce("The API assets location needs to be set using config.assetsPath. More information: https://arcg.is/1OzLe50"),new o.Z("assets:path-not-set","config.assetsPath is not set");return(0,a.v_)(r.default.assetsPath,e)}},64830:(e,t,n)=>{n.d(t,{Z:()=>s});var r=n(58971),o=n(10661);class s{constructor(e=(e=>e.values().next().value)){this._peeker=e,this._observable=new o.s,this._items=new Set}get length(){return(0,r.it)(this._observable),this._items.size}clear(){0!==this.length&&(this._items.clear(),this._observable.notify())}last(){if(0===this.length)return;let e;for(e of this._items);return e}peek(){if(0!==this.length)return this._peeker(this._items)}push(e){this.contains(e)||(this._items.add(e),this._observable.notify())}contains(e){return(0,r.it)(this._observable),this._items.has(e)}pop(){if(0===this.length)return;const e=this.peek();return this._items.delete(e),this._observable.notify(),e}popLast(){if(0===this.length)return;const e=this.last();return this._items.delete(e),this._observable.notify(),e}remove(e){this.contains(e)&&(this._items.delete(e),this._observable.notify())}filter(e){const t=this.length;return this._items.forEach((t=>{e(t)||this._items.delete(t)})),t!==this._items.size&&this._observable.notify(),this}*[Symbol.iterator](){(0,r.it)(this._observable),yield*this._items}}},10661:(e,t,n)=>{n.d(t,{s:()=>o});var r=n(42100);class o extends r.s{notify(){const e=this._observers;if(e&&e.length>0){const t=e.slice();for(const e of t)e.onInvalidated(),e.onCommitted()}}}},80903:(e,t,n)=>{n.d(t,{Z:()=>l});var r=n(50758),o=n(92604),s=n(95330),a=n(64830),i=n(728);class l{constructor(){this._inUseClients=new Array,this._clients=new Array,this._clientPromises=new Array,this._ongoingJobsQueue=new a.Z}destroy(){this.close()}get closed(){return!this._clients||!this._clients.length}open(e,t){return new Promise(((n,r)=>{let o=!0;const a=e=>{(0,s.k_)(t.signal),o&&(o=!1,e())};this._clients.length=e.length,this._clientPromises.length=e.length,this._inUseClients.length=e.length;for(let o=0;o<e.length;++o){const l=e[o];(0,s.y8)(l)?this._clientPromises[o]=l.then((e=>(this._clients[o]=new i.default(e,t,(()=>this._ongoingJobsQueue.pop()??null)),a(n),this._clients[o])),(()=>(a(r),null))):(this._clients[o]=new i.default(l,t,(()=>this._ongoingJobsQueue.pop()??null)),this._clientPromises[o]=Promise.resolve(this._clients[o]),a(n))}}))}broadcast(e,t,n){const r=new Array(this._clientPromises.length);for(let o=0;o<this._clientPromises.length;++o){const s=this._clientPromises[o];r[o]=s.then((r=>r?.invoke(e,t,n)))}return r}close(){let e;for(;e=this._ongoingJobsQueue.pop();)e.resolver.reject((0,s.zE)(`Worker closing, aborting job calling '${e.methodName}'`));for(const e of this._clientPromises)e.then((e=>e?.close()));this._clients.length=0,this._clientPromises.length=0,this._inUseClients.length=0}invoke(e,t,n){let r;Array.isArray(n)?(o.Z.getLogger("esri.core.workers.Connection").warn("invoke()","The transferList parameter is deprecated, use the options object instead"),r={transferList:n}):r=n;const a=(0,s.hh)();this._ongoingJobsQueue.push({methodName:e,data:t,invokeOptions:r,resolver:a});for(let e=0;e<this._clientPromises.length;e++){const t=this._clients[e];t?t.jobAdded():this._clientPromises[e].then((e=>e?.jobAdded()))}return a.promise}on(e,t){return Promise.all(this._clientPromises).then((()=>(0,r.AL)(this._clients.map((n=>n.on(e,t))))))}openPorts(){return new Promise((e=>{const t=new Array(this._clientPromises.length);let n=t.length;for(let r=0;r<this._clientPromises.length;++r)this._clientPromises[r].then((o=>{o&&(t[r]=o.openPort()),0==--n&&e(t)}))}))}get test(){return{numClients:this._clients.length}}}},78346:(e,t,n)=>{n.d(t,{bA:()=>x});var r=n(20102),o=n(80442),s=n(95330),a=n(80903),i=n(728),l=n(40330),c=n(92604),u=n(70586),f=n(94362),h=n(99880),d=n(68773),m=(n(2587),n(81271));const g={};function w(e){const t={async:e.async,isDebug:e.isDebug,locale:e.locale,baseUrl:e.baseUrl,has:{...e.has},map:{...e.map},packages:e.packages&&e.packages.concat()||[],paths:{...e.paths}};return e.hasOwnProperty("async")||(t.async=!0),e.hasOwnProperty("isDebug")||(t.isDebug=!1),e.baseUrl||(t.baseUrl=g.baseUrl),t}var y=n(41213);class p{constructor(){const e=document.createDocumentFragment();["addEventListener","dispatchEvent","removeEventListener"].forEach((t=>{this[t]=(...n)=>e[t](...n)}))}}class v{constructor(){this._dispatcher=new p,this._workerPostMessage({type:f.MessageType.HANDSHAKE})}terminate(){}get onmessage(){return this._onmessageHandler}set onmessage(e){this._onmessageHandler&&this.removeEventListener("message",this._onmessageHandler),this._onmessageHandler=e,e&&this.addEventListener("message",e)}get onmessageerror(){return this._onmessageerrorHandler}set onmessageerror(e){this._onmessageerrorHandler&&this.removeEventListener("messageerror",this._onmessageerrorHandler),this._onmessageerrorHandler=e,e&&this.addEventListener("messageerror",e)}get onerror(){return this._onerrorHandler}set onerror(e){this._onerrorHandler&&this.removeEventListener("error",this._onerrorHandler),this._onerrorHandler=e,e&&this.addEventListener("error",e)}postMessage(e){(0,y.Y)((()=>{this._workerMessageHandler(new MessageEvent("message",{data:e}))}))}dispatchEvent(e){return this._dispatcher.dispatchEvent(e)}addEventListener(e,t,n){this._dispatcher.addEventListener(e,t,n)}removeEventListener(e,t,n){this._dispatcher.removeEventListener(e,t,n)}_workerPostMessage(e){(0,y.Y)((()=>{this.dispatchEvent(new MessageEvent("message",{data:e}))}))}async _workerMessageHandler(e){const t=(0,f.QM)(e);if(t&&t.type===f.MessageType.OPEN){const{modulePath:e,jobId:n}=t;let r=await i.default.loadWorker(e);r||(r=await import(e));const o=i.default.connect(r);this._workerPostMessage({type:f.MessageType.OPENED,jobId:n,data:o})}}}var b=n(70171),_=n(17202);const k=c.Z.getLogger("esri.core.workers.workerFactory"),{HANDSHAKE:Z}=f.MessageType;let L,P;const A="Failed to create Worker. Fallback to execute module in main thread";async function I(e){return new Promise((t=>{function n(o){const s=(0,f.QM)(o);s&&s.type===Z&&(e.removeEventListener("message",n),e.removeEventListener("error",r),t(e))}function r(t){t.preventDefault(),e.removeEventListener("message",n),e.removeEventListener("error",r),k.warn("Failed to create Worker. Fallback to execute module in main thread",t),(e=new v).addEventListener("message",n),e.addEventListener("error",r)}e.addEventListener("message",n),e.addEventListener("error",r)}))}function D(){let e;if(null!=d.default.default){const t={...d.default};delete t.default,e=JSON.parse(JSON.stringify(t))}else e=JSON.parse(JSON.stringify(d.default));e.assetsPath=(0,m.hF)(e.assetsPath),e.defaultAssetsPath=e.defaultAssetsPath?(0,m.hF)(e.defaultAssetsPath):void 0,e.request.interceptors=[],e.log.interceptors=[],e.locale=(0,b.Kd)(),e.has={"esri-csp-restrictions":(0,o.Z)("esri-csp-restrictions"),"esri-2d-debug":!1,"esri-2d-update-debug":(0,o.Z)("esri-2d-update-debug"),"esri-2d-log-updating":(0,o.Z)("esri-2d-log-updating"),"featurelayer-pbf":(0,o.Z)("featurelayer-pbf"),"featurelayer-simplify-thresholds":(0,o.Z)("featurelayer-simplify-thresholds"),"featurelayer-simplify-payload-size-factors":(0,o.Z)("featurelayer-simplify-payload-size-factors"),"featurelayer-simplify-mobile-factor":(0,o.Z)("featurelayer-simplify-mobile-factor"),"esri-atomics":(0,o.Z)("esri-atomics"),"esri-shared-array-buffer":(0,o.Z)("esri-shared-array-buffer"),"esri-tiles-debug":(0,o.Z)("esri-tiles-debug"),"esri-workers-arraybuffer-transfer":(0,o.Z)("esri-workers-arraybuffer-transfer"),"feature-polyline-generalization-factor":(0,o.Z)("feature-polyline-generalization-factor"),"host-webworker":1,"polylabel-placement-enabled":(0,o.Z)("polylabel-placement-enabled")},e.workers.loaderUrl&&(e.workers.loaderUrl=(0,m.hF)(e.workers.loaderUrl)),e.workers.workerPath?e.workers.workerPath=(0,m.hF)(e.workers.workerPath):e.workers.workerPath=(0,m.hF)((0,h.V)("esri/core/workers/RemoteClient.js")),e.workers.useDynamicImport=!1;const t=d.default.workers.loaderConfig,n=w({baseUrl:t?.baseUrl,locale:(0,b.Kd)(),has:{"csp-restrictions":1,"dojo-test-sniff":0,"host-webworker":1,...t?.has},map:{...t?.map},paths:{...t?.paths},packages:t?.packages||[]}),r={buildDate:_.r,fullVersion:l.bR,revision:_.$};return JSON.stringify({esriConfig:e,loaderConfig:n,kernelInfo:r})}let E=0;const{ABORT:S,INVOKE:C,OPEN:H,OPENED:N,RESPONSE:O}=f.MessageType;class M{static async create(e){const t=await async function(){if(!(0,o.Z)("esri-workers"))return I(new v);if(!L&&!P)try{const e='let globalId=0;const outgoing=new Map,configuration=JSON.parse("{CONFIGURATION}");self.esriConfig=configuration.esriConfig;const workerPath=self.esriConfig.workers.workerPath,HANDSHAKE=0,OPEN=1,OPENED=2,RESPONSE=3,INVOKE=4,ABORT=5;function createAbortError(){const e=new Error("Aborted");return e.name="AbortError",e}function receiveMessage(e){return e&&e.data?"string"==typeof e.data?JSON.parse(e.data):e.data:null}function invokeStaticMessage(e,o,r){const t=r&&r.signal,n=globalId++;return new Promise(((r,s)=>{if(t){if(t.aborted)return s(createAbortError());t.addEventListener("abort",(()=>{outgoing.get(n)&&(outgoing.delete(n),self.postMessage({type:ABORT,jobId:n}),s(createAbortError()))}))}outgoing.set(n,{resolve:r,reject:s}),self.postMessage({type:INVOKE,jobId:n,methodName:e,abortable:null!=t,data:o})}))}let workerRevisionChecked=!1;function checkWorkerRevision(e){if(!workerRevisionChecked&&e.kernelInfo){workerRevisionChecked=!0;const{revision:o,fullVersion:r}=configuration.kernelInfo,{revision:t,fullVersion:n,version:s}=e.kernelInfo;esriConfig.assetsPath!==esriConfig.defaultAssetsPath&&o!==t&&console.warn(`Version mismatch detected between ArcGIS Maps SDK for JavaScript modules and assets. For more information visit https://bit.ly/3QnsuSo.\\nModules version: ${r}\\nAssets version: ${n??s}\\nAssets path: ${esriConfig.assetsPath}`)}}function messageHandler(e){const o=receiveMessage(e);if(!o)return;const r=o.jobId;switch(o.type){case OPEN:let n;function t(e){const o=n.connect(e);self.postMessage({type:OPENED,jobId:r,data:o},[o])}"function"==typeof define&&define.amd?require([workerPath],(e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||new Promise((e=>{require([o.modulePath],e)})))).then(t)})):"System"in self&&"function"==typeof System.import?System.import(workerPath).then((e=>(n=e.default,checkWorkerRevision(n),n.loadWorker(o.modulePath)))).then((e=>e||System.import(o.modulePath))).then(t):esriConfig.workers.useDynamicImport?import(workerPath).then((e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||import(o.modulePath))).then(t)})):(self.RemoteClient||importScripts(workerPath),n=self.RemoteClient.default||self.RemoteClient,checkWorkerRevision(n),n.loadWorker(o.modulePath).then(t));break;case RESPONSE:if(outgoing.has(r)){const s=outgoing.get(r);outgoing.delete(r),o.error?s.reject(JSON.parse(o.error)):s.resolve(o.data)}}}self.dojoConfig=configuration.loaderConfig,esriConfig.workers.loaderUrl&&(self.importScripts(esriConfig.workers.loaderUrl),"function"==typeof require&&"function"==typeof require.config&&require.config(configuration.loaderConfig)),self.addEventListener("message",messageHandler),self.postMessage({type:0});'.split('"{CONFIGURATION}"').join(`'${D()}'`);L=URL.createObjectURL(new Blob([e],{type:"text/javascript"}))}catch(e){P=e||{}}let e;if(L)try{e=new Worker(L,{name:"esri-worker-"+E++})}catch(t){k.warn(A,P),e=new v}else k.warn(A,P),e=new v;return I(e)}();return new M(t,e)}constructor(e,t){this._outJobs=new Map,this._inJobs=new Map,this.worker=e,this.id=t,e.addEventListener("message",this._onMessage.bind(this)),e.addEventListener("error",(e=>{e.preventDefault(),c.Z.getLogger("esri.core.workers.WorkerOwner").error(e)}))}terminate(){this.worker.terminate()}async open(e,t={}){const{signal:n}=t,r=(0,f.jt)();return new Promise(((t,o)=>{const a={resolve:t,reject:o,abortHandle:(0,s.$F)(n,(()=>{this._outJobs.delete(r),this._post({type:S,jobId:r})}))};this._outJobs.set(r,a),this._post({type:H,jobId:r,modulePath:e})}))}_onMessage(e){const t=(0,f.QM)(e);if(t)switch(t.type){case N:this._onOpenedMessage(t);break;case O:this._onResponseMessage(t);break;case S:this._onAbortMessage(t);break;case C:this._onInvokeMessage(t)}}_onAbortMessage(e){const t=this._inJobs,n=e.jobId,r=t.get(n);r&&(r.controller&&r.controller.abort(),t.delete(n))}_onInvokeMessage(e){const{methodName:t,jobId:n,data:r,abortable:o}=e,a=o?new AbortController:null,i=this._inJobs,c=l.Nv[t];let u;try{if("function"!=typeof c)throw new TypeError(`${t} is not a function`);u=c.call(null,r,{signal:a?a.signal:null})}catch(e){return void this._post({type:O,jobId:n,error:(0,f.AB)(e)})}(0,s.y8)(u)?(i.set(n,{controller:a,promise:u}),u.then((e=>{i.has(n)&&(i.delete(n),this._post({type:O,jobId:n},e))}),(e=>{i.has(n)&&(i.delete(n),e||(e={message:"Error encountered at method"+t}),(0,s.D_)(e)||this._post({type:O,jobId:n,error:(0,f.AB)(e||{message:`Error encountered at method ${t}`})}))}))):this._post({type:O,jobId:n},u)}_onOpenedMessage(e){const{jobId:t,data:n}=e,r=this._outJobs.get(t);r&&(this._outJobs.delete(t),(0,u.hw)(r.abortHandle),r.resolve(n))}_onResponseMessage(e){const{jobId:t,error:n,data:o}=e,s=this._outJobs.get(t);s&&(this._outJobs.delete(t),(0,u.hw)(s.abortHandle),n?s.reject(r.Z.fromJSON(JSON.parse(n))):s.resolve(o))}_post(e,t,n){return(0,f.oi)(this.worker,e,t,n)}}const R=(0,o.Z)("host-browser")?Math.min(navigator.hardwareConcurrency-1,(0,o.Z)("workers-pool-size")):0;let V=(0,o.Z)("esri-mobile")?Math.min(R,3):R;V||(V=(0,o.Z)("safari")&&(0,o.Z)("mac")?7:2);let F=0;const j=[];async function z(e,t){const n=new a.Z;return await n.open(e,t),n}async function x(e,t={}){if("string"!=typeof e)throw new r.Z("workers:undefined-module","modulePath is missing");let n=t.strategy||"distributed";if((0,o.Z)("host-webworker")&&!(0,o.Z)("esri-workers")&&(n="local"),"local"===n){let n=await i.default.loadWorker(e);n||(n=await import(e)),(0,s.k_)(t.signal);const r=t.client||n;return z([i.default.connect(n)],{...t,client:r})}if(await async function(){if(J)return J;T=new AbortController;const e=[];for(let t=0;t<V;t++){const n=M.create(t).then((e=>(j[t]=e,e)));e.push(n)}return J=Promise.all(e),J}(),(0,s.k_)(t.signal),"dedicated"===n){const n=F++%V;return z([await j[n].open(e,t)],t)}if(t.maxNumWorkers&&t.maxNumWorkers>0){const n=Math.min(t.maxNumWorkers,V);if(n<V){const r=new Array(n);for(let o=0;o<n;++o){const n=F++%V;r[o]=j[n].open(e,t)}return z(r,t)}}return z(j.map((n=>n.open(e,t))),t)}let T,J=null},8667:(e,t,n)=>{n.d(t,{CJ:()=>j,Cz:()=>V,D$:()=>R,ED:()=>b,FH:()=>N,G0:()=>E,Gg:()=>Z,JI:()=>P,LV:()=>k,Nm:()=>_,Sp:()=>I,TE:()=>g,U1:()=>M,W4:()=>p,Y4:()=>x,_L:()=>O,cv:()=>S,e5:()=>A,f3:()=>C,fS:()=>w,j2:()=>F,jU:()=>m,kK:()=>y,kQ:()=>T,og:()=>L,oq:()=>f,r3:()=>d,rd:()=>H,sz:()=>z,uh:()=>v,wf:()=>D,z7:()=>h}),n(66577);var r=n(78346),o=n(94139),s=n(33955);function a(e){return Array.isArray(e)?e[0]?.spatialReference:e?.spatialReference}function i(e){return e?Array.isArray(e)?e.map(i):e.toJSON?e.toJSON():e:e}function l(e){return Array.isArray(e)?e.map((e=>(0,s.im)(e))):(0,s.im)(e)}let c;async function u(e,t){return(await async function(){return c||(c=(0,r.bA)("geometryEngineWorker",{strategy:"distributed"})),c}()).invoke("executeGEOperation",{operation:e,parameters:i(t)})}async function f(e,t){return l(await u("clip",[a(e),e,t]))}async function h(e,t){return l(await u("cut",[a(e),e,t]))}function d(e,t){return u("contains",[a(e),e,t])}function m(e,t){return u("crosses",[a(e),e,t])}function g(e,t,n){return u("distance",[a(e),e,t,n])}function w(e,t){return u("equals",[a(e),e,t])}function y(e,t){return u("intersects",[a(e),e,t])}function p(e,t){return u("touches",[a(e),e,t])}function v(e,t){return u("within",[a(e),e,t])}function b(e,t){return u("disjoint",[a(e),e,t])}function _(e,t){return u("overlaps",[a(e),e,t])}function k(e,t,n){return u("relate",[a(e),e,t,n])}function Z(e){return u("isSimple",[a(e),e])}async function L(e){return l(await u("simplify",[a(e),e]))}async function P(e,t=!1){return l(await u("convexHull",[a(e),e,t]))}async function A(e,t){return l(await u("difference",[a(e),e,t]))}async function I(e,t){return l(await u("symmetricDifference",[a(e),e,t]))}async function D(e,t){return l(await u("intersect",[a(e),e,t]))}async function E(e,t=null){const n=function(e,t){let n;return Array.isArray(e)?n=e:(n=[],n.push(e),null!=t&&n.push(t)),n}(e,t);return l(await u("union",[a(n),n]))}async function S(e,t,n,r,o,s){return l(await u("offset",[a(e),e,t,n,r,o,s]))}async function C(e,t,n,r=!1){const o=[a(e),e,t,n,r];return l(await u("buffer",o))}async function H(e,t,n,r,o,s){const i=[a(e),e,t,n,r,o,s];return l(await u("geodesicBuffer",i))}async function N(e,t,n=!0){const r=await u("nearestCoordinate",[a(e),e,t,n]);return{...r,coordinate:o.Z.fromJSON(r.coordinate)}}async function O(e,t){const n=await u("nearestVertex",[a(e),e,t]);return{...n,coordinate:o.Z.fromJSON(n.coordinate)}}async function M(e,t,n){if(null==e)throw new J;const r=e.spatialReference;if(null==(n=n??function(e){return"xmin"in e?e.center:"x"in e?e:e.extent?.center}(e)))throw new J;const o=e.constructor.fromJSON(await u("rotate",[r,e,t,n]));return o.spatialReference=r,o}async function R(e,t,n,r){return l(await u("generalize",[a(e),e,t,n,r]))}async function V(e,t,n){return l(await u("densify",[a(e),e,t,n]))}async function F(e,t,n,r=0){return l(await u("geodesicDensify",[a(e),e,t,n,r]))}function j(e,t){return u("planarArea",[a(e),e,t])}function z(e,t){return u("planarLength",[a(e),e,t])}function x(e,t,n){return u("geodesicArea",[a(e),e,t,n])}function T(e,t,n){return u("geodesicLength",[a(e),e,t,n])}class J extends Error{constructor(){super("Illegal Argument Exception")}}},2587:(e,t,n)=>{n(90344),n(18848),n(940),n(70171);var r=n(94443),o=n(3172),s=n(20102);async function a(e){if(null!=i.fetchBundleAsset)return i.fetchBundleAsset(e);const t=await(0,o.default)(e,{responseType:"text"});return JSON.parse(t.data)}const i={};var l,c=n(99880);(0,r.tz)((l={pattern:"esri/",location:c.V},new class{constructor({base:e="",pattern:t,location:n=new URL(window.location.href)}){let r;r="string"==typeof n?e=>new URL(e,new URL(n,window.location.href)).href:n instanceof URL?e=>new URL(e,n).href:n,this.pattern="string"==typeof t?new RegExp(`^${t}`):t,this.getAssetUrl=r,e=e?e.endsWith("/")?e:e+"/":"",this.matcher=new RegExp(`^${e}(?:(.*)/)?(.*)$`)}fetchMessageBundle(e,t){return async function(e,t,n,o){const i=t.exec(n);if(!i)throw new s.Z("esri-intl:invalid-bundle",`Bundle id "${n}" is not compatible with the pattern "${t}"`);const l=i[1]?`${i[1]}/`:"",c=i[2],u=(0,r.Su)(o),f=`${l}${c}.json`,h=u?`${l}${c}_${u}.json`:f;let d;try{d=await a(e(h))}catch(t){if(h===f)throw new s.Z("intl:unknown-bundle",`Bundle "${n}" cannot be loaded`,{error:t});try{d=await a(e(f))}catch(e){throw new s.Z("intl:unknown-bundle",`Bundle "${n}" cannot be loaded`,{error:e})}}return d}(this.getAssetUrl,this.matcher,e,t)}}(l)))},90344:(e,t,n)=>{n.d(t,{LJ:()=>L,Xr:()=>y,Ze:()=>_,cZ:()=>c,i$:()=>P,o8:()=>Z,p6:()=>k});var r=n(35454),o=n(70171),s=n(17126);const a={year:void 0,month:void 0,day:void 0,weekday:void 0},i={hour:void 0,minute:void 0,second:void 0},l={timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone},c={timeZone:"Etc/UTC"},u={year:"numeric",month:"numeric",day:"numeric"},f={year:"numeric",month:"long",day:"numeric"},h={year:"numeric",month:"short",day:"numeric"},d={year:"numeric",month:"long",weekday:"long",day:"numeric"},m={hour:"numeric",minute:"numeric"},g={...m,second:"numeric"},w={"short-date":u,"short-date-short-time":{...u,...m},"short-date-short-time-24":{...u,...m,hour12:!1},"short-date-long-time":{...u,...g},"short-date-long-time-24":{...u,...g,hour12:!1},"short-date-le":u,"short-date-le-short-time":{...u,...m},"short-date-le-short-time-24":{...u,...m,hour12:!1},"short-date-le-long-time":{...u,...g},"short-date-le-long-time-24":{...u,...g,hour12:!1},"long-month-day-year":f,"long-month-day-year-short-time":{...f,...m},"long-month-day-year-short-time-24":{...f,...m,hour12:!1},"long-month-day-year-long-time":{...f,...g},"long-month-day-year-long-time-24":{...f,...g,hour12:!1},"day-short-month-year":h,"day-short-month-year-short-time":{...h,...m},"day-short-month-year-short-time-24":{...h,...m,hour12:!1},"day-short-month-year-long-time":{...h,...g},"day-short-month-year-long-time-24":{...h,...g,hour12:!1},"long-date":d,"long-date-short-time":{...d,...m},"long-date-short-time-24":{...d,...m,hour12:!1},"long-date-long-time":{...d,...g},"long-date-long-time-24":{...d,...g,hour12:!1},"long-month-year":{month:"long",year:"numeric"},"short-month-year":{month:"short",year:"numeric"},year:{year:"numeric"},"short-time":m,"long-time":g},y=(0,r.w)()({shortDate:"short-date",shortDateShortTime:"short-date-short-time",shortDateShortTime24:"short-date-short-time-24",shortDateLongTime:"short-date-long-time",shortDateLongTime24:"short-date-long-time-24",shortDateLE:"short-date-le",shortDateLEShortTime:"short-date-le-short-time",shortDateLEShortTime24:"short-date-le-short-time-24",shortDateLELongTime:"short-date-le-long-time",shortDateLELongTime24:"short-date-le-long-time-24",longMonthDayYear:"long-month-day-year",longMonthDayYearShortTime:"long-month-day-year-short-time",longMonthDayYearShortTime24:"long-month-day-year-short-time-24",longMonthDayYearLongTime:"long-month-day-year-long-time",longMonthDayYearLongTime24:"long-month-day-year-long-time-24",dayShortMonthYear:"day-short-month-year",dayShortMonthYearShortTime:"day-short-month-year-short-time",dayShortMonthYearShortTime24:"day-short-month-year-short-time-24",dayShortMonthYearLongTime:"day-short-month-year-long-time",dayShortMonthYearLongTime24:"day-short-month-year-long-time-24",longDate:"long-date",longDateShortTime:"long-date-short-time",longDateShortTime24:"long-date-short-time-24",longDateLongTime:"long-date-long-time",longDateLongTime24:"long-date-long-time-24",longMonthYear:"long-month-year",shortMonthYear:"short-month-year",year:"year"}),p={ar:"ar-u-nu-latn-ca-gregory"};let v=new WeakMap,b=w["short-date-short-time"];function _(e){return w[e]}function k(e,t){return function(e){const t=e||b;let n=v.get(t);if(!n){const e=(0,o.Kd)(),r=p[e]||e;n=new Intl.DateTimeFormat(r,t),v.set(t,n)}return n}(t).format(e)}function Z(e,t=w["short-date"]){return k(new Date(e),{...t,...c,...i})}function L(e,t=w["short-time"]){return k(new Date(`1970-01-01T${e}Z`),{...t,...c,...a})}function P(e,t=w["short-date-short-time"]){const n=s.ou.fromISO(e,{setZone:!0}),r=(0,o.Kd)(),a=p[r]??r;return n.toLocaleString({...l,...t},{locale:a})}(0,o.Ze)((()=>{v=new WeakMap,b=w["short-date-short-time"]}))},94443:(e,t,n)=>{n.d(t,{ME:()=>m,Su:()=>g,tz:()=>d});var r=n(20102),o=n(50758),s=n(95330),a=n(70171);const i=/^([a-z]{2})(?:[-_]([A-Za-z]{2}))?$/,l={ar:!0,bg:!0,bs:!0,ca:!0,cs:!0,da:!0,de:!0,el:!0,en:!0,es:!0,et:!0,fi:!0,fr:!0,he:!0,hr:!0,hu:!0,id:!0,it:!0,ja:!0,ko:!0,lt:!0,lv:!0,nb:!0,nl:!0,pl:!0,"pt-BR":!0,"pt-PT":!0,ro:!0,ru:!0,sk:!0,sl:!0,sr:!0,sv:!0,th:!0,tr:!0,uk:!0,vi:!0,"zh-CN":!0,"zh-HK":!0,"zh-TW":!0};function c(e){return e in l}Object.keys(l);const u=[],f=new Map;function h(e){for(const t of f.keys())w(e.pattern,t)&&f.delete(t)}function d(e){return u.includes(e)||(h(e),u.unshift(e)),(0,o.kB)((()=>{const t=u.indexOf(e);t>-1&&(u.splice(t,1),h(e))}))}async function m(e){const t=(0,a.Kd)();f.has(e)||f.set(e,async function(e,t){const n=[];for(const r of u)if(w(r.pattern,e))try{return await r.fetchMessageBundle(e,t)}catch(e){n.push(e)}if(n.length)throw new r.Z("intl:message-bundle-error",`Errors occurred while loading "${e}"`,{errors:n});throw new r.Z("intl:no-message-bundle-loader",`No loader found for message bundle "${e}"`)}(e,t));const n=f.get(e);return n&&await y.add(n),n}function g(e){if(!i.test(e))return null;const t=i.exec(e);if(null===t)return null;const[,n,r]=t,o=n+(r?"-"+r.toUpperCase():"");return c(o)?o:c(n)?n:null}function w(e,t){return"string"==typeof e?t.startsWith(e):e.test(t)}(0,a.Ze)((()=>{f.clear()}));const y=new class{constructor(){this._numLoading=0,this._dfd=null}async waitForAll(){this._dfd&&await this._dfd.promise}add(e){return this._increase(),e.then((()=>this._decrease()),(()=>this._decrease())),this.waitForAll()}_increase(){this._numLoading++,this._dfd||(this._dfd=(0,s.hh)())}_decrease(){this._numLoading=Math.max(this._numLoading-1,0),this._dfd&&0===this._numLoading&&(this._dfd.resolve(),this._dfd=null)}}},18848:(e,t,n)=>{n.d(t,{sh:()=>i,uf:()=>l});var r=n(70171);const o={ar:"ar-u-nu-latn"};let s=new WeakMap,a={};function i(e={}){const t={};return null!=e.digitSeparator&&(t.useGrouping=e.digitSeparator),null!=e.places&&(t.minimumFractionDigits=t.maximumFractionDigits=e.places),t}function l(e,t){return Object.is(e,-0)&&(e=0),function(e){const t=e||a;if(!s.has(t)){const n=(0,r.Kd)(),a=o[(0,r.Kd)()]||n;s.set(t,new Intl.NumberFormat(a,e))}return s.get(t)}(t).format(e)}(0,r.Ze)((()=>{s=new WeakMap,a={}}))},940:(e,t,n)=>{n.d(t,{n:()=>c});var r=n(92604),o=n(78286),s=n(19153),a=n(90344),i=n(18848);const l=r.Z.getLogger("esri.intl.substitute");function c(e,t,n={}){const{format:r={}}=n;return(0,s.gx)(e,(e=>function(e,t,n){let r,s;const a=e.indexOf(":");if(-1===a?r=e.trim():(r=e.slice(0,a).trim(),s=e.slice(a+1).trim()),!r)return"";const i=(0,o.hS)(r,t);if(null==i)return"";const l=(s?n?.[s]:null)??n?.[r];return l?u(i,l):s?f(i,s):h(i)}(e,t,r)))}function u(e,t){switch(t.type){case"date":return(0,a.p6)(e,t.intlOptions);case"number":return(0,i.uf)(e,t.intlOptions);default:return l.warn("missing format descriptor for key {key}"),h(e)}}function f(e,t){switch(t.toLowerCase()){case"dateformat":return(0,a.p6)(e);case"numberformat":return(0,i.uf)(e);default:return l.warn(`inline format is unsupported since 4.12: ${t}`),/^(dateformat|datestring)/i.test(t)?(0,a.p6)(e):/^numberformat/i.test(t)?(0,i.uf)(e):h(e)}}function h(e){switch(typeof e){case"string":return e;case"number":return(0,i.uf)(e);case"boolean":return""+e;default:return e instanceof Date?(0,a.p6)(e):""}}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8024,5732],{92835:(e,t,s)=>{s.d(t,{Z:()=>g});var i,r=s(43697),n=s(96674),l=s(35463),a=s(5600),o=(s(75215),s(67676),s(80442),s(71715)),h=s(52011),u=s(30556);let c=i=class extends n.wq{static get allTime(){return d}static get empty(){return f}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?e.getTime():null}get isAllTime(){return this.equals(i.allTime)}get isEmpty(){return this.equals(i.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?e.getTime():null}clone(){return new i({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=null!=this.start?this.start.getTime():this.start,s=null!=this.end?this.end.getTime():this.end,i=null!=e.start?e.start.getTime():e.start,r=null!=e.end?e.end.getTime():e.end;return t===i&&s===r}expandTo(e){if(this.isEmpty||this.isAllTime)return this.clone();let t=this.start;t&&(t=(0,l.JE)(t,e));let s=this.end;if(s){const t=(0,l.JE)(s,e);s=s.getTime()===t.getTime()?t:(0,l.Nm)(t,1,e)}return new i({start:t,end:s})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return i.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,s=this.end?.getTime()??1/0,r=e.start?.getTime()??-1/0,n=e.end?.getTime()??1/0;let l,a;if(r>=t&&r<=s?l=r:t>=r&&t<=n&&(l=t),s>=r&&s<=n?a=s:n>=t&&n<=s&&(a=n),null!=l&&null!=a&&!isNaN(l)&&!isNaN(a)){const e=new i;return e.start=l===-1/0?null:new Date(l),e.end=a===1/0?null:new Date(a),e}return i.empty}offset(e,t){if(this.isEmpty||this.isAllTime)return this.clone();const s=new i,{start:r,end:n}=this;return null!=r&&(s.start=(0,l.Nm)(r,e,t)),null!=n&&(s.end=(0,l.Nm)(n,e,t)),s}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return d.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,s=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new i({start:t,end:s})}};(0,r._)([(0,a.Cb)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"end",void 0),(0,r._)([(0,o.r)("end")],c.prototype,"readEnd",null),(0,r._)([(0,u.c)("end")],c.prototype,"writeEnd",null),(0,r._)([(0,a.Cb)({readOnly:!0,json:{read:!1}})],c.prototype,"isAllTime",null),(0,r._)([(0,a.Cb)({readOnly:!0,json:{read:!1}})],c.prototype,"isEmpty",null),(0,r._)([(0,a.Cb)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"start",void 0),(0,r._)([(0,o.r)("start")],c.prototype,"readStart",null),(0,r._)([(0,u.c)("start")],c.prototype,"writeStart",null),c=i=(0,r._)([(0,h.j)("esri.TimeExtent")],c);const d=new c,f=new c({start:void 0,end:void 0}),g=c},5732:(e,t,s)=>{s.d(t,{c:()=>i,g:()=>r});var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},46791:(e,t,s)=>{s.d(t,{Z:()=>T});var i,r=s(43697),n=s(3894),l=s(32448),a=s(50758),o=s(22974),h=s(71143);!function(e){e[e.ADD=1]="ADD",e[e.REMOVE=2]="REMOVE",e[e.MOVE=4]="MOVE"}(i||(i={}));var u,c=s(1654),d=s(75215),f=s(58971),g=s(5600),p=s(52421),m=s(52011),_=s(10661);const y=new h.Z(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 v(e){return e?e instanceof A?e.toArray():e.length?Array.prototype.slice.apply(e):[]:[]}function b(e){if(e&&e.length)return e[0]}function w(e,t,s,i){const r=Math.min(e.length-s,t.length-i);let n=0;for(;n<r&&e[s+n]===t[i+n];)n++;return n}function E(e,t,s,i){t&&t.forEach(((t,r,n)=>{e.push(t),E(e,s.call(i,t,r,n),s,i)}))}const C=new Set,D=new Set,I=new Set,M=new Map;let S=0,A=u=class extends l.Z.EventedAccessor{static isCollection(e){return null!=e&&e instanceof u}constructor(e){super(e),this._chgListeners=[],this._notifications=null,this._timer=null,this._observable=new _.s,this.length=0,this._items=[],Object.defineProperty(this,"uid",{value:S++})}normalizeCtorArgs(e){return e?Array.isArray(e)||e instanceof u?{items:e}:e:{}}destroy(){this._removeAllRaw()}*[Symbol.iterator](){yield*this.items}get items(){return(0,f.it)(this._observable),this._items}set items(e){this._emitBeforeChanges(i.ADD)||(this._splice(0,this.length,v(e)),this._emitAfterChanges(i.ADD))}hasEventListener(e){return"change"===e?this._chgListeners.length>0:this._emitter.hasEventListener(e)}on(e,t){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,a.kB)((()=>{s.removed=!0,e.splice(e.indexOf(s),1)}))}return this._emitter.on(e,t)}once(e,t){return this.on(e,t)}add(e,t){if((0,f.it)(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,f.it)(this._observable),!e||!e.length)return this;if(this._emitBeforeChanges(i.ADD))return this;const s=this.getNextIndex(t);return this._splice(s,0,v(e)),this._emitAfterChanges(i.ADD),this}at(e){if((0,f.it)(this._observable),(e=Math.trunc(e)||0)<0&&(e+=this.length),!(e<0||e>=this.length))return this._items[e]}removeAll(){if((0,f.it)(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,f.it)(this._observable),this._createNewInstance({items:this._items.map(o.d9)})}concat(...e){(0,f.it)(this._observable);const t=e.map(v);return this._createNewInstance({items:this._items.concat(...t)})}drain(e,t){if((0,f.it)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return;const s=this._splice(0,this.length),r=s.length;for(let i=0;i<r;i++)e.call(t,s[i],i,s);this._emitAfterChanges(i.REMOVE)}every(e,t){return(0,f.it)(this._observable),this._items.every(e,t)}filter(e,t){let s;return(0,f.it)(this._observable),s=2===arguments.length?this._items.filter(e,t):this._items.filter(e),this._createNewInstance({items:s})}find(e,t){return(0,f.it)(this._observable),this._items.find(e,t)}findIndex(e,t){return(0,f.it)(this._observable),this._items.findIndex(e,t)}flatten(e,t){(0,f.it)(this._observable);const s=[];return E(s,this,e,t),new u(s)}forEach(e,t){return(0,f.it)(this._observable),this._items.forEach(e,t)}getItemAt(e){return(0,f.it)(this._observable),this._items[e]}getNextIndex(e){(0,f.it)(this._observable);const t=this.length;return(e=e??t)<0?e=0:e>t&&(e=t),e}includes(e,t=0){return(0,f.it)(this._observable),this._items.includes(e,t)}indexOf(e,t=0){return(0,f.it)(this._observable),this._items.indexOf(e,t)}join(e=","){return(0,f.it)(this._observable),this._items.join(e)}lastIndexOf(e,t=this.length-1){return(0,f.it)(this._observable),this._items.lastIndexOf(e,t)}map(e,t){(0,f.it)(this._observable);const s=this._items.map(e,t);return new u({items:s})}reorder(e,t=this.length-1){(0,f.it)(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,f.it)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return;const e=b(this._splice(this.length-1,1));return this._emitAfterChanges(i.REMOVE),e}push(...e){return(0,f.it)(this._observable),this._emitBeforeChanges(i.ADD)||(this._splice(this.length,0,e),this._emitAfterChanges(i.ADD)),this.length}reduce(e,t){(0,f.it)(this._observable);const s=this._items;return 2===arguments.length?s.reduce(e,t):s.reduce(e)}reduceRight(e,t){(0,f.it)(this._observable);const s=this._items;return 2===arguments.length?s.reduceRight(e,t):s.reduceRight(e)}remove(e){return(0,f.it)(this._observable),this.removeAt(this.indexOf(e))}removeAt(e){if((0,f.it)(this._observable),e<0||e>=this.length||this._emitBeforeChanges(i.REMOVE))return;const t=b(this._splice(e,1));return this._emitAfterChanges(i.REMOVE),t}removeMany(e){if((0,f.it)(this._observable),!e||!e.length||this._emitBeforeChanges(i.REMOVE))return[];const t=e instanceof u?e.toArray():e,s=this._items,r=[],n=t.length;for(let e=0;e<n;e++){const i=t[e],n=s.indexOf(i);if(n>-1){const i=1+w(t,s,e+1,n+1),l=this._splice(n,i);l&&l.length>0&&r.push.apply(r,l),e+=i-1}}return this._emitAfterChanges(i.REMOVE),r}reverse(){if((0,f.it)(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,f.it)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return;const e=b(this._splice(0,1));return this._emitAfterChanges(i.REMOVE),e}slice(e=0,t=this.length){return(0,f.it)(this._observable),this._createNewInstance({items:this._items.slice(e,t)})}some(e,t){return(0,f.it)(this._observable),this._items.some(e,t)}sort(e){if((0,f.it)(this._observable),!this.length||this._emitBeforeChanges(i.MOVE))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}splice(e,t,...s){(0,f.it)(this._observable);const r=(t?i.REMOVE:0)|(s.length?i.ADD:0);if(this._emitBeforeChanges(r))return[];const n=this._splice(e,t,s)||[];return this._emitAfterChanges(r),n}toArray(){return(0,f.it)(this._observable),this._items.slice()}toJSON(){return(0,f.it)(this._observable),this.toArray()}toLocaleString(){return(0,f.it)(this._observable),this._items.toLocaleString()}toString(){return(0,f.it)(this._observable),this._items.toString()}unshift(...e){return(0,f.it)(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,r=this.itemType;let n,l;if(!this._notifications&&this.hasEventListener("change")&&(this._notifications=[{listeners:this._chgListeners.slice(),items:this._items.slice(),changes:[]}],this._timer&&this._timer.remove(),this._timer=(0,c.Os)((()=>this._dispatchChange()))),t){if(l=i.splice(e,t),this.hasEventListener("before-remove")){const t=y.acquire();t.target=this,t.cancellable=!0;for(let s=0,r=l.length;s<r;s++)n=l[s],t.reset(n),this.emit("before-remove",t),t.defaultPrevented&&(l.splice(s,1),i.splice(e,0,n),e+=1,s-=1,r-=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=l.length;for(let s=0;s<t;s++)e.reset(l[s]),this.emit("after-remove",e);y.release(e)}}if(s&&s.length){if(r){const e=[];for(const t of s){const s=r.ensureType(t);null==s&&null!=t||e.push(s)}s=e}const t=this.hasEventListener("before-add"),n=this.hasEventListener("after-add"),l=e===this.length;if(t||n){const r=y.acquire();r.target=this,r.cancellable=!0;const a=y.acquire();a.target=this,a.cancellable=!1;for(const o of s)t?(r.reset(o),this.emit("before-add",r),r.defaultPrevented||(l?i.push(o):i.splice(e++,0,o),this._set("length",i.length),n&&(a.reset(o),this.emit("after-add",a)))):(l?i.push(o):i.splice(e++,0,o),this._set("length",i.length),a.reset(o),this.emit("after-add",a));y.release(a),y.release(r)}else{if(l)for(const e of s)i.push(e);else i.splice(e,0,...s);this._set("length",i.length)}}return(s&&s.length||l&&l.length)&&this._notifyChangeEvent(s,l),l}_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})}_dispatchChange(){if(this._timer&&(this._timer.remove(),this._timer=null),!this._notifications)return;const e=this._notifications;this._notifications=null;for(const t of e){const e=t.changes;C.clear(),D.clear(),I.clear();for(const{added:t,removed:s}of e){if(t)if(0===I.size&&0===D.size)for(const e of t)C.add(e);else for(const e of t)D.has(e)?(I.add(e),D.delete(e)):I.has(e)||C.add(e);if(s)if(0===I.size&&0===C.size)for(const e of s)D.add(e);else for(const e of s)C.has(e)?C.delete(e):(I.delete(e),D.add(e))}const s=n.Z.acquire();C.forEach((e=>{s.push(e)}));const i=n.Z.acquire();D.forEach((e=>{i.push(e)}));const r=this._items,l=t.items,a=n.Z.acquire();if(I.forEach((e=>{l.indexOf(e)!==r.indexOf(e)&&a.push(e)})),t.listeners&&(s.length||i.length||a.length)){const e={target:this,added:s,removed:i,moved:a},r=t.listeners.length;for(let s=0;s<r;s++){const i=t.listeners[s];i.removed||i.callback.call(this,e)}}n.Z.release(s),n.Z.release(i),n.Z.release(a)}C.clear(),D.clear(),I.clear()}};A.ofType=e=>{if(!e)return u;if(M.has(e))return M.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 u{};return(0,r._)([(0,p.c)({Type:e,ensureType:"function"==typeof e?(0,d.se)(e):(0,d.N7)(e)})],s.prototype,"itemType",void 0),s=(0,r._)([(0,m.j)(`esri.core.Collection<${t}>`)],s),M.set(e,s),s},(0,r._)([(0,g.Cb)()],A.prototype,"length",void 0),(0,r._)([(0,g.Cb)()],A.prototype,"items",null),A=u=(0,r._)([(0,m.j)("esri.core.Collection")],A);const T=A},52421:(e,t,s)=>{function i(e){return(t,s)=>{t[s]=e}}s.d(t,{c:()=>i})},35463:(e,t,s)=>{s.d(t,{JE:()=>l,Nm:()=>n,rJ:()=>a}),s(80442);const i={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8},r={milliseconds:{getter:"getMilliseconds",setter:"setMilliseconds",multiplier:1},seconds:{getter:"getSeconds",setter:"setSeconds",multiplier:1},minutes:{getter:"getMinutes",setter:"setMinutes",multiplier:1},hours:{getter:"getHours",setter:"setHours",multiplier:1},days:{getter:"getDate",setter:"setDate",multiplier:1},weeks:{getter:"getDate",setter:"setDate",multiplier:7},months:{getter:"getMonth",setter:"setMonth",multiplier:1},years:{getter:"getFullYear",setter:"setFullYear",multiplier:1},decades:{getter:"getFullYear",setter:"setFullYear",multiplier:10},centuries:{getter:"getFullYear",setter:"setFullYear",multiplier:100}};function n(e,t,s){const i=new Date(e.getTime());if(t&&s){const e=r[s],{getter:n,setter:l,multiplier:a}=e;if("months"===s){const e=function(e,t){const s=new Date(e,t+1,1);return s.setDate(0),s.getDate()}(i.getFullYear(),i.getMonth()+t);i.getDate()>e&&i.setDate(e)}i[l](i[n]()+t*a)}return i}function l(e,t){switch(t){case"milliseconds":return new Date(e.getTime());case"seconds":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds());case"minutes":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes());case"hours":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours());case"days":return new Date(e.getFullYear(),e.getMonth(),e.getDate());case"weeks":return new Date(e.getFullYear(),e.getMonth(),e.getDate()-e.getDay());case"months":return new Date(e.getFullYear(),e.getMonth(),1);case"years":return new Date(e.getFullYear(),0,1);case"decades":return new Date(e.getFullYear()-e.getFullYear()%10,0,1);case"centuries":return new Date(e.getFullYear()-e.getFullYear()%100,0,1);default:return new Date}}function a(e,t,s){return 0===e?0:e*i[t]/i[s]}},3723:(e,t,s)=>{s.r(t),s.d(t,{default:()=>P});var i=s(43697),r=s(68773),n=s(3172),l=(s(9790),s(16453)),a=s(95330),o=s(81271),h=s(5600),u=(s(75215),s(67676),s(80442),s(71715)),c=s(52011),d=s(6570),f=s(8744),g=s(87085),p=s(71612),m=s(38009),_=s(16859),y=s(34760),v=s(72965),b=s(21506),w=s(89164),E=s(4095),C=s(37898),D=s(77987),I=s(20256);const M=["atom","xml"],S={base:w.Z,key:"type",typeMap:{"simple-line":E.Z},errorContext:"symbol"},A={base:w.Z,key:"type",typeMap:{"picture-marker":C.Z,"simple-marker":D.Z},errorContext:"symbol"},T={base:w.Z,key:"type",typeMap:{"simple-fill":I.Z},errorContext:"symbol"};let O=class extends((0,p.h)((0,y.Q)((0,m.q)((0,_.I)((0,v.M)((0,l.R)(g.Z))))))){constructor(...e){super(...e),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(e,t){return"string"==typeof e?{url:e,...t}:e}readFeatureCollections(e,t){return t.featureCollection.layers.forEach((e=>{const t=e.layerDefinition.drawingInfo.renderer.symbol;t&&"esriSFS"===t.type&&t.outline?.style.includes("esriSFS")&&(t.outline.style="esriSLSSolid")})),t.featureCollection.layers}get hasPoints(){return this._hasGeometry("esriGeometryPoint")}get hasPolylines(){return this._hasGeometry("esriGeometryPolyline")}get hasPolygons(){return this._hasGeometry("esriGeometryPolygon")}get title(){const e=this._get("title");return e&&"defaults"!==this.originOf("title")?e:this.url?(0,o.vt)(this.url,M)||"GeoRSS":e||""}set title(e){this._set("title",e)}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Map Service","Feature Service","Feature Collection","Scene Service"]},e).catch(a.r9).then((()=>this._fetchService(t))).then((e=>{this.read(e,{origin:"service"})}))),Promise.resolve(this)}async hasDataChanged(){const e=await this._fetchService();return this.read(e,{origin:"service",ignoreDefaults:!0}),!0}async _fetchService(e){const t=this.spatialReference,{data:s}=await(0,n.default)(r.default.geoRSSServiceUrl,{query:{url:this.url,refresh:!!this.loaded||void 0,outSR:(0,f.oR)(t)?void 0:t.wkid??JSON.stringify(t)},signal:e});return s}_hasGeometry(e){return this.featureCollections?.some((t=>t.featureSet?.geometryType===e&&t.featureSet.features?.length>0))??!1}};(0,i._)([(0,h.Cb)()],O.prototype,"description",void 0),(0,i._)([(0,h.Cb)()],O.prototype,"featureCollections",void 0),(0,i._)([(0,u.r)("service","featureCollections",["featureCollection.layers"])],O.prototype,"readFeatureCollections",null),(0,i._)([(0,h.Cb)({type:d.Z,json:{name:"lookAtExtent"}})],O.prototype,"fullExtent",void 0),(0,i._)([(0,h.Cb)(b.id)],O.prototype,"id",void 0),(0,i._)([(0,h.Cb)(b.rn)],O.prototype,"legendEnabled",void 0),(0,i._)([(0,h.Cb)({types:S,json:{write:!0}})],O.prototype,"lineSymbol",void 0),(0,i._)([(0,h.Cb)({type:["show","hide"]})],O.prototype,"listMode",void 0),(0,i._)([(0,h.Cb)({types:A,json:{write:!0}})],O.prototype,"pointSymbol",void 0),(0,i._)([(0,h.Cb)({types:T,json:{write:!0}})],O.prototype,"polygonSymbol",void 0),(0,i._)([(0,h.Cb)({type:["GeoRSS"]})],O.prototype,"operationalLayerType",void 0),(0,i._)([(0,h.Cb)(b.HQ)],O.prototype,"url",void 0),(0,i._)([(0,h.Cb)({json:{origins:{service:{read:{source:"name",reader:e=>e||void 0}}}}})],O.prototype,"title",null),(0,i._)([(0,h.Cb)({readOnly:!0,json:{read:!1},value:"geo-rss"})],O.prototype,"type",void 0),O=(0,i._)([(0,c.j)("esri.layers.GeoRSSLayer")],O);const P=O},16859:(e,t,s)=>{s.d(t,{I:()=>E});var i=s(43697),r=s(68773),n=s(40330),l=s(3172),a=s(66643),o=s(20102),h=s(92604),u=s(70586),c=s(95330),d=s(81271),f=s(5600),g=(s(75215),s(67676),s(80442),s(71715)),p=s(52011),m=s(30556),_=s(84230),y=s(48522),v=s(15235),b=s(86082),w=s(14661);const E=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,u.SC)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,s){if(t.itemId)return new v.default({id:t.itemId,portal:s&&s.portal})}writePortalItem(e,t){e&&e.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem&&this.portalItem.id)try{const{load:i}=await s.e(8062).then(s.bind(s,18062));return(0,c.k_)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,c.D_)(e)||h.Z.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,c.r9)(e),!0))))}async _setUserPrivileges(e,t){if(!r.default.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:s,fullEdit:i},content:{updateItem:r}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",s),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",r)}catch(e){(0,c.r9)(e)}}async _fetchUserPrivileges(e,t){let s=this.portalItem;if(!e||!s||!s.loaded||s.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=e===s.id;if(i&&s.portal.user)return(0,w.Ss)(s);let r,l;if(i)r=s.portal.url;else try{r=await(0,_.oP)(this.url,t)}catch(e){(0,c.r9)(e)}if(!r||!(0,d.Zo)(r,s.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;l=await(n.id?.getCredential(`${r}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,c.r9)(e)}if(!l)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(i?await s.reload():(s=new v.default({id:e,portal:{url:r}}),await s.load(t)),s.portal.user)return(0,w.Ss)(s)}catch(e){(0,c.r9)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,c.r9)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?n.id?.findCredential(this.url):null;if(!t)return!0;const s=C.credential===t?C.user:await this._fetchEditingUser(e);return C.credential=t,C.user=s,null==s||null==s.privileges||s.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const s=n.id.findServerInfo(this.url??"");if(!s?.owningSystemUrl)return null;const i=`${s.owningSystemUrl}/sharing/rest`,r=y.Z.getDefault();if(r&&r.loaded&&(0,d.Fv)(r.restUrl)===(0,d.Fv)(i))return r.user;const o=`${i}/community/self`,h=null!=e?e.signal:null,u=await(0,a.q6)((0,l.default)(o,{authMode:"no-prompt",query:{f:"json"},signal:h}));return u.ok?b.default.fromJSON(u.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const s=t&&t.portal,i=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||y.Z.getDefault());return s&&i&&!(0,d.tm)(i.restUrl,s.restUrl)?(t.messages&&t.messages.push(new o.Z("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i._)([(0,f.Cb)({type:v.default})],t.prototype,"portalItem",null),(0,i._)([(0,g.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,i._)([(0,m.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,i._)([(0,f.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,i._)([(0,f.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,i._)([(0,f.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,i._)([(0,f.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,i._)([(0,p.j)("esri.layers.mixins.PortalLayer")],t),t},C={credential:null,user:null}},34760:(e,t,s)=>{s.d(t,{Q:()=>_});var i=s(43697),r=s(92604),n=s(95330),l=s(5600),a=(s(75215),s(67676),s(80442),s(52011)),o=s(46791),h=(s(20102),s(26258),s(87538));const u=new o.Z,c=new WeakMap;function d(e){return null!=e&&"object"==typeof e&&"refreshInterval"in e&&"refresh"in e}function f(e,t){return Number.isFinite(e)&&Number.isFinite(t)?t<=0?e:f(t,e%t):0}let g=0,p=0;function m(){const e=Date.now();for(const t of u)t.refreshInterval&&e-(c.get(t)??0)+5>=6e4*t.refreshInterval&&(c.set(t,e),t.refresh(e))}(0,h.EH)((()=>{const e=Date.now();let t=0;for(const s of u)t=f(Math.round(6e4*s.refreshInterval),t),s.refreshInterval?c.get(s)||c.set(s,e):c.delete(s);if(t!==p){if(p=t,clearInterval(g),0===p)return void(g=0);g=setInterval(m,p)}}));const _=e=>{let t=class extends e{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=(0,n.Ds)((()=>this.hasDataChanged())),this.when().then((()=>{this.destroyed||function(e){d(e)&&u.push(e)}(this)}),(()=>{}))}destroy(){d(this)&&u.includes(this)&&u.remove(this)}get refreshParameters(){return{_ts:this.refreshTimestamp||null}}refresh(e=Date.now()){(0,n.R8)(this._debounceHasDataChanged()).then((t=>{t&&this._set("refreshTimestamp",e),this.emit("refresh",{dataChanged:t})}),(e=>{r.Z.getLogger(this).error(e),this.emit("refresh",{dataChanged:!1,error:e})}))}async hasDataChanged(){return!0}};return(0,i._)([(0,l.Cb)({type:Number,cast:e=>e>=.1?e:e<=0?0:.1,json:{write:!0}})],t.prototype,"refreshInterval",void 0),(0,i._)([(0,l.Cb)({readOnly:!0})],t.prototype,"refreshTimestamp",void 0),(0,i._)([(0,l.Cb)()],t.prototype,"refreshParameters",null),t=(0,i._)([(0,a.j)("esri.layers.mixins.RefreshableLayer")],t),t}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8024,5732],{92835:(e,t,s)=>{s.d(t,{Z:()=>g});var i,r=s(43697),n=s(96674),l=s(35463),a=s(5600),o=(s(75215),s(67676),s(80442),s(71715)),h=s(52011),u=s(30556);let c=i=class extends n.wq{static get allTime(){return d}static get empty(){return f}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?e.getTime():null}get isAllTime(){return this.equals(i.allTime)}get isEmpty(){return this.equals(i.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?e.getTime():null}clone(){return new i({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=null!=this.start?this.start.getTime():this.start,s=null!=this.end?this.end.getTime():this.end,i=null!=e.start?e.start.getTime():e.start,r=null!=e.end?e.end.getTime():e.end;return t===i&&s===r}expandTo(e){if(this.isEmpty||this.isAllTime)return this.clone();let t=this.start;t&&(t=(0,l.JE)(t,e));let s=this.end;if(s){const t=(0,l.JE)(s,e);s=s.getTime()===t.getTime()?t:(0,l.Nm)(t,1,e)}return new i({start:t,end:s})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return i.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,s=this.end?.getTime()??1/0,r=e.start?.getTime()??-1/0,n=e.end?.getTime()??1/0;let l,a;if(r>=t&&r<=s?l=r:t>=r&&t<=n&&(l=t),s>=r&&s<=n?a=s:n>=t&&n<=s&&(a=n),null!=l&&null!=a&&!isNaN(l)&&!isNaN(a)){const e=new i;return e.start=l===-1/0?null:new Date(l),e.end=a===1/0?null:new Date(a),e}return i.empty}offset(e,t){if(this.isEmpty||this.isAllTime)return this.clone();const s=new i,{start:r,end:n}=this;return null!=r&&(s.start=(0,l.Nm)(r,e,t)),null!=n&&(s.end=(0,l.Nm)(n,e,t)),s}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return d.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,s=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new i({start:t,end:s})}};(0,r._)([(0,a.Cb)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"end",void 0),(0,r._)([(0,o.r)("end")],c.prototype,"readEnd",null),(0,r._)([(0,u.c)("end")],c.prototype,"writeEnd",null),(0,r._)([(0,a.Cb)({readOnly:!0,json:{read:!1}})],c.prototype,"isAllTime",null),(0,r._)([(0,a.Cb)({readOnly:!0,json:{read:!1}})],c.prototype,"isEmpty",null),(0,r._)([(0,a.Cb)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"start",void 0),(0,r._)([(0,o.r)("start")],c.prototype,"readStart",null),(0,r._)([(0,u.c)("start")],c.prototype,"writeStart",null),c=i=(0,r._)([(0,h.j)("esri.TimeExtent")],c);const d=new c,f=new c({start:void 0,end:void 0}),g=c},5732:(e,t,s)=>{s.d(t,{c:()=>i,g:()=>r});var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},46791:(e,t,s)=>{s.d(t,{Z:()=>T});var i,r=s(43697),n=s(3894),l=s(32448),a=s(50758),o=s(22974),h=s(71143);!function(e){e[e.ADD=1]="ADD",e[e.REMOVE=2]="REMOVE",e[e.MOVE=4]="MOVE"}(i||(i={}));var u,c=s(1654),d=s(75215),f=s(58971),g=s(5600),p=s(52421),m=s(52011),_=s(10661);const y=new h.Z(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 v(e){return e?e instanceof A?e.toArray():e.length?Array.prototype.slice.apply(e):[]:[]}function b(e){if(e&&e.length)return e[0]}function w(e,t,s,i){const r=Math.min(e.length-s,t.length-i);let n=0;for(;n<r&&e[s+n]===t[i+n];)n++;return n}function E(e,t,s,i){t&&t.forEach(((t,r,n)=>{e.push(t),E(e,s.call(i,t,r,n),s,i)}))}const C=new Set,D=new Set,I=new Set,M=new Map;let S=0,A=u=class extends l.Z.EventedAccessor{static isCollection(e){return null!=e&&e instanceof u}constructor(e){super(e),this._chgListeners=[],this._notifications=null,this._timer=null,this._observable=new _.s,this.length=0,this._items=[],Object.defineProperty(this,"uid",{value:S++})}normalizeCtorArgs(e){return e?Array.isArray(e)||e instanceof u?{items:e}:e:{}}destroy(){this._removeAllRaw()}*[Symbol.iterator](){yield*this.items}get items(){return(0,f.it)(this._observable),this._items}set items(e){this._emitBeforeChanges(i.ADD)||(this._splice(0,this.length,v(e)),this._emitAfterChanges(i.ADD))}hasEventListener(e){return"change"===e?this._chgListeners.length>0:this._emitter.hasEventListener(e)}on(e,t){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,a.kB)((()=>{s.removed=!0,e.splice(e.indexOf(s),1)}))}return this._emitter.on(e,t)}once(e,t){return this.on(e,t)}add(e,t){if((0,f.it)(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,f.it)(this._observable),!e||!e.length)return this;if(this._emitBeforeChanges(i.ADD))return this;const s=this.getNextIndex(t);return this._splice(s,0,v(e)),this._emitAfterChanges(i.ADD),this}at(e){if((0,f.it)(this._observable),(e=Math.trunc(e)||0)<0&&(e+=this.length),!(e<0||e>=this.length))return this._items[e]}removeAll(){if((0,f.it)(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,f.it)(this._observable),this._createNewInstance({items:this._items.map(o.d9)})}concat(...e){(0,f.it)(this._observable);const t=e.map(v);return this._createNewInstance({items:this._items.concat(...t)})}drain(e,t){if((0,f.it)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return;const s=this._splice(0,this.length),r=s.length;for(let i=0;i<r;i++)e.call(t,s[i],i,s);this._emitAfterChanges(i.REMOVE)}every(e,t){return(0,f.it)(this._observable),this._items.every(e,t)}filter(e,t){let s;return(0,f.it)(this._observable),s=2===arguments.length?this._items.filter(e,t):this._items.filter(e),this._createNewInstance({items:s})}find(e,t){return(0,f.it)(this._observable),this._items.find(e,t)}findIndex(e,t){return(0,f.it)(this._observable),this._items.findIndex(e,t)}flatten(e,t){(0,f.it)(this._observable);const s=[];return E(s,this,e,t),new u(s)}forEach(e,t){return(0,f.it)(this._observable),this._items.forEach(e,t)}getItemAt(e){return(0,f.it)(this._observable),this._items[e]}getNextIndex(e){(0,f.it)(this._observable);const t=this.length;return(e=e??t)<0?e=0:e>t&&(e=t),e}includes(e,t=0){return(0,f.it)(this._observable),this._items.includes(e,t)}indexOf(e,t=0){return(0,f.it)(this._observable),this._items.indexOf(e,t)}join(e=","){return(0,f.it)(this._observable),this._items.join(e)}lastIndexOf(e,t=this.length-1){return(0,f.it)(this._observable),this._items.lastIndexOf(e,t)}map(e,t){(0,f.it)(this._observable);const s=this._items.map(e,t);return new u({items:s})}reorder(e,t=this.length-1){(0,f.it)(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,f.it)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return;const e=b(this._splice(this.length-1,1));return this._emitAfterChanges(i.REMOVE),e}push(...e){return(0,f.it)(this._observable),this._emitBeforeChanges(i.ADD)||(this._splice(this.length,0,e),this._emitAfterChanges(i.ADD)),this.length}reduce(e,t){(0,f.it)(this._observable);const s=this._items;return 2===arguments.length?s.reduce(e,t):s.reduce(e)}reduceRight(e,t){(0,f.it)(this._observable);const s=this._items;return 2===arguments.length?s.reduceRight(e,t):s.reduceRight(e)}remove(e){return(0,f.it)(this._observable),this.removeAt(this.indexOf(e))}removeAt(e){if((0,f.it)(this._observable),e<0||e>=this.length||this._emitBeforeChanges(i.REMOVE))return;const t=b(this._splice(e,1));return this._emitAfterChanges(i.REMOVE),t}removeMany(e){if((0,f.it)(this._observable),!e||!e.length||this._emitBeforeChanges(i.REMOVE))return[];const t=e instanceof u?e.toArray():e,s=this._items,r=[],n=t.length;for(let e=0;e<n;e++){const i=t[e],n=s.indexOf(i);if(n>-1){const i=1+w(t,s,e+1,n+1),l=this._splice(n,i);l&&l.length>0&&r.push.apply(r,l),e+=i-1}}return this._emitAfterChanges(i.REMOVE),r}reverse(){if((0,f.it)(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,f.it)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return;const e=b(this._splice(0,1));return this._emitAfterChanges(i.REMOVE),e}slice(e=0,t=this.length){return(0,f.it)(this._observable),this._createNewInstance({items:this._items.slice(e,t)})}some(e,t){return(0,f.it)(this._observable),this._items.some(e,t)}sort(e){if((0,f.it)(this._observable),!this.length||this._emitBeforeChanges(i.MOVE))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}splice(e,t,...s){(0,f.it)(this._observable);const r=(t?i.REMOVE:0)|(s.length?i.ADD:0);if(this._emitBeforeChanges(r))return[];const n=this._splice(e,t,s)||[];return this._emitAfterChanges(r),n}toArray(){return(0,f.it)(this._observable),this._items.slice()}toJSON(){return(0,f.it)(this._observable),this.toArray()}toLocaleString(){return(0,f.it)(this._observable),this._items.toLocaleString()}toString(){return(0,f.it)(this._observable),this._items.toString()}unshift(...e){return(0,f.it)(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,r=this.itemType;let n,l;if(!this._notifications&&this.hasEventListener("change")&&(this._notifications=[{listeners:this._chgListeners.slice(),items:this._items.slice(),changes:[]}],this._timer&&this._timer.remove(),this._timer=(0,c.Os)((()=>this._dispatchChange()))),t){if(l=i.splice(e,t),this.hasEventListener("before-remove")){const t=y.acquire();t.target=this,t.cancellable=!0;for(let s=0,r=l.length;s<r;s++)n=l[s],t.reset(n),this.emit("before-remove",t),t.defaultPrevented&&(l.splice(s,1),i.splice(e,0,n),e+=1,s-=1,r-=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=l.length;for(let s=0;s<t;s++)e.reset(l[s]),this.emit("after-remove",e);y.release(e)}}if(s&&s.length){if(r){const e=[];for(const t of s){const s=r.ensureType(t);null==s&&null!=t||e.push(s)}s=e}const t=this.hasEventListener("before-add"),n=this.hasEventListener("after-add"),l=e===this.length;if(t||n){const r=y.acquire();r.target=this,r.cancellable=!0;const a=y.acquire();a.target=this,a.cancellable=!1;for(const o of s)t?(r.reset(o),this.emit("before-add",r),r.defaultPrevented||(l?i.push(o):i.splice(e++,0,o),this._set("length",i.length),n&&(a.reset(o),this.emit("after-add",a)))):(l?i.push(o):i.splice(e++,0,o),this._set("length",i.length),a.reset(o),this.emit("after-add",a));y.release(a),y.release(r)}else{if(l)for(const e of s)i.push(e);else i.splice(e,0,...s);this._set("length",i.length)}}return(s&&s.length||l&&l.length)&&this._notifyChangeEvent(s,l),l}_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})}_dispatchChange(){if(this._timer&&(this._timer.remove(),this._timer=null),!this._notifications)return;const e=this._notifications;this._notifications=null;for(const t of e){const e=t.changes;C.clear(),D.clear(),I.clear();for(const{added:t,removed:s}of e){if(t)if(0===I.size&&0===D.size)for(const e of t)C.add(e);else for(const e of t)D.has(e)?(I.add(e),D.delete(e)):I.has(e)||C.add(e);if(s)if(0===I.size&&0===C.size)for(const e of s)D.add(e);else for(const e of s)C.has(e)?C.delete(e):(I.delete(e),D.add(e))}const s=n.Z.acquire();C.forEach((e=>{s.push(e)}));const i=n.Z.acquire();D.forEach((e=>{i.push(e)}));const r=this._items,l=t.items,a=n.Z.acquire();if(I.forEach((e=>{l.indexOf(e)!==r.indexOf(e)&&a.push(e)})),t.listeners&&(s.length||i.length||a.length)){const e={target:this,added:s,removed:i,moved:a},r=t.listeners.length;for(let s=0;s<r;s++){const i=t.listeners[s];i.removed||i.callback.call(this,e)}}n.Z.release(s),n.Z.release(i),n.Z.release(a)}C.clear(),D.clear(),I.clear()}};A.ofType=e=>{if(!e)return u;if(M.has(e))return M.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 u{};return(0,r._)([(0,p.c)({Type:e,ensureType:"function"==typeof e?(0,d.se)(e):(0,d.N7)(e)})],s.prototype,"itemType",void 0),s=(0,r._)([(0,m.j)(`esri.core.Collection<${t}>`)],s),M.set(e,s),s},(0,r._)([(0,g.Cb)()],A.prototype,"length",void 0),(0,r._)([(0,g.Cb)()],A.prototype,"items",null),A=u=(0,r._)([(0,m.j)("esri.core.Collection")],A);const T=A},52421:(e,t,s)=>{function i(e){return(t,s)=>{t[s]=e}}s.d(t,{c:()=>i})},35463:(e,t,s)=>{s.d(t,{JE:()=>l,Nm:()=>n,rJ:()=>a}),s(80442);const i={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8},r={milliseconds:{getter:"getMilliseconds",setter:"setMilliseconds",multiplier:1},seconds:{getter:"getSeconds",setter:"setSeconds",multiplier:1},minutes:{getter:"getMinutes",setter:"setMinutes",multiplier:1},hours:{getter:"getHours",setter:"setHours",multiplier:1},days:{getter:"getDate",setter:"setDate",multiplier:1},weeks:{getter:"getDate",setter:"setDate",multiplier:7},months:{getter:"getMonth",setter:"setMonth",multiplier:1},years:{getter:"getFullYear",setter:"setFullYear",multiplier:1},decades:{getter:"getFullYear",setter:"setFullYear",multiplier:10},centuries:{getter:"getFullYear",setter:"setFullYear",multiplier:100}};function n(e,t,s){const i=new Date(e.getTime());if(t&&s){const e=r[s],{getter:n,setter:l,multiplier:a}=e;if("months"===s){const e=function(e,t){const s=new Date(e,t+1,1);return s.setDate(0),s.getDate()}(i.getFullYear(),i.getMonth()+t);i.getDate()>e&&i.setDate(e)}i[l](i[n]()+t*a)}return i}function l(e,t){switch(t){case"milliseconds":return new Date(e.getTime());case"seconds":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds());case"minutes":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes());case"hours":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours());case"days":return new Date(e.getFullYear(),e.getMonth(),e.getDate());case"weeks":return new Date(e.getFullYear(),e.getMonth(),e.getDate()-e.getDay());case"months":return new Date(e.getFullYear(),e.getMonth(),1);case"years":return new Date(e.getFullYear(),0,1);case"decades":return new Date(e.getFullYear()-e.getFullYear()%10,0,1);case"centuries":return new Date(e.getFullYear()-e.getFullYear()%100,0,1);default:return new Date}}function a(e,t,s){return 0===e?0:e*i[t]/i[s]}},3723:(e,t,s)=>{s.r(t),s.d(t,{default:()=>P});var i=s(43697),r=s(68773),n=s(3172),l=(s(9790),s(16453)),a=s(95330),o=s(81271),h=s(5600),u=(s(75215),s(67676),s(80442),s(71715)),c=s(52011),d=s(6570),f=s(8744),g=s(87085),p=s(71612),m=s(38009),_=s(16859),y=s(34760),v=s(72965),b=s(21506),w=s(89164),E=s(4095),C=s(37898),D=s(77987),I=s(20256);const M=["atom","xml"],S={base:w.Z,key:"type",typeMap:{"simple-line":E.Z},errorContext:"symbol"},A={base:w.Z,key:"type",typeMap:{"picture-marker":C.Z,"simple-marker":D.Z},errorContext:"symbol"},T={base:w.Z,key:"type",typeMap:{"simple-fill":I.Z},errorContext:"symbol"};let O=class extends((0,p.h)((0,y.Q)((0,m.q)((0,_.I)((0,v.M)((0,l.R)(g.Z))))))){constructor(...e){super(...e),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(e,t){return"string"==typeof e?{url:e,...t}:e}readFeatureCollections(e,t){return t.featureCollection.layers.forEach((e=>{const t=e.layerDefinition.drawingInfo.renderer.symbol;t&&"esriSFS"===t.type&&t.outline?.style.includes("esriSFS")&&(t.outline.style="esriSLSSolid")})),t.featureCollection.layers}get hasPoints(){return this._hasGeometry("esriGeometryPoint")}get hasPolylines(){return this._hasGeometry("esriGeometryPolyline")}get hasPolygons(){return this._hasGeometry("esriGeometryPolygon")}get title(){const e=this._get("title");return e&&"defaults"!==this.originOf("title")?e:this.url?(0,o.vt)(this.url,M)||"GeoRSS":e||""}set title(e){this._set("title",e)}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Map Service","Feature Service","Feature Collection","Scene Service"]},e).catch(a.r9).then((()=>this._fetchService(t))).then((e=>{this.read(e,{origin:"service"})}))),Promise.resolve(this)}async hasDataChanged(){const e=await this._fetchService();return this.read(e,{origin:"service",ignoreDefaults:!0}),!0}async _fetchService(e){const t=this.spatialReference,{data:s}=await(0,n.default)(r.default.geoRSSServiceUrl,{query:{url:this.url,refresh:!!this.loaded||void 0,outSR:(0,f.oR)(t)?void 0:t.wkid??JSON.stringify(t)},signal:e});return s}_hasGeometry(e){return this.featureCollections?.some((t=>t.featureSet?.geometryType===e&&t.featureSet.features?.length>0))??!1}};(0,i._)([(0,h.Cb)()],O.prototype,"description",void 0),(0,i._)([(0,h.Cb)()],O.prototype,"featureCollections",void 0),(0,i._)([(0,u.r)("service","featureCollections",["featureCollection.layers"])],O.prototype,"readFeatureCollections",null),(0,i._)([(0,h.Cb)({type:d.Z,json:{name:"lookAtExtent"}})],O.prototype,"fullExtent",void 0),(0,i._)([(0,h.Cb)(b.id)],O.prototype,"id",void 0),(0,i._)([(0,h.Cb)(b.rn)],O.prototype,"legendEnabled",void 0),(0,i._)([(0,h.Cb)({types:S,json:{write:!0}})],O.prototype,"lineSymbol",void 0),(0,i._)([(0,h.Cb)({type:["show","hide"]})],O.prototype,"listMode",void 0),(0,i._)([(0,h.Cb)({types:A,json:{write:!0}})],O.prototype,"pointSymbol",void 0),(0,i._)([(0,h.Cb)({types:T,json:{write:!0}})],O.prototype,"polygonSymbol",void 0),(0,i._)([(0,h.Cb)({type:["GeoRSS"]})],O.prototype,"operationalLayerType",void 0),(0,i._)([(0,h.Cb)(b.HQ)],O.prototype,"url",void 0),(0,i._)([(0,h.Cb)({json:{origins:{service:{read:{source:"name",reader:e=>e||void 0}}}}})],O.prototype,"title",null),(0,i._)([(0,h.Cb)({readOnly:!0,json:{read:!1},value:"geo-rss"})],O.prototype,"type",void 0),O=(0,i._)([(0,c.j)("esri.layers.GeoRSSLayer")],O);const P=O},16859:(e,t,s)=>{s.d(t,{I:()=>w});var i=s(43697),r=s(68773),n=s(40330),l=s(3172),a=s(66643),o=s(20102),h=s(92604),u=s(95330),c=s(81271),d=s(5600),f=(s(75215),s(67676),s(80442),s(71715)),g=s(52011),p=s(30556),m=s(84230),_=s(48522),y=s(15235),v=s(86082),b=s(14661);const w=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=null,this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,s){if(t.itemId)return new y.default({id:t.itemId,portal:s&&s.portal})}writePortalItem(e,t){e&&e.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem&&this.portalItem.id)try{const{load:i}=await s.e(8062).then(s.bind(s,18062));return(0,u.k_)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,u.D_)(e)||h.Z.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,u.r9)(e),!0))))}async _setUserPrivileges(e,t){if(!r.default.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:s,fullEdit:i},content:{updateItem:r}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",s),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",r)}catch(e){(0,u.r9)(e)}}async _fetchUserPrivileges(e,t){let s=this.portalItem;if(!e||!s||!s.loaded||s.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=e===s.id;if(i&&s.portal.user)return(0,b.Ss)(s);let r,l;if(i)r=s.portal.url;else try{r=await(0,m.oP)(this.url,t)}catch(e){(0,u.r9)(e)}if(!r||!(0,c.Zo)(r,s.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;l=await(n.id?.getCredential(`${r}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,u.r9)(e)}if(!l)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(i?await s.reload():(s=new y.default({id:e,portal:{url:r}}),await s.load(t)),s.portal.user)return(0,b.Ss)(s)}catch(e){(0,u.r9)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,u.r9)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?n.id?.findCredential(this.url):null;if(!t)return!0;const s=E.credential===t?E.user:await this._fetchEditingUser(e);return E.credential=t,E.user=s,null==s||null==s.privileges||s.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const s=n.id.findServerInfo(this.url??"");if(!s?.owningSystemUrl)return null;const i=`${s.owningSystemUrl}/sharing/rest`,r=_.Z.getDefault();if(r&&r.loaded&&(0,c.Fv)(r.restUrl)===(0,c.Fv)(i))return r.user;const o=`${i}/community/self`,h=null!=e?e.signal:null,u=await(0,a.q6)((0,l.default)(o,{authMode:"no-prompt",query:{f:"json"},signal:h}));return u.ok?v.default.fromJSON(u.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const s=t&&t.portal,i=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||_.Z.getDefault());return s&&i&&!(0,c.tm)(i.restUrl,s.restUrl)?(t.messages&&t.messages.push(new o.Z("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i._)([(0,d.Cb)({type:y.default})],t.prototype,"portalItem",null),(0,i._)([(0,f.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,i._)([(0,p.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,i._)([(0,d.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,i._)([(0,d.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,i._)([(0,d.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,i._)([(0,d.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,i._)([(0,g.j)("esri.layers.mixins.PortalLayer")],t),t},E={credential:null,user:null}},34760:(e,t,s)=>{s.d(t,{Q:()=>_});var i=s(43697),r=s(92604),n=s(95330),l=s(5600),a=(s(75215),s(67676),s(80442),s(52011)),o=s(46791),h=(s(20102),s(26258),s(87538));const u=new o.Z,c=new WeakMap;function d(e){return null!=e&&"object"==typeof e&&"refreshInterval"in e&&"refresh"in e}function f(e,t){return Number.isFinite(e)&&Number.isFinite(t)?t<=0?e:f(t,e%t):0}let g=0,p=0;function m(){const e=Date.now();for(const t of u)t.refreshInterval&&e-(c.get(t)??0)+5>=6e4*t.refreshInterval&&(c.set(t,e),t.refresh(e))}(0,h.EH)((()=>{const e=Date.now();let t=0;for(const s of u)t=f(Math.round(6e4*s.refreshInterval),t),s.refreshInterval?c.get(s)||c.set(s,e):c.delete(s);if(t!==p){if(p=t,clearInterval(g),0===p)return void(g=0);g=setInterval(m,p)}}));const _=e=>{let t=class extends e{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=(0,n.Ds)((()=>this.hasDataChanged())),this.when().then((()=>{this.destroyed||function(e){d(e)&&u.push(e)}(this)}),(()=>{}))}destroy(){d(this)&&u.includes(this)&&u.remove(this)}get refreshParameters(){return{_ts:this.refreshTimestamp||null}}refresh(e=Date.now()){(0,n.R8)(this._debounceHasDataChanged()).then((t=>{t&&this._set("refreshTimestamp",e),this.emit("refresh",{dataChanged:t})}),(e=>{r.Z.getLogger(this).error(e),this.emit("refresh",{dataChanged:!1,error:e})}))}async hasDataChanged(){return!0}};return(0,i._)([(0,l.Cb)({type:Number,cast:e=>e>=.1?e:e<=0?0:.1,json:{write:!0}})],t.prototype,"refreshInterval",void 0),(0,i._)([(0,l.Cb)({readOnly:!0})],t.prototype,"refreshTimestamp",void 0),(0,i._)([(0,l.Cb)()],t.prototype,"refreshParameters",null),t=(0,i._)([(0,a.j)("esri.layers.mixins.RefreshableLayer")],t),t}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[265,3172,5732,1900,4727,9880],{22303:(e,t,r)=>{r.d(t,{Z:()=>d});var n,o,a=r(35270),s=r(22021),i=r(75215);function l(e){return(0,s.uZ)((0,i.vU)(e),0,255)}function u(e,t,r){return e=Number(e),isNaN(e)?r:e<t?t:e>r?r:e}class c{static blendColors(e,t,r,n=new c){return n.r=Math.round(e.r+(t.r-e.r)*r),n.g=Math.round(e.g+(t.g-e.g)*r),n.b=Math.round(e.b+(t.b-e.b)*r),n.a=e.a+(t.a-e.a)*r,n._sanitize()}static fromRgb(e,t){const r=e.toLowerCase().match(/^(rgba?|hsla?)\(([\s\.\-,%0-9]+)\)/);if(r){const e=r[2].split(/\s*,\s*/),n=r[1];if("rgb"===n&&3===e.length||"rgba"===n&&4===e.length){const r=e[0];if("%"===r.charAt(r.length-1)){const r=e.map((e=>2.56*parseFloat(e)));return 4===e.length&&(r[3]=parseFloat(e[3])),c.fromArray(r,t)}return c.fromArray(e.map((e=>parseFloat(e))),t)}if("hsl"===n&&3===e.length||"hsla"===n&&4===e.length)return c.fromArray((0,a.B7)(parseFloat(e[0]),parseFloat(e[1])/100,parseFloat(e[2])/100,parseFloat(e[3])),t)}return null}static fromHex(e,t=new c){if(4!==e.length&&7!==e.length||"#"!==e[0])return null;const r=4===e.length?4:8,n=(1<<r)-1;let o=Number("0x"+e.substr(1));return isNaN(o)?null:(["b","g","r"].forEach((e=>{const a=o&n;o>>=r,t[e]=4===r?17*a:a})),t.a=1,t)}static fromArray(e,t=new c){return t._set(Number(e[0]),Number(e[1]),Number(e[2]),Number(e[3])),isNaN(t.a)&&(t.a=1),t._sanitize()}static fromString(e,t){const r=(0,a.St)(e)?(0,a.h$)(e):null;return r&&c.fromArray(r,t)||c.fromRgb(e,t)||c.fromHex(e,t)}static fromJSON(e){return e&&new c([e[0],e[1],e[2],e[3]/255])}static toUnitRGB(e){return null!=e?[e.r/255,e.g/255,e.b/255]:null}static toUnitRGBA(e){return null!=e?[e.r/255,e.g/255,e.b/255,null!=e.a?e.a:1]:null}constructor(e){this.r=255,this.g=255,this.b=255,this.a=1,e&&this.setColor(e)}get isBright(){return.299*this.r+.587*this.g+.114*this.b>=127}setColor(e){return"string"==typeof e?c.fromString(e,this):Array.isArray(e)?c.fromArray(e,this):(this._set(e.r??0,e.g??0,e.b??0,e.a??1),e instanceof c||this._sanitize()),this}toRgb(){return[this.r,this.g,this.b]}toRgba(){return[this.r,this.g,this.b,this.a]}toHex(){const e=this.r.toString(16),t=this.g.toString(16),r=this.b.toString(16);return`#${e.length<2?"0"+e:e}${t.length<2?"0"+t:t}${r.length<2?"0"+r:r}`}toCss(e=!1){const t=this.r+", "+this.g+", "+this.b;return e?`rgba(${t}, ${this.a})`:`rgb(${t})`}toString(){return this.toCss(!0)}toJSON(){return this.toArray()}toArray(e=c.AlphaMode.ALWAYS){const t=l(this.r),r=l(this.g),n=l(this.b);return e===c.AlphaMode.ALWAYS||1!==this.a?[t,r,n,l(255*this.a)]:[t,r,n]}clone(){return new c(this.toRgba())}hash(){return this.r<<24|this.g<<16|this.b<<8|255*this.a}equals(e){return null!=e&&e.r===this.r&&e.g===this.g&&e.b===this.b&&e.a===this.a}_sanitize(){return this.r=Math.round(u(this.r,0,255)),this.g=Math.round(u(this.g,0,255)),this.b=Math.round(u(this.b,0,255)),this.a=u(this.a,0,1),this}_set(e,t,r,n){this.r=e,this.g=t,this.b=r,this.a=n}}c.prototype.declaredClass="esri.Color",n=c||(c={}),(o=n.AlphaMode||(n.AlphaMode={}))[o.ALWAYS=0]="ALWAYS",o[o.UNLESS_OPAQUE=1]="UNLESS_OPAQUE";const d=c},99880:(e,t,r)=>{r.d(t,{V:()=>l});var n=r(68773),o=(r(3172),r(20102)),a=r(92604),s=r(81271);const i=a.Z.getLogger("esri.assets");function l(e){if(!n.default.assetsPath)throw i.errorOnce("The API assets location needs to be set using config.assetsPath. More information: https://arcg.is/1OzLe50"),new o.Z("assets:path-not-set","config.assetsPath is not set");return(0,s.v_)(n.default.assetsPath,e)}},5732:(e,t,r)=>{r.d(t,{c:()=>n,g:()=>o});var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},52138:(e,t,r)=>{r.d(t,{A:()=>f,a:()=>l,d:()=>m,e:()=>h,f:()=>p,g:()=>b,h:()=>M,i:()=>s,j:()=>v,k:()=>d,m:()=>u,s:()=>a,t:()=>i,w:()=>c,y:()=>x,z:()=>S});var n=r(65617),o=r(46851);function a(e,t,r,n,o,a,s,i,l,u,c,d,h,p,m,f,y){return e[0]=t,e[1]=r,e[2]=n,e[3]=o,e[4]=a,e[5]=s,e[6]=i,e[7]=l,e[8]=u,e[9]=c,e[10]=d,e[11]=h,e[12]=p,e[13]=m,e[14]=f,e[15]=y,e}function s(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function i(e,t){if(e===t){const r=t[1],n=t[2],o=t[3],a=t[6],s=t[7],i=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=r,e[6]=t[9],e[7]=t[13],e[8]=n,e[9]=a,e[11]=t[14],e[12]=o,e[13]=s,e[14]=i}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e}function l(e,t){const r=t[0],n=t[1],o=t[2],a=t[3],s=t[4],i=t[5],l=t[6],u=t[7],c=t[8],d=t[9],h=t[10],p=t[11],m=t[12],f=t[13],y=t[14],g=t[15],b=r*i-n*s,w=r*l-o*s,M=r*u-a*s,v=n*l-o*i,S=n*u-a*i,x=o*u-a*l,T=c*f-d*m,O=c*y-h*m,k=c*g-p*m,C=d*y-h*f,N=d*g-p*f,q=h*g-p*y;let _=b*q-w*N+M*C+v*k-S*O+x*T;return _?(_=1/_,e[0]=(i*q-l*N+u*C)*_,e[1]=(o*N-n*q-a*C)*_,e[2]=(f*x-y*S+g*v)*_,e[3]=(h*S-d*x-p*v)*_,e[4]=(l*k-s*q-u*O)*_,e[5]=(r*q-o*k+a*O)*_,e[6]=(y*M-m*x-g*w)*_,e[7]=(c*x-h*M+p*w)*_,e[8]=(s*N-i*k+u*T)*_,e[9]=(n*k-r*N-a*T)*_,e[10]=(m*S-f*M+g*b)*_,e[11]=(d*M-c*S-p*b)*_,e[12]=(i*O-s*C-l*T)*_,e[13]=(r*C-n*O+o*T)*_,e[14]=(f*w-m*v-y*b)*_,e[15]=(c*v-d*w+h*b)*_,e):null}function u(e,t,r){const n=t[0],o=t[1],a=t[2],s=t[3],i=t[4],l=t[5],u=t[6],c=t[7],d=t[8],h=t[9],p=t[10],m=t[11],f=t[12],y=t[13],g=t[14],b=t[15];let w=r[0],M=r[1],v=r[2],S=r[3];return e[0]=w*n+M*i+v*d+S*f,e[1]=w*o+M*l+v*h+S*y,e[2]=w*a+M*u+v*p+S*g,e[3]=w*s+M*c+v*m+S*b,w=r[4],M=r[5],v=r[6],S=r[7],e[4]=w*n+M*i+v*d+S*f,e[5]=w*o+M*l+v*h+S*y,e[6]=w*a+M*u+v*p+S*g,e[7]=w*s+M*c+v*m+S*b,w=r[8],M=r[9],v=r[10],S=r[11],e[8]=w*n+M*i+v*d+S*f,e[9]=w*o+M*l+v*h+S*y,e[10]=w*a+M*u+v*p+S*g,e[11]=w*s+M*c+v*m+S*b,w=r[12],M=r[13],v=r[14],S=r[15],e[12]=w*n+M*i+v*d+S*f,e[13]=w*o+M*l+v*h+S*y,e[14]=w*a+M*u+v*p+S*g,e[15]=w*s+M*c+v*m+S*b,e}function c(e,t,r){const n=r[0],o=r[1],a=r[2];if(t===e)e[12]=t[0]*n+t[4]*o+t[8]*a+t[12],e[13]=t[1]*n+t[5]*o+t[9]*a+t[13],e[14]=t[2]*n+t[6]*o+t[10]*a+t[14],e[15]=t[3]*n+t[7]*o+t[11]*a+t[15];else{const r=t[0],s=t[1],i=t[2],l=t[3],u=t[4],c=t[5],d=t[6],h=t[7],p=t[8],m=t[9],f=t[10],y=t[11];e[0]=r,e[1]=s,e[2]=i,e[3]=l,e[4]=u,e[5]=c,e[6]=d,e[7]=h,e[8]=p,e[9]=m,e[10]=f,e[11]=y,e[12]=r*n+u*o+p*a+t[12],e[13]=s*n+c*o+m*a+t[13],e[14]=i*n+d*o+f*a+t[14],e[15]=l*n+h*o+y*a+t[15]}return e}function d(e,t,r){const n=r[0],o=r[1],a=r[2];return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*o,e[5]=t[5]*o,e[6]=t[6]*o,e[7]=t[7]*o,e[8]=t[8]*a,e[9]=t[9]*a,e[10]=t[10]*a,e[11]=t[11]*a,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function h(e,t,r,n){let a,s,i,l,u,c,d,h,p,m,f,y,g,b,w,M,v,S,x,T,O,k,C,N,q=n[0],_=n[1],P=n[2],j=Math.sqrt(q*q+_*_+P*P);return j<(0,o.g)()?null:(j=1/j,q*=j,_*=j,P*=j,a=Math.sin(r),s=Math.cos(r),i=1-s,l=t[0],u=t[1],c=t[2],d=t[3],h=t[4],p=t[5],m=t[6],f=t[7],y=t[8],g=t[9],b=t[10],w=t[11],M=q*q*i+s,v=_*q*i+P*a,S=P*q*i-_*a,x=q*_*i-P*a,T=_*_*i+s,O=P*_*i+q*a,k=q*P*i+_*a,C=_*P*i-q*a,N=P*P*i+s,e[0]=l*M+h*v+y*S,e[1]=u*M+p*v+g*S,e[2]=c*M+m*v+b*S,e[3]=d*M+f*v+w*S,e[4]=l*x+h*T+y*O,e[5]=u*x+p*T+g*O,e[6]=c*x+m*T+b*O,e[7]=d*x+f*T+w*O,e[8]=l*k+h*C+y*N,e[9]=u*k+p*C+g*N,e[10]=c*k+m*C+b*N,e[11]=d*k+f*C+w*N,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)}function p(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e}function m(e,t,r){if(0===t)return s(e);let n,a,i,l=r[0],u=r[1],c=r[2],d=Math.sqrt(l*l+u*u+c*c);return d<(0,o.g)()?null:(d=1/d,l*=d,u*=d,c*=d,n=Math.sin(t),a=Math.cos(t),i=1-a,e[0]=l*l*i+a,e[1]=u*l*i+c*n,e[2]=c*l*i-u*n,e[3]=0,e[4]=l*u*i-c*n,e[5]=u*u*i+a,e[6]=c*u*i+l*n,e[7]=0,e[8]=l*c*i+u*n,e[9]=u*c*i-l*n,e[10]=c*c*i+a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)}function f(e,t){const r=Math.sin(t),n=Math.cos(t);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=n,e[6]=r,e[7]=0,e[8]=0,e[9]=-r,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function y(e,t,r){const n=t[0],o=t[1],a=t[2],s=t[3],i=n+n,l=o+o,u=a+a,c=n*i,d=n*l,h=n*u,p=o*l,m=o*u,f=a*u,y=s*i,g=s*l,b=s*u;return e[0]=1-(p+f),e[1]=d+b,e[2]=h-g,e[3]=0,e[4]=d-b,e[5]=1-(c+f),e[6]=m+y,e[7]=0,e[8]=h+g,e[9]=m-y,e[10]=1-(c+p),e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}const g=(0,n.c)();function b(e,t,r,n){const o=t[0],a=t[1],s=t[2],i=t[3],l=o+o,u=a+a,c=s+s,d=o*l,h=o*u,p=o*c,m=a*u,f=a*c,y=s*c,g=i*l,b=i*u,w=i*c,M=n[0],v=n[1],S=n[2];return e[0]=(1-(m+y))*M,e[1]=(h+w)*M,e[2]=(p-b)*M,e[3]=0,e[4]=(h-w)*v,e[5]=(1-(d+y))*v,e[6]=(f+g)*v,e[7]=0,e[8]=(p+b)*S,e[9]=(f-g)*S,e[10]=(1-(d+m))*S,e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}function w(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e[4]=t[4]-r[4],e[5]=t[5]-r[5],e[6]=t[6]-r[6],e[7]=t[7]-r[7],e[8]=t[8]-r[8],e[9]=t[9]-r[9],e[10]=t[10]-r[10],e[11]=t[11]-r[11],e[12]=t[12]-r[12],e[13]=t[13]-r[13],e[14]=t[14]-r[14],e[15]=t[15]-r[15],e}function M(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[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]}function v(e,t){if(e===t)return!0;const r=e[0],n=e[1],a=e[2],s=e[3],i=e[4],l=e[5],u=e[6],c=e[7],d=e[8],h=e[9],p=e[10],m=e[11],f=e[12],y=e[13],g=e[14],b=e[15],w=t[0],M=t[1],v=t[2],S=t[3],x=t[4],T=t[5],O=t[6],k=t[7],C=t[8],N=t[9],q=t[10],_=t[11],P=t[12],j=t[13],A=t[14],E=t[15],L=(0,o.g)();return Math.abs(r-w)<=L*Math.max(1,Math.abs(r),Math.abs(w))&&Math.abs(n-M)<=L*Math.max(1,Math.abs(n),Math.abs(M))&&Math.abs(a-v)<=L*Math.max(1,Math.abs(a),Math.abs(v))&&Math.abs(s-S)<=L*Math.max(1,Math.abs(s),Math.abs(S))&&Math.abs(i-x)<=L*Math.max(1,Math.abs(i),Math.abs(x))&&Math.abs(l-T)<=L*Math.max(1,Math.abs(l),Math.abs(T))&&Math.abs(u-O)<=L*Math.max(1,Math.abs(u),Math.abs(O))&&Math.abs(c-k)<=L*Math.max(1,Math.abs(c),Math.abs(k))&&Math.abs(d-C)<=L*Math.max(1,Math.abs(d),Math.abs(C))&&Math.abs(h-N)<=L*Math.max(1,Math.abs(h),Math.abs(N))&&Math.abs(p-q)<=L*Math.max(1,Math.abs(p),Math.abs(q))&&Math.abs(m-_)<=L*Math.max(1,Math.abs(m),Math.abs(_))&&Math.abs(f-P)<=L*Math.max(1,Math.abs(f),Math.abs(P))&&Math.abs(y-j)<=L*Math.max(1,Math.abs(y),Math.abs(j))&&Math.abs(g-A)<=L*Math.max(1,Math.abs(g),Math.abs(A))&&Math.abs(b-E)<=L*Math.max(1,Math.abs(b),Math.abs(E))}function S(e){const t=(0,o.g)(),r=e[0],n=e[1],a=e[2],s=e[4],i=e[5],l=e[6],u=e[8],c=e[9],d=e[10];return Math.abs(1-(r*r+s*s+u*u))<=t&&Math.abs(1-(n*n+i*i+c*c))<=t&&Math.abs(1-(a*a+l*l+d*d))<=t}function x(e){return 1===e[0]&&0===e[1]&&0===e[2]&&0===e[4]&&1===e[5]&&0===e[6]&&0===e[8]&&0===e[9]&&1===e[10]}const T=u,O=w;Object.freeze(Object.defineProperty({__proto__:null,add:function(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e[4]=t[4]+r[4],e[5]=t[5]+r[5],e[6]=t[6]+r[6],e[7]=t[7]+r[7],e[8]=t[8]+r[8],e[9]=t[9]+r[9],e[10]=t[10]+r[10],e[11]=t[11]+r[11],e[12]=t[12]+r[12],e[13]=t[13]+r[13],e[14]=t[14]+r[14],e[15]=t[15]+r[15],e},adjoint:function(e,t){const r=t[0],n=t[1],o=t[2],a=t[3],s=t[4],i=t[5],l=t[6],u=t[7],c=t[8],d=t[9],h=t[10],p=t[11],m=t[12],f=t[13],y=t[14],g=t[15];return e[0]=i*(h*g-p*y)-d*(l*g-u*y)+f*(l*p-u*h),e[1]=-(n*(h*g-p*y)-d*(o*g-a*y)+f*(o*p-a*h)),e[2]=n*(l*g-u*y)-i*(o*g-a*y)+f*(o*u-a*l),e[3]=-(n*(l*p-u*h)-i*(o*p-a*h)+d*(o*u-a*l)),e[4]=-(s*(h*g-p*y)-c*(l*g-u*y)+m*(l*p-u*h)),e[5]=r*(h*g-p*y)-c*(o*g-a*y)+m*(o*p-a*h),e[6]=-(r*(l*g-u*y)-s*(o*g-a*y)+m*(o*u-a*l)),e[7]=r*(l*p-u*h)-s*(o*p-a*h)+c*(o*u-a*l),e[8]=s*(d*g-p*f)-c*(i*g-u*f)+m*(i*p-u*d),e[9]=-(r*(d*g-p*f)-c*(n*g-a*f)+m*(n*p-a*d)),e[10]=r*(i*g-u*f)-s*(n*g-a*f)+m*(n*u-a*i),e[11]=-(r*(i*p-u*d)-s*(n*p-a*d)+c*(n*u-a*i)),e[12]=-(s*(d*y-h*f)-c*(i*y-l*f)+m*(i*h-l*d)),e[13]=r*(d*y-h*f)-c*(n*y-o*f)+m*(n*h-o*d),e[14]=-(r*(i*y-l*f)-s*(n*y-o*f)+m*(n*l-o*i)),e[15]=r*(i*h-l*d)-s*(n*h-o*d)+c*(n*l-o*i),e},copy:function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[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},determinant:function(e){const t=e[0],r=e[1],n=e[2],o=e[3],a=e[4],s=e[5],i=e[6],l=e[7],u=e[8],c=e[9],d=e[10],h=e[11],p=e[12],m=e[13],f=e[14],y=e[15];return(t*s-r*a)*(d*y-h*f)-(t*i-n*a)*(c*y-h*m)+(t*l-o*a)*(c*f-d*m)+(r*i-n*s)*(u*y-h*p)-(r*l-o*s)*(u*f-d*p)+(n*l-o*i)*(u*m-c*p)},equals:v,exactEquals:M,frob:function(e){return Math.sqrt(e[0]**2+e[1]**2+e[2]**2+e[3]**2+e[4]**2+e[5]**2+e[6]**2+e[7]**2+e[8]**2+e[9]**2+e[10]**2+e[11]**2+e[12]**2+e[13]**2+e[14]**2+e[15]**2)},fromQuat:function(e,t){const r=t[0],n=t[1],o=t[2],a=t[3],s=r+r,i=n+n,l=o+o,u=r*s,c=n*s,d=n*i,h=o*s,p=o*i,m=o*l,f=a*s,y=a*i,g=a*l;return e[0]=1-d-m,e[1]=c+g,e[2]=h-y,e[3]=0,e[4]=c-g,e[5]=1-u-m,e[6]=p+f,e[7]=0,e[8]=h+y,e[9]=p-f,e[10]=1-u-d,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},fromQuat2:function(e,t){const r=g,n=-t[0],o=-t[1],a=-t[2],s=t[3],i=t[4],l=t[5],u=t[6],c=t[7],d=n*n+o*o+a*a+s*s;return d>0?(r[0]=2*(i*s+c*n+l*a-u*o)/d,r[1]=2*(l*s+c*o+u*n-i*a)/d,r[2]=2*(u*s+c*a+i*o-l*n)/d):(r[0]=2*(i*s+c*n+l*a-u*o),r[1]=2*(l*s+c*o+u*n-i*a),r[2]=2*(u*s+c*a+i*o-l*n)),y(e,t,r),e},fromRotation:m,fromRotationTranslation:y,fromRotationTranslationScale:b,fromRotationTranslationScaleOrigin:function(e,t,r,n,o){const a=t[0],s=t[1],i=t[2],l=t[3],u=a+a,c=s+s,d=i+i,h=a*u,p=a*c,m=a*d,f=s*c,y=s*d,g=i*d,b=l*u,w=l*c,M=l*d,v=n[0],S=n[1],x=n[2],T=o[0],O=o[1],k=o[2],C=(1-(f+g))*v,N=(p+M)*v,q=(m-w)*v,_=(p-M)*S,P=(1-(h+g))*S,j=(y+b)*S,A=(m+w)*x,E=(y-b)*x,L=(1-(h+f))*x;return e[0]=C,e[1]=N,e[2]=q,e[3]=0,e[4]=_,e[5]=P,e[6]=j,e[7]=0,e[8]=A,e[9]=E,e[10]=L,e[11]=0,e[12]=r[0]+T-(C*T+_*O+A*k),e[13]=r[1]+O-(N*T+P*O+E*k),e[14]=r[2]+k-(q*T+j*O+L*k),e[15]=1,e},fromScaling:function(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},fromTranslation:p,fromXRotation:f,fromYRotation:function(e,t){const r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=0,e[2]=-r,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=r,e[9]=0,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},fromZRotation:function(e,t){const r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=r,e[2]=0,e[3]=0,e[4]=-r,e[5]=n,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},frustum:function(e,t,r,n,o,a,s){const i=1/(r-t),l=1/(o-n),u=1/(a-s);return e[0]=2*a*i,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=2*a*l,e[6]=0,e[7]=0,e[8]=(r+t)*i,e[9]=(o+n)*l,e[10]=(s+a)*u,e[11]=-1,e[12]=0,e[13]=0,e[14]=s*a*2*u,e[15]=0,e},getRotation:function(e,t){const r=t[0]+t[5]+t[10];let n=0;return r>0?(n=2*Math.sqrt(r+1),e[3]=.25*n,e[0]=(t[6]-t[9])/n,e[1]=(t[8]-t[2])/n,e[2]=(t[1]-t[4])/n):t[0]>t[5]&&t[0]>t[10]?(n=2*Math.sqrt(1+t[0]-t[5]-t[10]),e[3]=(t[6]-t[9])/n,e[0]=.25*n,e[1]=(t[1]+t[4])/n,e[2]=(t[8]+t[2])/n):t[5]>t[10]?(n=2*Math.sqrt(1+t[5]-t[0]-t[10]),e[3]=(t[8]-t[2])/n,e[0]=(t[1]+t[4])/n,e[1]=.25*n,e[2]=(t[6]+t[9])/n):(n=2*Math.sqrt(1+t[10]-t[0]-t[5]),e[3]=(t[1]-t[4])/n,e[0]=(t[8]+t[2])/n,e[1]=(t[6]+t[9])/n,e[2]=.25*n),e},getScaling:function(e,t){const r=t[0],n=t[1],o=t[2],a=t[4],s=t[5],i=t[6],l=t[8],u=t[9],c=t[10];return e[0]=Math.sqrt(r*r+n*n+o*o),e[1]=Math.sqrt(a*a+s*s+i*i),e[2]=Math.sqrt(l*l+u*u+c*c),e},getTranslation:function(e,t){return e[0]=t[12],e[1]=t[13],e[2]=t[14],e},hasIdentityRotation:x,identity:s,invert:l,invertOrIdentity:function(e,t){return l(e,t)||s(e),e},isOrthoNormal:S,lookAt:function(e,t,r,n){const a=t[0],i=t[1],l=t[2];let u=a-r[0],c=i-r[1],d=l-r[2];const h=(0,o.g)();if(Math.abs(u)<h&&Math.abs(c)<h&&Math.abs(d)<h)return void s(e);let p=1/Math.sqrt(u*u+c*c+d*d);u*=p,c*=p,d*=p;const m=n[0],f=n[1],y=n[2];let g=f*d-y*c,b=y*u-m*d,w=m*c-f*u;p=Math.sqrt(g*g+b*b+w*w),p?(p=1/p,g*=p,b*=p,w*=p):(g=0,b=0,w=0);let M=c*w-d*b,v=d*g-u*w,S=u*b-c*g;p=Math.sqrt(M*M+v*v+S*S),p?(p=1/p,M*=p,v*=p,S*=p):(M=0,v=0,S=0),e[0]=g,e[1]=M,e[2]=u,e[3]=0,e[4]=b,e[5]=v,e[6]=c,e[7]=0,e[8]=w,e[9]=S,e[10]=d,e[11]=0,e[12]=-(g*a+b*i+w*l),e[13]=-(M*a+v*i+S*l),e[14]=-(u*a+c*i+d*l),e[15]=1},mul:T,multiply:u,multiplyScalar:function(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*r,e[5]=t[5]*r,e[6]=t[6]*r,e[7]=t[7]*r,e[8]=t[8]*r,e[9]=t[9]*r,e[10]=t[10]*r,e[11]=t[11]*r,e[12]=t[12]*r,e[13]=t[13]*r,e[14]=t[14]*r,e[15]=t[15]*r,e},multiplyScalarAndAdd:function(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e[3]=t[3]+r[3]*n,e[4]=t[4]+r[4]*n,e[5]=t[5]+r[5]*n,e[6]=t[6]+r[6]*n,e[7]=t[7]+r[7]*n,e[8]=t[8]+r[8]*n,e[9]=t[9]+r[9]*n,e[10]=t[10]+r[10]*n,e[11]=t[11]+r[11]*n,e[12]=t[12]+r[12]*n,e[13]=t[13]+r[13]*n,e[14]=t[14]+r[14]*n,e[15]=t[15]+r[15]*n,e},ortho:function(e,t,r,n,o,a,s){const i=1/(t-r),l=1/(n-o),u=1/(a-s);return e[0]=-2*i,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*u,e[11]=0,e[12]=(t+r)*i,e[13]=(o+n)*l,e[14]=(s+a)*u,e[15]=1,e},perspective:function(e,t,r,n,o){const a=1/Math.tan(t/2);let s;return e[0]=a/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,null!=o&&o!==1/0?(s=1/(n-o),e[10]=(o+n)*s,e[14]=2*o*n*s):(e[10]=-1,e[14]=-2*n),e},perspectiveFromFieldOfView:function(e,t,r,n){const o=Math.tan(t.upDegrees*Math.PI/180),a=Math.tan(t.downDegrees*Math.PI/180),s=Math.tan(t.leftDegrees*Math.PI/180),i=Math.tan(t.rightDegrees*Math.PI/180),l=2/(s+i),u=2/(o+a);return e[0]=l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=u,e[6]=0,e[7]=0,e[8]=-(s-i)*l*.5,e[9]=(o-a)*u*.5,e[10]=n/(r-n),e[11]=-1,e[12]=0,e[13]=0,e[14]=n*r/(r-n),e[15]=0,e},rotate:h,rotateX:function(e,t,r){const n=Math.sin(r),o=Math.cos(r),a=t[4],s=t[5],i=t[6],l=t[7],u=t[8],c=t[9],d=t[10],h=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=a*o+u*n,e[5]=s*o+c*n,e[6]=i*o+d*n,e[7]=l*o+h*n,e[8]=u*o-a*n,e[9]=c*o-s*n,e[10]=d*o-i*n,e[11]=h*o-l*n,e},rotateY:function(e,t,r){const n=Math.sin(r),o=Math.cos(r),a=t[0],s=t[1],i=t[2],l=t[3],u=t[8],c=t[9],d=t[10],h=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=a*o-u*n,e[1]=s*o-c*n,e[2]=i*o-d*n,e[3]=l*o-h*n,e[8]=a*n+u*o,e[9]=s*n+c*o,e[10]=i*n+d*o,e[11]=l*n+h*o,e},rotateZ:function(e,t,r){const n=Math.sin(r),o=Math.cos(r),a=t[0],s=t[1],i=t[2],l=t[3],u=t[4],c=t[5],d=t[6],h=t[7];return t!==e&&(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[0]=a*o+u*n,e[1]=s*o+c*n,e[2]=i*o+d*n,e[3]=l*o+h*n,e[4]=u*o-a*n,e[5]=c*o-s*n,e[6]=d*o-i*n,e[7]=h*o-l*n,e},scale:d,set:a,str:function(e){return"mat4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+", "+e[9]+", "+e[10]+", "+e[11]+", "+e[12]+", "+e[13]+", "+e[14]+", "+e[15]+")"},sub:O,subtract:w,targetTo:function(e,t,r,n){const o=t[0],a=t[1],s=t[2],i=n[0],l=n[1],u=n[2];let c=o-r[0],d=a-r[1],h=s-r[2],p=c*c+d*d+h*h;p>0&&(p=1/Math.sqrt(p),c*=p,d*=p,h*=p);let m=l*h-u*d,f=u*c-i*h,y=i*d-l*c;return p=m*m+f*f+y*y,p>0&&(p=1/Math.sqrt(p),m*=p,f*=p,y*=p),e[0]=m,e[1]=f,e[2]=y,e[3]=0,e[4]=d*y-h*f,e[5]=h*m-c*y,e[6]=c*f-d*m,e[7]=0,e[8]=c,e[9]=d,e[10]=h,e[11]=0,e[12]=o,e[13]=a,e[14]=s,e[15]=1,e},translate:c,transpose:i},Symbol.toStringTag,{value:"Module"}))},35270:(e,t,r)=>{r.d(t,{B7:()=>l,St:()=>o,VL:()=>s,h$:()=>a,rW:()=>u});const n={transparent:[0,0,0,0],black:[0,0,0,1],silver:[192,192,192,1],gray:[128,128,128,1],white:[255,255,255,1],maroon:[128,0,0,1],red:[255,0,0,1],purple:[128,0,128,1],fuchsia:[255,0,255,1],green:[0,128,0,1],lime:[0,255,0,1],olive:[128,128,0,1],yellow:[255,255,0,1],navy:[0,0,128,1],blue:[0,0,255,1],teal:[0,128,128,1],aqua:[0,255,255,1],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],blanchedalmond:[255,235,205,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],oldlace:[253,245,230,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],rebeccapurple:[102,51,153,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],whitesmoke:[245,245,245,1],yellowgreen:[154,205,50,1]};function o(e){return!!n[e]||!!n[e.toLowerCase()]}function a(e){return n[e]??n[e.toLowerCase()]}function s(e){return[...a(e)]}function i(e,t,r){r<0&&++r,r>1&&--r;const n=6*r;return n<1?e+(t-e)*n:2*r<1?t:3*r<2?e+(t-e)*(2/3-r)*6:e}function l(e,t,r,n=1){const o=(e%360+360)%360/360,a=r<=.5?r*(t+1):r+t-r*t,s=2*r-a;return[Math.round(255*i(s,a,o+1/3)),Math.round(255*i(s,a,o)),Math.round(255*i(s,a,o-1/3)),n]}function u(e){const t=e.length>5,r=t?8:4,n=(1<<r)-1,o=t?1:17,a=t?9===e.length:5===e.length;let s=Number("0x"+e.substr(1));if(isNaN(s))return null;const i=[0,0,0,1];let l;return a&&(l=s&n,s>>=r,i[3]=o*l/255),l=s&n,s>>=r,i[2]=o*l,l=s&n,s>>=r,i[1]=o*l,l=s&n,s>>=r,i[0]=o*l,i}},10661:(e,t,r)=>{r.d(t,{s:()=>o});var n=r(42100);class o extends n.s{notify(){const e=this._observers;if(e&&e.length>0){const t=e.slice();for(const e of t)e.onInvalidated(),e.onCommitted()}}}},66577:(e,t,r)=>{r.d(t,{qM:()=>c});var n=r(75215),o=r(6570),a=r(9361),s=r(65091),i=r(94139),l=r(38913),u=r(58901);r(82971),r(86973),r(33955);const c={base:a.Z,key:"type",typeMap:{extent:o.Z,multipoint:s.Z,point:i.Z,polyline:u.Z,polygon:l.Z}};(0,n.N7)(c)},60437:(e,t,r)=>{r.d(t,{Gv:()=>b,HH:()=>s,JR:()=>m,TC:()=>i,Tn:()=>d,Ue:()=>o,al:()=>a,bZ:()=>f,cS:()=>p,dp:()=>u,fS:()=>g,is:()=>y,op:()=>c,pp:()=>l,t8:()=>h});var n=r(6570);function o(e=w){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function a(e,t,r,n,a,s,i=o()){return i[0]=e,i[1]=t,i[2]=r,i[3]=n,i[4]=a,i[5]=s,i}function s(e,t){const r=isFinite(e[2])||isFinite(e[5]);return new n.Z(r?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function i(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function l(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function u(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function c(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function d(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function h(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function p(e){return e?h(e,b):o(b)}function m(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function f(e,t,r,n,o){return e[0]=t,e[1]=r,e[2]=Number.NEGATIVE_INFINITY,e[3]=n,e[4]=o,e[5]=Number.POSITIVE_INFINITY,e}function y(e){return 6===e.length}function g(e,t,r){if(null==e||null==t)return e===t;if(!y(e)||!y(t))return!1;if(r){for(let n=0;n<e.length;n++)if(!r(e[n],t[n]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}r(24470);const b=[1/0,1/0,1/0,-1/0,-1/0,-1/0],w=[0,0,0,0,0,0];o()},1231:(e,t,r)=>{r.d(t,{Z:()=>y});var n,o=r(43697),a=r(35454),s=r(96674),i=r(5600),l=r(75215),u=(r(67676),r(80442),r(36030)),c=r(71715),d=r(52011),h=r(72729),p=r(86719);const m=new a.X({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let f=n=class extends s.wq{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=-1,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?.value??null}readValueType(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?m.fromJSON(r.fieldValueType):null}clone(){return new n({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain&&this.domain.clone()||null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,o._)([(0,i.Cb)({type:String,json:{write:!0}})],f.prototype,"alias",void 0),(0,o._)([(0,i.Cb)({type:[String,Number],json:{write:{allowNull:!0}}})],f.prototype,"defaultValue",void 0),(0,o._)([(0,i.Cb)()],f.prototype,"description",void 0),(0,o._)([(0,c.r)("description")],f.prototype,"readDescription",null),(0,o._)([(0,i.Cb)({types:h.V5,json:{read:{reader:h.im},write:!0}})],f.prototype,"domain",void 0),(0,o._)([(0,i.Cb)({type:Boolean,json:{write:!0}})],f.prototype,"editable",void 0),(0,o._)([(0,i.Cb)({type:l.z8,json:{write:!0}})],f.prototype,"length",void 0),(0,o._)([(0,i.Cb)({type:String,json:{write:!0}})],f.prototype,"name",void 0),(0,o._)([(0,i.Cb)({type:Boolean,json:{write:!0}})],f.prototype,"nullable",void 0),(0,o._)([(0,u.J)(p.v)],f.prototype,"type",void 0),(0,o._)([(0,i.Cb)()],f.prototype,"valueType",void 0),(0,o._)([(0,c.r)("valueType",["description"])],f.prototype,"readValueType",null),(0,o._)([(0,i.Cb)({type:Boolean,json:{read:!1}})],f.prototype,"visible",void 0),f=n=(0,o._)([(0,d.j)("esri.layers.support.Field")],f);const y=f},61576:(e,t,r)=>{r.r(t),r.d(t,{default:()=>y}),r(66577);var n=r(18571),o=r(5847),a=r(75993),s=r(55914),i=r(40932),l=r(73506),u=r(15612),c=r(80676),d=r(87521),h=r(72758),p=r(23808),m=r(6570),f=r(94139);class y{convertVectorFieldData(e){const t=o.Z.fromJSON(e.pixelBlock),r=(0,c.KC)(t,e.type);return Promise.resolve(null!=r?r.toJSON():null)}computeStatisticsHistograms(e){const t=o.Z.fromJSON(e.pixelBlock),r=(0,u.js)(t);return Promise.resolve(r)}async decode(e){const t=await(0,a.J)(e.data,e.options);return t&&t.toJSON()}symbolize(e){e.pixelBlock=o.Z.fromJSON(e.pixelBlock),e.extent=e.extent?m.Z.fromJSON(e.extent):null;const t=this.symbolizer.symbolize(e);return Promise.resolve(null!=t?t.toJSON():null)}async updateSymbolizer(e){this.symbolizer=h.Z.fromJSON(e.symbolizerJSON),e.histograms&&"rasterStretch"===this.symbolizer?.rendererJSON.type&&(this.symbolizer.rendererJSON.histograms=e.histograms)}async updateRasterFunction(e){this.rasterFunction=(0,i.Ue)(e.rasterFunctionJSON)}async process(e){const t=this.rasterFunction.process({extent:m.Z.fromJSON(e.extent),primaryPixelBlocks:e.primaryPixelBlocks.map((e=>null!=e?o.Z.fromJSON(e):null)),primaryPixelSizes:e.primaryPixelSizes?.map((e=>null!=e?f.Z.fromJSON(e):null)),primaryRasterIds:e.primaryRasterIds});return null!=t?t.toJSON():null}stretch(e){const t=this.symbolizer.simpleStretch(o.Z.fromJSON(e.srcPixelBlock),e.stretchParams);return Promise.resolve(null!=t&&t.toJSON())}estimateStatisticsHistograms(e){const t=(0,u.Hv)(o.Z.fromJSON(e.srcPixelBlock));return Promise.resolve(t)}split(e){const t=(0,s.Vl)(o.Z.fromJSON(e.srcPixelBlock),e.tileSize,e.maximumPyramidLevel);return t&&t.forEach(((e,r)=>{t.set(r,e?.toJSON())})),Promise.resolve(t)}async mosaicAndTransform(e){const t=e.srcPixelBlocks.map((e=>e?new o.Z(e):null)),r=(0,s.us)(t,e.srcMosaicSize,{blockWidths:e.blockWidths,alignmentInfo:e.alignmentInfo,clipOffset:e.clipOffset,clipSize:e.clipSize});let n,a=r;return e.coefs&&(a=(0,s.Uk)(r,e.destDimension,e.coefs,e.sampleSpacing,e.interpolation)),e.projectDirections&&e.gcsGrid&&(n=(0,s.Qh)(e.destDimension,e.gcsGrid),a=(0,c.xQ)(a,e.isUV?"vector-uv":"vector-magdir",n)),{pixelBlock:a?.toJSON(),localNorthDirections:n}}async createFlowMesh(e,t){const r={data:new Float32Array(e.flowData.buffer),mask:new Uint8Array(e.flowData.maskBuffer),width:e.flowData.width,height:e.flowData.height},{vertexData:n,indexData:o}=await(0,p.GE)(e.meshType,e.simulationSettings,r,t.signal);return{result:{vertexBuffer:n.buffer,indexBuffer:o.buffer},transferList:[n.buffer,o.buffer]}}async getProjectionOffsetGrid(e){const t=m.Z.fromJSON(e.projectedExtent),r=m.Z.fromJSON(e.srcBufferExtent);let o=null;e.datumTransformationSteps&&(o=new n.Z({steps:e.datumTransformationSteps})),(e.includeGCSGrid||(0,l.Mk)(t.spatialReference,r.spatialReference,o))&&await(0,l.zD)();const a=e.rasterTransform?(0,d.c)(e.rasterTransform):null;return(0,l.Qp)({...e,projectedExtent:t,srcBufferExtent:r,datumTransformation:o,rasterTransform:a})}}},72729:(e,t,r)=>{r.d(t,{im:()=>T,V5:()=>x}),r(80442);var n,o=r(43697),a=r(22974),s=r(5600),i=(r(75215),r(36030)),l=r(52011),u=r(96674);r(67676);let c=n=class extends u.wq{constructor(e){super(e),this.name=null,this.code=null}clone(){return new n({name:this.name,code:this.code})}};(0,o._)([(0,s.Cb)({type:String,json:{write:!0}})],c.prototype,"name",void 0),(0,o._)([(0,s.Cb)({type:[String,Number],json:{write:!0}})],c.prototype,"code",void 0),c=n=(0,o._)([(0,l.j)("esri.layers.support.CodedValue")],c);const d=new(r(35454).X)({inherited:"inherited",codedValue:"coded-value",range:"range"});let h=class extends u.wq{constructor(e){super(e),this.name=null,this.type=null}};(0,o._)([(0,s.Cb)({type:String,json:{write:!0}})],h.prototype,"name",void 0),(0,o._)([(0,i.J)(d)],h.prototype,"type",void 0),h=(0,o._)([(0,l.j)("esri.layers.support.Domain")],h);const p=h;var m;let f=m=class extends p{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const r=String(e);this.codedValues.some((e=>(String(e.code)===r&&(t=e.name),!!t)))}return t}clone(){return new m({codedValues:(0,a.d9)(this.codedValues),name:this.name})}};(0,o._)([(0,s.Cb)({type:[c],json:{write:!0}})],f.prototype,"codedValues",void 0),(0,o._)([(0,i.J)({codedValue:"coded-value"})],f.prototype,"type",void 0),f=m=(0,o._)([(0,l.j)("esri.layers.support.CodedValueDomain")],f);const y=f;var g;r(92604),r(20102);let b=g=class extends p{constructor(e){super(e),this.type="inherited"}clone(){return new g}};(0,o._)([(0,i.J)({inherited:"inherited"})],b.prototype,"type",void 0),b=g=(0,o._)([(0,l.j)("esri.layers.support.InheritedDomain")],b);const w=b;var M;let v=M=class extends p{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new M({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,o._)([(0,s.Cb)({type:Number,json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range&&t.range[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,r){t[r]=[this.minValue||0,e]}}}})],v.prototype,"maxValue",void 0),(0,o._)([(0,s.Cb)({type:Number,json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range&&t.range[0]},write:{target:"range",writer(e,t,r){t[r]=[e,this.maxValue||0]}}}})],v.prototype,"minValue",void 0),(0,o._)([(0,i.J)({range:"range"})],v.prototype,"type",void 0),v=M=(0,o._)([(0,l.j)("esri.layers.support.RangeDomain")],v);const S=v,x={key:"type",base:p,typeMap:{range:v,"coded-value":y,inherited:w}};function T(e){if(!e||!e.type)return null;switch(e.type){case"range":return S.fromJSON(e);case"codedValue":return y.fromJSON(e);case"inherited":return w.fromJSON(e)}return null}},86719:(e,t,r)=>{r.d(t,{v:()=>n});const n=new(r(35454).X)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},3172:(e,t,r)=>{r.r(t),r.d(t,{default:()=>p});var n=r(68773),o=r(40330),a=r(20102),s=r(80442),i=r(22974),l=r(95330),u=r(81271),c=r(19745),d=r(71058),h=r(85958);async function p(e,t){e instanceof URL&&(e=e.toString()),t?.query instanceof URLSearchParams&&(t.query=(0,u.u0)(t.query.toString().replaceAll("+"," ")));const i=(0,u.HK)(e),c=(0,u.jc)(e);c||i||(e=(0,u.Fv)(e));const g={url:e,requestOptions:{...t}};let b=(0,u.oh)(e);if(b){const e=await async function(e,t){if(null!=e.responseData)return e.responseData;if(e.headers&&(t.requestOptions.headers={...t.requestOptions.headers,...e.headers}),e.query&&(t.requestOptions.query={...t.requestOptions.query,...e.query}),e.before){let r,n;try{n=await e.before(t)}catch(e){r=x("request:interceptor",e,t)}if((n instanceof Error||n instanceof a.Z)&&(r=x("request:interceptor",n,t)),r)throw e.error&&e.error(r),r;return n}}(b,g);if(null!=e)return{data:e,getHeader:M,httpStatus:200,requestOptions:g.requestOptions,url:g.url};b.after||b.error||(b=null)}if(e=g.url,"image"===(t=g.requestOptions).responseType&&((0,s.Z)("host-webworker")||(0,s.Z)("host-node")))throw x("request:invalid-parameters",new Error("responseType 'image' is not supported in Web Workers or Node environment"),g);if("head"===t.method){if(t.body)throw x("request:invalid-parameters",new Error("body parameter cannot be set when method is 'head'"),g);if(i||c)throw x("request:invalid-parameters",new Error("data and blob URLs are not supported for method 'head'"),g)}if(await async function(){(0,s.Z)("host-webworker")?m||(m=await r.e(9884).then(r.bind(r,29884))):p._abortableFetch||(p._abortableFetch=globalThis.fetch.bind(globalThis))}(),m)return m.execute(e,t);const w=new AbortController;(0,l.fu)(t,(()=>w.abort()));const v={controller:w,credential:void 0,credentialToken:void 0,fetchOptions:void 0,hasToken:!1,interceptor:b,params:g,redoRequest:!1,useIdentity:f.useIdentity,useProxy:!1,useSSL:!1,withCredentials:!1},S=await async function(e){let t,r;await async function(e){const t=e.params.url,r=e.params.requestOptions,a=e.controller.signal,s=r.body;let i=null,u=null;if(y&&"HTMLFormElement"in globalThis&&(s instanceof FormData?i=s:s instanceof HTMLFormElement&&(i=new FormData(s))),"string"==typeof s&&(u=s),e.fetchOptions={cache:r.cacheBust&&!("polyfill"in p._abortableFetch)?"no-cache":"default",credentials:"same-origin",headers:r.headers||{},method:"head"===r.method?"HEAD":"GET",mode:"cors",priority:f.priority,redirect:"follow",signal:a},(i||u)&&(e.fetchOptions.body=i||u),"anonymous"===r.authMode&&(e.useIdentity=!1),e.hasToken=!!(/token=/i.test(t)||r.query?.token||i?.get("token")),!e.hasToken&&n.default.apiKey&&(0,d.r)(t)&&(r.query||(r.query={}),r.query.token=n.default.apiKey,e.hasToken=!0),e.useIdentity&&!e.hasToken&&!e.credentialToken&&!O(t)&&!(0,l.Hc)(a)){let n;"immediate"===r.authMode?(await T(),n=await o.id.getCredential(t,{signal:a}),e.credential=n):"no-prompt"===r.authMode?(await T(),n=await o.id.getCredential(t,{prompt:!1,signal:a}).catch((()=>{})),e.credential=n):o.id&&(n=o.id.findCredential(t)),n&&(e.credentialToken=n.token,e.useSSL=!!n.ssl)}}(e);try{do{[t,r]=await k(e)}while(!await N(e,t,r))}catch(r){const n=x("request:server",r,e.params,t);throw n.details.ssl=e.useSSL,e.interceptor?.error&&e.interceptor.error(n),n}const a=e.params.url;if(r&&/\/sharing\/rest\/(accounts|portals)\/self/i.test(a)){if(!e.hasToken&&!e.credentialToken&&r.user?.username&&!(0,u.kl)(a)){const e=(0,u.P$)(a,!0);e&&f.trustedServers.push(e)}Array.isArray(r.authorizedCrossOriginNoCorsDomains)&&(0,h.Hu)(r.authorizedCrossOriginNoCorsDomains)}const s=e.credential;if(s&&o.id){const e=o.id.findServerInfo(s.server);let t=e?.owningSystemUrl;if(t){t=t.replace(/\/?$/,"/sharing");const e=o.id.findCredential(t,s.userId);e&&-1===o.id._getIdenticalSvcIdx(t,e)&&e.resources.unshift(t)}}return{data:r,getHeader:t?e=>t?.headers.get(e):M,httpStatus:t?.status??200,requestOptions:e.params.requestOptions,ssl:e.useSSL,url:e.params.url}}(v);return b?.after?.(S),S}let m;const f=n.default.request,y="FormData"in globalThis,g=[499,498,403,401],b=["COM_0056","COM_0057","SB_0008"],w=[/\/arcgis\/tokens/i,/\/sharing(\/rest)?\/generatetoken/i,/\/rest\/info/i],M=()=>null,v=Symbol();function S(e){const t=(0,u.P$)(e);return!t||t.endsWith(".arcgis.com")||p._corsServers.includes(t)||(0,u.kl)(t)}function x(e,t,r,n){let o="Error";const s={url:r.url,requestOptions:r.requestOptions,getHeader:M,ssl:!1};if(t instanceof a.Z)return t.details?(t.details=(0,i.d9)(t.details),t.details.url=r.url,t.details.requestOptions=r.requestOptions):t.details=s,t;if(t){const e=n&&(e=>n.headers.get(e)),r=n?.status,a=t.message;a&&(o=a),e&&(s.getHeader=e),s.httpStatus=(null!=t.httpCode?t.httpCode:t.code)||r||0,s.subCode=t.subcode,s.messageCode=t.messageCode,"string"==typeof t.details?s.messages=[t.details]:s.messages=t.details,s.raw=v in t?t[v]:t}return(0,l.D_)(t)?(0,l.zE)():new a.Z(e,o,s)}async function T(){o.id||await Promise.all([r.e(7126),r.e(6261),r.e(9255),r.e(1400),r.e(450)]).then(r.bind(r,73660))}function O(e){return w.some((t=>t.test(e)))}async function k(e){let t=e.params.url;const r=e.params.requestOptions,n=e.fetchOptions??{},a=(0,u.jc)(t)||(0,u.HK)(t),i=r.responseType||"json",d=a?0:null!=r.timeout?r.timeout:f.timeout;let m=!1;if(!a){e.useSSL&&(t=(0,u.hO)(t)),r.cacheBust&&"default"===n.cache&&(t=(0,u.ZN)(t,"request.preventCache",Date.now()));let a={...r.query};e.credentialToken&&(a.token=e.credentialToken);let i=(0,u.B7)(a);(0,s.Z)("esri-url-encodes-apostrophe")&&(i=i.replaceAll("'","%27"));const l=t.length+1+i.length;let d;m="delete"===r.method||"post"===r.method||"put"===r.method||!!r.body||l>f.maxUrlLength;const p=r.useProxy||!!(0,u.ed)(t);if(p){const e=(0,u.b7)(t);d=e.path,!m&&d.length+1+l>f.maxUrlLength&&(m=!0),e.query&&(a={...e.query,...a})}if("HEAD"===n.method&&(m||p)){if(m){if(l>f.maxUrlLength)throw x("request:invalid-parameters",new Error("URL exceeds maximum length"),e.params);throw x("request:invalid-parameters",new Error("cannot use POST request when method is 'head'"),e.params)}if(p)throw x("request:invalid-parameters",new Error("cannot use proxy when method is 'head'"),e.params)}if(m?(n.method="delete"===r.method?"DELETE":"put"===r.method?"PUT":"POST",r.body?t=(0,u.fl)(t,a):(n.body=(0,u.B7)(a),n.headers||(n.headers={}),n.headers["Content-Type"]="application/x-www-form-urlencoded")):t=(0,u.fl)(t,a),p&&(e.useProxy=!0,t=`${d}?${t}`),a.token&&y&&n.body instanceof FormData&&!(0,c.P)(t)&&n.body.set("token",a.token),r.hasOwnProperty("withCredentials"))e.withCredentials=r.withCredentials;else if(!(0,u.D6)(t,(0,u.TI)()))if((0,u.kl)(t))e.withCredentials=!0;else if(o.id){const r=o.id.findServerInfo(t);r?.webTierAuth&&(e.withCredentials=!0)}e.withCredentials&&(n.credentials="include",(0,h.jH)(t)&&await(0,h.jz)(m?(0,u.fl)(t,a):t))}let g,b,w=0,M=!1;d>0&&(w=setTimeout((()=>{M=!0,e.controller.abort()}),d));try{if("native-request-init"===r.responseType)b=n,b.url=t;else if("image"!==r.responseType||"default"!==n.cache||"GET"!==n.method||m||function(e){if(e)for(const t of Object.getOwnPropertyNames(e))if(e[t])return!0;return!1}(r.headers)||!a&&!e.useProxy&&f.proxyUrl&&!S(t)){if(g=await p._abortableFetch(t,n),e.useProxy||function(e){const t=(0,u.P$)(e);t&&!p._corsServers.includes(t)&&p._corsServers.push(t)}(t),"native"===r.responseType)b=g;else if("HEAD"!==n.method)if(g.ok){switch(i){case"array-buffer":b=await g.arrayBuffer();break;case"blob":case"image":b=await g.blob();break;default:b=await g.text()}if(w&&(clearTimeout(w),w=0),"json"===i||"xml"===i||"document"===i)if(b)switch(i){case"json":b=JSON.parse(b);break;case"xml":b=C(b,"application/xml");break;case"document":b=C(b,"text/html")}else b=null;if(b){if("array-buffer"===i||"blob"===i){const e=g.headers.get("Content-Type");if(e&&/application\/json|text\/plain/i.test(e)&&b["blob"===i?"size":"byteLength"]<=750)try{const e=await new Response(b).json();e.error&&(b=e)}catch{}}"image"===i&&b instanceof Blob&&(b=await q(URL.createObjectURL(b),e,!0))}}else{b=await g.text();try{b=JSON.parse(b)}catch{}}}else b=await q(t,e)}catch(n){if("AbortError"===n.name){if(M)throw(0,h.Tf)();throw(0,l.zE)("Request canceled")}if(!(!g&&n instanceof TypeError&&f.proxyUrl)||r.body||"delete"===r.method||"head"===r.method||"post"===r.method||"put"===r.method||e.useProxy||S(t))throw n;e.redoRequest=!0,(0,u.tD)({proxyUrl:f.proxyUrl,urlPrefix:(0,u.P$)(t)??""})}finally{w&&clearTimeout(w)}return[g,b]}function C(e,t){let r;try{r=(new DOMParser).parseFromString(e,t)}catch{}if(!r||r.getElementsByTagName("parsererror").length)throw new SyntaxError("XML Parse error");return r}async function N(e,t,r){if(e.redoRequest)return e.redoRequest=!1,!1;const n=e.params.requestOptions;if(!t||"native"===n.responseType||"native-request-init"===n.responseType)return!0;let a,s;if(r&&(r.error?a=r.error:"error"===r.status&&Array.isArray(r.messages)&&(a={...r},a[v]=r,a.details=r.messages)),!a&&!t.ok)throw a=new Error(`Unable to load ${t.url} status: ${t.status}`),a[v]=r,a;let i,l=null;a&&(s=Number(a.code),l=a.hasOwnProperty("subcode")?Number(a.subcode):null,i=a.messageCode,i=i?.toUpperCase());const u=n.authMode;if(403===s&&(4===l||a.message?.toLowerCase().includes("ssl")&&!a.message.toLowerCase().includes("permission"))){if(!e.useSSL)return e.useSSL=!0,!1}else if(!e.hasToken&&e.useIdentity&&("no-prompt"!==u||498===s)&&void 0!==s&&g.includes(s)&&!O(e.params.url)&&(403!==s||i&&!b.includes(i)&&(null==l||2===l&&e.credentialToken))){await T();try{const t=await o.id.getCredential(e.params.url,{error:x("request:server",a,e.params),prompt:"no-prompt"!==u,signal:e.controller.signal,token:e.credentialToken});return e.credential=t,e.credentialToken=t.token,e.useSSL=e.useSSL||t.ssl,!1}catch(t){if("no-prompt"===u)return e.credential=void 0,e.credentialToken=void 0,!1;a=t}}if(a)throw a;return!0}function q(e,t,r=!1){const n=t.controller.signal,o=new Image;return t.withCredentials?o.crossOrigin="use-credentials":o.crossOrigin="anonymous",o.alt="",o.fetchPriority=f.priority,o.src=e,(0,h.fY)(o,e,r,n)}p._abortableFetch=null,p._corsServers=["https://server.arcgisonline.com","https://services.arcgisonline.com"]},98046:(e,t,r)=>{r.d(t,{Z:()=>p});var n,o=r(43697),a=r(22303),s=r(22974),i=r(5600),l=r(75215),u=r(36030),c=r(52011),d=r(899);let h=n=class extends d.Z{constructor(e){super(e),this.algorithm=null,this.fromColor=null,this.toColor=null,this.type="algorithmic"}clone(){return new n({fromColor:(0,s.d9)(this.fromColor),toColor:(0,s.d9)(this.toColor),algorithm:this.algorithm})}};(0,o._)([(0,u.J)({esriCIELabAlgorithm:"cie-lab",esriHSVAlgorithm:"hsv",esriLabLChAlgorithm:"lab-lch"})],h.prototype,"algorithm",void 0),(0,o._)([(0,i.Cb)({type:a.Z,json:{type:[l.z8],write:!0}})],h.prototype,"fromColor",void 0),(0,o._)([(0,i.Cb)({type:a.Z,json:{type:[l.z8],write:!0}})],h.prototype,"toColor",void 0),(0,o._)([(0,i.Cb)({type:["algorithmic"]})],h.prototype,"type",void 0),h=n=(0,o._)([(0,c.j)("esri.rest.support.AlgorithmicColorRamp")],h);const p=h},899:(e,t,r)=>{r.d(t,{Z:()=>l});var n=r(43697),o=r(96674),a=r(5600),s=(r(75215),r(67676),r(80442),r(52011));let i=class extends o.wq{constructor(e){super(e),this.type=null}};(0,n._)([(0,a.Cb)({readOnly:!0,json:{read:!1,write:!0}})],i.prototype,"type",void 0),i=(0,n._)([(0,s.j)("esri.rest.support.ColorRamp")],i);const l=i},1515:(e,t,r)=>{r.d(t,{Z:()=>d});var n,o=r(43697),a=r(22974),s=r(5600),i=(r(75215),r(52011)),l=r(98046),u=r(899);let c=n=class extends u.Z{constructor(e){super(e),this.colorRamps=null,this.type="multipart"}clone(){return new n({colorRamps:(0,a.d9)(this.colorRamps)})}};(0,o._)([(0,s.Cb)({type:[l.Z],json:{write:!0}})],c.prototype,"colorRamps",void 0),(0,o._)([(0,s.Cb)({type:["multipart"]})],c.prototype,"type",void 0),c=n=(0,o._)([(0,i.j)("esri.rest.support.MultipartColorRamp")],c);const d=c},94593:(e,t,r)=>{r.d(t,{V:()=>s,i:()=>i});var n=r(98046),o=r(899),a=r(1515);const s={key:"type",base:o.Z,typeMap:{algorithmic:n.Z,multipart:a.Z}};function i(e){return e&&e.type?"algorithmic"===e.type?n.Z.fromJSON(e):"multipart"===e.type?a.Z.fromJSON(e):null:null}},71058:(e,t,r)=>{r.d(t,{r:()=>a});var n=r(81271);const o=["elevation3d.arcgis.com","js.arcgis.com","jsdev.arcgis.com","jsqa.arcgis.com","static.arcgis.com"];function a(e){const t=(0,n.P$)(e,!0);return!!t&&t.endsWith(".arcgis.com")&&!o.includes(t)&&!e.endsWith("/sharing/rest/generateToken")}},85958:(e,t,r)=>{r.d(t,{Hu:()=>d,Tf:()=>c,fY:()=>i,jH:()=>h,jz:()=>p});var n=r(68773),o=r(80442),a=r(95330),s=r(81271);function i(e,t,r=!1,n){return new Promise(((s,i)=>{if((0,a.Hc)(n))return void i(l());let u=()=>{h(),i(new Error(`Unable to load ${t}`))},c=()=>{const t=e;h(),s(t)},d=()=>{if(!e)return;const t=e;h(),t.src="",i(l())};const h=()=>{(0,o.Z)("esri-image-decode")||(e.removeEventListener("error",u),e.removeEventListener("load",c)),u=null,c=null,e=null,null!=n&&n.removeEventListener("abort",d),d=null,r&&URL.revokeObjectURL(t)};null!=n&&n.addEventListener("abort",d),(0,o.Z)("esri-image-decode")?e.decode().then(c,u):(e.addEventListener("error",u),e.addEventListener("load",c))}))}function l(){try{return new DOMException("Aborted","AbortError")}catch{const e=new Error;return e.name="AbortError",e}}const u="Timeout exceeded";function c(){return new Error(u)}function d(e){n.default.request.crossOriginNoCorsDomains||(n.default.request.crossOriginNoCorsDomains={});const t=n.default.request.crossOriginNoCorsDomains;for(let r of e)r=r.toLowerCase(),/^https?:\/\//.test(r)?t[(0,s.P$)(r)??""]=0:(t[(0,s.P$)("http://"+r)??""]=0,t[(0,s.P$)("https://"+r)??""]=0)}function h(e){const t=n.default.request.crossOriginNoCorsDomains;if(t){let r=(0,s.P$)(e);if(r)return r=r.toLowerCase(),!(0,s.D6)(r,(0,s.TI)())&&t[r]<Date.now()-36e5}return!1}async function p(e){const t=n.default.request.crossOriginNoCorsDomains,r=(0,s.P$)(e);t&&r&&(t[r.toLowerCase()]=Date.now());const o=(0,s.mN)(e);e=o.path,"json"===o.query?.f&&(e+="?f=json");try{await fetch(e,{mode:"no-cors",credentials:"include"})}catch{}}}}]);
|