@arcgis/core 5.1.0-next.114 → 5.1.0-next.115
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Map.js +1 -1
- package/analysis/ShadowCast/MinDurationOptions.d.ts +3 -5
- package/analysis/ShadowCastAnalysis.d.ts +1 -1
- package/arcgisGlobal.d.ts +4 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/05c47ca3a266a271974b.js +1 -0
- package/assets/esri/core/workers/chunks/{29bbc0d6d847b065d10e.js → 062aadf426fe97a76bbb.js} +1 -1
- package/assets/esri/core/workers/chunks/0954e82f739d25001bcb.js +1 -0
- package/assets/esri/core/workers/chunks/0aaee272520c6e5bb617.js +1 -0
- package/assets/esri/core/workers/chunks/{12053c1213465d07d2f6.js → 0b445c1cf281f158c1f1.js} +1 -1
- package/assets/esri/core/workers/chunks/102ff3710db4ba5f083d.js +1 -0
- package/assets/esri/core/workers/chunks/163ce1be8bfe20e77f97.js +1 -0
- package/assets/esri/core/workers/chunks/{e87d02af6d6b05e19d93.js → 16713986893adfbc9331.js} +1 -1
- package/assets/esri/core/workers/chunks/{9bd713d96502ddc2ce25.js → 1765042635084f75d2b3.js} +1 -1
- package/assets/esri/core/workers/chunks/185c670eb99474906836.js +1 -0
- package/assets/esri/core/workers/chunks/18ebf1d3ed05c8057f7d.js +1 -0
- package/assets/esri/core/workers/chunks/1da2c34743897d1b6a24.js +1 -0
- package/assets/esri/core/workers/chunks/22d4521637806a8b828f.js +1 -0
- package/assets/esri/core/workers/chunks/233ff588798c8a5eedf4.js +1 -0
- package/assets/esri/core/workers/chunks/24d9e4f1c7b8ff0d2cce.js +1 -0
- package/assets/esri/core/workers/chunks/2562d8905bd05ef6fd07.js +1 -0
- package/assets/esri/core/workers/chunks/{e5d969214d9eda5c0b4c.js → 2a5dbed88bbd96cfac9f.js} +1 -1
- package/assets/esri/core/workers/chunks/2bcd4d395bfe6a19ccc8.js +1 -0
- package/assets/esri/core/workers/chunks/3192586ec7fc73ed1165.js +1 -0
- package/assets/esri/core/workers/chunks/38ca59db0e8f45bd7811.js +1 -0
- package/assets/esri/core/workers/chunks/3b10a962e4ff2f3da5bc.js +1 -0
- package/assets/esri/core/workers/chunks/3e9709e61015993b1c7d.js +1 -0
- package/assets/esri/core/workers/chunks/425c04b26a6ec6d04b08.js +1 -0
- package/assets/esri/core/workers/chunks/4364a3e706294bb6ae41.js +1 -0
- package/assets/esri/core/workers/chunks/44e52fe98ffafe6a2807.js +1 -0
- package/assets/esri/core/workers/chunks/4cecc582513b8a83f194.js +1 -0
- package/assets/esri/core/workers/chunks/5022413f5a41b5d435ea.js +1 -0
- package/assets/esri/core/workers/chunks/{8ade869fa9bae446266a.js → 51816d79c6be15e4bfcf.js} +1 -1
- package/assets/esri/core/workers/chunks/{cf9b0ba30a75c030ca92.js → 5524a71d1abc9568ce26.js} +1 -1
- package/assets/esri/core/workers/chunks/{ba31616de9d73d83d867.js → 557e39e5156b313597f9.js} +1 -1
- package/assets/esri/core/workers/chunks/{5ef37f37e405b3bb5450.js → 59dafa1e1340ea4043e6.js} +1 -1
- package/assets/esri/core/workers/chunks/624b1bb269744142b835.js +1 -0
- package/assets/esri/core/workers/chunks/{39987c06636e757d1f00.js → 62b5972d0ef9bf173308.js} +1 -1
- package/assets/esri/core/workers/chunks/641b8622fbb93c84671d.js +1 -0
- package/assets/esri/core/workers/chunks/643c7506f8fe8e06acd2.js +1 -0
- package/assets/esri/core/workers/chunks/65f02eca694cc1c9f5a7.js +1 -0
- package/assets/esri/core/workers/chunks/6d696beddcc5fbed5875.js +1 -0
- package/assets/esri/core/workers/chunks/728ad5bbbcbf88d6249f.js +1 -0
- package/assets/esri/core/workers/chunks/{0d2bc1be5802681666a4.js → 77859a61d059738d057f.js} +1 -1
- package/assets/esri/core/workers/chunks/{03a4543b94f9adeb1852.js → 7a3b05e25de2ff150f38.js} +1 -1
- package/assets/esri/core/workers/chunks/7bbffe07e62897928773.js +1 -0
- package/assets/esri/core/workers/chunks/{14a241b07baa67743248.js → 7c292f7b181f3b93352b.js} +1 -1
- package/assets/esri/core/workers/chunks/7c2d7df4ef4d775cd648.js +1 -0
- package/assets/esri/core/workers/chunks/{6d20d741b8ae1a45b422.js → 7dc2c21d61ba66a3f461.js} +1 -1
- package/assets/esri/core/workers/chunks/7df05c3c82cd27b77300.js +1 -0
- package/assets/esri/core/workers/chunks/7eb94fc75926bc739233.js +1 -0
- package/assets/esri/core/workers/chunks/8461f50e9875db4ccfec.js +1 -0
- package/assets/esri/core/workers/chunks/{71e12db99589c98a4357.js → 8477b5fdd99c6ac5c27b.js} +1 -1
- package/assets/esri/core/workers/chunks/{be1e4c3ec53fc92a26f1.js → 8598997340682113a2a5.js} +1 -1
- package/assets/esri/core/workers/chunks/{548c34ea88f113d03c93.js → 86229634bf008f53dad4.js} +1 -1
- package/assets/esri/core/workers/chunks/86443e47ad99e555753a.js +1 -0
- package/assets/esri/core/workers/chunks/87a40e7f79f97ca637a9.js +1 -0
- package/assets/esri/core/workers/chunks/{27d6ad4ca5ab8c9d62cd.js → 8c443c52c846a096a250.js} +1 -1
- package/assets/esri/core/workers/chunks/{86161025b53b916328ff.js → 8ca88cfc0b9f84dc5832.js} +1 -1
- package/assets/esri/core/workers/chunks/{340f2c996f62f7f5ceae.js → 8e7ce4835b3106349684.js} +1 -1
- package/assets/esri/core/workers/chunks/90b0fe5584fb6fc99766.js +1 -0
- package/assets/esri/core/workers/chunks/9133c1b7cc1c9da27deb.js +1 -0
- package/assets/esri/core/workers/chunks/{d4749eb8a47869477037.js → 9250615c78f8570a9cda.js} +1 -1
- package/assets/esri/core/workers/chunks/92a7735973b2f82a66ce.js +1 -0
- package/assets/esri/core/workers/chunks/94a5a834e32fc6cc6ed4.js +1 -0
- package/assets/esri/core/workers/chunks/986d8c3907aeeb18c4f6.js +1 -0
- package/assets/esri/core/workers/chunks/98e489c2b85feded7776.js +1 -0
- package/assets/esri/core/workers/chunks/{271e42b7cd3c3441839e.js → 9eab1e1535494ff2050d.js} +10 -22
- package/assets/esri/core/workers/chunks/{466c250537415f12eb59.js → a01f0ffbe555f690bdca.js} +1 -1
- package/assets/esri/core/workers/chunks/a03c4c0bf138734a002e.js +1 -0
- package/assets/esri/core/workers/chunks/a814069325125466506b.js +1 -0
- package/assets/esri/core/workers/chunks/{e4b2120d7ee1c998b1fc.js → aa03f770178693167aa0.js} +1 -1
- package/assets/esri/core/workers/chunks/aea439d4c2308f88b295.js +1 -0
- package/assets/esri/core/workers/chunks/{7995e6983456c779adf9.js → b002304a45856b024b46.js} +1 -1
- package/assets/esri/core/workers/chunks/b0c242c4f5412e4cce73.js +1 -0
- package/assets/esri/core/workers/chunks/b44f1d08784f2e50c853.js +1 -0
- package/assets/esri/core/workers/chunks/c1b6de0d728d25d7905a.js +1 -0
- package/assets/esri/core/workers/chunks/{f8b884b529064df4a30a.js → caf80facb0322be054ab.js} +1 -1
- package/assets/esri/core/workers/chunks/{25d795a1697803d77e56.js → ce0e627a5e1cb78adce8.js} +1 -1
- package/assets/esri/core/workers/chunks/{63378b0b4265a547656b.js → d8ec0afb2b91ccf32e55.js} +1 -1
- package/assets/esri/core/workers/chunks/d97c0c18202b8c578f8c.js +1 -0
- package/assets/esri/core/workers/chunks/{2f99a95facddc44319a9.js → da3c54e27a808f4fcc18.js} +1 -1
- package/assets/esri/core/workers/chunks/db012650fb34c10cecd0.js +1 -0
- package/assets/esri/core/workers/chunks/dc6d50e1097a920ff820.js +1 -0
- package/assets/esri/core/workers/chunks/dce37324a2382d2eef0d.js +1 -0
- package/assets/esri/core/workers/chunks/e0bd550b10dd402c48f1.js +1 -0
- package/assets/esri/core/workers/chunks/e2ba57f7119b7182ba02.js +279 -0
- package/assets/esri/core/workers/chunks/e755477dc78e9d6038d4.js +1 -0
- package/assets/esri/core/workers/chunks/ea4057090cf15d602585.js +1 -0
- package/assets/esri/core/workers/chunks/ea8f642b1db933d2c26f.js +1 -0
- package/assets/esri/core/workers/chunks/eabd4a78221b7e733793.js +1 -0
- package/assets/esri/core/workers/chunks/eb16976b4eb7f1300f4a.js +1 -0
- package/assets/esri/core/workers/chunks/efae58f746b108163a50.js +1 -0
- package/assets/esri/core/workers/chunks/f231548c8ac7ecb59927.js +1 -0
- package/assets/esri/core/workers/chunks/fe2325efd0d8ad8369ed.js +1 -0
- package/assets/esri/themes/base/widgets/_BatchAttributeForm.scss +26 -3
- package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +4 -13
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/chunks/GlobalIllumination.glsl.js +22 -34
- package/config.js +1 -1
- package/core/screenUtils.js +1 -1
- package/core/typedArrayUtil.js +1 -1
- package/editing/templates/TemplateListing.d.ts +32 -0
- package/editing/templates/TemplateListing.js +2 -0
- package/geometry/support/buffer/BufferView.js +1 -1
- package/geometry/support/heightModelInfoUtils.js +1 -1
- package/interfaces.d.ts +14 -0
- package/kernel.js +1 -1
- package/layers/AnnotationLayer.d.ts +42 -0
- package/layers/AnnotationLayer.js +2 -0
- package/layers/DimensionFeatureLayer.d.ts +36 -1
- package/layers/DimensionFeatureLayer.js +1 -1
- package/layers/graphics/sources/FeatureLayerSource.js +1 -1
- package/layers/graphics/sources/support/MemorySourceWorker.js +1 -1
- package/layers/types.d.ts +1 -1
- package/networks/support/networkFieldUtils.js +1 -1
- package/package.json +1 -1
- package/rest/support/OutDistance.js +1 -1
- package/rest/support/Query.js +1 -1
- package/support/basemapEnsureType.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/CIMOperators.js +1 -1
- package/symbols/cim/CIMSymbolHelper.js +1 -1
- package/symbols/cim/utils.js +1 -1
- package/views/2d/engine/webgl/mesh/factories/FeatureMeshFactory.js +1 -1
- package/views/2d/engine/webgl/mesh/factories/ResourceProxy.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/shapingUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/createTestMeshData.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/featureTechniqueUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/LineShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ViewInfo.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/engine/webgl/util/AnnotationMatcher.js +2 -0
- package/views/2d/engine/webgl/util/DimensionMatcher.js +2 -0
- package/views/2d/engine/webgl/util/Matcher.js +1 -1
- package/views/2d/engine/webgl/util/createMatcher.js +1 -1
- package/views/2d/layerViewModuleImportUtils.js +1 -1
- package/views/2d/layers/AnnotationLayerView2D.js +2 -0
- package/views/2d/layers/{DimensionLayerView2D.js → DimensionFeatureLayerView2D.js} +1 -1
- package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
- package/views/2d/layers/MapImageLayerView2D.js +1 -1
- package/views/2d/layers/RouteLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/VectorTileLayerView2D.js +1 -1
- package/views/2d/layers/features/FeatureContainer.js +1 -1
- package/views/2d/layers/features/Processor.js +1 -1
- package/views/2d/layers/features/layerAdapters/AnnotationLayerAdapter.js +2 -0
- package/views/2d/layers/features/layerAdapters/DimensionLayerAdapter.js +1 -1
- package/views/2d/layers/features/schema/processor/SimpleProcessorSchema.js +1 -1
- package/views/2d/layers/features/sources/strategies/support/queryAdapters.js +1 -1
- package/views/2d/layers/features/support/FeatureMetadata.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderAnnotationJSON.js +2 -0
- package/views/2d/layers/features/support/FeatureSetReaderDimensionJSON.js +2 -0
- package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
- package/views/2d/layers/support/annodime/DimensionInfo.js +2 -0
- package/views/2d/layers/support/annodime/DimensionMatcherSchema.js +2 -0
- package/views/2d/layers/support/annodime/PrivateDimensionEffect.js +2 -0
- package/views/2d/layers/support/annodime/PrivatePlacementMultipoint.js +2 -0
- package/views/2d/layers/support/annodime/annotationGraphic.js +2 -0
- package/views/2d/layers/support/annodime/annotationSchema.js +2 -0
- package/views/2d/layers/support/annodime/annotationUtils.js +2 -0
- package/views/2d/layers/support/annodime/cimAnnotations.js +2 -0
- package/views/2d/layers/support/annodime/dimensionSchema.js +2 -0
- package/views/2d/layers/support/annodime/dimensionSymbols.js +2 -0
- package/views/2d/layers/support/annodime/dimensionUtils.js +2 -0
- package/views/2d/layers/support/annodime/fields.js +2 -0
- package/views/2d/layers/support/annodime/unsupported.js +2 -0
- package/views/2d/layers/support/annodime/utils.js +2 -0
- package/views/2d/layers/support/annodime/virtualFields.js +2 -0
- package/views/2d/support/clippingUtils.js +1 -1
- package/views/2d/support/hitTestUtils.js +1 -1
- package/views/2d/types.d.ts +5 -1
- package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
- package/views/3d/layerViewModuleImportUtils.js +1 -1
- package/views/3d/layers/MapImageLayerView3D.js +1 -1
- package/views/3d/layers/TileLayerView3D.js +1 -1
- package/views/3d/terrain/isTerrainSurfaceLayer.js +1 -1
- package/views/3d/types.d.ts +2 -0
- package/views/3d/webgl-engine/collections/Component/RenderSubmitSystem.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/RenderPass.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBufferFields.glsl.js +8 -8
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathEvaluate.glsl.js +53 -61
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexPosition.glsl.js +23 -32
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
- package/views/3d/webgl-engine/lib/PathBuilder.js +1 -1
- package/views/3d/webgl-engine/lib/PathEvaluator.js +1 -1
- package/views/3d/webgl-engine/lib/PathGeometryData.js +1 -1
- package/views/3d/webgl-engine/lib/PathVertex.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
- package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferFieldCreation.js +1 -1
- package/views/3d/webgl-engine/materials/PathLayouts.js +1 -1
- package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
- package/views/3d/webgl-engine/shaders/ditherNoise.glsl.js +18 -1
- package/views/PopupView.d.ts +3 -3
- package/views/PopupView.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/View2D.js +1 -1
- package/views/layers/AnnotationLayerView.d.ts +18 -0
- package/views/layers/AnnotationLayerView.js +2 -0
- package/views/layers/DimensionFeatureLayerView.d.ts +18 -0
- package/views/layers/DimensionFeatureLayerView.js +2 -0
- package/views/layers/FeatureLikeLayerView.d.ts +2 -1
- package/views/layers/FeatureLikeLayerView.js +1 -1
- package/views/layers/ImageryLayerView.js +1 -1
- package/views/layers/ImageryTileLayerView.js +1 -1
- package/views/layers/WMSLayerView.js +1 -1
- package/views/layers/support/MapServiceLayerViewHelper.js +1 -1
- package/widgets/BasemapToggle/BasemapToggleViewModel.js +1 -1
- package/widgets/BatchAttributeForm/css.js +1 -1
- package/widgets/BatchAttributeForm/rendered-content/RelationshipDetails.js +2 -0
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/css.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/support/iconUtils.js +1 -1
- package/assets/esri/core/workers/chunks/0175098da590a7109539.js +0 -1
- package/assets/esri/core/workers/chunks/019a4fe7e085b2fc6ae9.js +0 -1
- package/assets/esri/core/workers/chunks/023837e5d9d2b6af66d8.js +0 -1
- package/assets/esri/core/workers/chunks/03c46880b69ce75a010f.js +0 -1
- package/assets/esri/core/workers/chunks/040884cec4b84dd1bb17.js +0 -1
- package/assets/esri/core/workers/chunks/04ea806b933d4dd41609.js +0 -1
- package/assets/esri/core/workers/chunks/0e549d942d6cba1608cf.js +0 -1
- package/assets/esri/core/workers/chunks/13a8346abe5509167578.js +0 -1
- package/assets/esri/core/workers/chunks/13d43a0683c42b94feb6.js +0 -1
- package/assets/esri/core/workers/chunks/179ffa2168c42615ccf2.js +0 -1
- package/assets/esri/core/workers/chunks/1ebb613bbe09fcf274d8.js +0 -1
- package/assets/esri/core/workers/chunks/27d7c701306efeea6b82.js +0 -1
- package/assets/esri/core/workers/chunks/2b9661700743d1f9717e.js +0 -1
- package/assets/esri/core/workers/chunks/2bdfae998371e3aa9f2d.js +0 -1
- package/assets/esri/core/workers/chunks/2f0a3b22fc46d832e240.js +0 -1
- package/assets/esri/core/workers/chunks/3835097520296b0517af.js +0 -1
- package/assets/esri/core/workers/chunks/4605a68e40c5c3ac6e3e.js +0 -1
- package/assets/esri/core/workers/chunks/4b130db9b7b4e2e32ea4.js +0 -1
- package/assets/esri/core/workers/chunks/4bfeac7338df9e0b7ce1.js +0 -1
- package/assets/esri/core/workers/chunks/4c5cdd2712c938fafc5d.js +0 -1
- package/assets/esri/core/workers/chunks/4fa3840672c33adb9171.js +0 -1
- package/assets/esri/core/workers/chunks/4ffcca40e7aa24c8cc35.js +0 -1
- package/assets/esri/core/workers/chunks/534dd93c72ea448ee908.js +0 -1
- package/assets/esri/core/workers/chunks/5ea0096a282e87a269bd.js +0 -1
- package/assets/esri/core/workers/chunks/66fe1634c6e8f72fc653.js +0 -1
- package/assets/esri/core/workers/chunks/6920e7f700a9ba280dba.js +0 -1
- package/assets/esri/core/workers/chunks/6b1f2b36bdc6b2ff2ea5.js +0 -1
- package/assets/esri/core/workers/chunks/6b66a6f69aa03338c346.js +0 -1
- package/assets/esri/core/workers/chunks/6d59a9cf533ebc590f70.js +0 -1
- package/assets/esri/core/workers/chunks/75dfdd85abbac26ac899.js +0 -1
- package/assets/esri/core/workers/chunks/798c4d3201fcc9f2a42b.js +0 -1
- package/assets/esri/core/workers/chunks/817fd88fe9a48caf69fb.js +0 -1
- package/assets/esri/core/workers/chunks/825db2ea15308ee6e5dc.js +0 -1
- package/assets/esri/core/workers/chunks/82f7d83a2073d1b0111c.js +0 -1
- package/assets/esri/core/workers/chunks/89250d268dc2554a9ece.js +0 -1
- package/assets/esri/core/workers/chunks/8c8fed53c12fb80ef2ed.js +0 -1
- package/assets/esri/core/workers/chunks/8ff83c59462dea6e3427.js +0 -1
- package/assets/esri/core/workers/chunks/961995d8da45a9203255.js +0 -1
- package/assets/esri/core/workers/chunks/a9c9c00432ee41ec91ba.js +0 -1
- package/assets/esri/core/workers/chunks/af762422a65c551dcd54.js +0 -1
- package/assets/esri/core/workers/chunks/b041c22885193bdd3004.js +0 -1
- package/assets/esri/core/workers/chunks/b3e8ab68fc38306f13c6.js +0 -1
- package/assets/esri/core/workers/chunks/b684ff4bc93bd60d6a19.js +0 -1
- package/assets/esri/core/workers/chunks/bb2f6b0fcdfb8b158e26.js +0 -1
- package/assets/esri/core/workers/chunks/c5ab346a226df1894302.js +0 -1
- package/assets/esri/core/workers/chunks/cd2b2babcdc130b4c368.js +0 -1
- package/assets/esri/core/workers/chunks/cedf3e316d6f89cf7005.js +0 -1
- package/assets/esri/core/workers/chunks/d39f5590022d910ee951.js +0 -1
- package/assets/esri/core/workers/chunks/d412a43060441d347fb4.js +0 -1
- package/assets/esri/core/workers/chunks/d41b847d08c42e5329d6.js +0 -262
- package/assets/esri/core/workers/chunks/d52172439db02a349542.js +0 -1
- package/assets/esri/core/workers/chunks/d8c2bed12f937228c763.js +0 -1
- package/assets/esri/core/workers/chunks/de916dd0c11aefb6832e.js +0 -1
- package/assets/esri/core/workers/chunks/ecf4d07917efc97eb991.js +0 -1
- package/assets/esri/core/workers/chunks/eda51e512eff551ad858.js +0 -1
- package/assets/esri/core/workers/chunks/f14e3693cd644265f909.js +0 -1
- package/assets/esri/core/workers/chunks/f52c6efc5a2abf5ac845.js +0 -1
- package/assets/esri/core/workers/chunks/f635a8e3b0bfeda99ed5.js +0 -1
- package/assets/esri/core/workers/chunks/f9f331c76c96743d8522.js +0 -1
- package/assets/esri/core/workers/chunks/fcbacca99c5a3ee5b69a.js +0 -1
- package/symbols/dimensions/effects/LinearDimensionArrowEffect.js +0 -2
- package/symbols/dimensions/effects/LinearDimensionExtensionLineEffect.js +0 -2
- package/symbols/dimensions/effects/LinearDimensionLeaderLineEffect.js +0 -2
- package/symbols/dimensions/effects/LinearDimensionLineEffect.js +0 -2
- package/symbols/dimensions/effects/LinearDimensionPointEffect.js +0 -2
- package/symbols/dimensions/effects/LinearDimensionTextEffect.js +0 -2
- package/views/2d/layers/features/support/FeatureSetReaderDimension.js +0 -2
- package/views/3d/webgl-engine/effects/globalIllumination/BlueNoise.js +0 -2
- package/views/layers/support/dimensionUtils.js +0 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9616],{5482(t,e,n){function r(t,e,n,r){var o,s=arguments.length,i=s<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(i=(s<3?o(i):s>3?o(e,n,i):o(e,n))||i);return s>3&&i&&Object.defineProperty(e,n,i),i}function o(t,e,n){if(null!=e){if("object"!=typeof e&&"function"!=typeof e)throw new TypeError("Object expected.");var r,o;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=e[Symbol.asyncDispose]}if(void 0===r){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=e[Symbol.dispose],n&&(o=r)}if("function"!=typeof r)throw new TypeError("Object not disposable.");o&&(r=function(){try{o.call(this)}catch(t){return Promise.reject(t)}}),t.stack.push({value:e,dispose:r,async:n})}else n&&t.stack.push({async:!0});return e}n.d(e,{Cg:()=>r,hk:()=>i,mS:()=>o}),Object.create,Object.create;var s="function"==typeof SuppressedError?SuppressedError:function(t,e,n){var r=new Error(n);return r.name="SuppressedError",r.error=t,r.suppressed=e,r};function i(t){function e(e){t.error=t.hasError?new s(e,t.error,"An error was suppressed during disposal."):e,t.hasError=!0}var n,r=0;return function o(){for(;n=t.stack.pop();)try{if(!n.async&&1===r)return r=0,t.stack.push(n),Promise.resolve().then(o);if(n.dispose){var s=n.dispose.call(n.value);if(n.async)return r|=2,Promise.resolve(s).then(o,function(t){return e(t),o()})}else r|=1}catch(t){e(t)}if(1===r)return t.hasError?Promise.reject(t.error):Promise.resolve();if(t.hasError)throw t.error}()}},69052(t,e,n){n.d(e,{hr:()=>o,ie:()=>l,uC:()=>a});var r=n(34727);class o{constructor(t,e){this.min=t,this.max=e,this.range=e-t}normalize(t,e=0,n=!1){return s(this.range,this.min,this.max,t,e,n)}clamp(t,e=0){return(0,r.qE)(t-e,this.min,this.max)+e}monotonic(t,e,n){return t<e?e:e+i(this.range,t-e,n)}minimalMonotonic(t,e,n){return s(this.range,t,t+this.range,e,n)}center(t,e,n){return e=this.monotonic(t,e,n),this.normalize((t+e)/2,n)}diff(t,e,n){return this.monotonic(t,e,n)-t}shortestSignedDiff(t,e){t=this.normalize(t);const n=(e=this.normalize(e))-t,r=e<t?this.minimalMonotonic(t,e)-t:e-this.minimalMonotonic(e,t);return Math.abs(n)<Math.abs(r)?n:r}contains(t,e,n){return e=this.minimalMonotonic(t,e),(n=this.minimalMonotonic(t,n))>t&&n<e}}function s(t,e,n,r,o=0,s=!1){return(r-=o)<e?r+=i(t,e-r):r>n&&(r-=i(t,r-n)),s&&r===n&&(r=e),r+o}function i(t,e,n=0){return Math.ceil((e-n)/t)*t+n}const a=new o(0,2*Math.PI),l=(new o(-Math.PI,Math.PI),new o(0,360))},49616(t,e,n){n.r(e),n.d(e,{default:()=>c});var r=n(5482),o=n(91429),s=n(19419),i=n(69052);n(21325);var a=n(97441);let l=class{constructor(){this._tileData=new Map}async generateStreamlines(t){const{flowData:e,flowExtentInfo:n,needsMagnitude:r,simulationSettings:o,startPositions:s}=t,i=u((0,a.DE)(o,e),o,n.modelSize,r,s);return{result:{streamlines:i},transferList:i?.map(t=>t.vertices.buffer)}}async generateTiledStreamlines(t){const{flowDataTiles:e,flowExtentInfo:n,needsMagnitude:r,reset:o,simulationSettings:l,startPositions:c}=t;this._updateTileData(e,o);const h=u(function(t,e,n){const[r,o]=n.modelSize;let l=null;const c=new Map;e.forEach(e=>{c.set(e.lij,(0,a.DE)(t,e))});const u=(t,e,n)=>(0,s.Rj)(t.extent,e,n);return(a,h)=>{const f=Math.round(a),d=Math.round(h);if(!t.wrapAround&&(f<0||f>=r||d<0||d>=o))return[0,0];const[p,m]=function(t,e,n,r){const{extent:o,modelSize:a,valid:l}=t,[c,u,h]=o,f=function(t,e,n){if(null!=n&&t>e){const[r,o]=n;return o-t+(e-r)}return e-t}(c,h,l);let d=e/a[0]*f+c;return null!=l&&r&&(d=new i.hr(l[0],l[1]).normalize(d)),[d,(a[1]-n)/a[1]*(0,s.uJ)(o)+u]}(n,a,h,!0);if(!function(t,e,n){const{extent:r,valid:o}=t,[s,i,a,l]=r;return!(n<i||n>l)&&(null!=o&&s>a?e>=a||e<=s:e>=s&&e<=a)}(n,p,m))return[0,0];if(null==l||!u(l,p,m)){l=null;for(const[t,n]of e)if(u(n,p,m)){l=n;break}}if(null==l?.data)return[0,0];const g=c.get(l.lij);if(null==g)return[0,0];const{width:w,height:y,extent:M}=l;return g((p-M[0])/(0,s.VL)(M)*w,y-(m-M[1])/(0,s.uJ)(M)*y)}}(l,this._tileData,n),l,n.modelSize,r,c);return{result:{streamlines:h},transferList:h?.map(t=>t.vertices.buffer)??[]}}_updateTileData(t,e){if(e)for(const e of this._tileData.keys())t.has(e)||this._tileData.delete(e);t.forEach((t,e)=>{"delete"===t.type?this._tileData.delete(e):"on-worker"!==t.type&&"invalid"!==t.type&&this._tileData.set(e,t.data)})}};l=(0,r.Cg)([(0,o.$K)("esri.views.3d.support.flow.FlowWorker")],l);const c=l;function u(t,e,n,r,o){if(null==t)return;const s=(0,a.S1)(e,t,n[0],n[1],{positions:o}),i=[],l=function(t){return t?4:3}(r);for(const{vertices:t,stage:e}of s){const n=new Float32Array(t.length*l);for(let e=0;e<t.length;e++)n[e*l]=t[e].x,n[e*l+1]=t[e].y,n[e*l+2]=t[e].time,r&&(n[e*l+3]=t[e].speed);i.push({vertices:n,stage:e,hasMagnitude:r})}return i}},97441(t,e,n){n.d(e,{DE:()=>l,S1:()=>i,dF:()=>a}),n(44208),n(53966);var r=n(34727),o=n(87811),s=n(78659);function i(t,e,n,r,s){if(t.density<=0)return[];const{positions:i}=s,a=[],l=new o.A,h=1/Math.max(t.lineCollisionWidth,1),f=Math.round(n*h),d=Math.round(r*h),p=new Int32Array(f*d);for(let t=0;t<p.length;t++)p[t]=-1;const m={raster:p,width:f,height:d,resolutionFactor:h},g={},w=t.lineSpacing/Math.sqrt(t.density),y=Math.floor(r/w),M=Math.floor(n/w);for(let t=0;t<y;t++){const e=t*w;for(let n=0;n<M;n++){const r=n*w;g[`${n}-${t}`]={x:r,y:e,positions:[]}}}for(const{x:t,y:e}of i){const n=g[`${Math.floor(t/w)}-${Math.floor(e/w)}`];n&&n.positions.push([t,e])}const v=[];for(const t in g){const e=g[t];if(0===e.positions.length)v.push({x:e.x+w/2,y:e.y+w/2,sort:.66+.33*l.getFloat(),stage:0});else{const[t]=e.positions.splice(0,1);v.push({x:t[0],y:t[1],sort:.33*l.getFloat(),stage:1});for(const[t,n]of e.positions)v.push({x:t,y:n,sort:.33+.33*l.getFloat(),stage:2})}}v.sort((t,e)=>t.sort-e.sort);for(const{x:o,y:s,stage:i}of v){if(a.length>=t.maxNumberOfStreamlines)break;const h=t.onlyForwardTracing?c(1,t,e,o,s,[n,r],a.length,m):u(t,e,o,s,[n,r],a.length,l,m);h.length<2||a.push({stage:i,vertices:h})}return a}function a(t){for(let e=0;e<t.mask.length;e++)0===t.mask[e]&&(t.data[2*e]=0,t.data[2*e+1]=0)}function l(t,e){const n=function(t,e,n,r){if(0===r)return t;const o=Math.round(3*r),s=new Array(2*o+1);let i=0;for(let t=-o;t<=o;t++){const e=Math.exp(-t*t/(r*r));s[t+o]=e,i+=e}for(let t=-o;t<=o;t++)s[t+o]/=i;const a=new Float32Array(t.length);for(let r=0;r<n;r++)for(let n=0;n<e;n++){let i=0,l=0;for(let a=-o;a<=o;a++){if(n+a<0||n+a>=e)continue;const c=s[a+o];i+=c*t[2*(r*e+(n+a))],l+=c*t[2*(r*e+(n+a))+1]}a[2*(r*e+n)]=i,a[2*(r*e+n)+1]=l}const l=new Float32Array(t.length);for(let t=0;t<e;t++)for(let r=0;r<n;r++){let i=0,c=0;for(let l=-o;l<=o;l++){if(r+l<0||r+l>=n)continue;const u=s[l+o];i+=u*a[2*((r+l)*e+t)],c+=u*a[2*((r+l)*e+t)+1]}l[2*(r*e+t)]=i,l[2*(r*e+t)+1]=c}return l}(e.data,e.width,e.height,t.smoothing);return t.interpolate?(t,r)=>{const o=Math.floor(t),s=Math.floor(r);if(o<0||o>=e.width)return[0,0];if(s<0||s>=e.height)return[0,0];const i=t-o,a=r-s,l=o,c=s,u=o<e.width-1?o+1:o,h=s<e.height-1?s+1:s,f=n[2*(c*e.width+l)],d=n[2*(c*e.width+u)],p=n[2*(h*e.width+l)],m=n[2*(h*e.width+u)],g=n[2*(c*e.width+l)+1],w=n[2*(c*e.width+u)+1];return[(f*(1-a)+p*a)*(1-i)+(d*(1-a)+m*a)*i,(g*(1-a)+n[2*(h*e.width+l)+1]*a)*(1-i)+(w*(1-a)+n[2*(h*e.width+u)+1]*a)*i]}:(t,r)=>{const o=Math.round(t),s=Math.round(r);return o<0||o>=e.width||s<0||s>=e.height?[0,0]:[n[2*(s*e.width+o)],n[2*(s*e.width+o)+1]]}}function c(t,e,n,o,i,a,l,c){const u=[],{raster:h,width:f,height:d,resolutionFactor:p}=c;let m=o,g=i,w=(0,s.Kp)(0),[y,M]=n(m,g);y*=e.velocityScale,M*=e.velocityScale;const v=Math.sqrt(y*y+M*M);let S,b;u.push({x:m,y:g,time:w,speed:v});for(let o=0;o<e.verticesPerLine;o++){let[o,i]=n(m,g);o*=e.velocityScale,i*=e.velocityScale;const c=Math.sqrt(o*o+i*i);if(c<e.minSpeedThreshold)return u;const y=t*o/c,M=t*i/c;m+=y*e.segmentLength,g+=M*e.segmentLength,e.wrapAround&&(m=(0,r.OS)(m,a[0]));const v=t*e.segmentLength/c;if(w=(0,s.Kp)(w+v),Math.acos(y*S+M*b)>e.maxTurnAngle)return u;if(e.collisions){let t=Math.round(m*p);const n=Math.round(g*p);if(e.wrapAround&&(t=(0,r.OS)(t,f)),t<0||t>f-1||n<0||n>d-1)return u;const o=h[n*f+t];if(-1!==o&&o!==l)return u;h[n*f+t]=l}u.push({x:m,y:g,time:w,speed:c}),S=y,b=M}return u}function u(t,e,n,r,o,s,i,a){const l=Math.round((.2+.6*i.getFloat())*t.verticesPerLine),u=t.verticesPerLine-l,h=c(-1,{...t,verticesPerLine:u},e,n,r,o,s,a),f=c(1,{...t,verticesPerLine:l},e,n,r,o,s,a),d=h.reverse();return d.splice(-1,1),d.concat(f)}n(5443),n(21325)}}]);
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
vec3 shadedColor = evaluateSceneLightingPBR(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight, shadingParams.viewDirection, normalGround, mrr, additionalAmbientIrradiance);`:j.H`vec3 shadedColor = evaluateSceneLighting(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight);`}
|
|
66
66
|
vec4 finalColor = vec4(shadedColor, opacity_);
|
|
67
67
|
outputColorHighlightOLID(applySlice(finalColor, vpos), albedo ${(0,j.If)(q,", snow")});
|
|
68
|
-
`),t}const G=Object.freeze(Object.defineProperty({__proto__:null,build:A},Symbol.toStringTag,{value:"Module"}))},587(e,t,r){r.d(t,{G:()=>
|
|
68
|
+
`),t}const G=Object.freeze(Object.defineProperty({__proto__:null,build:A},Symbol.toStringTag,{value:"Module"}))},587(e,t,r){r.d(t,{G:()=>I,a:()=>C,b:()=>_,c:()=>w,d:()=>x,e:()=>S,f:()=>T,g:()=>y,h:()=>M,i:()=>b});var o=r(82048),a=r(92573),n=r(65261),i=r(98619),s=r(70893),l=r(34845),c=r(20304),u=r(31821),d=r(58029),h=r(12791),m=r(63761),p=r(58243),f=r(63907),v=r(65786),g=r(14113);const x=.15,b=25,y=.15,w=.5,M=1,S=1,T=16;class C extends v.Y{constructor(){super(...arguments),this.projScale=1,this.scaleGlobalIllumination=1,this.accumulatedFrames=0,this.temporalSampleFrame=0,this.rayMarchMinReach=y,this.rayMarchMaxReach=w,this.rayMarchWorldReach=b,this.rayMarchMinReachEmissionWeight=M,this.rayMarchMaxReachEmissionWeight=S,this.rayMarchMaxSteps=T,this.colorBleedWeight=x}}function _(e){const t=new g.N5,r=t.fragment;return t.include(o.c),t.include(l.Ir),(0,i.Gc)(r),r.include(a.V),r.include(n.C),r.include(p.nY),t.include(s.O,e),r.uniforms.add(new m.N("normalMap",e=>e.normalTexture),new m.N("depthMap",e=>e.depthTexture),new m.N("lastFrameColorTexture",(e,t)=>t.reprojection.lastFrameColor?.getTexture()),new m.N("lastFrameDepthTexture",(e,t)=>t.reprojection.lastFrameDepth?.attachment),new h.x("lastFrameGlobalIlluminationTexture",e=>e.globalIllumination?.getTexture()),new h.x("lastFrameGlobalIlluminationWeightTexture",e=>e.globalIllumination?.getTexture(f.yI)),new d.F("reprojectionViewMatrix",e=>e.reprojection.viewMatrix),new d.F("view",e=>e.camera.viewMatrix),new c.m("accumulatedFrames",e=>e.accumulatedFrames),new c.m("temporalSampleFrame",e=>e.temporalSampleFrame),new c.m("scaleGlobalIllumination",e=>e.scaleGlobalIllumination)),r.uniforms.add(new c.m("rayMarchMinReach",e=>e.rayMarchMinReach),new c.m("rayMarchMaxReach",e=>e.rayMarchMaxReach),new c.m("rayMarchWorldReach",e=>e.rayMarchWorldReach),new c.m("rayMarchMinReachEmissionWeight",e=>e.rayMarchMinReachEmissionWeight),new c.m("rayMarchMaxReachEmissionWeight",e=>e.rayMarchMaxReachEmissionWeight),new c.m("rayMarchMaxSteps",e=>e.rayMarchMaxSteps),new c.m("colorBleedWeight",e=>e.colorBleedWeight)),e.hasEmission&&r.uniforms.add(new m.N("lastFrameEmissionTexture",(e,t)=>t.reprojection.lastFrameEmission?.attachment)),r.code.add(u.H`
|
|
69
69
|
float computeIdleColorBlendWeight(float accumulatedFrames) {
|
|
70
70
|
float idleColorBlendProgress = clamp(
|
|
71
71
|
accumulatedFrames / ${u.H.float(40)},
|
|
@@ -92,18 +92,6 @@
|
|
|
92
92
|
);
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
// Blue noise value based on a texture lookup
|
|
96
|
-
vec4 randomDirection(float index) {
|
|
97
|
-
vec2 textureOffset = vec2(mod(index, blueNoiseGridSize), floor(index / blueNoiseGridSize)) * timeSamplesSize;
|
|
98
|
-
vec2 noiseCoord = textureOffset + mod(
|
|
99
|
-
floor(uv * vec2(textureSize(normalMap, 0)) * scaleGlobalIllumination),
|
|
100
|
-
vec2(timeSamplesSize)
|
|
101
|
-
);
|
|
102
|
-
vec4 blueNoiseValue = texelFetch(blueNoiseTex, ivec2(noiseCoord), 0);
|
|
103
|
-
|
|
104
|
-
return 2.0 * blueNoiseValue - 1.0;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
95
|
bool isEdgeDepth(float centerDepth, vec2 sampleUv) {
|
|
108
96
|
vec2 texelSize = 1.0 / vec2(textureSize(depthMap, 0));
|
|
109
97
|
float depthLeft = linearizeDepth(depthFromTexture(depthMap, sampleUv + vec2(-texelSize.x, 0.0)));
|
|
@@ -212,7 +200,7 @@
|
|
|
212
200
|
float stepSize = 1.0 / float(steps);
|
|
213
201
|
for (int i = 0; i < steps; ++i) {
|
|
214
202
|
float sampleIndex = float(i * temporalSampleStride + int(temporalFrameOffset));
|
|
215
|
-
randomDirectionSample =
|
|
203
|
+
randomDirectionSample = analiticalBlueNoiseDither(floor(gl_FragCoord.xy), sampleIndex);
|
|
216
204
|
vec2 hemisphereSample = randomDirectionSample.rg * 0.5 + 0.5;
|
|
217
205
|
float offsetSample = randomDirectionSample.a * 0.5 + 0.5;
|
|
218
206
|
vec3 rayDirection = normalBasis * sampleCosineHemisphere(hemisphereSample);
|
|
@@ -275,7 +263,7 @@
|
|
|
275
263
|
fragGlobalIllumination.a = mix(lastFrameGlobalIllumination.a + accumulationDither, fragGlobalIllumination.a, occlusionBlendWeight);
|
|
276
264
|
|
|
277
265
|
fragWeight = occlusionBlendWeight;
|
|
278
|
-
`),t}const
|
|
266
|
+
`),t}const I=Object.freeze(Object.defineProperty({__proto__:null,GlobalIlluminationPassParameters:C,build:_,defaultColorBleedWeight:x,defaultRayMarchMaxReach:w,defaultRayMarchMaxReachEmissionWeight:S,defaultRayMarchMaxSteps:T,defaultRayMarchMinReach:y,defaultRayMarchMinReachEmissionWeight:M,defaultRayMarchWorldReach:b},Symbol.toStringTag,{value:"Module"}))},52516(e,t,r){r.d(t,{G:()=>b,a:()=>g,b:()=>x});var o=r(48163),a=r(82048),n=r(52540),i=r(72885),s=r(34845),l=r(32976),c=r(68259),u=r(20304),d=r(31821),h=r(15976),m=r(63761),p=r(58243),f=r(65786),v=r(14113);class g extends f.Y{constructor(){super(...arguments),this.blurSize=(0,o.vt)()}}function x(){const e=new v.N5,t=e.fragment;e.include(a.c),e.include(s.Ir),e.include(i.Q);return t.include(n.E),t.include(p.mT),t.uniforms.add(new l.o("hasEmission",e=>e.hasEmission),new m.N("depthMap",e=>e.depthTexture),new m.N("normalMap",e=>e.normalTexture),new h.o("globalIlluminationTexture",e=>e.texture),new h.o("globalIlluminationWeightTexture",e=>e.weightTexture),new c.t("blurSize",e=>e.blurSize),new u.m("scaleGlobalIllumination",e=>e.scaleGlobalIllumination),new u.m("projScale",(e,t)=>{const r=t.camera.distance;return r>5e4?Math.max(0,e.projScale-(r-5e4)):e.projScale})),t.code.add(d.H`
|
|
279
267
|
void accumulateBlurSample(
|
|
280
268
|
vec2 sampleUv,
|
|
281
269
|
float sampleOffset,
|
|
@@ -689,7 +677,7 @@ return textureGrad(tex, uvAtlas, dUVdx, dUVdy);
|
|
|
689
677
|
vec4 textureLookup(sampler2D tex, vec2 uv) {
|
|
690
678
|
return ${i?"textureAtlasLookup(tex, uv, vuvRegion)":"texture(tex, uv)"};
|
|
691
679
|
}
|
|
692
|
-
`)}},35640(e,t,r){r.d(t,{Ge:()=>c});var o=r(78955),a=r(91829),n=r(52587),i=r(77949),s=r(71988),l=r(31821);function c(e,t){const r=e.vertex;t.hasVerticalOffset?(function(e){e.uniforms.add(new s.E("verticalOffset",(e,t)=>{const{minWorldLength:r,maxWorldLength:a,screenLength:n}=e.verticalOffset,i=Math.tan(.5*t.camera.fovY)/(.5*t.camera.fullViewport[3]),s=t.camera.pixelRatio||1;return(0,o.hZ)(u,n*s,i,r,a)}))}(r),t.hasScreenSizePerspective&&(e.include(n.Y6),(0,n.OH)(r),(0,i.yu)(e.vertex,t)),r.code.add(l.H`
|
|
680
|
+
`)}},35640(e,t,r){r.d(t,{Ge:()=>c}),r(90629);var o=r(78955),a=r(91829),n=r(52587),i=r(77949),s=r(71988),l=r(31821);function c(e,t){const r=e.vertex;t.hasVerticalOffset?(function(e){e.uniforms.add(new s.E("verticalOffset",(e,t)=>{const{minWorldLength:r,maxWorldLength:a,screenLength:n}=e.verticalOffset,i=Math.tan(.5*t.camera.fovY)/(.5*t.camera.fullViewport[3]),s=t.camera.pixelRatio||1;return(0,o.hZ)(u,n*s,i,r,a)}))}(r),t.hasScreenSizePerspective&&(e.include(n.Y6),(0,n.OH)(r),(0,i.yu)(e.vertex,t)),r.code.add(l.H`
|
|
693
681
|
vec3 calculateVerticalOffset(vec3 worldPos, vec3 localOrigin) {
|
|
694
682
|
float viewDistance = length((view * vec4(worldPos, 1.0)).xyz);
|
|
695
683
|
${t.spherical?l.H`vec3 worldNormal = normalize(worldPos + localOrigin);`:l.H`vec3 worldNormal = vec3(0.0, 0.0, 1.0);`}
|
|
@@ -814,7 +802,7 @@ return texture(ssaoTex, gl_FragCoord.xy * blurSizePixelsInverse * ssaoTextureSiz
|
|
|
814
802
|
float evaluateAmbientOcclusion() {
|
|
815
803
|
return 1.0 - evaluateAmbientOcclusionInverse();
|
|
816
804
|
}`)):e.code.add(o.H`float evaluateAmbientOcclusionInverse() { return 1.0; }
|
|
817
|
-
float evaluateAmbientOcclusion() { return 0.0; }`)}},32971(e,t,r){r.d(t,{kA:()
|
|
805
|
+
float evaluateAmbientOcclusion() { return 0.0; }`)}},32971(e,t,r){r.d(t,{kA:()=>G,a8:()=>W,eU:()=>A});var o=r(74333);class a extends o.n{constructor(e,t,r,o){super(e,"float",0,(t,a)=>t.setUniform1fv(e,r(a),o),t)}}var n=r(31821);function i(e,t){e.uniforms.add(new a("shR",9,({lighting:e})=>e.sh.r),new a("shG",9,({lighting:e})=>e.sh.g),new a("shB",9,({lighting:e})=>e.sh.b)),e.code.add(n.H`vec3 calculateAmbientIrradiance(vec3 normal) {
|
|
818
806
|
vec3 ambientLight = 0.282095 * vec3(shR[0], shG[0], shB[0]);
|
|
819
807
|
vec4 sh1 = vec4(
|
|
820
808
|
0.488603 * normal.x,
|
|
@@ -850,7 +838,7 @@ vec3 calculateAmbientRadiance()
|
|
|
850
838
|
{
|
|
851
839
|
vec3 ambientLight = 1.2 * (0.282095 * vec3(shR[0], shG[0], shB[0])) - 0.2;
|
|
852
840
|
return ambientLight *= skyTransmittance;
|
|
853
|
-
}`)}var s=r(71651),l=r(65261),c=r(98619),u=r(22393),d=r(89786),h=r(32976),m=r(12791),p=r(5482),f=r(
|
|
841
|
+
}`)}var s=r(71651),l=r(65261),c=r(98619),u=r(22393),d=r(89786),h=r(32976),m=r(12791),p=r(5482),f=r(97768),v=r(36708),g=r(91429),x=r(37585),b=r(2016),y=r(48375),w=r(587),M=r(52516),S=r(13840),T=r(98958),C=r(90644);let _=class extends T.w{constructor(){super(...arguments),this.shader=new S.r(M.G,()=>r.e(2013).then(r.bind(r,42013)))}initializePipeline(){return(0,C.Ey)({colorWrite:C.kn})}};_=(0,p.Cg)([(0,g.$K)("esri.views.3d.webgl-engine.effects.globalIllumination.GlobalIlluminationBlurTechnique")],_);let I=class extends T.w{constructor(){super(...arguments),this.shader=new S.r(w.G,()=>r.e(9794).then(r.bind(r,89794)))}initializePipeline(){return(0,C.Ey)({colorWrite:C.kn})}};I=(0,p.Cg)([(0,g.$K)("esri.views.3d.webgl-engine.effects.globalIllumination.GlobalIlluminationTechnique")],I);var P=r(51976);class z extends P.K{constructor(){super(...arguments),this.hasColor=!0,this.hasEmission=!1,this.rayMarchMaxReach=w.c,this.rayMarchMaxSteps=w.f,this.useProjectedRayLength=!0,this.clampRayToScreen=!1}}(0,p.Cg)([(0,P.W)()],z.prototype,"hasColor",void 0),(0,p.Cg)([(0,P.W)()],z.prototype,"hasEmission",void 0);var R=r(50704);let D=class extends T.w{constructor(){super(...arguments),this.shader=new S.r(R.G,()=>r.e(7891).then(r.bind(r,37891)))}initializePipeline(){return(0,C.Ey)({colorWrite:C.kn})}};D=(0,p.Cg)([(0,g.$K)("esri.views.3d.webgl-engine.effects.globalIllumination.GlobalIlluminationUpscaleTechnique")],D);var F=r(63907);let j=class extends y.A{constructor(e){super(e),this.consumes={required:["normals"]},this.produces=b.OG.AMBIENT_ILLUMINATION,this._passParameters=new w.a,this._drawParameters=new M.a,this._drawParametersUpscale=new R.a,this._maxFrames=256,this._lowQualityResolutionScale=.25,this._configuration=new z,this._globalIllumination=null,this._isGlobalIlluminationUpdate=!1,this._resetBuffer=!1}initialize(){this.addHandles((0,v.wB)(()=>this.view.stage.renderer.hasGlobalIllumination,()=>{this._resetAccumulatedFrames(),this._requestRender()},v.pc))}destroy(){this._globalIllumination=(0,f.Gz)(this._globalIllumination)}resetAccumulatedFrames(){this._isGlobalIlluminationUpdate||this._resetAccumulatedFrames()}render(e){if(this._passParameters.accumulatedFrames>=this._maxFrames)return this._globalIllumination?.retain(),this._globalIllumination;const t=e.find(({name:e})=>"normals"===e),r=t?.getTexture(),o=t?.getTexture(F.nI),a=this._mode;if(!r||!o)return this._emptyOutput;if(0===a)return this._resetBuffer=!1,this._emptyOutput;if(!this._canRender)return this._resetBuffer=!1,this._requestRender(),this._emptyOutput;const n=this.bindParameters;this._configuration.hasEmission=n.hasEmission;const i=this.techniques.getCompiled(I,this._configuration),s=this.techniques.getCompiled(_),l=1===a,c=l?this._lowQualityResolutionScale:1,u=l?this.techniques.getCompiled(D):null;if(!i||!s||l&&!u)return this._requestRender(),this._emptyOutput;const d=this.renderingContext,{camera:h}=n;this._passParameters.normalTexture=r,this._passParameters.depthTexture=o,this._passParameters.projScale=1/h.computeScreenPixelSizeAtDist(1),this._passParameters.scaleGlobalIllumination=c;const{fullWidth:m,fullHeight:p}=h,f=Math.max(1,Math.floor(m*c)),v=Math.max(1,Math.floor(p*c)),g=this.fboCache.acquire(f,v,"global illumination input").acquireColor(F.yI,0);d.bindFramebuffer(g.fbo),d.setViewport(0,0,f,v),d.bindTechnique(i,n,this._passParameters,this._drawParameters),d.screen.draw();const y=g.obtainAttachment(F.yI),w=Math.max(1,Math.round(f/1)),M=Math.max(1,Math.round(v/1)),S=this.fboCache.acquire(w,M,"global illumination blur horizontal");d.bindFramebuffer(S.fbo),this._drawParameters.texture=g.getTexture(),this._drawParameters.weightTexture=y.attachment,(0,x.hZ)(this._drawParameters.blurSize,0,1/v),d.bindTechnique(s,n,this._passParameters,this._drawParameters),d.setViewport(0,0,w,M),d.screen.draw(),g.release();const T=l?"global illumination blur vertical":b.OG.AMBIENT_ILLUMINATION,C=this.fboCache.acquire(w,M,T);d.bindFramebuffer(C.fbo),d.setViewport(0,0,w,M),d.setClearColor(1,1,1,0),d.clear(16384),this._drawParameters.texture=S.getTexture(),this._drawParameters.weightTexture=y.attachment,(0,x.hZ)(this._drawParameters.blurSize,1/w,0),d.bindTechnique(s,n,this._passParameters,this._drawParameters),d.setViewport(0,0,w,M),d.screen.draw(),S.release(),C.attachColor(y,F.yI),y.release();let P=C;return u&&(P=this.fboCache.acquire(m,p,b.OG.AMBIENT_ILLUMINATION).acquireColor(F.yI,0),d.bindFramebuffer(P.fbo),d.setViewport(0,0,m,p),d.setClearColor(1,1,1,0),d.clear(16384),this._drawParametersUpscale.colorTexture=C.getTexture(),this._drawParametersUpscale.weightTexture=C.getTexture(F.yI),d.bindTechnique(u,n,this._passParameters,this._drawParametersUpscale),d.screen.draw(),C.release()),d.setViewport4fv(h.fullViewport),this._passParameters.temporalSampleFrame=(this._passParameters.temporalSampleFrame+1)%64,++this._passParameters.accumulatedFrames,this._cacheGlobalIllumination(P),this._passParameters.accumulatedFrames<this._maxFrames&&this._requestRender(),P}_requestRender(){this._isGlobalIlluminationUpdate=!0,this.requestRender(1),this._isGlobalIlluminationUpdate=!1}_cacheGlobalIllumination(e){this._globalIllumination!==e&&(this._globalIllumination=(0,f.Gz)(this._globalIllumination),this._globalIllumination=e,this._globalIllumination.retain())}get _emptyOutput(){const e=this.renderingContext,{fullWidth:t,fullHeight:r}=this.bindParameters.camera,o=this.fboCache.acquire(t,r,b.OG.AMBIENT_ILLUMINATION).acquireColor(F.yI,0);return e.bindFramebuffer(o.fbo),e.setViewport(0,0,t,r),e.clearBuffer(0,[0,0,0,1]),e.clearBuffer(1,[0,0,0,0]),o}get _canRender(){const e=this.bindParameters;return!(!e.reprojection.lastFrameColor||e.hasEmission&&!e.reprojection.lastFrameEmission||!e.reprojection.lastFrameDepth||!e.globalIllumination||this._resetBuffer)}get _mode(){const{hasGlobalIlluminationHighQuality:e,hasGlobalIllumination:t}=this.view.stage.renderer;return e?2:t?1:0}_resetAccumulatedFrames(){this._passParameters.accumulatedFrames=0,this._globalIllumination=(0,f.Gz)(this._globalIllumination)}get test(){const e=this;return{passParameters:this._passParameters,configuration:this._configuration,get maxFrames(){return e._maxFrames},set maxFrames(t){e._maxFrames=t},get lowQualityResolutionScale(){return e._lowQualityResolutionScale},set lowQualityResolutionScale(t){e._lowQualityResolutionScale=t},get mode(){return e._mode},restartAccumulation:()=>{this._resetAccumulatedFrames(),this._passParameters.temporalSampleFrame=0,this._resetBuffer=!0,this._requestRender()}}}};function O(e,t){t.receiveGlobalIllumination?(e.uniforms.add(new h.o("hasGlobalIlluminationTexture",e=>null!=e.globalIllumination),new m.x("globalIlluminationTexture",e=>e.globalIllumination?.getTexture())),e.constants.add("blurSizePixelsInverse","float",1),e.code.add(n.H`vec3 readGlobalIlluminationOcclusionInverse() {
|
|
854
842
|
if (!hasGlobalIlluminationTexture) {
|
|
855
843
|
return vec3(1.0);
|
|
856
844
|
}
|
|
@@ -872,7 +860,7 @@ return max((1.0 - readGlobalIlluminationEmissionInverse() - 0.01) / 0.99, 0.0);
|
|
|
872
860
|
}`)):e.code.add(n.H`vec3 readGlobalIlluminationOcclusionInverse() { return vec3(1.0); }
|
|
873
861
|
vec3 readGlobalIlluminationOcclusion() { return vec3(0.0); }
|
|
874
862
|
vec4 readGlobalIlluminationEmissionInverse() { return vec4(1.0); }
|
|
875
|
-
vec4 readGlobalIlluminationEmission() { return vec4(0.0); }`)}(0,p.Cg)([(0,
|
|
863
|
+
vec4 readGlobalIlluminationEmission() { return vec4(0.0); }`)}(0,p.Cg)([(0,g.MZ)()],j.prototype,"consumes",void 0),(0,p.Cg)([(0,g.MZ)()],j.prototype,"produces",void 0),j=(0,p.Cg)([(0,g.$K)("esri.views.3d.webgl-engine.effects.globalIllumination.GlobalIllumination")],j);var E=r(33094),B=r(57226);function H(e){e.code.add(n.H`float mapChannel(float x, vec2 p) {
|
|
876
864
|
if((x < p.x) && (p.x == 0.0) || !(x < p.x) && (p.x == 1.0)) {
|
|
877
865
|
return 0.0;
|
|
878
866
|
}
|
|
@@ -881,7 +869,7 @@ return max(result, 0.0);
|
|
|
881
869
|
}`),e.code.add(n.H`vec3 blackLevelSoftCompression(vec3 color, float averageAmbientRadiance) {
|
|
882
870
|
vec2 p = vec2(0.02, 0.0075) * averageAmbientRadiance;
|
|
883
871
|
return vec3(mapChannel(color.x, p), mapChannel(color.y, p), mapChannel(color.z, p));
|
|
884
|
-
}`)}function
|
|
872
|
+
}`)}function N(e){e.code.add(n.H`vec3 tonemapACES(vec3 x) {
|
|
885
873
|
return clamp((x * (2.51 * x + 0.03)) / (x * (2.43 * x + 0.59) + 0.14), 0.0, 1.0);
|
|
886
874
|
}`),e.code.add(n.H`vec3 tonemapKhronosNeutral(vec3 color, float exposure) {
|
|
887
875
|
const float startCompression = 0.76;
|
|
@@ -899,7 +887,7 @@ float newPeak = 1.0 - d * d / ( peak + d - startCompression );
|
|
|
899
887
|
color *= newPeak / peak;
|
|
900
888
|
float g = 1.0 - 1.0 / ( desaturation * ( peak - newPeak ) + 1.0 );
|
|
901
889
|
return mix( color, vec3( newPeak ), g );
|
|
902
|
-
}`)}function
|
|
890
|
+
}`)}function W(e){e.constants.add("ambientBoostFactor","float",B.uH)}function A(e){e.uniforms.add(new E.U("lightingGlobalFactor",e=>e.lighting.globalFactor))}function G(e,t){const{pbrMode:r,spherical:o,hasColorTexture:a,receiveGlobalIllumination:m}=t;e.include(l.C),e.include(O,t),e.include(s.n,t),0!==r&&e.include(u.c,t),e.include(i,t),e.include(d.p),e.include(N,t);const p=!(2===r&&!a);p&&e.include(H),W(e),A(e),(0,c.Gc)(e),e.code.add(n.H`
|
|
903
891
|
float additionalDirectedAmbientLight(float lightAlignment) {
|
|
904
892
|
return smoothstep(0.0, 1.0, clamp(lightAlignment * 2.5, 0.0, 1.0));
|
|
905
893
|
}
|
|
@@ -947,7 +935,7 @@ return delinearizeGamma(outColor);
|
|
|
947
935
|
inputs.skyIrradianceToSurface = ambientLightIrradianceComponent + mainLightIrradianceComponent + fillLightsIrradianceComponent ;
|
|
948
936
|
// Assemble the overall irradiance of the ground that illuminates the surface. for this we use the simple model that changes only the sky irradiance by the groundReflectance
|
|
949
937
|
inputs.groundIrradianceToSurface = groundReflectance * ambientLightIrradianceComponent + mainLightIrradianceComponent + fillLightsIrradianceComponent ;
|
|
950
|
-
`),e.uniforms.add(new
|
|
938
|
+
`),e.uniforms.add(new E.U("lightingSpecularStrength",e=>e.lighting.mainLight.specularStrength),new E.U("lightingEnvironmentStrength",e=>e.lighting.mainLight.environmentStrength)).code.add(n.H`
|
|
951
939
|
vec3 horizonRingDir = inputs.RdotUP * upDirection - inputs.reflectedView;
|
|
952
940
|
vec3 horizonRingH = normalize(horizonRingDir - viewDirection);
|
|
953
941
|
inputs.NdotH_Horizon = dot(normal, horizonRingH);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9794],{89794(a,e,l){l.r(e),l.d(e,{GlobalIlluminationPassParameters:()=>t.a,build:()=>t.b,defaultColorBleedWeight:()=>t.d,defaultRayMarchMaxReach:()=>t.c,defaultRayMarchMaxReachEmissionWeight:()=>t.e,defaultRayMarchMaxSteps:()=>t.f,defaultRayMarchMinReach:()=>t.g,defaultRayMarchMinReachEmissionWeight:()=>t.h,defaultRayMarchWorldReach:()=>t.i}),l(82048),l(92573),l(65261),l(98619),l(70893),l(34845),l(20304),l(31821),l(58029),l(12791),l(63761),l(63907),l(65786),l(14113);var t=l(587)}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9794],{89794(a,e,l){l.r(e),l.d(e,{GlobalIlluminationPassParameters:()=>t.a,build:()=>t.b,defaultColorBleedWeight:()=>t.d,defaultRayMarchMaxReach:()=>t.c,defaultRayMarchMaxReachEmissionWeight:()=>t.e,defaultRayMarchMaxSteps:()=>t.f,defaultRayMarchMinReach:()=>t.g,defaultRayMarchMinReachEmissionWeight:()=>t.h,defaultRayMarchWorldReach:()=>t.i}),l(82048),l(92573),l(65261),l(98619),l(70893),l(34845),l(20304),l(31821),l(58029),l(12791),l(63761),l(58243),l(63907),l(65786),l(14113);var t=l(587)}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4505,9397],{5482(t,e,r){function n(t,e,r,n){var i,s=arguments.length,o=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(o=(s<3?i(o):s>3?i(e,r,o):i(e,r))||o);return s>3&&o&&Object.defineProperty(e,r,o),o}function i(t,e,r){if(null!=e){if("object"!=typeof e&&"function"!=typeof e)throw new TypeError("Object expected.");var n,i;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=e[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=e[Symbol.dispose],r&&(i=n)}if("function"!=typeof n)throw new TypeError("Object not disposable.");i&&(n=function(){try{i.call(this)}catch(t){return Promise.reject(t)}}),t.stack.push({value:e,dispose:n,async:r})}else r&&t.stack.push({async:!0});return e}r.d(e,{Cg:()=>n,hk:()=>o,mS:()=>i}),Object.create,Object.create;var s="function"==typeof SuppressedError?SuppressedError:function(t,e,r){var n=new Error(r);return n.name="SuppressedError",n.error=t,n.suppressed=e,n};function o(t){function e(e){t.error=t.hasError?new s(e,t.error,"An error was suppressed during disposal."):e,t.hasError=!0}var r,n=0;return function i(){for(;r=t.stack.pop();)try{if(!r.async&&1===n)return n=0,t.stack.push(r),Promise.resolve().then(i);if(r.dispose){var s=r.dispose.call(r.value);if(r.async)return n|=2,Promise.resolve(s).then(i,function(t){return e(t),i()})}else n|=1}catch(t){e(t)}if(1===n)return t.hasError?Promise.reject(t.error):Promise.resolve();if(t.hasError)throw t.error}()}},83349(t,e,r){function n(t,e,r){r=r||2;var n,s,a,l,h,c,f,x=e&&e.length,y=x?e[0]*r:t.length,d=i(t,0,y,r,!0),p=[];if(!d||d.next===d.prev)return p;if(x&&(d=u(t,e,d,r)),t.length>80*r){n=a=t[0],s=l=t[1];for(var g=r;g<y;g+=r)(h=t[g])<n&&(n=h),(c=t[g+1])<s&&(s=c),h>a&&(a=h),c>l&&(l=c);f=0!==(f=Math.max(a-n,l-s))?1/f:0}return o(d,p,r,n,s,f),p}function i(t,e,r,n,i){var s,o;if(i===V(t,e,r,n)>0)for(s=e;s<r;s+=n)o=B(s,t[s],t[s+1],o);else for(s=r-n;s>=e;s-=n)o=B(s,t[s],t[s+1],o);if(o&&I(o,o.next)){var a=o.next;P(o),o=a}return o}function s(t,e){if(!t)return t;e||(e=t);var r,n=t;do{if(r=!1,n.steiner||!I(n,n.next)&&0!==w(n.prev,n,n.next))n=n.next;else{var i=n.prev;if(P(n),(n=e=i)===n.next)break;r=!0}}while(r||n!==e);return e}function o(t,e,r,n,i,u,f){if(t){!f&&u&&p(t,n,i,u);for(var x,y,d=t;t.prev!==t.next;)if(x=t.prev,y=t.next,u?l(t,n,i,u):a(t))e.push(x.i/r),e.push(t.i/r),e.push(y.i/r),P(t),t=y.next,d=y.next;else if((t=y)===d){f?1===f?o(t=h(s(t),e,r),e,r,n,i,u,2):2===f&&c(t,e,r,n,i,u):o(s(t),e,r,n,i,u,1);break}}}function a(t){var e=t.prev,r=t,n=t.next;if(w(e,r,n)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(m(e.x,e.y,r.x,r.y,n.x,n.y,i.x,i.y)&&w(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function l(t,e,r,n){var i=t.prev,s=t,o=t.next;if(w(i,s,o)>=0)return!1;for(var a=i.x<s.x?i.x<o.x?i.x:o.x:s.x<o.x?s.x:o.x,l=i.y<s.y?i.y<o.y?i.y:o.y:s.y<o.y?s.y:o.y,h=i.x>s.x?i.x>o.x?i.x:o.x:s.x>o.x?s.x:o.x,c=i.y>s.y?i.y>o.y?i.y:o.y:s.y>o.y?s.y:o.y,u=g(a,l,e,r,n),f=g(h,c,e,r,n),x=t.prevZ,y=t.nextZ;x&&x.z>=u&&y&&y.z<=f;){if(x!==t.prev&&x!==t.next&&m(i.x,i.y,s.x,s.y,o.x,o.y,x.x,x.y)&&w(x.prev,x,x.next)>=0)return!1;if(x=x.prevZ,y!==t.prev&&y!==t.next&&m(i.x,i.y,s.x,s.y,o.x,o.y,y.x,y.y)&&w(y.prev,y,y.next)>=0)return!1;y=y.nextZ}for(;x&&x.z>=u;){if(x!==t.prev&&x!==t.next&&m(i.x,i.y,s.x,s.y,o.x,o.y,x.x,x.y)&&w(x.prev,x,x.next)>=0)return!1;x=x.prevZ}for(;y&&y.z<=f;){if(y!==t.prev&&y!==t.next&&m(i.x,i.y,s.x,s.y,o.x,o.y,y.x,y.y)&&w(y.prev,y,y.next)>=0)return!1;y=y.nextZ}return!0}function h(t,e,r){var n=t;do{var i=n.prev,o=n.next.next;!I(i,o)&&v(i,n,n.next,o)&&M(i,o)&&M(o,i)&&(e.push(i.i/r),e.push(n.i/r),e.push(o.i/r),P(n),P(n.next),n=t=o),n=n.next}while(n!==t);return s(n)}function c(t,e,r,n,i,a){var l=t;do{for(var h=l.next.next;h!==l.prev;){if(l.i!==h.i&&b(l,h)){var c=L(l,h);return l=s(l,l.next),c=s(c,c.next),o(l,e,r,n,i,a),void o(c,e,r,n,i,a)}h=h.next}l=l.next}while(l!==t)}function u(t,e,r,n){var o,a,l,h=[];for(o=0,a=e.length;o<a;o++)(l=i(t,e[o]*n,o<a-1?e[o+1]*n:t.length,n,!1))===l.next&&(l.steiner=!0),h.push(_(l));for(h.sort(f),o=0;o<h.length;o++)r=s(r=y(h[o],r),r.next);return r}function f(t,e){return t.x-e.x}function x(t){if(t.next.prev===t)return t;let e=t;for(;;){const r=e.next;if(r.prev===e||r===e||r===t)break;e=r}return e}function y(t,e){var r=function(t,e){var r,n=e,i=t.x,s=t.y,o=-1/0;do{if(s<=n.y&&s>=n.next.y&&n.next.y!==n.y){var a=n.x+(s-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(a<=i&&a>o){if(o=a,a===i){if(s===n.y)return n;if(s===n.next.y)return n.next}r=n.x<n.next.x?n:n.next}}n=n.next}while(n!==e);if(!r)return null;if(i===o)return r;var l,h=r,c=r.x,u=r.y,f=1/0;n=r;do{i>=n.x&&n.x>=c&&i!==n.x&&m(s<u?i:o,s,c,u,s<u?o:i,s,n.x,n.y)&&(l=Math.abs(s-n.y)/(i-n.x),M(n,t)&&(l<f||l===f&&(n.x>r.x||n.x===r.x&&d(r,n)))&&(r=n,f=l)),n=n.next}while(n!==h);return r}(t,e);if(!r)return e;var n=L(r,t),i=s(r,r.next);let o=x(n);return s(o,o.next),i=x(i),x(e===r?i:e)}function d(t,e){return w(t.prev,t,e.prev)<0&&w(e.next,t,t.next)<0}function p(t,e,r,n){var i=t;do{null===i.z&&(i.z=g(i.x,i.y,e,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,r,n,i,s,o,a,l,h=1;do{for(r=t,t=null,s=null,o=0;r;){for(o++,n=r,a=0,e=0;e<h&&(a++,n=n.nextZ);e++);for(l=h;a>0||l>0&&n;)0!==a&&(0===l||!n||r.z<=n.z)?(i=r,r=r.nextZ,a--):(i=n,n=n.nextZ,l--),s?s.nextZ=i:t=i,i.prevZ=s,s=i;r=n}s.nextZ=null,h*=2}while(o>1)}(i)}function g(t,e,r,n,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*i)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*i)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function _(t){var e=t,r=t;do{(e.x<r.x||e.x===r.x&&e.y<r.y)&&(r=e),e=e.next}while(e!==t);return r}function m(t,e,r,n,i,s,o,a){return(i-o)*(e-a)-(t-o)*(s-a)>=0&&(t-o)*(n-a)-(r-o)*(e-a)>=0&&(r-o)*(s-a)-(i-o)*(n-a)>=0}function b(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&v(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&&(M(t,e)&&M(e,t)&&function(t,e){var r=t,n=!1,i=(t.x+e.x)/2,s=(t.y+e.y)/2;do{r.y>s!=r.next.y>s&&r.next.y!==r.y&&i<(r.next.x-r.x)*(s-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==t);return n}(t,e)&&(w(t.prev,t,e.prev)||w(t,e.prev,e))||I(t,e)&&w(t.prev,t,t.next)>0&&w(e.prev,e,e.next)>0)}function w(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function I(t,e){return t.x===e.x&&t.y===e.y}function v(t,e,r,n){var i=T(w(t,e,r)),s=T(w(t,e,n)),o=T(w(r,n,t)),a=T(w(r,n,e));return i!==s&&o!==a||!(0!==i||!A(t,r,e))||!(0!==s||!A(t,n,e))||!(0!==o||!A(r,t,n))||!(0!==a||!A(r,e,n))}function A(t,e,r){return e.x<=Math.max(t.x,r.x)&&e.x>=Math.min(t.x,r.x)&&e.y<=Math.max(t.y,r.y)&&e.y>=Math.min(t.y,r.y)}function T(t){return t>0?1:t<0?-1:0}function M(t,e){return w(t.prev,t,t.next)<0?w(t,e,t.next)>=0&&w(t,t.prev,e)>=0:w(t,e,t.prev)<0||w(t,t.next,e)<0}function L(t,e){var r=new k(t.i,t.x,t.y),n=new k(e.i,e.x,e.y),i=t.next,s=e.prev;return t.next=e,e.prev=t,r.next=i,i.prev=r,n.next=r,r.prev=n,s.next=n,n.prev=s,n}function B(t,e,r,n){var i=new k(t,e,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function P(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function k(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function V(t,e,r,n){for(var i=0,s=e,o=r-n;s<r;s+=n)i+=(t[o]-t[s])*(t[s+1]+t[o+1]),o=s;return i}r.d(e,{e:()=>n}),n.deviation=function(t,e,r,n){var i=e&&e.length,s=i?e[0]*r:t.length,o=Math.abs(V(t,0,s,r));if(i)for(var a=0,l=e.length;a<l;a++){var h=e[a]*r,c=a<l-1?e[a+1]*r:t.length;o-=Math.abs(V(t,h,c,r))}var u=0;for(a=0;a<n.length;a+=3){var f=n[a]*r,x=n[a+1]*r,y=n[a+2]*r;u+=Math.abs((t[f]-t[y])*(t[x+1]-t[f+1])-(t[f]-t[x])*(t[y+1]-t[f+1]))}return 0===o&&0===u?0:Math.abs((u-o)/o)},n.flatten=function(t){for(var e=t[0][0].length,r={vertices:[],holes:[],dimensions:e},n=0,i=0;i<t.length;i++){for(var s=0;s<t[i].length;s++)for(var o=0;o<e;o++)r.vertices.push(t[i][s][o]);i>0&&(n+=t[i-1].length,r.holes.push(n))}return r}},32488(t,e,r){r.d(e,{A:()=>T});const n=[["(",")"],[")","("],["<",">"],[">","<"],["[","]"],["]","["],["{","}"],["}","{"],["«","»"],["»","«"],["‹","›"],["›","‹"],["⁽","⁾"],["⁾","⁽"],["₍","₎"],["₎","₍"],["≤","≥"],["≥","≤"],["〈","〉"],["〉","〈"],["﹙","﹚"],["﹚","﹙"],["﹛","﹜"],["﹜","﹛"],["﹝","﹞"],["﹞","﹝"],["﹤","﹥"],["﹥","﹤"]],i=["آ","أ","إ","ا"],s=["ﻵ","ﻷ","ﻹ","ﻻ"],o=["ﻶ","ﻸ","ﻺ","ﻼ"],a=["ا","ب","ت","ث","ج","ح","خ","د","ذ","ر","ز","س","ش","ص","ض","ط","ظ","ع","غ","ف","ق","ك","ل","م","ن","ه","و","ي","إ","أ","آ","ة","ى","ل","م","ن","ه","و","ي","إ","أ","آ","ة","ى","ی","ئ","ؤ"],l=["ﺍ","ﺏ","ﺕ","ﺙ","ﺝ","ﺡ","ﺥ","ﺩ","ﺫ","ﺭ","ﺯ","ﺱ","ﺵ","ﺹ","ﺽ","ﻁ","ﻅ","ﻉ","ﻍ","ﻑ","ﻕ","ﻙ","ﻝ","ﻡ","ﻥ","ﻩ","ﻭ","ﻱ","ﺇ","ﺃ","ﺁ","ﺓ","ﻯ","ﯼ","ﺉ","ﺅ","ﹰ","ﹲ","ﹴ","ﹶ","ﹸ","ﹺ","ﹼ","ﹾ","ﺀ","ﺉ","ﺅ"],h=["ﺎ","ﺐ","ﺖ","ﺚ","ﺞ","ﺢ","ﺦ","ﺪ","ﺬ","ﺮ","ﺰ","ﺲ","ﺶ","ﺺ","ﺾ","ﻂ","ﻆ","ﻊ","ﻎ","ﻒ","ﻖ","ﻚ","ﻞ","ﻢ","ﻦ","ﻪ","ﻮ","ﻲ","ﺈ","ﺄ","ﺂ","ﺔ","ﻰ","ﯽ","ﺊ","ﺆ","ﹰ","ﹲ","ﹴ","ﹶ","ﹸ","ﹺ","ﹼ","ﹾ","ﺀ","ﺊ","ﺆ"],c=["ﺎ","ﺒ","ﺘ","ﺜ","ﺠ","ﺤ","ﺨ","ﺪ","ﺬ","ﺮ","ﺰ","ﺴ","ﺸ","ﺼ","ﻀ","ﻄ","ﻈ","ﻌ","ﻐ","ﻔ","ﻘ","ﻜ","ﻠ","ﻤ","ﻨ","ﻬ","ﻮ","ﻴ","ﺈ","ﺄ","ﺂ","ﺔ","ﻰ","ﯿ","ﺌ","ﺆ","ﹱ","ﹲ","ﹴ","ﹷ","ﹹ","ﹻ","ﹽ","ﹿ","ﺀ","ﺌ","ﺆ"],u=["ﺍ","ﺑ","ﺗ","ﺛ","ﺟ","ﺣ","ﺧ","ﺩ","ﺫ","ﺭ","ﺯ","ﺳ","ﺷ","ﺻ","ﺿ","ﻃ","ﻇ","ﻋ","ﻏ","ﻓ","ﻗ","ﻛ","ﻟ","ﻣ","ﻧ","ﻫ","ﻭ","ﻳ","ﺇ","ﺃ","ﺁ","ﺓ","ﻯ","ﯾ","ﺋ","ﺅ","ﹰ","ﹲ","ﹴ","ﹶ","ﹸ","ﹺ","ﹼ","ﹾ","ﺀ","ﺋ","ﺅ"],f=["ء","آ","أ","ؤ","إ","ا","ة","د","ذ","ر","ز","و","ى"],x=["ً","ً","ٌ","؟","ٍ","؟","َ","َ","ُ","ُ","ِ","ِ","ّ","ّ","ْ","ْ","ء","آ","آ","أ","أ","ؤ","ؤ","إ","إ","ئ","ئ","ئ","ئ","ا","ا","ب","ب","ب","ب","ة","ة","ت","ت","ت","ت","ث","ث","ث","ث","ج","ج","ج","ج","ح","ح","ح","ح","خ","خ","خ","خ","د","د","ذ","ذ","ر","ر","ز","ز","س","س","س","س","ش","ش","ش","ش","ص","ص","ص","ص","ض","ض","ض","ض","ط","ط","ط","ط","ظ","ظ","ظ","ظ","ع","ع","ع","ع","غ","غ","غ","غ","ف","ف","ف","ف","ق","ق","ق","ق","ك","ك","ك","ك","ل","ل","ل","ل","م","م","م","م","ن","ن","ن","ن","ه","ه","ه","ه","و","و","ى","ى","ي","ي","ي","ي","ﻵ","ﻶ","ﻷ","ﻸ","ﻹ","ﻺ","ﻻ","ﻼ","؟","؟","؟"],y=["ء","ف"],d=["غ","ي"],p=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],g=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],_=10,m=11,b=12,w=18,I=["UBAT_L","UBAT_R","UBAT_EN","UBAT_AN","UBAT_ON","UBAT_B","UBAT_S","UBAT_AL","UBAT_WS","UBAT_CS","UBAT_ES","UBAT_ET","UBAT_NSM","UBAT_LRE","UBAT_RLE","UBAT_PDF","UBAT_LRO","UBAT_RLO","UBAT_BN"],v=[100,0,0,0,0,101,102,103,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,104,4,4,4,0,4,0,4,0,4,4,4,0,0,4,4,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,4,4,0,0,4,4,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,105,7,7,106,107],A=[[w,w,w,w,w,w,w,w,w,6,5,6,8,5,w,w,w,w,w,w,w,w,w,w,w,w,w,w,5,5,5,6,8,4,4,m,m,m,4,4,4,4,4,_,9,_,9,9,2,2,2,2,2,2,2,2,2,2,9,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,w,w,w,w,w,w,5,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,9,4,m,m,m,m,4,4,4,4,0,4,4,w,4,4,m,m,2,2,4,0,4,4,4,2,0,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,4,4,4,4,4,4,4,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,1,b,1,b,b,1,b,b,1,b,4,4,4,4,4,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,4,4,4,4,1,1,1,1,1,4,4,4,4,4,4,4,4,4,4,4],[3,3,3,3,4,4,4,4,7,m,m,7,9,7,4,4,b,b,b,b,b,b,b,b,b,b,b,7,4,4,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,3,3,3,3,3,3,3,3,3,3,m,3,3,7,7,7,b,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,b,b,b,b,b,b,b,3,4,b,b,b,b,b,b,7,7,b,b,4,b,b,b,b,7,7,2,2,2,2,2,2,2,2,2,2,7,7,7,7,7,7],[7,7,7,7,7,7,7,7,7,7,7,7,7,7,4,7,7,b,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,4,4,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,b,b,b,b,b,b,b,b,b,b,b,7,4,4,4,4,4,4,4,4,4,4,4,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,b,b,b,b,b,b,b,b,b,1,1,4,4,4,4,1,4,4,4,4,4],[8,8,8,8,8,8,8,8,8,8,8,w,w,w,0,1,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,8,5,13,14,15,16,17,9,m,m,m,m,m,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,9,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,8,w,w,w,w,w,4,4,4,4,4,w,w,w,w,w,w,2,0,4,4,2,2,2,2,2,2,_,_,4,4,4,0,2,2,2,2,2,2,2,2,2,2,_,_,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4],[0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,4,4,4,4,4,1,b,1,1,1,1,1,1,1,1,1,1,_,1,1,1,1,1,1,1,1,1,1,1,1,1,4,1,1,1,1,1,4,1,4,1,1,4,1,1,4,1,1,1,1,1,1,1,1,1,1,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7],[b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,b,b,b,b,b,b,b,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,9,4,9,4,4,9,4,4,4,4,4,4,4,4,4,m,4,4,_,_,4,4,4,4,4,m,m,4,4,4,4,4,7,7,7,7,7,4,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,4,4,w],[4,4,4,m,m,m,4,4,4,4,4,_,9,_,9,9,2,2,2,2,2,2,2,2,2,2,9,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,0,0,0,0,0,0,4,4,0,0,0,0,0,0,4,4,0,0,0,0,0,0,4,4,0,0,0,4,4,4,m,m,4,4,4,m,m,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4]];class T{constructor(){this.inputFormat="ILYNN",this.outputFormat="VLNNN",this.sourceToTarget=[],this.targetToSource=[],this.levels=[]}bidiTransform(t,e,r){if(this.sourceToTarget=[],this.targetToSource=[],!t)return"";if(function(t,e,r){H=[],Y=[];for(let n=0;n<r;n++)t[n]=n,e[n]=n,H[n]=n}(this.sourceToTarget,this.targetToSource,t.length),!this.checkParameters(e,r))return t;e=this.inputFormat,r=this.outputFormat;let n=t;const a=J,c=j(e.charAt(1)),f=j(r.charAt(1)),y=(e.startsWith("I")?"L":e.charAt(0))+c,d=(r.startsWith("I")?"L":r.charAt(0))+f,p=e.charAt(2)+r.charAt(2);a.defInFormat=y,a.defOutFormat=d,a.defSwap=p;const g=M(t,y,d,p,a);let _=!1;return"R"===r.charAt(1)?_=!0:"C"!==r.charAt(1)&&"D"!==r.charAt(1)||(_="rtl"===this.checkContextual(g)),this.sourceToTarget=H,this.targetToSource=function(t){const e=new Array(t.length);for(let r=0;r<t.length;r++)e[t[r]]=r;return e}(this.sourceToTarget),K=this.targetToSource,n=e.charAt(3)===r.charAt(3)?g:"S"===r.charAt(3)?function(t,e){if(0===e.length)return"";void 0===t&&(t=!0);const r=(e=String(e)).split("");let n=0,i=1,a=r.length;t||(n=r.length-1,i=-1,a=1);const c=function(t,e,r,n){let i=0;const a=[];let c=0;for(let f=e;f*r<n;f+=r)if(R(t[f])||G(t[f])){if("ل"===t[f]&&D(t,f+r,r,n)){t[f]=Z(t[f+r],0===i?s:o),f+=r,W(t,f,r,n),a[c]=f,c++,i=0;continue}const e=t[f];1===i?t[f]=E(t,f+r,r,n)?z(t[f]):O(t[f],h):!0===E(t,f+r,r,n)?t[f]=O(t[f],u):t[f]=O(t[f],l),G(e)||(i=1),!0===N(e)&&(i=0)}else i=0;return a}(r,n,i,a);let f="";for(let e=0;e<r.length;e++)S(c,c.length,e)>-1?(q(K,e,!t,-1),H.splice(e,1)):f+=r[e];return f}(_,g):function(t,e){if(0===t.length)return"";void 0===e&&(e=!0);let r="";const n=(t=String(t)).split("");for(let s=0;s<t.length;s++){let o=!1;if(n[s]>="ﹰ"&&n[s]<"\ufeff"){const a=t.charCodeAt(s);n[s]>="ﻵ"&&n[s]<="ﻼ"?(e?(s>0&&" "===n[s-1]?r=r.slice(0,-1)+"ل":(r+="ل",o=!0),r+=i[(a-65269)/2]):(r+=i[(a-65269)/2],r+="ل",s+1<t.length&&" "===n[s+1]?s++:o=!0),o&&(q(K,s,!0,1),H.splice(s,0,H[s]))):r+=x[a-65136]}else r+=n[s]}return r}(g,_),this.sourceToTarget=H,this.targetToSource=K,this.levels=Y,n}_inputFormatSetter(t){if(!et.test(t))throw new Error("dojox/string/BidiEngine: the bidi layout string is wrong!");this.inputFormat=t}_outputFormatSetter(t){if(!et.test(t))throw new Error("dojox/string/BidiEngine: the bidi layout string is wrong!");this.outputFormat=t}checkParameters(t,e){return t?this._inputFormatSetter(t):t=this.inputFormat,e?this._outputFormatSetter(e):e=this.outputFormat,t!==e}checkContextual(t){let e=L(t);if("ltr"!==e&&"rtl"!==e){try{e=document.dir.toLowerCase()}catch(t){}"ltr"!==e&&"rtl"!==e&&(e="ltr")}return e}hasBidiChar(t){return rt.test(t)}}function M(t,e,r,n,i){const s=function(t,e,r){if(void 0===e.inFormat&&(e.inFormat=r.defInFormat),void 0===e.outFormat&&(e.outFormat=r.defOutFormat),void 0===e.swap&&(e.swap=r.defSwap),e.inFormat===e.outFormat)return e;const n=e.inFormat.slice(0,1),i=e.outFormat.slice(0,1);let s,o=e.inFormat.slice(1,4),a=e.outFormat.slice(1,4);return o.startsWith("C")&&(s=L(t),o="ltr"===s||"rtl"===s?s.toUpperCase():"L"===e.inFormat.charAt(2)?"LTR":"RTL",e.inFormat=n+o),a.startsWith("C")&&(s=L(t),"rtl"===s?a="RTL":"ltr"===s?(s=function(t){const e=t.split("");return e.reverse(),L(e.join(""))}(t),a=s.toUpperCase()):a="L"===e.outFormat.charAt(2)?"LTR":"RTL",e.outFormat=i+a),e}(t,{inFormat:e,outFormat:r,swap:n},i);if(s.inFormat===s.outFormat)return t;e=s.inFormat,r=s.outFormat,n=s.swap;const o=e.slice(0,1),a=e.slice(1,4),l=r.slice(0,1),h=r.slice(1,4);if(i.inFormat=e,i.outFormat=r,i.swap=n,"L"===o&&"VLTR"===r){if("LTR"===a)return i.dir=X,B(t,i);if("RTL"===a)return i.dir=tt,B(t,i)}if("V"===o&&"V"===l)return i.dir="RTL"===a?tt:X,V(t,i);if("L"===o&&"VRTL"===r)return"LTR"===a?(i.dir=X,t=B(t,i)):(i.dir=tt,t=B(t,i)),V(t);if("VLTR"===e&&"LLTR"===r)return i.dir=X,B(t,i);if("V"===o&&"L"===l&&a!==h)return t=V(t),"RTL"===a?M(t,"LLTR","VLTR",n,i):M(t,"LRTL","VRTL",n,i);if("VRTL"===e&&"LRTL"===r)return M(t,"LRTL","VRTL",n,i);if("L"===o&&"L"===l){const e=i.swap;return i.swap=e.slice(0,1)+"N","RTL"===a?(i.dir=tt,t=B(t,i),i.swap="N"+e.slice(1,3),i.dir=X,t=B(t,i)):(i.dir=X,t=B(t,i),i.swap="N"+e.slice(1,3),t=M(t,"VLTR","LRTL",i.swap,i)),t}return t}function L(t){const e=/[A-Za-z\u05d0-\u065f\u066a-\u06ef\u06fa-\u07ff\ufb1d-\ufdff\ufe70-\ufefc]/.exec(t);return e?e[0]<="z"?"ltr":"rtl":""}function B(t,e){const r=t.split(""),n=[];return P(r,n,e),function(t,e,r){if(0!==r.hiLevel&&r.swap[0]!==r.swap[1])for(let r=0;r<t.length;r++)1===e[r]&&(t[r]=F(t[r]))}(r,n,e),C(2,r,n,e),C(1,r,n,e),Y=n,r.join("")}function P(t,e,r){const n=t.length,i=r.dir?g:p;let s=0,o=-1;const a=[],l=[];r.hiLevel=r.dir,r.lastArabic=!1,r.hasUbatAl=!1,r.hasUbatB=!1,r.hasUbatS=!1;for(let e=0;e<n;e++)a[e]=k(t[e]);for(let h=0;h<n;h++){const n=s,c=U(t,a,l,h,r);l[h]=c,s=i[n][c];const u=240&s;s&=15;const f=i[s][Q];if(e[h]=f,u>0)if(16===u){for(let t=o;t<h;t++)e[t]=1;o=-1}else o=-1;if(i[s][$])-1===o&&(o=h);else if(o>-1){for(let t=o;t<h;t++)e[t]=f;o=-1}5===a[h]&&(e[h]=0),r.hiLevel|=f}r.hasUbatS&&function(t,e,r,n){for(let i=0;i<r;i++)if(6===t[i]){e[i]=n.dir;for(let r=i-1;r>=0&&8===t[r];r--)e[r]=n.dir}}(a,e,n,r)}function k(t){const e=t.charCodeAt(0),r=v[e>>8];return r<100?r:A[r-100][255&e]}function V(t,e){const r=t.split("");if(e){const t=[];P(r,t,e),Y=t}return r.reverse(),H.reverse(),r.join("")}function S(t,e,r){for(let n=0;n<e;n++)if(t[n]===r)return n;return-1}function R(t){for(let e=0;e<y.length;e++)if(t>=y[e]&&t<=d[e])return!0;return!1}function E(t,e,r,n){for(;e*r<n&&G(t[e]);)e+=r;return!!(e*r<n&&R(t[e]))}function D(t,e,r,n){for(;e*r<n&&G(t[e]);)e+=r;let s=" ";if(!(e*r<n))return!1;s=t[e];for(let t=0;t<i.length;t++)if(i[t]===s)return!0;return!1}function C(t,e,r,n){if(n.hiLevel<t)return;if(1===t&&n.dir===tt&&!n.hasUbatB)return e.reverse(),void H.reverse();const i=e.length;let s,o,a,l,h,c=0;for(;c<i;){if(r[c]>=t){for(s=c+1;s<i&&r[s]>=t;)s++;for(o=c,a=s-1;o<a;o++,a--)l=e[o],e[o]=e[a],e[a]=l,h=H[o],H[o]=H[a],H[a]=h;c=s}c++}}function U(t,e,r,n,i){const s=e[n];return{UBAT_L:()=>(i.lastArabic=!1,0),UBAT_R:()=>(i.lastArabic=!1,1),UBAT_ON:()=>4,UBAT_AN:()=>3,UBAT_EN:()=>i.lastArabic?3:2,UBAT_AL:()=>(i.lastArabic=!0,i.hasUbatAl=!0,1),UBAT_WS:()=>4,UBAT_CS:()=>{let t,s;return n<1||n+1>=e.length||2!==(t=r[n-1])&&3!==t||2!==(s=e[n+1])&&3!==s?4:(i.lastArabic&&(s=3),s===t?s:4)},UBAT_ES:()=>2===(n>0?r[n-1]:5)&&n+1<e.length&&2===e[n+1]?2:4,UBAT_ET:()=>{if(n>0&&2===r[n-1])return 2;if(i.lastArabic)return 4;let t=n+1;const s=e.length;for(;t<s&&e[t]===m;)t++;return t<s&&2===e[t]?2:4},UBAT_NSM:()=>{if("VLTR"===i.inFormat){const r=e.length;let i=n+1;for(;i<r&&e[i]===b;)i++;if(i<r){const r=t[n].charCodeAt(0),s=r>=1425&&r<=2303||64286===r,o=e[i];if(s&&(1===o||7===o))return 1}}return n<1||5===e[n-1]?4:r[n-1]},UBAT_B:()=>(i.lastArabic=!0,i.hasUbatB=!0,i.dir),UBAT_S:()=>(i.hasUbatS=!0,4),UBAT_LRE:()=>(i.lastArabic=!1,4),UBAT_RLE:()=>(i.lastArabic=!1,4),UBAT_LRO:()=>(i.lastArabic=!1,4),UBAT_RLO:()=>(i.lastArabic=!1,4),UBAT_PDF:()=>(i.lastArabic=!1,4),UBAT_BN:()=>4}[I[s]]()}function F(t){let e,r=0,i=n.length-1;for(;r<=i;)if(e=Math.floor((r+i)/2),t<n[e][0])i=e-1;else{if(!(t>n[e][0]))return n[e][1];r=e+1}return t}function N(t){for(let e=0;e<f.length;e++)if(f[e]===t)return!0;return!1}function z(t){for(let e=0;e<a.length;e++)if(t===a[e])return c[e];return t}function O(t,e){for(let r=0;r<a.length;r++)if(t===a[r])return e[r];return t}function G(t){return t>="ً"&&t<="ٕ"}function j(t){return"L"===t?"LTR":"R"===t?"RTL":"C"===t?"CLR":"D"===t?"CRL":""}function W(t,e,r,n){for(;e*r<n&&G(t[e]);)e+=r;return e*r<n&&(t[e]=" ",!0)}function Z(t,e){for(let r=0;r<i.length;r++)if(t===i[r])return e[r];return t}function q(t,e,r,n){for(let i=0;i<t.length;i++)(t[i]>e||!r&&t[i]===e)&&(t[i]+=n)}let H=[],K=[],Y=[];const J={dir:0,defInFormat:"LLTR",defSwap:"YN",inFormat:"LLTR",outFormat:"VLTR",swap:"YN",hiLevel:0,lastArabic:!1,hasUbatAl:!1,defOutFormat:""},Q=5,$=6,X=0,tt=1,et=/^[(I|V)][(L|RCD)][(Y|N)][(S|N)]N$/,rt=/[\u0591-\u06ff\ufb1d-\ufefc]/},34304(t,e,r){r.d(e,{DF:()=>l,FD:()=>i,Ov:()=>s,ct:()=>h});let n=1e-6;function i(){return n}const s=Math.random,o=Math.PI/180,a=180/Math.PI;function l(t){return t*o}function h(t){return t*a}Object.freeze(Object.defineProperty({__proto__:null,RANDOM:s,equals:function(t,e){return Math.abs(t-e)<=n*Math.max(1,Math.abs(t),Math.abs(e))},getEpsilon:i,setEpsilon:function(t){n=t},toDegree:h,toRadian:l},Symbol.toStringTag,{value:"Module"}))},69397(t,e,r){r.d(e,{Qf:()=>l,Qh:()=>o,RS:()=>i,Ul:()=>x,i5:()=>f,lM:()=>s,qK:()=>c});var n=r(34275);const i=16;function s(t){if(!t)return 0;let e=c;for(const r in t)t.hasOwnProperty(r)&&(e+=a(t[r],!1));return e}function o(t){if(!t)return 0;if("number"==typeof t[0])return l(t);if(Array.isArray(t))return function(t){const e=t.length;if(0===e||"number"==typeof t[0])return h(t,8);let r=u;for(let n=0;n<e;n++)r+=a(t[n]);return r}(t);let e=c;for(const r in t)t.hasOwnProperty(r)&&(e+=a(t[r]));return e}function a(t,e=!0){switch(typeof t){case"object":return e?o(t):c;case"string":return function(t){return 32+t.length}(t);case"number":return i;case"boolean":return 4;default:return 8}}function l(...t){return t.reduce((t,e)=>t+(e?(0,n.iu)(e)?e.byteLength+f:Array.isArray(e)?h(e,i):0:0),0)}function h(t,e){return u+t.length*e}const c=32,u=16,f=145,x=64},51624(t,e,r){r.d(e,{A:()=>h});var n=r(44208),i=r(69397),s=r(93687);const o=4294967296,a=new TextDecoder("utf-8"),l=(0,n.A)("safari")||(0,n.A)("ios")?6:(0,n.A)("ff")?12:32;class h{constructor(t,e,r=0,n=t?.byteLength??0){this._tag=0,this._dataType=99,this._init(t,e,r,n)}[Symbol.dispose](){this.release()}_init(t,e,r,n){this._data=t,this._dataView=e,this._pos=r,this._end=n}get usedMemory(){return 64+(0,i.Qf)(this._data)}asUnsafe(){return this}clone(){return new h(this._data,this._dataView,this._pos,this._end)}clonePooled(){return h.constructPooled(this._data,this._dataView,this._pos,this._end)}static constructPooled(t,e,r=0,n=t?.byteLength??0){const i=h.pool.acquire();return i._init(t,e,r,n),i}pos(){return this._pos}move(t){this._pos=t}nextTag(t){for(;;){if(this._pos===this._end)return!1;const e=this._decodeVarint();if(this._tag=e>>3,this._dataType=7&e,!t||t===this._tag)break;this.skip()}return!0}next(){if(this._pos===this._end)return!1;const t=this._decodeVarint();return this._tag=t>>3,this._dataType=7&t,!0}empty(){return this._pos>=this._end}tag(){return this._tag}getInt32(){return this._decodeVarint()}getInt64(){return this._decodeVarint()}getUInt32(){let t=4294967295;if(t=(127&this._data[this._pos])>>>0,this._data[this._pos++]<128)return t;if(t=(t|(127&this._data[this._pos])<<7)>>>0,this._data[this._pos++]<128)return t;if(t=(t|(127&this._data[this._pos])<<14)>>>0,this._data[this._pos++]<128)return t;if(t=(t|(127&this._data[this._pos])<<21)>>>0,this._data[this._pos++]<128)return t;if(t=(t|(15&this._data[this._pos])<<28)>>>0,this._data[this._pos++]<128)return t;throw new Error("Varint overflow")}getPackedEnd(){const t=this.getUInt32();return this._pos+t}getUInt64(){return this._decodeVarint()}getSInt32(){const t=this.getUInt32();return t>>>1^-(1&t)}getSInt64(){return this._decodeSVarint()}getBool(){const t=0!==this._data[this._pos];return this._skip(1),t}getEnum(){return this._decodeVarint()}getFixed64(){const t=this._dataView,e=this._pos,r=t.getUint32(e,!0)+t.getUint32(e+4,!0)*o;return this._skip(8),r}getSFixed64(){const t=this._dataView,e=this._pos,r=t.getUint32(e,!0)+t.getInt32(e+4,!0)*o;return this._skip(8),r}getDouble(){const t=this._dataView.getFloat64(this._pos,!0);return this._skip(8),t}getFixed32(){const t=this._dataView.getUint32(this._pos,!0);return this._skip(4),t}getSFixed32(){const t=this._dataView.getInt32(this._pos,!0);return this._skip(4),t}getFloat(){const t=this._dataView.getFloat32(this._pos,!0);return this._skip(4),t}getString(){const t=this._getLength(),e=this._pos,r=this._toString(this._data,e,e+t);return this._skip(t),r}getBytes(){const t=this._getLength(),e=this._pos,r=this._toBytes(this._data,e,e+t);return this._skip(t),r}getLength(){return this._getLengthUnsafe()}processMessageWithArgs(t,e,r,n){const i=this.getMessage(),s=t(i,e,r,n);return i.release(),s}processMessage(t){const e=this.getMessage(),r=t(e);return e.release(),r}getMessage(){const t=this._getLength(),e=h.pool.acquire();return e._init(this._data,this._dataView,this._pos,this._pos+t),this._skip(t),e}release(){h.pool.release(this)}dataType(){return this._dataType}skip(){switch(this._dataType){case 0:this._decodeVarint();break;case 1:this._skip(8);break;case 2:this._skip(this._getLength());break;case 5:this._skip(4);break;default:throw new Error("Invalid data type!")}}skipToEnd(){for(;this.next();)this.skip()}skipLen(t){this._skip(t)}_skip(t){if(this._pos+t>this._end)throw new Error("Attempt to skip past the end of buffer!");this._pos+=t}_decodeVarint(){const t=this._data;let e=this._pos,r=0,n=0;if(this._end-e>=10)do{if(n=t[e++],r|=127&n,!(128&n))break;if(n=t[e++],r|=(127&n)<<7,!(128&n))break;if(n=t[e++],r|=(127&n)<<14,!(128&n))break;if(n=t[e++],r|=(127&n)<<21,!(128&n))break;if(n=t[e++],r+=268435456*(127&n),!(128&n))break;if(n=t[e++],r+=34359738368*(127&n),!(128&n))break;if(n=t[e++],r+=4398046511104*(127&n),!(128&n))break;if(n=t[e++],r+=562949953421312*(127&n),!(128&n))break;if(n=t[e++],r+=72057594037927940*(127&n),!(128&n))break;if(n=t[e++],r+=0x8000000000000000*(127&n),!(128&n))break;throw new Error("Varint too long!")}while(0);else{let i=1;for(;e!==this._end&&(n=t[e],128&n);)++e,r+=(127&n)*i,i*=128;if(e===this._end)throw new Error("Varint overrun!");++e,r+=n*i}return this._pos=e,r}_decodeSVarint(){const t=this._data;let e,r=0,n=0;const i=1&t[this._pos];if(n=t[this._pos++],r|=127&n,!(128&n))return i?-(r+1)/2:r/2;if(n=t[this._pos++],r|=(127&n)<<7,!(128&n))return i?-(r+1)/2:r/2;if(n=t[this._pos++],r|=(127&n)<<14,!(128&n))return i?-(r+1)/2:r/2;if(n=t[this._pos++],r|=(127&n)<<21,!(128&n))return i?-(r+1)/2:r/2;if(n=t[this._pos++],r+=268435456*(127&n),!(128&n))return i?-(r+1)/2:r/2;if(n=t[this._pos++],r+=34359738368*(127&n),!(128&n))return i?-(r+1)/2:r/2;if(n=t[this._pos++],r+=4398046511104*(127&n),!(128&n))return i?-(r+1)/2:r/2;if(e=BigInt(r),n=t[this._pos++],e+=0x2000000000000n*BigInt(127&n),!(128&n))return Number(i?-(e+1n)/2n:e/2n);if(n=t[this._pos++],e+=0x100000000000000n*BigInt(127&n),!(128&n))return Number(i?-(e+1n)/2n:e/2n);if(n=t[this._pos++],e+=0x8000000000000000n*BigInt(127&n),!(128&n))return Number(i?-(e+1n)/2n:e/2n);throw new Error("Varint too long!")}_getLength(){if(2!==this._dataType)throw new Error("Not a delimited data type!");return this._decodeVarint()}_getLengthUnsafe(){return this.getUInt32()}_toString(t,e,r){if((r=Math.min(this._end,r))-e>l){const n=t.subarray(e,r);return a.decode(n)}let n="",i="";for(let s=e;s<r;++s){const e=t[s];128&e?i+="%"+e.toString(16):(n+=decodeURIComponent(i)+String.fromCharCode(e),i="")}return i.length&&(n+=decodeURIComponent(i)),n}_toBytes(t,e,r){return r=Math.min(this._end,r),new Uint8Array(t.buffer,e,r-e)}static{this.pool=new s.A(()=>new h(null,null),void 0,t=>{t._data=null,t._dataView=null})}}},15585(t,e,r){r.d(e,{If:()=>x,O5:()=>g,O9:()=>d,QT:()=>p,l3:()=>y});var n=r(5482),i=r(2741),s=r(49186),o=r(44208),a=r(34727);let l=null,h=null,c=null,u=null;const f=(new Float32Array(0),new Uint32Array(0),new Uint32Array(0),new Uint32Array(0),{vertices:new Float64Array(0),indices:new Uint32Array(0),outlineIndices:new Uint32Array(0),outlineRingLengths:new Uint32Array(0),vertexCount:0,indexCount:0,outlineIndexCount:0,outlineRingCount:0});async function x(){return l??=async function(){const t=await r.e(2997).then(r.bind(r,42997)),e=await t.default({locateFile:t=>(0,i.s)(`esri/core/libs/libtess/${t}`)});c=e}(),l}async function y(){return h??=async function(){const t=await r.e(9134).then(r.bind(r,99134)),e=await t.default({locateFile:t=>(0,i.s)(`esri/core/libs/libtess/${t}`)});u=e}(),h}function d(){return null!==u}function p(t,e,r=2){const i={stack:[],error:void 0,hasError:!1};try{const a=c;if(!a)throw new s.A("libtess:not-loaded","libtessF32 not loaded");const l=(0,n.mS)(i,w.from(a,t),!1),h=(0,n.mS)(i,v.from(a,e),!1),u=t.length/r*4,f=(0,n.mS)(i,new w(a,u*r),!1),x=a.triangulate(l.ptr,h.ptr,h.size,r,f.ptr,u);if((0,o.A)("esri-tessellation-debug")){const t=a.getError();0!==t&&console.warn("libtess:triangulation",A(t))}return{buffer:f.slice(0,x*r),vertexCount:x}}catch(t){i.error=t,i.hasError=!0}finally{(0,n.hk)(i)}}function g(t,e,r=2,i=!0){const l={stack:[],error:void 0,hasError:!1};try{const h=u;if(!h)throw new s.A("libtess:not-loaded","libtessF64 not loaded");const c=(0,n.mS)(l,I.from(h,t),!1),x=(0,n.mS)(l,v.from(h,e),!1),y=(0,n.mS)(l,new v(h,1),!1),d=(0,n.mS)(l,new v(h,1),!1),p=(0,n.mS)(l,new v(h,1),!1),g=(0,n.mS)(l,new v(h,1),!1),{maxVertexCount:_,maxIndexCount:m,maxOutlineIndexCount:w,maxOutlineRingCount:T}=function(t,e){const r=t.reduce((t,e)=>t+e,0),n=t.length,i=Math.max(0,t.length-1),s=Math.max(0,r+2*i-2),o=Math.max(0,Math.ceil(2*r)),l=Math.max(0,Math.ceil(3*s*2)),h=(0,a.mP)(l,3),c=r>0?Math.max(2,Math.ceil(.25*r)):0,u=r>0?Math.max(1,Math.ceil(c/3)):0;return{maxVertexCount:o,maxIndexCount:h,maxOutlineIndexCount:e?Math.max(0,r+n+c):0,maxOutlineRingCount:e?Math.max(0,n+u):0}}(e,i);let M=0,L=0,B=0,P=0,k=0;{const t={stack:[],error:void 0,hasError:!1};try{const e=(0,n.mS)(t,new I(h,_*r),!1),s=(0,n.mS)(t,new v(h,m),!1),o=(0,n.mS)(t,i?new v(h,w):null,!1),a=(0,n.mS)(t,i?new v(h,T):null,!1);if(h.triangulateIndexed(c.ptr,x.ptr,x.size,r,e.ptr,_,r,s.ptr,m,y.ptr,d.ptr,o?.ptr??0,w,a?.ptr??0,T,p.ptr,g.ptr),k=h.getError(),M=b(h)[y.ptr/Int32Array.BYTES_PER_ELEMENT],L=b(h)[d.ptr/Int32Array.BYTES_PER_ELEMENT],B=b(h)[p.ptr/Int32Array.BYTES_PER_ELEMENT],P=b(h)[g.ptr/Int32Array.BYTES_PER_ELEMENT],0===k){const t=e.slice(0,M*r);return{vertices:t,indices:s.slice(0,L),outlineIndices:i&&o?o.slice(0,B):f.outlineIndices,outlineRingLengths:i&&a?a.slice(0,P):f.outlineRingLengths,vertexCount:M,indexCount:L,outlineIndexCount:i?B:0,outlineRingCount:i?P:0}}}catch(e){t.error=e,t.hasError=!0}finally{(0,n.hk)(t)}}if(100903!==k)return(0,o.A)("esri-tessellation-debug")&&console.warn("libtess:triangulation",A(k)),f;const V=(0,n.mS)(l,new I(h,M*r),!1),S=(0,n.mS)(l,new v(h,L),!1),R=(0,n.mS)(l,i?new v(h,B):null,!1),E=(0,n.mS)(l,i?new v(h,P):null,!1);if(h.triangulateIndexed(c.ptr,x.ptr,x.size,r,V.ptr,M,r,S.ptr,L,y.ptr,d.ptr,R?.ptr??0,i?B:0,E?.ptr??0,i?P:0,p.ptr,g.ptr),k=h.getError(),0!==k)return(0,o.A)("esri-tessellation-debug")&&console.warn("libtess:triangulation",A(k)),f;const D=b(h)[y.ptr/Int32Array.BYTES_PER_ELEMENT],C=b(h)[d.ptr/Int32Array.BYTES_PER_ELEMENT],U=b(h)[p.ptr/Int32Array.BYTES_PER_ELEMENT],F=b(h)[g.ptr/Int32Array.BYTES_PER_ELEMENT],N=V.slice(0,D*r);return{vertices:N,indices:S.slice(0,C),outlineIndices:i&&R?R.slice(0,U):f.outlineIndices,outlineRingLengths:i&&E?E.slice(0,F):f.outlineRingLengths,vertexCount:D,indexCount:C,outlineIndexCount:i?U:0,outlineRingCount:i?F:0}}catch(t){l.error=t,l.hasError=!0}finally{(0,n.hk)(l)}}function _(t){return t.HEAPF64}function m(t){return t.HEAPF32}function b(t){return t.HEAP32}class w{static from(t,e){const r=new w(t,e.length);return r.set(e),r}constructor(t,e){this._libtess=t,this.size=e,this.ptr=t.allocateCoordinateArray(e)}destroy(){this._libtess.destroyCoordinateArray(this.ptr)}[Symbol.dispose](){this.destroy()}get bytesPerCoordinate(){return Float32Array.BYTES_PER_ELEMENT}set(t){m(this._libtess).set(t,this.ptr/this.bytesPerCoordinate)}slice(t,e){const r=this.ptr/this.bytesPerCoordinate;return m(this._libtess).slice(r+t,r+e)}}class I{static from(t,e){const r=new I(t,e.length);return r.set(e),r}constructor(t,e){this._libtess=t,this.size=e,this.ptr=t.allocateCoordinateArray(e)}destroy(){this._libtess.destroyCoordinateArray(this.ptr)}[Symbol.dispose](){this.destroy()}get bytesPerCoordinate(){return Float64Array.BYTES_PER_ELEMENT}set(t){_(this._libtess).set(t,this.ptr/this.bytesPerCoordinate)}slice(t,e){const r=this.ptr/this.bytesPerCoordinate;return _(this._libtess).slice(r+t,r+e)}}class v{static from(t,e){const r=new v(t,e.length);return r.set(e),r}constructor(t,e){this._libtess=t,this.size=e,this.ptr=t.allocateLengthsArray(e)}destroy(){this._libtess.destroyLengthsArray(this.ptr)}[Symbol.dispose](){this.destroy()}get bytesPerCoordinate(){return Int32Array.BYTES_PER_ELEMENT}set(t){b(this._libtess).set(t,this.ptr/this.bytesPerCoordinate)}slice(t,e){const r=this.ptr/this.bytesPerCoordinate;return function(t){const e=b(t);return new Uint32Array(e.buffer,e.byteOffset,e.length)}(this._libtess).slice(r+t,r+e)}}function A(t){switch(t){case 100903:return"Insufficient output buffer";case 100902:return"Out of memory";case 100151:return"Missing begin polygon";case 100152:return"Missing begin contour";case 100153:return"Missing end polygon";case 100154:return"Missing end countour";case 100155:return"Coordinates too large";case 100156:return"Missing combine callback";default:return`Unknown: ${t}`}}},95108(t,e,r){r.d(e,{$3:()=>h,Ng:()=>o,R3:()=>i,Yl:()=>l,gR:()=>s,m3:()=>u,t9:()=>a});var n=r(4576);function i(t,e){const r=e[0]-t[0],n=e[1]-t[1];if(t.length>2&&e.length>2){const i=t[2]-e[2];return Math.sqrt(r*r+n*n+i*i)}return Math.sqrt(r*r+n*n)}function s(t,e,r,n){const[i,s]=e,[o,a]=r,[l,h]=n,c=l-o,u=h-a,f=c*c+u*u,x=(i-o)*c+(s-a)*u,y=Math.min(1,Math.max(0,x/f));return t[0]=o+c*y,t[1]=a+u*y,t}function o(t,e,r,n,i,s){let o=r,a=n,l=i-o,h=s-a;if(0!==l||0!==h){const r=((t-o)*l+(e-a)*h)/(l*l+h*h);r>1?(o=i,a=s):r>0&&(o+=l*r,a+=h*r)}return l=t-o,h=e-a,l*l+h*h}function a(t,e){return function(t,e,r){const n=t[0]+r*(e[0]-t[0]),i=t[1]+r*(e[1]-t[1]);return t.length>2&&e.length>2?[n,i,t[2]+r*(e[2]-t[2])]:[n,i]}(t,e,.5)}function l(t){const e=t.length;let r=0;for(let n=0;n<e-1;++n)r+=i(t[n],t[n+1]);return r}function h(t,e=0,r=1){let n=0;const i=t.length;let s=t[0];for(let o=1;o<i;o++){const i=t[o];n+=(i[e]-s[e])*(i[r]+s[r]),s=i}if(c(t)){const i=t[0];n+=(i[e]-s[e])*(i[r]+s[r])}return n>=0}function c(t){const e=t.length;return e>0&&!(0,n.aI)(t[0],t[e-1])}function u(t){if("rings"in t)for(const e of t.rings)c(e)&&e.push(e[0].slice())}r(52006)},52006(t,e,r){function n(t){return"curveRings"in t&&!!t.curveRings?.length||"curvePaths"in t&&!!t.curvePaths?.length}function i(t){return"curveRings"in t?t.curveRings:t.curvePaths}function s(t){return"b"in t}function o(t){return"c"in t}function a(t){return Array.isArray(t)}function l(t){return"a"in t}function h(t){return"a"in t&&4===t.a.length}function c(t){return"a"in t&&7===t.a.length}function u(t,e){return i(t).flat().some(t=>function(t,e){return!(a(t)||(s(t)?e.has("cubic-bezier"):o(t)?e.has("circular-arc"):!h(t)&&!c(t)||e.has("elliptic-arc")))}(t,e))}function f(t){return a(t)?t:s(t)?t.b[0]:o(t)?t.c[0]:t.a[0]}function x(t){if(s(t)){const[e,r,n]=t.b;return{b:[[...e],[...r],[...n]]}}if(o(t)){const[e,r]=t.c;return{c:[[...e],[...r]]}}if(a(t))return[...t];if(h(t)){const[e,r,n,i]=t.a;return{a:[[...e],[...r],n,i]}}if(c(t)){const[e,r,n,i,s,o,a]=t.a;return{a:[[...e],[...r],n,i,s,o,a]}}return t}r.d(e,{DA:()=>h,Ed:()=>n,FD:()=>i,FG:()=>l,V8:()=>u,Xq:()=>a,aO:()=>o,n1:()=>s,tk:()=>x,wY:()=>c,yP:()=>f}),r(4576)},36849(t,e,r){r.r(e),r.d(e,{default:()=>Q});var n=r(17676),i=r(6774),s=r(5408),o=r(13195);function a(t){return 746===t||747===t||!(t<4352)&&(t>=12704&&t<=12735||t>=12544&&t<=12591||t>=65072&&t<=65103&&!(t>=65097&&t<=65103)||t>=63744&&t<=64255||t>=13056&&t<=13311||t>=11904&&t<=12031||t>=12736&&t<=12783||t>=12288&&t<=12351&&!(t>=12296&&t<=12305||t>=12308&&t<=12319||12336===t)||t>=13312&&t<=19903||t>=19968&&t<=40959||t>=12800&&t<=13055||t>=12592&&t<=12687||t>=43360&&t<=43391||t>=55216&&t<=55295||t>=4352&&t<=4607||t>=44032&&t<=55215||t>=12352&&t<=12447||t>=12272&&t<=12287||t>=12688&&t<=12703||t>=12032&&t<=12255||t>=12784&&t<=12799||t>=12448&&t<=12543&&12540!==t||t>=65280&&t<=65519&&!(65288===t||65289===t||65293===t||t>=65306&&t<=65310||65339===t||65341===t||65343===t||t>=65371&&t<=65503||65507===t||t>=65512&&t<=65519)||t>=65104&&t<=65135&&!(t>=65112&&t<=65118||t>=65123&&t<=65126)||t>=5120&&t<=5759||t>=6320&&t<=6399||t>=65040&&t<=65055||t>=19904&&t<=19967||t>=40960&&t<=42127||t>=42128&&t<=42191)}function l(t){return!(t<11904)&&(t>=12704&&t<=12735||t>=12544&&t<=12591||t>=65072&&t<=65103||t>=63744&&t<=64255||t>=13056&&t<=13311||t>=11904&&t<=12031||t>=12736&&t<=12783||t>=12288&&t<=12351||t>=13312&&t<=19903||t>=19968&&t<=40959||t>=12800&&t<=13055||t>=65280&&t<=65519||t>=12352&&t<=12447||t>=12272&&t<=12287||t>=12032&&t<=12255||t>=12784&&t<=12799||t>=12448&&t<=12543||t>=65040&&t<=65055||t>=42128&&t<=42191||t>=40960&&t<=42127)}function h(t){switch(t){case 10:case 32:case 38:case 40:case 41:case 43:case 45:case 47:case 173:case 183:case 8203:case 8208:case 8211:case 8231:return!0}return!1}function c(t){switch(t){case 9:case 10:case 11:case 12:case 13:case 32:return!0}return!1}var u=r(18989);const f=24;class x{constructor(t,e,r,n,i,s,o){this._glyphItems=t,this._maxWidth=e,this._lineHeight=r,this._letterSpacing=n,this._hAnchor=i,this._vAnchor=s,this._justify=o}getShaping(t,e,r){const n=this._letterSpacing,i=this._lineHeight,s=this._justify,o=this._maxWidth,u=[];let f=0,x=0;for(const e of t){const t=e.codePointAt(0);if(null==t)continue;const i=r&&a(t);let s;for(const e of this._glyphItems)if(s=e[t],s)break;u.push({codePoint:t,x:f,y:x,vertical:i,glyphItem:s}),s&&(f+=s.shaping.xAdvance+n)}let y=f;o>0&&(y=f/Math.max(1,Math.ceil(f/o)));const d=t.includes(""),p=[],g=u.length;for(let t=0;t<g-1;t++){const e=u[t].codePoint,r=l(e);if(h(e)||r){let n=0;if(10===e)n-=1e4;else if(r&&d)n+=150;else{40!==e&&65288!==e||(n+=50);const r=u[t+1].codePoint;41!==r&&65289!==r||(n+=50)}p.push(this._buildBreak(t+1,u[t].x,y,p,n,!1))}}const _=this._optimalBreaks(this._buildBreak(g,f,y,p,0,!0));let m=0;const b=e?-i:i;let w=0;for(let t=0;t<_.length;t++){const e=_[t];let r=w;for(;r<e&&c(u[r].codePoint);)u[r].glyphItem=null,++r;let n=e-1;for(;n>r&&c(u[n].codePoint);)u[n].glyphItem=null,--n;if(r<=n){const t=u[r].x;for(let e=r;e<=n;e++)u[e].x-=t,u[e].y=x;let e=u[n].x;u[n].glyphItem&&(e+=u[n].glyphItem.shaping.xAdvance),m=Math.max(e,m),s&&this._applyJustification(u,r,n)}w=e,x+=b}if(u.length>0){const t=_.length-1,r=(s-this._hAnchor)*m;let n=(-this._vAnchor*(t+1)+.5)*i;e&&t&&(n+=t*i);for(const t of u)t.x+=r,t.y+=n}return u.filter(t=>t.glyphItem)}static getTextBox(t,e){if(!t.length)return null;let r=1/0,n=1/0,i=0,s=0;for(const o of t){const t=o.glyphItem.shaping.xAdvance,a=o.x,l=o.y-17,h=a+t,c=l+e;r=Math.min(r,a),i=Math.max(i,h),n=Math.min(n,l),s=Math.max(s,c)}return{x:r,y:n,width:i-r,height:s-n}}static getBox(t){if(!t.length)return null;let e=1/0,r=1/0,n=0,i=0;for(const s of t){const{height:t,left:o,top:a,width:l}=s.glyphItem.rect,h=s.x,c=s.y-(t-Math.abs(a)),u=h+l+o,f=c+t;e=Math.min(e,h),n=Math.max(n,u),r=Math.min(r,c),i=Math.max(i,f)}return{x:e,y:r,width:n-e,height:i-r}}static addDecoration(t,e){const r=t.length;if(0===r)return;const n={rect:new u.A(4,0,4,8),sdf:!0,page:0};let i=t[0].x+t[0].glyphItem.rect.left,s=t[0].y;for(let o=1;o<r;o++){const r=t[o];if(r.y!==s){const a=t[o-1].x+t[o-1].glyphItem.rect.left+t[o-1].glyphItem.rect.width;t.push({codePoint:0,x:i,y:s+e-3,vertical:!1,glyphItem:{mosaicItem:n,rect:{width:a-i,height:8,left:0,top:0},shaping:{xOffset:0,yOffset:0,xAdvance:0,yAdvance:0},code:0}}),s=r.y,i=r.x+r.glyphItem.rect.left}}const o=t[r-1].x+t[r-1].glyphItem.rect.left+t[r-1].glyphItem.rect.width;t.push({codePoint:0,x:i,y:s+e-3,vertical:!1,glyphItem:{mosaicItem:n,rect:{width:o-i,height:8,left:0,top:0},shaping:{xOffset:0,yOffset:0,xAdvance:0,yAdvance:0},code:0}})}_breakScore(t,e,r,n){const i=(t-e)*(t-e);return n?t<e?i/2:2*i:i+Math.abs(r)*r}_buildBreak(t,e,r,n,i,s){let o=null,a=this._breakScore(e,r,i,s);for(const t of n){const n=e-t.x,l=this._breakScore(n,r,i,s)+t.score;l<=a&&(o=t,a=l)}return{index:t,x:e,score:a,previousBreak:o}}_optimalBreaks(t){return t?this._optimalBreaks(t.previousBreak).concat(t.index):[]}_applyJustification(t,e,r){const n=t[r],i=n.vertical?f:n.glyphItem?n.glyphItem.shaping.xAdvance:0,s=(n.x+i)*this._justify;for(let n=e;n<=r;n++)t[n].x-=s}}var y=r(76213);const d=.5;class p{constructor(t,e,r=0,n=-1,i=d){this.x=t,this.y=e,this.angle=r,this.segment=n,this.minzoom=i}}class g{constructor(t,e,r,n,i,s=d,a=o.MG){this.anchor=t,this.labelAngle=e,this.glyphAngle=r,this.page=n,this.alternateVerticalGlyph=i,this.minzoom=s,this.maxzoom=a}}class _{constructor(t,e,r,n,i,s,o,a,l,h,c,u){this.tl=t,this.tr=e,this.bl=r,this.br=n,this.mosaicRect=i,this.labelAngle=s,this.minAngle=o,this.maxAngle=a,this.anchor=l,this.minzoom=h,this.maxzoom=c,this.page=u}}class m{constructor(t){this.shapes=t}}class b{getIconPlacement(t,e,r){const n=new i.bR(t.x,t.y),s=0===r.rotationAlignment,a=r.keepUpright;let l=r.rotate*o.os;s&&(l+=t.angle);const h=new m([]);return h.iconColliders=[],this._addIconPlacement(h,n,e,r,l),s&&a&&this._addIconPlacement(h,n,e,r,l+o.Jo),h}_addIconPlacement(t,e,r,n,s){const a=r.rasterizationScale,l=r.width/a,h=r.height/a,c=n.offset;let u=c[0],f=c[1];switch(n.anchor){case 0:u-=l/2,f-=h/2;break;case 1:f-=h/2;break;case 2:u-=l,f-=h/2;break;case 3:u-=l/2;break;case 4:u-=l/2,f-=h;break;case 5:break;case 7:f-=h;break;case 6:u-=l;break;case 8:u-=l,f-=h}const x=r.rect,y=2/a,p=u-y,g=f-y,m=p+x.width/a,b=g+x.height/a,w=new i.bR(p,g),I=new i.bR(m,b),v=new i.bR(p,b),A=new i.bR(m,g);if(0!==s){const t=Math.cos(s),e=Math.sin(s);w.rotate(t,e),I.rotate(t,e),v.rotate(t,e),A.rotate(t,e)}const T=new _(w,A,v,I,x,s,0,256,e,d,o.MG,0);t.shapes.push(T);{const r=n.size,i=n.padding,a={xTile:e.x,yTile:e.y,dxPixels:u*r-i,dyPixels:f*r-i,hard:!n.optional,partIndex:0,width:l*r+2*i,height:h*r+2*i,angle:s,minLod:d,maxLod:o.MG};t.iconColliders.push(a)}}getTextPlacement(t,e,r,n){const a=new i.bR(t.x,t.y),{keepUpright:l,rotate:h,rotationAlignment:c,size:u}=n,p=h*o.os,b=0===c,w=l,I=n.padding;let v=d;const A=b?t.angle:0,T=t.segment>=0&&b,M=[],L=[],B=y.Rm,P=!T;let k=Number.POSITIVE_INFINITY,V=Number.NEGATIVE_INFINITY,S=k,R=V;const E=(T||b)&&w,D=u/f;let C=!1;for(const t of e)if(t.vertical){C=!0;break}let U,F=0,N=0;if(!T&&C){const t=x.getTextBox(e,n.lineHeight*f);switch(n.anchor){case 1:F=t.height/2,N=-t.width/2;break;case 2:F=-t.height/2,N=t.width/2;break;case 3:F=t.height/2,N=t.width/2;break;case 4:F=-t.height/2,N=-t.width/2;break;case 5:F=t.height;break;case 7:N=-t.width;break;case 6:N=t.width;break;case 8:F=-t.height}}F+=n.offset[0]*f,N+=n.offset[1]*f;for(const l of e){const e=l.glyphItem?.mosaicItem,h=l.glyphItem?.rect;if(!e||e.rect.isEmpty)continue;const c=e.rect,u=e.page;if(M&&P){if(void 0!==U&&U!==l.y){let e,r,i,s;C?(e=-R+F,r=k+N,i=R-S,s=V-k):(e=k+F,r=S+N,i=V-k,s=R-S);const a={xTile:t.x,yTile:t.y,dxPixels:e*D-I,dyPixels:r*D-I,hard:!n.optional,partIndex:1,width:i*D+2*I,height:s*D+2*I,angle:p,minLod:d,maxLod:o.MG};M.push(a),k=Number.POSITIVE_INFINITY,V=Number.NEGATIVE_INFINITY,S=k,R=V}U=l.y}const f=[];if(T){const e=.5*h.width,n=(l.x+h.left-B+e)*D*s.ih;if(v=this._placeGlyph(t,v,n,r,t.segment,1,l.vertical,u,f),w&&(v=this._placeGlyph(t,v,n,r,t.segment,-1,l.vertical,u,f)),v>=2)break}else f.push(new g(a,A,A,u,!1)),b&&w&&f.push(new g(a,A+o.Jo,A+o.Jo,u,!1));const x=l.x+h.left,y=l.y-17-h.top,m=x+h.width,z=y+h.height;let O,G,j,W,Z,q,H,K;if(!T&&C)if(l.vertical){const t=(x+m)/2-h.height/2,e=(y+z)/2+h.width/2;O=new i.bR(-e-B+F,t-B+N),G=new i.bR(O.x+c.width,O.y+c.height),j=new i.bR(O.x,G.y),W=new i.bR(G.x,O.y)}else O=new i.bR(-y+B+F,x-B+N),G=new i.bR(O.x-c.height,O.y+c.width),j=new i.bR(G.x,O.y),W=new i.bR(O.x,G.y);else O=new i.bR(x-B+F,y-B+N),G=new i.bR(O.x+c.width,O.y+c.height),j=new i.bR(O.x,G.y),W=new i.bR(G.x,O.y);for(const e of f){let r,s,o,a;if(e.alternateVerticalGlyph){if(!Z){const t=(y+z)/2+N;Z=new i.bR((x+m)/2+F-h.height/2-B,t+h.width/2+B),q=new i.bR(Z.x+c.height,Z.y-c.width),H=new i.bR(q.x,Z.y),K=new i.bR(Z.x,q.y)}r=Z,s=H,o=K,a=q}else r=O,s=j,o=W,a=G;const u=y,f=z,d=e.glyphAngle+p;if(0!==d){const t=Math.cos(d),e=Math.sin(d);r=r.clone(),s=s?.clone(),o=o?.clone(),a=a?.clone(),r.rotate(t,e),a?.rotate(t,e),s?.rotate(t,e),o?.rotate(t,e)}let g=0,b=256;if(T&&C?l.vertical?e.alternateVerticalGlyph?(g=32,b=96):(g=224,b=32):(g=224,b=96):(g=192,b=64),L.push(new _(r,o,s,a,c,e.labelAngle,g,b,e.anchor,e.minzoom,e.maxzoom,e.page)),M&&(!E||this._legible(e.labelAngle)))if(P)x<k&&(k=x),u<S&&(S=u),m>V&&(V=m),f>R&&(R=f);else if(e.minzoom<2){const r={xTile:t.x,yTile:t.y,dxPixels:(x+F)*D-I,dyPixels:(u+F)*D-I,hard:!n.optional,partIndex:1,width:(m-x)*D+2*I,height:(f-u)*D+2*I,angle:d,minLod:e.minzoom,maxLod:e.maxzoom};M.push(r)}}}if(v>=2)return null;if(M&&P){let e,r,i,s;C?(e=-R+F,r=k+N,i=R-S,s=V-k):(e=k+F,r=S+N,i=V-k,s=R-S);const a={xTile:t.x,yTile:t.y,dxPixels:e*D-I,dyPixels:r*D-I,hard:!n.optional,partIndex:1,width:i*D+2*I,height:s*D+2*I,angle:p,minLod:d,maxLod:o.MG};M.push(a)}const z=new m(L);return M&&M.length>0&&(z.textColliders=M),z}_legible(t){const e=(0,o.z0)(t);return e<65||e>=193}_placeGlyph(t,e,r,n,s,a,l,h,c){let u=a;const f=u<0?(0,o.Wh)(t.angle+o.Jo,o.pJ):t.angle;let x=0;r<0&&(u*=-1,r*=-1,x=o.Jo),u>0&&++s;let y=new i.bR(t.x,t.y),d=n[s],p=o.MG;if(n.length<=s)return p;for(;;){const t=d.x-y.x,i=d.y-y.y,a=Math.sqrt(t*t+i*i),_=Math.max(r/a,e),m=t/a,b=i/a,w=(0,o.Wh)(Math.atan2(b,m)+x,o.pJ);if(c.push(new g(y,f,w,h,!1,_,p)),l&&c.push(new g(y,f,w,h,!0,_,p)),_<=e)return _;y=d.clone();do{if(s+=u,n.length<=s||s<0)return _;d=n[s]}while(y.isEqual(d));let I=d.x-y.x,v=d.y-y.y;const A=Math.sqrt(I*I+v*v);I*=a/A,v*=a/A,y.x-=I,y.y-=v,p=_}}}var w=r(51624),I=r(15585);class v{constructor(t,e,r=0){this.values={},this._geometry=void 0,this._pbfGeometry=null,this.featureIndex=r;const n=e.keys,i=e.values,s=t.asUnsafe();for(;s.next();)switch(s.tag()){case 1:this.id=s.getUInt64();break;case 2:{const t=s.getMessage().asUnsafe(),e=this.values;for(;!t.empty();){const r=t.getUInt32(),s=t.getUInt32();e[n[r]]=i[s]}t.release();break}case 3:this.type=s.getUInt32();break;case 4:this._pbfGeometry=s.getMessage();break;default:s.skip()}}getGeometry(t){if(void 0!==this._geometry)return this._geometry;if(!this._pbfGeometry)return null;const e=this._pbfGeometry.asUnsafe();let r,n;this._pbfGeometry=null,t?t.reset(this.type):r=[];let s,o=1,a=0,l=0,h=0;for(;!e.empty();){if(0===a){const t=e.getUInt32();o=7&t,a=t>>3}switch(a--,o){case 1:l+=e.getSInt32(),h+=e.getSInt32(),t?t.moveTo(l,h):r&&(n&&r.push(n),n=[],n.push(new i.bR(l,h)));break;case 2:l+=e.getSInt32(),h+=e.getSInt32(),t?t.lineTo(l,h):n&&n.push(new i.bR(l,h));break;case 7:t?t.close():n&&!n[0].equals(l,h)&&n.push(n[0].clone());break;default:throw e.release(),new Error("Invalid path operation")}}return t?s=t.result():r&&(n&&r.push(n),s=r),e.release(),this._geometry=s,s}}r(44208);class A{constructor(t){this._array=[],this._stride=t}get array(){return this._array}get index(){return 4*this._array.length/this._stride}get itemSize(){return this._stride}get sizeInBytes(){return 4*this._array.length}reset(){this.array.length=0}toBuffer(){return new Uint32Array(this._array).buffer}}class T extends A{constructor(){super(12)}add(t,e,r){const n=this.array;n.push(t),n.push(e),n.push(r)}}class M{constructor(t){this.extent=s._H,this.keys=[],this.values=[],this._pbfLayer=t.clone();const e=t.asUnsafe();for(;e.next();)switch(e.tag()){case 1:this.name=e.getString();break;case 3:this.keys.push(e.getString());break;case 4:this.values.push(e.processMessage(M._parseValue));break;case 5:this.extent=e.getUInt32();break;default:e.skip()}}getData(){return this._pbfLayer}static _parseValue(t){for(;t.next();)switch(t.tag()){case 1:return t.getString();case 2:return t.getFloat();case 3:return t.getDouble();case 4:return t.getInt64();case 5:return t.getUInt64();case 6:return t.getSInt64();case 7:return t.getBool();default:t.skip()}return null}}var L=r(89518);class B extends A{constructor(t){super(t)}add(t,e,r,n,i,s,o,a,l,h,c,u){const f=this.array;let x=(0,L.M9)(t,e);f.push(x);const y=31;x=(0,L.Ss)(Math.round(y*r),Math.round(y*n),Math.round(y*i),Math.round(y*s)),f.push(x),x=(0,L.Ss)(Math.round(y*o),Math.round(y*a),Math.round(y*l),Math.round(y*h)),f.push(x),x=(0,L.M9)(c,0),f.push(x),u&&f.push(...u)}}class P extends A{constructor(t){super(t)}add(t,e,r){const n=this.array;n.push((0,L.M9)(t,e)),r&&n.push(...r)}}class k extends A{constructor(t){super(t)}add(t,e,r,n,i,s,o){const a=this.array,l=this.index;let h=(0,L.M9)(t,e);return a.push(h),h=(0,L.Ss)(Math.round(15*r),Math.round(15*n),i,s),a.push(h),o&&a.push(...o),l}}class V extends A{constructor(t){super(t)}add(t,e,r,n,i,s,a,l,h,c,u,f){const x=this.array;let y=(0,L.M9)(t,e);x.push(y),y=(0,L.M9)(Math.round(8*r),Math.round(8*n)),x.push(y),y=(0,L.M9)((0,L.ws)(i/4,s/4),(0,L.ws)(l,h)),x.push(y),y=(0,L.M9)((0,L.ws)(0,(0,o.z0)(a)),(0,L.ws)(10*c,Math.min(10*u,255))),x.push(y),f&&x.push(...f)}}class S extends A{constructor(t){super(t)}add(t,e,r,n,i){const s=this.array,o=(0,L.M9)(2*t+r,2*e+n);s.push(o),i&&s.push(...i)}}class R{constructor(t,e,r){this.layerExtent=s._H,this._features=[],this.layer=t,this.zoom=e,this._spriteInfo=r,this._filter=t.getFeatureFilter()}pushFeature(t){this._filter&&!this._filter.filter(t,this.zoom)||this._features.push(t)}hasFeatures(){return this._features.length>0}getResources(t,e,r){}}class E extends R{constructor(t,e,r,n,i){super(t,e,r),this.type=4,this._circleVertexBuffer=n,this._circleIndexBuffer=i}get circleIndexStart(){return this._circleIndexStart}get circleIndexCount(){return this._circleIndexCount}processFeatures(t){const e=this._circleVertexBuffer,r=this._circleIndexBuffer;this._circleIndexStart=3*r.index,this._circleIndexCount=0;const n=this.layer,i=this.zoom;t&&t.setExtent(this.layerExtent);for(const s of this._features){const o=s.getGeometry(t);if(!o)continue;const a=n.circleMaterial.encodeAttributes(s,i,n);for(const t of o)if(t)for(const n of t){const t=e.index;e.add(n.x,n.y,0,0,a),e.add(n.x,n.y,0,1,a),e.add(n.x,n.y,1,0,a),e.add(n.x,n.y,1,1,a),r.add(t,t+1,t+2),r.add(t+1,t+2,t+3),this._circleIndexCount+=6}}}serialize(){let t=6;t+=this.layerUIDs.length,t+=this._circleVertexBuffer.array.length,t+=this._circleIndexBuffer.array.length;const e=new Uint32Array(t),r=new Int32Array(e.buffer);let n=0;e[n++]=this.type,e[n++]=this.layerUIDs.length;for(let t=0;t<this.layerUIDs.length;t++)e[n++]=this.layerUIDs[t];e[n++]=this._circleIndexStart,e[n++]=this._circleIndexCount,e[n++]=this._circleVertexBuffer.array.length;for(let t=0;t<this._circleVertexBuffer.array.length;t++)r[n++]=this._circleVertexBuffer.array[t];e[n++]=this._circleIndexBuffer.array.length;for(let t=0;t<this._circleIndexBuffer.array.length;t++)e[n++]=this._circleIndexBuffer.array[t];return e.buffer}}var D=r(98291),C=r(83349);class U extends R{constructor(t,e,r,n,i,s,o){super(t,e,r),this.type=1,this._patternMap=new Map,this._fillVertexBuffer=n,this._fillIndexBuffer=i,this._outlineVertexBuffer=s,this._outlineIndexBuffer=o}get fillIndexStart(){return this._fillIndexStart}get fillIndexCount(){return this._fillIndexCount}get outlineIndexStart(){return this._outlineIndexStart}get outlineIndexCount(){return this._outlineIndexCount}getResources(t,e,r){const n=this.layer,i=this.zoom,s=n.getPaintProperty("fill-pattern");if(s)if(s.isDataDriven)for(const t of this._features)e(s.getValue(i,t),!0);else e(s.getValue(i),!0)}processFeatures(t){this._fillIndexStart=3*this._fillIndexBuffer.index,this._fillIndexCount=0,this._outlineIndexStart=3*this._outlineIndexBuffer.index,this._outlineIndexCount=0;const e=this.layer,r=this.zoom,{fillMaterial:n,outlineMaterial:i,hasDataDrivenFill:s,hasDataDrivenOutline:o}=e;t&&t.setExtent(this.layerExtent);const a=e.getPaintProperty("fill-pattern"),l=a?.isDataDriven;let h=!a&&e.getPaintValue("fill-antialias",r);if(e.outlineUsesFillColor){if(h&&!e.hasDataDrivenOpacity){const t=e.getPaintValue("fill-opacity",r),n=e.getPaintValue("fill-opacity",r+1);t<1&&n<1&&(h=!1)}if(h&&!e.hasDataDrivenColor){const t=e.getPaintValue("fill-color",r),n=e.getPaintValue("fill-color",r+1);t[3]<1&&n[3]<1&&(h=!1)}}const c=this._features,u=t?.validateTessellation;if(l){const s=[];for(const l of c){const c=a.getValue(r,l),u=this._spriteInfo[c];if(!u?.rect)continue;const f=n.encodeAttributes(l,r,e,u),x=h&&o?i.encodeAttributes(l,r,e):[],y=l.getGeometry(t);s.push({ddFillAttributes:f,ddOutlineAttributes:x,page:u.page,geometry:y}),s.sort((t,e)=>t.page-e.page)}for(const{ddFillAttributes:t,ddOutlineAttributes:r,page:n,geometry:i}of s)this._processFeature(i,h,e.outlineUsesFillColor,t,r,u,n)}else for(const a of c){const l=s?n.encodeAttributes(a,r,e):null,c=h&&o?i.encodeAttributes(a,r,e):null,f=a.getGeometry(t);this._processFeature(f,h,e.outlineUsesFillColor,l,c,u)}}serialize(){let t=10;t+=this.layerUIDs.length,t+=this._fillVertexBuffer.array.length,t+=this._fillIndexBuffer.array.length,t+=this._outlineVertexBuffer.array.length,t+=this._outlineIndexBuffer.array.length,t+=3*this._patternMap.size+1;const e=new Uint32Array(t),r=new Int32Array(e.buffer);let n=0;e[n++]=this.type,e[n++]=this.layerUIDs.length;for(let t=0;t<this.layerUIDs.length;t++)e[n++]=this.layerUIDs[t];e[n++]=this._fillIndexStart,e[n++]=this._fillIndexCount,e[n++]=this._outlineIndexStart,e[n++]=this._outlineIndexCount;const i=this._patternMap,s=i.size;if(e[n++]=s,s>0)for(const[t,[r,s]]of i)e[n++]=t,e[n++]=r,e[n++]=s;e[n++]=this._fillVertexBuffer.array.length;for(let t=0;t<this._fillVertexBuffer.array.length;t++)r[n++]=this._fillVertexBuffer.array[t];e[n++]=this._fillIndexBuffer.array.length;for(let t=0;t<this._fillIndexBuffer.array.length;t++)e[n++]=this._fillIndexBuffer.array[t];e[n++]=this._outlineVertexBuffer.array.length;for(let t=0;t<this._outlineVertexBuffer.array.length;t++)r[n++]=this._outlineVertexBuffer.array[t];e[n++]=this._outlineIndexBuffer.array.length;for(let t=0;t<this._outlineIndexBuffer.array.length;t++)e[n++]=this._outlineIndexBuffer.array[t];return e.buffer}_processFeature(t,e,r,n,i,s,o){if(!t)return;const a=t.length,l=!i||0===i.length;if(e&&(!r||l))for(let e=0;e<a;e++)this._processOutline(t[e],i);let h;for(let e=0;e<a;e++){const r=U._area(t[e]);r>32?(void 0!==h&&this._processFill(t,h,n,s,o),h=[e]):r<-32&&void 0!==h&&h.push(e)}void 0!==h&&this._processFill(t,h,n,s,o)}_processOutline(t,e){const r=this._outlineVertexBuffer,n=this._outlineIndexBuffer,s=n.index;let o,a,l;const h=new i.bR(0,0),c=new i.bR(0,0),u=new i.bR(0,0);let f=-1,x=-1,y=-1,d=-1,p=-1,g=!1,_=t.length;if(_<2)return;const m=t[0];let b=t[_-1];for(;_&&b.isEqual(m);)--_,b=t[_-1];if(!(_-0<2)){for(let i=0;i<_;++i){0===i?(o=t[_-1],a=t[0],l=t[1],h.assignSub(a,o),h.normalize(),h.rightPerpendicular()):(o=a,a=l,l=i!==_-1?t[i+1]:t[0],h.assign(c));const s=this._isClipEdge(o,a);-1===d&&(g=s),c.assignSub(l,a),c.normalize(),c.rightPerpendicular();const m=h.x*c.y-h.y*c.x;u.assignAdd(h,c),u.normalize();const b=-u.x*-h.x+-u.y*-h.y;let w=Math.abs(0!==b?1/b:1);w>8&&(w=8),m>=0?(y=r.add(a.x,a.y,h.x,h.y,0,1,e),-1===d&&(d=y),f>=0&&x>=0&&y>=0&&!s&&n.add(f,x,y),x=r.add(a.x,a.y,w*-u.x,w*-u.y,0,-1,e),-1===p&&(p=x),f>=0&&x>=0&&y>=0&&!s&&n.add(f,x,y),f=x,x=y,y=r.add(a.x,a.y,u.x,u.y,0,1,e),f>=0&&x>=0&&y>=0&&!s&&n.add(f,x,y),x=r.add(a.x,a.y,c.x,c.y,0,1,e),f>=0&&x>=0&&y>=0&&!s&&n.add(f,x,y)):(y=r.add(a.x,a.y,w*u.x,w*u.y,0,1,e),-1===d&&(d=y),f>=0&&x>=0&&y>=0&&!s&&n.add(f,x,y),x=r.add(a.x,a.y,-h.x,-h.y,0,-1,e),-1===p&&(p=x),f>=0&&x>=0&&y>=0&&!s&&n.add(f,x,y),f=x,x=y,y=r.add(a.x,a.y,-u.x,-u.y,0,-1,e),f>=0&&x>=0&&y>=0&&!s&&n.add(f,x,y),f=r.add(a.x,a.y,-c.x,-c.y,0,-1,e),f>=0&&x>=0&&y>=0&&!s&&n.add(f,x,y))}f>=0&&x>=0&&d>=0&&!g&&n.add(f,x,d),f>=0&&d>=0&&p>=0&&!g&&n.add(f,p,d),this._outlineIndexCount+=3*(n.index-s)}}_processFill(t,e,r,n,i){let s;e.length>1&&(s=[]);let o=0;for(const r of e)0!==o&&s.push(o),o+=t[r].length;const a=2*o,l=D.A.acquire();for(const r of e){const e=t[r],n=e.length;for(let t=0;t<n;++t)l.push(e[t].x,e[t].y)}const h=(0,C.e)(l,s,2);if(C.e.deviation(l,s,2,h)>0){const n=e.map(e=>t[e].length),{buffer:s,vertexCount:o}=(0,I.QT)(l,n);if(o>0){const t=this._fillVertexBuffer.index;for(let t=0;t<o;t++)this._fillVertexBuffer.add(s[2*t],s[2*t+1],r);for(let e=0;e<o;e+=3){const r=t+e;this._fillIndexBuffer.add(r,r+1,r+2)}if(void 0!==i){const t=this._patternMap,e=t.get(i);e?e[1]+=o:t.set(i,[this._fillIndexStart+this._fillIndexCount,o])}this._fillIndexCount+=o}}else{const t=h.length;if(t>0){const e=this._fillVertexBuffer.index;let n=0;for(;n<a;)this._fillVertexBuffer.add(l[n++],l[n++],r);let s=0;for(;s<t;)this._fillIndexBuffer.add(e+h[s++],e+h[s++],e+h[s++]);if(void 0!==i){const e=this._patternMap,r=e.get(i);r?r[1]+=t:e.set(i,[this._fillIndexStart+this._fillIndexCount,t])}this._fillIndexCount+=t}}D.A.release(l)}_isClipEdge(t,e){return t.x===e.x?t.x<=-64||t.x>=4160:t.y===e.y&&(t.y<=-64||t.y>=4160)}static _area(t){let e=0;const r=t.length-1;for(let n=0;n<r;n++)e+=(t[n].x-t[n+1].x)*(t[n].y+t[n+1].y);return e+=(t[r].x-t[0].x)*(t[r].y+t[0].y),.5*e}}var F=r(83773);class N extends R{constructor(t,e,r,n,i){super(t,e,r),this.type=2,this._tessellationOptions={pixelCoordRatio:8,halfWidth:0,offset:0},this._patternMap=new Map,this.tessellationProperties={_lineVertexBuffer:null,_lineIndexBuffer:null,_ddValues:null},this.tessellationProperties._lineVertexBuffer=n,this.tessellationProperties._lineIndexBuffer=i,this._lineTessellator=new F.i(z(this.tessellationProperties),O(this.tessellationProperties),t.canUseThinTessellation)}get lineIndexStart(){return this._lineIndexStart}get lineIndexCount(){return this._lineIndexCount}getResources(t,e,r){const n=this.layer,i=this.zoom,s=n.getPaintProperty("line-pattern"),o=n.getPaintProperty("line-dasharray"),a=n.getLayoutProperty("line-cap");if(!s&&!o)return;const l=a?.getValue(i)||0,h=a?.isDataDriven,c=s?.isDataDriven,u=o?.isDataDriven;if(c||u)for(const t of this._features)e(c?s.getValue(i,t):this._getDashArrayKey(t,i,n,o,h,a,l));else if(s)e(s.getValue(i));else if(o){const t=o.getValue(i);e(n.getDashKey(t,l))}}processFeatures(t){this._lineIndexStart=3*this.tessellationProperties._lineIndexBuffer.index,this._lineIndexCount=0;const e=this.layer,r=this.zoom,n=this._features,i=this._tessellationOptions,{hasDataDrivenLine:s,lineMaterial:o}=e;t&&t.setExtent(this.layerExtent);const a=e.getPaintProperty("line-pattern"),l=e.getPaintProperty("line-dasharray"),h=a?.isDataDriven,c=l?.isDataDriven;let u;u=e.getLayoutProperty("line-cap");const f=u?.isDataDriven?u:null,x=f?null:e.getLayoutValue("line-cap",r),y=x||0,d=!!f;u=e.getLayoutProperty("line-join");const p=u?.isDataDriven?u:null,g=p?null:e.getLayoutValue("line-join",r);u=e.getLayoutProperty("line-miter-limit");const _=u?.isDataDriven?u:null,m=_?null:e.getLayoutValue("line-miter-limit",r);u=e.getLayoutProperty("line-round-limit");const b=u?.isDataDriven?u:null,w=b?null:e.getLayoutValue("line-round-limit",r);u=e.getPaintProperty("line-width");const I=u?.isDataDriven?u:null,v=I?null:e.getPaintValue("line-width",r);u=e.getPaintProperty("line-offset");const A=u?.isDataDriven?u:null,T=A?null:e.getPaintValue("line-offset",r);if(h||c){const s=[];for(const i of n){const n=h?a.getValue(r,i):this._getDashArrayKey(i,r,e,l,d,f,y),c=this._spriteInfo[n];if(!c?.rect)continue;const u=o.encodeAttributes(i,r,e,c),M=i.getGeometry(t);s.push({ddAttributes:u,page:c.page,cap:f?f.getValue(r,i):x,join:p?p.getValue(r,i):g,miterLimit:_?_.getValue(r,i):m,roundLimit:b?b.getValue(r,i):w,halfWidth:.5*(I?I.getValue(r,i):v),offset:A?A.getValue(r,i):T,geometry:M})}s.sort((t,e)=>t.page-e.page),i.textured=!0;for(const{ddAttributes:t,page:e,cap:r,join:n,miterLimit:o,roundLimit:a,halfWidth:l,offset:h,geometry:c}of s)i.capType=r,i.joinType=n,i.miterLimit=o,i.roundLimit=a,i.halfWidth=l,i.offset=h,this._processFeature(c,t,e)}else{if(a){const t=a.getValue(r),e=this._spriteInfo[t];if(!e?.rect)return}i.textured=!(!a&&!l),i.capType=x,i.joinType=g,i.miterLimit=m,i.roundLimit=w,i.halfWidth=.5*v,i.offset=T;for(const a of n){const n=s?o.encodeAttributes(a,r,e):null;f&&(i.capType=f.getValue(r,a)),p&&(i.joinType=p.getValue(r,a)),_&&(i.miterLimit=_.getValue(r,a)),b&&(i.roundLimit=b.getValue(r,a)),I&&(i.halfWidth=.5*I.getValue(r,a)),A&&(i.offset=A.getValue(r,a));const l=a.getGeometry(t);this._processFeature(l,n)}}}serialize(){let t=6;t+=this.layerUIDs.length,t+=this.tessellationProperties._lineVertexBuffer.array.length,t+=this.tessellationProperties._lineIndexBuffer.array.length,t+=3*this._patternMap.size+1;const e=new Uint32Array(t),r=new Int32Array(e.buffer);let n=0;e[n++]=this.type,e[n++]=this.layerUIDs.length;for(let t=0;t<this.layerUIDs.length;t++)e[n++]=this.layerUIDs[t];e[n++]=this._lineIndexStart,e[n++]=this._lineIndexCount;const i=this._patternMap,s=i.size;if(e[n++]=s,s>0)for(const[t,[r,s]]of i)e[n++]=t,e[n++]=r,e[n++]=s;e[n++]=this.tessellationProperties._lineVertexBuffer.array.length;for(let t=0;t<this.tessellationProperties._lineVertexBuffer.array.length;t++)r[n++]=this.tessellationProperties._lineVertexBuffer.array[t];e[n++]=this.tessellationProperties._lineIndexBuffer.array.length;for(let t=0;t<this.tessellationProperties._lineIndexBuffer.array.length;t++)e[n++]=this.tessellationProperties._lineIndexBuffer.array[t];return e.buffer}_processFeature(t,e,r){if(!t)return;const n=t.length;for(let i=0;i<n;i++)this._processGeometry(t[i],e,r)}_processGeometry(t,e,r){if(t.length<2)return;let n,i,s=t[0],o=1;for(;o<t.length;)n=t[o].x-s.x,i=t[o].y-s.y,n*n+i*i<1e-6?t.splice(o,1):(s=t[o],++o);if(t.length<2)return;const a=this.tessellationProperties._lineIndexBuffer,l=3*a.index;this._tessellationOptions.initialDistance=0,this._tessellationOptions.wrapDistance=65535,this.tessellationProperties._ddValues=e,this._lineTessellator.tessellate(t,this._tessellationOptions);const h=3*a.index-l;if(void 0!==r){const t=this._patternMap,e=t.get(r);e?e[1]+=h:t.set(r,[l+this._lineIndexCount,h])}this._lineIndexCount+=h}_getDashArrayKey(t,e,r,n,i,s,o){const a=i?s.getValue(e,t):o,l=n.getValue(e,t);return r.getDashKey(l,a)}}const z=t=>(e,r,n,i,s,o,a,l,h,c,u)=>(t._lineVertexBuffer.add(e,r,a,l,n,i,s,o,h,c,u,t._ddValues),t._lineVertexBuffer.index-1),O=t=>(e,r,n)=>{t._lineIndexBuffer.add(e,r,n)};var G=r(32488),j=r(97768),W=r(799),Z=r(4264);function q(t,e){return t.iconMosaicItem&&e.iconMosaicItem?t.iconMosaicItem.page===e.iconMosaicItem.page?0:t.iconMosaicItem.page-e.iconMosaicItem.page:t.iconMosaicItem&&!e.iconMosaicItem?1:!t.iconMosaicItem&&e.iconMosaicItem?-1:0}class H extends R{constructor(t,e,r,n,i,s,o,a,l){super(e,r,l.getSpriteItems()),this.type=3,this._markerMap=new Map,this._glyphMap=new Map,this._glyphBufferDataStorage=new Map,this._isIconSDF=!1,this._sourceTileKey=t,this._iconVertexBuffer=n,this._iconIndexBuffer=i,this._textVertexBuffer=s,this._textIndexBuffer=o,this._placementEngine=a,this._workerTileHandler=l}get markerPageMap(){return this._markerMap}get glyphsPageMap(){return this._glyphMap}get symbolInstances(){return this._symbolInstances}static{this._bidiEngine=new G.A}getResources(t,e,r){const n=this.layer,i=this.zoom;t&&t.setExtent(this.layerExtent);const s=n.getLayoutProperty("icon-image"),o=n.getLayoutProperty("text-field");let a=n.getLayoutProperty("text-transform"),l=n.getLayoutProperty("text-font");const h=[];let c,u,f,x;s&&!s.isDataDriven&&(c=s.getValue(i)),o&&!o.isDataDriven&&(u=o.getValue(i)),a&&a.isDataDriven||(f=n.getLayoutValue("text-transform",i),a=null),l&&l.isDataDriven||(x=n.getLayoutValue("text-font",i),l=null);for(const y of this._features){const d=y.getGeometry(t);if(!d||0===d.length)continue;let p,g;s&&(p=s.isDataDriven?s.getValue(i,y):this._replaceKeys(c,y.values),p&&e(p));let _=!1;if(o&&(g=o.isDataDriven?o.getValue(i,y):this._replaceKeys(u,y.values),g)){switch(g=g.replaceAll("\\n","\n"),a&&(f=a.getValue(i,y)),f){case 2:g=g.toLowerCase();break;case 1:g=g.toUpperCase()}if(H._bidiEngine.hasBidiChar(g)){let t;t="rtl"===H._bidiEngine.checkContextual(g)?"IDNNN":"ICNNN",g=H._bidiEngine.bidiTransform(g,t,"VLYSN"),_=!0}if(g.length>0){l&&(x=l.getValue(i,y));for(const t of x){let e=r[t];e||(e=r[t]=new Set);for(const t of g){const r=t.codePointAt(0);null!=r&&e.add(r)}}}}if(!p&&!g)continue;const m=n.getLayoutValue("symbol-sort-key",i,y),b={feature:y,sprite:p,label:g,rtl:_,geometry:d,hash:(g?(0,W.Wm)(g):0)^(p?(0,W.Wm)(p):0),priority:m,textFont:x};h.push(b)}this._symbolFeatures=h}processFeatures(t){t&&t.setExtent(this.layerExtent);const e=this.layer,r=this.zoom,n=e.getLayoutValue("symbol-placement",r),i=0!==n,a=e.getLayoutValue("symbol-spacing",r)*s.ih,l=e.getLayoutProperty("icon-image"),h=e.getLayoutProperty("text-field"),c=l?new Z.aR(e,r,i):null,u=h?new Z.uU(e,r,i):null,y=this._workerTileHandler;let d;l&&(d=y.getSpriteItems()),this._iconIndexStart=3*this._iconIndexBuffer.index,this._textIndexStart=3*this._textIndexBuffer.index,this._iconIndexCount=0,this._textIndexCount=0,this._markerMap.clear(),this._glyphMap.clear();const g=[];let _=1;u?.size&&(_=u.size/f);const m=u?u.maxAngle*o.os:0,b=u?u.size*s.ih:0;for(const t of this._symbolFeatures){let e,o;c&&d&&t.sprite&&(e=d[t.sprite],e&&e.sdf&&(this._isIconSDF=!0)),e&&c.update(r,t.feature);let l=0;const h=t.label;if(h){(0,j.Lw)(u),u.update(r,t.feature);const e=i&&0===u.rotationAlignment?u.keepUpright:u.writingMode&&u.writingMode.includes(1);let n=.5;switch(u.anchor){case 5:case 1:case 7:n=0;break;case 6:case 2:case 8:n=1}let a=.5;switch(u.anchor){case 5:case 3:case 6:a=0;break;case 7:case 4:case 8:a=1}let c=.5;switch(u.justify){case 0:c=n;break;case 1:c=0;break;case 3:c=1}const d=u.letterSpacing*f,p=i?0:u.maxWidth*f,g=u.lineHeight*f,m=t.textFont.map(t=>y.getGlyphItems(t));if(o=new x(m,p,g,d,n,a,c).getShaping(h,t.rtl,e),o&&o.length>0){let t=1e30,e=-1e30;for(const r of o)t=Math.min(t,r.x),e=Math.max(e,r.x);l=(e-t+48)*_*s.ih}}for(let r of t.geometry){const h=[];if(1===n){if(o?.length&&u?.size){const t=u.size*s.ih*(2+Math.min(2,4*Math.abs(u.offset[1])));r=H._smoothVertices(r,t)}H._pushAnchors(h,r,a,l)}else 2===n?H._pushCenterAnchor(h,r):3===t.feature.type?H._pushCentroid(h,r):h.push(new p(r[0].x,r[0].y));for(const n of h){if(n.x<0||n.x>s._H||n.y<0||n.y>s._H)continue;if(i&&l>0&&0===u?.rotationAlignment&&!H._honorsTextMaxAngle(r,n,l,m,b))continue;const a={shaping:o,line:r,iconMosaicItem:e,anchor:n,symbolFeature:t,textColliders:[],iconColliders:[],textVertexRanges:[],iconVertexRanges:[]};g.push(a),this._processFeature(a,c,u)}}}g.sort(q),this._addPlacedGlyphs(),this._symbolInstances=g}serialize(){let t=14;t+=this.layerUIDs.length,t+=3*this.markerPageMap.size,t+=3*this.glyphsPageMap.size,t+=H._symbolsSerializationLength(this._symbolInstances),t+=this._iconVertexBuffer.array.length,t+=this._iconIndexBuffer.array.length,t+=this._textVertexBuffer.array.length,t+=this._textIndexBuffer.array.length;const e=new Uint32Array(t),r=new Int32Array(e.buffer),n=new Float32Array(e.buffer),[i,s,o]=this._sourceTileKey.split("/");let a=0;e[a++]=this.type,e[a++]=this.layerUIDs.length;for(let t=0;t<this.layerUIDs.length;t++)e[a++]=this.layerUIDs[t];e[a++]=this._isIconSDF?1:0,e[a++]=parseFloat(i),e[a++]=parseFloat(s),e[a++]=parseFloat(o),e[a++]=this.markerPageMap.size;for(const[t,[r,n]]of this.markerPageMap)e[a++]=t,e[a++]=r,e[a++]=n;e[a++]=this.glyphsPageMap.size;for(const[t,[r,n]]of this.glyphsPageMap)e[a++]=t,e[a++]=r,e[a++]=n;e[a++]=this._iconVertexBuffer.index/4,e[a++]=this._textVertexBuffer.index/4,a=H.serializeSymbols(e,r,n,a,this._symbolInstances),e[a++]=this._iconVertexBuffer.array.length;for(let t=0;t<this._iconVertexBuffer.array.length;t++)r[a++]=this._iconVertexBuffer.array[t];e[a++]=this._iconIndexBuffer.array.length;for(let t=0;t<this._iconIndexBuffer.array.length;t++)e[a++]=this._iconIndexBuffer.array[t];e[a++]=this._textVertexBuffer.array.length;for(let t=0;t<this._textVertexBuffer.array.length;t++)r[a++]=this._textVertexBuffer.array[t];e[a++]=this._textIndexBuffer.array.length;for(let t=0;t<this._textIndexBuffer.array.length;t++)e[a++]=this._textIndexBuffer.array[t];return e.buffer}static _symbolsSerializationLength(t){let e=0;e+=1;for(const r of t||[]){e+=5,e+=1;for(const t of r.textColliders)e+=10;for(const t of r.iconColliders)e+=10;e+=1,e+=2*r.textVertexRanges.length,e+=1,e+=2*r.iconVertexRanges.length}return e}static serializeSymbols(t,e,r,n,i){i=i||[],e[n++]=i.length;for(const t of i){e[n++]=t.anchor.x,e[n++]=t.anchor.y,e[n++]=t.symbolFeature.hash,e[n++]=t.symbolFeature.priority,e[n++]=t.symbolFeature.feature.featureIndex,e[n++]=t.textColliders.length+t.iconColliders.length;for(const i of t.textColliders)e[n++]=i.xTile,e[n++]=i.yTile,e[n++]=i.dxPixels,e[n++]=i.dyPixels,e[n++]=i.hard?1:0,e[n++]=i.partIndex,r[n++]=i.minLod,r[n++]=i.maxLod,e[n++]=i.width,e[n++]=i.height;for(const i of t.iconColliders)e[n++]=i.xTile,e[n++]=i.yTile,e[n++]=i.dxPixels,e[n++]=i.dyPixels,e[n++]=i.hard?1:0,e[n++]=i.partIndex,r[n++]=i.minLod,r[n++]=i.maxLod,e[n++]=i.width,e[n++]=i.height;e[n++]=t.textVertexRanges.length;for(const[r,i]of t.textVertexRanges)e[n++]=r,e[n++]=i;e[n++]=t.iconVertexRanges.length;for(const[r,i]of t.iconVertexRanges)e[n++]=r,e[n++]=i}return n}_replaceKeys(t,e){return t.replaceAll(/{([^{}]+)}/g,(t,r)=>r in e?e[r]:"")}_processFeature(t,e,r){const{line:n,iconMosaicItem:i,shaping:s,anchor:a}=t,l=this.zoom,h=this.layer,c=!!i;let u=!0;c&&(u=e?.optional||!i);const f=s&&s.length>0,x=!f||r?.optional;let y,d;if(c&&(y=this._placementEngine.getIconPlacement(a,i,e)),(y||u)&&(f&&(d=this._placementEngine.getTextPlacement(a,s,n,r)),d||x)){if(y&&d||(x||u?x||d?u||y||(d=null):y=null:(y=null,d=null)),d){const e=h.hasDataDrivenText?h.textMaterial.encodeAttributes(t.symbolFeature.feature,l,h):null;if(this._storePlacedGlyphs(t,d.shapes,l,r.rotationAlignment,e),d.textColliders){t.textColliders=d.textColliders;for(const t of d.textColliders){t.minLod=Math.max(l+(0,o.p6)(t.minLod),0),t.maxLod=Math.min(l+(0,o.p6)(t.maxLod),25);const e=t.angle;if(e){const r=Math.cos(e),n=Math.sin(e),i=t.dxPixels*r-t.dyPixels*n,s=t.dxPixels*n+t.dyPixels*r,o=(t.dxPixels+t.width)*r-t.dyPixels*n,a=(t.dxPixels+t.width)*n+t.dyPixels*r,l=t.dxPixels*r-(t.dyPixels+t.height)*n,h=t.dxPixels*n+(t.dyPixels+t.height)*r,c=(t.dxPixels+t.width)*r-(t.dyPixels+t.height)*n,u=(t.dxPixels+t.width)*n+(t.dyPixels+t.height)*r,f=Math.min(i,o,l,c),x=Math.max(i,o,l,c),y=Math.min(s,a,h,u),d=Math.max(s,a,h,u);t.dxPixels=f,t.dyPixels=y,t.width=x-f,t.height=d-y}}}}if(y){const r=h.hasDataDrivenIcon?h.iconMaterial.encodeAttributes(t.symbolFeature.feature,l,h):null;if(this._addPlacedIcons(t,y.shapes,l,i.page,1===e.rotationAlignment,r),y.iconColliders){t.iconColliders=y.iconColliders;for(const t of y.iconColliders){t.minLod=Math.max(l+(0,o.p6)(t.minLod),0),t.maxLod=Math.min(l+(0,o.p6)(t.maxLod),25);const e=t.angle;if(e){const r=Math.cos(e),n=Math.sin(e),i=t.dxPixels*r-t.dyPixels*n,s=t.dxPixels*n+t.dyPixels*r,o=(t.dxPixels+t.width)*r-t.dyPixels*n,a=(t.dxPixels+t.width)*n+t.dyPixels*r,l=t.dxPixels*r-(t.dyPixels+t.height)*n,h=t.dxPixels*n+(t.dyPixels+t.height)*r,c=(t.dxPixels+t.width)*r-(t.dyPixels+t.height)*n,u=(t.dxPixels+t.width)*n+(t.dyPixels+t.height)*r,f=Math.min(i,o,l,c),x=Math.max(i,o,l,c),y=Math.min(s,a,h,u),d=Math.max(s,a,h,u);t.dxPixels=f,t.dyPixels=y,t.width=x-f,t.height=d-y}}}}}}_addPlacedIcons(t,e,r,n,i,s){const a=Math.max(r-1,0),l=this._iconVertexBuffer,h=this._iconIndexBuffer,c=this._markerMap;for(const u of e){const e=i?0:Math.max(r+(0,o.p6)(u.minzoom),a),f=i?25:Math.min(r+(0,o.p6)(u.maxzoom),25);if(f<=e)continue;const x=u.tl,y=u.tr,d=u.bl,p=u.br,g=u.mosaicRect,_=u.labelAngle,m=u.minAngle,b=u.maxAngle,w=u.anchor,I=l.index,v=g.x,A=g.y,T=v+g.width,M=A+g.height,L=l.index;l.add(w.x,w.y,x.x,x.y,v,A,_,m,b,e,f,s),l.add(w.x,w.y,y.x,y.y,T,A,_,m,b,e,f,s),l.add(w.x,w.y,d.x,d.y,v,M,_,m,b,e,f,s),l.add(w.x,w.y,p.x,p.y,T,M,_,m,b,e,f,s),t.iconVertexRanges.length>0&&t.iconVertexRanges[0][0]+t.iconVertexRanges[0][1]===L?t.iconVertexRanges[0][1]+=4:t.iconVertexRanges.push([L,4]),h.add(I,I+1,I+2),h.add(I+1,I+2,I+3),c.has(n)?c.get(n)[1]+=6:c.set(n,[this._iconIndexStart+this._iconIndexCount,6]),this._iconIndexCount+=6}}_addPlacedGlyphs(){const t=this._textVertexBuffer,e=this._textIndexBuffer,r=this._glyphMap;for(const[n,i]of this._glyphBufferDataStorage)for(const s of i){const i=t.index,o=s.symbolInstance,a=s.ddAttributes,l=t.index;t.add(s.glyphAnchor[0],s.glyphAnchor[1],s.tl[0],s.tl[1],s.xmin,s.ymin,s.labelAngle,s.minAngle,s.maxAngle,s.minLod,s.maxLod,a),t.add(s.glyphAnchor[0],s.glyphAnchor[1],s.tr[0],s.tr[1],s.xmax,s.ymin,s.labelAngle,s.minAngle,s.maxAngle,s.minLod,s.maxLod,a),t.add(s.glyphAnchor[0],s.glyphAnchor[1],s.bl[0],s.bl[1],s.xmin,s.ymax,s.labelAngle,s.minAngle,s.maxAngle,s.minLod,s.maxLod,a),t.add(s.glyphAnchor[0],s.glyphAnchor[1],s.br[0],s.br[1],s.xmax,s.ymax,s.labelAngle,s.minAngle,s.maxAngle,s.minLod,s.maxLod,a),o.textVertexRanges.length>0&&o.textVertexRanges[0][0]+o.textVertexRanges[0][1]===l?o.textVertexRanges[0][1]+=4:o.textVertexRanges.push([l,4]),e.add(i,i+1,i+2),e.add(i+1,i+2,i+3),r.has(n)?r.get(n)[1]+=6:r.set(n,[this._textIndexStart+this._textIndexCount,6]),this._textIndexCount+=6}this._glyphBufferDataStorage.clear()}_storePlacedGlyphs(t,e,r,n,i){const s=Math.max(r-1,0),a=1===n;let l,h,c,u,f,x,y,d,p,g,_;for(const n of e)l=a?0:Math.max(r+(0,o.p6)(n.minzoom),s),h=a?25:Math.min(r+(0,o.p6)(n.maxzoom),25),h<=l||(c=n.tl,u=n.tr,f=n.bl,x=n.br,y=n.labelAngle,d=n.minAngle,p=n.maxAngle,g=n.anchor,_=n.mosaicRect,this._glyphBufferDataStorage.has(n.page)||this._glyphBufferDataStorage.set(n.page,[]),this._glyphBufferDataStorage.get(n.page).push({glyphAnchor:[g.x,g.y],tl:[c.x,c.y],tr:[u.x,u.y],bl:[f.x,f.y],br:[x.x,x.y],xmin:_.x,ymin:_.y,xmax:_.x+_.width,ymax:_.y+_.height,labelAngle:y,minAngle:d,maxAngle:p,minLod:l,maxLod:h,placementLod:s,symbolInstance:t,ddAttributes:i}))}static _pushAnchors(t,e,r,n){r+=n;let s=0;const a=e.length-1;for(let t=0;t<a;t++)s+=i.bR.distance(e[t],e[t+1]);let l=n||r;if(l*=.5,s<=l)return;const h=l/s;let c=0,u=-(r=s/Math.max(Math.round(s/r),1))/2;const f=e.length-1;for(let n=0;n<f;n++){const i=e[n],s=e[n+1],a=s.x-i.x,l=s.y-i.y,f=Math.sqrt(a*a+l*l);let x;for(;u+r<c+f;){u+=r;const e=(u-c)/f,y=(0,o.GW)(i.x,s.x,e),d=(0,o.GW)(i.y,s.y,e);void 0===x&&(x=Math.atan2(l,a)),t.push(new p(y,d,x,n,h))}c+=f}}static _pushCenterAnchor(t,e){let r=0;const n=e.length-1;for(let t=0;t<n;t++)r+=i.bR.distance(e[t],e[t+1]);const s=r/2;let a=0;const l=e.length-1;for(let r=0;r<l;r++){const n=e[r],i=e[r+1],l=i.x-n.x,h=i.y-n.y,c=Math.sqrt(l*l+h*h);if(s<a+c){const e=(s-a)/c,u=(0,o.GW)(n.x,i.x,e),f=(0,o.GW)(n.y,i.y,e),x=Math.atan2(h,l);return void t.push(new p(u,f,x,r,0))}a+=c}}static _deviation(t,e,r){const n=(e.x-t.x)*(r.x-e.x)+(e.y-t.y)*(r.y-e.y),i=(e.x-t.x)*(r.y-e.y)-(e.y-t.y)*(r.x-e.x);return Math.atan2(i,n)}static _honorsTextMaxAngle(t,e,r,n,s){let o=0;const a=r/2;let l=new i.bR(e.x,e.y),h=e.segment+1;for(;o>-a;){if(--h,h<0)return!1;o-=i.bR.distance(t[h],l),l=t[h]}o+=i.bR.distance(t[h],t[h+1]);const c=[];let u=0;const f=t.length;for(;o<a;){const e=t[h];let r,a=h;do{if(++a,a===f)return!1;r=t[a]}while(r.isEqual(e));let l,x=a;do{if(++x,x===f)return!1;l=t[x]}while(l.isEqual(r));const y=this._deviation(e,r,l);for(c.push({deviation:y,distToAnchor:o}),u+=y;o-c[0].distToAnchor>s;)u-=c.shift().deviation;if(Math.abs(u)>n)return!1;o+=i.bR.distance(r,l),h=a}return!0}static _smoothVertices(t,e){if(e<=0)return t;let r=t.length;if(r<3)return t;const n=[];let s=0,o=0;n.push(0);for(let e=1;e<r;e++){const r=i.bR.distance(t[e],t[e-1]);r>0&&(s+=r,n.push(s),o++,o!==e&&(t[o]=t[e]))}if(r=o+1,r<3)return t;e=Math.min(e,.2*s);const a=t[0].x,l=t[0].y,h=t[r-1].x,c=t[r-1].y,u=i.bR.sub(t[0],t[1]);u.normalize(),t[0].x+=e*u.x,t[0].y+=e*u.y,u.assignSub(t[r-1],t[r-2]),u.normalize(),t[r-1].x+=e*u.x,t[r-1].y+=e*u.y,n[0]-=e,n[r-1]+=e;const f=[];f.push(new i.bR(a,l));const x=1e-6,y=.5*e;for(let s=1;s<r-1;s++){let o=0,a=0,l=0;for(let r=s-1;r>=0;r--){const i=y+n[r+1]-n[s];if(i<0)break;const h=n[r+1]-n[r],c=n[s]-n[r]<y?1:i/h;if(c<x)break;const u=c*c,f=c*i-.5*u*h,d=c*h/e,p=t[r+1],g=t[r].x-p.x,_=t[r].y-p.y;o+=d/f*(p.x*c*i+.5*u*(i*g-h*p.x)-u*c*h*g/3),a+=d/f*(p.y*c*i+.5*u*(i*_-h*p.y)-u*c*h*_/3),l+=d}for(let i=s+1;i<r;i++){const r=y-n[i-1]+n[s];if(r<0)break;const h=n[i]-n[i-1],c=n[i]-n[s]<y?1:r/h;if(c<x)break;const u=c*c,f=c*r-.5*u*h,d=c*h/e,p=t[i-1],g=t[i].x-p.x,_=t[i].y-p.y;o+=d/f*(p.x*c*r+.5*u*(r*g-h*p.x)-u*c*h*g/3),a+=d/f*(p.y*c*r+.5*u*(r*_-h*p.y)-u*c*h*_/3),l+=d}f.push(new i.bR(o/l,a/l))}return f.push(new i.bR(h,c)),t[0].x=a,t[0].y=l,t[r-1].x=h,t[r-1].y=c,f}static _pushCentroid(t,e){const r=s._H,n=s._H,i=e.length-1;let o=0,a=0,l=0,h=e[0].x,c=e[0].y;h>r&&(h=r),h<0&&(h=0),c>n&&(c=n),c<0&&(c=0);for(let t=1;t<i;t++){let i=e[t].x,s=e[t].y,u=e[t+1].x,f=e[t+1].y;i>r&&(i=r),i<0&&(i=0),s>n&&(s=n),s<0&&(s=0),u>r&&(u=r),u<0&&(u=0),f>n&&(f=n),f<0&&(f=0);const x=(i-h)*(f-c)-(u-h)*(s-c);o+=x*(h+i+u),a+=x*(c+s+f),l+=x}o/=3*l,a/=3*l,isNaN(o)||isNaN(a)||t.push(new p(o,a))}}class K{constructor(t,e,r,n,s,a){if(this._pbfTiles={},this._tileClippers={},this._client=r,this._tile=e,this._sourceDataMaxLOD=n,a){this._styleLayerUIDs=new Set;for(const t of a)this._styleLayerUIDs.add(t)}this._styleRepository=s,this._layers=this._styleRepository?.layers??[];const[l,h,c]=e.tileKey.split("/").map(parseFloat);this._level=l;const u=(0,o.IU)(this._level);for(const e of Object.keys(t)){const r=t[e];if(this._pbfTiles[e]=new w.A(new Uint8Array(r.protobuff),new DataView(r.protobuff)),r.refKey){const[t]=r.refKey.split("/").map(parseFloat),n=l-t;if(n>0){const t=(1<<n)-1,r=h&t,s=c&t;this._tileClippers[e]=new i.O3(n,r,s,8,u)}}this._tileClippers[e]||(this._tileClippers[e]=new i.Ox)}}_canParseStyleLayer(t){return!this._styleLayerUIDs||this._styleLayerUIDs.has(t)}async parse(t){const e=(0,I.If)(),r=this._initialize(t),{returnedBuckets:n}=r;this._processLayers(r),this._linkReferences(r),this._filterFeatures(r);const i=[],s=new Set,o=(t,e)=>{s.has(t)||(i.push({name:t,repeat:e}),s.add(t))},a={};for(const t of n)t.getResources(t.tileClipper,o,a);if(4===this._tile.status)return[];const l=this._fetchResources(i,a,t);return Promise.all([...l,e]).then(()=>this._processFeatures(r.returnedBuckets))}_initialize(t){const e=t?.signal;return{signal:e,sourceNameToTileData:this._parseTileData(this._pbfTiles),layers:this._layers,zoom:this._level,sourceNameToTileClipper:this._tileClippers,sourceNameToUniqueSourceLayerBuckets:{},sourceNameToUniqueSourceLayers:{},returnedBuckets:[],layerIdToBucket:{},referencerUIDToReferencedId:new Map}}_processLayers(t){const{sourceNameToTileData:e,zoom:r,layers:n,sourceNameToTileClipper:i,sourceNameToUniqueSourceLayerBuckets:s,sourceNameToUniqueSourceLayers:o,returnedBuckets:a,layerIdToBucket:l,referencerUIDToReferencedId:h}=t,c=this._sourceDataMaxLOD;for(let t=n.length-1;t>=0;t--){const u=n[t];if(r<c){if(u.minzoom&&r<Math.floor(u.minzoom)||u.maxzoom&&r>=u.maxzoom)continue}else if(u.maxzoom&&r>=u.maxzoom)continue;if(0===u.type||!this._canParseStyleLayer(u.uid)||!e[u.source]||!i[u.source])continue;const f=e[u.source],x=i[u.source],y=u.sourceLayer,d=f[y];if(d){let t=o[u.source];if(t||(t=o[u.source]=new Set),t.add(u.sourceLayer),u.refLayerId)h.set(u.uid,u.refLayerId);else{const t=this._createBucket(u);if(t){t.layerUIDs=[u.uid],t.layerExtent=d.extent,t.tileClipper=x;let e=s[u.source];e||(e=s[u.source]={});let r=e[y];r||(r=e[y]=[]),r.push(t),a.push(t),l[u.id]=t}}}}}_linkReferences(t){const{layerIdToBucket:e,referencerUIDToReferencedId:r}=t;r.forEach((t,r)=>{e[t]&&e[t].layerUIDs.push(r)})}_filterFeatures(t){const{signal:e,sourceNameToTileData:r,sourceNameToUniqueSourceLayerBuckets:i,sourceNameToUniqueSourceLayers:s}=t,o=10*this._level,a=10*(this._level+1),l=[],h=[];for(const t of Object.keys(s))s[t].forEach(e=>{l.push(e),h.push(t)});for(let t=0;t<l.length;t++){const s=h[t],c=l[t];if(!r[s]||!i[s])continue;const u=r[s][c],f=i[s][c];if(!f||0===f.length)continue;if((0,n.G4)(e))return;let x=0;const y=u.getData();for(;y.nextTag(2);){const t=y.getMessage(),e=new v(t,u,x++);t.release();const r=e.values;if(r){const t=r._minzoom;if(t&&t>=a)continue;const e=r._maxzoom;if(e&&e<=o)continue}for(const t of f)t.pushFeature(e)}}}_fetchResources(t,e,r){const n=[],i=this._tile.getWorkerTileHandler();let s,o;t.length>0&&(s=i.fetchSprites(t,this._client,r),n.push(s));for(const t in e){const s=e[t];s.size>0&&(o=i.fetchGlyphs(this._tile.tileKey,t,s,this._client,r),n.push(o))}return n}_processFeatures(t){const e=t.filter(t=>t.hasFeatures()||this._canParseStyleLayer(t.layer.uid));for(const t of e)t.processFeatures(t.tileClipper);return e}_parseTileData(t){const e={};for(const r of Object.keys(t)){const n=t[r],i={};for(;n.next();)switch(n.tag()){case 3:{const t=n.getMessage(),e=new M(t);t.release(),i[e.name]=e;break}default:n.skip()}e[r]=i}return e}_createBucket(t){switch(t.type){case 0:return null;case 1:return this._createFillBucket(t);case 2:return this._createLineBucket(t);case 4:return this._createCircleBucket(t);case 3:return this._createSymbolBucket(t)}}_createFillBucket(t){return new U(t,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new P(t.fillMaterial.getStride()),new T,new k(t.outlineMaterial.getStride()),new T)}_createLineBucket(t){return new N(t,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new B(t.lineMaterial.getStride()),new T)}_createCircleBucket(t){return new E(t,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new S(t.circleMaterial.getStride()),new T)}_createSymbolBucket(t){const e=this._tile;return new H(e.tileKey,t,this._level,new V(t.iconMaterial.getStride()),new T,new V(t.textMaterial.getStride()),new T,e.placementEngine,e.getWorkerTileHandler())}}class Y{constructor(t,e,r,n){this.status=0,this.placementEngine=new b,this.tileKey=t,this.refKeys=e,this._workerTileHandler=r,this._styleRepository=n}release(){this.tileKey="",this.refKeys=null,this.status=0,this._workerTileHandler=null}async parse(t,e){const r=e?.signal;if(null!=r){const t=()=>{r.removeEventListener("abort",t),this.status=4};r.addEventListener("abort",t)}let i;const s={bucketsWithData:[],emptyBuckets:null};try{i=await this._parse(t,e)}catch(t){if((0,n.zf)(t))throw t;return{result:s,transferList:[]}}this.status=2;const o=s.bucketsWithData,a=[];for(const t of i)if(t.hasFeatures()){const e=t.serialize();o.push(e)}else a.push(t.layer.uid);const l=[...o];let h=null;return a.length>0&&(h=Uint32Array.from(a),l.push(h.buffer)),s.emptyBuckets=h,{result:s,transferList:l}}setObsolete(){this.status=4}getLayers(){return this._workerTileHandler.getLayers()}getWorkerTileHandler(){return this._workerTileHandler}async _parse(t,e){const r=t.sourceName2DataAndRefKey;return 0===Object.keys(r).length?[]:(this.status=3,new K(r,this,e.client,t.sourceDataMaxLOD,this._styleRepository,t.styleLayerUIDs).parse(e))}}var J=r(45013);class Q{constructor(){this._spriteInfo={},this._glyphInfo={},this._sourceDataMaxLOD=25}reset(){return this._spriteInfo={},this._glyphInfo={},Promise.resolve()}getLayers(){return this._styleRepository?.layers??[]}async createTileAndParse(t,e){const{key:r}=t,i={};for(const e of Object.keys(t.sourceName2DataAndRefKey)){const r=t.sourceName2DataAndRefKey[e];i[e]=r.refKey}const s=new Y(r,i,this,this._styleRepository);try{return await s.parse({...t,sourceDataMaxLOD:this._sourceDataMaxLOD},e)}catch(t){if(s.setObsolete(),s.release(),!(0,n.zf)(t))throw t;return null}}updateStyle(t){if(!t||0===t.length||!this._styleRepository)return;const e=this._styleRepository;for(const r of t){const t=r.type,n=r.data;switch(t){case 0:e.setPaintProperties(n.layer,n.paint);break;case 1:e.setLayoutProperties(n.layer,n.layout);break;case 3:e.deleteStyleLayer(n.layer);break;case 2:e.setStyleLayer(n.layer,n.index);break;case 4:this._spriteInfo={}}}}setStyle(t){const{style:e,sourceDataMaxLOD:r}=t;this._styleRepository=new J.A(e),this._sourceDataMaxLOD=r,this._spriteInfo={},this._glyphInfo={}}fetchSprites(t,e,r){const n=[],i=this._spriteInfo;for(const e of t)void 0===i[e.name]&&n.push(e);return 0===n.length?Promise.resolve():e.invoke("getSprites",n,{signal:r?.signal}).then(t=>{for(const e in t){const r=t[e];i[e]=r}})}getSpriteItems(){return this._spriteInfo}fetchGlyphs(t,e,r,n,i){const s=[];let o=this._glyphInfo[e];return o?r.forEach(t=>{o[t]||s.push(t)}):(o=this._glyphInfo[e]=[],r.forEach(t=>s.push(t))),0===s.length?Promise.resolve():n.invoke("getGlyphs",{tileID:t,font:e,codePoints:s},i).then(t=>{for(let e=0;e<t.length;e++)t[e]&&(o[e]=t[e])})}getGlyphItems(t){return this._glyphInfo[t]}}},18989(t,e,r){r.d(e,{A:()=>n});class n{constructor(t=0,e=0,r=0,n=0){this.x=t,this.y=e,this.width=r,this.height=n}get isEmpty(){return this.width<=0||this.height<=0}union(t){this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.width=Math.max(this.width,t.width),this.height=Math.max(this.height,t.height)}}},83773(t,e,r){r.d(e,{i:()=>y});var n=r(76213);function i(t,e){return t.x===e.x&&t.y===e.y}function s(t){if(!t)return;const e=t.length;if(e<=1)return;let r=0;for(let n=1;n<e;n++)i(t[n],t[r])||++r===n||(t[r]=t[n]);t.length=r+1}function o(t,e){return t.x=e.y,t.y=-e.x,t}function a(t,e){return t.x=-e.y,t.y=e.x,t}function l(t,e){return t.x=e.x,t.y=e.y,t}function h(t,e){return t.x=-e.x,t.y=-e.y,t}function c(t){return Math.sqrt(t.x*t.x+t.y*t.y)}function u(t,e){return t.x*e.y-t.y*e.x}function f(t,e){return t.x*e.x+t.y*e.y}function x(t,e,r,n){return t.x=e.x*r+e.y*n,t.y=e.x*n-e.y*r,t}class y{constructor(t,e,r){this._writeVertex=t,this._writeTriangle=e,this._canUseThinTessellation=r,this._prevNormal={x:void 0,y:void 0},this._nextNormal={x:void 0,y:void 0},this._textureNormalLeft={x:0,y:1},this._textureNormalRight={x:0,y:-1},this._textureNormal={x:void 0,y:void 0},this._joinNormal={x:void 0,y:void 0},this._inner={x:void 0,y:void 0},this._outer={x:void 0,y:void 0},this._roundStart={x:void 0,y:void 0},this._roundEnd={x:void 0,y:void 0},this._startBreak={x:void 0,y:void 0},this._endBreak={x:void 0,y:void 0},this._innerPrev={x:void 0,y:void 0},this._innerNext={x:void 0,y:void 0},this._bevelStart={x:void 0,y:void 0},this._bevelEnd={x:void 0,y:void 0},this._bevelMiddle={x:void 0,y:void 0}}tessellate(t,e,r=this._canUseThinTessellation){s(t),r&&e.halfWidth<n.Gh&&!e.offset?this._tessellateThin(t,e):this._tessellate(t,e)}_tessellateThin(t,e){if(t.length<2)return;const r=e.wrapDistance||65535;let n=e.initialDistance||0,i=!1,s=t[0].x,o=t[0].y;const a=t.length;for(let e=1;e<a;++e){i&&(i=!1,n=0);let a=t[e].x,l=t[e].y,h=a-s,c=l-o,u=Math.sqrt(h*h+c*c);if(h/=u,c/=u,n+u>r){i=!0;const t=(r-n)/u;u=r-n,a=(1-t)*s+t*a,l=(1-t)*o+t*l,--e}const f=this._writeVertex(s,o,0,0,h,c,c,-h,0,-1,n),x=this._writeVertex(s,o,0,0,h,c,-c,h,0,1,n);n+=u;const y=this._writeVertex(a,l,0,0,h,c,c,-h,0,-1,n),d=this._writeVertex(a,l,0,0,h,c,-c,h,0,1,n);this._writeTriangle(f,x,y),this._writeTriangle(x,y,d),s=a,o=l}}_tessellate(t,e){const r=t[0],n=t[t.length-1],s=i(r,n),y=s?3:2;if(t.length<y)return;const d=e.pixelCoordRatio,p=null!=e.capType?e.capType:0,g=null!=e.joinType?e.joinType:2,_=null!=e.miterLimit?Math.min(e.miterLimit,4):2,m=null!=e.roundLimit?Math.min(e.roundLimit,1.05):1.05,b=null!=e.halfWidth?e.halfWidth:2,w=!!e.textured;let I,v,A,T=null;const M=this._prevNormal,L=this._nextNormal;let B=-1,P=-1;const k=this._joinNormal;let V,S;const R=this._textureNormalLeft,E=this._textureNormalRight,D=this._textureNormal;let C=-1,U=-1;const F=e.wrapDistance||65535;let N=e.initialDistance||0;const z=this._writeVertex,O=this._writeTriangle,G=(t,e,r,n,i,s)=>{const o=z(v,A,V,S,r,n,t,e,i,s,N);return C>=0&&U>=0&&o>=0&&O(C,U,o),C=U,U=o,o};s&&(I=t[t.length-2],L.x=n.x-I.x,L.y=n.y-I.y,P=c(L),L.x/=P,L.y/=P);let j=!1;for(let e=0;e<t.length;++e){if(j&&(j=!1,N=0),I&&(M.x=-L.x,M.y=-L.y,B=P,N+B>F&&(j=!0)),j){const r=(F-N)/B;B=F-N,I={x:(1-r)*I.x+r*t[e].x,y:(1-r)*I.y+r*t[e].y},--e}else I=t[e];v=I.x,A=I.y;const r=e<=0&&!j,n=e===t.length-1;if(r||(N+=B),T=n?s?t[1]:null:t[e+1],T?(L.x=T.x-v,L.y=T.y-A,P=c(L),L.x/=P,L.y/=P):(L.x=void 0,L.y=void 0),!s){if(r){a(k,L),V=k.x,S=k.y,2===p&&(G(-L.y-L.x,L.x-L.y,L.x,L.y,0,-1),G(L.y-L.x,-L.x-L.y,L.x,L.y,0,1)),1===p&&(G(-L.y-L.x,L.x-L.y,L.x,L.y,-1,-1),G(L.y-L.x,-L.x-L.y,L.x,L.y,-1,1)),1!==p&&0!==p||(G(-L.y,L.x,L.x,L.y,0,-1),G(L.y,-L.x,L.x,L.y,0,1));continue}if(n){o(k,M),V=k.x,S=k.y,1!==p&&0!==p||(G(M.y,-M.x,-M.x,-M.y,0,-1),G(-M.y,M.x,-M.x,-M.y,0,1)),2===p&&(G(M.y-M.x,-M.x-M.y,-M.x,-M.y,0,-1),G(-M.y-M.x,M.x-M.y,-M.x,-M.y,0,1)),1===p&&(G(M.y-M.x,-M.x-M.y,-M.x,-M.y,1,-1),G(-M.y-M.x,M.x-M.y,-M.x,-M.y,1,1));continue}}let i,y,z=-u(M,L);if(Math.abs(z)<.01)f(M,L)>0?(k.x=M.x,k.y=M.y,z=1,i=Number.MAX_VALUE,y=!0):(a(k,L),z=1,i=1,y=!1);else{k.x=(M.x+L.x)/z,k.y=(M.y+L.y)/z,i=c(k);const t=(i-1)*b*d;y=i>4||t>B&&t>P}V=k.x,S=k.y;let O=g;switch(g){case 0:i<1.05&&(O=2);break;case 1:i<m&&(O=2);break;case 2:i>_&&(O=0)}switch(O){case 2:if(G(k.x,k.y,-M.x,-M.y,0,-1),G(-k.x,-k.y,-M.x,-M.y,0,1),n)break;if(w){const t=j?0:N;C=this._writeVertex(v,A,V,S,L.x,L.y,k.x,k.y,0,-1,t),U=this._writeVertex(v,A,V,S,L.x,L.y,-k.x,-k.y,0,1,t)}break;case 0:{const t=z<0;let e,r,i,s;if(t){const t=C;C=U,U=t,e=R,r=E}else e=E,r=R;if(y)i=t?a(this._innerPrev,M):o(this._innerPrev,M),s=t?o(this._innerNext,L):a(this._innerNext,L);else{const e=t?h(this._inner,k):l(this._inner,k);i=e,s=e}const c=t?o(this._bevelStart,M):a(this._bevelStart,M);G(i.x,i.y,-M.x,-M.y,e.x,e.y);const u=G(c.x,c.y,-M.x,-M.y,r.x,r.y);if(n)break;const f=t?a(this._bevelEnd,L):o(this._bevelEnd,L);if(y){const t=this._writeVertex(v,A,V,S,-M.x,-M.y,0,0,0,0,N);C=this._writeVertex(v,A,V,S,L.x,L.y,s.x,s.y,e.x,e.y,N),U=this._writeVertex(v,A,V,S,L.x,L.y,f.x,f.y,r.x,r.y,N),this._writeTriangle(u,t,U)}else{if(w){const t=this._bevelMiddle;t.x=(c.x+f.x)/2,t.y=(c.y+f.y)/2,x(D,t,-M.x,-M.y),G(t.x,t.y,-M.x,-M.y,D.x,D.y),x(D,t,L.x,L.y),C=this._writeVertex(v,A,V,S,L.x,L.y,t.x,t.y,D.x,D.y,N),U=this._writeVertex(v,A,V,S,L.x,L.y,s.x,s.y,e.x,e.y,N)}else{const t=C;C=U,U=t}G(f.x,f.y,L.x,L.y,r.x,r.y)}if(t){const t=C;C=U,U=t}break}case 1:{const t=z<0;let e,r;if(t){const t=C;C=U,U=t,e=R,r=E}else e=E,r=R;const s=t?h(this._inner,k):l(this._inner,k);let c,u;y?(c=t?a(this._innerPrev,M):o(this._innerPrev,M),u=t?o(this._innerNext,L):a(this._innerNext,L)):(c=s,u=s);const d=t?o(this._roundStart,M):a(this._roundStart,M),p=t?a(this._roundEnd,L):o(this._roundEnd,L),g=G(c.x,c.y,-M.x,-M.y,e.x,e.y),_=G(d.x,d.y,-M.x,-M.y,r.x,r.y);if(n)break;const m=this._writeVertex(v,A,V,S,-M.x,-M.y,0,0,0,0,N);y||this._writeTriangle(C,U,m);const b=h(this._outer,s),I=this._writeVertex(v,A,V,S,L.x,L.y,p.x,p.y,r.x,r.y,N);let T,B;const P=i>2;if(P){let e;i!==Number.MAX_VALUE?(b.x/=i,b.y/=i,e=f(M,b),e=(i*(e*e-1)+1)/e):e=-1,T=t?o(this._startBreak,M):a(this._startBreak,M),T.x+=M.x*e,T.y+=M.y*e,B=t?a(this._endBreak,L):o(this._endBreak,L),B.x+=L.x*e,B.y+=L.y*e}x(D,b,-M.x,-M.y);const F=this._writeVertex(v,A,V,S,-M.x,-M.y,b.x,b.y,D.x,D.y,N);x(D,b,L.x,L.y);const O=w?this._writeVertex(v,A,V,S,L.x,L.y,b.x,b.y,D.x,D.y,N):F,j=m,W=w?this._writeVertex(v,A,V,S,L.x,L.y,0,0,0,0,N):m;let Z=-1,q=-1;if(P&&(x(D,T,-M.x,-M.y),Z=this._writeVertex(v,A,V,S,-M.x,-M.y,T.x,T.y,D.x,D.y,N),x(D,B,L.x,L.y),q=this._writeVertex(v,A,V,S,L.x,L.y,B.x,B.y,D.x,D.y,N)),w?P?(this._writeTriangle(j,_,Z),this._writeTriangle(j,Z,F),this._writeTriangle(W,O,q),this._writeTriangle(W,q,I)):(this._writeTriangle(j,_,F),this._writeTriangle(W,O,I)):P?(this._writeTriangle(m,_,Z),this._writeTriangle(m,Z,q),this._writeTriangle(m,q,I)):(this._writeTriangle(m,_,F),this._writeTriangle(m,O,I)),y?(C=this._writeVertex(v,A,V,S,L.x,L.y,u.x,u.y,e.x,e.y,N),U=I):(C=w?this._writeVertex(v,A,V,S,L.x,L.y,u.x,u.y,e.x,e.y,N):g,this._writeTriangle(C,W,I),U=I),t){const t=C;C=U,U=t}break}}}}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6569],{40876(e,t,r){r.d(t,{Eq:()=>f,G1:()=>y,TS:()=>a,Tf:()=>v,V6:()=>i,Vm:()=>h,ay:()=>l,c1:()=>g,c4:()=>s,j5:()=>u,lT:()=>d,oW:()=>c,xV:()=>w});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 i(e){return!!n[e]||!!n[e.toLowerCase()]}function a(e){return n[e]??n[e.toLowerCase()]}function s(e){return[...a(e)]}function o(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 i=(e%360+360)%360/360,a=r<=.5?r*(t+1):r+t-r*t,s=2*r-a;return[Math.round(255*o(s,a,i+1/3)),Math.round(255*o(s,a,i)),Math.round(255*o(s,a,i-1/3)),n]}function u(e){const t=e.length>5,r=t?8:4,n=(1<<r)-1,i=t?1:17,a=t?9===e.length:5===e.length;let s=Number("0x"+e.slice(1));if(isNaN(s))return null;const o=[0,0,0,1];let l;return a&&(l=s&n,s>>=r,o[3]=i*l/255),l=s&n,s>>=r,o[2]=i*l,l=s&n,s>>=r,o[1]=i*l,l=s&n,s>>=r,o[0]=i*l,o}function c(e){if(!e.startsWith("#")||isNaN(Number(`0x${e.slice(1)}`)))return null;switch(e.length){case 4:case 5:{const t=parseInt(e.slice(1,2),16),r=parseInt(e.slice(2,3),16),n=parseInt(e.slice(3,4),16),i=4===e.length?15:parseInt(e.slice(4),16);return[t+16*t,r+16*r,n+16*n,(i+16*i)/255]}case 7:case 9:return[parseInt(e.slice(1,3),16),parseInt(e.slice(3,5),16),parseInt(e.slice(5,7),16),(7===e.length?255:parseInt(e.slice(7),16))/255];default:return null}}function d(e){const t=e.toLowerCase().match(/^(rgba?|hsla?)\(([\s.\-,%0-9]+)\)/);if(t){const e=t[2].split(/\s*,\s*/),r=t[1];if("rgb"===r&&3===e.length||"rgba"===r&&4===e.length){if(e[0].endsWith("%")){const t=e.map(e=>2.56*parseFloat(e));return 4===e.length&&(t[3]=parseFloat(e[3])),p(t)}return p(e.map(e=>parseFloat(e)))}if("hsl"===r&&3===e.length||"hsla"===r&&4===e.length)return l(parseFloat(e[0]),parseFloat(e[1])/100,parseFloat(e[2])/100,parseFloat(e[3]??"1"))}return null}function p(e){return e[0]=g(e[0]),e[1]=g(e[1]),e[2]=g(e[2]),e[3]=4===e.length?y(e[3]):1,e}function f(e){let t=i(e)?a(e):null;return t??=d(e),t??=c(e),t}function h(e){const t=f(e);return null!=t?[t[0]/255,t[1]/255,t[2]/255,t[3]]:null}function y(e){return m(e,0,1)}function g(e){return Math.round(m(e,0,255))}function m(e,t,r){return e=Number(e),isNaN(e)?r:e<t?t:e>r?r:e}const v=2.2,b=1/v;function w(e){return e**b}},38961(e,t,r){r.d(t,{A:()=>c});var n=r(5482),i=r(7762),a=r(36708),s=r(10107),o=r(64108),l=r(80559);let u=class extends i.A{constructor(e){super(e),this.getCollections=null}initialize(){this.addHandles((0,l.fm)(()=>this._refresh(),a.OH))}destroy(){this.getCollections=null}_refresh(){const e=this.getCollections?.();if(null==e)return void this.removeAll();let t=0;for(const r of e)null!=r&&(t=this._processCollection(t,r));this.splice(t)}_createNewInstance(e){return new i.A(e)}_processCollection(e,t){if(!t)return e;const r=this.itemFilterFunction??(e=>!!e);for(const n of t)if(n){if(r(n)){const t=this.indexOf(n,e);t>=0?t!==e&&this.reorder(n,e):this.add(n,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(n);if(Array.isArray(t))for(const r of t)e=this._processCollection(e,r);else e=this._processCollection(e,t)}}return e}};(0,n.Cg)([(0,s.MZ)()],u.prototype,"getCollections",void 0),(0,n.Cg)([(0,s.MZ)()],u.prototype,"getChildrenFunction",void 0),(0,n.Cg)([(0,s.MZ)()],u.prototype,"itemFilterFunction",void 0),u=(0,n.Cg)([(0,o.$)("esri.core.CollectionFlattener")],u);const c=u},60999(e,t,r){r.d(t,{DZ:()=>h,Ke:()=>f,Tj:()=>c,UT:()=>y,aD:()=>m,jJ:()=>u});var n=r(5482),i=r(69622),a=r(97768),s=r(17676),o=r(10107),l=r(64108);function u(e,t,r){return(0,s.Lx)(e.map((e,n)=>t.apply(r,[e,n])))}async function c(e,t,r){return(await(0,s.Lx)(e.map((e,n)=>t.apply(r,[e,n])))).map(e=>e.value)}function d(e){return{ok:!0,value:e}}function p(e){return{ok:!1,error:e}}async function f(e){if(null==e)return{ok:!1,error:new Error("no promise provided")};try{return d(await e)}catch(e){return p(e)}}async function h(e){try{return d(await e)}catch(e){return(0,s.QP)(e),p(e)}}function y(e,t){return new g(e,t)}let g=class extends i.A{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,a.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:r}=this._abortController;this.promise=e(r),this.promise.then(e=>{this._result=d(e),this._cleanup()},e=>{this._result=p(e),this._cleanup()}),this._abortHandle=(0,s.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,a.xt)(this._abortHandle),this._abortController=null}};(0,n.Cg)([(0,o.MZ)()],g.prototype,"value",null),(0,n.Cg)([(0,o.MZ)()],g.prototype,"error",null),(0,n.Cg)([(0,o.MZ)()],g.prototype,"finished",null),(0,n.Cg)([(0,o.MZ)()],g.prototype,"promise",void 0),(0,n.Cg)([(0,o.MZ)()],g.prototype,"_result",void 0),g=(0,n.Cg)([(0,l.$)("esri.core.asyncUtils.ReactiveTask")],g);class m{constructor(){this._sequence=Promise.resolve()}async acquire(){let e;this._sequence=new Promise(t=>{e=this._sequence.then(()=>t,()=>t)});const t=await e;return{[Symbol.dispose]:t}}async run(e){const t={stack:[],error:void 0,hasError:!1};try{return(0,n.mS)(t,await this.acquire(),!1),await e()}catch(e){t.error=e,t.hasError=!0}finally{(0,n.hk)(t)}}}},62885(e,t,r){r.d(t,{H:()=>a,V:()=>i});var n=r(7762);function i(e,t,r=n.A){return t||(t=new r),t===e||t.destroyed||(t.removeAll(),(i=e)&&(Array.isArray(i)||"items"in i&&Array.isArray(i.items))?t.addMany(e):e&&t.add(e)),t;var i}function a(e){return e}},81583(e,t,r){r.d(t,{L:()=>o,g:()=>s});var n=r(60999),i=r(7762),a=r(92474);async function s(e,t){return await e.load(),o(e,t)}async function o(e,t){const r=[],s=(...e)=>{for(const t of e)null!=t&&(Array.isArray(t)?s(...t):i.A.isCollection(t)?t.forEach(e=>s(e)):(0,a.Zm)(t)&&r.push(t))};t(s);let o=null;if(await(0,n.Tj)(r,async e=>{const t=await(0,n.Ke)(function(e){return"loadAll"in e&&"function"==typeof e.loadAll}(e)?e.loadAll():e.load());!1!==t.ok||o||(o=t)}),o)throw o.error;return e}},90629(e,t,r){r.d(t,{Lz:()=>i,PN:()=>a,cr:()=>s,gs:()=>l,r_:()=>u,tc:()=>o}),r(39829);const n=/^-?(\d+(\.\d+)?)\s*((px)|(pt))?$/i;function i(e){return e?e/72*96:0}function a(e){return e?72*e/96:0}function s(e){if("string"==typeof e){const t=e.match(n);if(t){const r=Number(t[1]),n=t[3]&&t[3].toLowerCase(),i=e.startsWith("-"),s="px"===n?a(r):r;return i?-s:s}return console.warn("screenUtils.toPt: input not recognized!"),null}return e}function o(e=0,t=0){return{x:e,y:t}}function l(e=0,t=0){return[e,t]}function u(e=0,t=0,r=0){return[e,t,r]}},85989(e,t,r){r.r(t),r.d(t,{default:()=>U});var n=r(5482),i=r(38961),a=r(81583),s=r(53966),o=r(25728),l=r(17676),u=r(36708),c=r(91429),d=r(88620),p=r(16930),f=r(4146),h=r(63074),y=r(34287),g=r(8303),m=r(25036),v=r(75356),b=r(2976),w=r(80812),A=r(7762),C=r(62885);function x(e,t,r){let n,i;if(e)for(let a=0,s=e.length;a<s;a++){if(n=e.at(a),n?.[t]===r)return n;if("group"===n?.type&&(i=x(n.layers,t,r),i))return i}}const I=e=>{const t=e;let r=class extends t{constructor(...e){super(...e),this.layers=new A.A;const t=e=>{e.parent=this,this.layerAdded(e),"elevation"!==e.type&&"base-elevation"!==e.type||s.A.getLogger(this).error(`Layer 'title:${e.title}, id:${e.id}' of type '${e.type}' is not supported as an operational layer and will therefore be ignored.`)},r=e=>{e.parent=null,this.layerRemoved(e)};this.addHandles([this.layers.on("before-add",e=>{if(e.item===this)return e.preventDefault(),void s.A.getLogger(this).error("#add()","Cannot add layer to itself.");(e=>{e.parent&&e.removeFromParent()})(e.item)}),this.layers.on("after-add",e=>t(e.item)),this.layers.on("after-remove",e=>r(e.item))])}destroy(){const e=this.layers.toArray();for(const t of e)t.destroy();this.layers.destroy()}removeChildLayer(e){this.layers.remove(e),super.removeChildLayer?.(e)}get layers(){return this._get("layers")}set layers(e){this._set("layers",(0,C.V)(e,this._get("layers")))}add(e,t){const r=this.layers;if(t=r.getNextIndex(t),e instanceof f.A){const n=e;n.parent===this?this.reorder(n,t):r.add(n,t)}else(0,l.$X)(e)?e.then(e=>{this.destroyed||this.add(e,t)}):s.A.getLogger(this).error("#add()","The item being added is not a Layer or a Promise that resolves to a Layer.")}addMany(e,t){const r=this.layers;let n=r.getNextIndex(t);e.slice().forEach(e=>{e.parent!==this?(r.add(e,n),n+=1):this.reorder(e,n)})}findLayerById(e){return x(this.layers,"id",e)}findLayerByUid(e){return x(this.layers,"uid",e)}remove(e){return this.layers.remove(e)}removeMany(e){return this.layers.removeMany(e)}removeAll(){return this.layers.removeAll()}reorder(e,t){return this.layers.reorder(e,t)}layerAdded(e){}layerRemoved(e){}};return(0,n.Cg)([(0,c.MZ)()],r.prototype,"layers",null),r=(0,n.Cg)([(0,c.$K)("esri.support.LayersMixin")],r),r},L=new Set(["feature","subtype-group"]);function M(e,t,r){if(e)for(let n=0,i=e.length;n<i;n++){const i=e.at(n);if(i[t]===r)return i;if("group"===i?.type){const e=M(i.tables,t,r);if(e)return e}}}const S=e=>{const t=e;let r=class extends t{constructor(...e){super(...e),this.tables=new A.A,this.addHandles([this.tables.on("after-add",e=>{const t=e.item;t.parent&&t.parent!==this&&t.removeFromParent(),t.parent=this,L.has(t.type)||s.A.getLogger(this).error(`Layer 'title:${t.title}, id:${t.id}' of type '${t.type}' is not supported as a table and will therefore be ignored.`)}),this.tables.on("after-remove",e=>{e.item.parent=null})])}destroy(){const e=this.tables.toArray();for(const t of e)t.destroy();this.tables.destroy()}removeChildLayer(e){this.tables.remove(e),super.removeChildLayer?.(e)}get tables(){return this._get("tables")}set tables(e){this._set("tables",(0,C.V)(e,this._get("tables")))}findTableById(e){return M(this.tables,"id",e)}findTableByUid(e){return M(this.tables,"uid",e)}};return(0,n.Cg)([(0,c.MZ)()],r.prototype,"tables",null),r=(0,n.Cg)([(0,c.$K)("esri.support.TablesMixin")],r),r},_=Symbol("WebScene");var k=r(26121),F=r(751),P=r(43937),$=r(36005);let E=class extends((0,h.dM)((0,m.j)((0,y.q)((0,g.A)(S(I((0,o.M)(f.A)))))))){constructor(e){var t;super(e),this._allLayers=new i.A({getCollections:()=>[this.layers],getChildrenFunction:e=>"layers"in e?e.layers:null}),this.allTables=(t=this,new i.A({getCollections:()=>[t.tables,t.layers],getChildrenFunction:e=>{const t=[];return"tables"in e&&t.push(e.tables),"layers"in e&&t.push(e.layers),t},itemFilterFunction:e=>{const t=e.parent;return!!t&&"tables"in t&&t.tables.includes(e)}})),this.fullExtent=void 0,this.operationalLayerType="GroupLayer",this.spatialReference=void 0,this.type="group",this._debouncedSaveOperations=(0,l.sg)(async(e,t,n)=>{const{save:i,saveAs:a}=await r.e(2958).then(r.bind(r,32958));switch(e){case 0:return i(this,t);case 1:return a(this,n,t)}})}initialize(){this._enforceVisibility(this.visibilityMode,this.visible),this.addHandles([(0,u.wB)(()=>{let e=this.parent;for(;e&&"parent"in e&&e.parent;)e=e.parent;return e&&_ in e},e=>{const t="prevent-adding-tables";this.removeHandles(t),e&&(this.tables.removeAll(),this.addHandles((0,u.on)(()=>this.tables,"before-add",e=>{e.preventDefault(),s.A.getLogger(this).errorOnce("tables","tables in group layers in a webscene are not supported. Please move the tables from the group layer to the webscene if you want to persist them.")}),t))},u.pc),(0,u.wB)(()=>this.visible,this._onVisibilityChange.bind(this),u.OH)])}destroy(){this.allLayers.destroy(),this.allTables.destroy()}get allLayers(){return this._allLayers}get sourceIsPortalItem(){return this.portalItem&&7===this.originIdOf("portalItem")}_writeLayers(e,t,r,n){const i=[];if(!e)return i;e.forEach(e=>{const t=(0,F.CJ)(e,n.webmap?n.webmap.getLayerJSONFromResourceInfo(e):null,n);t?.layerType&&i.push(t)}),t.layers=i}set portalItem(e){this._set("portalItem",e)}readPortalItem(e,t,r){const{itemId:n,layerType:i}=t;if("GroupLayer"===i&&n)return new w.default({id:n,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}set visibilityMode(e){const t=this._get("visibilityMode")!==e;this._set("visibilityMode",e),t&&this._enforceVisibility(e,this.visible)}async beforeSave(){return(0,k.dL)(this)}load(e){const t=this.loadFromPortal({supportedTypes:["Feature Service","Feature Collection","Group Layer","Scene Service","Video Service"],layerModuleTypeMap:b.U,populateGroupLayer:v.N},e).catch(e=>{if((0,l.QP)(e),this.sourceIsPortalItem)throw e});return this.addResolvingPromise(t),Promise.resolve(this)}async loadAll(){return(0,a.g)(this,e=>{e(this.layers,this.tables)})}async save(e){return this._debouncedSaveOperations(0,e)}async saveAs(e,t){return this._debouncedSaveOperations(1,t,e)}layerAdded(e){e.visible&&"exclusive"===this.visibilityMode?this._turnOffOtherLayers(e):"inherited"===this.visibilityMode&&(e.visible=this.visible),this.hasHandles(e.uid)?console.error(`Layer read to Grouplayer: uid=${e.uid}`):this.addHandles((0,u.wB)(()=>e.visible,t=>this._onChildVisibilityChange(e,t),u.OH),e.uid)}layerRemoved(e){this.removeHandles(e.uid),this._enforceVisibility(this.visibilityMode,this.visible)}_turnOffOtherLayers(e){this.layers.forEach(t=>{t!==e&&(t.visible=!1)})}_enforceVisibility(e,t){if(!(0,d.oY)(this).initialized)return;const r=this.layers;let n=r.find(e=>e.visible);switch(e){case"exclusive":r.length&&!n&&(n=r.at(0),n.visible=!0),this._turnOffOtherLayers(n);break;case"inherited":r.forEach(e=>{e.visible=t})}}_onVisibilityChange(e){"inherited"===this.visibilityMode&&this.layers.forEach(t=>{t.visible=e})}_onChildVisibilityChange(e,t){switch(this.visibilityMode){case"exclusive":t?this._turnOffOtherLayers(e):this._isAnyLayerVisible()||(e.visible=!0);break;case"inherited":e.visible=this.visible}}_isAnyLayerVisible(){return this.layers.some(e=>e.visible)}};(0,n.Cg)([(0,c.MZ)({readOnly:!0})],E.prototype,"allLayers",null),(0,n.Cg)([(0,c.MZ)({readOnly:!0})],E.prototype,"allTables",void 0),(0,n.Cg)([(0,c.MZ)({json:{read:!0,write:!0}})],E.prototype,"blendMode",void 0),(0,n.Cg)([(0,c.MZ)()],E.prototype,"fullExtent",void 0),(0,n.Cg)([(0,c.MZ)({readOnly:!0})],E.prototype,"sourceIsPortalItem",null),(0,n.Cg)([(0,c.MZ)({json:{read:!1,write:{ignoreOrigin:!0}}})],E.prototype,"layers",void 0),(0,n.Cg)([(0,P.K)("layers")],E.prototype,"_writeLayers",null),(0,n.Cg)([(0,c.MZ)({type:["GroupLayer"]})],E.prototype,"operationalLayerType",void 0),(0,n.Cg)([(0,c.MZ)({json:{origins:{"web-map":{read:!1,write:{overridePolicy(e,t,r){return{enabled:"Group Layer"===e?.type&&r?.initiator!==this}}}},"web-scene":{read:!1,write:!1}}}})],E.prototype,"portalItem",null),(0,n.Cg)([(0,$.w)("web-map","portalItem",["itemId"])],E.prototype,"readPortalItem",null),(0,n.Cg)([(0,P.K)("web-map","portalItem",{itemId:{type:String}})],E.prototype,"writePortalItem",null),(0,n.Cg)([(0,c.MZ)({type:p.A})],E.prototype,"spatialReference",void 0),(0,n.Cg)([(0,c.MZ)({json:{read:!1},readOnly:!0,value:"group"})],E.prototype,"type",void 0),(0,n.Cg)([(0,c.MZ)({type:["independent","inherited","exclusive"],value:"independent",json:{write:!0,origins:{"web-map":{type:["independent","exclusive"],write:(e,t,r)=>{"inherited"!==e&&(t[r]=e)}}}}})],E.prototype,"visibilityMode",null),E=(0,n.Cg)([(0,c.$K)("esri.layers.GroupLayer")],E);const U=E},76369(e,t,r){r.d(t,{LF:()=>C,M9:()=>x});var n=r(49186),i=r(93637),a=r(40876),s=r(59247),o=r(27865);class l extends SyntaxError{constructor(e,t,r,n){super(e),this.expected=t,this.found=r,this.location=n,this.name="SyntaxError"}format(e){let t="Error: "+this.message;if(this.location){let r=null;const n=e.find(e=>e.source===this.location.source);n&&(r=n.text.split(/\r\n|\n|\r/g));const i=this.location.start,a=this.location.source&&"function"==typeof this.location.source.offset?this.location.source.offset(i):i,s=this.location.source+":"+a.line+":"+a.column;if(r){const e=this.location.end,n="".padEnd(a.line.toString().length," "),o=r[i.line-1],l=(i.line===e.line?e.column:o.length+1)-i.column||1;t+="\n --\x3e "+s+"\n"+n+" |\n"+a.line+" | "+o+"\n"+n+" | "+"".padEnd(i.column-1," ")+"".padEnd(l,"^")}else t+="\n at "+s}return t}static buildMessage(e,t){function r(e){return e.codePointAt(0).toString(16).toUpperCase()}const n=Object.prototype.hasOwnProperty.call(RegExp.prototype,"unicode")?new RegExp("[\\p{C}\\p{Mn}\\p{Mc}]","gu"):null;function i(e){return n?e.replace(n,e=>"\\u{"+r(e)+"}"):e}function a(e){return i(e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,e=>"\\x0"+r(e)).replace(/[\x10-\x1F\x7F-\x9F]/g,e=>"\\x"+r(e)))}function s(e){return i(e.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,e=>"\\x0"+r(e)).replace(/[\x10-\x1F\x7F-\x9F]/g,e=>"\\x"+r(e)))}const o={literal:e=>'"'+a(e.text)+'"',class(e){const t=e.parts.map(e=>Array.isArray(e)?s(e[0])+"-"+s(e[1]):s(e));return"["+(e.inverted?"^":"")+t.join("")+"]"+(e.unicode?"u":"")},any:()=>"any character",end:()=>"end of input",other:e=>e.description};function l(e){return o[e.type](e)}return"Expected "+function(e){const t=e.map(l);if(t.sort(),t.length>0){let e=1;for(let r=1;r<t.length;r++)t[r-1]!==t[r]&&(t[e]=t[r],e++);t.length=e}switch(t.length){case 1:return t[0];case 2:return t[0]+" or "+t[1];default:return t.slice(0,-1).join(", ")+", or "+t[t.length-1]}}(e)+" but "+function(e){return e?'"'+a(e)+'"':"end of input"}(t)+" found."}}function u(e){if(!e||0===e.length)return null;if("string"==typeof e){const t=c(e);return t&&0!==t.length?t:null}const t=e.map(e=>{if(!Number.isFinite(e.scale)||e.scale<=0)throw new n.A("effect:invalid-scale","scale must be finite and greater than 0",{stop:e});return{scale:e.scale,effects:c(e.value)}});t.sort((e,t)=>t.effects.length-e.effects.length);for(let e=0;e<t.length-1;e++){if(!(0,o.mj)(t[e].effects,t[e+1].effects))throw new n.A("effect:interpolation-impossible","Cannot interpolate by scale between 2 lists of mixed effects",{a:t[e].effects,b:t[e+1].effects});(0,o.O9)(t[e].effects,t[e+1].effects)}return t.sort((e,t)=>t.scale-e.scale),t}function c(e){let t;if(!e)return[];try{t=function(e,t){const r={},n=(t=void 0!==t?t:{}).grammarSource,i={start:Ae};let a=Ae;const s="none",o=")",u=",",c="(",d="%",p="px",f="cm",h="mm",y="in",g="pt",m="pc",v="deg",b="rad",w="grad",A="turn",C="#",x=".",I="e",L=/^[ \t\n\r]/,M=/^[a-z\-]/,S=/^[0-9a-fA-F]/,_=/^[+\-]/,k=/^[0-9]/,F=me("none"),P=ye("none",!1),$=ye(")",!1),E=ye(",",!1),U=ge([" ","\t","\n","\r"],!1,!1,!1),T=me("function"),O=ye("(",!1),H=me("identifier"),Z=ge([["a","z"],"-"],!1,!1,!1),N=me("percentage"),R=ye("%",!1),j=me("length"),q=ye("px",!1),G=ye("cm",!1),V=ye("mm",!1),D=ye("in",!1),K=ye("pt",!1),B=ye("pc",!1),z=me("angle"),W=ye("deg",!1),Q=ye("rad",!1),J=ye("grad",!1),X=ye("turn",!1),Y=me("number"),ee=me("color"),te=ye("#",!1),re=ge([["0","9"],["a","f"],["A","F"]],!1,!1,!1),ne=ge(["+","-"],!1,!1,!1),ie=ge([["0","9"]],!1,!1,!1),ae=ye(".",!1),se=ye("e",!1);let oe=0|t.peg$currPos,le=oe;const ue=[{line:1,column:1}];let ce,de=oe,pe=t.peg$maxFailExpected||[],fe=0|t.peg$silentFails;if(t.startRule){if(!(t.startRule in i))throw new Error("Can't start parsing from rule \""+t.startRule+'".');a=i[t.startRule]}function he(){return e.substring(le,oe)}function ye(e,t){return{type:"literal",text:e,ignoreCase:t}}function ge(e,t,r,n){return{type:"class",parts:e,inverted:t,ignoreCase:r,unicode:n}}function me(e){return{type:"other",description:e}}function ve(t){let r,n=ue[t];if(n)return n;if(t>=ue.length)r=ue.length-1;else for(r=t;!ue[--r];);for(n=ue[r],n={line:n.line,column:n.column};r<t;)10===e.charCodeAt(r)?(n.line++,n.column=1):n.column++,r++;return ue[t]=n,n}function be(e,t,r){const i=ve(e),a=ve(t);return{source:n,start:{offset:e,line:i.line,column:i.column},end:{offset:t,line:a.line,column:a.column}}}function we(e){oe<de||(oe>de&&(de=oe,pe=[]),pe.push(e))}function Ae(){let e;return e=Ce(),e===r&&(e=function(){let e,t;if(e=[],t=xe(),t!==r)for(;t!==r;)e.push(t),t=xe();else e=r;return e}()),e}function Ce(){let t,n;return fe++,t=oe,Le(),e.substr(oe,4)===s?(n=s,oe+=4):(n=r,0===fe&&we(P)),n!==r?(Le(),le=t,t=[]):(oe=t,t=r),fe--,t===r&&0===fe&&we(F),t}function xe(){let t,n,i,a;return t=oe,Le(),n=function(){let t,n,i;return fe++,t=oe,n=Me(),n!==r?(40===e.charCodeAt(oe)?(i=c,oe++):(i=r,0===fe&&we(O)),i!==r?(le=t,t=n):(oe=t,t=r)):(oe=t,t=r),fe--,t===r&&(n=r,0===fe&&we(T)),t}(),n!==r?(Le(),i=function(){let t,n,i,a,s,o,l,c;if(t=oe,n=Ie(),n!==r){for(i=[],a=oe,s=Le(),44===e.charCodeAt(oe)?(o=u,oe++):(o=r,0===fe&&we(E)),o===r&&(o=null),l=Le(),c=Ie(),c!==r?(s=[s,o,l,c],a=s):(oe=a,a=r);a!==r;)i.push(a),a=oe,s=Le(),44===e.charCodeAt(oe)?(o=u,oe++):(o=r,0===fe&&we(E)),o===r&&(o=null),l=Le(),c=Ie(),c!==r?(s=[s,o,l,c],a=s):(oe=a,a=r);le=t,t=function(e,t){return t.length>0?function(e,t){return[e].concat(function(e){return e.map(function(e){return e[3]})}(t))}(e,t):[e]}(n,i)}else oe=t,t=r;return t}(),i===r&&(i=null),Le(),41===e.charCodeAt(oe)?(a=o,oe++):(a=r,0===fe&&we($)),a!==r?(Le(),le=t,t=function(e,t){return{type:"function",name:e,parameters:t||[]}}(n,i)):(oe=t,t=r)):(oe=t,t=r),t}function Ie(){let e,t;return e=oe,t=Se(),t===r&&(t=_e(),t===r&&(t=ke(),t===r&&(t=function(){let e,t;return fe++,e=oe,Le(),t=Pe(),t!==r?(le=e,e=function(e){return{value:e,unit:null}}(t)):(oe=e,e=r),fe--,e===r&&0===fe&&we(Y),e}()))),t!==r&&(le=e,t=function(e){return{type:"quantity",value:e.value,unit:e.unit}}(t)),e=t,e===r&&(e=oe,t=Fe(),t!==r&&(le=e,t=function(e){return{type:"color",colorType:e.type,value:e.value}}(t)),e=t),e}function Le(){let t,n;for(fe++,t=[],n=e.charAt(oe),L.test(n)?oe++:(n=r,0===fe&&we(U));n!==r;)t.push(n),n=e.charAt(oe),L.test(n)?oe++:(n=r,0===fe&&we(U));return fe--,t}function Me(){let t,n,i;if(fe++,t=oe,n=[],i=e.charAt(oe),M.test(i)?oe++:(i=r,0===fe&&we(Z)),i!==r)for(;i!==r;)n.push(i),i=e.charAt(oe),M.test(i)?oe++:(i=r,0===fe&&we(Z));else n=r;return n!==r&&(le=t,n=he()),t=n,fe--,t===r&&(n=r,0===fe&&we(H)),t}function Se(){let t,n,i;return fe++,t=oe,Le(),n=Pe(),n!==r?(37===e.charCodeAt(oe)?(i=d,oe++):(i=r,0===fe&&we(R)),i!==r?(le=t,t=function(e){return{value:e,unit:"%"}}(n)):(oe=t,t=r)):(oe=t,t=r),fe--,t===r&&0===fe&&we(N),t}function _e(){let t,n,i;return fe++,t=oe,Le(),n=Pe(),n!==r?(e.substr(oe,2)===p?(i=p,oe+=2):(i=r,0===fe&&we(q)),i!==r?(le=t,t=function(e){return{value:e,unit:"px"}}(n)):(oe=t,t=r)):(oe=t,t=r),t===r&&(t=oe,Le(),n=Pe(),n!==r?(e.substr(oe,2)===f?(i=f,oe+=2):(i=r,0===fe&&we(G)),i!==r?(le=t,t=function(e){return{value:e,unit:"cm"}}(n)):(oe=t,t=r)):(oe=t,t=r),t===r&&(t=oe,Le(),n=Pe(),n!==r?(e.substr(oe,2)===h?(i=h,oe+=2):(i=r,0===fe&&we(V)),i!==r?(le=t,t=function(e){return{value:e,unit:"mm"}}(n)):(oe=t,t=r)):(oe=t,t=r),t===r&&(t=oe,Le(),n=Pe(),n!==r?(e.substr(oe,2)===y?(i=y,oe+=2):(i=r,0===fe&&we(D)),i!==r?(le=t,t=function(e){return{value:e,unit:"in"}}(n)):(oe=t,t=r)):(oe=t,t=r),t===r&&(t=oe,Le(),n=Pe(),n!==r?(e.substr(oe,2)===g?(i=g,oe+=2):(i=r,0===fe&&we(K)),i!==r?(le=t,t=function(e){return{value:e,unit:"pt"}}(n)):(oe=t,t=r)):(oe=t,t=r),t===r&&(t=oe,Le(),n=Pe(),n!==r?(e.substr(oe,2)===m?(i=m,oe+=2):(i=r,0===fe&&we(B)),i!==r?(le=t,t=function(e){return{value:e,unit:"pc"}}(n)):(oe=t,t=r)):(oe=t,t=r)))))),fe--,t===r&&0===fe&&we(j),t}function ke(){let t,n,i;return fe++,t=oe,n=Pe(),n!==r?(e.substr(oe,3)===v?(i=v,oe+=3):(i=r,0===fe&&we(W)),i!==r?(le=t,t=function(e){return{value:e,unit:"deg"}}(n)):(oe=t,t=r)):(oe=t,t=r),t===r&&(t=oe,n=Pe(),n!==r?(e.substr(oe,3)===b?(i=b,oe+=3):(i=r,0===fe&&we(Q)),i!==r?(le=t,t=function(e){return{value:e,unit:"rad"}}(n)):(oe=t,t=r)):(oe=t,t=r),t===r&&(t=oe,n=Pe(),n!==r?(e.substr(oe,4)===w?(i=w,oe+=4):(i=r,0===fe&&we(J)),i!==r?(le=t,t=function(e){return{value:e,unit:"grad"}}(n)):(oe=t,t=r)):(oe=t,t=r),t===r&&(t=oe,n=Pe(),n!==r?(e.substr(oe,4)===A?(i=A,oe+=4):(i=r,0===fe&&we(X)),i!==r?(le=t,t=function(e){return{value:e,unit:"turn"}}(n)):(oe=t,t=r)):(oe=t,t=r)))),fe--,t===r&&(n=r,0===fe&&we(z)),t}function Fe(){let t,n,i,a;if(fe++,t=oe,35===e.charCodeAt(oe)?(n=C,oe++):(n=r,0===fe&&we(te)),n!==r){if(i=[],a=e.charAt(oe),S.test(a)?oe++:(a=r,0===fe&&we(re)),a!==r)for(;a!==r;)i.push(a),a=e.charAt(oe),S.test(a)?oe++:(a=r,0===fe&&we(re));else i=r;i!==r?(le=t,t={type:"hex",value:he()}):(oe=t,t=r)}else oe=t,t=r;return t===r&&(t=oe,n=xe(),n!==r&&(le=t,n=function(e){return{type:"function",value:e}}(n)),t=n,t===r&&(t=oe,n=Me(),n!==r&&(le=t,n={type:"named",value:he()}),t=n)),fe--,t===r&&(n=r,0===fe&&we(ee)),t}function Pe(){let t,n,i,a,s,o,l,u;for(t=oe,n=e.charAt(oe),_.test(n)?oe++:(n=r,0===fe&&we(ne)),n===r&&(n=null),i=oe,a=[],s=e.charAt(oe),k.test(s)?oe++:(s=r,0===fe&&we(ie));s!==r;)a.push(s),s=e.charAt(oe),k.test(s)?oe++:(s=r,0===fe&&we(ie));if(46===e.charCodeAt(oe)?(s=x,oe++):(s=r,0===fe&&we(ae)),s!==r){if(o=[],l=e.charAt(oe),k.test(l)?oe++:(l=r,0===fe&&we(ie)),l!==r)for(;l!==r;)o.push(l),l=e.charAt(oe),k.test(l)?oe++:(l=r,0===fe&&we(ie));else o=r;o!==r?(a=[a,s,o],i=a):(oe=i,i=r)}else oe=i,i=r;if(i===r)if(i=[],a=e.charAt(oe),k.test(a)?oe++:(a=r,0===fe&&we(ie)),a!==r)for(;a!==r;)i.push(a),a=e.charAt(oe),k.test(a)?oe++:(a=r,0===fe&&we(ie));else i=r;if(i!==r){if(a=oe,101===e.charCodeAt(oe)?(s=I,oe++):(s=r,0===fe&&we(se)),s!==r){if(o=e.charAt(oe),_.test(o)?oe++:(o=r,0===fe&&we(ne)),o===r&&(o=null),l=[],u=e.charAt(oe),k.test(u)?oe++:(u=r,0===fe&&we(ie)),u!==r)for(;u!==r;)l.push(u),u=e.charAt(oe),k.test(u)?oe++:(u=r,0===fe&&we(ie));else l=r;l!==r?(s=[s,o,l],a=s):(oe=a,a=r)}else oe=a,a=r;a===r&&(a=null),le=t,t=parseFloat(he())}else oe=t,t=r;return t}ce=a();const $e=ce!==r&&oe===e.length;function Ee(){throw ce!==r&&oe<e.length&&we({type:"end"}),function(e,t,r){return new l(l.buildMessage(e,t),e,t,r)}(pe,de<e.length?function(t=oe){const r=e.codePointAt(t);return void 0===r?"":String.fromCodePoint(r)}(de):null,de<e.length?be(de,de+1):be(de,de))}return t.peg$library?{peg$result:ce,peg$currPos:oe,peg$FAILED:r,peg$maxFailExpected:pe,peg$maxFailPos:de,peg$success:$e,peg$throw:$e?void 0:Ee}:$e?ce:void Ee()}(e)}catch(t){throw new n.A("effect:invalid-syntax","Invalid effect syntax",{value:e,error:t})}return t.map(e=>function(e){try{switch(e.name){case"grayscale":case"sepia":case"saturate":case"invert":case"brightness":case"contrast":return function(e){let t=1;return d(e.parameters,1),1===e.parameters.length&&(t=g(e.parameters[0])),new s.yG(e.name,t)}(e);case"opacity":return function(e){let t=1;return d(e.parameters,1),1===e.parameters.length&&(t=g(e.parameters[0])),new s.jm(t)}(e);case"hue-rotate":return function(e){let t=0;return d(e.parameters,1),1===e.parameters.length&&(t=function(e){return function(e){if("quantity"!==e.type||!(0===e.value&&null===e.unit||e.unit&&null!=h[e.unit]))throw new n.A("effect:type-error",`Expected <angle>, Actual: ${p(e)}`,{term:e})}(e),e.value*h[e.unit]||0}(e.parameters[0])),new s.Nd(t)}(e);case"blur":return function(e){let t=0;return d(e.parameters,1),1===e.parameters.length&&(t=m(e.parameters[0]),f(t,e.parameters[0])),new s.Fk(t)}(e);case"drop-shadow":return function(e){const t=[];let r=null;for(const i of e.parameters)if("color"===i.type){if(t.length&&Object.freeze(t),r)throw new n.A("effect:type-error","Accepts only one color",{});r=v(i)}else{const e=m(i);if(Object.isFrozen(t))throw new n.A("effect:type-error","<length> parameters not consecutive",{lengths:t});t.push(e),3===t.length&&f(e,i)}if(t.length<2||t.length>3)throw new n.A("effect:type-error",`Expected <length>{2,3}, Actual: <length>{${t.length}}`,{lengths:t});return new s.$b(t[0],t[1],t[2]||0,r||b("black"))}(e);case"bloom":return function(e){let t=1,r=0,n=0;return d(e.parameters,3),e.parameters[0]&&(t=g(e.parameters[0])),e.parameters[1]&&(r=m(e.parameters[1]),f(r,e.parameters[1])),e.parameters[2]&&(n=g(e.parameters[2])),new s.bv(t,r,n)}(e)}}catch(t){throw t.details.filter=e,t}throw new n.A("effect:unknown-effect",`Effect '${e.name}' is not supported`,{effect:e})}(e))}function d(e,t){if(e.length>t)throw new n.A("effect:type-error",`Function supports up to ${t} parameters, Actual: ${e.length}`,{parameters:e})}function p(e){if("color"===e.type)return"<color>";if(e.unit){if(e.unit in y)return"<length>";if(e.unit in h)return"<angle>";if("%"===e.unit)return"<percentage>"}return"<double>"}function f(e,t){if(e<0)throw new n.A("effect:type-error",`Negative values are not allowed, Actual: ${e}`,{term:t})}const h={deg:1,grad:.9,rad:180/Math.PI,turn:360},y={px:1,cm:96/2.54,mm:96/2.54/10,in:96,pc:16,pt:96/72};function g(e){!function(e){if("quantity"!==e.type||null!==e.unit&&"%"!==e.unit)throw new n.A("effect:type-error",`Expected <double> or <percentage>, Actual: ${p(e)}`,{term:e})}(e);const t=e.value;return f(t,e),"%"===e.unit?.01*t:t}function m(e){return function(e){if("quantity"!==e.type||!(0===e.value&&null===e.unit||e.unit&&null!=y[e.unit]))throw new n.A("effect:type-error",`Expected <length>, Actual: ${p(e)}`,{term:e})}(e),e.value*y[e.unit]||0}function v(e){switch(e.colorType){case"hex":return(0,a.j5)(e.value);case"named":return b(e.value);case"function":return function(e){if(d(e.parameters,4),w.test(e.name))return[g(e.parameters[0]),g(e.parameters[1]),g(e.parameters[2]),e.parameters[3]?g(e.parameters[3]):1];if(A.test(e.name))return(0,a.ay)(function(e){return function(e){if("quantity"!==e.type||null!==e.unit)throw new n.A("effect:type-error",`Expected <double>, Actual: ${p(e)}`,{term:e})}(e),f(e.value,e),e.value}(e.parameters[0]),g(e.parameters[1]),g(e.parameters[2]),e.parameters[3]?g(e.parameters[3]):1);throw new n.A("effect:syntax-error",`Invalid color function '${e.name}'`,{colorFunction:e})}(e.value)}}function b(e){if(!(0,a.V6)(e))throw new n.A("effect:unknown-color",`color '${e}' isn't valid`,{namedColor:e});return(0,a.c4)(e)}const w=/^rgba?/i,A=/^hsla?/i;function C(e,t,r){try{return function(e){if(!e||0===e.length)return null;if(function(e){const t=e[0];return!!t&&"scale"in t}(e)){const t=[];for(const r of e)t.push({scale:r.scale,value:I(r.value)});return t}return I(e)}(e)}catch(e){r?.messages?.push(e)}return null}function x(e,t,r,n){try{const n=function(e){const t=u(e);return t?(0,o.dw)(t)?t.map(e=>e.toJSON()):t.map(({scale:e,effects:t})=>({scale:e,value:t.map(e=>e.toJSON())})):null}(e);(0,i.sM)(r,n,t)}catch(e){n.messages&&n.messages.push(e)}}function I(e){if(!e?.length)return"";const t=[];for(const r of e){let e=[];switch(r.type){case"grayscale":case"sepia":case"saturate":case"invert":case"brightness":case"contrast":case"opacity":e=[L(r,"amount")];break;case"blur":e=[L(r,"radius","pt")];break;case"hue-rotate":e=[L(r,"angle","deg")];break;case"drop-shadow":e=[L(r,"xoffset","pt"),L(r,"yoffset","pt"),L(r,"blurRadius","pt"),M(r,"color")];break;case"bloom":e=[L(r,"strength"),L(r,"radius","pt"),L(r,"threshold")]}const n=`${r.type}(${e.filter(Boolean).join(" ")})`;u(n),t.push(n)}return t.join(" ")}function L(e,t,r){if(null==e[t])throw new n.A("effect:missing-parameter",`Missing parameter '${t}' in ${e.type} effect`,{effect:e});return r?e[t]+r:""+e[t]}function M(e,t){if(null==e[t])throw new n.A("effect:missing-parameter",`Missing parameter '${t}' in ${e.type} effect`,{effect:e});const r=e[t];return`rgba(${r[0]||0}, ${r[1]||0}, ${r[2]||0}, ${r[3]/255||0})`}},63074(e,t,r){r.d(t,{LF:()=>u,dM:()=>c,sU:()=>o});var n=r(5482),i=r(91429),a=r(89317),s=r(76369);const o={type:["average","color-burn","color-dodge","color","darken","destination-atop","destination-in","destination-out","destination-over","difference","exclusion","hard-light","hue","invert","lighten","lighter","luminosity","minus","multiply","normal","overlay","plus","reflect","saturation","screen","soft-light","source-atop","source-in","source-out","vivid-light","xor"],nonNullable:!0,json:{read:!1,write:!1,origins:{"web-map":{read:!0,write:{layerContainerTypes:a.K}},"portal-item":{read:!0,write:{layerContainerTypes:a.K}}}}},l={read:{reader:s.LF},write:{allowNull:!0,writer:s.M9,layerContainerTypes:a.K}},u={json:{read:!1,write:!1,origins:{"web-map":l,"portal-item":l}}},c=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.blendMode="normal",this.effect=null}};return(0,n.Cg)([(0,i.MZ)(o)],r.prototype,"blendMode",void 0),(0,n.Cg)([(0,i.MZ)(u)],r.prototype,"effect",void 0),r=(0,n.Cg)([(0,i.$K)("esri.layers.mixins.BlendLayer")],r),r}},8303(e,t,r){r.d(t,{A:()=>C});var n=r(5482),i=r(92602),a=r(70333),s=r(11254),o=r(60999),l=r(49186),u=r(36563),c=r(53966),d=r(97768),p=r(17676),f=r(84952),h=r(91429),y=r(77548),g=r(20655),m=r(80812),v=r(41318),b=r(10407),w=r(36005),A=r(43937);const C=e=>{const t=e;let C=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,d.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}get portalItem(){return this._get("portalItem")}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new m.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:n}=await r.e(1204).then(r.bind(r,41204));return(0,p.Te)(t),await n({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,p.zf)(e)||c.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async reloadFromPortal(e){if(!this.loaded||!this.portalItem?.id)return!1;try{const{reload:t}=await r.e(1204).then(r.bind(r,41204)),n=new AbortController,i=(0,u.rE)(n);return this.addHandles(i,"reloadFromPortal"),await t({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},{signal:n.signal})}catch(e){throw(0,p.zf)(e)||c.A.getLogger(this).warn(`Failed to reload layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}finally{this.removeHandles("reloadFromPortal")}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch(e=>((0,p.QP)(e),!0)))}async setUserPrivileges(e,t){if(!i.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:n},content:{updateItem:i}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",n),this._set("userHasUpdateItemPrivileges",i)}catch(e){(0,p.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const n=!a.id?.findCredential(this.url),i=e===r.id;if(i&&r.portal.user)return this._getUserPrivileges(r,n);let s,o;if(i)s=r.portal.url;else try{s=await(0,y.wI)(this.url,t)}catch(e){(0,p.QP)(e)}if(!s||!(0,f.b8)(s,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;o=await(a.id?.getCredential(`${s}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,p.QP)(e)}const l=!0,u=!1,c=!1;if(!o)return{features:{edit:l,fullEdit:u},content:{updateItem:c}};try{if(i?await r.reload():(r=new m.default({id:e,portal:{url:s}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,n)}catch(e){(0,p.QP)(e)}return{features:{edit:l,fullEdit:u},content:{updateItem:c}}}_getUserPrivileges(e,t){const r=(0,b.It)(e);return t&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,p.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?a.id?.findCredential(this.url):null;if(!t)return!0;const r=x.credential===t?x.user:await this._fetchEditingUser(e);return x.credential=t,x.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=a.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const n=`${r.owningSystemUrl}/sharing/rest`,i=g.A.getDefault();if(i&&i.loaded&&(0,f.S8)(i.restUrl)===(0,f.S8)(n))return i.user;const l=`${n}/community/self`,u=null!=e?e.signal:null,c=await(0,o.Ke)((0,s.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:u}));return c.ok?v.A.fromJSON(c.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,n=this.portalItem?.id&&(this.portalItem.portal||g.A.getDefault());return r&&n&&!(0,f.ut)(n.restUrl,r.restUrl)?(t.messages&&t.messages.push(new l.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,n.Cg)([(0,h.MZ)({type:m.default})],C.prototype,"portalItem",null),(0,n.Cg)([(0,w.w)("web-document","portalItem",["itemId"])],C.prototype,"readPortalItem",null),(0,n.Cg)([(0,A.K)("web-document","portalItem",{itemId:{type:String}})],C.prototype,"writePortalItem",null),(0,n.Cg)([(0,h.MZ)({clonable:!1})],C.prototype,"resourceReferences",void 0),(0,n.Cg)([(0,h.MZ)({type:Boolean,readOnly:!0})],C.prototype,"userHasEditingPrivileges",void 0),(0,n.Cg)([(0,h.MZ)({type:Boolean,readOnly:!0})],C.prototype,"userHasFullEditingPrivileges",void 0),(0,n.Cg)([(0,h.MZ)({type:Boolean,readOnly:!0})],C.prototype,"userHasUpdateItemPrivileges",void 0),C=(0,n.Cg)([(0,h.$K)("esri.layers.mixins.PortalLayer")],C),C},x={credential:null,user:null}},25036(e,t,r){r.d(t,{j:()=>a});var n=r(5482),i=r(91429);const a=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.minScale=0,this.maxScale=0}get effectiveScaleRange(){const e={minScale:this.minScale,maxScale:this.maxScale},t=this.parent;void 0!==t?.effectiveScaleRange&&function(e,t){e.minScale=e.minScale>0?t.minScale>0?Math.min(e.minScale,t.minScale):e.minScale:t.minScale,e.maxScale=e.maxScale>0?t.maxScale>0?Math.max(e.maxScale,t.maxScale):e.maxScale:t.maxScale}(e,t.effectiveScaleRange);const r=this._get("effectiveScaleRange");return r&&r.minScale===e.minScale&&r.maxScale===e.maxScale?r:e}};return(0,n.Cg)([(0,i.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],r.prototype,"minScale",void 0),(0,n.Cg)([(0,i.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],r.prototype,"maxScale",void 0),(0,n.Cg)([(0,i.MZ)({readOnly:!0})],r.prototype,"effectiveScaleRange",null),r=(0,n.Cg)([(0,i.$K)("esri.layers.mixins.ScaleRangeLayer")],r),r}},75356(e,t,r){r.d(t,{N:()=>y,populateOperationalLayers:()=>d});var n=r(7762),i=(r(44208),r(22429)),a=r(2976),s=r(6345),o=r(80812);function l(e,t){return!(!e.layerType||"ArcGISFeatureLayer"!==e.layerType)&&e.featureCollectionType===t}var u=r(45613),c=r(8947);async function d(e,t,r){if(!t)return;const n=t.map(e=>async function(e,t){return async function(e,t,r){const n=new e;return n.read(t,r.context),"group"===n.type&&("GroupLayer"===t.layerType?await y(n,t,r):h(t)?function(e,t,r){t.itemId&&(e.portalItem=new o.default({id:t.itemId,portal:r?.portal}),e.when(()=>{const n=n=>{const i=n.layerId;g(n,e,t,i,r);const a=t.featureCollection?.layers?.[i];a&&n.read(a,r)};e.layers?.forEach(n),e.tables?.forEach(n)}))}(n,t,r.context):f(t)&&await async function(e,t,r){const n=a.U.FeatureLayer,i=await n(),s=t.featureCollection,o=s?.showLegend,l=s?.layers?.map((n,a)=>{const s=new i;s.read(n,r);const l={...r,ignoreDefaults:!0};return g(s,e,t,a,l),null!=o&&s.read({showLegend:o},l),s});e.layers.addMany(l??[])}(n,t,r.context)),await(0,c.L)(n,r.context),n}(await p(e,t),e,t)}(e,r)),i=await Promise.allSettled(n);for(const t of i)"rejected"===t.status||t.value&&e.add(t.value)}async function p(e,t){const r=t.context,n=(e.layerType||e.type)??t.defaultLayerType;switch(n){case"Feature Collection":case"ArcGISFeatureLayer":if(function(e){return l(e,"notes")}(e)||function(e){return l(e,"markup")}(e))return a.U.MapNotesLayer();if(function(e){return l(e,"route")}(e))return a.U.RouteLayer();if(h(e)){const t=r?.portal;if(e.itemId){const r=new o.default({id:e.itemId,portal:t});await r.load();const n=(await(0,u.n)(r,new i.v)).className||"UnknownLayer";return a.U[n]()}return a.U.UnknownLayer()}return f(e)?a.U.GroupLayer():a.U.FeatureLayer();case"WebTiledLayer":return e.wmtsInfo?.url&&e.wmtsInfo.layerIdentifier?a.U.WMTSLayer():a.U.WebTileLayer();case"WFS":return"2.0.0"!==e.wfsInfo?.version?a.U.UnsupportedLayer():a.U.WFSLayer();default:{const e=(0,s.VH)(r,n);return(0,a.U[e])()}}}function f(e){return"ArcGISFeatureLayer"===e.layerType&&!h(e)&&(e.featureCollection?.layers?.length??0)>1}function h(e){return"Feature Collection"===e.type}async function y(e,t,r){const i=new n.A,a=d(i,Array.isArray(t.layers)?t.layers:[],r);try{try{if(await a,"group"===e.type)return e.layers.addMany(i),e}catch(t){e.destroy();for(const e of i)e.destroy();throw t}}catch(e){throw e}}function g(e,t,r,n,i){e.read({id:`${t.id}-sublayer-${n}`,visibility:r.visibleLayers?.includes(n)??!0},i)}},8947(e,t,r){r.d(t,{L:()=>s});var n=r(60999),i=r(17676),a=r(67076);async function s(e,t,r){const s=e&&e.getAtOrigin&&e.getAtOrigin("renderer",t.origin);if(s&&"unique-value"===s.type&&s.styleOrigin){const o=await(0,n.Ke)(s.populateFromStyle());if((0,i.Te)(r),!1===o.ok){const r=o.error;t?.messages&&t.messages.push(new a.A("renderer:style-reference",`Failed to create unique value renderer from style reference: ${r.message}`,{error:r,context:t})),e.clear("renderer",t?.origin)}}}},78553(e,t,r){r.d(t,{D:()=>a,p:()=>i});var n=r(56507);function i(e){const t=(0,n.Vr)(100*(1-e));return Math.max(0,Math.min(t,100))}function a(e){const t=1-e/100;return Math.max(0,Math.min(t,1))}},26121(e,t,r){r.d(t,{I6:()=>l,ci:()=>o,dL:()=>s});var n=r(49186),i=r(77548),a=r(59923);async function s(e){const t=[];for(const r of e.allLayers)if("beforeSave"in r&&"function"==typeof r.beforeSave){const e=r.beforeSave();e&&t.push(e)}await Promise.allSettled(t)}function o(e,t,r){let i=(e.messages??[]).filter(({type:e})=>"error"===e).map(({name:e,message:t,details:r})=>new n.A(e,t,r));if(e.blockedRelativeUrls&&(i=i.concat(e.blockedRelativeUrls.map(e=>(0,a.GL)("url",`Relative url '${e}' is not supported`)))),r){const{ignoreUnsupported:e,supplementalUnsupportedErrors:t=[],requiredPropertyChecksDisabled:n}=r;e&&(i=i.filter(({name:e})=>!(a.MG.has(e)||t.includes(e)))),n&&(i=i.filter(e=>"web-document-write:property-required"!==e.name))}if(i.length>0)throw new n.A(t.errorName,"Failed to save due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:i})}function l(e){return(0,i.qd)(e).some(e=>!!e.charts?.length)}},751(e,t,r){r.d(t,{CJ:()=>h});var n=r(4718),i=r(93637),a=r(67124),s=r(77548),o=r(59923);const l=new Set(["bing-maps","imagery","imagery-tile","map-image","open-street-map","tile","unknown","unsupported","vector-tile","web-tile","wcs","wms","wmts"]),u=new Set(["integrated-mesh-3dtiles"]),c=new Set(["catalog","csv","feature","geo-rss","geojson","group","imagery","imagery-tile","kml","knowledge-graph","map-image","map-notes","media","ogc-feature","oriented-imagery","parquet","route","stream","subtype-group","tile","unknown","unsupported","vector-tile","video","web-tile","wcs","wfs","wms","wmts"]),d=new Set([...c,"link-chart"]);function p(e,t){if(t.restrictedWebMapWriting){const r=function(e){switch(e.layerContainerType){case"basemap-base-layers":return l;case"basemap-ground-layers":return u;case"operational-layers":return"link-chart"===e.origin?d:c;default:return null}}(t);return null==r||r.has(e.type)&&!(0,s.Ov)(e)}return!0}function f(e,t){"maxScale"in e&&(t.maxScale=(0,a.B)(e.maxScale)??void 0),"minScale"in e&&(t.minScale=(0,a.B)(e.minScale)??void 0)}function h(e,t,r){if(!e.persistenceEnabled)return null;if(!("write"in e)||!e.write)return(0,o.U4)(r,e),null;if((0,s.Ov)(e)&&!e.isTable)t=e.resourceInfo;else if(p(e,r)){const t={};return e.write(t,r)?t:null}return null!=t&&function(e,t){if(function(e,t){if(t)if((0,s.Ov)(e)){const r=(0,i.wc)("featureCollection.layers",t),n=r?.[0]?.layerDefinition;n&&f(e,n)}else"group"!==e.type&&f(e,t)}(e,t),t&&(t.id=e.id,"blendMode"in e&&(t.blendMode=e.blendMode,"normal"===t.blendMode&&delete t.blendMode),t.opacity=(0,a.B)(e.opacity)??void 0,t.title=e.title||"Layer",t.visibility=e.visible,"legendEnabled"in e&&"wmts"!==e.type))if((0,s.Ov)(e)){const r=t.featureCollection;r&&(r.showLegend=e.legendEnabled)}else t.showLegend=e.legendEnabled}(e,t=(0,n.o8)(t)),t}}}]);
|